NNW/Lösungen_N/my_figure.html

3630 lines
4.6 MiB
Raw Permalink Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<style>html, body {height: 100%;}</style>
</head>
<body>
<div style="height:100%; width:100%;"> <script>window.PlotlyConfig = {MathJaxConfig: 'local'};</script>
<script>/**
* plotly.js v4.1.1
* Copyright 2012-2026, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
(
function(root, factory) {
if (typeof module === "object" && module.exports) {
module.exports = factory();
} else {
root.moduleName = factory();
}
} (typeof self !== "undefined" ? self : this, () => {
"use strict";var Plotly=(()=>{var B1t=Object.create;var S6=Object.defineProperty,q1t=Object.defineProperties,O1t=Object.getOwnPropertyDescriptor,N1t=Object.getOwnPropertyDescriptors,U1t=Object.getOwnPropertyNames,tC=Object.getOwnPropertySymbols,V1t=Object.getPrototypeOf,pN=Object.prototype.hasOwnProperty,Vse=Object.prototype.propertyIsEnumerable;var dN=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),G1t=e=>{throw TypeError(e)};var Use=(e,t,r)=>t in e?S6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fn=(e,t)=>{for(var r in t||(t={}))pN.call(t,r)&&Use(e,r,t[r]);if(tC)for(var r of tC(t))Vse.call(t,r)&&Use(e,r,t[r]);return e},ma=(e,t)=>q1t(e,N1t(t));var Gse=(e,t)=>{var r={};for(var i in e)pN.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&tC)for(var i of tC(e))t.indexOf(i)<0&&Vse.call(e,i)&&(r[i]=e[i]);return r};var Ea=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(i){throw r=[i],i}};var W=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},Fp=(e,t)=>{for(var r in t)S6(e,r,{get:t[r],enumerable:!0})},Hse=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of U1t(t))!pN.call(e,n)&&n!==r&&S6(e,n,{get:()=>t[n],enumerable:!(i=O1t(t,n))||i.enumerable});return e};var nd=(e,t,r)=>(r=e!=null?B1t(V1t(e)):{},Hse(t||!e||!e.__esModule?S6(r,"default",{value:e,enumerable:!0}):r,e)),Go=e=>Hse(S6({},"__esModule",{value:!0}),e);var Ki=(e,t,r)=>new Promise((i,n)=>{var a=l=>{try{s(r.next(l))}catch(u){n(u)}},o=l=>{try{s(r.throw(l))}catch(u){n(u)}},s=l=>l.done?i(l.value):Promise.resolve(l.value).then(a,o);s((r=r.apply(e,t)).next())}),H1t=function(e,t){this[0]=e,this[1]=t};var jse=e=>{var t=e[dN("asyncIterator")],r=!1,i,n={};return t==null?(t=e[dN("iterator")](),i=a=>n[a]=o=>t[a](o)):(t=t.call(e),i=a=>n[a]=o=>{if(r){if(r=!1,a==="throw")throw o;return o}return r=!0,{done:!1,value:new H1t(new Promise(s=>{var l=t[a](o);l instanceof Object||G1t("Object expected"),s(l)}),1)}}),n[dN("iterator")]=()=>n,i("next"),"throw"in t?i("throw"):n.throw=a=>{throw a},"return"in t&&i("return"),n};var E6=W($se=>{"use strict";$se.version="4.1.1"});var Yse=W((Wse,rC)=>{(function(t,r,i){r[t]=r[t]||i(),typeof rC!="undefined"&&rC.exports&&(rC.exports=r[t])})("Promise",typeof window!="undefined"?window:Wse,function(){"use strict";var t,r,i,n=Object.prototype.toString,a=typeof setImmediate!="undefined"?function(w){return setImmediate(w)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(w,b,_,M){return Object.defineProperty(w,b,{value:_,writable:!0,configurable:M!==!1})}}catch(g){t=function(b,_,M){return b[_]=M,b}}i=(function(){var w,b,_;function M(x,T){this.fn=x,this.self=T,this.next=void 0}return{add:function(T,A){_=new M(T,A),b?b.next=_:w=_,b=_,_=void 0},drain:function(){var T=w;for(w=b=r=void 0;T;)T.fn.call(T.self),T=T.next}}})();function o(g,w){i.add(g,w),r||(r=a(i.drain))}function s(g){var w,b=typeof g;return g!=null&&(b=="object"||b=="function")&&(w=g.then),typeof w=="function"?w:!1}function l(){for(var g=0;g<this.chain.length;g++)u(this,this.state===1?this.chain[g].success:this.chain[g].failure,this.chain[g]);this.chain.length=0}function u(g,w,b){var _,M;try{w===!1?b.reject(g.msg):(w===!0?_=g.msg:_=w.call(void 0,g.msg),_===b.promise?b.reject(TypeError("Promise-chain cycle")):(M=s(_))?M.call(_,b.resolve,b.reject):b.resolve(_))}catch(x){b.reject(x)}}function c(g){var w,b=this;if(!b.triggered){b.triggered=!0,b.def&&(b=b.def);try{(w=s(g))?o(function(){var _=new d(b);try{w.call(g,function(){c.apply(_,arguments)},function(){f.apply(_,arguments)})}catch(M){f.call(_,M)}}):(b.msg=g,b.state=1,b.chain.length>0&&o(l,b))}catch(_){f.call(new d(b),_)}}}function f(g){var w=this;w.triggered||(w.triggered=!0,w.def&&(w=w.def),w.msg=g,w.state=2,w.chain.length>0&&o(l,w))}function h(g,w,b,_){for(var M=0;M<w.length;M++)(function(T){g.resolve(w[T]).then(function(y){b(T,y)},_)})(M)}function d(g){this.def=g,this.triggered=!1}function p(g){this.promise=g,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function v(g){if(typeof g!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var w=new p(this);this.then=function(_,M){var x={success:typeof _=="function"?_:!0,failure:typeof M=="function"?M:!1};return x.promise=new this.constructor(function(A,y){if(typeof A!="function"||typeof y!="function")throw TypeError("Not a function");x.resolve=A,x.reject=y}),w.chain.push(x),w.state!==0&&o(l,w),x.promise},this.catch=function(_){return this.then(void 0,_)};try{g.call(void 0,function(_){c.call(w,_)},function(_){f.call(w,_)})}catch(b){f.call(w,b)}}var m=t({},"constructor",v,!1);return v.prototype=m,t(m,"__NPO__",0,!1),t(v,"resolve",function(w){var b=this;return w&&typeof w=="object"&&w.__NPO__===1?w:new b(function(M,x){if(typeof M!="function"||typeof x!="function")throw TypeError("Not a function");M(w)})}),t(v,"reject",function(w){return new this(function(_,M){if(typeof _!="function"||typeof M!="function")throw TypeError("Not a function");M(w)})}),t(v,"all",function(w){var b=this;return n.call(w)!="[object Array]"?b.reject(TypeError("Not an array")):w.length===0?b.resolve([]):new b(function(M,x){if(typeof M!="function"||typeof x!="function")throw TypeError("Not a function");var T=w.length,A=Array(T),y=0;h(b,w,function(S,C){A[S]=C,++y===T&&M(A)},x)})}),t(v,"race",function(w){var b=this;return n.call(w)!="[object Array]"?b.reject(TypeError("Not an array")):new b(function(M,x){if(typeof M!="function"||typeof x!="function")throw TypeError("Not a function");h(b,w,function(A,y){M(y)},x)})}),v})});var vi=W((m7r,iC)=>{(function(){var e={version:"3.8.2"},t=[].slice,r=function(z){return t.call(z)},i=self.document;function n(z){return z&&(z.ownerDocument||z.document||z).documentElement}function a(z){return z&&(z.ownerDocument&&z.ownerDocument.defaultView||z.document&&z||z.defaultView)}if(i)try{r(i.documentElement.childNodes)[0].nodeType}catch(z){r=function(N){for(var Z=N.length,ne=new Array(Z);Z--;)ne[Z]=N[Z];return ne}}if(Date.now||(Date.now=function(){return+new Date}),i)try{i.createElement("DIV").style.setProperty("opacity",0,"")}catch(z){var o=this.Element.prototype,s=o.setAttribute,l=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,c=u.setProperty;o.setAttribute=function(N,Z){s.call(this,N,Z+"")},o.setAttributeNS=function(N,Z,ne){l.call(this,N,Z,ne+"")},u.setProperty=function(N,Z,ne){c.call(this,N,Z+"",ne)}}e.ascending=f;function f(z,N){return z<N?-1:z>N?1:z>=N?0:NaN}e.descending=function(z,N){return N<z?-1:N>z?1:N>=z?0:NaN},e.min=function(z,N){var Z=-1,ne=z.length,le,fe;if(arguments.length===1){for(;++Z<ne;)if((fe=z[Z])!=null&&fe>=fe){le=fe;break}for(;++Z<ne;)(fe=z[Z])!=null&&le>fe&&(le=fe)}else{for(;++Z<ne;)if((fe=N.call(z,z[Z],Z))!=null&&fe>=fe){le=fe;break}for(;++Z<ne;)(fe=N.call(z,z[Z],Z))!=null&&le>fe&&(le=fe)}return le},e.max=function(z,N){var Z=-1,ne=z.length,le,fe;if(arguments.length===1){for(;++Z<ne;)if((fe=z[Z])!=null&&fe>=fe){le=fe;break}for(;++Z<ne;)(fe=z[Z])!=null&&fe>le&&(le=fe)}else{for(;++Z<ne;)if((fe=N.call(z,z[Z],Z))!=null&&fe>=fe){le=fe;break}for(;++Z<ne;)(fe=N.call(z,z[Z],Z))!=null&&fe>le&&(le=fe)}return le},e.extent=function(z,N){var Z=-1,ne=z.length,le,fe,De;if(arguments.length===1){for(;++Z<ne;)if((fe=z[Z])!=null&&fe>=fe){le=De=fe;break}for(;++Z<ne;)(fe=z[Z])!=null&&(le>fe&&(le=fe),De<fe&&(De=fe))}else{for(;++Z<ne;)if((fe=N.call(z,z[Z],Z))!=null&&fe>=fe){le=De=fe;break}for(;++Z<ne;)(fe=N.call(z,z[Z],Z))!=null&&(le>fe&&(le=fe),De<fe&&(De=fe))}return[le,De]};function h(z){return z===null?NaN:+z}function d(z){return!isNaN(z)}e.sum=function(z,N){var Z=0,ne=z.length,le,fe=-1;if(arguments.length===1)for(;++fe<ne;)d(le=+z[fe])&&(Z+=le);else for(;++fe<ne;)d(le=+N.call(z,z[fe],fe))&&(Z+=le);return Z},e.mean=function(z,N){var Z=0,ne=z.length,le,fe=-1,De=ne;if(arguments.length===1)for(;++fe<ne;)d(le=h(z[fe]))?Z+=le:--De;else for(;++fe<ne;)d(le=h(N.call(z,z[fe],fe)))?Z+=le:--De;if(De)return Z/De},e.quantile=function(z,N){var Z=(z.length-1)*N+1,ne=Math.floor(Z),le=+z[ne-1],fe=Z-ne;return fe?le+fe*(z[ne]-le):le},e.median=function(z,N){var Z=[],ne=z.length,le,fe=-1;if(arguments.length===1)for(;++fe<ne;)d(le=h(z[fe]))&&Z.push(le);else for(;++fe<ne;)d(le=h(N.call(z,z[fe],fe)))&&Z.push(le);if(Z.length)return e.quantile(Z.sort(f),.5)},e.variance=function(z,N){var Z=z.length,ne=0,le,fe,De=0,me=-1,ze=0;if(arguments.length===1)for(;++me<Z;)d(le=h(z[me]))&&(fe=le-ne,ne+=fe/++ze,De+=fe*(le-ne));else for(;++me<Z;)d(le=h(N.call(z,z[me],me)))&&(fe=le-ne,ne+=fe/++ze,De+=fe*(le-ne));if(ze>1)return De/(ze-1)},e.deviation=function(){var z=e.variance.apply(this,arguments);return z&&Math.sqrt(z)};function p(z){return{left:function(N,Z,ne,le){for(arguments.length<3&&(ne=0),arguments.length<4&&(le=N.length);ne<le;){var fe=ne+le>>>1;z(N[fe],Z)<0?ne=fe+1:le=fe}return ne},right:function(N,Z,ne,le){for(arguments.length<3&&(ne=0),arguments.length<4&&(le=N.length);ne<le;){var fe=ne+le>>>1;z(N[fe],Z)>0?le=fe:ne=fe+1}return ne}}}var v=p(f);e.bisectLeft=v.left,e.bisect=e.bisectRight=v.right,e.bisector=function(z){return p(z.length===1?function(N,Z){return f(z(N),Z)}:z)},e.shuffle=function(z,N,Z){(ne=arguments.length)<3&&(Z=z.length,ne<2&&(N=0));for(var ne=Z-N,le,fe;ne;)fe=Math.random()*ne--|0,le=z[ne+N],z[ne+N]=z[fe+N],z[fe+N]=le;return z},e.permute=function(z,N){for(var Z=N.length,ne=new Array(Z);Z--;)ne[Z]=z[N[Z]];return ne},e.pairs=function(z){for(var N=0,Z=z.length-1,ne,le=z[0],fe=new Array(Z<0?0:Z);N<Z;)fe[N]=[ne=le,le=z[++N]];return fe},e.transpose=function(z){if(!(fe=z.length))return[];for(var N=-1,Z=e.min(z,m),ne=new Array(Z);++N<Z;)for(var le=-1,fe,De=ne[N]=new Array(fe);++le<fe;)De[le]=z[le][N];return ne};function m(z){return z.length}e.zip=function(){return e.transpose(arguments)},e.keys=function(z){var N=[];for(var Z in z)N.push(Z);return N},e.values=function(z){var N=[];for(var Z in z)N.push(z[Z]);return N},e.entries=function(z){var N=[];for(var Z in z)N.push({key:Z,value:z[Z]});return N},e.merge=function(z){for(var N=z.length,Z,ne=-1,le=0,fe,De;++ne<N;)le+=z[ne].length;for(fe=new Array(le);--N>=0;)for(De=z[N],Z=De.length;--Z>=0;)fe[--le]=De[Z];return fe};var g=Math.abs;e.range=function(z,N,Z){if(arguments.length<3&&(Z=1,arguments.length<2&&(N=z,z=0)),(N-z)/Z===1/0)throw new Error("infinite range");var ne=[],le=w(g(Z)),fe=-1,De;if(z*=le,N*=le,Z*=le,Z<0)for(;(De=z+Z*++fe)>N;)ne.push(De/le);else for(;(De=z+Z*++fe)<N;)ne.push(De/le);return ne};function w(z){for(var N=1;z*N%1;)N*=10;return N}function b(z,N){for(var Z in N)Object.defineProperty(z.prototype,Z,{value:N[Z],enumerable:!1})}e.map=function(z,N){var Z=new _;if(z instanceof _)z.forEach(function(me,ze){Z.set(me,ze)});else if(Array.isArray(z)){var ne=-1,le=z.length,fe;if(arguments.length===1)for(;++ne<le;)Z.set(ne,z[ne]);else for(;++ne<le;)Z.set(N.call(z,fe=z[ne],ne),fe)}else for(var De in z)Z.set(De,z[De]);return Z};function _(){this._=Object.create(null)}var M="__proto__",x="\0";b(_,{has:y,get:function(z){return this._[T(z)]},set:function(z,N){return this._[T(z)]=N},remove:E,keys:S,values:function(){var z=[];for(var N in this._)z.push(this._[N]);return z},entries:function(){var z=[];for(var N in this._)z.push({key:A(N),value:this._[N]});return z},size:C,empty:k,forEach:function(z){for(var N in this._)z.call(this,A(N),this._[N])}});function T(z){return(z+="")===M||z[0]===x?x+z:z}function A(z){return(z+="")[0]===x?z.slice(1):z}function y(z){return T(z)in this._}function E(z){return(z=T(z))in this._&&delete this._[z]}function S(){var z=[];for(var N in this._)z.push(A(N));return z}function C(){var z=0;for(var N in this._)++z;return z}function k(){for(var z in this._)return!1;return!0}e.nest=function(){var z={},N=[],Z=[],ne,le;function fe(me,ze,He){if(He>=N.length)return le?le.call(z,ze):ne?ze.sort(ne):ze;for(var We=-1,ft=ze.length,ht=N[He++],Ot,jt,pt,Dt=new _,zt;++We<ft;)(zt=Dt.get(Ot=ht(jt=ze[We])))?zt.push(jt):Dt.set(Ot,[jt]);return me?(jt=me(),pt=function($t,Yt){jt.set($t,fe(me,Yt,He))}):(jt={},pt=function($t,Yt){jt[$t]=fe(me,Yt,He)}),Dt.forEach(pt),jt}function De(me,ze){if(ze>=N.length)return me;var He=[],We=Z[ze++];return me.forEach(function(ft,ht){He.push({key:ft,values:De(ht,ze)})}),We?He.sort(function(ft,ht){return We(ft.key,ht.key)}):He}return z.map=function(me,ze){return fe(ze,me,0)},z.entries=function(me){return De(fe(e.map,me,0),0)},z.key=function(me){return N.push(me),z},z.sortKeys=function(me){return Z[N.length-1]=me,z},z.sortValues=function(me){return ne=me,z},z.rollup=function(me){return le=me,z},z},e.set=function(z){var N=new D;if(z)for(var Z=0,ne=z.length;Z<ne;++Z)N.add(z[Z]);return N};function D(){this._=Object.create(null)}b(D,{has:y,add:function(z){return this._[T(z+="")]=!0,z},remove:E,values:S,size:C,empty:k,forEach:function(z){for(var N in this._)z.call(this,A(N))}}),e.behavior={};function F(z){return z}e.rebind=function(z,N){for(var Z=1,ne=arguments.length,le;++Z<ne;)z[le=arguments[Z]]=P(z,N,N[le]);return z};function P(z,N,Z){return function(){var ne=Z.apply(N,arguments);return ne===N?z:ne}}function R(z,N){if(N in z)return N;N=N.charAt(0).toUpperCase()+N.slice(1);for(var Z=0,ne=L.length;Z<ne;++Z){var le=L[Z]+N;if(le in z)return le}}var L=["webkit","ms","moz","Moz","o","O"];function I(){}e.dispatch=function(){for(var z=new B,N=-1,Z=arguments.length;++N<Z;)z[arguments[N]]=O(z);return z};function B(){}B.prototype.on=function(z,N){var Z=z.indexOf("."),ne="";if(Z>=0&&(ne=z.slice(Z+1),z=z.slice(0,Z)),z)return arguments.length<2?this[z].on(ne):this[z].on(ne,N);if(arguments.length===2){if(N==null)for(z in this)this.hasOwnProperty(z)&&this[z].on(ne,null);return this}};function O(z){var N=[],Z=new _;function ne(){for(var le=N,fe=-1,De=le.length,me;++fe<De;)(me=le[fe].on)&&me.apply(this,arguments);return z}return ne.on=function(le,fe){var De=Z.get(le),me;return arguments.length<2?De&&De.on:(De&&(De.on=null,N=N.slice(0,me=N.indexOf(De)).concat(N.slice(me+1)),Z.remove(le)),fe&&N.push(Z.set(le,{on:fe})),z)},ne}e.event=null;function $(){e.event.preventDefault()}function Y(){for(var z=e.event,N;N=z.sourceEvent;)z=N;return z}function K(z){for(var N=new B,Z=0,ne=arguments.length;++Z<ne;)N[arguments[Z]]=O(N);return N.of=function(le,fe){return function(De){try{var me=De.sourceEvent=e.event;De.target=z,e.event=De,N[De.type].apply(le,fe)}finally{e.event=me}}},N}e.requote=function(z){return z.replace(j,"\\$&")};var j=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,q={}.__proto__?function(z,N){z.__proto__=N}:function(z,N){for(var Z in N)z[Z]=N[Z]};function J(z){return q(z,H),z}var U=function(z,N){return N.querySelector(z)},V=function(z,N){return N.querySelectorAll(z)},X=function(z,N){var Z=z.matches||z[R(z,"matchesSelector")];return X=function(ne,le){return Z.call(ne,le)},X(z,N)};typeof Sizzle=="function"&&(U=function(z,N){return Sizzle(z,N)[0]||null},V=Sizzle,X=Sizzle.matchesSelector),e.selection=function(){return e.select(i.documentElement)};var H=e.selection.prototype=[];H.select=function(z){var N=[],Z,ne,le,fe;z=G(z);for(var De=-1,me=this.length;++De<me;){N.push(Z=[]),Z.parentNode=(le=this[De]).parentNode;for(var ze=-1,He=le.length;++ze<He;)(fe=le[ze])?(Z.push(ne=z.call(fe,fe.__data__,ze,De)),ne&&"__data__"in fe&&(ne.__data__=fe.__data__)):Z.push(null)}return J(N)};function G(z){return typeof z=="function"?z:function(){return U(z,this)}}H.selectAll=function(z){var N=[],Z,ne;z=Q(z);for(var le=-1,fe=this.length;++le<fe;)for(var De=this[le],me=-1,ze=De.length;++me<ze;)(ne=De[me])&&(N.push(Z=r(z.call(ne,ne.__data__,me,le))),Z.parentNode=ne);return J(N)};function Q(z){return typeof z=="function"?z:function(){return V(z,this)}}var te="http://www.w3.org/1999/xhtml",ce={svg:"http://www.w3.org/2000/svg",xhtml:te,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};e.ns={prefix:ce,qualify:function(z){var N=z.indexOf(":"),Z=z;return N>=0&&(Z=z.slice(0,N))!=="xmlns"&&(z=z.slice(N+1)),ce.hasOwnProperty(Z)?{space:ce[Z],local:z}:z}},H.attr=function(z,N){if(arguments.length<2){if(typeof z=="string"){var Z=this.node();return z=e.ns.qualify(z),z.local?Z.getAttributeNS(z.space,z.local):Z.getAttribute(z)}for(N in z)this.each(ge(N,z[N]));return this}return this.each(ge(z,N))};function ge(z,N){z=e.ns.qualify(z);function Z(){this.removeAttribute(z)}function ne(){this.removeAttributeNS(z.space,z.local)}function le(){this.setAttribute(z,N)}function fe(){this.setAttributeNS(z.space,z.local,N)}function De(){var ze=N.apply(this,arguments);ze==null?this.removeAttribute(z):this.setAttribute(z,ze)}function me(){var ze=N.apply(this,arguments);ze==null?this.removeAttributeNS(z.space,z.local):this.setAttributeNS(z.space,z.local,ze)}return N==null?z.local?ne:Z:typeof N=="function"?z.local?me:De:z.local?fe:le}function Ce(z){return z.trim().replace(/\s+/g," ")}H.classed=function(z,N){if(arguments.length<2){if(typeof z=="string"){var Z=this.node(),ne=(z=he(z)).length,le=-1;if(N=Z.classList){for(;++le<ne;)if(!N.contains(z[le]))return!1}else for(N=Z.getAttribute("class");++le<ne;)if(!be(z[le]).test(N))return!1;return!0}for(N in z)this.each(oe(N,z[N]));return this}return this.each(oe(z,N))};function be(z){return new RegExp("(?:^|\\s+)"+e.requote(z)+"(?:\\s+|$)","g")}function he(z){return(z+"").trim().split(/^|\s+/)}function oe(z,N){z=he(z).map(Ee);var Z=z.length;function ne(){for(var fe=-1;++fe<Z;)z[fe](this,N)}function le(){for(var fe=-1,De=N.apply(this,arguments);++fe<Z;)z[fe](this,De)}return typeof N=="function"?le:ne}function Ee(z){var N=be(z);return function(Z,ne){if(le=Z.classList)return ne?le.add(z):le.remove(z);var le=Z.getAttribute("class")||"";ne?(N.lastIndex=0,N.test(le)||Z.setAttribute("class",Ce(le+" "+z))):Z.setAttribute("class",Ce(le.replace(N," ")))}}H.style=function(z,N,Z){var ne=arguments.length;if(ne<3){if(typeof z!="string"){ne<2&&(N="");for(Z in z)this.each(ye(Z,z[Z],N));return this}if(ne<2){var le=this.node();return a(le).getComputedStyle(le,null).getPropertyValue(z)}Z=""}return this.each(ye(z,N,Z))};function ye(z,N,Z){function ne(){this.style.removeProperty(z)}function le(){this.style.setProperty(z,N,Z)}function fe(){var De=N.apply(this,arguments);De==null?this.style.removeProperty(z):this.style.setProperty(z,De,Z)}return N==null?ne:typeof N=="function"?fe:le}H.property=function(z,N){if(arguments.length<2){if(typeof z=="string")return this.node()[z];for(N in z)this.each(ue(N,z[N]));return this}return this.each(ue(z,N))};function ue(z,N){function Z(){delete this[z]}function ne(){this[z]=N}function le(){var fe=N.apply(this,arguments);fe==null?delete this[z]:this[z]=fe}return N==null?Z:typeof N=="function"?le:ne}H.text=function(z){return arguments.length?this.each(typeof z=="function"?function(){var N=z.apply(this,arguments);this.textContent=N==null?"":N}:z==null?function(){this.textContent=""}:function(){this.textContent=z}):this.node().textContent},H.html=function(z){return arguments.length?this.each(typeof z=="function"?function(){var N=z.apply(this,arguments);this.innerHTML=N==null?"":N}:z==null?function(){this.innerHTML=""}:function(){this.innerHTML=z}):this.node().innerHTML},H.append=function(z){return z=ee(z),this.select(function(){return this.appendChild(z.apply(this,arguments))})};function ee(z){function N(){var ne=this.ownerDocument,le=this.namespaceURI;return le===te&&ne.documentElement.namespaceURI===te?ne.createElement(z):ne.createElementNS(le,z)}function Z(){return this.ownerDocument.createElementNS(z.space,z.local)}return typeof z=="function"?z:(z=e.ns.qualify(z)).local?Z:N}H.insert=function(z,N){return z=ee(z),N=G(N),this.select(function(){return this.insertBefore(z.apply(this,arguments),N.apply(this,arguments)||null)})},H.remove=function(){return this.each(ae)};function ae(){var z=this.parentNode;z&&z.removeChild(this)}H.data=function(z,N){var Z=-1,ne=this.length,le,fe;if(!arguments.length){for(z=new Array(ne=(le=this[0]).length);++Z<ne;)(fe=le[Z])&&(z[Z]=fe.__data__);return z}function De(We,ft){var ht,Ot=We.length,jt=ft.length,pt=Math.min(Ot,jt),Dt=new Array(jt),zt=new Array(jt),$t=new Array(Ot),Yt,Lt;if(N){var Cr=new _,Gr=new Array(Ot),ri;for(ht=-1;++ht<Ot;)(Yt=We[ht])&&(Cr.has(ri=N.call(Yt,Yt.__data__,ht))?$t[ht]=Yt:Cr.set(ri,Yt),Gr[ht]=ri);for(ht=-1;++ht<jt;)(Yt=Cr.get(ri=N.call(ft,Lt=ft[ht],ht)))?Yt!==!0&&(Dt[ht]=Yt,Yt.__data__=Lt):zt[ht]=xe(Lt),Cr.set(ri,!0);for(ht=-1;++ht<Ot;)ht in Gr&&Cr.get(Gr[ht])!==!0&&($t[ht]=We[ht])}else{for(ht=-1;++ht<pt;)Yt=We[ht],Lt=ft[ht],Yt?(Yt.__data__=Lt,Dt[ht]=Yt):zt[ht]=xe(Lt);for(;ht<jt;++ht)zt[ht]=xe(ft[ht]);for(;ht<Ot;++ht)$t[ht]=We[ht]}zt.update=Dt,zt.parentNode=Dt.parentNode=$t.parentNode=We.parentNode,me.push(zt),ze.push(Dt),He.push($t)}var me=Fe([]),ze=J([]),He=J([]);if(typeof z=="function")for(;++Z<ne;)De(le=this[Z],z.call(le,le.parentNode.__data__,Z));else for(;++Z<ne;)De(le=this[Z],z);return ze.enter=function(){return me},ze.exit=function(){return He},ze};function xe(z){return{__data__:z}}H.datum=function(z){return arguments.length?this.property("__data__",z):this.property("__data__")},H.filter=function(z){var N=[],Z,ne,le;typeof z!="function"&&(z=re(z));for(var fe=0,De=this.length;fe<De;fe++){N.push(Z=[]),Z.parentNode=(ne=this[fe]).parentNode;for(var me=0,ze=ne.length;me<ze;me++)(le=ne[me])&&z.call(le,le.__data__,me,fe)&&Z.push(le)}return J(N)};function re(z){return function(){return X(this,z)}}H.order=function(){for(var z=-1,N=this.length;++z<N;)for(var Z=this[z],ne=Z.length-1,le=Z[ne],fe;--ne>=0;)(fe=Z[ne])&&(le&&le!==fe.nextSibling&&le.parentNode.insertBefore(fe,le),le=fe);return this},H.sort=function(z){z=pe.apply(this,arguments);for(var N=-1,Z=this.length;++N<Z;)this[N].sort(z);return this.order()};function pe(z){return arguments.length||(z=f),function(N,Z){return N&&Z?z(N.__data__,Z.__data__):!N-!Z}}H.each=function(z){return we(this,function(N,Z,ne){z.call(N,N.__data__,Z,ne)})};function we(z,N){for(var Z=0,ne=z.length;Z<ne;Z++)for(var le=z[Z],fe=0,De=le.length,me;fe<De;fe++)(me=le[fe])&&N(me,fe,Z);return z}H.call=function(z){var N=r(arguments);return z.apply(N[0]=this,N),this},H.empty=function(){return!this.node()},H.node=function(){for(var z=0,N=this.length;z<N;z++)for(var Z=this[z],ne=0,le=Z.length;ne<le;ne++){var fe=Z[ne];if(fe)return fe}return null},H.size=function(){var z=0;return we(this,function(){++z}),z};function Fe(z){return q(z,Se),z}var Se=[];e.selection.enter=Fe,e.selection.enter.prototype=Se,Se.append=H.append,Se.empty=H.empty,Se.node=H.node,Se.call=H.call,Se.size=H.size,Se.select=function(z){for(var N=[],Z,ne,le,fe,De,me=-1,ze=this.length;++me<ze;){le=(fe=this[me]).update,N.push(Z=[]),Z.parentNode=fe.parentNode;for(var He=-1,We=fe.length;++He<We;)(De=fe[He])?(Z.push(le[He]=ne=z.call(fe.parentNode,De.__data__,He,me)),ne.__data__=De.__data__):Z.push(null)}return J(N)},Se.insert=function(z,N){return arguments.length<2&&(N=ke(this)),H.insert.call(this,z,N)};function ke(z){var N,Z;return function(ne,le,fe){var De=z[fe].update,me=De.length,ze;for(fe!=Z&&(Z=fe,N=0),le>=N&&(N=le+1);!(ze=De[N])&&++N<me;);return ze}}e.select=function(z){var N;return typeof z=="string"?(N=[U(z,i)],N.parentNode=i.documentElement):(N=[z],N.parentNode=n(z)),J([N])},e.selectAll=function(z){var N;return typeof z=="string"?(N=r(V(z,i)),N.parentNode=i.documentElement):(N=r(z),N.parentNode=null),J([N])},H.on=function(z,N,Z){var ne=arguments.length;if(ne<3){if(typeof z!="string"){ne<2&&(N=!1);for(Z in z)this.each(_e(Z,z[Z],N));return this}if(ne<2)return(ne=this.node()["__on"+z])&&ne._;Z=!1}return this.each(_e(z,N,Z))};function _e(z,N,Z){var ne="__on"+z,le=z.indexOf("."),fe=Oe;le>0&&(z=z.slice(0,le));var De=Ie.get(z);De&&(z=De,fe=Qe);function me(){var We=this[ne];We&&(this.removeEventListener(z,We,We.$),delete this[ne])}function ze(){var We=fe(N,r(arguments));me.call(this),this.addEventListener(z,this[ne]=We,We.$=Z),We._=N}function He(){var We=new RegExp("^__on([^.]+)"+e.requote(z)+"$"),ft;for(var ht in this)if(ft=ht.match(We)){var Ot=this[ht];this.removeEventListener(ft[1],Ot,Ot.$),delete this[ht]}}return le?N?ze:me:N?I:He}var Ie=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});i&&Ie.forEach(function(z){"on"+z in i&&Ie.remove(z)});function Oe(z,N){return function(Z){var ne=e.event;e.event=Z,N[0]=this.__data__;try{z.apply(this,N)}finally{e.event=ne}}}function Qe(z,N){var Z=Oe(z,N);return function(ne){var le=this,fe=ne.relatedTarget;(!fe||fe!==le&&!(fe.compareDocumentPosition(le)&8))&&Z.call(le,ne)}}var et,_t=0;function ut(z){var N=".dragsuppress-"+ ++_t,Z="click"+N,ne=e.select(a(z)).on("touchmove"+N,$).on("dragstart"+N,$).on("selectstart"+N,$);if(et==null&&(et="onselectstart"in z?!1:R(z.style,"userSelect")),et){var le=n(z).style,fe=le[et];le[et]="none"}return function(De){if(ne.on(N,null),et&&(le[et]=fe),De){var me=function(){ne.on(Z,null)};ne.on(Z,function(){$(),me()},!0),setTimeout(me,0)}}}e.mouse=function(z){return Xe(z,Y())};var vt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Xe(z,N){N.changedTouches&&(N=N.changedTouches[0]);var Z=z.ownerSVGElement||z;if(Z.createSVGPoint){var ne=Z.createSVGPoint();if(vt<0){var le=a(z);if(le.scrollX||le.scrollY){Z=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var fe=Z[0][0].getScreenCTM();vt=!(fe.f||fe.e),Z.remove()}}return vt?(ne.x=N.pageX,ne.y=N.pageY):(ne.x=N.clientX,ne.y=N.clientY),ne=ne.matrixTransform(z.getScreenCTM().inverse()),[ne.x,ne.y]}var De=z.getBoundingClientRect();return[N.clientX-De.left-z.clientLeft,N.clientY-De.top-z.clientTop]}e.touch=function(z,N,Z){if(arguments.length<3&&(Z=N,N=Y().changedTouches),N){for(var ne=0,le=N.length,fe;ne<le;++ne)if((fe=N[ne]).identifier===Z)return Xe(z,fe)}},e.behavior.drag=function(){var z=K(le,"drag","dragstart","dragend"),N=null,Z=fe(I,e.mouse,a,"mousemove","mouseup"),ne=fe(mt,e.touch,F,"touchmove","touchend");function le(){this.on("mousedown.drag",Z).on("touchstart.drag",ne)}function fe(De,me,ze,He,We){return function(){var ft=this,ht=e.event.target.correspondingElement||e.event.target,Ot=ft.parentNode,jt=z.of(ft,arguments),pt=0,Dt=De(),zt=".drag"+(Dt==null?"":"-"+Dt),$t,Yt=e.select(ze(ht)).on(He+zt,Gr).on(We+zt,ri),Lt=ut(ht),Cr=me(Ot,Dt);N?($t=N.apply(ft,arguments),$t=[$t.x-Cr[0],$t.y-Cr[1]]):$t=[0,0],jt({type:"dragstart"});function Gr(){var pi=me(Ot,Dt),Li,Pi;pi&&(Li=pi[0]-Cr[0],Pi=pi[1]-Cr[1],pt|=Li|Pi,Cr=pi,jt({type:"drag",x:pi[0]+$t[0],y:pi[1]+$t[1],dx:Li,dy:Pi}))}function ri(){me(Ot,Dt)&&(Yt.on(He+zt,null).on(We+zt,null),Lt(pt),jt({type:"dragend"}))}}}return le.origin=function(De){return arguments.length?(N=De,le):N},e.rebind(le,z,"on")};function mt(){return e.event.changedTouches[0].identifier}e.touches=function(z,N){return arguments.length<2&&(N=Y().touches),N?r(N).map(function(Z){var ne=Xe(z,Z);return ne.identifier=Z.identifier,ne}):[]};var bt=1e-6,Ne=bt*bt,Ue=Math.PI,Ge=2*Ue,je=Ge-bt,Re=Ue/2,Ve=Ue/180,ct=180/Ue;function Tt(z){return z>0?1:z<0?-1:0}function Xt(z,N,Z){return(N[0]-z[0])*(Z[1]-z[1])-(N[1]-z[1])*(Z[0]-z[0])}function Vt(z){return z>1?0:z<-1?Ue:Math.acos(z)}function lr(z){return z>1?Re:z<-1?-Re:Math.asin(z)}function ur(z){return((z=Math.exp(z))-1/z)/2}function Bt(z){return((z=Math.exp(z))+1/z)/2}function Zt(z){return((z=Math.exp(2*z))-1)/(z+1)}function kr(z){return(z=Math.sin(z/2))*z}var $e=Math.SQRT2,tt=2,st=4;e.interpolateZoom=function(z,N){var Z=z[0],ne=z[1],le=z[2],fe=N[0],De=N[1],me=N[2],ze=fe-Z,He=De-ne,We=ze*ze+He*He,ft,ht;if(We<Ne)ht=Math.log(me/le)/$e,ft=function($t){return[Z+$t*ze,ne+$t*He,le*Math.exp($e*$t*ht)]};else{var Ot=Math.sqrt(We),jt=(me*me-le*le+st*We)/(2*le*tt*Ot),pt=(me*me-le*le-st*We)/(2*me*tt*Ot),Dt=Math.log(Math.sqrt(jt*jt+1)-jt),zt=Math.log(Math.sqrt(pt*pt+1)-pt);ht=(zt-Dt)/$e,ft=function($t){var Yt=$t*ht,Lt=Bt(Dt),Cr=le/(tt*Ot)*(Lt*Zt($e*Yt+Dt)-ur(Dt));return[Z+Cr*ze,ne+Cr*He,le*Lt/Bt($e*Yt+Dt)]}}return ft.duration=ht*1e3,ft},e.behavior.zoom=function(){var z={x:0,y:0,k:1},N,Z,ne,le=[960,500],fe=xt,De=250,me=0,ze="mousedown.zoom",He="mousemove.zoom",We="mouseup.zoom",ft,ht="touchstart.zoom",Ot,jt=K(Yt,"zoomstart","zoom","zoomend"),pt,Dt,zt,$t;Ct||(Ct="onwheel"in i?(Je=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in i?(Je=function(){return e.event.wheelDelta},"mousewheel"):(Je=function(){return-e.event.detail},"MozMousePixelScroll"));function Yt(oi){oi.on(ze,kn).on(Ct+".zoom",Qs).on("dblclick.zoom",lo).on(ht,Ua)}Yt.event=function(oi){oi.each(function(){var zn=jt.of(this,arguments),Yn=z;wl?e.select(this).transition().each("start.zoom",function(){z=this.__chart__||{x:0,y:0,k:1},Pi(zn)}).tween("zoom:zoom",function(){var qa=le[0],gs=le[1],Tl=Z?Z[0]:qa/2,Mu=Z?Z[1]:gs/2,Zu=e.interpolateZoom([(Tl-z.x)/z.k,(Mu-z.y)/z.k,qa/z.k],[(Tl-Yn.x)/Yn.k,(Mu-Yn.y)/Yn.k,qa/Yn.k]);return function(Wc){var Be=Zu(Wc),gt=qa/Be[2];this.__chart__=z={x:Tl-Be[0]*gt,y:Mu-Be[1]*gt,k:gt},Rn(zn)}}).each("interrupt.zoom",function(){Gi(zn)}).each("end.zoom",function(){Gi(zn)}):(this.__chart__=z,Pi(zn),Rn(zn),Gi(zn))})},Yt.translate=function(oi){return arguments.length?(z={x:+oi[0],y:+oi[1],k:z.k},Li(),Yt):[z.x,z.y]},Yt.scale=function(oi){return arguments.length?(z={x:z.x,y:z.y,k:null},Gr(+oi),Li(),Yt):z.k},Yt.scaleExtent=function(oi){return arguments.length?(fe=oi==null?xt:[+oi[0],+oi[1]],Yt):fe},Yt.center=function(oi){return arguments.length?(ne=oi&&[+oi[0],+oi[1]],Yt):ne},Yt.size=function(oi){return arguments.length?(le=oi&&[+oi[0],+oi[1]],Yt):le},Yt.duration=function(oi){return arguments.length?(De=+oi,Yt):De},Yt.x=function(oi){return arguments.length?(Dt=oi,pt=oi.copy(),z={x:0,y:0,k:1},Yt):Dt},Yt.y=function(oi){return arguments.length?($t=oi,zt=oi.copy(),z={x:0,y:0,k:1},Yt):$t};function Lt(oi){return[(oi[0]-z.x)/z.k,(oi[1]-z.y)/z.k]}function Cr(oi){return[oi[0]*z.k+z.x,oi[1]*z.k+z.y]}function Gr(oi){z.k=Math.max(fe[0],Math.min(fe[1],oi))}function ri(oi,zn){zn=Cr(zn),z.x+=oi[0]-zn[0],z.y+=oi[1]-zn[1]}function pi(oi,zn,Yn,qa){oi.__chart__={x:z.x,y:z.y,k:z.k},Gr(Math.pow(2,qa)),ri(Z=zn,Yn),oi=e.select(oi),De>0&&(oi=oi.transition().duration(De)),oi.call(Yt.event)}function Li(){Dt&&Dt.domain(pt.range().map(function(oi){return(oi-z.x)/z.k}).map(pt.invert)),$t&&$t.domain(zt.range().map(function(oi){return(oi-z.y)/z.k}).map(zt.invert))}function Pi(oi){me++||oi({type:"zoomstart"})}function Rn(oi){Li(),oi({type:"zoom",scale:z.k,translate:[z.x,z.y]})}function Gi(oi){--me||(oi({type:"zoomend"}),Z=null)}function kn(){var oi=this,zn=jt.of(oi,arguments),Yn=0,qa=e.select(a(oi)).on(He,Mu).on(We,Zu),gs=Lt(e.mouse(oi)),Tl=ut(oi);Dn.call(oi),Pi(zn);function Mu(){Yn=1,ri(e.mouse(oi),gs),Rn(zn)}function Zu(){qa.on(He,null).on(We,null),Tl(Yn),Gi(zn)}}function Ua(){var oi=this,zn=jt.of(oi,arguments),Yn={},qa=0,gs,Tl=".zoom-"+e.event.changedTouches[0].identifier,Mu="touchmove"+Tl,Zu="touchend"+Tl,Wc=[],Be=e.select(oi),gt=ut(oi);or(),Pi(zn),Be.on(ze,null).on(ht,or);function Mt(){var dr=e.touches(oi);return gs=z.k,dr.forEach(function(Br){Br.identifier in Yn&&(Yn[Br.identifier]=Lt(Br))}),dr}function or(){var dr=e.event.target;e.select(dr).on(Mu,vr).on(Zu,wr),Wc.push(dr);for(var Br=e.event.changedTouches,Zr=0,Kr=Br.length;Zr<Kr;++Zr)Yn[Br[Zr].identifier]=null;var Jr=Mt(),un=Date.now();if(Jr.length===1){if(un-Ot<500){var Oi=Jr[0];pi(oi,Oi,Yn[Oi.identifier],Math.floor(Math.log(z.k)/Math.LN2)+1),$()}Ot=un}else if(Jr.length>1){var Oi=Jr[0],mi=Jr[1],Fr=Oi[0]-mi[0],Qt=Oi[1]-mi[1];qa=Fr*Fr+Qt*Qt}}function vr(){var dr=e.touches(oi),Br,Zr,Kr,Jr;Dn.call(oi);for(var un=0,Oi=dr.length;un<Oi;++un,Jr=null)if(Kr=dr[un],Jr=Yn[Kr.identifier]){if(Zr)break;Br=Kr,Zr=Jr}if(Jr){var mi=(mi=Kr[0]-Br[0])*mi+(mi=Kr[1]-Br[1])*mi,Fr=qa&&Math.sqrt(mi/qa);Br=[(Br[0]+Kr[0])/2,(Br[1]+Kr[1])/2],Zr=[(Zr[0]+Jr[0])/2,(Zr[1]+Jr[1])/2],Gr(Fr*gs)}Ot=null,ri(Br,Zr),Rn(zn)}function wr(){if(e.event.touches.length){for(var dr=e.event.changedTouches,Br=0,Zr=dr.length;Br<Zr;++Br)delete Yn[dr[Br].identifier];for(var Kr in Yn)return void Mt()}e.selectAll(Wc).on(Tl,null),Be.on(ze,kn).on(ht,Ua),gt(),Gi(zn)}}function Qs(){var oi=jt.of(this,arguments);ft?clearTimeout(ft):(Dn.call(this),N=Lt(Z=ne||e.mouse(this)),Pi(oi)),ft=setTimeout(function(){ft=null,Gi(oi)},50),$(),Gr(Math.pow(2,Je()*.002)*z.k),ri(Z,N),Rn(oi)}function lo(){var oi=e.mouse(this),zn=Math.log(z.k)/Math.LN2;pi(this,oi,Lt(oi),e.event.shiftKey?Math.ceil(zn)-1:Math.floor(zn)+1)}return e.rebind(Yt,jt,"on")};var xt=[0,1/0],Je,Ct;e.color=ir;function ir(){}ir.prototype.toString=function(){return this.rgb()+""},e.hsl=hr;function hr(z,N,Z){return this instanceof hr?(this.h=+z,this.s=+N,void(this.l=+Z)):arguments.length<2?z instanceof hr?new hr(z.h,z.s,z.l):_l(""+z,yu,hr):new hr(z,N,Z)}var Ur=hr.prototype=new ir;Ur.brighter=function(z){return z=Math.pow(.7,arguments.length?z:1),new hr(this.h,this.s,this.l/z)},Ur.darker=function(z){return z=Math.pow(.7,arguments.length?z:1),new hr(this.h,this.s,z*this.l)},Ur.rgb=function(){return si(this.h,this.s,this.l)};function si(z,N,Z){var ne,le;z=isNaN(z)?0:(z%=360)<0?z+360:z,N=isNaN(N)||N<0?0:N>1?1:N,Z=Z<0?0:Z>1?1:Z,le=Z<=.5?Z*(1+N):Z+N-Z*N,ne=2*Z-le;function fe(me){return me>360?me-=360:me<0&&(me+=360),me<60?ne+(le-ne)*me/60:me<180?le:me<240?ne+(le-ne)*(240-me)/60:ne}function De(me){return Math.round(fe(me)*255)}return new ka(De(z+120),De(z),De(z-120))}e.hcl=ei;function ei(z,N,Z){return this instanceof ei?(this.h=+z,this.c=+N,void(this.l=+Z)):arguments.length<2?z instanceof ei?new ei(z.h,z.c,z.l):z instanceof Tn?ds(z.l,z.a,z.b):ds((z=ul((z=e.rgb(z)).r,z.g,z.b)).l,z.a,z.b):new ei(z,N,Z)}var Lr=ei.prototype=new ir;Lr.brighter=function(z){return new ei(this.h,this.c,Math.min(100,this.l+hn*(arguments.length?z:1)))},Lr.darker=function(z){return new ei(this.h,this.c,Math.max(0,this.l-hn*(arguments.length?z:1)))},Lr.rgb=function(){return $i(this.h,this.c,this.l).rgb()};function $i(z,N,Z){return isNaN(z)&&(z=0),isNaN(N)&&(N=0),new Tn(Z,Math.cos(z*=Ve)*N,Math.sin(z)*N)}e.lab=Tn;function Tn(z,N,Z){return this instanceof Tn?(this.l=+z,this.a=+N,void(this.b=+Z)):arguments.length<2?z instanceof Tn?new Tn(z.l,z.a,z.b):z instanceof ei?$i(z.h,z.c,z.l):ul((z=ka(z)).r,z.g,z.b):new Tn(z,N,Z)}var hn=18,ta=.95047,ca=1,dn=1.08883,Vn=Tn.prototype=new ir;Vn.brighter=function(z){return new Tn(Math.min(100,this.l+hn*(arguments.length?z:1)),this.a,this.b)},Vn.darker=function(z){return new Tn(Math.max(0,this.l-hn*(arguments.length?z:1)),this.a,this.b)},Vn.rgb=function(){return ra(this.l,this.a,this.b)};function ra(z,N,Z){var ne=(z+16)/116,le=ne+N/500,fe=ne-Z/200;return le=mo(le)*ta,ne=mo(ne)*ca,fe=mo(fe)*dn,new ka(ho(3.2404542*le-1.5371385*ne-.4985314*fe),ho(-.969266*le+1.8760108*ne+.041556*fe),ho(.0556434*le-.2040259*ne+1.0572252*fe))}function ds(z,N,Z){return z>0?new ei(Math.atan2(Z,N)*ct,Math.sqrt(N*N+Z*Z),z):new ei(NaN,NaN,z)}function mo(z){return z>.206893034?z*z*z:(z-4/29)/7.787037}function Rs(z){return z>.008856?Math.pow(z,1/3):7.787037*z+4/29}function ho(z){return Math.round(255*(z<=.00304?12.92*z:1.055*Math.pow(z,1/2.4)-.055))}e.rgb=ka;function ka(z,N,Z){return this instanceof ka?(this.r=~~z,this.g=~~N,void(this.b=~~Z)):arguments.length<2?z instanceof ka?new ka(z.r,z.g,z.b):_l(""+z,ka,si):new ka(z,N,Z)}function ao(z){return new ka(z>>16,z>>8&255,z&255)}function zs(z){return ao(z)+""}var _a=ka.prototype=new ir;_a.brighter=function(z){z=Math.pow(.7,arguments.length?z:1);var N=this.r,Z=this.g,ne=this.b,le=30;return!N&&!Z&&!ne?new ka(le,le,le):(N&&N<le&&(N=le),Z&&Z<le&&(Z=le),ne&&ne<le&&(ne=le),new ka(Math.min(255,N/z),Math.min(255,Z/z),Math.min(255,ne/z)))},_a.darker=function(z){return z=Math.pow(.7,arguments.length?z:1),new ka(z*this.r,z*this.g,z*this.b)},_a.hsl=function(){return yu(this.r,this.g,this.b)},_a.toString=function(){return"#"+Xs(this.r)+Xs(this.g)+Xs(this.b)};function Xs(z){return z<16?"0"+Math.max(0,z).toString(16):Math.min(255,z).toString(16)}function _l(z,N,Z){var ne=0,le=0,fe=0,De,me,ze;if(De=/([a-z]+)\((.*)\)/.exec(z=z.toLowerCase()),De)switch(me=De[2].split(","),De[1]){case"hsl":return Z(parseFloat(me[0]),parseFloat(me[1])/100,parseFloat(me[2])/100);case"rgb":return N(ot(me[0]),ot(me[1]),ot(me[2]))}return(ze=lt.get(z))?N(ze.r,ze.g,ze.b):(z!=null&&z.charAt(0)==="#"&&!isNaN(ze=parseInt(z.slice(1),16))&&(z.length===4?(ne=(ze&3840)>>4,ne=ne>>4|ne,le=ze&240,le=le>>4|le,fe=ze&15,fe=fe<<4|fe):z.length===7&&(ne=(ze&16711680)>>16,le=(ze&65280)>>8,fe=ze&255)),N(ne,le,fe))}function yu(z,N,Z){var ne=Math.min(z/=255,N/=255,Z/=255),le=Math.max(z,N,Z),fe=le-ne,De,me,ze=(le+ne)/2;return fe?(me=ze<.5?fe/(le+ne):fe/(2-le-ne),z==le?De=(N-Z)/fe+(N<Z?6:0):N==le?De=(Z-z)/fe+2:De=(z-N)/fe+4,De*=60):(De=NaN,me=ze>0&&ze<1?0:De),new hr(De,me,ze)}function ul(z,N,Z){z=Le(z),N=Le(N),Z=Le(Z);var ne=Rs((.4124564*z+.3575761*N+.1804375*Z)/ta),le=Rs((.2126729*z+.7151522*N+.072175*Z)/ca),fe=Rs((.0193339*z+.119192*N+.9503041*Z)/dn);return Tn(116*le-16,500*(ne-le),200*(le-fe))}function Le(z){return(z/=255)<=.04045?z/12.92:Math.pow((z+.055)/1.055,2.4)}function ot(z){var N=parseFloat(z);return z.charAt(z.length-1)==="%"?Math.round(N*2.55):N}var lt=e.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});lt.forEach(function(z,N){lt.set(z,ao(N))});function kt(z){return typeof z=="function"?z:function(){return z}}e.functor=kt,e.xhr=Jt(F);function Jt(z){return function(N,Z,ne){return arguments.length===2&&typeof Z=="function"&&(ne=Z,Z=null),Rt(N,Z,z,ne)}}function Rt(z,N,Z,ne){var le={},fe=e.dispatch("beforesend","progress","load","error"),De={},me=new XMLHttpRequest,ze=null;self.XDomainRequest&&!("withCredentials"in me)&&/^(http(s)?:)?\/\//.test(z)&&(me=new XDomainRequest),"onload"in me?me.onload=me.onerror=He:me.onreadystatechange=function(){me.readyState>3&&He()};function He(){var We=me.status,ft;if(!We&&Wt(me)||We>=200&&We<300||We===304){try{ft=Z.call(le,me)}catch(ht){fe.error.call(le,ht);return}fe.load.call(le,ft)}else fe.error.call(le,me)}return me.onprogress=function(We){var ft=e.event;e.event=We;try{fe.progress.call(le,me)}finally{e.event=ft}},le.header=function(We,ft){return We=(We+"").toLowerCase(),arguments.length<2?De[We]:(ft==null?delete De[We]:De[We]=ft+"",le)},le.mimeType=function(We){return arguments.length?(N=We==null?null:We+"",le):N},le.responseType=function(We){return arguments.length?(ze=We,le):ze},le.response=function(We){return Z=We,le},["get","post"].forEach(function(We){le[We]=function(){return le.send.apply(le,[We].concat(r(arguments)))}}),le.send=function(We,ft,ht){if(arguments.length===2&&typeof ft=="function"&&(ht=ft,ft=null),me.open(We,z,!0),N!=null&&!("accept"in De)&&(De.accept=N+",*/*"),me.setRequestHeader)for(var Ot in De)me.setRequestHeader(Ot,De[Ot]);return N!=null&&me.overrideMimeType&&me.overrideMimeType(N),ze!=null&&(me.responseType=ze),ht!=null&&le.on("error",ht).on("load",function(jt){ht(null,jt)}),fe.beforesend.call(le,me),me.send(ft==null?null:ft),le},le.abort=function(){return me.abort(),le},e.rebind(le,fe,"on"),ne==null?le:le.get(Tr(ne))}function Tr(z){return z.length===1?function(N,Z){z(N==null?Z:null)}:z}function Wt(z){var N=z.responseType;return N&&N!=="text"?z.response:z.responseText}e.dsv=function(z,N){var Z=new RegExp('["'+z+`
]`),ne=z.charCodeAt(0);function le(He,We,ft){arguments.length<3&&(ft=We,We=null);var ht=Rt(He,N,We==null?fe:De(We),ft);return ht.row=function(Ot){return arguments.length?ht.response((We=Ot)==null?fe:De(Ot)):We},ht}function fe(He){return le.parse(He.responseText)}function De(He){return function(We){return le.parse(We.responseText,He)}}le.parse=function(He,We){var ft;return le.parseRows(He,function(ht,Ot){if(ft)return ft(ht,Ot-1);var jt=function(pt){for(var Dt={},zt=ht.length,$t=0;$t<zt;++$t)Dt[ht[$t]]=pt[$t];return Dt};ft=We?function(pt,Dt){return We(jt(pt),Dt)}:jt})},le.parseRows=function(He,We){var ft={},ht={},Ot=[],jt=He.length,pt=0,Dt=0,zt,$t;function Yt(){if(pt>=jt)return ht;if($t)return $t=!1,ft;var Cr=pt;if(He.charCodeAt(Cr)===34){for(var Gr=Cr;Gr++<jt;)if(He.charCodeAt(Gr)===34){if(He.charCodeAt(Gr+1)!==34)break;++Gr}pt=Gr+2;var ri=He.charCodeAt(Gr+1);return ri===13?($t=!0,He.charCodeAt(Gr+2)===10&&++pt):ri===10&&($t=!0),He.slice(Cr+1,Gr).replace(/""/g,'"')}for(;pt<jt;){var ri=He.charCodeAt(pt++),pi=1;if(ri===10)$t=!0;else if(ri===13)$t=!0,He.charCodeAt(pt)===10&&(++pt,++pi);else if(ri!==ne)continue;return He.slice(Cr,pt-pi)}return He.slice(Cr)}for(;(zt=Yt())!==ht;){for(var Lt=[];zt!==ft&&zt!==ht;)Lt.push(zt),zt=Yt();We&&(Lt=We(Lt,Dt++))==null||Ot.push(Lt)}return Ot},le.format=function(He){if(Array.isArray(He[0]))return le.formatRows(He);var We=new D,ft=[];return He.forEach(function(ht){for(var Ot in ht)We.has(Ot)||ft.push(We.add(Ot))}),[ft.map(ze).join(z)].concat(He.map(function(ht){return ft.map(function(Ot){return ze(ht[Ot])}).join(z)})).join(`
`)},le.formatRows=function(He){return He.map(me).join(`
`)};function me(He){return He.map(ze).join(z)}function ze(He){return Z.test(He)?'"'+He.replace(/\"/g,'""')+'"':He}return le},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv(" ","text/tab-separated-values");var br,Xr,ti,Mi,an=this[R(this,"requestAnimationFrame")]||function(z){setTimeout(z,17)};e.timer=function(){Gn.apply(this,arguments)};function Gn(z,N,Z){var ne=arguments.length;ne<2&&(N=0),ne<3&&(Z=Date.now());var le=Z+N,fe={c:z,t:le,n:null};return Xr?Xr.n=fe:br=fe,Xr=fe,ti||(Mi=clearTimeout(Mi),ti=1,an(yn)),fe}function yn(){var z=fa(),N=Wn()-z;N>24?(isFinite(N)&&(clearTimeout(Mi),Mi=setTimeout(yn,N)),ti=0):(ti=1,an(yn))}e.timer.flush=function(){fa(),Wn()};function fa(){for(var z=Date.now(),N=br;N;)z>=N.t&&N.c(z-N.t)&&(N.c=null),N=N.n;return z}function Wn(){for(var z,N=br,Z=1/0;N;)N.c?(N.t<Z&&(Z=N.t),N=(z=N).n):N=z?z.n=N.n:br=N.n;return Xr=z,Z}e.round=function(z,N){return N?Math.round(z*(N=Math.pow(10,N)))/N:Math.round(z)},e.geom={};function Ja(z){return z[0]}function oo(z){return z[1]}e.geom.hull=function(z){var N=Ja,Z=oo;if(arguments.length)return ne(z);function ne(le){if(le.length<3)return[];var fe=kt(N),De=kt(Z),me,ze=le.length,He=[],We=[];for(me=0;me<ze;me++)He.push([+fe.call(this,le[me],me),+De.call(this,le[me],me),me]);for(He.sort(Io),me=0;me<ze;me++)We.push([He[me][0],-He[me][1]]);var ft=Ao(He),ht=Ao(We),Ot=ht[0]===ft[0],jt=ht[ht.length-1]===ft[ft.length-1],pt=[];for(me=ft.length-1;me>=0;--me)pt.push(le[He[ft[me]][2]]);for(me=+Ot;me<ht.length-jt;++me)pt.push(le[He[ht[me]][2]]);return pt}return ne.x=function(le){return arguments.length?(N=le,ne):N},ne.y=function(le){return arguments.length?(Z=le,ne):Z},ne};function Ao(z){for(var N=z.length,Z=[0,1],ne=2,le=2;le<N;le++){for(;ne>1&&Xt(z[Z[ne-2]],z[Z[ne-1]],z[le])<=0;)--ne;Z[ne++]=le}return Z.slice(0,ne)}function Io(z,N){return z[0]-N[0]||z[1]-N[1]}e.geom.polygon=function(z){return q(z,ps),z};var ps=e.geom.polygon.prototype=[];ps.area=function(){for(var z=-1,N=this.length,Z,ne=this[N-1],le=0;++z<N;)Z=ne,ne=this[z],le+=Z[1]*ne[0]-Z[0]*ne[1];return le*.5},ps.centroid=function(z){var N=-1,Z=this.length,ne=0,le=0,fe,De=this[Z-1],me;for(arguments.length||(z=-1/(6*this.area()));++N<Z;)fe=De,De=this[N],me=fe[0]*De[1]-De[0]*fe[1],ne+=(fe[0]+De[0])*me,le+=(fe[1]+De[1])*me;return[ne*z,le*z]},ps.clip=function(z){for(var N,Z=is(z),ne=-1,le=this.length-is(this),fe,De,me=this[le-1],ze,He,We;++ne<le;){for(N=z.slice(),z.length=0,ze=this[ne],He=N[(De=N.length-Z)-1],fe=-1;++fe<De;)We=N[fe],rs(We,me,ze)?(rs(He,me,ze)||z.push(Mo(He,We,me,ze)),z.push(We)):rs(He,me,ze)&&z.push(Mo(He,We,me,ze)),He=We;Z&&z.push(z[0]),me=ze}return z};function rs(z,N,Z){return(Z[0]-N[0])*(z[1]-N[1])<(Z[1]-N[1])*(z[0]-N[0])}function Mo(z,N,Z,ne){var le=z[0],fe=Z[0],De=N[0]-le,me=ne[0]-fe,ze=z[1],He=Z[1],We=N[1]-ze,ft=ne[1]-He,ht=(me*(ze-He)-ft*(le-fe))/(ft*De-me*We);return[le+ht*De,ze+ht*We]}function is(z){var N=z[0],Z=z[z.length-1];return!(N[0]-Z[0]||N[1]-Z[1])}var Ro,Uo,so,In=[],va,vs,Zs=[];function Ks(){vh(this),this.edge=this.site=this.circle=null}function Ol(z){var N=In.pop()||new Ks;return N.site=z,N}function Js(z){iu(z),so.remove(z),In.push(z),vh(z)}function ru(z){var N=z.circle,Z=N.x,ne=N.cy,le={x:Z,y:ne},fe=z.P,De=z.N,me=[z];Js(z);for(var ze=fe;ze.circle&&g(Z-ze.circle.x)<bt&&g(ne-ze.circle.cy)<bt;)fe=ze.P,me.unshift(ze),Js(ze),ze=fe;me.unshift(ze),iu(ze);for(var He=De;He.circle&&g(Z-He.circle.x)<bt&&g(ne-He.circle.cy)<bt;)De=He.N,me.push(He),Js(He),He=De;me.push(He),iu(He);var We=me.length,ft;for(ft=1;ft<We;++ft)He=me[ft],ze=me[ft-1],Nc(He.edge,ze.site,He.site,le);ze=me[0],He=me[We-1],He.edge=au(ze.site,He.site,null,le),Ss(ze),Ss(He)}function xu(z){for(var N=z.x,Z=z.y,ne,le,fe,De,me=so._;me;)if(fe=_u(me,Z)-N,fe>bt)me=me.L;else if(De=N-dc(me,Z),De>bt){if(!me.R){ne=me;break}me=me.R}else{fe>-bt?(ne=me.P,le=me):De>-bt?(ne=me,le=me.N):ne=le=me;break}var ze=Ol(z);if(so.insert(ne,ze),!(!ne&&!le)){if(ne===le){iu(ne),le=Ol(ne.site),so.insert(ze,le),ze.edge=le.edge=au(ne.site,ze.site),Ss(ne),Ss(le);return}if(!le){ze.edge=au(ne.site,ze.site);return}iu(ne),iu(le);var He=ne.site,We=He.x,ft=He.y,ht=z.x-We,Ot=z.y-ft,jt=le.site,pt=jt.x-We,Dt=jt.y-ft,zt=2*(ht*Dt-Ot*pt),$t=ht*ht+Ot*Ot,Yt=pt*pt+Dt*Dt,Lt={x:(Dt*$t-Ot*Yt)/zt+We,y:(ht*Yt-pt*$t)/zt+ft};Nc(le.edge,He,jt,Lt),ze.edge=au(He,z,null,Lt),le.edge=au(z,jt,null,Lt),Ss(ne),Ss(le)}}function _u(z,N){var Z=z.site,ne=Z.x,le=Z.y,fe=le-N;if(!fe)return ne;var De=z.P;if(!De)return-1/0;Z=De.site;var me=Z.x,ze=Z.y,He=ze-N;if(!He)return me;var We=me-ne,ft=1/fe-1/He,ht=We/He;return ft?(-ht+Math.sqrt(ht*ht-2*ft*(We*We/(-2*He)-ze+He/2+le-fe/2)))/ft+ne:(ne+me)/2}function dc(z,N){var Z=z.N;if(Z)return _u(Z,N);var ne=z.site;return ne.y===N?ne.x:1/0}function Nl(z){this.site=z,this.edges=[]}Nl.prototype.prepare=function(){for(var z=this.edges,N=z.length,Z;N--;)Z=z[N].edge,(!Z.b||!Z.a)&&z.splice(N,1);return z.sort(bu),z.length};function ja(z){for(var N=z[0][0],Z=z[1][0],ne=z[0][1],le=z[1][1],fe,De,me,ze,He=Uo,We=He.length,ft,ht,Ot,jt,pt,Dt;We--;)if(ft=He[We],!(!ft||!ft.prepare()))for(Ot=ft.edges,jt=Ot.length,ht=0;ht<jt;)Dt=Ot[ht].end(),me=Dt.x,ze=Dt.y,pt=Ot[++ht%jt].start(),fe=pt.x,De=pt.y,(g(me-fe)>bt||g(ze-De)>bt)&&(Ot.splice(ht,0,new r0(Cv(ft.site,Dt,g(me-N)<bt&&le-ze>bt?{x:N,y:g(fe-N)<bt?De:le}:g(ze-le)<bt&&Z-me>bt?{x:g(De-le)<bt?fe:Z,y:le}:g(me-Z)<bt&&ze-ne>bt?{x:Z,y:g(fe-Z)<bt?De:ne}:g(ze-ne)<bt&&me-N>bt?{x:g(De-ne)<bt?fe:N,y:ne}:null),ft.site,null)),++jt)}function bu(z,N){return N.angle-z.angle}function Hu(){vh(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ss(z){var N=z.P,Z=z.N;if(!(!N||!Z)){var ne=N.site,le=z.site,fe=Z.site;if(ne!==fe){var De=le.x,me=le.y,ze=ne.x-De,He=ne.y-me,We=fe.x-De,Dt=fe.y-me,ft=2*(ze*Dt-He*We);if(!(ft>=-Ne)){var ht=ze*ze+He*He,Ot=We*We+Dt*Dt,jt=(Dt*ht-He*Ot)/ft,pt=(ze*Ot-We*ht)/ft,Dt=pt+me,zt=Zs.pop()||new Hu;zt.arc=z,zt.site=le,zt.x=jt+De,zt.y=Dt+Math.sqrt(jt*jt+pt*pt),zt.cy=Dt,z.circle=zt;for(var $t=null,Yt=vs._;Yt;)if(zt.y<Yt.y||zt.y===Yt.y&&zt.x<=Yt.x)if(Yt.L)Yt=Yt.L;else{$t=Yt.P;break}else if(Yt.R)Yt=Yt.R;else{$t=Yt;break}vs.insert($t,zt),$t||(va=zt)}}}}function iu(z){var N=z.circle;N&&(N.P||(va=N.N),vs.remove(N),Zs.push(N),vh(N),z.circle=null)}function ph(z,N,Z,ne){return function(le){var fe=le.a,De=le.b,me=fe.x,ze=fe.y,He=De.x,We=De.y,ft=0,ht=1,Ot=He-me,jt=We-ze,pt;if(pt=z-me,!(!Ot&&pt>0)){if(pt/=Ot,Ot<0){if(pt<ft)return;pt<ht&&(ht=pt)}else if(Ot>0){if(pt>ht)return;pt>ft&&(ft=pt)}if(pt=Z-me,!(!Ot&&pt<0)){if(pt/=Ot,Ot<0){if(pt>ht)return;pt>ft&&(ft=pt)}else if(Ot>0){if(pt<ft)return;pt<ht&&(ht=pt)}if(pt=N-ze,!(!jt&&pt>0)){if(pt/=jt,jt<0){if(pt<ft)return;pt<ht&&(ht=pt)}else if(jt>0){if(pt>ht)return;pt>ft&&(ft=pt)}if(pt=ne-ze,!(!jt&&pt<0)){if(pt/=jt,jt<0){if(pt>ht)return;pt>ft&&(ft=pt)}else if(jt>0){if(pt<ft)return;pt<ht&&(ht=pt)}return ft>0&&(le.a={x:me+ft*Ot,y:ze+ft*jt}),ht<1&&(le.b={x:me+ht*Ot,y:ze+ht*jt}),le}}}}}}function yo(z){for(var N=Ro,Z=ph(z[0][0],z[0][1],z[1][0],z[1][1]),ne=N.length,le;ne--;)le=N[ne],(!nu(le,z)||!Z(le)||g(le.a.x-le.b.x)<bt&&g(le.a.y-le.b.y)<bt)&&(le.a=le.b=null,N.splice(ne,1))}function nu(z,N){var Z=z.b;if(Z)return!0;var ne=z.a,le=N[0][0],fe=N[1][0],De=N[0][1],me=N[1][1],ze=z.l,He=z.r,We=ze.x,ft=ze.y,ht=He.x,Ot=He.y,jt=(We+ht)/2,pt=(ft+Ot)/2,Dt,zt;if(Ot===ft){if(jt<le||jt>=fe)return;if(We>ht){if(!ne)ne={x:jt,y:De};else if(ne.y>=me)return;Z={x:jt,y:me}}else{if(!ne)ne={x:jt,y:me};else if(ne.y<De)return;Z={x:jt,y:De}}}else if(Dt=(We-ht)/(Ot-ft),zt=pt-Dt*jt,Dt<-1||Dt>1)if(We>ht){if(!ne)ne={x:(De-zt)/Dt,y:De};else if(ne.y>=me)return;Z={x:(me-zt)/Dt,y:me}}else{if(!ne)ne={x:(me-zt)/Dt,y:me};else if(ne.y<De)return;Z={x:(De-zt)/Dt,y:De}}else if(ft<Ot){if(!ne)ne={x:le,y:Dt*le+zt};else if(ne.x>=fe)return;Z={x:fe,y:Dt*fe+zt}}else{if(!ne)ne={x:fe,y:Dt*fe+zt};else if(ne.x<le)return;Z={x:le,y:Dt*le+zt}}return z.a=ne,z.b=Z,!0}function Zo(z,N){this.l=z,this.r=N,this.a=this.b=null}function au(z,N,Z,ne){var le=new Zo(z,N);return Ro.push(le),Z&&Nc(le,z,N,Z),ne&&Nc(le,N,z,ne),Uo[z.i].edges.push(new r0(le,z,N)),Uo[N.i].edges.push(new r0(le,N,z)),le}function Cv(z,N,Z){var ne=new Zo(z,null);return ne.a=N,ne.b=Z,Ro.push(ne),ne}function Nc(z,N,Z,ne){!z.a&&!z.b?(z.a=ne,z.l=N,z.r=Z):z.l===Z?z.b=ne:z.a=ne}function r0(z,N,Z){var ne=z.a,le=z.b;this.edge=z,this.site=N,this.angle=Z?Math.atan2(Z.y-N.y,Z.x-N.x):z.l===N?Math.atan2(le.x-ne.x,ne.y-le.y):Math.atan2(ne.x-le.x,le.y-ne.y)}r0.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 Of(){this._=null}function vh(z){z.U=z.C=z.L=z.R=z.P=z.N=null}Of.prototype={insert:function(z,N){var Z,ne,le;if(z){if(N.P=z,N.N=z.N,z.N&&(z.N.P=N),z.N=N,z.R){for(z=z.R;z.L;)z=z.L;z.L=N}else z.R=N;Z=z}else this._?(z=Dv(this._),N.P=null,N.N=z,z.P=z.L=N,Z=z):(N.P=N.N=null,this._=N,Z=null);for(N.L=N.R=null,N.U=Z,N.C=!0,z=N;Z&&Z.C;)ne=Z.U,Z===ne.L?(le=ne.R,le&&le.C?(Z.C=le.C=!1,ne.C=!0,z=ne):(z===Z.R&&(Nf(this,Z),z=Z,Z=z.U),Z.C=!1,ne.C=!0,i0(this,ne))):(le=ne.L,le&&le.C?(Z.C=le.C=!1,ne.C=!0,z=ne):(z===Z.L&&(i0(this,Z),z=Z,Z=z.U),Z.C=!1,ne.C=!0,Nf(this,ne))),Z=z.U;this._.C=!1},remove:function(z){z.N&&(z.N.P=z.P),z.P&&(z.P.N=z.N),z.N=z.P=null;var N=z.U,Z,ne=z.L,le=z.R,fe,De;if(ne?le?fe=Dv(le):fe=ne:fe=le,N?N.L===z?N.L=fe:N.R=fe:this._=fe,ne&&le?(De=fe.C,fe.C=z.C,fe.L=ne,ne.U=fe,fe!==le?(N=fe.U,fe.U=z.U,z=fe.R,N.L=z,fe.R=le,le.U=fe):(fe.U=N,N=fe,z=fe.R)):(De=z.C,z=fe),z&&(z.U=N),!De){if(z&&z.C){z.C=!1;return}do{if(z===this._)break;if(z===N.L){if(Z=N.R,Z.C&&(Z.C=!1,N.C=!0,Nf(this,N),Z=N.R),Z.L&&Z.L.C||Z.R&&Z.R.C){(!Z.R||!Z.R.C)&&(Z.L.C=!1,Z.C=!0,i0(this,Z),Z=N.R),Z.C=N.C,N.C=Z.R.C=!1,Nf(this,N),z=this._;break}}else if(Z=N.L,Z.C&&(Z.C=!1,N.C=!0,i0(this,N),Z=N.L),Z.L&&Z.L.C||Z.R&&Z.R.C){(!Z.L||!Z.L.C)&&(Z.R.C=!1,Z.C=!0,Nf(this,Z),Z=N.L),Z.C=N.C,N.C=Z.L.C=!1,i0(this,N),z=this._;break}Z.C=!0,z=N,N=N.U}while(!z.C);z&&(z.C=!1)}}};function Nf(z,N){var Z=N,ne=N.R,le=Z.U;le?le.L===Z?le.L=ne:le.R=ne:z._=ne,ne.U=le,Z.U=ne,Z.R=ne.L,Z.R&&(Z.R.U=Z),ne.L=Z}function i0(z,N){var Z=N,ne=N.L,le=Z.U;le?le.L===Z?le.L=ne:le.R=ne:z._=ne,ne.U=le,Z.U=ne,Z.L=ne.R,Z.L&&(Z.L.U=Z),ne.R=Z}function Dv(z){for(;z.L;)z=z.L;return z}function gh(z,N){var Z=z.sort(up).pop(),ne,le,fe;for(Ro=[],Uo=new Array(z.length),so=new Of,vs=new Of;;)if(fe=va,Z&&(!fe||Z.y<fe.y||Z.y===fe.y&&Z.x<fe.x))(Z.x!==ne||Z.y!==le)&&(Uo[Z.i]=new Nl(Z),xu(Z),ne=Z.x,le=Z.y),Z=z.pop();else if(fe)ru(fe.arc);else break;N&&(yo(N),ja(N));var De={cells:Uo,edges:Ro};return so=vs=Ro=Uo=null,De}function up(z,N){return N.y-z.y||N.x-z.x}e.geom.voronoi=function(z){var N=Ja,Z=oo,ne=N,le=Z,fe=n0;if(z)return De(z);function De(ze){var He=new Array(ze.length),We=fe[0][0],ft=fe[0][1],ht=fe[1][0],Ot=fe[1][1];return gh(me(ze),fe).cells.forEach(function(jt,pt){var Dt=jt.edges,zt=jt.site,$t=He[pt]=Dt.length?Dt.map(function(Yt){var Lt=Yt.start();return[Lt.x,Lt.y]}):zt.x>=We&&zt.x<=ht&&zt.y>=ft&&zt.y<=Ot?[[We,Ot],[ht,Ot],[ht,ft],[We,ft]]:[];$t.point=ze[pt]}),He}function me(ze){return ze.map(function(He,We){return{x:Math.round(ne(He,We)/bt)*bt,y:Math.round(le(He,We)/bt)*bt,i:We}})}return De.links=function(ze){return gh(me(ze)).edges.filter(function(He){return He.l&&He.r}).map(function(He){return{source:ze[He.l.i],target:ze[He.r.i]}})},De.triangles=function(ze){var He=[];return gh(me(ze)).cells.forEach(function(We,ft){for(var ht=We.site,Ot=We.edges.sort(bu),jt=-1,pt=Ot.length,Dt,zt,$t=Ot[pt-1].edge,Yt=$t.l===ht?$t.r:$t.l;++jt<pt;)Dt=$t,zt=Yt,$t=Ot[jt].edge,Yt=$t.l===ht?$t.r:$t.l,ft<zt.i&&ft<Yt.i&&j0(ht,zt,Yt)<0&&He.push([ze[ft],ze[zt.i],ze[Yt.i]])}),He},De.x=function(ze){return arguments.length?(ne=kt(N=ze),De):N},De.y=function(ze){return arguments.length?(le=kt(Z=ze),De):Z},De.clipExtent=function(ze){return arguments.length?(fe=ze==null?n0:ze,De):fe===n0?null:fe},De.size=function(ze){return arguments.length?De.clipExtent(ze&&[[0,0],ze]):fe===n0?null:fe&&fe[1]},De};var n0=[[-1e6,-1e6],[1e6,1e6]];function j0(z,N,Z){return(z.x-Z.x)*(N.y-z.y)-(z.x-N.x)*(Z.y-z.y)}e.geom.delaunay=function(z){return e.geom.voronoi().triangles(z)},e.geom.quadtree=function(z,N,Z,ne,le){var fe=Ja,De=oo,me;if(me=arguments.length)return fe=$0,De=Fv,me===3&&(le=Z,ne=N,Z=N=0),ze(z);function ze(He){var We,ft=kt(fe),ht=kt(De),Ot,jt,pt,Dt,zt,$t,Yt,Lt;if(N!=null)zt=N,$t=Z,Yt=ne,Lt=le;else if(Yt=Lt=-(zt=$t=1/0),Ot=[],jt=[],Dt=He.length,me)for(pt=0;pt<Dt;++pt)We=He[pt],We.x<zt&&(zt=We.x),We.y<$t&&($t=We.y),We.x>Yt&&(Yt=We.x),We.y>Lt&&(Lt=We.y),Ot.push(We.x),jt.push(We.y);else for(pt=0;pt<Dt;++pt){var Cr=+ft(We=He[pt],pt),Gr=+ht(We,pt);Cr<zt&&(zt=Cr),Gr<$t&&($t=Gr),Cr>Yt&&(Yt=Cr),Gr>Lt&&(Lt=Gr),Ot.push(Cr),jt.push(Gr)}var ri=Yt-zt,pi=Lt-$t;ri>pi?Lt=$t+ri:Yt=zt+pi;function Li(Gi,kn,Ua,Qs,lo,oi,zn,Yn){if(!(isNaN(Ua)||isNaN(Qs)))if(Gi.leaf){var qa=Gi.x,gs=Gi.y;if(qa!=null)if(g(qa-Ua)+g(gs-Qs)<.01)Pi(Gi,kn,Ua,Qs,lo,oi,zn,Yn);else{var Tl=Gi.point;Gi.x=Gi.y=Gi.point=null,Pi(Gi,Tl,qa,gs,lo,oi,zn,Yn),Pi(Gi,kn,Ua,Qs,lo,oi,zn,Yn)}else Gi.x=Ua,Gi.y=Qs,Gi.point=kn}else Pi(Gi,kn,Ua,Qs,lo,oi,zn,Yn)}function Pi(Gi,kn,Ua,Qs,lo,oi,zn,Yn){var qa=(lo+zn)*.5,gs=(oi+Yn)*.5,Tl=Ua>=qa,Mu=Qs>=gs,Zu=Mu<<1|Tl;Gi.leaf=!1,Gi=Gi.nodes[Zu]||(Gi.nodes[Zu]=Lv()),Tl?lo=qa:zn=qa,Mu?oi=gs:Yn=gs,Li(Gi,kn,Ua,Qs,lo,oi,zn,Yn)}var Rn=Lv();if(Rn.add=function(Gi){Li(Rn,Gi,+ft(Gi,++pt),+ht(Gi,pt),zt,$t,Yt,Lt)},Rn.visit=function(Gi){Uc(Gi,Rn,zt,$t,Yt,Lt)},Rn.find=function(Gi){return cp(Rn,Gi[0],Gi[1],zt,$t,Yt,Lt)},pt=-1,N==null){for(;++pt<Dt;)Li(Rn,He[pt],Ot[pt],jt[pt],zt,$t,Yt,Lt);--pt}else He.forEach(Rn.add);return Ot=jt=He=We=null,Rn}return ze.x=function(He){return arguments.length?(fe=He,ze):fe},ze.y=function(He){return arguments.length?(De=He,ze):De},ze.extent=function(He){return arguments.length?(He==null?N=Z=ne=le=null:(N=+He[0][0],Z=+He[0][1],ne=+He[1][0],le=+He[1][1]),ze):N==null?null:[[N,Z],[ne,le]]},ze.size=function(He){return arguments.length?(He==null?N=Z=ne=le=null:(N=Z=0,ne=+He[0],le=+He[1]),ze):N==null?null:[ne-N,le-Z]},ze};function $0(z){return z.x}function Fv(z){return z.y}function Lv(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function Uc(z,N,Z,ne,le,fe){if(!z(N,Z,ne,le,fe)){var De=(Z+le)*.5,me=(ne+fe)*.5,ze=N.nodes;ze[0]&&Uc(z,ze[0],Z,ne,De,me),ze[1]&&Uc(z,ze[1],De,ne,le,me),ze[2]&&Uc(z,ze[2],Z,me,De,fe),ze[3]&&Uc(z,ze[3],De,me,le,fe)}}function cp(z,N,Z,ne,le,fe,De){var me=1/0,ze;return(function He(We,ft,ht,Ot,jt){if(!(ft>fe||ht>De||Ot<ne||jt<le)){if(pt=We.point){var pt,Dt=N-We.x,zt=Z-We.y,$t=Dt*Dt+zt*zt;if($t<me){var Yt=Math.sqrt(me=$t);ne=N-Yt,le=Z-Yt,fe=N+Yt,De=Z+Yt,ze=pt}}for(var Lt=We.nodes,Cr=(ft+Ot)*.5,Gr=(ht+jt)*.5,ri=N>=Cr,pi=Z>=Gr,Li=pi<<1|ri,Pi=Li+4;Li<Pi;++Li)if(We=Lt[Li&3])switch(Li&3){case 0:He(We,ft,ht,Cr,Gr);break;case 1:He(We,Cr,ht,Ot,Gr);break;case 2:He(We,ft,Gr,Cr,jt);break;case 3:He(We,Cr,Gr,Ot,jt);break}}})(z,ne,le,fe,De),ze}e.interpolateRgb=mh;function mh(z,N){z=e.rgb(z),N=e.rgb(N);var Z=z.r,ne=z.g,le=z.b,fe=N.r-Z,De=N.g-ne,me=N.b-le;return function(ze){return"#"+Xs(Math.round(Z+fe*ze))+Xs(Math.round(ne+De*ze))+Xs(Math.round(le+me*ze))}}e.interpolateObject=ju;function ju(z,N){var Z={},ne={},le;for(le in z)le in N?Z[le]=yh(z[le],N[le]):ne[le]=z[le];for(le in N)le in z||(ne[le]=N[le]);return function(fe){for(le in Z)ne[le]=Z[le](fe);return ne}}e.interpolateNumber=Es;function Es(z,N){return z=+z,N=+N,function(Z){return z*(1-Z)+N*Z}}e.interpolateString=Vo;function Vo(z,N){var Z=wu.lastIndex=W0.lastIndex=0,ne,le,fe,De=-1,me=[],ze=[];for(z=z+"",N=N+"";(ne=wu.exec(z))&&(le=W0.exec(N));)(fe=le.index)>Z&&(fe=N.slice(Z,fe),me[De]?me[De]+=fe:me[++De]=fe),(ne=ne[0])===(le=le[0])?me[De]?me[De]+=le:me[++De]=le:(me[++De]=null,ze.push({i:De,x:Es(ne,le)})),Z=W0.lastIndex;return Z<N.length&&(fe=N.slice(Z),me[De]?me[De]+=fe:me[++De]=fe),me.length<2?ze[0]?(N=ze[0].x,function(He){return N(He)+""}):function(){return N}:(N=ze.length,function(He){for(var We=0,ft;We<N;++We)me[(ft=ze[We]).i]=ft.x(He);return me.join("")})}var wu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,W0=new RegExp(wu.source,"g");e.interpolate=yh;function yh(z,N){for(var Z=e.interpolators.length,ne;--Z>=0&&!(ne=e.interpolators[Z](z,N)););return ne}e.interpolators=[function(z,N){var Z=typeof N;return(Z==="string"?lt.has(N.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(N)?mh:Vo:N instanceof ir?mh:Array.isArray(N)?a0:Z==="object"&&isNaN(N)?ju:Es)(z,N)}],e.interpolateArray=a0;function a0(z,N){var Z=[],ne=[],le=z.length,fe=N.length,De=Math.min(z.length,N.length),me;for(me=0;me<De;++me)Z.push(yh(z[me],N[me]));for(;me<le;++me)ne[me]=z[me];for(;me<fe;++me)ne[me]=N[me];return function(ze){for(me=0;me<De;++me)ne[me]=Z[me](ze);return ne}}var Pv=function(){return F},ug=e.map({linear:Pv,poly:cg,quad:function(){return Iv},cubic:function(){return Rv},sin:function(){return Y0},exp:function(){return fp},circle:function(){return hf},elastic:zv,back:hp,bounce:function(){return X0}}),Wm=e.map({in:F,out:xh,"in-out":Bs,"out-in":function(z){return Bs(xh(z))}});e.ease=function(z){var N=z.indexOf("-"),Z=N>=0?z.slice(0,N):z,ne=N>=0?z.slice(N+1):"in";return Z=ug.get(Z)||Pv,ne=Wm.get(ne)||F,Tx(ne(Z.apply(null,t.call(arguments,1))))};function Tx(z){return function(N){return N<=0?0:N>=1?1:z(N)}}function xh(z){return function(N){return 1-z(1-N)}}function Bs(z){return function(N){return .5*(N<.5?z(2*N):2-z(2-2*N))}}function Iv(z){return z*z}function Rv(z){return z*z*z}function _h(z){if(z<=0)return 0;if(z>=1)return 1;var N=z*z,Z=N*z;return 4*(z<.5?Z:3*(z-N)+Z-.75)}function cg(z){return function(N){return Math.pow(N,z)}}function Y0(z){return 1-Math.cos(z*Re)}function fp(z){return Math.pow(2,10*(z-1))}function hf(z){return 1-Math.sqrt(1-z*z)}function zv(z,N){var Z;return arguments.length<2&&(N=.45),arguments.length?Z=N/Ge*Math.asin(1/z):(z=1,Z=N/4),function(ne){return 1+z*Math.pow(2,-10*ne)*Math.sin((ne-Z)*Ge/N)}}function hp(z){return z||(z=1.70158),function(N){return N*N*((z+1)*N-z)}}function X0(z){return z<1/2.75?7.5625*z*z:z<2/2.75?7.5625*(z-=1.5/2.75)*z+.75:z<2.5/2.75?7.5625*(z-=2.25/2.75)*z+.9375:7.5625*(z-=2.625/2.75)*z+.984375}e.interpolateHcl=fg;function fg(z,N){z=e.hcl(z),N=e.hcl(N);var Z=z.h,ne=z.c,le=z.l,fe=N.h-Z,De=N.c-ne,me=N.l-le;return isNaN(De)&&(De=0,ne=isNaN(ne)?N.c:ne),isNaN(fe)?(fe=0,Z=isNaN(Z)?N.h:Z):fe>180?fe-=360:fe<-180&&(fe+=360),function(ze){return $i(Z+fe*ze,ne+De*ze,le+me*ze)+""}}e.interpolateHsl=hg;function hg(z,N){z=e.hsl(z),N=e.hsl(N);var Z=z.h,ne=z.s,le=z.l,fe=N.h-Z,De=N.s-ne,me=N.l-le;return isNaN(De)&&(De=0,ne=isNaN(ne)?N.s:ne),isNaN(fe)?(fe=0,Z=isNaN(Z)?N.h:Z):fe>180?fe-=360:fe<-180&&(fe+=360),function(ze){return si(Z+fe*ze,ne+De*ze,le+me*ze)+""}}e.interpolateLab=Ym;function Ym(z,N){z=e.lab(z),N=e.lab(N);var Z=z.l,ne=z.a,le=z.b,fe=N.l-Z,De=N.a-ne,me=N.b-le;return function(ze){return ra(Z+fe*ze,ne+De*ze,le+me*ze)+""}}e.interpolateRound=Uf;function Uf(z,N){return N-=z,function(Z){return Math.round(z+N*Z)}}e.transform=function(z){var N=i.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(Z){if(Z!=null){N.setAttribute("transform",Z);var ne=N.transform.baseVal.consolidate()}return new Bv(ne?ne.matrix:Z0)})(z)};function Bv(z){var N=[z.a,z.b],Z=[z.c,z.d],ne=dp(N),le=Vf(N,Z),fe=dp(pc(Z,N,-le))||0;N[0]*Z[1]<Z[0]*N[1]&&(N[0]*=-1,N[1]*=-1,ne*=-1,le*=-1),this.rotate=(ne?Math.atan2(N[1],N[0]):Math.atan2(-Z[0],Z[1]))*ct,this.translate=[z.e,z.f],this.scale=[ne,fe],this.skew=fe?Math.atan2(le,fe)*ct:0}Bv.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};function Vf(z,N){return z[0]*N[0]+z[1]*N[1]}function dp(z){var N=Math.sqrt(Vf(z,z));return N&&(z[0]/=N,z[1]/=N),N}function pc(z,N,Z){return z[0]+=Z*N[0],z[1]+=Z*N[1],z}var Z0={a:1,b:0,c:0,d:1,e:0,f:0};e.interpolateTransform=pp;function Gf(z){return z.length?z.pop()+",":""}function dg(z,N,Z,ne){if(z[0]!==N[0]||z[1]!==N[1]){var le=Z.push("translate(",null,",",null,")");ne.push({i:le-4,x:Es(z[0],N[0])},{i:le-2,x:Es(z[1],N[1])})}else(N[0]||N[1])&&Z.push("translate("+N+")")}function qv(z,N,Z,ne){z!==N?(z-N>180?N+=360:N-z>180&&(z+=360),ne.push({i:Z.push(Gf(Z)+"rotate(",null,")")-2,x:Es(z,N)})):N&&Z.push(Gf(Z)+"rotate("+N+")")}function pg(z,N,Z,ne){z!==N?ne.push({i:Z.push(Gf(Z)+"skewX(",null,")")-2,x:Es(z,N)}):N&&Z.push(Gf(Z)+"skewX("+N+")")}function Ov(z,N,Z,ne){if(z[0]!==N[0]||z[1]!==N[1]){var le=Z.push(Gf(Z)+"scale(",null,",",null,")");ne.push({i:le-4,x:Es(z[0],N[0])},{i:le-2,x:Es(z[1],N[1])})}else(N[0]!==1||N[1]!==1)&&Z.push(Gf(Z)+"scale("+N+")")}function pp(z,N){var Z=[],ne=[];return z=e.transform(z),N=e.transform(N),dg(z.translate,N.translate,Z,ne),qv(z.rotate,N.rotate,Z,ne),pg(z.skew,N.skew,Z,ne),Ov(z.scale,N.scale,Z,ne),z=N=null,function(le){for(var fe=-1,De=ne.length,me;++fe<De;)Z[(me=ne[fe]).i]=me.x(le);return Z.join("")}}function Nv(z,N){return N=(N-=z=+z)||1/N,function(Z){return(Z-z)/N}}function Uv(z,N){return N=(N-=z=+z)||1/N,function(Z){return Math.max(0,Math.min(1,(Z-z)/N))}}e.layout={},e.layout.bundle=function(){return function(z){for(var N=[],Z=-1,ne=z.length;++Z<ne;)N.push(Xm(z[Z]));return N}};function Xm(z){for(var N=z.source,Z=z.target,ne=Vc(N,Z),le=[N];N!==ne;)N=N.parent,le.push(N);for(var fe=le.length;Z!==ne;)le.splice(fe,0,Z),Z=Z.parent;return le}function $u(z){for(var N=[],Z=z.parent;Z!=null;)N.push(z),z=Z,Z=Z.parent;return N.push(z),N}function Vc(z,N){if(z===N)return z;for(var Z=$u(z),ne=$u(N),le=Z.pop(),fe=ne.pop(),De=null;le===fe;)De=le,le=Z.pop(),fe=ne.pop();return De}e.layout.chord=function(){var z={},N,Z,ne,le,fe=0,De,me,ze;function He(){var ft={},ht=[],Ot=e.range(le),jt=[],pt,Dt,zt,$t,Yt;for(N=[],Z=[],pt=0,$t=-1;++$t<le;){for(Dt=0,Yt=-1;++Yt<le;)Dt+=ne[$t][Yt];ht.push(Dt),jt.push(e.range(le)),pt+=Dt}for(De&&Ot.sort(function(Rn,Gi){return De(ht[Rn],ht[Gi])}),me&&jt.forEach(function(Rn,Gi){Rn.sort(function(kn,Ua){return me(ne[Gi][kn],ne[Gi][Ua])})}),pt=(Ge-fe*le)/pt,Dt=0,$t=-1;++$t<le;){for(zt=Dt,Yt=-1;++Yt<le;){var Lt=Ot[$t],Cr=jt[Lt][Yt],Gr=ne[Lt][Cr],ri=Dt,pi=Dt+=Gr*pt;ft[Lt+"-"+Cr]={index:Lt,subindex:Cr,startAngle:ri,endAngle:pi,value:Gr}}Z[Lt]={index:Lt,startAngle:zt,endAngle:Dt,value:ht[Lt]},Dt+=fe}for($t=-1;++$t<le;)for(Yt=$t-1;++Yt<le;){var Li=ft[$t+"-"+Yt],Pi=ft[Yt+"-"+$t];(Li.value||Pi.value)&&N.push(Li.value<Pi.value?{source:Pi,target:Li}:{source:Li,target:Pi})}ze&&We()}function We(){N.sort(function(ft,ht){return ze((ft.source.value+ft.target.value)/2,(ht.source.value+ht.target.value)/2)})}return z.matrix=function(ft){return arguments.length?(le=(ne=ft)&&ne.length,N=Z=null,z):ne},z.padding=function(ft){return arguments.length?(fe=ft,N=Z=null,z):fe},z.sortGroups=function(ft){return arguments.length?(De=ft,N=Z=null,z):De},z.sortSubgroups=function(ft){return arguments.length?(me=ft,N=null,z):me},z.sortChords=function(ft){return arguments.length?(ze=ft,N&&We(),z):ze},z.chords=function(){return N||He(),N},z.groups=function(){return Z||He(),Z},z},e.layout.force=function(){var z={},N=e.dispatch("start","tick","end"),Z,ne=[1,1],le,fe,De=.9,me=gg,ze=Zm,He=-30,We=Km,ft=.1,ht=.64,Ot=[],jt=[],pt,Dt,zt;function $t(Lt){return function(Cr,Gr,ri,pi){if(Cr.point!==Lt){var Li=Cr.cx-Lt.x,Pi=Cr.cy-Lt.y,Rn=pi-Gr,Gi=Li*Li+Pi*Pi;if(Rn*Rn/ht<Gi){if(Gi<We){var kn=Cr.charge/Gi;Lt.px-=Li*kn,Lt.py-=Pi*kn}return!0}if(Cr.point&&Gi&&Gi<We){var kn=Cr.pointCharge/Gi;Lt.px-=Li*kn,Lt.py-=Pi*kn}}return!Cr.charge}}z.tick=function(){if((fe*=.99)<.005)return Z=null,N.end({type:"end",alpha:fe=0}),!0;var Lt=Ot.length,Cr=jt.length,Gr,ri,pi,Li,Pi,Rn,Gi,kn,Ua;for(ri=0;ri<Cr;++ri)pi=jt[ri],Li=pi.source,Pi=pi.target,kn=Pi.x-Li.x,Ua=Pi.y-Li.y,(Rn=kn*kn+Ua*Ua)&&(Rn=fe*Dt[ri]*((Rn=Math.sqrt(Rn))-pt[ri])/Rn,kn*=Rn,Ua*=Rn,Pi.x-=kn*(Gi=Li.weight+Pi.weight?Li.weight/(Li.weight+Pi.weight):.5),Pi.y-=Ua*Gi,Li.x+=kn*(Gi=1-Gi),Li.y+=Ua*Gi);if((Gi=fe*ft)&&(kn=ne[0]/2,Ua=ne[1]/2,ri=-1,Gi))for(;++ri<Lt;)pi=Ot[ri],pi.x+=(kn-pi.x)*Gi,pi.y+=(Ua-pi.y)*Gi;if(He)for(bh(Gr=e.geom.quadtree(Ot),fe,zt),ri=-1;++ri<Lt;)(pi=Ot[ri]).fixed||Gr.visit($t(pi));for(ri=-1;++ri<Lt;)pi=Ot[ri],pi.fixed?(pi.x=pi.px,pi.y=pi.py):(pi.x-=(pi.px-(pi.px=pi.x))*De,pi.y-=(pi.py-(pi.py=pi.y))*De);N.tick({type:"tick",alpha:fe})},z.nodes=function(Lt){return arguments.length?(Ot=Lt,z):Ot},z.links=function(Lt){return arguments.length?(jt=Lt,z):jt},z.size=function(Lt){return arguments.length?(ne=Lt,z):ne},z.linkDistance=function(Lt){return arguments.length?(me=typeof Lt=="function"?Lt:+Lt,z):me},z.distance=z.linkDistance,z.linkStrength=function(Lt){return arguments.length?(ze=typeof Lt=="function"?Lt:+Lt,z):ze},z.friction=function(Lt){return arguments.length?(De=+Lt,z):De},z.charge=function(Lt){return arguments.length?(He=typeof Lt=="function"?Lt:+Lt,z):He},z.chargeDistance=function(Lt){return arguments.length?(We=Lt*Lt,z):Math.sqrt(We)},z.gravity=function(Lt){return arguments.length?(ft=+Lt,z):ft},z.theta=function(Lt){return arguments.length?(ht=Lt*Lt,z):Math.sqrt(ht)},z.alpha=function(Lt){return arguments.length?(Lt=+Lt,fe?Lt>0?fe=Lt:(Z.c=null,Z.t=NaN,Z=null,N.end({type:"end",alpha:fe=0})):Lt>0&&(N.start({type:"start",alpha:fe=Lt}),Z=Gn(z.tick)),z):fe},z.start=function(){var Lt,Cr=Ot.length,Gr=jt.length,ri=ne[0],pi=ne[1],Li,Pi;for(Lt=0;Lt<Cr;++Lt)(Pi=Ot[Lt]).index=Lt,Pi.weight=0;for(Lt=0;Lt<Gr;++Lt)Pi=jt[Lt],typeof Pi.source=="number"&&(Pi.source=Ot[Pi.source]),typeof Pi.target=="number"&&(Pi.target=Ot[Pi.target]),++Pi.source.weight,++Pi.target.weight;for(Lt=0;Lt<Cr;++Lt)Pi=Ot[Lt],isNaN(Pi.x)&&(Pi.x=Rn("x",ri)),isNaN(Pi.y)&&(Pi.y=Rn("y",pi)),isNaN(Pi.px)&&(Pi.px=Pi.x),isNaN(Pi.py)&&(Pi.py=Pi.y);if(pt=[],typeof me=="function")for(Lt=0;Lt<Gr;++Lt)pt[Lt]=+me.call(this,jt[Lt],Lt);else for(Lt=0;Lt<Gr;++Lt)pt[Lt]=me;if(Dt=[],typeof ze=="function")for(Lt=0;Lt<Gr;++Lt)Dt[Lt]=+ze.call(this,jt[Lt],Lt);else for(Lt=0;Lt<Gr;++Lt)Dt[Lt]=ze;if(zt=[],typeof He=="function")for(Lt=0;Lt<Cr;++Lt)zt[Lt]=+He.call(this,Ot[Lt],Lt);else for(Lt=0;Lt<Cr;++Lt)zt[Lt]=He;function Rn(Gi,kn){if(!Li){for(Li=new Array(Cr),lo=0;lo<Cr;++lo)Li[lo]=[];for(lo=0;lo<Gr;++lo){var Ua=jt[lo];Li[Ua.source.index].push(Ua.target),Li[Ua.target.index].push(Ua.source)}}for(var Qs=Li[Lt],lo=-1,oi=Qs.length,zn;++lo<oi;)if(!isNaN(zn=Qs[lo][Gi]))return zn;return Math.random()*kn}return z.resume()},z.resume=function(){return z.alpha(.1)},z.stop=function(){return z.alpha(0)},z.drag=function(){if(le||(le=e.behavior.drag().origin(F).on("dragstart.force",vg).on("drag.force",Yt).on("dragend.force",Tu)),!arguments.length)return le;this.on("mouseover.force",vp).on("mouseout.force",o0).call(le)};function Yt(Lt){Lt.px=e.event.x,Lt.py=e.event.y,z.resume()}return e.rebind(z,N,"on")};function vg(z){z.fixed|=2}function Tu(z){z.fixed&=-7}function vp(z){z.fixed|=4,z.px=z.x,z.py=z.y}function o0(z){z.fixed&=-5}function bh(z,N,Z){var ne=0,le=0;if(z.charge=0,!z.leaf)for(var fe=z.nodes,De=fe.length,me=-1,ze;++me<De;)ze=fe[me],ze!=null&&(bh(ze,N,Z),z.charge+=ze.charge,ne+=ze.charge*ze.cx,le+=ze.charge*ze.cy);if(z.point){z.leaf||(z.point.x+=Math.random()-.5,z.point.y+=Math.random()-.5);var He=N*Z[z.point.index];z.charge+=z.pointCharge=He,ne+=He*z.point.x,le+=He*z.point.y}z.cx=ne/z.charge,z.cy=le/z.charge}var gg=20,Zm=1,Km=1/0;e.layout.hierarchy=function(){var z=Jm,N=Ax,Z=K0;function ne(le){var fe=[le],De=[],me;for(le.depth=0;(me=fe.pop())!=null;)if(De.push(me),(He=N.call(ne,me,me.depth))&&(ze=He.length)){for(var ze,He,We;--ze>=0;)fe.push(We=He[ze]),We.parent=me,We.depth=me.depth+1;Z&&(me.value=0),me.children=He}else Z&&(me.value=+Z.call(ne,me,me.depth)||0),delete me.children;return Wu(le,function(ft){var ht,Ot;z&&(ht=ft.children)&&ht.sort(z),Z&&(Ot=ft.parent)&&(Ot.value+=ft.value)}),De}return ne.sort=function(le){return arguments.length?(z=le,ne):z},ne.children=function(le){return arguments.length?(N=le,ne):N},ne.value=function(le){return arguments.length?(Z=le,ne):Z},ne.revalue=function(le){return Z&&(pf(le,function(fe){fe.children&&(fe.value=0)}),Wu(le,function(fe){var De;fe.children||(fe.value=+Z.call(ne,fe,fe.depth)||0),(De=fe.parent)&&(De.value+=fe.value)})),le},ne};function df(z,N){return e.rebind(z,N,"sort","children","value"),z.nodes=z,z.links=vc,z}function pf(z,N){for(var Z=[z];(z=Z.pop())!=null;)if(N(z),(le=z.children)&&(ne=le.length))for(var ne,le;--ne>=0;)Z.push(le[ne])}function Wu(z,N){for(var Z=[z],ne=[];(z=Z.pop())!=null;)if(ne.push(z),(De=z.children)&&(fe=De.length))for(var le=-1,fe,De;++le<fe;)Z.push(De[le]);for(;(z=ne.pop())!=null;)N(z)}function Ax(z){return z.children}function K0(z){return z.value}function Jm(z,N){return N.value-z.value}function vc(z){return e.merge(z.map(function(N){return(N.children||[]).map(function(Z){return{source:N,target:Z}})}))}e.layout.partition=function(){var z=e.layout.hierarchy(),N=[1,1];function Z(fe,De,me,ze){var He=fe.children;if(fe.x=De,fe.y=fe.depth*ze,fe.dx=me,fe.dy=ze,He&&(ft=He.length)){var We=-1,ft,ht,Ot;for(me=fe.value?me/fe.value:0;++We<ft;)Z(ht=He[We],De,Ot=ht.value*me,ze),De+=Ot}}function ne(fe){var De=fe.children,me=0;if(De&&(He=De.length))for(var ze=-1,He;++ze<He;)me=Math.max(me,ne(De[ze]));return 1+me}function le(fe,De){var me=z.call(this,fe,De);return Z(me[0],0,N[0],N[1]/ne(me[0])),me}return le.size=function(fe){return arguments.length?(N=fe,le):N},df(le,z)},e.layout.pie=function(){var z=Number,N=Vv,Z=0,ne=Ge,le=0;function fe(De){var me=De.length,ze=De.map(function($t,Yt){return+z.call(fe,$t,Yt)}),He=+(typeof Z=="function"?Z.apply(this,arguments):Z),We=(typeof ne=="function"?ne.apply(this,arguments):ne)-He,ft=Math.min(Math.abs(We)/me,+(typeof le=="function"?le.apply(this,arguments):le)),ht=ft*(We<0?-1:1),Ot=e.sum(ze),jt=Ot?(We-me*ht)/Ot:0,pt=e.range(me),Dt=[],zt;return N!=null&&pt.sort(N===Vv?function($t,Yt){return ze[Yt]-ze[$t]}:function($t,Yt){return N(De[$t],De[Yt])}),pt.forEach(function($t){Dt[$t]={data:De[$t],value:zt=ze[$t],startAngle:He,endAngle:He+=zt*jt+ht,padAngle:ft}}),Dt}return fe.value=function(De){return arguments.length?(z=De,fe):z},fe.sort=function(De){return arguments.length?(N=De,fe):N},fe.startAngle=function(De){return arguments.length?(Z=De,fe):Z},fe.endAngle=function(De){return arguments.length?(ne=De,fe):ne},fe.padAngle=function(De){return arguments.length?(le=De,fe):le},fe};var Vv={};e.layout.stack=function(){var z=F,N=J0,Z=xp,ne=Qm,le=gp,fe=mp;function De(me,ze){if(!(jt=me.length))return me;var He=me.map(function($t,Yt){return z.call(De,$t,Yt)}),We=He.map(function($t){return $t.map(function(Yt,Lt){return[le.call(De,Yt,Lt),fe.call(De,Yt,Lt)]})}),ft=N.call(De,We,ze);He=e.permute(He,ft),We=e.permute(We,ft);var ht=Z.call(De,We,ze),Ot=He[0].length,jt,pt,Dt,zt;for(Dt=0;Dt<Ot;++Dt)for(ne.call(De,He[0][Dt],zt=ht[Dt],We[0][Dt][1]),pt=1;pt<jt;++pt)ne.call(De,He[pt][Dt],zt+=We[pt-1][Dt][1],We[pt][Dt][1]);return me}return De.values=function(me){return arguments.length?(z=me,De):z},De.order=function(me){return arguments.length?(N=typeof me=="function"?me:yp.get(me)||J0,De):N},De.offset=function(me){return arguments.length?(Z=typeof me=="function"?me:wh.get(me)||xp,De):Z},De.x=function(me){return arguments.length?(le=me,De):le},De.y=function(me){return arguments.length?(fe=me,De):fe},De.out=function(me){return arguments.length?(ne=me,De):ne},De};function gp(z){return z.x}function mp(z){return z.y}function Qm(z,N,Z){z.y0=N,z.y=Z}var yp=e.map({"inside-out":function(z){var N=z.length,Z,ne,le=z.map(ey),fe=z.map(_p),De=e.range(N).sort(function(ft,ht){return le[ft]-le[ht]}),me=0,ze=0,He=[],We=[];for(Z=0;Z<N;++Z)ne=De[Z],me<ze?(me+=fe[ne],He.push(ne)):(ze+=fe[ne],We.push(ne));return We.reverse().concat(He)},reverse:function(z){return e.range(z.length).reverse()},default:J0}),wh=e.map({silhouette:function(z){var N=z.length,Z=z[0].length,ne=[],le=0,fe,De,me,ze=[];for(De=0;De<Z;++De){for(fe=0,me=0;fe<N;fe++)me+=z[fe][De][1];me>le&&(le=me),ne.push(me)}for(De=0;De<Z;++De)ze[De]=(le-ne[De])/2;return ze},wiggle:function(z){var N=z.length,Z=z[0],ne=Z.length,le,fe,De,me,ze,He,We,ft,ht,Ot=[];for(Ot[0]=ft=ht=0,fe=1;fe<ne;++fe){for(le=0,me=0;le<N;++le)me+=z[le][fe][1];for(le=0,ze=0,We=Z[fe][0]-Z[fe-1][0];le<N;++le){for(De=0,He=(z[le][fe][1]-z[le][fe-1][1])/(2*We);De<le;++De)He+=(z[De][fe][1]-z[De][fe-1][1])/We;ze+=He*z[le][fe][1]}Ot[fe]=ft-=me?ze/me*We:0,ft<ht&&(ht=ft)}for(fe=0;fe<ne;++fe)Ot[fe]-=ht;return Ot},expand:function(z){var N=z.length,Z=z[0].length,ne=1/N,le,fe,De,me=[];for(fe=0;fe<Z;++fe){for(le=0,De=0;le<N;le++)De+=z[le][fe][1];if(De)for(le=0;le<N;le++)z[le][fe][1]/=De;else for(le=0;le<N;le++)z[le][fe][1]=ne}for(fe=0;fe<Z;++fe)me[fe]=0;return me},zero:xp});function J0(z){return e.range(z.length)}function xp(z){for(var N=-1,Z=z[0].length,ne=[];++N<Z;)ne[N]=0;return ne}function ey(z){for(var N=1,Z=0,ne=z[0][1],le,fe=z.length;N<fe;++N)(le=z[N][1])>ne&&(Z=N,ne=le);return Z}function _p(z){return z.reduce(s0,0)}function s0(z,N){return z+N[1]}e.layout.histogram=function(){var z=!0,N=Number,Z=Q0,ne=bp;function le(fe,ht){for(var me=[],ze=fe.map(N,this),He=Z.call(this,ze,ht),We=ne.call(this,He,ze,ht),ft,ht=-1,Ot=ze.length,jt=We.length-1,pt=z?1:1/Ot,Dt;++ht<jt;)ft=me[ht]=[],ft.dx=We[ht+1]-(ft.x=We[ht]),ft.y=0;if(jt>0)for(ht=-1;++ht<Ot;)Dt=ze[ht],Dt>=He[0]&&Dt<=He[1]&&(ft=me[e.bisect(We,Dt,1,jt)-1],ft.y+=pt,ft.push(fe[ht]));return me}return le.value=function(fe){return arguments.length?(N=fe,le):N},le.range=function(fe){return arguments.length?(Z=kt(fe),le):Z},le.bins=function(fe){return arguments.length?(ne=typeof fe=="number"?function(De){return l0(De,fe)}:kt(fe),le):ne},le.frequency=function(fe){return arguments.length?(z=!!fe,le):z},le};function bp(z,N){return l0(z,Math.ceil(Math.log(N.length)/Math.LN2+1))}function l0(z,N){for(var Z=-1,ne=+z[0],le=(z[1]-ne)/N,fe=[];++Z<=N;)fe[Z]=le*Z+ne;return fe}function Q0(z){return[e.min(z),e.max(z)]}e.layout.pack=function(){var z=e.layout.hierarchy().sort(ed),N=0,Z=[1,1],ne;function le(fe,De){var me=z.call(this,fe,De),ze=me[0],He=Z[0],We=Z[1],ft=ne==null?Math.sqrt:typeof ne=="function"?ne:function(){return ne};if(ze.x=ze.y=0,Wu(ze,function(Ot){Ot.r=+ft(Ot.value)}),Wu(ze,ty),N){var ht=N*(ne?1:Math.max(2*ze.r/He,2*ze.r/We))/2;Wu(ze,function(Ot){Ot.r+=ht}),Wu(ze,ty),Wu(ze,function(Ot){Ot.r-=ht})}return Hv(ze,He/2,We/2,ne?1:1/Math.max(2*ze.r/He,2*ze.r/We)),me}return le.size=function(fe){return arguments.length?(Z=fe,le):Z},le.radius=function(fe){return arguments.length?(ne=fe==null||typeof fe=="function"?fe:+fe,le):ne},le.padding=function(fe){return arguments.length?(N=+fe,le):N},df(le,z)};function ed(z,N){return z.value-N.value}function wp(z,N){var Z=z._pack_next;z._pack_next=N,N._pack_prev=z,N._pack_next=Z,Z._pack_prev=N}function mg(z,N){z._pack_next=N,N._pack_prev=z}function Gv(z,N){var Z=N.x-z.x,ne=N.y-z.y,le=z.r+N.r;return .999*le*le>Z*Z+ne*ne}function ty(z){if(!(N=z.children)||!(ht=N.length))return;var N,Z=1/0,ne=-1/0,le=1/0,fe=-1/0,De,me,ze,He,We,ft,ht;function Ot(Lt){Z=Math.min(Lt.x-Lt.r,Z),ne=Math.max(Lt.x+Lt.r,ne),le=Math.min(Lt.y-Lt.r,le),fe=Math.max(Lt.y+Lt.r,fe)}if(N.forEach(ry),De=N[0],De.x=-De.r,De.y=0,Ot(De),ht>1&&(me=N[1],me.x=me.r,me.y=0,Ot(me),ht>2))for(ze=N[2],cl(De,me,ze),Ot(ze),wp(De,ze),De._pack_prev=ze,wp(ze,me),me=De._pack_next,He=3;He<ht;He++){cl(De,me,ze=N[He]);var jt=0,pt=1,Dt=1;for(We=me._pack_next;We!==me;We=We._pack_next,pt++)if(Gv(We,ze)){jt=1;break}if(jt==1)for(ft=De._pack_prev;ft!==We._pack_prev&&!Gv(ft,ze);ft=ft._pack_prev,Dt++);jt?(pt<Dt||pt==Dt&&me.r<De.r?mg(De,me=We):mg(De=ft,me),He--):(wp(De,ze),me=ze,Ot(ze))}var zt=(Z+ne)/2,$t=(le+fe)/2,Yt=0;for(He=0;He<ht;He++)ze=N[He],ze.x-=zt,ze.y-=$t,Yt=Math.max(Yt,ze.r+Math.sqrt(ze.x*ze.x+ze.y*ze.y));z.r=Yt,N.forEach(yg)}function ry(z){z._pack_next=z._pack_prev=z}function yg(z){delete z._pack_next,delete z._pack_prev}function Hv(z,N,Z,ne){var le=z.children;if(z.x=N+=ne*z.x,z.y=Z+=ne*z.y,z.r*=ne,le)for(var fe=-1,De=le.length;++fe<De;)Hv(le[fe],N,Z,ne)}function cl(z,N,Z){var ne=z.r+Z.r,le=N.x-z.x,fe=N.y-z.y;if(ne&&(le||fe)){var De=N.r+Z.r,me=le*le+fe*fe;De*=De,ne*=ne;var ze=.5+(ne-De)/(2*me),He=Math.sqrt(Math.max(0,2*De*(ne+me)-(ne-=me)*ne-De*De))/(2*me);Z.x=z.x+ze*le+He*fe,Z.y=z.y+ze*fe-He*le}else Z.x=z.x+ne,Z.y=z.y}e.layout.tree=function(){var z=e.layout.hierarchy().sort(null).value(null),N=Gc,Z=[1,1],ne=null;function le(We,ft){var ht=z.call(this,We,ft),Ot=ht[0],jt=fe(Ot);if(Wu(jt,De),jt.parent.m=-jt.z,pf(jt,me),ne)pf(Ot,He);else{var pt=Ot,Dt=Ot,zt=Ot;pf(Ot,function(Cr){Cr.x<pt.x&&(pt=Cr),Cr.x>Dt.x&&(Dt=Cr),Cr.depth>zt.depth&&(zt=Cr)});var $t=N(pt,Dt)/2-pt.x,Yt=Z[0]/(Dt.x+N(Dt,pt)/2+$t),Lt=Z[1]/(zt.depth||1);pf(Ot,function(Cr){Cr.x=(Cr.x+$t)*Yt,Cr.y=Cr.depth*Lt})}return ht}function fe(We){for(var ft={A:null,children:[We]},ht=[ft],Ot;(Ot=ht.pop())!=null;)for(var jt=Ot.children,pt,Dt=0,zt=jt.length;Dt<zt;++Dt)ht.push((jt[Dt]=pt={_:jt[Dt],parent:Ot,children:(pt=jt[Dt].children)&&pt.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:Dt}).a=pt);return ft.children[0]}function De(We){var ft=We.children,ht=We.parent.children,Ot=We.i?ht[We.i-1]:null;if(ft.length){Mp(We);var jt=(ft[0].z+ft[ft.length-1].z)/2;Ot?(We.z=Ot.z+N(We._,Ot._),We.m=We.z-jt):We.z=jt}else Ot&&(We.z=Ot.z+N(We._,Ot._));We.parent.A=ze(We,Ot,We.parent.A||ht[0])}function me(We){We._.x=We.z+We.parent.m,We.m+=We.parent.m}function ze(We,ft,ht){if(ft){for(var Ot=We,jt=We,pt=ft,Dt=Ot.parent.children[0],zt=Ot.m,$t=jt.m,Yt=pt.m,Lt=Dt.m,Cr;pt=xg(pt),Ot=Tp(Ot),pt&&Ot;)Dt=Tp(Dt),jt=xg(jt),jt.a=We,Cr=pt.z+Yt-Ot.z-zt+N(pt._,Ot._),Cr>0&&(Ap(Te(pt,We,ht),We,Cr),zt+=Cr,$t+=Cr),Yt+=pt.m,zt+=Ot.m,Lt+=Dt.m,$t+=jt.m;pt&&!xg(jt)&&(jt.t=pt,jt.m+=Yt-$t),Ot&&!Tp(Dt)&&(Dt.t=Ot,Dt.m+=zt-Lt,ht=We)}return ht}function He(We){We.x*=Z[0],We.y=We.depth*Z[1]}return le.separation=function(We){return arguments.length?(N=We,le):N},le.size=function(We){return arguments.length?(ne=(Z=We)==null?He:null,le):ne?null:Z},le.nodeSize=function(We){return arguments.length?(ne=(Z=We)==null?null:He,le):ne?Z:null},df(le,z)};function Gc(z,N){return z.parent==N.parent?1:2}function Tp(z){var N=z.children;return N.length?N[0]:z.t}function xg(z){var N=z.children,Z;return(Z=N.length)?N[Z-1]:z.t}function Ap(z,N,Z){var ne=Z/(N.i-z.i);N.c-=ne,N.s+=Z,z.c+=ne,N.z+=Z,N.m+=Z}function Mp(z){for(var N=0,Z=0,ne=z.children,le=ne.length,fe;--le>=0;)fe=ne[le],fe.z+=N,fe.m+=N,N+=fe.s+(Z+=fe.c)}function Te(z,N,Z){return z.a.parent===N.parent?z.a:Z}e.layout.cluster=function(){var z=e.layout.hierarchy().sort(null).value(null),N=Gc,Z=[1,1],ne=!1;function le(fe,De){var me=z.call(this,fe,De),ze=me[0],He,We=0;Wu(ze,function(pt){var Dt=pt.children;Dt&&Dt.length?(pt.x=rt(Dt),pt.y=qe(Dt)):(pt.x=He?We+=N(pt,He):0,pt.y=0,He=pt)});var ft=Ye(ze),ht=At(ze),Ot=ft.x-N(ft,ht)/2,jt=ht.x+N(ht,ft)/2;return Wu(ze,ne?function(pt){pt.x=(pt.x-ze.x)*Z[0],pt.y=(ze.y-pt.y)*Z[1]}:function(pt){pt.x=(pt.x-Ot)/(jt-Ot)*Z[0],pt.y=(1-(ze.y?pt.y/ze.y:1))*Z[1]}),me}return le.separation=function(fe){return arguments.length?(N=fe,le):N},le.size=function(fe){return arguments.length?(ne=(Z=fe)==null,le):ne?null:Z},le.nodeSize=function(fe){return arguments.length?(ne=(Z=fe)!=null,le):ne?Z:null},df(le,z)};function qe(z){return 1+e.max(z,function(N){return N.y})}function rt(z){return z.reduce(function(N,Z){return N+Z.x},0)/z.length}function Ye(z){var N=z.children;return N&&N.length?Ye(N[0]):z}function At(z){var N=z.children,Z;return N&&(Z=N.length)?At(N[Z-1]):z}e.layout.treemap=function(){var z=e.layout.hierarchy(),N=Math.round,Z=[1,1],ne=null,le=Gt,fe=!1,De,me="squarify",ze=.5*(1+Math.sqrt(5));function He(pt,Dt){for(var zt=-1,$t=pt.length,Yt,Lt;++zt<$t;)Lt=(Yt=pt[zt]).value*(Dt<0?0:Dt),Yt.area=isNaN(Lt)||Lt<=0?0:Lt}function We(pt){var Dt=pt.children;if(Dt&&Dt.length){var zt=le(pt),$t=[],Yt=Dt.slice(),Lt,Cr=1/0,Gr,ri=me==="slice"?zt.dx:me==="dice"?zt.dy:me==="slice-dice"?pt.depth&1?zt.dy:zt.dx:Math.min(zt.dx,zt.dy),pi;for(He(Yt,zt.dx*zt.dy/pt.value),$t.area=0;(pi=Yt.length)>0;)$t.push(Lt=Yt[pi-1]),$t.area+=Lt.area,me!=="squarify"||(Gr=ht($t,ri))<=Cr?(Yt.pop(),Cr=Gr):($t.area-=$t.pop().area,Ot($t,ri,zt,!1),ri=Math.min(zt.dx,zt.dy),$t.length=$t.area=0,Cr=1/0);$t.length&&(Ot($t,ri,zt,!0),$t.length=$t.area=0),Dt.forEach(We)}}function ft(pt){var Dt=pt.children;if(Dt&&Dt.length){var zt=le(pt),$t=Dt.slice(),Yt,Lt=[];for(He($t,zt.dx*zt.dy/pt.value),Lt.area=0;Yt=$t.pop();)Lt.push(Yt),Lt.area+=Yt.area,Yt.z!=null&&(Ot(Lt,Yt.z?zt.dx:zt.dy,zt,!$t.length),Lt.length=Lt.area=0);Dt.forEach(ft)}}function ht(pt,Dt){for(var zt=pt.area,$t,Yt=0,Lt=1/0,Cr=-1,Gr=pt.length;++Cr<Gr;)($t=pt[Cr].area)&&($t<Lt&&(Lt=$t),$t>Yt&&(Yt=$t));return zt*=zt,Dt*=Dt,zt?Math.max(Dt*Yt*ze/zt,zt/(Dt*Lt*ze)):1/0}function Ot(pt,Dt,zt,$t){var Yt=-1,Lt=pt.length,Cr=zt.x,Gr=zt.y,ri=Dt?N(pt.area/Dt):0,pi;if(Dt==zt.dx){for(($t||ri>zt.dy)&&(ri=zt.dy);++Yt<Lt;)pi=pt[Yt],pi.x=Cr,pi.y=Gr,pi.dy=ri,Cr+=pi.dx=Math.min(zt.x+zt.dx-Cr,ri?N(pi.area/ri):0);pi.z=!0,pi.dx+=zt.x+zt.dx-Cr,zt.y+=ri,zt.dy-=ri}else{for(($t||ri>zt.dx)&&(ri=zt.dx);++Yt<Lt;)pi=pt[Yt],pi.x=Cr,pi.y=Gr,pi.dx=ri,Gr+=pi.dy=Math.min(zt.y+zt.dy-Gr,ri?N(pi.area/ri):0);pi.z=!1,pi.dy+=zt.y+zt.dy-Gr,zt.x+=ri,zt.dx-=ri}}function jt(pt){var Dt=De||z(pt),zt=Dt[0];return zt.x=zt.y=0,zt.value?(zt.dx=Z[0],zt.dy=Z[1]):zt.dx=zt.dy=0,De&&z.revalue(zt),He([zt],zt.dx*zt.dy/zt.value),(De?ft:We)(zt),fe&&(De=Dt),Dt}return jt.size=function(pt){return arguments.length?(Z=pt,jt):Z},jt.padding=function(pt){if(!arguments.length)return ne;function Dt(Yt){var Lt=pt.call(jt,Yt,Yt.depth);return Lt==null?Gt(Yt):Kt(Yt,typeof Lt=="number"?[Lt,Lt,Lt,Lt]:Lt)}function zt(Yt){return Kt(Yt,pt)}var $t;return le=(ne=pt)==null?Gt:($t=typeof pt)=="function"?Dt:($t==="number"&&(pt=[pt,pt,pt,pt]),zt),jt},jt.round=function(pt){return arguments.length?(N=pt?Math.round:Number,jt):N!=Number},jt.sticky=function(pt){return arguments.length?(fe=pt,De=null,jt):fe},jt.ratio=function(pt){return arguments.length?(ze=pt,jt):ze},jt.mode=function(pt){return arguments.length?(me=pt+"",jt):me},df(jt,z)};function Gt(z){return{x:z.x,y:z.y,dx:z.dx,dy:z.dy}}function Kt(z,N){var Z=z.x+N[3],ne=z.y+N[0],le=z.dx-N[1]-N[3],fe=z.dy-N[0]-N[2];return le<0&&(Z+=le/2,le=0),fe<0&&(ne+=fe/2,fe=0),{x:Z,y:ne,dx:le,dy:fe}}e.random={normal:function(z,N){var Z=arguments.length;return Z<2&&(N=1),Z<1&&(z=0),function(){var ne,le,fe;do ne=Math.random()*2-1,le=Math.random()*2-1,fe=ne*ne+le*le;while(!fe||fe>1);return z+N*ne*Math.sqrt(-2*Math.log(fe)/fe)}},logNormal:function(){var z=e.random.normal.apply(e,arguments);return function(){return Math.exp(z())}},bates:function(z){var N=e.random.irwinHall(z);return function(){return N()/z}},irwinHall:function(z){return function(){for(var N=0,Z=0;Z<z;Z++)N+=Math.random();return N}}},e.scale={};function cr(z){var N=z[0],Z=z[z.length-1];return N<Z?[N,Z]:[Z,N]}function mr(z){return z.rangeExtent?z.rangeExtent():cr(z.range())}function Pr(z,N,Z,ne){var le=Z(z[0],z[1]),fe=ne(N[0],N[1]);return function(De){return fe(le(De))}}function rr(z,N){var Z=0,ne=z.length-1,le=z[Z],fe=z[ne],De;return fe<le&&(De=Z,Z=ne,ne=De,De=le,le=fe,fe=De),z[Z]=N.floor(le),z[ne]=N.ceil(fe),z}function fr(z){return z?{floor:function(N){return Math.floor(N/z)*z},ceil:function(N){return Math.ceil(N/z)*z}}:pr}var pr={floor:F,ceil:F};function Dr(z,N,Z,ne){var le=[],fe=[],De=0,me=Math.min(z.length,N.length)-1;for(z[me]<z[0]&&(z=z.slice().reverse(),N=N.slice().reverse());++De<=me;)le.push(Z(z[De-1],z[De])),fe.push(ne(N[De-1],N[De]));return function(ze){var He=e.bisect(z,ze,1,me)-1;return fe[He](le[He](ze))}}e.scale.linear=function(){return Hr([0,1],[0,1],yh,!1)};function Hr(z,N,Z,ne){var le,fe;function De(){var ze=Math.min(z.length,N.length)>2?Dr:Pr,He=ne?Uv:Nv;return le=ze(z,N,He,Z),fe=ze(N,z,He,yh),me}function me(ze){return le(ze)}return me.invert=function(ze){return fe(ze)},me.domain=function(ze){return arguments.length?(z=ze.map(Number),De()):z},me.range=function(ze){return arguments.length?(N=ze,De()):N},me.rangeRound=function(ze){return me.range(ze).interpolate(Uf)},me.clamp=function(ze){return arguments.length?(ne=ze,De()):ne},me.interpolate=function(ze){return arguments.length?(Z=ze,De()):Z},me.ticks=function(ze){return Xi(z,ze)},me.tickFormat=function(ze,He){return d3_scale_linearTickFormat(z,ze,He)},me.nice=function(ze){return ki(z,ze),De()},me.copy=function(){return Hr(z,N,Z,ne)},De()}function zi(z,N){return e.rebind(z,N,"range","rangeRound","interpolate","clamp")}function ki(z,N){return rr(z,fr(Vi(z,N)[2])),rr(z,fr(Vi(z,N)[2])),z}function Vi(z,N){N==null&&(N=10);var Z=cr(z),ne=Z[1]-Z[0],le=Math.pow(10,Math.floor(Math.log(ne/N)/Math.LN10)),fe=N/ne*le;return fe<=.15?le*=10:fe<=.35?le*=5:fe<=.75&&(le*=2),Z[0]=Math.ceil(Z[0]/le)*le,Z[1]=Math.floor(Z[1]/le)*le+le*.5,Z[2]=le,Z}function Xi(z,N){return e.range.apply(e,Vi(z,N))}var Yr={s:1,g:1,p:1,r:1,e:1};function ai(z){return-Math.floor(Math.log(z)/Math.LN10+.01)}function on(z,N){var Z=ai(N[2]);return z in Yr?Math.abs(Z-ai(Math.max(g(N[0]),g(N[1]))))+ +(z!=="e"):Z-(z==="%")*2}e.scale.log=function(){return En(e.scale.linear().domain([0,1]),10,!0,[1,10])};function En(z,N,Z,ne){function le(me){return(Z?Math.log(me<0?0:me):-Math.log(me>0?0:-me))/Math.log(N)}function fe(me){return Z?Math.pow(N,me):-Math.pow(N,-me)}function De(me){return z(le(me))}return De.invert=function(me){return fe(z.invert(me))},De.domain=function(me){return arguments.length?(Z=me[0]>=0,z.domain((ne=me.map(Number)).map(le)),De):ne},De.base=function(me){return arguments.length?(N=+me,z.domain(ne.map(le)),De):N},De.nice=function(){var me=rr(ne.map(le),Z?Math:ga);return z.domain(me),ne=me.map(fe),De},De.ticks=function(){var me=cr(ne),ze=[],He=me[0],We=me[1],ft=Math.floor(le(He)),ht=Math.ceil(le(We)),Ot=N%1?2:N;if(isFinite(ht-ft)){if(Z){for(;ft<ht;ft++)for(var jt=1;jt<Ot;jt++)ze.push(fe(ft)*jt);ze.push(fe(ft))}else for(ze.push(fe(ft));ft++<ht;)for(var jt=Ot-1;jt>0;jt--)ze.push(fe(ft)*jt);for(ft=0;ze[ft]<He;ft++);for(ht=ze.length;ze[ht-1]>We;ht--);ze=ze.slice(ft,ht)}return ze},De.copy=function(){return En(z.copy(),N,Z,ne)},zi(De,z)}var ga={floor:function(z){return-Math.ceil(-z)},ceil:function(z){return-Math.floor(-z)}};e.scale.pow=function(){return $a(e.scale.linear(),1,[0,1])};function $a(z,N,Z){var ne=Ca(N),le=Ca(1/N);function fe(De){return z(ne(De))}return fe.invert=function(De){return le(z.invert(De))},fe.domain=function(De){return arguments.length?(z.domain((Z=De.map(Number)).map(ne)),fe):Z},fe.ticks=function(De){return Xi(Z,De)},fe.tickFormat=function(De,me){return d3_scale_linearTickFormat(Z,De,me)},fe.nice=function(De){return fe.domain(ki(Z,De))},fe.exponent=function(De){return arguments.length?(ne=Ca(N=De),le=Ca(1/N),z.domain(Z.map(ne)),fe):N},fe.copy=function(){return $a(z.copy(),N,Z)},zi(fe,z)}function Ca(z){return function(N){return N<0?-Math.pow(-N,z):Math.pow(N,z)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return xo([],{t:"range",a:[[]]})};function xo(z,N){var Z,ne,le;function fe(me){return ne[((Z.get(me)||(N.t==="range"?Z.set(me,z.push(me)):NaN))-1)%ne.length]}function De(me,ze){return e.range(z.length).map(function(He){return me+ze*He})}return fe.domain=function(me){if(!arguments.length)return z;z=[],Z=new _;for(var ze=-1,He=me.length,We;++ze<He;)Z.has(We=me[ze])||Z.set(We,z.push(We));return fe[N.t].apply(fe,N.a)},fe.range=function(me){return arguments.length?(ne=me,le=0,N={t:"range",a:arguments},fe):ne},fe.rangePoints=function(me,ze){arguments.length<2&&(ze=0);var He=me[0],We=me[1],ft=z.length<2?(He=(He+We)/2,0):(We-He)/(z.length-1+ze);return ne=De(He+ft*ze/2,ft),le=0,N={t:"rangePoints",a:arguments},fe},fe.rangeRoundPoints=function(me,ze){arguments.length<2&&(ze=0);var He=me[0],We=me[1],ft=z.length<2?(He=We=Math.round((He+We)/2),0):(We-He)/(z.length-1+ze)|0;return ne=De(He+Math.round(ft*ze/2+(We-He-(z.length-1+ze)*ft)/2),ft),le=0,N={t:"rangeRoundPoints",a:arguments},fe},fe.rangeBands=function(me,ze,He){arguments.length<2&&(ze=0),arguments.length<3&&(He=ze);var We=me[1]<me[0],ft=me[We-0],ht=me[1-We],Ot=(ht-ft)/(z.length-ze+2*He);return ne=De(ft+Ot*He,Ot),We&&ne.reverse(),le=Ot*(1-ze),N={t:"rangeBands",a:arguments},fe},fe.rangeRoundBands=function(me,ze,He){arguments.length<2&&(ze=0),arguments.length<3&&(He=ze);var We=me[1]<me[0],ft=me[We-0],ht=me[1-We],Ot=Math.floor((ht-ft)/(z.length-ze+2*He));return ne=De(ft+Math.round((ht-ft-(z.length-ze)*Ot)/2),Ot),We&&ne.reverse(),le=Math.round(Ot*(1-ze)),N={t:"rangeRoundBands",a:arguments},fe},fe.rangeBand=function(){return le},fe.rangeExtent=function(){return cr(N.a[0])},fe.copy=function(){return xo(z,N)},fe.domain(z)}e.scale.category10=function(){return e.scale.ordinal().range(aa)},e.scale.category20=function(){return e.scale.ordinal().range(fl)},e.scale.category20b=function(){return e.scale.ordinal().range(ns)},e.scale.category20c=function(){return e.scale.ordinal().range(po)};var aa=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(zs),fl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(zs),ns=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(zs),po=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(zs);e.scale.quantile=function(){return di([],[])};function di(z,N){var Z;function ne(){var fe=0,De=N.length;for(Z=[];++fe<De;)Z[fe-1]=e.quantile(z,fe/De);return le}function le(fe){if(!isNaN(fe=+fe))return N[e.bisect(Z,fe)]}return le.domain=function(fe){return arguments.length?(z=fe.map(h).filter(d).sort(f),ne()):z},le.range=function(fe){return arguments.length?(N=fe,ne()):N},le.quantiles=function(){return Z},le.invertExtent=function(fe){return fe=N.indexOf(fe),fe<0?[NaN,NaN]:[fe>0?Z[fe-1]:z[0],fe<Z.length?Z[fe]:z[z.length-1]]},le.copy=function(){return di(z,N)},ne()}e.scale.quantize=function(){return Sa(0,1,[0,1])};function Sa(z,N,Z){var ne,le;function fe(me){return Z[Math.max(0,Math.min(le,Math.floor(ne*(me-z))))]}function De(){return ne=Z.length/(N-z),le=Z.length-1,fe}return fe.domain=function(me){return arguments.length?(z=+me[0],N=+me[me.length-1],De()):[z,N]},fe.range=function(me){return arguments.length?(Z=me,De()):Z},fe.invertExtent=function(me){return me=Z.indexOf(me),me=me<0?NaN:me/ne+z,[me,me+1/ne]},fe.copy=function(){return Sa(z,N,Z)},De()}e.scale.threshold=function(){return ks([.5],[0,1])};function ks(z,N){function Z(ne){if(ne<=ne)return N[e.bisect(z,ne)]}return Z.domain=function(ne){return arguments.length?(z=ne,Z):z},Z.range=function(ne){return arguments.length?(N=ne,Z):N},Z.invertExtent=function(ne){return ne=N.indexOf(ne),[z[ne-1],z[ne]]},Z.copy=function(){return ks(z,N)},Z}e.scale.identity=function(){return bl([0,1])};function bl(z){function N(Z){return+Z}return N.invert=N,N.domain=N.range=function(Z){return arguments.length?(z=Z.map(N),N):z},N.ticks=function(Z){return Xi(z,Z)},N.tickFormat=function(Z,ne){return d3_scale_linearTickFormat(z,Z,ne)},N.copy=function(){return bl(z)},N}e.svg={};function Au(){return 0}e.svg.arc=function(){var z=Hc,N=Hf,Z=Au,ne=vf,le=Yu,fe=Th,De=Ah;function me(){var He=Math.max(0,+z.apply(this,arguments)),We=Math.max(0,+N.apply(this,arguments)),ft=le.apply(this,arguments)-Re,ht=fe.apply(this,arguments)-Re,Ot=Math.abs(ht-ft),jt=ft>ht?0:1;if(We<He&&(pt=We,We=He,He=pt),Ot>=je)return ze(We,jt)+(He?ze(He,1-jt):"")+"Z";var pt,Dt,zt,$t,Yt=0,Lt=0,Cr,Gr,ri,pi,Li,Pi,Rn,Gi,kn=[];if(($t=(+De.apply(this,arguments)||0)/2)&&(zt=ne===vf?Math.sqrt(He*He+We*We):+ne.apply(this,arguments),jt||(Lt*=-1),We&&(Lt=lr(zt/We*Math.sin($t))),He&&(Yt=lr(zt/He*Math.sin($t)))),We){Cr=We*Math.cos(ft+Lt),Gr=We*Math.sin(ft+Lt),ri=We*Math.cos(ht-Lt),pi=We*Math.sin(ht-Lt);var Ua=Math.abs(ht-ft-2*Lt)<=Ue?0:1;if(Lt&&Sp(Cr,Gr,ri,pi)===jt^Ua){var Qs=(ft+ht)/2;Cr=We*Math.cos(Qs),Gr=We*Math.sin(Qs),ri=pi=null}}else Cr=Gr=0;if(He){Li=He*Math.cos(ht-Yt),Pi=He*Math.sin(ht-Yt),Rn=He*Math.cos(ft+Yt),Gi=He*Math.sin(ft+Yt);var lo=Math.abs(ft-ht+2*Yt)<=Ue?0:1;if(Yt&&Sp(Li,Pi,Rn,Gi)===1-jt^lo){var oi=(ft+ht)/2;Li=He*Math.cos(oi),Pi=He*Math.sin(oi),Rn=Gi=null}}else Li=Pi=0;if(Ot>bt&&(pt=Math.min(Math.abs(We-He)/2,+Z.apply(this,arguments)))>.001){Dt=He<We^jt?0:1;var zn=pt,Yn=pt;if(Ot<Ue){var qa=Rn==null?[Li,Pi]:ri==null?[Cr,Gr]:Mo([Cr,Gr],[Rn,Gi],[ri,pi],[Li,Pi]),gs=Cr-qa[0],Tl=Gr-qa[1],Mu=ri-qa[0],Zu=pi-qa[1],Wc=1/Math.sin(Math.acos((gs*Mu+Tl*Zu)/(Math.sqrt(gs*gs+Tl*Tl)*Math.sqrt(Mu*Mu+Zu*Zu)))/2),Be=Math.sqrt(qa[0]*qa[0]+qa[1]*qa[1]);Yn=Math.min(pt,(He-Be)/(Wc-1)),zn=Math.min(pt,(We-Be)/(Wc+1))}if(ri!=null){var gt=_g(Rn==null?[Li,Pi]:[Rn,Gi],[Cr,Gr],We,zn,jt),Mt=_g([ri,pi],[Li,Pi],We,zn,jt);pt===zn?kn.push("M",gt[0],"A",zn,",",zn," 0 0,",Dt," ",gt[1],"A",We,",",We," 0 ",1-jt^Sp(gt[1][0],gt[1][1],Mt[1][0],Mt[1][1]),",",jt," ",Mt[1],"A",zn,",",zn," 0 0,",Dt," ",Mt[0]):kn.push("M",gt[0],"A",zn,",",zn," 0 1,",Dt," ",Mt[0])}else kn.push("M",Cr,",",Gr);if(Rn!=null){var or=_g([Cr,Gr],[Rn,Gi],He,-Yn,jt),vr=_g([Li,Pi],ri==null?[Cr,Gr]:[ri,pi],He,-Yn,jt);pt===Yn?kn.push("L",vr[0],"A",Yn,",",Yn," 0 0,",Dt," ",vr[1],"A",He,",",He," 0 ",jt^Sp(vr[1][0],vr[1][1],or[1][0],or[1][1]),",",1-jt," ",or[1],"A",Yn,",",Yn," 0 0,",Dt," ",or[0]):kn.push("L",vr[0],"A",Yn,",",Yn," 0 0,",Dt," ",or[0])}else kn.push("L",Li,",",Pi)}else kn.push("M",Cr,",",Gr),ri!=null&&kn.push("A",We,",",We," 0 ",Ua,",",jt," ",ri,",",pi),kn.push("L",Li,",",Pi),Rn!=null&&kn.push("A",He,",",He," 0 ",lo,",",1-jt," ",Rn,",",Gi);return kn.push("Z"),kn.join("")}function ze(He,We){return"M0,"+He+"A"+He+","+He+" 0 1,"+We+" 0,"+-He+"A"+He+","+He+" 0 1,"+We+" 0,"+He}return me.innerRadius=function(He){return arguments.length?(z=kt(He),me):z},me.outerRadius=function(He){return arguments.length?(N=kt(He),me):N},me.cornerRadius=function(He){return arguments.length?(Z=kt(He),me):Z},me.padRadius=function(He){return arguments.length?(ne=He==vf?vf:kt(He),me):ne},me.startAngle=function(He){return arguments.length?(le=kt(He),me):le},me.endAngle=function(He){return arguments.length?(fe=kt(He),me):fe},me.padAngle=function(He){return arguments.length?(De=kt(He),me):De},me.centroid=function(){var He=(+z.apply(this,arguments)+ +N.apply(this,arguments))/2,We=(+le.apply(this,arguments)+ +fe.apply(this,arguments))/2-Re;return[Math.cos(We)*He,Math.sin(We)*He]},me};var vf="auto";function Hc(z){return z.innerRadius}function Hf(z){return z.outerRadius}function Yu(z){return z.startAngle}function Th(z){return z.endAngle}function Ah(z){return z&&z.padAngle}function Sp(z,N,Z,ne){return(z-Z)*N-(N-ne)*z>0?0:1}function _g(z,N,Z,ne,le){var fe=z[0]-N[0],De=z[1]-N[1],me=(le?ne:-ne)/Math.sqrt(fe*fe+De*De),ze=me*De,He=-me*fe,We=z[0]+ze,ft=z[1]+He,ht=N[0]+ze,Ot=N[1]+He,jt=(We+ht)/2,pt=(ft+Ot)/2,Dt=ht-We,zt=Ot-ft,$t=Dt*Dt+zt*zt,Yt=Z-ne,Lt=We*Ot-ht*ft,Cr=(zt<0?-1:1)*Math.sqrt(Math.max(0,Yt*Yt*$t-Lt*Lt)),Gr=(Lt*zt-Dt*Cr)/$t,ri=(-Lt*Dt-zt*Cr)/$t,pi=(Lt*zt+Dt*Cr)/$t,Li=(-Lt*Dt+zt*Cr)/$t,Pi=Gr-jt,Rn=ri-pt,Gi=pi-jt,kn=Li-pt;return Pi*Pi+Rn*Rn>Gi*Gi+kn*kn&&(Gr=pi,ri=Li),[[Gr-ze,ri-He],[Gr*Z/Yt,ri*Z/Yt]]}function jv(){return!0}function Mx(z){var N=Ja,Z=oo,ne=jv,le=jc,fe=le.key,De=.7;function me(ze){var He=[],We=[],ft=-1,ht=ze.length,Ot,jt=kt(N),pt=kt(Z);function Dt(){He.push("M",le(z(We),De))}for(;++ft<ht;)ne.call(this,Ot=ze[ft],ft)?We.push([+jt.call(this,Ot,ft),+pt.call(this,Ot,ft)]):We.length&&(Dt(),We=[]);return We.length&&Dt(),He.length?He.join(""):null}return me.x=function(ze){return arguments.length?(N=ze,me):N},me.y=function(ze){return arguments.length?(Z=ze,me):Z},me.defined=function(ze){return arguments.length?(ne=ze,me):ne},me.interpolate=function(ze){return arguments.length?(typeof ze=="function"?fe=le=ze:fe=(le=$v.get(ze)||jc).key,me):fe},me.tension=function(ze){return arguments.length?(De=ze,me):De},me}e.svg.line=function(){return Mx(F)};var $v=e.map({linear:jc,"linear-closed":iy,step:Wv,"step-before":bg,"step-after":Yv,basis:Cp,"basis-open":rd,"basis-closed":Xv,bundle:Tg,cardinal:Ep,"cardinal-open":Mh,"cardinal-closed":wg,monotone:Ke});$v.forEach(function(z,N){N.key=z,N.closed=/-closed$/.test(z)});function jc(z){return z.length>1?z.join("L"):z+"Z"}function iy(z){return z.join("L")+"Z"}function Wv(z){for(var N=0,Z=z.length,ne=z[0],le=[ne[0],",",ne[1]];++N<Z;)le.push("H",(ne[0]+(ne=z[N])[0])/2,"V",ne[1]);return Z>1&&le.push("H",ne[0]),le.join("")}function bg(z){for(var N=0,Z=z.length,ne=z[0],le=[ne[0],",",ne[1]];++N<Z;)le.push("V",(ne=z[N])[1],"H",ne[0]);return le.join("")}function Yv(z){for(var N=0,Z=z.length,ne=z[0],le=[ne[0],",",ne[1]];++N<Z;)le.push("H",(ne=z[N])[0],"V",ne[1]);return le.join("")}function Mh(z,N){return z.length<4?jc(z):z[1]+kp(z.slice(1,-1),td(z,N))}function wg(z,N){return z.length<3?iy(z):z[0]+kp((z.push(z[0]),z),td([z[z.length-2]].concat(z,[z[1]]),N))}function Ep(z,N){return z.length<3?jc(z):z[0]+kp(z,td(z,N))}function kp(z,N){if(N.length<1||z.length!=N.length&&z.length!=N.length+2)return jc(z);var Z=z.length!=N.length,ne="",le=z[0],fe=z[1],De=N[0],me=De,ze=1;if(Z&&(ne+="Q"+(fe[0]-De[0]*2/3)+","+(fe[1]-De[1]*2/3)+","+fe[0]+","+fe[1],le=z[1],ze=2),N.length>1){me=N[1],fe=z[ze],ze++,ne+="C"+(le[0]+De[0])+","+(le[1]+De[1])+","+(fe[0]-me[0])+","+(fe[1]-me[1])+","+fe[0]+","+fe[1];for(var He=2;He<N.length;He++,ze++)fe=z[ze],me=N[He],ne+="S"+(fe[0]-me[0])+","+(fe[1]-me[1])+","+fe[0]+","+fe[1]}if(Z){var We=z[ze];ne+="Q"+(fe[0]+me[0]*2/3)+","+(fe[1]+me[1]*2/3)+","+We[0]+","+We[1]}return ne}function td(z,N){for(var Z=[],ne=(1-N)/2,le,fe=z[0],De=z[1],me=1,ze=z.length;++me<ze;)le=fe,fe=De,De=z[me],Z.push([ne*(De[0]-le[0]),ne*(De[1]-le[1])]);return Z}function Cp(z){if(z.length<3)return jc(z);var N=1,Z=z.length,ne=z[0],le=ne[0],fe=ne[1],De=[le,le,le,(ne=z[1])[0]],me=[fe,fe,fe,ne[1]],ze=[le,",",fe,"L",gc(de,De),",",gc(de,me)];for(z.push(z[Z-1]);++N<=Z;)ne=z[N],De.shift(),De.push(ne[0]),me.shift(),me.push(ne[1]),ve(ze,De,me);return z.pop(),ze.push("L",ne),ze.join("")}function rd(z){if(z.length<4)return jc(z);for(var N=[],Z=-1,ne=z.length,le,fe=[0],De=[0];++Z<3;)le=z[Z],fe.push(le[0]),De.push(le[1]);for(N.push(gc(de,fe)+","+gc(de,De)),--Z;++Z<ne;)le=z[Z],fe.shift(),fe.push(le[0]),De.shift(),De.push(le[1]),ve(N,fe,De);return N.join("")}function Xv(z){for(var N,Z=-1,ne=z.length,le=ne+4,fe,De=[],me=[];++Z<4;)fe=z[Z%ne],De.push(fe[0]),me.push(fe[1]);for(N=[gc(de,De),",",gc(de,me)],--Z;++Z<le;)fe=z[Z%ne],De.shift(),De.push(fe[0]),me.shift(),me.push(fe[1]),ve(N,De,me);return N.join("")}function Tg(z,N){var Z=z.length-1;if(Z)for(var ne=z[0][0],le=z[0][1],fe=z[Z][0]-ne,De=z[Z][1]-le,me=-1,ze,He;++me<=Z;)ze=z[me],He=me/Z,ze[0]=N*ze[0]+(1-N)*(ne+He*fe),ze[1]=N*ze[1]+(1-N)*(le+He*De);return Cp(z)}function gc(z,N){return z[0]*N[0]+z[1]*N[1]+z[2]*N[2]+z[3]*N[3]}var ie=[0,2/3,1/3,0],se=[0,1/3,2/3,0],de=[0,1/6,2/3,1/6];function ve(z,N,Z){z.push("C",gc(ie,N),",",gc(ie,Z),",",gc(se,N),",",gc(se,Z),",",gc(de,N),",",gc(de,Z))}function Me(z,N){return(N[1]-z[1])/(N[0]-z[0])}function Ae(z){for(var N=0,Z=z.length-1,ne=[],le=z[0],fe=z[1],De=ne[0]=Me(le,fe);++N<Z;)ne[N]=(De+(De=Me(le=fe,fe=z[N+1])))/2;return ne[N]=De,ne}function Pe(z){for(var N=[],Z,ne,le,fe,De=Ae(z),me=-1,ze=z.length-1;++me<ze;)Z=Me(z[me],z[me+1]),g(Z)<bt?De[me]=De[me+1]=0:(ne=De[me]/Z,le=De[me+1]/Z,fe=ne*ne+le*le,fe>9&&(fe=Z*3/Math.sqrt(fe),De[me]=fe*ne,De[me+1]=fe*le));for(me=-1;++me<=ze;)fe=(z[Math.min(ze,me+1)][0]-z[Math.max(0,me-1)][0])/(6*(1+De[me]*De[me])),N.push([fe||0,De[me]*fe||0]);return N}function Ke(z){return z.length<3?jc(z):z[0]+kp(z,Pe(z))}e.svg.line.radial=function(){var z=Mx(nt);return z.radius=z.x,delete z.x,z.angle=z.y,delete z.y,z};function nt(z){for(var N,Z=-1,ne=z.length,le,fe;++Z<ne;)N=z[Z],le=N[0],fe=N[1]-Re,N[0]=le*Math.cos(fe),N[1]=le*Math.sin(fe);return z}function Ze(z){var N=Ja,Z=Ja,ne=0,le=oo,fe=jv,De=jc,me=De.key,ze=De,He="L",We=.7;function ft(ht){var Ot=[],jt=[],pt=[],Dt=-1,zt=ht.length,$t,Yt=kt(N),Lt=kt(ne),Cr=N===Z?function(){return ri}:kt(Z),Gr=ne===le?function(){return pi}:kt(le),ri,pi;function Li(){Ot.push("M",De(z(pt),We),He,ze(z(jt.reverse()),We),"Z")}for(;++Dt<zt;)fe.call(this,$t=ht[Dt],Dt)?(jt.push([ri=+Yt.call(this,$t,Dt),pi=+Lt.call(this,$t,Dt)]),pt.push([+Cr.call(this,$t,Dt),+Gr.call(this,$t,Dt)])):jt.length&&(Li(),jt=[],pt=[]);return jt.length&&Li(),Ot.length?Ot.join(""):null}return ft.x=function(ht){return arguments.length?(N=Z=ht,ft):Z},ft.x0=function(ht){return arguments.length?(N=ht,ft):N},ft.x1=function(ht){return arguments.length?(Z=ht,ft):Z},ft.y=function(ht){return arguments.length?(ne=le=ht,ft):le},ft.y0=function(ht){return arguments.length?(ne=ht,ft):ne},ft.y1=function(ht){return arguments.length?(le=ht,ft):le},ft.defined=function(ht){return arguments.length?(fe=ht,ft):fe},ft.interpolate=function(ht){return arguments.length?(typeof ht=="function"?me=De=ht:me=(De=$v.get(ht)||jc).key,ze=De.reverse||De,He=De.closed?"M":"L",ft):me},ft.tension=function(ht){return arguments.length?(We=ht,ft):We},ft}bg.reverse=Yv,Yv.reverse=bg,e.svg.area=function(){return Ze(F)},e.svg.area.radial=function(){var z=Ze(nt);return z.radius=z.x,delete z.x,z.innerRadius=z.x0,delete z.x0,z.outerRadius=z.x1,delete z.x1,z.angle=z.y,delete z.y,z.startAngle=z.y0,delete z.y0,z.endAngle=z.y1,delete z.y1,z};function at(z){return z.source}function yt(z){return z.target}e.svg.chord=function(){var z=at,N=yt,Z=Pt,ne=Yu,le=Th;function fe(We,ft){var ht=De(this,z,We,ft),Ot=De(this,N,We,ft);return"M"+ht.p0+ze(ht.r,ht.p1,ht.a1-ht.a0)+(me(ht,Ot)?He(ht.r,ht.p1,ht.r,ht.p0):He(ht.r,ht.p1,Ot.r,Ot.p0)+ze(Ot.r,Ot.p1,Ot.a1-Ot.a0)+He(Ot.r,Ot.p1,ht.r,ht.p0))+"Z"}function De(We,ft,ht,Ot){var jt=ft.call(We,ht,Ot),pt=Z.call(We,jt,Ot),Dt=ne.call(We,jt,Ot)-Re,zt=le.call(We,jt,Ot)-Re;return{r:pt,a0:Dt,a1:zt,p0:[pt*Math.cos(Dt),pt*Math.sin(Dt)],p1:[pt*Math.cos(zt),pt*Math.sin(zt)]}}function me(We,ft){return We.a0==ft.a0&&We.a1==ft.a1}function ze(We,ft,ht){return"A"+We+","+We+" 0 "+ +(ht>Ue)+",1 "+ft}function He(We,ft,ht,Ot){return"Q 0,0 "+Ot}return fe.radius=function(We){return arguments.length?(Z=kt(We),fe):Z},fe.source=function(We){return arguments.length?(z=kt(We),fe):z},fe.target=function(We){return arguments.length?(N=kt(We),fe):N},fe.startAngle=function(We){return arguments.length?(ne=kt(We),fe):ne},fe.endAngle=function(We){return arguments.length?(le=kt(We),fe):le},fe};function Pt(z){return z.radius}e.svg.diagonal=function(){var z=at,N=yt,Z=Ut;function ne(le,fe){var De=z.call(this,le,fe),me=N.call(this,le,fe),ze=(De.y+me.y)/2,He=[De,{x:De.x,y:ze},{x:me.x,y:ze},me];return He=He.map(Z),"M"+He[0]+"C"+He[1]+" "+He[2]+" "+He[3]}return ne.source=function(le){return arguments.length?(z=kt(le),ne):z},ne.target=function(le){return arguments.length?(N=kt(le),ne):N},ne.projection=function(le){return arguments.length?(Z=le,ne):Z},ne};function Ut(z){return[z.x,z.y]}e.svg.diagonal.radial=function(){var z=e.svg.diagonal(),N=Ut,Z=z.projection;return z.projection=function(ne){return arguments.length?Z(ar(N=ne)):N},z};function ar(z){return function(){var N=z.apply(this,arguments),Z=N[0],ne=N[1]-Re;return[Z*Math.cos(ne),Z*Math.sin(ne)]}}e.svg.symbol=function(){var z=Vr,N=Ar;function Z(ne,le){return(rn.get(z.call(this,ne,le))||_i)(N.call(this,ne,le))}return Z.type=function(ne){return arguments.length?(z=kt(ne),Z):z},Z.size=function(ne){return arguments.length?(N=kt(ne),Z):N},Z};function Ar(){return 64}function Vr(){return"circle"}function _i(z){var N=Math.sqrt(z/Ue);return"M0,"+N+"A"+N+","+N+" 0 1,1 0,"+-N+"A"+N+","+N+" 0 1,1 0,"+N+"Z"}var rn=e.map({circle:_i,cross:function(z){var N=Math.sqrt(z/5)/2;return"M"+-3*N+","+-N+"H"+-N+"V"+-3*N+"H"+N+"V"+-N+"H"+3*N+"V"+N+"H"+N+"V"+3*N+"H"+-N+"V"+N+"H"+-3*N+"Z"},diamond:function(z){var N=Math.sqrt(z/(2*xn)),Z=N*xn;return"M0,"+-N+"L"+Z+",0 0,"+N+" "+-Z+",0Z"},square:function(z){var N=Math.sqrt(z)/2;return"M"+-N+","+-N+"L"+N+","+-N+" "+N+","+N+" "+-N+","+N+"Z"},"triangle-down":function(z){var N=Math.sqrt(z/cn),Z=N*cn/2;return"M0,"+Z+"L"+N+","+-Z+" "+-N+","+-Z+"Z"},"triangle-up":function(z){var N=Math.sqrt(z/cn),Z=N*cn/2;return"M0,"+-Z+"L"+N+","+Z+" "+-N+","+Z+"Z"}});e.svg.symbolTypes=rn.keys();var cn=Math.sqrt(3),xn=Math.tan(30*Ve);H.transition=function(z){for(var N=wl||++as,Z=ou(z),ne=[],le,fe,De=Xu||{time:Date.now(),ease:_h,delay:0,duration:250},me=-1,ze=this.length;++me<ze;){ne.push(le=[]);for(var He=this[me],We=-1,ft=He.length;++We<ft;)(fe=He[We])&&Ul(fe,We,Z,N,De),le.push(fe)}return So(ne,Z,N)},H.interrupt=function(z){return this.each(z==null?Dn:Qa(ou(z)))};var Dn=Qa(ou());function Qa(z){return function(){var N,Z,ne;(N=this[z])&&(ne=N[Z=N.active])&&(ne.timer.c=null,ne.timer.t=NaN,--N.count?delete N[Z]:delete this[z],N.active+=.5,ne.event&&ne.event.interrupt.call(this,this.__data__,ne.index))}}function So(z,N,Z){return q(z,oa),z.namespace=N,z.id=Z,z}var oa=[],as=0,wl,Xu;oa.call=H.call,oa.empty=H.empty,oa.node=H.node,oa.size=H.size,e.transition=function(z,N){return z&&z.transition?wl?z.transition(N):z:e.selection().transition(z)},e.transition.prototype=oa,oa.select=function(z){var N=this.id,Z=this.namespace,ne=[],le,fe,De;z=G(z);for(var me=-1,ze=this.length;++me<ze;){ne.push(le=[]);for(var He=this[me],We=-1,ft=He.length;++We<ft;)(De=He[We])&&(fe=z.call(De,De.__data__,We,me))?("__data__"in De&&(fe.__data__=De.__data__),Ul(fe,We,Z,N,De[Z][N]),le.push(fe)):le.push(null)}return So(ne,Z,N)},oa.selectAll=function(z){var N=this.id,Z=this.namespace,ne=[],le,fe,De,me,ze;z=Q(z);for(var He=-1,We=this.length;++He<We;)for(var ft=this[He],ht=-1,Ot=ft.length;++ht<Ot;)if(De=ft[ht]){ze=De[Z][N],fe=z.call(De,De.__data__,ht,He),ne.push(le=[]);for(var jt=-1,pt=fe.length;++jt<pt;)(me=fe[jt])&&Ul(me,jt,Z,N,ze),le.push(me)}return So(ne,Z,N)},oa.filter=function(z){var N=[],Z,ne,le;typeof z!="function"&&(z=re(z));for(var fe=0,De=this.length;fe<De;fe++){N.push(Z=[]);for(var ne=this[fe],me=0,ze=ne.length;me<ze;me++)(le=ne[me])&&z.call(le,le.__data__,me,fe)&&Z.push(le)}return So(N,this.namespace,this.id)},oa.tween=function(z,N){var Z=this.id,ne=this.namespace;return arguments.length<2?this.node()[ne][Z].tween.get(z):we(this,N==null?function(le){le[ne][Z].tween.remove(z)}:function(le){le[ne][Z].tween.set(z,N)})};function jf(z,N,Z,ne){var le=z.id,fe=z.namespace;return we(z,typeof Z=="function"?function(De,me,ze){De[fe][le].tween.set(N,ne(Z.call(De,De.__data__,me,ze)))}:(Z=ne(Z),function(De){De[fe][le].tween.set(N,Z)}))}oa.attr=function(z,N){if(arguments.length<2){for(N in z)this.attr(N,z[N]);return this}var Z=z=="transform"?pp:yh,ne=e.ns.qualify(z);function le(){this.removeAttribute(ne)}function fe(){this.removeAttributeNS(ne.space,ne.local)}function De(ze){return ze==null?le:(ze+="",function(){var He=this.getAttribute(ne),We;return He!==ze&&(We=Z(He,ze),function(ft){this.setAttribute(ne,We(ft))})})}function me(ze){return ze==null?fe:(ze+="",function(){var He=this.getAttributeNS(ne.space,ne.local),We;return He!==ze&&(We=Z(He,ze),function(ft){this.setAttributeNS(ne.space,ne.local,We(ft))})})}return jf(this,"attr."+z,N,ne.local?me:De)},oa.attrTween=function(z,N){var Z=e.ns.qualify(z);function ne(fe,De){var me=N.call(this,fe,De,this.getAttribute(Z));return me&&function(ze){this.setAttribute(Z,me(ze))}}function le(fe,De){var me=N.call(this,fe,De,this.getAttributeNS(Z.space,Z.local));return me&&function(ze){this.setAttributeNS(Z.space,Z.local,me(ze))}}return this.tween("attr."+z,Z.local?le:ne)},oa.style=function(z,N,Z){var ne=arguments.length;if(ne<3){if(typeof z!="string"){ne<2&&(N="");for(Z in z)this.style(Z,z[Z],N);return this}Z=""}function le(){this.style.removeProperty(z)}function fe(De){return De==null?le:(De+="",function(){var me=a(this).getComputedStyle(this,null).getPropertyValue(z),ze;return me!==De&&(ze=yh(me,De),function(He){this.style.setProperty(z,ze(He),Z)})})}return jf(this,"style."+z,N,fe)},oa.styleTween=function(z,N,Z){arguments.length<3&&(Z="");function ne(le,fe){var De=N.call(this,le,fe,a(this).getComputedStyle(this,null).getPropertyValue(z));return De&&function(me){this.style.setProperty(z,De(me),Z)}}return this.tween("style."+z,ne)},oa.text=function(z){return jf(this,"text",z,u0)};function u0(z){return z==null&&(z=""),function(){this.textContent=z}}oa.remove=function(){var z=this.namespace;return this.each("end.transition",function(){var N;this[z].count<2&&(N=this.parentNode)&&N.removeChild(this)})},oa.ease=function(z){var N=this.id,Z=this.namespace;return arguments.length<1?this.node()[Z][N].ease:(typeof z!="function"&&(z=e.ease.apply(e,arguments)),we(this,function(ne){ne[Z][N].ease=z}))},oa.delay=function(z){var N=this.id,Z=this.namespace;return arguments.length<1?this.node()[Z][N].delay:we(this,typeof z=="function"?function(ne,le,fe){ne[Z][N].delay=+z.call(ne,ne.__data__,le,fe)}:(z=+z,function(ne){ne[Z][N].delay=z}))},oa.duration=function(z){var N=this.id,Z=this.namespace;return arguments.length<1?this.node()[Z][N].duration:we(this,typeof z=="function"?function(ne,le,fe){ne[Z][N].duration=Math.max(1,z.call(ne,ne.__data__,le,fe))}:(z=Math.max(1,z),function(ne){ne[Z][N].duration=z}))},oa.each=function(z,N){var Z=this.id,ne=this.namespace;if(arguments.length<2){var le=Xu,fe=wl;try{wl=Z,we(this,function(De,me,ze){Xu=De[ne][Z],z.call(De,De.__data__,me,ze)})}finally{Xu=le,wl=fe}}else we(this,function(De){var me=De[ne][Z];(me.event||(me.event=e.dispatch("start","end","interrupt"))).on(z,N)});return this},oa.transition=function(){for(var z=this.id,N=++as,Z=this.namespace,ne=[],le,fe,De,me,ze=0,He=this.length;ze<He;ze++){ne.push(le=[]);for(var fe=this[ze],We=0,ft=fe.length;We<ft;We++)(De=fe[We])&&(me=De[Z][z],Ul(De,We,Z,N,{time:me.time,ease:me.ease,delay:me.delay+me.duration,duration:me.duration})),le.push(De)}return So(ne,Z,N)};function ou(z){return z==null?"__transition__":"__transition_"+z+"__"}function Ul(z,N,Z,ne,le){var fe=z[Z]||(z[Z]={active:0,count:0}),De=fe[ne],me,ze,He,We,ft;function ht(pt){var Dt=De.delay;if(ze.t=Dt+me,Dt<=pt)return Ot(pt-Dt);ze.c=Ot}function Ot(pt){var Dt=fe.active,zt=fe[Dt];zt&&(zt.timer.c=null,zt.timer.t=NaN,--fe.count,delete fe[Dt],zt.event&&zt.event.interrupt.call(z,z.__data__,zt.index));for(var $t in fe)if(+$t<ne){var Yt=fe[$t];Yt.timer.c=null,Yt.timer.t=NaN,--fe.count,delete fe[$t]}ze.c=jt,Gn(function(){return ze.c&&jt(pt||1)&&(ze.c=null,ze.t=NaN),1},0,me),fe.active=ne,De.event&&De.event.start.call(z,z.__data__,N),ft=[],De.tween.forEach(function(Lt,Cr){(Cr=Cr.call(z,z.__data__,N))&&ft.push(Cr)}),We=De.ease,He=De.duration}function jt(pt){for(var Dt=pt/He,zt=We(Dt),$t=ft.length;$t>0;)ft[--$t].call(z,zt);if(Dt>=1)return De.event&&De.event.end.call(z,z.__data__,N),--fe.count?delete fe[ne]:delete z[Z],1}De||(me=le.time,ze=Gn(ht,0,me),De=fe[ne]={tween:new _,time:me,timer:ze,delay:le.delay,duration:le.duration,ease:le.ease,index:N},le=null,++fe.count)}e.svg.axis=function(){var z=e.scale.linear(),N=$c,Z=6,ne=6,le=3,fe=[10],De=null,me;function ze(He){He.each(function(){var We=e.select(this),ft=this.__chart__||z,ht=this.__chart__=z.copy(),Ot=De==null?ht.ticks?ht.ticks.apply(ht,fe):ht.domain():De,jt=me==null?ht.tickFormat?ht.tickFormat.apply(ht,fe):F:me,pt=We.selectAll(".tick").data(Ot,ht),Dt=pt.enter().insert("g",".domain").attr("class","tick").style("opacity",bt),zt=e.transition(pt.exit()).style("opacity",bt).remove(),$t=e.transition(pt.order()).style("opacity",1),Yt=Math.max(Z,0)+le,Lt,Cr=mr(ht),Gr=We.selectAll(".domain").data([0]),ri=(Gr.enter().append("path").attr("class","domain"),e.transition(Gr));Dt.append("line"),Dt.append("text");var pi=Dt.select("line"),Li=$t.select("line"),Pi=pt.select("text").text(jt),Rn=Dt.select("text"),Gi=$t.select("text"),kn=N==="top"||N==="left"?-1:1,Ua,Qs,lo,oi;if(N==="bottom"||N==="top"?(Lt=Wf,Ua="x",lo="y",Qs="x2",oi="y2",Pi.attr("dy",kn<0?"0em":".71em").style("text-anchor","middle"),ri.attr("d","M"+Cr[0]+","+kn*ne+"V0H"+Cr[1]+"V"+kn*ne)):(Lt=Yf,Ua="y",lo="x",Qs="y2",oi="x2",Pi.attr("dy",".32em").style("text-anchor",kn<0?"end":"start"),ri.attr("d","M"+kn*ne+","+Cr[0]+"H0V"+Cr[1]+"H"+kn*ne)),pi.attr(oi,kn*Z),Rn.attr(lo,kn*Yt),Li.attr(Qs,0).attr(oi,kn*Z),Gi.attr(Ua,0).attr(lo,kn*Yt),ht.rangeBand){var zn=ht,Yn=zn.rangeBand()/2;ft=ht=function(qa){return zn(qa)+Yn}}else ft.rangeBand?ft=ht:zt.call(Lt,ht,ft);Dt.call(Lt,ft,ht),$t.call(Lt,ht,ht)})}return ze.scale=function(He){return arguments.length?(z=He,ze):z},ze.orient=function(He){return arguments.length?(N=He in $f?He+"":$c,ze):N},ze.ticks=function(){return arguments.length?(fe=r(arguments),ze):fe},ze.tickValues=function(He){return arguments.length?(De=He,ze):De},ze.tickFormat=function(He){return arguments.length?(me=He,ze):me},ze.tickSize=function(He){var We=arguments.length;return We?(Z=+He,ne=+arguments[We-1],ze):Z},ze.innerTickSize=function(He){return arguments.length?(Z=+He,ze):Z},ze.outerTickSize=function(He){return arguments.length?(ne=+He,ze):ne},ze.tickPadding=function(He){return arguments.length?(le=+He,ze):le},ze.tickSubdivide=function(){return arguments.length&&ze},ze};var $c="bottom",$f={top:1,right:1,bottom:1,left:1};function Wf(z,N,Z){z.attr("transform",function(ne){var le=N(ne);return"translate("+(isFinite(le)?le:Z(ne))+",0)"})}function Yf(z,N,Z){z.attr("transform",function(ne){var le=N(ne);return"translate(0,"+(isFinite(le)?le:Z(ne))+")"})}e.svg.brush=function(){var z=K(We,"brushstart","brush","brushend"),N=null,Z=null,ne=[0,0],le=[0,0],fe,De,me=!0,ze=!0,He=gf[0];function We(pt){pt.each(function(){var Dt=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",jt).on("touchstart.brush",jt),zt=Dt.selectAll(".background").data([0]);zt.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Dt.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var $t=Dt.selectAll(".resize").data(He,F);$t.exit().remove(),$t.enter().append("g").attr("class",function(Gr){return"resize "+Gr}).style("cursor",function(Gr){return Sh[Gr]}).append("rect").attr("x",function(Gr){return/[ew]$/.test(Gr)?-3:null}).attr("y",function(Gr){return/^[ns]/.test(Gr)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),$t.style("display",We.empty()?"none":null);var Yt=e.transition(Dt),Lt=e.transition(zt),Cr;N&&(Cr=mr(N),Lt.attr("x",Cr[0]).attr("width",Cr[1]-Cr[0]),ht(Yt)),Z&&(Cr=mr(Z),Lt.attr("y",Cr[0]).attr("height",Cr[1]-Cr[0]),Ot(Yt)),ft(Yt)})}We.event=function(pt){pt.each(function(){var Dt=z.of(this,arguments),zt={x:ne,y:le,i:fe,j:De},$t=this.__chart__||zt;this.__chart__=zt,wl?e.select(this).transition().each("start.brush",function(){fe=$t.i,De=$t.j,ne=$t.x,le=$t.y,Dt({type:"brushstart"})}).tween("brush:brush",function(){var Yt=a0(ne,zt.x),Lt=a0(le,zt.y);return fe=De=null,function(Cr){ne=zt.x=Yt(Cr),le=zt.y=Lt(Cr),Dt({type:"brush",mode:"resize"})}}).each("end.brush",function(){fe=zt.i,De=zt.j,Dt({type:"brush",mode:"resize"}),Dt({type:"brushend"})}):(Dt({type:"brushstart"}),Dt({type:"brush",mode:"resize"}),Dt({type:"brushend"}))})};function ft(pt){pt.selectAll(".resize").attr("transform",function(Dt){return"translate("+ne[+/e$/.test(Dt)]+","+le[+/^s/.test(Dt)]+")"})}function ht(pt){pt.select(".extent").attr("x",ne[0]),pt.selectAll(".extent,.n>rect,.s>rect").attr("width",ne[1]-ne[0])}function Ot(pt){pt.select(".extent").attr("y",le[0]),pt.selectAll(".extent,.e>rect,.w>rect").attr("height",le[1]-le[0])}function jt(){var pt=this,Dt=e.select(e.event.target),zt=z.of(pt,arguments),$t=e.select(pt),Yt=Dt.datum(),Lt=!/^(n|s)$/.test(Yt)&&N,Cr=!/^(e|w)$/.test(Yt)&&Z,Gr=Dt.classed("extent"),ri=ut(pt),pi,Li=e.mouse(pt),Pi,Rn=e.select(a(pt)).on("keydown.brush",Ua).on("keyup.brush",Qs);if(e.event.changedTouches?Rn.on("touchmove.brush",lo).on("touchend.brush",zn):Rn.on("mousemove.brush",lo).on("mouseup.brush",zn),$t.interrupt().selectAll("*").interrupt(),Gr)Li[0]=ne[0]-Li[0],Li[1]=le[0]-Li[1];else if(Yt){var Gi=+/w$/.test(Yt),kn=+/^n/.test(Yt);Pi=[ne[1-Gi]-Li[0],le[1-kn]-Li[1]],Li[0]=ne[Gi],Li[1]=le[kn]}else e.event.altKey&&(pi=Li.slice());$t.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",Dt.style("cursor")),zt({type:"brushstart"}),lo();function Ua(){e.event.keyCode==32&&(Gr||(pi=null,Li[0]-=ne[1],Li[1]-=le[1],Gr=2),$())}function Qs(){e.event.keyCode==32&&Gr==2&&(Li[0]+=ne[1],Li[1]+=le[1],Gr=0,$())}function lo(){var Yn=e.mouse(pt),qa=!1;Pi&&(Yn[0]+=Pi[0],Yn[1]+=Pi[1]),Gr||(e.event.altKey?(pi||(pi=[(ne[0]+ne[1])/2,(le[0]+le[1])/2]),Li[0]=ne[+(Yn[0]<pi[0])],Li[1]=le[+(Yn[1]<pi[1])]):pi=null),Lt&&oi(Yn,N,0)&&(ht($t),qa=!0),Cr&&oi(Yn,Z,1)&&(Ot($t),qa=!0),qa&&(ft($t),zt({type:"brush",mode:Gr?"move":"resize"}))}function oi(Yn,qa,gs){var Tl=mr(qa),Mu=Tl[0],Zu=Tl[1],Wc=Li[gs],Be=gs?le:ne,gt=Be[1]-Be[0],Mt,or;if(Gr&&(Mu-=Wc,Zu-=gt+Wc),Mt=(gs?ze:me)?Math.max(Mu,Math.min(Zu,Yn[gs])):Yn[gs],Gr?or=(Mt+=Wc)+gt:(pi&&(Wc=Math.max(Mu,Math.min(Zu,2*pi[gs]-Mt))),Wc<Mt?(or=Mt,Mt=Wc):or=Wc),Be[0]!=Mt||Be[1]!=or)return gs?De=null:fe=null,Be[0]=Mt,Be[1]=or,!0}function zn(){lo(),$t.style("pointer-events","all").selectAll(".resize").style("display",We.empty()?"none":null),e.select("body").style("cursor",null),Rn.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),ri(),zt({type:"brushend"})}}return We.x=function(pt){return arguments.length?(N=pt,He=gf[!N<<1|!Z],We):N},We.y=function(pt){return arguments.length?(Z=pt,He=gf[!N<<1|!Z],We):Z},We.clamp=function(pt){return arguments.length?(N&&Z?(me=!!pt[0],ze=!!pt[1]):N?me=!!pt:Z&&(ze=!!pt),We):N&&Z?[me,ze]:N?me:Z?ze:null},We.extent=function(pt){var Dt,zt,$t,Yt,Lt;return arguments.length?(N&&(Dt=pt[0],zt=pt[1],Z&&(Dt=Dt[0],zt=zt[0]),fe=[Dt,zt],N.invert&&(Dt=N(Dt),zt=N(zt)),zt<Dt&&(Lt=Dt,Dt=zt,zt=Lt),(Dt!=ne[0]||zt!=ne[1])&&(ne=[Dt,zt])),Z&&($t=pt[0],Yt=pt[1],N&&($t=$t[1],Yt=Yt[1]),De=[$t,Yt],Z.invert&&($t=Z($t),Yt=Z(Yt)),Yt<$t&&(Lt=$t,$t=Yt,Yt=Lt),($t!=le[0]||Yt!=le[1])&&(le=[$t,Yt])),We):(N&&(fe?(Dt=fe[0],zt=fe[1]):(Dt=ne[0],zt=ne[1],N.invert&&(Dt=N.invert(Dt),zt=N.invert(zt)),zt<Dt&&(Lt=Dt,Dt=zt,zt=Lt))),Z&&(De?($t=De[0],Yt=De[1]):($t=le[0],Yt=le[1],Z.invert&&($t=Z.invert($t),Yt=Z.invert(Yt)),Yt<$t&&(Lt=$t,$t=Yt,Yt=Lt))),N&&Z?[[Dt,$t],[zt,Yt]]:N?[Dt,zt]:Z&&[$t,Yt])},We.clear=function(){return We.empty()||(ne=[0,0],le=[0,0],fe=De=null),We},We.empty=function(){return!!N&&ne[0]==ne[1]||!!Z&&le[0]==le[1]},e.rebind(We,z,"on")};var Sh={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},gf=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];e.text=Jt(function(z){return z.responseText}),e.json=function(z,N){return Rt(z,"application/json",c0,N)};function c0(z){return JSON.parse(z.responseText)}e.html=function(z,N){return Rt(z,"text/html",Dp,N)};function Dp(z){var N=i.createRange();return N.selectNode(i.body),N.createContextualFragment(z.responseText)}e.xml=Jt(function(z){return z.responseXML}),typeof iC=="object"&&iC.exports?iC.exports=e:this.d3=e}).apply(self)});var vN=W((nC,Xse)=>{(function(e,t){typeof nC=="object"&&typeof Xse!="undefined"?t(nC):(e=e||self,t(e.d3=e.d3||{}))})(nC,function(e){"use strict";var t=new Date,r=new Date;function i(re,pe,we,Fe){function Se(ke){return re(ke=arguments.length===0?new Date:new Date(+ke)),ke}return Se.floor=function(ke){return re(ke=new Date(+ke)),ke},Se.ceil=function(ke){return re(ke=new Date(ke-1)),pe(ke,1),re(ke),ke},Se.round=function(ke){var _e=Se(ke),Ie=Se.ceil(ke);return ke-_e<Ie-ke?_e:Ie},Se.offset=function(ke,_e){return pe(ke=new Date(+ke),_e==null?1:Math.floor(_e)),ke},Se.range=function(ke,_e,Ie){var Oe=[],Qe;if(ke=Se.ceil(ke),Ie=Ie==null?1:Math.floor(Ie),!(ke<_e)||!(Ie>0))return Oe;do Oe.push(Qe=new Date(+ke)),pe(ke,Ie),re(ke);while(Qe<ke&&ke<_e);return Oe},Se.filter=function(ke){return i(function(_e){if(_e>=_e)for(;re(_e),!ke(_e);)_e.setTime(_e-1)},function(_e,Ie){if(_e>=_e)if(Ie<0)for(;++Ie<=0;)for(;pe(_e,-1),!ke(_e););else for(;--Ie>=0;)for(;pe(_e,1),!ke(_e););})},we&&(Se.count=function(ke,_e){return t.setTime(+ke),r.setTime(+_e),re(t),re(r),Math.floor(we(t,r))},Se.every=function(ke){return ke=Math.floor(ke),!isFinite(ke)||!(ke>0)?null:ke>1?Se.filter(Fe?function(_e){return Fe(_e)%ke===0}:function(_e){return Se.count(0,_e)%ke===0}):Se}),Se}var n=i(function(){},function(re,pe){re.setTime(+re+pe)},function(re,pe){return pe-re});n.every=function(re){return re=Math.floor(re),!isFinite(re)||!(re>0)?null:re>1?i(function(pe){pe.setTime(Math.floor(pe/re)*re)},function(pe,we){pe.setTime(+pe+we*re)},function(pe,we){return(we-pe)/re}):n};var a=n.range,o=1e3,s=6e4,l=36e5,u=864e5,c=6048e5,f=i(function(re){re.setTime(re-re.getMilliseconds())},function(re,pe){re.setTime(+re+pe*o)},function(re,pe){return(pe-re)/o},function(re){return re.getUTCSeconds()}),h=f.range,d=i(function(re){re.setTime(re-re.getMilliseconds()-re.getSeconds()*o)},function(re,pe){re.setTime(+re+pe*s)},function(re,pe){return(pe-re)/s},function(re){return re.getMinutes()}),p=d.range,v=i(function(re){re.setTime(re-re.getMilliseconds()-re.getSeconds()*o-re.getMinutes()*s)},function(re,pe){re.setTime(+re+pe*l)},function(re,pe){return(pe-re)/l},function(re){return re.getHours()}),m=v.range,g=i(function(re){re.setHours(0,0,0,0)},function(re,pe){re.setDate(re.getDate()+pe)},function(re,pe){return(pe-re-(pe.getTimezoneOffset()-re.getTimezoneOffset())*s)/u},function(re){return re.getDate()-1}),w=g.range;function b(re){return i(function(pe){pe.setDate(pe.getDate()-(pe.getDay()+7-re)%7),pe.setHours(0,0,0,0)},function(pe,we){pe.setDate(pe.getDate()+we*7)},function(pe,we){return(we-pe-(we.getTimezoneOffset()-pe.getTimezoneOffset())*s)/c})}var _=b(0),M=b(1),x=b(2),T=b(3),A=b(4),y=b(5),E=b(6),S=_.range,C=M.range,k=x.range,D=T.range,F=A.range,P=y.range,R=E.range,L=i(function(re){re.setDate(1),re.setHours(0,0,0,0)},function(re,pe){re.setMonth(re.getMonth()+pe)},function(re,pe){return pe.getMonth()-re.getMonth()+(pe.getFullYear()-re.getFullYear())*12},function(re){return re.getMonth()}),I=L.range,B=i(function(re){re.setMonth(0,1),re.setHours(0,0,0,0)},function(re,pe){re.setFullYear(re.getFullYear()+pe)},function(re,pe){return pe.getFullYear()-re.getFullYear()},function(re){return re.getFullYear()});B.every=function(re){return!isFinite(re=Math.floor(re))||!(re>0)?null:i(function(pe){pe.setFullYear(Math.floor(pe.getFullYear()/re)*re),pe.setMonth(0,1),pe.setHours(0,0,0,0)},function(pe,we){pe.setFullYear(pe.getFullYear()+we*re)})};var O=B.range,$=i(function(re){re.setUTCSeconds(0,0)},function(re,pe){re.setTime(+re+pe*s)},function(re,pe){return(pe-re)/s},function(re){return re.getUTCMinutes()}),Y=$.range,K=i(function(re){re.setUTCMinutes(0,0,0)},function(re,pe){re.setTime(+re+pe*l)},function(re,pe){return(pe-re)/l},function(re){return re.getUTCHours()}),j=K.range,q=i(function(re){re.setUTCHours(0,0,0,0)},function(re,pe){re.setUTCDate(re.getUTCDate()+pe)},function(re,pe){return(pe-re)/u},function(re){return re.getUTCDate()-1}),J=q.range;function U(re){return i(function(pe){pe.setUTCDate(pe.getUTCDate()-(pe.getUTCDay()+7-re)%7),pe.setUTCHours(0,0,0,0)},function(pe,we){pe.setUTCDate(pe.getUTCDate()+we*7)},function(pe,we){return(we-pe)/c})}var V=U(0),X=U(1),H=U(2),G=U(3),Q=U(4),te=U(5),ce=U(6),ge=V.range,Ce=X.range,be=H.range,he=G.range,oe=Q.range,Ee=te.range,ye=ce.range,ue=i(function(re){re.setUTCDate(1),re.setUTCHours(0,0,0,0)},function(re,pe){re.setUTCMonth(re.getUTCMonth()+pe)},function(re,pe){return pe.getUTCMonth()-re.getUTCMonth()+(pe.getUTCFullYear()-re.getUTCFullYear())*12},function(re){return re.getUTCMonth()}),ee=ue.range,ae=i(function(re){re.setUTCMonth(0,1),re.setUTCHours(0,0,0,0)},function(re,pe){re.setUTCFullYear(re.getUTCFullYear()+pe)},function(re,pe){return pe.getUTCFullYear()-re.getUTCFullYear()},function(re){return re.getUTCFullYear()});ae.every=function(re){return!isFinite(re=Math.floor(re))||!(re>0)?null:i(function(pe){pe.setUTCFullYear(Math.floor(pe.getUTCFullYear()/re)*re),pe.setUTCMonth(0,1),pe.setUTCHours(0,0,0,0)},function(pe,we){pe.setUTCFullYear(pe.getUTCFullYear()+we*re)})};var xe=ae.range;e.timeDay=g,e.timeDays=w,e.timeFriday=y,e.timeFridays=P,e.timeHour=v,e.timeHours=m,e.timeInterval=i,e.timeMillisecond=n,e.timeMilliseconds=a,e.timeMinute=d,e.timeMinutes=p,e.timeMonday=M,e.timeMondays=C,e.timeMonth=L,e.timeMonths=I,e.timeSaturday=E,e.timeSaturdays=R,e.timeSecond=f,e.timeSeconds=h,e.timeSunday=_,e.timeSundays=S,e.timeThursday=A,e.timeThursdays=F,e.timeTuesday=x,e.timeTuesdays=k,e.timeWednesday=T,e.timeWednesdays=D,e.timeWeek=_,e.timeWeeks=S,e.timeYear=B,e.timeYears=O,e.utcDay=q,e.utcDays=J,e.utcFriday=te,e.utcFridays=Ee,e.utcHour=K,e.utcHours=j,e.utcMillisecond=n,e.utcMilliseconds=a,e.utcMinute=$,e.utcMinutes=Y,e.utcMonday=X,e.utcMondays=Ce,e.utcMonth=ue,e.utcMonths=ee,e.utcSaturday=ce,e.utcSaturdays=ye,e.utcSecond=f,e.utcSeconds=h,e.utcSunday=V,e.utcSundays=ge,e.utcThursday=Q,e.utcThursdays=oe,e.utcTuesday=H,e.utcTuesdays=be,e.utcWednesday=G,e.utcWednesdays=he,e.utcWeek=V,e.utcWeeks=ge,e.utcYear=ae,e.utcYears=xe,Object.defineProperty(e,"__esModule",{value:!0})})});var z3=W((aC,Zse)=>{(function(e,t){typeof aC=="object"&&typeof Zse!="undefined"?t(aC,vN()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(aC,function(e,t){"use strict";function r(Re){if(0<=Re.y&&Re.y<100){var Ve=new Date(-1,Re.m,Re.d,Re.H,Re.M,Re.S,Re.L);return Ve.setFullYear(Re.y),Ve}return new Date(Re.y,Re.m,Re.d,Re.H,Re.M,Re.S,Re.L)}function i(Re){if(0<=Re.y&&Re.y<100){var Ve=new Date(Date.UTC(-1,Re.m,Re.d,Re.H,Re.M,Re.S,Re.L));return Ve.setUTCFullYear(Re.y),Ve}return new Date(Date.UTC(Re.y,Re.m,Re.d,Re.H,Re.M,Re.S,Re.L))}function n(Re,Ve,ct){return{y:Re,m:Ve,d:ct,H:0,M:0,S:0,L:0}}function a(Re){var Ve=Re.dateTime,ct=Re.date,Tt=Re.time,Xt=Re.periods,Vt=Re.days,lr=Re.shortDays,ur=Re.months,Bt=Re.shortMonths,Zt=h(Xt),kr=d(Xt),$e=h(Vt),tt=d(Vt),st=h(lr),xt=d(lr),Je=h(ur),Ct=d(ur),ir=h(Bt),hr=d(Bt),Ur={a:Rs,A:ho,b:ka,B:ao,c:null,d:L,e:L,f:Y,g:te,G:ge,H:I,I:B,j:O,L:$,m:K,M:j,p:zs,q:_a,Q:ut,s:vt,S:q,u:J,U,V:X,w:H,W:G,x:null,X:null,y:Q,Y:ce,Z:Ce,"%":_t},si={a:Xs,A:_l,b:yu,B:ul,c:null,d:be,e:be,f:ue,g:Ie,G:Qe,H:he,I:oe,j:Ee,L:ye,m:ee,M:ae,p:Le,q:ot,Q:ut,s:vt,S:xe,u:re,U:pe,V:Fe,w:Se,W:ke,x:null,X:null,y:_e,Y:Oe,Z:et,"%":_t},ei={a:ta,A:ca,b:dn,B:Vn,c:ra,d:A,e:A,f:D,g:_,G:b,H:E,I:E,j:y,L:k,m:T,M:S,p:hn,q:x,Q:P,s:R,S:C,u:v,U:m,V:g,w:p,W:w,x:ds,X:mo,y:_,Y:b,Z:M,"%":F};Ur.x=Lr(ct,Ur),Ur.X=Lr(Tt,Ur),Ur.c=Lr(Ve,Ur),si.x=Lr(ct,si),si.X=Lr(Tt,si),si.c=Lr(Ve,si);function Lr(lt,kt){return function(Jt){var Rt=[],Tr=-1,Wt=0,br=lt.length,Xr,ti,Mi;for(Jt instanceof Date||(Jt=new Date(+Jt));++Tr<br;)lt.charCodeAt(Tr)===37&&(Rt.push(lt.slice(Wt,Tr)),(ti=o[Xr=lt.charAt(++Tr)])!=null?Xr=lt.charAt(++Tr):ti=Xr==="e"?" ":"0",(Mi=kt[Xr])&&(Xr=Mi(Jt,ti)),Rt.push(Xr),Wt=Tr+1);return Rt.push(lt.slice(Wt,Tr)),Rt.join("")}}function $i(lt,kt){return function(Jt){var Rt=n(1900,void 0,1),Tr=Tn(Rt,lt,Jt+="",0),Wt,br;if(Tr!=Jt.length)return null;if("Q"in Rt)return new Date(Rt.Q);if("s"in Rt)return new Date(Rt.s*1e3+("L"in Rt?Rt.L:0));if(kt&&!("Z"in Rt)&&(Rt.Z=0),"p"in Rt&&(Rt.H=Rt.H%12+Rt.p*12),Rt.m===void 0&&(Rt.m="q"in Rt?Rt.q:0),"V"in Rt){if(Rt.V<1||Rt.V>53)return null;"w"in Rt||(Rt.w=1),"Z"in Rt?(Wt=i(n(Rt.y,0,1)),br=Wt.getUTCDay(),Wt=br>4||br===0?t.utcMonday.ceil(Wt):t.utcMonday(Wt),Wt=t.utcDay.offset(Wt,(Rt.V-1)*7),Rt.y=Wt.getUTCFullYear(),Rt.m=Wt.getUTCMonth(),Rt.d=Wt.getUTCDate()+(Rt.w+6)%7):(Wt=r(n(Rt.y,0,1)),br=Wt.getDay(),Wt=br>4||br===0?t.timeMonday.ceil(Wt):t.timeMonday(Wt),Wt=t.timeDay.offset(Wt,(Rt.V-1)*7),Rt.y=Wt.getFullYear(),Rt.m=Wt.getMonth(),Rt.d=Wt.getDate()+(Rt.w+6)%7)}else("W"in Rt||"U"in Rt)&&("w"in Rt||(Rt.w="u"in Rt?Rt.u%7:"W"in Rt?1:0),br="Z"in Rt?i(n(Rt.y,0,1)).getUTCDay():r(n(Rt.y,0,1)).getDay(),Rt.m=0,Rt.d="W"in Rt?(Rt.w+6)%7+Rt.W*7-(br+5)%7:Rt.w+Rt.U*7-(br+6)%7);return"Z"in Rt?(Rt.H+=Rt.Z/100|0,Rt.M+=Rt.Z%100,i(Rt)):r(Rt)}}function Tn(lt,kt,Jt,Rt){for(var Tr=0,Wt=kt.length,br=Jt.length,Xr,ti;Tr<Wt;){if(Rt>=br)return-1;if(Xr=kt.charCodeAt(Tr++),Xr===37){if(Xr=kt.charAt(Tr++),ti=ei[Xr in o?kt.charAt(Tr++):Xr],!ti||(Rt=ti(lt,Jt,Rt))<0)return-1}else if(Xr!=Jt.charCodeAt(Rt++))return-1}return Rt}function hn(lt,kt,Jt){var Rt=Zt.exec(kt.slice(Jt));return Rt?(lt.p=kr[Rt[0].toLowerCase()],Jt+Rt[0].length):-1}function ta(lt,kt,Jt){var Rt=st.exec(kt.slice(Jt));return Rt?(lt.w=xt[Rt[0].toLowerCase()],Jt+Rt[0].length):-1}function ca(lt,kt,Jt){var Rt=$e.exec(kt.slice(Jt));return Rt?(lt.w=tt[Rt[0].toLowerCase()],Jt+Rt[0].length):-1}function dn(lt,kt,Jt){var Rt=ir.exec(kt.slice(Jt));return Rt?(lt.m=hr[Rt[0].toLowerCase()],Jt+Rt[0].length):-1}function Vn(lt,kt,Jt){var Rt=Je.exec(kt.slice(Jt));return Rt?(lt.m=Ct[Rt[0].toLowerCase()],Jt+Rt[0].length):-1}function ra(lt,kt,Jt){return Tn(lt,Ve,kt,Jt)}function ds(lt,kt,Jt){return Tn(lt,ct,kt,Jt)}function mo(lt,kt,Jt){return Tn(lt,Tt,kt,Jt)}function Rs(lt){return lr[lt.getDay()]}function ho(lt){return Vt[lt.getDay()]}function ka(lt){return Bt[lt.getMonth()]}function ao(lt){return ur[lt.getMonth()]}function zs(lt){return Xt[+(lt.getHours()>=12)]}function _a(lt){return 1+~~(lt.getMonth()/3)}function Xs(lt){return lr[lt.getUTCDay()]}function _l(lt){return Vt[lt.getUTCDay()]}function yu(lt){return Bt[lt.getUTCMonth()]}function ul(lt){return ur[lt.getUTCMonth()]}function Le(lt){return Xt[+(lt.getUTCHours()>=12)]}function ot(lt){return 1+~~(lt.getUTCMonth()/3)}return{format:function(lt){var kt=Lr(lt+="",Ur);return kt.toString=function(){return lt},kt},parse:function(lt){var kt=$i(lt+="",!1);return kt.toString=function(){return lt},kt},utcFormat:function(lt){var kt=Lr(lt+="",si);return kt.toString=function(){return lt},kt},utcParse:function(lt){var kt=$i(lt+="",!0);return kt.toString=function(){return lt},kt}}}var o={"-":"",_:" ",0:"0"},s=/^\s*\d+/,l=/^%/,u=/[\\^$*+?|[\]().{}]/g;function c(Re,Ve,ct){var Tt=Re<0?"-":"",Xt=(Tt?-Re:Re)+"",Vt=Xt.length;return Tt+(Vt<ct?new Array(ct-Vt+1).join(Ve)+Xt:Xt)}function f(Re){return Re.replace(u,"\\$&")}function h(Re){return new RegExp("^(?:"+Re.map(f).join("|")+")","i")}function d(Re){for(var Ve={},ct=-1,Tt=Re.length;++ct<Tt;)Ve[Re[ct].toLowerCase()]=ct;return Ve}function p(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+1));return Tt?(Re.w=+Tt[0],ct+Tt[0].length):-1}function v(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+1));return Tt?(Re.u=+Tt[0],ct+Tt[0].length):-1}function m(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+2));return Tt?(Re.U=+Tt[0],ct+Tt[0].length):-1}function g(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+2));return Tt?(Re.V=+Tt[0],ct+Tt[0].length):-1}function w(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+2));return Tt?(Re.W=+Tt[0],ct+Tt[0].length):-1}function b(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+4));return Tt?(Re.y=+Tt[0],ct+Tt[0].length):-1}function _(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+2));return Tt?(Re.y=+Tt[0]+(+Tt[0]>68?1900:2e3),ct+Tt[0].length):-1}function M(Re,Ve,ct){var Tt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Ve.slice(ct,ct+6));return Tt?(Re.Z=Tt[1]?0:-(Tt[2]+(Tt[3]||"00")),ct+Tt[0].length):-1}function x(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+1));return Tt?(Re.q=Tt[0]*3-3,ct+Tt[0].length):-1}function T(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+2));return Tt?(Re.m=Tt[0]-1,ct+Tt[0].length):-1}function A(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+2));return Tt?(Re.d=+Tt[0],ct+Tt[0].length):-1}function y(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+3));return Tt?(Re.m=0,Re.d=+Tt[0],ct+Tt[0].length):-1}function E(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+2));return Tt?(Re.H=+Tt[0],ct+Tt[0].length):-1}function S(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+2));return Tt?(Re.M=+Tt[0],ct+Tt[0].length):-1}function C(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+2));return Tt?(Re.S=+Tt[0],ct+Tt[0].length):-1}function k(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+3));return Tt?(Re.L=+Tt[0],ct+Tt[0].length):-1}function D(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct,ct+6));return Tt?(Re.L=Math.floor(Tt[0]/1e3),ct+Tt[0].length):-1}function F(Re,Ve,ct){var Tt=l.exec(Ve.slice(ct,ct+1));return Tt?ct+Tt[0].length:-1}function P(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct));return Tt?(Re.Q=+Tt[0],ct+Tt[0].length):-1}function R(Re,Ve,ct){var Tt=s.exec(Ve.slice(ct));return Tt?(Re.s=+Tt[0],ct+Tt[0].length):-1}function L(Re,Ve){return c(Re.getDate(),Ve,2)}function I(Re,Ve){return c(Re.getHours(),Ve,2)}function B(Re,Ve){return c(Re.getHours()%12||12,Ve,2)}function O(Re,Ve){return c(1+t.timeDay.count(t.timeYear(Re),Re),Ve,3)}function $(Re,Ve){return c(Re.getMilliseconds(),Ve,3)}function Y(Re,Ve){return $(Re,Ve)+"000"}function K(Re,Ve){return c(Re.getMonth()+1,Ve,2)}function j(Re,Ve){return c(Re.getMinutes(),Ve,2)}function q(Re,Ve){return c(Re.getSeconds(),Ve,2)}function J(Re){var Ve=Re.getDay();return Ve===0?7:Ve}function U(Re,Ve){return c(t.timeSunday.count(t.timeYear(Re)-1,Re),Ve,2)}function V(Re){var Ve=Re.getDay();return Ve>=4||Ve===0?t.timeThursday(Re):t.timeThursday.ceil(Re)}function X(Re,Ve){return Re=V(Re),c(t.timeThursday.count(t.timeYear(Re),Re)+(t.timeYear(Re).getDay()===4),Ve,2)}function H(Re){return Re.getDay()}function G(Re,Ve){return c(t.timeMonday.count(t.timeYear(Re)-1,Re),Ve,2)}function Q(Re,Ve){return c(Re.getFullYear()%100,Ve,2)}function te(Re,Ve){return Re=V(Re),c(Re.getFullYear()%100,Ve,2)}function ce(Re,Ve){return c(Re.getFullYear()%1e4,Ve,4)}function ge(Re,Ve){var ct=Re.getDay();return Re=ct>=4||ct===0?t.timeThursday(Re):t.timeThursday.ceil(Re),c(Re.getFullYear()%1e4,Ve,4)}function Ce(Re){var Ve=Re.getTimezoneOffset();return(Ve>0?"-":(Ve*=-1,"+"))+c(Ve/60|0,"0",2)+c(Ve%60,"0",2)}function be(Re,Ve){return c(Re.getUTCDate(),Ve,2)}function he(Re,Ve){return c(Re.getUTCHours(),Ve,2)}function oe(Re,Ve){return c(Re.getUTCHours()%12||12,Ve,2)}function Ee(Re,Ve){return c(1+t.utcDay.count(t.utcYear(Re),Re),Ve,3)}function ye(Re,Ve){return c(Re.getUTCMilliseconds(),Ve,3)}function ue(Re,Ve){return ye(Re,Ve)+"000"}function ee(Re,Ve){return c(Re.getUTCMonth()+1,Ve,2)}function ae(Re,Ve){return c(Re.getUTCMinutes(),Ve,2)}function xe(Re,Ve){return c(Re.getUTCSeconds(),Ve,2)}function re(Re){var Ve=Re.getUTCDay();return Ve===0?7:Ve}function pe(Re,Ve){return c(t.utcSunday.count(t.utcYear(Re)-1,Re),Ve,2)}function we(Re){var Ve=Re.getUTCDay();return Ve>=4||Ve===0?t.utcThursday(Re):t.utcThursday.ceil(Re)}function Fe(Re,Ve){return Re=we(Re),c(t.utcThursday.count(t.utcYear(Re),Re)+(t.utcYear(Re).getUTCDay()===4),Ve,2)}function Se(Re){return Re.getUTCDay()}function ke(Re,Ve){return c(t.utcMonday.count(t.utcYear(Re)-1,Re),Ve,2)}function _e(Re,Ve){return c(Re.getUTCFullYear()%100,Ve,2)}function Ie(Re,Ve){return Re=we(Re),c(Re.getUTCFullYear()%100,Ve,2)}function Oe(Re,Ve){return c(Re.getUTCFullYear()%1e4,Ve,4)}function Qe(Re,Ve){var ct=Re.getUTCDay();return Re=ct>=4||ct===0?t.utcThursday(Re):t.utcThursday.ceil(Re),c(Re.getUTCFullYear()%1e4,Ve,4)}function et(){return"+0000"}function _t(){return"%"}function ut(Re){return+Re}function vt(Re){return Math.floor(+Re/1e3)}var Xe;mt({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 mt(Re){return Xe=a(Re),e.timeFormat=Xe.format,e.timeParse=Xe.parse,e.utcFormat=Xe.utcFormat,e.utcParse=Xe.utcParse,Xe}var bt="%Y-%m-%dT%H:%M:%S.%LZ";function Ne(Re){return Re.toISOString()}var Ue=Date.prototype.toISOString?Ne:e.utcFormat(bt);function Ge(Re){var Ve=new Date(Re);return isNaN(Ve)?null:Ve}var je=+new Date("2000-01-01T00:00:00.000Z")?Ge:e.utcParse(bt);e.isoFormat=Ue,e.isoParse=je,e.timeFormatDefaultLocale=mt,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})})});var gN=W((oC,Kse)=>{(function(e,t){typeof oC=="object"&&typeof Kse!="undefined"?t(oC):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(oC,(function(e){"use strict";function t(T){return Math.abs(T=Math.round(T))>=1e21?T.toLocaleString("en").replace(/,/g,""):T.toString(10)}function r(T,A){if((y=(T=A?T.toExponential(A-1):T.toExponential()).indexOf("e"))<0)return null;var y,E=T.slice(0,y);return[E.length>1?E[0]+E.slice(2):E,+T.slice(y+1)]}function i(T){return T=r(Math.abs(T)),T?T[1]:NaN}function n(T,A){return function(y,E){for(var S=y.length,C=[],k=0,D=T[0],F=0;S>0&&D>0&&(F+D+1>E&&(D=Math.max(1,E-F)),C.push(y.substring(S-=D,S+D)),!((F+=D+1)>E));)D=T[k=(k+1)%T.length];return C.reverse().join(A)}}function a(T){return function(A){return A.replace(/[0-9]/g,function(y){return T[+y]})}}var o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s(T){if(!(A=o.exec(T)))throw new Error("invalid format: "+T);var A;return new l({fill:A[1],align:A[2],sign:A[3],symbol:A[4],zero:A[5],width:A[6],comma:A[7],precision:A[8]&&A[8].slice(1),trim:A[9],type:A[10]})}s.prototype=l.prototype;function l(T){this.fill=T.fill===void 0?" ":T.fill+"",this.align=T.align===void 0?">":T.align+"",this.sign=T.sign===void 0?"-":T.sign+"",this.symbol=T.symbol===void 0?"":T.symbol+"",this.zero=!!T.zero,this.width=T.width===void 0?void 0:+T.width,this.comma=!!T.comma,this.precision=T.precision===void 0?void 0:+T.precision,this.trim=!!T.trim,this.type=T.type===void 0?"":T.type+""}l.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function u(T){e:for(var A=T.length,y=1,E=-1,S;y<A;++y)switch(T[y]){case".":E=S=y;break;case"0":E===0&&(E=y),S=y;break;default:if(!+T[y])break e;E>0&&(E=0);break}return E>0?T.slice(0,E)+T.slice(S+1):T}var c;function f(T,A){var y=r(T,A);if(!y)return T+"";var E=y[0],S=y[1],C=S-(c=Math.max(-8,Math.min(8,Math.floor(S/3)))*3)+1,k=E.length;return C===k?E:C>k?E+new Array(C-k+1).join("0"):C>0?E.slice(0,C)+"."+E.slice(C):"0."+new Array(1-C).join("0")+r(T,Math.max(0,A+C-1))[0]}function h(T,A){var y=r(T,A);if(!y)return T+"";var E=y[0],S=y[1];return S<0?"0."+new Array(-S).join("0")+E:E.length>S+1?E.slice(0,S+1)+"."+E.slice(S+1):E+new Array(S-E.length+2).join("0")}var d={"%":function(T,A){return(T*100).toFixed(A)},b:function(T){return Math.round(T).toString(2)},c:function(T){return T+""},d:t,e:function(T,A){return T.toExponential(A)},f:function(T,A){return T.toFixed(A)},g:function(T,A){return T.toPrecision(A)},o:function(T){return Math.round(T).toString(8)},p:function(T,A){return h(T*100,A)},r:h,s:f,X:function(T){return Math.round(T).toString(16).toUpperCase()},x:function(T){return Math.round(T).toString(16)}};function p(T){return T}var v=Array.prototype.map,m=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function g(T){var A=T.grouping===void 0||T.thousands===void 0?p:n(v.call(T.grouping,Number),T.thousands+""),y=T.currency===void 0?"":T.currency[0]+"",E=T.currency===void 0?"":T.currency[1]+"",S=T.decimal===void 0?".":T.decimal+"",C=T.numerals===void 0?p:a(v.call(T.numerals,String)),k=T.percent===void 0?"%":T.percent+"",D=T.minus===void 0?"-":T.minus+"",F=T.nan===void 0?"NaN":T.nan+"";function P(L){L=s(L);var I=L.fill,B=L.align,O=L.sign,$=L.symbol,Y=L.zero,K=L.width,j=L.comma,q=L.precision,J=L.trim,U=L.type;U==="n"?(j=!0,U="g"):d[U]||(q===void 0&&(q=12),J=!0,U="g"),(Y||I==="0"&&B==="=")&&(Y=!0,I="0",B="=");var V=$==="$"?y:$==="#"&&/[boxX]/.test(U)?"0"+U.toLowerCase():"",X=$==="$"?E:/[%p]/.test(U)?k:"",H=d[U],G=/[defgprs%]/.test(U);q=q===void 0?6:/[gprs]/.test(U)?Math.max(1,Math.min(21,q)):Math.max(0,Math.min(20,q));function Q(te){var ce=V,ge=X,Ce,be,he;if(U==="c")ge=H(te)+ge,te="";else{te=+te;var oe=te<0||1/te<0;if(te=isNaN(te)?F:H(Math.abs(te),q),J&&(te=u(te)),oe&&+te==0&&O!=="+"&&(oe=!1),ce=(oe?O==="("?O:D:O==="-"||O==="("?"":O)+ce,ge=(U==="s"?m[8+c/3]:"")+ge+(oe&&O==="("?")":""),G){for(Ce=-1,be=te.length;++Ce<be;)if(he=te.charCodeAt(Ce),48>he||he>57){ge=(he===46?S+te.slice(Ce+1):te.slice(Ce))+ge,te=te.slice(0,Ce);break}}}j&&!Y&&(te=A(te,1/0));var Ee=ce.length+te.length+ge.length,ye=Ee<K?new Array(K-Ee+1).join(I):"";switch(j&&Y&&(te=A(ye+te,ye.length?K-ge.length:1/0),ye=""),B){case"<":te=ce+te+ge+ye;break;case"=":te=ce+ye+te+ge;break;case"^":te=ye.slice(0,Ee=ye.length>>1)+ce+te+ge+ye.slice(Ee);break;default:te=ye+ce+te+ge;break}return C(te)}return Q.toString=function(){return L+""},Q}function R(L,I){var B=P((L=s(L),L.type="f",L)),O=Math.max(-8,Math.min(8,Math.floor(i(I)/3)))*3,$=Math.pow(10,-O),Y=m[8+O/3];return function(K){return B($*K)+Y}}return{format:P,formatPrefix:R}}var w;b({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function b(T){return w=g(T),e.format=w.format,e.formatPrefix=w.formatPrefix,w}function _(T){return Math.max(0,-i(Math.abs(T)))}function M(T,A){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(i(A)/3)))*3-i(Math.abs(T)))}function x(T,A){return T=Math.abs(T),A=Math.abs(A)-T,Math.max(0,i(A)-i(T))+1}e.FormatSpecifier=l,e.formatDefaultLocale=b,e.formatLocale=g,e.formatSpecifier=s,e.precisionFixed=_,e.precisionPrefix=M,e.precisionRound=x,Object.defineProperty(e,"__esModule",{value:!0})}))});var Qse=W((y7r,Jse)=>{"use strict";Jse.exports=function(e){for(var t=e.length,r,i=0;i<t;i++)if(r=e.charCodeAt(i),(r<9||r>13)&&r!==32&&r!==133&&r!==160&&r!==5760&&r!==6158&&(r<8192||r>8205)&&r!==8232&&r!==8233&&r!==8239&&r!==8287&&r!==8288&&r!==12288&&r!==65279)return!1;return!0}});var sn=W((x7r,ele)=>{"use strict";var j1t=Qse();ele.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&j1t(r))return!1}else if(t!=="number")return!1;return e-e<1}});var Kn=W((_7r,tle)=>{"use strict";tle.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}});var mN=W((sC,rle)=>{(function(e,t){typeof sC=="object"&&typeof rle!="undefined"?t(sC):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(sC,(function(e){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),i=0;i<t.length;i++)r[t.charCodeAt(i)]=i;var n=function(o){var s=new Uint8Array(o),l,u=s.length,c="";for(l=0;l<u;l+=3)c+=t[s[l]>>2],c+=t[(s[l]&3)<<4|s[l+1]>>4],c+=t[(s[l+1]&15)<<2|s[l+2]>>6],c+=t[s[l+2]&63];return u%3===2?c=c.substring(0,c.length-1)+"=":u%3===1&&(c=c.substring(0,c.length-2)+"=="),c},a=function(o){var s=o.length*.75,l=o.length,u,c=0,f,h,d,p;o[o.length-1]==="="&&(s--,o[o.length-2]==="="&&s--);var v=new ArrayBuffer(s),m=new Uint8Array(v);for(u=0;u<l;u+=4)f=r[o.charCodeAt(u)],h=r[o.charCodeAt(u+1)],d=r[o.charCodeAt(u+2)],p=r[o.charCodeAt(u+3)],m[c++]=f<<2|h>>4,m[c++]=(h&15)<<4|d>>2,m[c++]=(d&3)<<6|p&63;return v};e.decode=a,e.encode=n,Object.defineProperty(e,"__esModule",{value:!0})}))});var oy=W((b7r,ile)=>{"use strict";ile.exports=function(t){return window&&window.process&&window.process.versions?Object.prototype.toString.call(t)==="[object Object]":Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}});var yc=W(Lp=>{"use strict";var $1t=mN().decode,W1t=oy(),yN=Array.isArray,Y1t=ArrayBuffer,X1t=DataView;function nle(e){return Y1t.isView(e)&&!(e instanceof X1t)}Lp.isTypedArray=nle;function lC(e){return yN(e)||nle(e)}Lp.isArrayOrTypedArray=lC;function Z1t(e){return!lC(e[0])}Lp.isArray1D=Z1t;Lp.ensureArray=function(e,t){return yN(e)||(e=[]),e.length=t,e};var Qu={u1c:typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,i1:typeof Int8Array=="undefined"?void 0:Int8Array,u1:typeof Uint8Array=="undefined"?void 0:Uint8Array,i2:typeof Int16Array=="undefined"?void 0:Int16Array,u2:typeof Uint16Array=="undefined"?void 0:Uint16Array,i4:typeof Int32Array=="undefined"?void 0:Int32Array,u4:typeof Uint32Array=="undefined"?void 0:Uint32Array,f4:typeof Float32Array=="undefined"?void 0:Float32Array,f8:typeof Float64Array=="undefined"?void 0:Float64Array};Qu.uint8c=Qu.u1c;Qu.uint8=Qu.u1;Qu.int8=Qu.i1;Qu.uint16=Qu.u2;Qu.int16=Qu.i2;Qu.uint32=Qu.u4;Qu.int32=Qu.i4;Qu.float32=Qu.f4;Qu.float64=Qu.f8;function xN(e){return e.constructor===ArrayBuffer}Lp.isArrayBuffer=xN;Lp.decodeTypedArraySpec=function(e){var t=[],r=K1t(e),i=r.dtype,n=Qu[i];if(!n)throw new Error('Error in dtype: "'+i+'"');var a=n.BYTES_PER_ELEMENT,o=r.bdata;xN(o)||(o=$1t(o));var s=r.shape===void 0?[o.byteLength/a]:(""+r.shape).split(",");s.reverse();var l=s.length,u,c,f=+s[0],h=a*f,d=0;if(l===1)t=new n(o);else if(l===2)for(u=+s[1],c=0;c<u;c++)t[c]=new n(o,d,f),d+=h;else if(l===3){u=+s[1];for(var p=+s[2],v=0;v<p;v++)for(t[v]=[],c=0;c<u;c++)t[v][c]=new n(o,d,f),d+=h}else throw new Error("ndim: "+l+'is not supported with the shape:"'+r.shape+'"');return t.bdata=r.bdata,t.dtype=r.dtype,t.shape=s.reverse().join(","),e._inputArray=t,t};Lp.isTypedArraySpec=function(e){return W1t(e)&&e.hasOwnProperty("dtype")&&typeof e.dtype=="string"&&e.hasOwnProperty("bdata")&&(typeof e.bdata=="string"||xN(e.bdata))&&(e.shape===void 0||e.hasOwnProperty("shape")&&(typeof e.shape=="string"||typeof e.shape=="number"))};function K1t(e){return{bdata:e.bdata,dtype:e.dtype,shape:e.shape}}Lp.concat=function(){var e=[],t=!0,r=0,i,n,a,o,s,l,u,c;for(a=0;a<arguments.length;a++)o=arguments[a],l=o.length,l&&(n?e.push(o):(n=o,s=l),yN(o)?i=!1:(t=!1,r?i!==o.constructor&&(i=!1):i=o.constructor),r+=l);if(!r)return[];if(!e.length)return n;if(t)return n.concat.apply(n,e);if(i){for(u=new i(r),u.set(n),a=0;a<e.length;a++)o=e[a],u.set(o,s),s+=o.length;return u}for(u=new Array(r),c=0;c<n.length;c++)u[c]=n[c];for(a=0;a<e.length;a++){for(o=e[a],c=0;c<o.length;c++)u[s+c]=o[c];s+=c}return u};Lp.maxRowLength=function(e){return ale(e,Math.max,0)};Lp.minRowLength=function(e){return ale(e,Math.min,1/0)};function ale(e,t,r){if(lC(e))if(lC(e[0])){for(var i=r,n=0;n<e.length;n++)i=t(i,e[n].length);return i}else return e.length;return 0}});var k6=W((T7r,cle)=>{"use strict";var ole=sn(),bN=yc().isArrayOrTypedArray;cle.exports=function(t,r){if(ole(r))r=String(r);else if(typeof r!="string"||r.slice(-4)==="[-1]")throw"bad property string";var i=r.split("."),n,a,o,s;for(s=0;s<i.length;s++)if(String(i[s]).slice(0,2)==="__")throw"bad property string";for(s=0;s<i.length;){if(n=String(i[s]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/),n){if(n[1])i[s]=n[1];else if(s===0)i.splice(0,1);else throw"bad property string";for(a=n[2].slice(1,-1).split("]["),o=0;o<a.length;o++)s++,i.splice(s,0,Number(a[o]))}s++}return typeof t!="object"?tgt(t,r,i):{set:lle(t,i,r),get:sle(t,i),astr:r,parts:i,obj:t}};function sle(e,t){return function(r){var i=e,n,a,o,s,l;for(s=0;s<t.length-1;s++){if(n=t[s],n===-1){for(a=!0,o=[],l=0;l<i.length;l++)o[l]=sle(i[l],t.slice(s+1))(r),o[l]!==o[0]&&(a=!1);return a?o[0]:o}if(typeof n=="number"&&!bN(i)||(i=i[n],typeof i!="object"||i===null))return}if(!(typeof i!="object"||i===null)&&(o=i[t[s]],!(!r&&o===null)))return o}}var J1t=/(^|\.)args\[/;function _N(e,t){return e===void 0||e===null&&!t.match(J1t)}function lle(e,t,r){return function(i){var n=e,a="",o=[[e,a]],s=_N(i,r),l,u;for(u=0;u<t.length-1;u++){if(l=t[u],typeof l=="number"&&!bN(n))throw"array index but container is not an array";if(l===-1){if(s=!egt(n,t.slice(u+1),i,r),s)break;return}if(!ule(n,l,t[u+1],s))break;if(n=n[l],typeof n!="object"||n===null)throw"container is not an object";a=Q1t(a,l),o.push([n,a])}if(s){if(u===t.length-1&&(delete n[t[u]],Array.isArray(n)&&+t[u]===n.length-1))for(;n.length&&n[n.length-1]===void 0;)n.pop()}else n[t[u]]=i}}function Q1t(e,t){var r=t;return ole(t)?r="["+t+"]":e&&(r="."+t),e+r}function egt(e,t,r,i){var n=bN(r),a=!0,o=r,s=i.replace("-1",0),l=n?!1:_N(r,s),u=t[0],c;for(c=0;c<e.length;c++)s=i.replace("-1",c),n&&(o=r[c%r.length],l=_N(o,s)),l&&(a=!1),ule(e,c,u,l)&&lle(e[c],t,i.replace("-1",c))(o);return a}function ule(e,t,r,i){if(e[t]===void 0){if(i)return!1;typeof r=="number"?e[t]=[]:e[t]={}}return!0}function tgt(e,t,r){return{set:function(){throw"bad container"},get:function(){},astr:t,parts:r,obj:e}}});var ple=W((A7r,dle)=>{"use strict";var B3=k6(),rgt=/^\w*$/,igt=0,fle=1,uC=2,hle=3,Sx=4;dle.exports=function(t,r,i,n){i=i||"name",n=n||"value";var a,o,s,l={};r&&r.length?(s=B3(t,r),o=s.get()):o=t,r=r||"";var u={};if(o)for(a=0;a<o.length;a++)u[o[a][i]]=a;var c=rgt.test(n),f={set:function(h,d){var p=d===null?Sx:igt;if(!o){if(!s||p===Sx)return;o=[],s.set(o)}var v=u[h];if(v===void 0){if(p===Sx)return;p=p|hle,v=o.length,u[h]=v}else d!==(c?o[v][n]:B3(o[v],n).get())&&(p=p|uC);var m=o[v]=o[v]||{};return m[i]=h,c?m[n]=d:B3(m,n).set(d),d!==null&&(p=p&~Sx),l[v]=l[v]|p,f},get:function(h){if(o){var d=u[h];if(d!==void 0)return c?o[d][n]:B3(o[d],n).get()}},rename:function(h,d){var p=u[h];return p===void 0||(l[p]=l[p]|fle,u[d]=p,delete u[h],o[p][i]=d),f},remove:function(h){var d=u[h];if(d===void 0)return f;var p=o[d];if(Object.keys(p).length>2)return l[d]=l[d]|uC,f.set(h,null);if(c){for(a=d;a<o.length;a++)l[a]=l[a]|hle;for(a=d;a<o.length;a++)u[o[a][i]]--;o.splice(d,1),delete u[h]}else B3(p,n).set(null),l[d]=l[d]|uC|Sx;return f},constructUpdate:function(){for(var h,d,p={},v=Object.keys(l),m=0;m<v.length;m++)d=v[m],h=r+"["+d+"]",o[d]?(l[d]&fle&&(p[h+"."+i]=o[d][i]),l[d]&uC&&(c?p[h+"."+n]=l[d]&Sx?null:o[d][n]:p[h+"."+n]=l[d]&Sx?null:B3(o[d],n).get())):p[h]=null;return p}};return f}});var gle=W((M7r,vle)=>{"use strict";var ngt=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,agt=/^[^\.\[\]]+$/;vle.exports=function(e,t){for(;t;){var r=e.match(ngt);if(r)e=r[1];else if(e.match(agt))e="";else throw new Error("bad relativeAttr call:"+[e,t]);if(t.charAt(0)==="^")t=t.slice(1);else break}return e&&t.charAt(0)!=="["?e+"."+t:e+t}});var cC=W((S7r,mle)=>{"use strict";var ogt=sn();mle.exports=function(t,r){if(t>0)return Math.log(t)/Math.LN10;var i=Math.log(Math.min(r[0],r[1]))/Math.LN10;return ogt(i)||(i=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),i}});var _le=W((E7r,xle)=>{"use strict";var yle=yc().isArrayOrTypedArray,C6=oy();xle.exports=function e(t,r){for(var i in r){var n=r[i],a=t[i];if(a!==n)if(i.charAt(0)==="_"||typeof n=="function"){if(i in t)continue;t[i]=n}else if(yle(n)&&yle(a)&&C6(n[0])){if(i==="customdata"||i==="ids")continue;for(var o=Math.min(n.length,a.length),s=0;s<o;s++)a[s]!==n[s]&&C6(n[s])&&C6(a[s])&&e(a[s],n[s])}else C6(n)&&C6(a)&&(e(a,n),Object.keys(a).length||delete t[i])}}});var q3={};Fp(q3,{mod:()=>sgt,modHalf:()=>lgt});function sgt(e,t){let r=e%t;return r<0?r+t:r}function lgt(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}var O3=Ea(()=>{"use strict"});var tn=W(L6=>{"use strict";var ble=oy(),D6=Array.isArray;function ugt(e,t){var r,i;for(r=0;r<e.length;r++){if(i=e[r],i!==null&&typeof i=="object")return!1;i!==void 0&&(t[r]=i)}return!0}L6.extendFlat=function(...e){return F6(e,!1,!1,!1)};L6.extendDeep=function(...e){return F6(e,!0,!1,!1)};L6.extendDeepAll=function(...e){return F6(e,!0,!0,!1)};L6.extendDeepNoArrays=function(...e){return F6(e,!0,!1,!0)};function F6(e,t,r,i){var n=e[0],a=e.length,o,s,l,u,c,f,h;if(a===2&&D6(n)&&D6(e[1])&&n.length===0){if(h=ugt(e[1],n),h)return n;n.splice(0,n.length)}for(var d=1;d<a;d++){o=e[d];for(s in o)l=n[s],u=o[s],i&&D6(u)?n[s]=u:t&&u&&(ble(u)||(c=D6(u)))?(c?(c=!1,f=l&&D6(l)?l:[]):f=l&&ble(l)?l:{},n[s]=F6([f,u],t,r,i)):(typeof u!="undefined"||r)&&(n[s]=u)}return n}});var Ho=W((C7r,wle)=>{"use strict";wle.exports=function(e){var t=e.variantValues,r=e.editType,i=e.colorEditType;i===void 0&&(i=r);var n={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(n.valType="enumerated",n.values=n.extras,n.extras=void 0,n.min=void 0,n.max=void 0);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:i},weight:n,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:r};return e.autoSize&&(a.size.dflt="auto"),e.autoColor&&(a.color.dflt="auto"),e.arrayOk&&(a.family.arrayOk=!0,a.weight.arrayOk=!0,a.style.arrayOk=!0,e.noFontVariant||(a.variant.arrayOk=!0),e.noFontTextcase||(a.textcase.arrayOk=!0),e.noFontLineposition||(a.lineposition.arrayOk=!0),e.noFontShadow||(a.shadow.arrayOk=!0),a.size.arrayOk=!0,a.color.arrayOk=!0),a}});var P6=W((D7r,Tle)=>{"use strict";Tle.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var sy=W((F7r,Sle)=>{"use strict";var Ale=P6(),Mle=Ho(),wN=Mle({editType:"none"});wN.family.dflt=Ale.HOVERFONT;wN.size.dflt=Ale.HOVERFONTSIZE;Sle.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversort:{valType:"enumerated",values:["trace","value descending","value ascending"],dflt:"trace",editType:"none"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoveranywhere:{valType:"boolean",dflt:!1,editType:"none"},clickanywhere:{valType:"boolean",dflt:!1,editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:wN,grouptitlefont:Mle({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var N3=W((L7r,Ele)=>{"use strict";var cgt=Ho(),I6=sy().hoverlabel,R6=tn().extendFlat;Ele.exports={hoverlabel:{bgcolor:R6({},I6.bgcolor,{arrayOk:!0}),bordercolor:R6({},I6.bordercolor,{arrayOk:!0}),font:cgt({arrayOk:!0,editType:"none"}),align:R6({},I6.align,{arrayOk:!0}),namelength:R6({},I6.namelength,{arrayOk:!0}),showarrow:R6({},I6.showarrow),editType:"none"}}});var Wa=W((P7r,kle)=>{"use strict";var fgt=Ho(),hgt=N3();kle.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:fgt({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:hgt.hoverlabel,uirevision:{valType:"any",editType:"none"}}});var _ce=W((N7r,xce)=>{var pU=Object.defineProperty,dgt=Object.getOwnPropertyDescriptor,pgt=Object.getOwnPropertyNames,vgt=Object.prototype.hasOwnProperty,ggt=(e,t)=>{for(var r in t)pU(e,r,{get:t[r],enumerable:!0})},mgt=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of pgt(t))!vgt.call(e,n)&&n!==r&&pU(e,n,{get:()=>t[n],enumerable:!(i=dgt(t,n))||i.enumerable});return e},ygt=e=>mgt(pU({},"__esModule",{value:!0}),e),qle={};ggt(qle,{a98:()=>uxt,average:()=>pmt,averageAngle:()=>Jv,averageNumber:()=>tue,blend:()=>d2t,blerp:()=>YN,clampChroma:()=>P2t,clampGamut:()=>UU,clampRgb:()=>L2t,colorsNamed:()=>Nle,convertA98ToXyz65:()=>XN,convertCubehelixToRgb:()=>Qle,convertDlchToLab65:()=>xC,convertHsiToRgb:()=>uue,convertHslToRgb:()=>hue,convertHsvToRgb:()=>_U,convertHwbToRgb:()=>gue,convertItpToXyz65:()=>KN,convertJabToJch:()=>QN,convertJabToRgb:()=>SU,convertJabToXyz65:()=>AU,convertJchToJab:()=>eU,convertLab65ToDlch:()=>_C,convertLab65ToRgb:()=>G6,convertLab65ToXyz65:()=>mU,convertLabToLch:()=>Mg,convertLabToRgb:()=>kU,convertLabToXyz50:()=>DC,convertLchToLab:()=>Sg,convertLchuvToLuv:()=>FU,convertLrgbToOklab:()=>LU,convertLrgbToRgb:()=>Px,convertLuvToLchuv:()=>DU,convertLuvToXyz50:()=>wC,convertOkhslToOklab:()=>iU,convertOkhsvToOklab:()=>aU,convertOklabToLrgb:()=>Y3,convertOklabToOkhsl:()=>rU,convertOklabToOkhsv:()=>nU,convertOklabToRgb:()=>$6,convertP3ToXyz65:()=>oU,convertProphotoToXyz50:()=>uU,convertRec2020ToXyz65:()=>fU,convertRgbToCubehelix:()=>Jle,convertRgbToHsi:()=>cue,convertRgbToHsl:()=>due,convertRgbToHsv:()=>bU,convertRgbToHwb:()=>mue,convertRgbToJab:()=>MU,convertRgbToLab:()=>CU,convertRgbToLab65:()=>H6,convertRgbToLrgb:()=>Lx,convertRgbToOklab:()=>j6,convertRgbToXyb:()=>jue,convertRgbToXyz50:()=>W3,convertRgbToXyz65:()=>ly,convertRgbToYiq:()=>Jue,convertXybToRgb:()=>$ue,convertXyz50ToLab:()=>FC,convertXyz50ToLuv:()=>bC,convertXyz50ToProphoto:()=>lU,convertXyz50ToRgb:()=>$3,convertXyz50ToXyz65:()=>Zue,convertXyz65ToA98:()=>ZN,convertXyz65ToItp:()=>JN,convertXyz65ToJab:()=>TU,convertXyz65ToLab65:()=>yU,convertXyz65ToP3:()=>sU,convertXyz65ToRec2020:()=>cU,convertXyz65ToRgb:()=>uy,convertXyz65ToXyz50:()=>Xue,convertYiqToRgb:()=>Que,converter:()=>ys,cubehelix:()=>cxt,differenceCie76:()=>smt,differenceCie94:()=>lmt,differenceCiede2000:()=>umt,differenceCmc:()=>cmt,differenceEuclidean:()=>j3,differenceHueChroma:()=>V6,differenceHueNaive:()=>eue,differenceHueSaturation:()=>U6,differenceHyab:()=>fmt,differenceItp:()=>dmt,differenceKotsarenkoRamos:()=>hmt,displayable:()=>NU,dlab:()=>fxt,dlch:()=>hxt,easingGamma:()=>pce,easingInOutSine:()=>sxt,easingMidpoint:()=>sce,easingSmootherstep:()=>axt,easingSmoothstep:()=>rxt,easingSmoothstepInverse:()=>ixt,filterBrightness:()=>V2t,filterContrast:()=>G2t,filterDeficiencyDeuter:()=>ext,filterDeficiencyProt:()=>Q2t,filterDeficiencyTrit:()=>txt,filterGrayscale:()=>$2t,filterHueRotate:()=>Y2t,filterInvert:()=>W2t,filterSaturate:()=>j2t,filterSepia:()=>H2t,fixupAlpha:()=>Cu,fixupHueDecreasing:()=>rmt,fixupHueIncreasing:()=>tmt,fixupHueLonger:()=>emt,fixupHueShorter:()=>Kv,formatCss:()=>o2t,formatHex:()=>s2t,formatHex8:()=>l2t,formatHsl:()=>c2t,formatRgb:()=>u2t,getMode:()=>yf,hsi:()=>dxt,hsl:()=>pxt,hsv:()=>vxt,hwb:()=>gxt,inGamut:()=>IC,interpolate:()=>w2t,interpolateWith:()=>uce,interpolateWithPremultipliedAlpha:()=>T2t,interpolatorLinear:()=>Ni,interpolatorPiecewise:()=>Zle,interpolatorSplineBasis:()=>fce,interpolatorSplineBasisClosed:()=>hce,interpolatorSplineMonotone:()=>S2t,interpolatorSplineMonotone2:()=>E2t,interpolatorSplineMonotoneClosed:()=>k2t,interpolatorSplineNatural:()=>A2t,interpolatorSplineNaturalClosed:()=>M2t,itp:()=>mxt,jab:()=>yxt,jch:()=>xxt,lab:()=>_xt,lab65:()=>bxt,lch:()=>wxt,lch65:()=>Txt,lchuv:()=>Axt,lerp:()=>kx,lrgb:()=>Mxt,luv:()=>Sxt,mapAlphaDivide:()=>oce,mapAlphaMultiply:()=>ace,mapTransferGamma:()=>y2t,mapTransferLinear:()=>BU,mapper:()=>W6,modeA98:()=>Kle,modeCubehelix:()=>rue,modeDlab:()=>sue,modeDlch:()=>lue,modeHsi:()=>fue,modeHsl:()=>xU,modeHsv:()=>wU,modeHwb:()=>xue,modeItp:()=>wue,modeJab:()=>Tue,modeJch:()=>Aue,modeLab:()=>LC,modeLab65:()=>Sue,modeLch:()=>PC,modeLch65:()=>kue,modeLchuv:()=>Fue,modeLrgb:()=>Lue,modeLuv:()=>Pue,modeOkhsl:()=>Rue,modeOkhsv:()=>zue,modeOklab:()=>que,modeOklch:()=>Nue,modeP3:()=>Uue,modeProphoto:()=>Vue,modeRec2020:()=>Gue,modeRgb:()=>Fx,modeXyb:()=>Wue,modeXyz50:()=>Yue,modeXyz65:()=>Kue,modeYiq:()=>ece,nearest:()=>z2t,okhsl:()=>Ext,okhsv:()=>kxt,oklab:()=>Cxt,oklch:()=>Dxt,p3:()=>Fxt,parse:()=>Wle,parseHex:()=>Vle,parseHsl:()=>vue,parseHslLegacy:()=>pue,parseHwb:()=>yue,parseLab:()=>Mue,parseLch:()=>Eue,parseNamed:()=>Ule,parseOklab:()=>Bue,parseOklch:()=>Oue,parseRgb:()=>Yle,parseRgbLegacy:()=>Gle,parseTransparent:()=>Xle,prophoto:()=>Lxt,random:()=>m2t,rec2020:()=>Pxt,removeParser:()=>Lgt,rgb:()=>Ixt,round:()=>tce,samples:()=>F2t,serializeHex:()=>zU,serializeHex8:()=>rce,serializeHsl:()=>nce,serializeRgb:()=>ice,toGamut:()=>I2t,trilerp:()=>Ggt,unlerp:()=>Vgt,useMode:()=>jo,useParser:()=>jle,wcagContrast:()=>lxt,wcagLuminance:()=>dU,xyb:()=>Rxt,xyz50:()=>zxt,xyz65:()=>Bxt,yiq:()=>qxt});xce.exports=ygt(qle);var xgt=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},Ole=xgt,_gt={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},Nle=_gt,bgt=e=>Ole(Nle[e.toLowerCase()],6),Ule=bgt,wgt=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,Tgt=e=>{let t;return(t=e.match(wgt))?Ole(parseInt(t[1],16),t[1].length):void 0},Vle=Tgt,Lh="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",I7r=`(?:${Lh}|none)`,q6=`${Lh}%`,R7r=`(?:${Lh}%|none)`,vU=`(?:${Lh}%|${Lh})`,Agt=`(?:${Lh}%|${Lh}|none)`,Mgt=`(?:${Lh}(deg|grad|rad|turn)|${Lh})`,z7r=`(?:${Lh}(deg|grad|rad|turn)|${Lh}|none)`,G3="\\s*,\\s*",B7r=new RegExp("^"+Agt+"$"),Sgt=new RegExp(`^rgba?\\(\\s*${Lh}${G3}${Lh}${G3}${Lh}\\s*(?:,\\s*${vU}\\s*)?\\)$`),Egt=new RegExp(`^rgba?\\(\\s*${q6}${G3}${q6}${G3}${q6}\\s*(?:,\\s*${vU}\\s*)?\\)$`),kgt=e=>{let t={mode:"rgb"},r;if(r=e.match(Sgt))r[1]!==void 0&&(t.r=r[1]/255),r[2]!==void 0&&(t.g=r[2]/255),r[3]!==void 0&&(t.b=r[3]/255);else if(r=e.match(Egt))r[1]!==void 0&&(t.r=r[1]/100),r[2]!==void 0&&(t.g=r[2]/100),r[3]!==void 0&&(t.b=r[3]/100);else return;return r[4]!==void 0?t.alpha=Math.max(0,Math.min(1,r[4]/100)):r[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+r[5]))),t},Gle=kgt,Cgt=(e,t)=>e===void 0?void 0:typeof e!="object"?Wle(e):e.mode!==void 0?e:t?ma(fn({},e),{mode:t}):void 0,Pp=Cgt,Dgt=(e="rgb")=>t=>(t=Pp(t,e))!==void 0?t.mode===e?t:Zv[t.mode][e]?Zv[t.mode][e](t):e==="rgb"?Zv[t.mode].rgb(t):Zv.rgb[e](Zv[t.mode].rgb(t)):void 0,ys=Dgt,Zv={},Hle={},H3=[],gU={},Fgt=e=>e,jo=e=>(Zv[e.mode]=fn(fn({},Zv[e.mode]),e.toMode),Object.keys(e.fromMode||{}).forEach(t=>{Zv[t]||(Zv[t]={}),Zv[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=Fgt)}),Hle[e.mode]=e,(e.parse||[]).forEach(t=>{jle(t,e.mode)}),ys(e.mode)),yf=e=>Hle[e],jle=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");gU[e]=t}else typeof e=="function"&&H3.indexOf(e)<0&&H3.push(e)},Lgt=e=>{if(typeof e=="string")delete gU[e];else if(typeof e=="function"){let t=H3.indexOf(e);t>0&&H3.splice(t,1)}},$N=/[^\x00-\x7F]|[a-zA-Z_]/,Pgt=/[^\x00-\x7F]|[-\w]/,bi={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},ia=0;function fC(e){let t=e[ia],r=e[ia+1];return t==="-"||t==="+"?/\d/.test(r)||r==="."&&/\d/.test(e[ia+2]):t==="."?/\d/.test(r):/\d/.test(t)}function WN(e){if(ia>=e.length)return!1;let t=e[ia];if($N.test(t))return!0;if(t==="-"){if(e.length-ia<2)return!1;let r=e[ia+1];return!!(r==="-"||$N.test(r))}return!1}var Igt={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function z6(e){let t="";if((e[ia]==="-"||e[ia]==="+")&&(t+=e[ia++]),t+=hC(e),e[ia]==="."&&/\d/.test(e[ia+1])&&(t+=e[ia++]+hC(e)),(e[ia]==="e"||e[ia]==="E")&&((e[ia+1]==="-"||e[ia+1]==="+")&&/\d/.test(e[ia+2])?t+=e[ia++]+e[ia++]+hC(e):/\d/.test(e[ia+1])&&(t+=e[ia++]+hC(e))),WN(e)){let r=vC(e);return r==="deg"||r==="rad"||r==="turn"||r==="grad"?{type:bi.Hue,value:t*Igt[r]}:void 0}return e[ia]==="%"?(ia++,{type:bi.Percentage,value:+t}):{type:bi.Number,value:+t}}function hC(e){let t="";for(;/\d/.test(e[ia]);)t+=e[ia++];return t}function vC(e){let t="";for(;ia<e.length&&Pgt.test(e[ia]);)t+=e[ia++];return t}function Rgt(e){let t=vC(e);return e[ia]==="("?(ia++,{type:bi.Function,value:t}):t==="none"?{type:bi.None,value:void 0}:{type:bi.Ident,value:t}}function zgt(e=""){let t=e.trim(),r=[],i;for(ia=0;ia<t.length;){if(i=t[ia++],i===`
`||i===" "||i===" "){for(;ia<t.length&&(t[ia]===`
`||t[ia]===" "||t[ia]===" ");)ia++;continue}if(i===",")return;if(i===")"){r.push({type:bi.ParenClose});continue}if(i==="+"){if(ia--,fC(t)){r.push(z6(t));continue}return}if(i==="-"){if(ia--,fC(t)){r.push(z6(t));continue}if(WN(t)){r.push({type:bi.Ident,value:vC(t)});continue}return}if(i==="."){if(ia--,fC(t)){r.push(z6(t));continue}return}if(i==="/"){for(;ia<t.length&&(t[ia]===`
`||t[ia]===" "||t[ia]===" ");)ia++;let n;if(fC(t)&&(n=z6(t),n.type!==bi.Hue)){r.push({type:bi.Alpha,value:n});continue}if(WN(t)&&vC(t)==="none"){r.push({type:bi.Alpha,value:{type:bi.None,value:void 0}});continue}return}if(/\d/.test(i)){ia--,r.push(z6(t));continue}if($N.test(i)){ia--,r.push(Rgt(t));continue}return}return r}function Bgt(e){e._i=0;let t=e[e._i++];if(!t||t.type!==bi.Function||t.value!=="color"||(t=e[e._i++],t.type!==bi.Ident))return;let r=gU[t.value];if(!r)return;let i={mode:r},n=$le(e,!1);if(!n)return;let a=yf(r).channels;for(let o=0,s,l;o<a.length;o++)s=n[o],l=a[o],s.type!==bi.None&&(i[l]=s.type===bi.Number?s.value:s.value/100,l==="alpha"&&(i[l]=Math.max(0,Math.min(1,i[l]))));return i}function $le(e,t){let r=[],i;for(;e._i<e.length;){if(i=e[e._i++],i.type===bi.None||i.type===bi.Number||i.type===bi.Alpha||i.type===bi.Percentage||t&&i.type===bi.Hue){r.push(i);continue}if(i.type===bi.ParenClose){if(e._i<e.length)return;continue}return}if(!(r.length<3||r.length>4)){if(r.length===4){if(r[3].type!==bi.Alpha)return;r[3]=r[3].value}return r.length===3&&r.push({type:bi.None,value:void 0}),r.every(n=>n.type!==bi.Alpha)?r:void 0}}function qgt(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==bi.Function)return;let i=$le(e,t);if(i)return i.unshift(r.value),i}var Ogt=e=>{if(typeof e!="string")return;let t=zgt(e),r=t?qgt(t,!0):void 0,i,n=0,a=H3.length;for(;n<a;)if((i=H3[n++](e,r))!==void 0)return i;return t?Bgt(t):void 0},Wle=Ogt;function Ngt(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let r={mode:"rgb"},[,i,n,a,o]=t;if(!(i.type===bi.Hue||n.type===bi.Hue||a.type===bi.Hue))return i.type!==bi.None&&(r.r=i.type===bi.Number?i.value/255:i.value/100),n.type!==bi.None&&(r.g=n.type===bi.Number?n.value/255:n.value/100),a.type!==bi.None&&(r.b=a.type===bi.Number?a.value/255:a.value/100),o.type!==bi.None&&(r.alpha=Math.min(1,Math.max(0,o.type===bi.Number?o.value:o.value/100))),r}var Yle=Ngt,Ugt=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Xle=Ugt,kx=(e,t,r)=>e+r*(t-e),Vgt=(e,t,r)=>(r-e)/(t-e),YN=(e,t,r,i,n,a)=>kx(kx(e,t,n),kx(r,i,n),a),Ggt=(e,t,r,i,n,a,o,s,l,u,c)=>kx(YN(e,t,r,i,l,u),YN(n,a,o,s,l,u),c),Hgt=e=>{let t=[];for(let r=0;r<e.length-1;r++){let i=e[r],n=e[r+1];i===void 0&&n===void 0?t.push(void 0):i!==void 0&&n!==void 0?t.push([i,n]):t.push(i!==void 0?[i,i]:[n,n])}return t},Zle=e=>t=>{let r=Hgt(t);return i=>{let n=i*r.length,a=i>=1?r.length-1:Math.max(Math.floor(n),0),o=r[a];return o===void 0?void 0:e(o[0],o[1],n-a)}},Ni=Zle(kx),Cu=e=>{let t=!1,r=e.map(i=>i!==void 0?(t=!0,i):1);return t?r:e},jgt={mode:"rgb",channels:["r","g","b","alpha"],parse:[Yle,Vle,Gle,Ule,Xle,"srgb"],serialize:"srgb",interpolate:{r:Ni,g:Ni,b:Ni,alpha:{use:Ni,fixup:Cu}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Fx=jgt,TN=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),$gt=e=>{let t=TN(e.r),r=TN(e.g),i=TN(e.b),n={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*i,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*i,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*i};return e.alpha!==void 0&&(n.alpha=e.alpha),n},XN=$gt,AN=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),Wgt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"a98",r:AN(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*r),g:AN(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*r),b:AN(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*r)};return i!==void 0&&(n.alpha=i),n},ZN=Wgt,MN=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},Ygt=({r:e,g:t,b:r,alpha:i})=>{let n={mode:"lrgb",r:MN(e),g:MN(t),b:MN(r)};return i!==void 0&&(n.alpha=i),n},Lx=Ygt,Xgt=e=>{let{r:t,g:r,b:i,alpha:n}=Lx(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*i,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*i,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*i};return n!==void 0&&(a.alpha=n),a},ly=Xgt,SN=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):e*12.92},Zgt=({r:e,g:t,b:r,alpha:i},n="rgb")=>{let a={mode:n,r:SN(e),g:SN(t),b:SN(r)};return i!==void 0&&(a.alpha=i),a},Px=Zgt,Kgt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Px({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*r,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*r,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*r});return i!==void 0&&(n.alpha=i),n},uy=Kgt,Jgt=ma(fn({},Fx),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>ZN(ly(e)),xyz65:ZN},toMode:{rgb:e=>uy(XN(e)),xyz65:XN}}),Kle=Jgt,Qgt=e=>(e=e%360)<0?e+360:e,Yc=Qgt,AC=(e,t)=>e.map((r,i,n)=>{if(r===void 0)return r;let a=Yc(r);return i===0||e[i-1]===void 0?a:t(a-Yc(n[i-1]))}).reduce((r,i)=>!r.length||i===void 0||r[r.length-1]===void 0?(r.push(i),r):(r.push(i+r[r.length-1]),r),[]),Kv=e=>AC(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),emt=e=>AC(e,t=>Math.abs(t)>=180||t===0?t:t-360*Math.sign(t)),tmt=e=>AC(e,t=>t>=0?t:t+360),rmt=e=>AC(e,t=>t<=0?t:t-360),xc=[-.14861,1.78277,-.29227,-.90649,1.97294,0],imt=Math.PI/180,nmt=180/Math.PI,Cle=xc[3]*xc[4],Dle=xc[1]*xc[4],Fle=xc[1]*xc[2]-xc[0]*xc[3],amt=({r:e,g:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(Fle*r+e*Cle-t*Dle)/(Fle+Cle-Dle),a=r-n,o=(xc[4]*(t-n)-xc[2]*a)/xc[3],s={mode:"cubehelix",l:n,s:n===0||n===1?void 0:Math.sqrt(a*a+o*o)/(xc[4]*n*(1-n))};return s.s&&(s.h=Math.atan2(o,a)*nmt-120),i!==void 0&&(s.alpha=i),s},Jle=amt,omt=({h:e,s:t,l:r,alpha:i})=>{let n={mode:"rgb"};e=(e===void 0?0:e+120)*imt,r===void 0&&(r=0);let a=t===void 0?0:t*r*(1-r),o=Math.cos(e),s=Math.sin(e);return n.r=r+a*(xc[0]*o+xc[1]*s),n.g=r+a*(xc[2]*o+xc[3]*s),n.b=r+a*(xc[4]*o+xc[5]*s),i!==void 0&&(n.alpha=i),n},Qle=omt,U6=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let r=Yc(e.h),i=Yc(t.h),n=Math.sin((i-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*n},eue=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let r=Yc(e.h),i=Yc(t.h);return Math.abs(i-r)>180?r-(i-360*Math.sign(i-r)):i-r},V6=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let r=Yc(e.h),i=Yc(t.h),n=Math.sin((i-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*n},j3=(e="rgb",t=[1,1,1,0])=>{let r=yf(e),i=r.channels,n=r.difference,a=ys(e);return(o,s)=>{let l=a(o),u=a(s);return Math.sqrt(i.reduce((c,f,h)=>{let d=n[f]?n[f](l,u):l[f]-u[f];return c+(t[h]||0)*Math.pow(isNaN(d)?0:d,2)},0))}},smt=()=>j3("lab65"),lmt=(e=1,t=.045,r=.015)=>{let i=ys("lab65");return(n,a)=>{let o=i(n),s=i(a),l=o.l,u=o.a,c=o.b,f=Math.sqrt(u*u+c*c),h=s.l,d=s.a,p=s.b,v=Math.sqrt(d*d+p*p),m=Math.pow(l-h,2),g=Math.pow(f-v,2),w=Math.pow(u-d,2)+Math.pow(c-p,2)-g;return Math.sqrt(m/Math.pow(e,2)+g/Math.pow(1+t*f,2)+w/Math.pow(1+r*f,2))}},umt=(e=1,t=1,r=1)=>{let i=ys("lab65");return(n,a)=>{let o=i(n),s=i(a),l=o.l,u=o.a,c=o.b,f=Math.sqrt(u*u+c*c),h=s.l,d=s.a,p=s.b,v=Math.sqrt(d*d+p*p),m=(f+v)/2,g=.5*(1-Math.sqrt(Math.pow(m,7)/(Math.pow(m,7)+Math.pow(25,7)))),w=u*(1+g),b=d*(1+g),_=Math.sqrt(w*w+c*c),M=Math.sqrt(b*b+p*p),x=Math.abs(w)+Math.abs(c)===0?0:Math.atan2(c,w);x+=(x<0)*2*Math.PI;let T=Math.abs(b)+Math.abs(p)===0?0:Math.atan2(p,b);T+=(T<0)*2*Math.PI;let A=h-l,y=M-_,E=_*M===0?0:T-x;E-=(E>Math.PI)*2*Math.PI,E+=(E<-Math.PI)*2*Math.PI;let S=2*Math.sqrt(_*M)*Math.sin(E/2),C=(l+h)/2,k=(_+M)/2,D;_*M===0?D=x+T:(D=(x+T)/2,D-=(Math.abs(x-T)>Math.PI)*Math.PI,D+=(D<0)*2*Math.PI);let F=Math.pow(C-50,2),P=1-.17*Math.cos(D-Math.PI/6)+.24*Math.cos(2*D)+.32*Math.cos(3*D+Math.PI/30)-.2*Math.cos(4*D-63*Math.PI/180),R=1+.015*F/Math.sqrt(20+F),L=1+.045*k,I=1+.015*k*P,B=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*D-275)/25,2)),O=2*Math.sqrt(Math.pow(k,7)/(Math.pow(k,7)+Math.pow(25,7))),$=-1*Math.sin(2*B)*O;return Math.sqrt(Math.pow(A/(e*R),2)+Math.pow(y/(t*L),2)+Math.pow(S/(r*I),2)+$*y/(t*L)*S/(r*I))}},cmt=(e=1,t=1)=>{let r=ys("lab65");return(i,n)=>{let a=r(i),o=a.l,s=a.a,l=a.b,u=Math.sqrt(s*s+l*l),c=Math.atan2(l,s);c=c+2*Math.PI*(c<0);let f=r(n),h=f.l,d=f.a,p=f.b,v=Math.sqrt(d*d+p*p),m=Math.pow(o-h,2),g=Math.pow(u-v,2),w=Math.pow(s-d,2)+Math.pow(l-p,2)-g,b=Math.sqrt(Math.pow(u,4)/(Math.pow(u,4)+1900)),_=c>=164/180*Math.PI&&c<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(c+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(c+35/180*Math.PI)),M=o<16?.511:.040975*o/(1+.01765*o),x=.0638*u/(1+.0131*u)+.638,T=x*(b*_+1-b);return Math.sqrt(m/Math.pow(e*M,2)+g/Math.pow(t*x,2)+w/Math.pow(T,2))}},fmt=()=>{let e=ys("lab65");return(t,r)=>{let i=e(t),n=e(r),a=i.l-n.l,o=i.a-n.a,s=i.b-n.b;return Math.abs(a)+Math.sqrt(o*o+s*s)}},hmt=()=>j3("yiq",[.5053,.299,.1957]),dmt=()=>j3("itp",[518400,129600,518400]),Jv=e=>{let t=e.reduce((i,n)=>{if(n!==void 0){let a=n*Math.PI/180;i.sin+=Math.sin(a),i.cos+=Math.cos(a)}return i},{sin:0,cos:0}),r=Math.atan2(t.sin,t.cos)*180/Math.PI;return r<0?360+r:r},tue=e=>{let t=e.filter(r=>r!==void 0);return t.length?t.reduce((r,i)=>r+i,0)/t.length:void 0},EN=e=>typeof e=="function";function pmt(e,t="rgb",r){let i=yf(t),n=e.map(ys(t));return i.channels.reduce((a,o)=>{let s=n.map(l=>l[o]).filter(l=>l!==void 0);if(s.length){let l;EN(r)?l=r:r&&EN(r[o])?l=r[o]:i.average&&EN(i.average[o])?l=i.average[o]:l=tue,a[o]=l(s,o)}return a},{mode:t})}var vmt={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Jle},toMode:{rgb:Qle},interpolate:{h:{use:Ni,fixup:Kv},s:Ni,l:Ni,alpha:{use:Ni,fixup:Cu}},difference:{h:U6},average:{h:Jv}},rue=vmt,gmt=({l:e,a:t,b:r,alpha:i},n="lch")=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),o={mode:n,l:e,c:a};return a&&(o.h=Yc(Math.atan2(r,t)*180/Math.PI)),i!==void 0&&(o.alpha=i),o},Mg=gmt,mmt=({l:e,c:t,h:r,alpha:i},n="lab")=>{r===void 0&&(r=0);let a={mode:n,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return i!==void 0&&(a.alpha=i),a},Sg=mmt,iue=Math.pow(29,3)/Math.pow(3,3),nue=Math.pow(6,3)/Math.pow(29,3),ku={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},V3={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},q7r=Math.pow(29,3)/Math.pow(3,3),O7r=Math.pow(6,3)/Math.pow(29,3),kN=e=>Math.pow(e,3)>nue?Math.pow(e,3):(116*e-16)/iue,ymt=({l:e,a:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(e+16)/116,a=t/500+n,o=n-r/200,s={mode:"xyz65",x:kN(a)*V3.X,y:kN(n)*V3.Y,z:kN(o)*V3.Z};return i!==void 0&&(s.alpha=i),s},mU=ymt,xmt=e=>uy(mU(e)),G6=xmt,CN=e=>e>nue?Math.cbrt(e):(iue*e+16)/116,_mt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=CN(e/V3.X),a=CN(t/V3.Y),o=CN(r/V3.Z),s={mode:"lab65",l:116*a-16,a:500*(n-a),b:200*(a-o)};return i!==void 0&&(s.alpha=i),s},yU=_mt,bmt=e=>{let t=yU(ly(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},H6=bmt,gC=1,aue=1,N6=26/180*Math.PI,mC=Math.cos(N6),yC=Math.sin(N6),oue=100/Math.log(139/100),wmt=({l:e,c:t,h:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"lab65",l:(Math.exp(e*gC/oue)-1)/.0039},a=(Math.exp(.0435*t*aue*gC)-1)/.075,o=a*Math.cos(r/180*Math.PI-N6),s=a*Math.sin(r/180*Math.PI-N6);return n.a=o*mC-s/.83*yC,n.b=o*yC+s/.83*mC,i!==void 0&&(n.alpha=i),n},xC=wmt,Tmt=({l:e,a:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=t*mC+r*yC,a=.83*(r*mC-t*yC),o=Math.sqrt(n*n+a*a),s={mode:"dlch",l:oue/gC*Math.log(1+.0039*e),c:Math.log(1+.075*o)/(.0435*aue*gC)};return s.c&&(s.h=Yc((Math.atan2(a,n)+N6)/Math.PI*180)),i!==void 0&&(s.alpha=i),s},_C=Tmt,Lle=e=>xC(Mg(e,"dlch")),Ple=e=>Sg(_C(e),"dlab"),Amt={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Lle,rgb:e=>G6(Lle(e))},fromMode:{lab65:Ple,rgb:e=>Ple(H6(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:Ni,a:Ni,b:Ni,alpha:{use:Ni,fixup:Cu}}},sue=Amt,Mmt={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:xC,dlab:e=>Sg(e,"dlab"),rgb:e=>G6(xC(e))},fromMode:{lab65:_C,dlab:e=>Mg(e,"dlch"),rgb:e=>_C(H6(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:Ni,c:Ni,h:{use:Ni,fixup:Kv},alpha:{use:Ni,fixup:Cu}},difference:{h:V6},average:{h:Jv}},lue=Mmt;function uue({h:e,s:t,i:r,alpha:i}){e=Yc(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r*(1+t*(3/(2-n)-1)),g:r*(1+t*(3*(1-n)/(2-n)-1)),b:r*(1-t)};break;case 1:a={r:r*(1+t*(3*(1-n)/(2-n)-1)),g:r*(1+t*(3/(2-n)-1)),b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r*(1+t*(3/(2-n)-1)),b:r*(1+t*(3*(1-n)/(2-n)-1))};break;case 3:a={r:r*(1-t),g:r*(1+t*(3*(1-n)/(2-n)-1)),b:r*(1+t*(3/(2-n)-1))};break;case 4:a={r:r*(1+t*(3*(1-n)/(2-n)-1)),g:r*(1-t),b:r*(1+t*(3/(2-n)-1))};break;case 5:a={r:r*(1+t*(3/(2-n)-1)),g:r*(1-t),b:r*(1+t*(3*(1-n)/(2-n)-1))};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",i!==void 0&&(a.alpha=i),a}function cue({r:e,g:t,b:r,alpha:i}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.max(e,t,r),a=Math.min(e,t,r),o={mode:"hsi",s:e+t+r===0?0:1-3*a/(e+t+r),i:(e+t+r)/3};return n-a!==0&&(o.h=(n===e?(t-r)/(n-a)+(t<r)*6:n===t?(r-e)/(n-a)+2:(e-t)/(n-a)+4)*60),i!==void 0&&(o.alpha=i),o}var Smt={mode:"hsi",toMode:{rgb:uue},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:cue},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:Ni,fixup:Kv},s:Ni,i:Ni,alpha:{use:Ni,fixup:Cu}},difference:{h:U6},average:{h:Jv}},fue=Smt;function hue({h:e,s:t,l:r,alpha:i}){e=Yc(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let n=r+t*(r<.5?r:1-r),a=n-(n-r)*2*Math.abs(e/60%2-1),o;switch(Math.floor(e/60)){case 0:o={r:n,g:a,b:2*r-n};break;case 1:o={r:a,g:n,b:2*r-n};break;case 2:o={r:2*r-n,g:n,b:a};break;case 3:o={r:2*r-n,g:a,b:n};break;case 4:o={r:a,g:2*r-n,b:n};break;case 5:o={r:n,g:2*r-n,b:a};break;default:o={r:2*r-n,g:2*r-n,b:2*r-n}}return o.mode="rgb",i!==void 0&&(o.alpha=i),o}function due({r:e,g:t,b:r,alpha:i}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.max(e,t,r),a=Math.min(e,t,r),o={mode:"hsl",s:n===a?0:(n-a)/(1-Math.abs(n+a-1)),l:.5*(n+a)};return n-a!==0&&(o.h=(n===e?(t-r)/(n-a)+(t<r)*6:n===t?(r-e)/(n-a)+2:(e-t)/(n-a)+4)*60),i!==void 0&&(o.alpha=i),o}var Emt=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},kmt=Emt,Cmt=new RegExp(`^hsla?\\(\\s*${Mgt}${G3}${q6}${G3}${q6}\\s*(?:,\\s*${vU}\\s*)?\\)$`),Dmt=e=>{let t=e.match(Cmt);if(!t)return;let r={mode:"hsl"};return t[3]!==void 0?r.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(r.h=kmt(t[1],t[2])),t[4]!==void 0&&(r.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(r.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?r.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},pue=Dmt;function Fmt(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let r={mode:"hsl"},[,i,n,a,o]=t;if(i.type!==bi.None){if(i.type===bi.Percentage)return;r.h=i.value}if(n.type!==bi.None){if(n.type===bi.Hue)return;r.s=n.value/100}if(a.type!==bi.None){if(a.type===bi.Hue)return;r.l=a.value/100}return o.type!==bi.None&&(r.alpha=Math.min(1,Math.max(0,o.type===bi.Number?o.value:o.value/100))),r}var vue=Fmt,Lmt={mode:"hsl",toMode:{rgb:hue},fromMode:{rgb:due},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[vue,pue],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:Ni,fixup:Kv},s:Ni,l:Ni,alpha:{use:Ni,fixup:Cu}},difference:{h:U6},average:{h:Jv}},xU=Lmt;function _U({h:e,s:t,v:r,alpha:i}){e=Yc(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r,g:r*(1-t*n),b:r*(1-t)};break;case 1:a={r:r*(1-t*n),g:r,b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r,b:r*(1-t*n)};break;case 3:a={r:r*(1-t),g:r*(1-t*n),b:r};break;case 4:a={r:r*(1-t*n),g:r*(1-t),b:r};break;case 5:a={r,g:r*(1-t),b:r*(1-t*n)};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",i!==void 0&&(a.alpha=i),a}function bU({r:e,g:t,b:r,alpha:i}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.max(e,t,r),a=Math.min(e,t,r),o={mode:"hsv",s:n===0?0:1-a/n,v:n};return n-a!==0&&(o.h=(n===e?(t-r)/(n-a)+(t<r)*6:n===t?(r-e)/(n-a)+2:(e-t)/(n-a)+4)*60),i!==void 0&&(o.alpha=i),o}var Pmt={mode:"hsv",toMode:{rgb:_U},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:bU},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:Ni,fixup:Kv},s:Ni,v:Ni,alpha:{use:Ni,fixup:Cu}},difference:{h:U6},average:{h:Jv}},wU=Pmt;function gue({h:e,w:t,b:r,alpha:i}){if(t===void 0&&(t=0),r===void 0&&(r=0),t+r>1){let n=t+r;t/=n,r/=n}return _U({h:e,s:r===1?1:1-t/(1-r),v:1-r,alpha:i})}function mue(e){let t=bU(e);if(t===void 0)return;let r=t.s!==void 0?t.s:0,i=t.v!==void 0?t.v:0,n={mode:"hwb",w:(1-r)*i,b:1-i};return t.h!==void 0&&(n.h=t.h),t.alpha!==void 0&&(n.alpha=t.alpha),n}function Imt(e,t){if(!t||t[0]!=="hwb")return;let r={mode:"hwb"},[,i,n,a,o]=t;if(i.type!==bi.None){if(i.type===bi.Percentage)return;r.h=i.value}if(n.type!==bi.None){if(n.type===bi.Hue)return;r.w=n.value/100}if(a.type!==bi.None){if(a.type===bi.Hue)return;r.b=a.value/100}return o.type!==bi.None&&(r.alpha=Math.min(1,Math.max(0,o.type===bi.Number?o.value:o.value/100))),r}var yue=Imt,Rmt={mode:"hwb",toMode:{rgb:gue},fromMode:{rgb:mue},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[yue],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:Ni,fixup:Kv},w:Ni,b:Ni,alpha:{use:Ni,fixup:Cu}},difference:{h:eue},average:{h:Jv}},xue=Rmt,_ue=203,MC=.1593017578125,bue=78.84375,SC=.8359375,EC=18.8515625,kC=18.6875;function DN(e){if(e<0)return 0;let t=Math.pow(e,1/bue);return 1e4*Math.pow(Math.max(0,t-SC)/(EC-kC*t),1/MC)}function FN(e){if(e<0)return 0;let t=Math.pow(e/1e4,MC);return Math.pow((SC+EC*t)/(1+kC*t),bue)}var LN=e=>Math.max(e/_ue,0),zmt=({i:e,t,p:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=DN(e+.008609037037932761*t+.11102962500302593*r),a=DN(e-.00860903703793275*t-.11102962500302599*r),o=DN(e+.5600313357106791*t-.32062717498731885*r),s={mode:"xyz65",x:LN(2.070152218389422*n-1.3263473389671556*a+.2066510476294051*o),y:LN(.3647385209748074*n+.680566024947227*a-.0453045459220346*o),z:LN(-.049747207535812*n-.0492609666966138*a+1.1880659249923042*o)};return i!==void 0&&(s.alpha=i),s},KN=zmt,PN=(e=0)=>Math.max(e*_ue,0),Bmt=({x:e,y:t,z:r,alpha:i})=>{let n=PN(e),a=PN(t),o=PN(r),s=FN(.3592832590121217*n+.6976051147779502*a-.0358915932320289*o),l=FN(-.1920808463704995*n+1.1004767970374323*a+.0753748658519118*o),u=FN(.0070797844607477*n+.0748396662186366*a+.8433265453898765*o),c=.5*s+.5*l,f=1.61376953125*s-3.323486328125*l+1.709716796875*u,h=4.378173828125*s-4.24560546875*l-.132568359375*u,d={mode:"itp",i:c,t:f,p:h};return i!==void 0&&(d.alpha=i),d},JN=Bmt,qmt={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:KN,rgb:e=>uy(KN(e))},fromMode:{xyz65:JN,rgb:e=>JN(ly(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:Ni,t:Ni,p:Ni,alpha:{use:Ni,fixup:Cu}}},wue=qmt,Omt=134.03437499999998,Nmt=16295499532821565e-27,IN=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,MC);return Math.pow((SC+EC*t)/(1+kC*t),Omt)},RN=(e=0)=>Math.max(e*203,0),Umt=({x:e,y:t,z:r,alpha:i})=>{e=RN(e),t=RN(t),r=RN(r);let n=1.15*e-.15*r,a=.66*t+.34*e,o=IN(.41478972*n+.579999*a+.014648*r),s=IN(-.20151*n+1.120649*a+.0531008*r),l=IN(-.0166008*n+.2648*a+.6684799*r),u=(o+s)/2,c={mode:"jab",j:.44*u/(1-.56*u)-Nmt,a:3.524*o-4.066708*s+.542708*l,b:.199076*o+1.096799*s-1.295875*l};return i!==void 0&&(c.alpha=i),c},TU=Umt,Vmt=134.03437499999998,Ile=16295499532821565e-27,zN=e=>{if(e<0)return 0;let t=Math.pow(e,1/Vmt);return 1e4*Math.pow((SC-t)/(kC*t-EC),1/MC)},BN=e=>e/203,Gmt=({j:e,a:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(e+Ile)/(.44+.56*(e+Ile)),a=zN(n+.13860504*t+.058047316*r),o=zN(n-.13860504*t-.058047316*r),s=zN(n-.096019242*t-.8118919*r),l={mode:"xyz65",x:BN(1.661373024652174*a-.914523081304348*o+.23136208173913045*s),y:BN(-.3250758611844533*a+1.571847026732543*o-.21825383453227928*s),z:BN(-.090982811*a-.31272829*o+1.5227666*s)};return i!==void 0&&(l.alpha=i),l},AU=Gmt,Hmt=e=>{let t=TU(ly(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},MU=Hmt,jmt=e=>uy(AU(e)),SU=jmt,$mt={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:MU,xyz65:TU},toMode:{rgb:SU,xyz65:AU},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:Ni,a:Ni,b:Ni,alpha:{use:Ni,fixup:Cu}}},Tue=$mt,Wmt=({j:e,a:t,b:r,alpha:i})=>{t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:n};return n&&(a.h=Yc(Math.atan2(r,t)*180/Math.PI)),i!==void 0&&(a.alpha=i),a},QN=Wmt,Ymt=({j:e,c:t,h:r,alpha:i})=>{r===void 0&&(r=0);let n={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return i!==void 0&&(n.alpha=i),n},eU=Ymt,Xmt={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:eU,rgb:e=>SU(eU(e))},fromMode:{rgb:e=>QN(MU(e)),jab:QN},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:Ni,fixup:Kv},c:Ni,j:Ni,alpha:{use:Ni,fixup:Cu}},difference:{h:V6},average:{h:Jv}},Aue=Xmt,CC=Math.pow(29,3)/Math.pow(3,3),EU=Math.pow(6,3)/Math.pow(29,3),qN=e=>Math.pow(e,3)>EU?Math.pow(e,3):(116*e-16)/CC,Zmt=({l:e,a:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=(e+16)/116,a=t/500+n,o=n-r/200,s={mode:"xyz50",x:qN(a)*ku.X,y:qN(n)*ku.Y,z:qN(o)*ku.Z};return i!==void 0&&(s.alpha=i),s},DC=Zmt,Kmt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Px({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*r,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*r,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*r});return i!==void 0&&(n.alpha=i),n},$3=Kmt,Jmt=e=>$3(DC(e)),kU=Jmt,Qmt=e=>{let{r:t,g:r,b:i,alpha:n}=Lx(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*i,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*i,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*i};return n!==void 0&&(a.alpha=n),a},W3=Qmt,ON=e=>e>EU?Math.cbrt(e):(CC*e+16)/116,eyt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=ON(e/ku.X),a=ON(t/ku.Y),o=ON(r/ku.Z),s={mode:"lab",l:116*a-16,a:500*(n-a),b:200*(a-o)};return i!==void 0&&(s.alpha=i),s},FC=eyt,tyt=e=>{let t=FC(W3(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},CU=tyt;function ryt(e,t){if(!t||t[0]!=="lab")return;let r={mode:"lab"},[,i,n,a,o]=t;if(!(i.type===bi.Hue||n.type===bi.Hue||a.type===bi.Hue))return i.type!==bi.None&&(r.l=Math.min(Math.max(0,i.value),100)),n.type!==bi.None&&(r.a=n.type===bi.Number?n.value:n.value*125/100),a.type!==bi.None&&(r.b=a.type===bi.Number?a.value:a.value*125/100),o.type!==bi.None&&(r.alpha=Math.min(1,Math.max(0,o.type===bi.Number?o.value:o.value/100))),r}var Mue=ryt,iyt={mode:"lab",toMode:{xyz50:DC,rgb:kU},fromMode:{xyz50:FC,rgb:CU},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[Mue],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:Ni,a:Ni,b:Ni,alpha:{use:Ni,fixup:Cu}}},LC=iyt,nyt=ma(fn({},LC),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:mU,rgb:G6},fromMode:{xyz65:yU,rgb:H6},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}}),Sue=nyt;function ayt(e,t){if(!t||t[0]!=="lch")return;let r={mode:"lch"},[,i,n,a,o]=t;if(i.type!==bi.None){if(i.type===bi.Hue)return;r.l=Math.min(Math.max(0,i.value),100)}if(n.type!==bi.None&&(r.c=Math.max(0,n.type===bi.Number?n.value:n.value*150/100)),a.type!==bi.None){if(a.type===bi.Percentage)return;r.h=a.value}return o.type!==bi.None&&(r.alpha=Math.min(1,Math.max(0,o.type===bi.Number?o.value:o.value/100))),r}var Eue=ayt,oyt={mode:"lch",toMode:{lab:Sg,rgb:e=>kU(Sg(e))},fromMode:{rgb:e=>Mg(CU(e)),lab:Mg},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[Eue],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:Ni,fixup:Kv},c:Ni,l:Ni,alpha:{use:Ni,fixup:Cu}},difference:{h:V6},average:{h:Jv}},PC=oyt,syt=ma(fn({},PC),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Sg(e,"lab65"),rgb:e=>G6(Sg(e,"lab65"))},fromMode:{rgb:e=>Mg(H6(e),"lch65"),lab65:e=>Mg(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),kue=syt,lyt=({l:e,u:t,v:r,alpha:i})=>{t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:n};return n&&(a.h=Yc(Math.atan2(r,t)*180/Math.PI)),i!==void 0&&(a.alpha=i),a},DU=lyt,uyt=({l:e,c:t,h:r,alpha:i})=>{r===void 0&&(r=0);let n={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return i!==void 0&&(n.alpha=i),n},FU=uyt,Cue=(e,t,r)=>4*e/(e+15*t+3*r),Due=(e,t,r)=>9*t/(e+15*t+3*r),cyt=Cue(ku.X,ku.Y,ku.Z),fyt=Due(ku.X,ku.Y,ku.Z),hyt=e=>e<=EU?CC*e:116*Math.cbrt(e)-16,dyt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=hyt(t/ku.Y),a=Cue(e,t,r),o=Due(e,t,r);!isFinite(a)||!isFinite(o)?n=a=o=0:(a=13*n*(a-cyt),o=13*n*(o-fyt));let s={mode:"luv",l:n,u:a,v:o};return i!==void 0&&(s.alpha=i),s},bC=dyt,pyt=(e,t,r)=>4*e/(e+15*t+3*r),vyt=(e,t,r)=>9*t/(e+15*t+3*r),gyt=pyt(ku.X,ku.Y,ku.Z),myt=vyt(ku.X,ku.Y,ku.Z),yyt=({l:e,u:t,v:r,alpha:i})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),r===void 0&&(r=0);let n=t/(13*e)+gyt,a=r/(13*e)+myt,o=ku.Y*(e<=8?e/CC:Math.pow((e+16)/116,3)),s=o*(9*n)/(4*a),l=o*(12-3*n-20*a)/(4*a),u={mode:"xyz50",x:s,y:o,z:l};return i!==void 0&&(u.alpha=i),u},wC=yyt,xyt=e=>DU(bC(W3(e))),_yt=e=>$3(wC(FU(e))),byt={mode:"lchuv",toMode:{luv:FU,rgb:_yt},fromMode:{rgb:xyt,luv:DU},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:Ni,fixup:Kv},c:Ni,l:Ni,alpha:{use:Ni,fixup:Cu}},difference:{h:V6},average:{h:Jv}},Fue=byt,wyt=ma(fn({},Fx),{mode:"lrgb",toMode:{rgb:Px},fromMode:{rgb:Lx},parse:["srgb-linear"],serialize:"srgb-linear"}),Lue=wyt,Tyt={mode:"luv",toMode:{xyz50:wC,rgb:e=>$3(wC(e))},fromMode:{xyz50:bC,rgb:e=>bC(W3(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:Ni,u:Ni,v:Ni,alpha:{use:Ni,fixup:Cu}}},Pue=Tyt,Ayt=({r:e,g:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*r),a=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*r),o=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*r),s={mode:"oklab",l:.210454268309314*n+.7936177747023054*a-.0040720430116193*o,a:1.9779985324311684*n-2.42859224204858*a+.450593709617411*o,b:.0259040424655478*n+.7827717124575296*a-.8086757549230774*o};return i!==void 0&&(s.alpha=i),s},LU=Ayt,Myt=e=>{let t=LU(Lx(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},j6=Myt,Syt=({l:e,a:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Math.pow(e+.3963377773761749*t+.2158037573099136*r,3),a=Math.pow(e-.1055613458156586*t-.0638541728258133*r,3),o=Math.pow(e-.0894841775298119*t-1.2914855480194092*r,3),s={mode:"lrgb",r:4.076741636075957*n-3.3077115392580616*a+.2309699031821044*o,g:-1.2684379732850317*n+2.6097573492876887*a-.3413193760026573*o,b:-.0041960761386756*n-.7034186179359362*a+1.7076146940746117*o};return i!==void 0&&(s.alpha=i),s},Y3=Syt,Eyt=e=>Px(Y3(e)),$6=Eyt;function tU(e){let i=1.170873786407767;return .5*(i*e-.206+Math.sqrt((i*e-.206)*(i*e-.206)+4*.03*i*e))}function TC(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function kyt(e,t){let r,i,n,a,o,s,l,u;-1.88170328*e-.80936493*t>1?(r=1.19086277,i=1.76576728,n=.59662641,a=.75515197,o=.56771245,s=4.0767416621,l=-3.3077115913,u=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,i=-.45954404,n=.08285427,a=.1254107,o=.14503204,s=-1.2684380046,l=2.6097574011,u=-.3413193965):(r=1.35733652,i=-.00915799,n=-1.1513021,a=-.50559606,o=.00692167,s=-.0041960863,l=-.7034186147,u=1.707614701);let c=r+i*e+n*t+a*e*e+o*e*t,f=.3963377774*e+.2158037573*t,h=-.1055613458*e-.0638541728*t,d=-.0894841775*e-1.291485548*t;{let p=1+c*f,v=1+c*h,m=1+c*d,g=p*p*p,w=v*v*v,b=m*m*m,_=3*f*p*p,M=3*h*v*v,x=3*d*m*m,T=6*f*f*p,A=6*h*h*v,y=6*d*d*m,E=s*g+l*w+u*b,S=s*_+l*M+u*x,C=s*T+l*A+u*y;c=c-E*S/(S*S-.5*E*C)}return c}function PU(e,t){let r=kyt(e,t),i=Y3({l:1,a:r*e,b:r*t}),n=Math.cbrt(1/Math.max(i.r,i.g,i.b)),a=n*r;return[n,a]}function Cyt(e,t,r,i,n,a=null){a||(a=PU(e,t));let o;if((r-n)*a[1]-(a[0]-n)*i<=0)o=a[1]*n/(i*a[0]+a[1]*(n-r));else{o=a[1]*(n-1)/(i*(a[0]-1)+a[1]*(n-r));{let s=r-n,l=i,u=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,h=s+l*u,d=s+l*c,p=s+l*f;{let v=n*(1-o)+o*r,m=o*i,g=v+m*u,w=v+m*c,b=v+m*f,_=g*g*g,M=w*w*w,x=b*b*b,T=3*h*g*g,A=3*d*w*w,y=3*p*b*b,E=6*h*h*g,S=6*d*d*w,C=6*p*p*b,k=4.0767416621*_-3.3077115913*M+.2309699292*x-1,D=4.0767416621*T-3.3077115913*A+.2309699292*y,F=4.0767416621*E-3.3077115913*S+.2309699292*C,P=D/(D*D-.5*k*F),R=-k*P,L=-1.2684380046*_+2.6097574011*M-.3413193965*x-1,I=-1.2684380046*T+2.6097574011*A-.3413193965*y,B=-1.2684380046*E+2.6097574011*S-.3413193965*C,O=I/(I*I-.5*L*B),$=-L*O,Y=-.0041960863*_-.7034186147*M+1.707614701*x-1,K=-.0041960863*T-.7034186147*A+1.707614701*y,j=-.0041960863*E-.7034186147*S+1.707614701*C,q=K/(K*K-.5*Y*j),J=-Y*q;R=P>=0?R:1e6,$=O>=0?$:1e6,J=q>=0?J:1e6,o+=Math.min(R,Math.min($,J))}}}return o}function IU(e,t,r=null){r||(r=PU(e,t));let i=r[0],n=r[1];return[n/i,n/(1-i)]}function Iue(e,t,r){let i=PU(t,r),n=Cyt(t,r,e,1,e,i),a=IU(t,r,i),o=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),l=n/Math.min(e*a[0],(1-e)*a[1]),u=e*o,c=(1-e)*s,f=.9*l*Math.sqrt(Math.sqrt(1/(1/(u*u*u*u)+1/(c*c*c*c))));return u=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(u*u)+1/(c*c))),f,n]}function rU(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,i=e.b!==void 0?e.b:0,n={mode:"okhsl",l:tU(t)};e.alpha!==void 0&&(n.alpha=e.alpha);let a=Math.sqrt(r*r+i*i);if(!a)return n.s=0,n;let[o,s,l]=Iue(t,r/a,i/a),u;if(a<s){let c=0,f=.8*o,h=1-f/s;u=(a-c)/(f+h*(a-c))*.8}else{let c=s,f=.2*s*s*1.25*1.25/o,h=1-f/(l-s);u=.8+.2*((a-c)/(f+h*(a-c)))}return u&&(n.s=u,n.h=Yc(Math.atan2(i,r)*180/Math.PI)),n}function iU(e){let t=e.h!==void 0?e.h:0,r=e.s!==void 0?e.s:0,i=e.l!==void 0?e.l:0,n={mode:"oklab",l:TC(i)};if(e.alpha!==void 0&&(n.alpha=e.alpha),!r||i===1)return n.a=n.b=0,n;let a=Math.cos(t/180*Math.PI),o=Math.sin(t/180*Math.PI),[s,l,u]=Iue(n.l,a,o),c,f,h,d;r<.8?(c=1.25*r,f=0,h=.8*s,d=1-h/l):(c=5*(r-.8),f=l,h=.2*l*l*1.25*1.25/s,d=1-h/(u-l));let p=f+c*h/(1-d*c);return n.a=p*a,n.b=p*o,n}var Dyt=ma(fn({},xU),{mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:rU,rgb:e=>rU(j6(e))},toMode:{oklab:iU,rgb:e=>$6(iU(e))}}),Rue=Dyt;function nU(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,i=e.b!==void 0?e.b:0,n=Math.sqrt(r*r+i*i),a=n?r/n:1,o=n?i/n:1,[s,l]=IU(a,o),u=.5,c=1-u/s,f=l/(n+t*l),h=f*t,d=f*n,p=TC(h),v=d*p/h,m=Y3({l:p,a:a*v,b:o*v}),g=Math.cbrt(1/Math.max(m.r,m.g,m.b,0));t=t/g,n=n/g*tU(t)/t,t=tU(t);let w={mode:"okhsv",s:n?(u+l)*d/(l*u+l*c*d):0,v:t?t/h:0};return w.s&&(w.h=Yc(Math.atan2(i,r)*180/Math.PI)),e.alpha!==void 0&&(w.alpha=e.alpha),w}function aU(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let r=e.h!==void 0?e.h:0,i=e.s!==void 0?e.s:0,n=e.v!==void 0?e.v:0,a=Math.cos(r/180*Math.PI),o=Math.sin(r/180*Math.PI),[s,l]=IU(a,o),u=.5,c=1-u/s,f=1-i*u/(u+l-l*c*i),h=i*l*u/(u+l-l*c*i),d=TC(f),p=h*d/f,v=Y3({l:d,a:a*p,b:o*p}),m=Math.cbrt(1/Math.max(v.r,v.g,v.b,0)),g=TC(n*f),w=h*g/f;return t.l=g*m,t.a=w*a*m,t.b=w*o*m,t}var Fyt=ma(fn({},wU),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:nU,rgb:e=>nU(j6(e))},toMode:{oklab:aU,rgb:e=>$6(aU(e))}}),zue=Fyt;function Lyt(e,t){if(!t||t[0]!=="oklab")return;let r={mode:"oklab"},[,i,n,a,o]=t;if(!(i.type===bi.Hue||n.type===bi.Hue||a.type===bi.Hue))return i.type!==bi.None&&(r.l=Math.min(Math.max(0,i.type===bi.Number?i.value:i.value/100),1)),n.type!==bi.None&&(r.a=n.type===bi.Number?n.value:n.value*.4/100),a.type!==bi.None&&(r.b=a.type===bi.Number?a.value:a.value*.4/100),o.type!==bi.None&&(r.alpha=Math.min(1,Math.max(0,o.type===bi.Number?o.value:o.value/100))),r}var Bue=Lyt,Pyt=ma(fn({},LC),{mode:"oklab",toMode:{lrgb:Y3,rgb:$6},fromMode:{lrgb:LU,rgb:j6},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Bue],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`}),que=Pyt;function Iyt(e,t){if(!t||t[0]!=="oklch")return;let r={mode:"oklch"},[,i,n,a,o]=t;if(i.type!==bi.None){if(i.type===bi.Hue)return;r.l=Math.min(Math.max(0,i.type===bi.Number?i.value:i.value/100),1)}if(n.type!==bi.None&&(r.c=Math.max(0,n.type===bi.Number?n.value:n.value*.4/100)),a.type!==bi.None){if(a.type===bi.Percentage)return;r.h=a.value}return o.type!==bi.None&&(r.alpha=Math.min(1,Math.max(0,o.type===bi.Number?o.value:o.value/100))),r}var Oue=Iyt,Ryt=ma(fn({},PC),{mode:"oklch",toMode:{oklab:e=>Sg(e,"oklab"),rgb:e=>$6(Sg(e,"oklab"))},fromMode:{rgb:e=>Mg(j6(e),"oklch"),oklab:e=>Mg(e,"oklch")},parse:[Oue],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),Nue=Ryt,zyt=e=>{let{r:t,g:r,b:i,alpha:n}=Lx(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*i,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*i,z:0*t+.0451133818589026*r+1.043944368900976*i};return n!==void 0&&(a.alpha=n),a},oU=zyt,Byt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=Px({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*r,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*r,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*r},"p3");return i!==void 0&&(n.alpha=i),n},sU=Byt,qyt=ma(fn({},Fx),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>sU(ly(e)),xyz65:sU},toMode:{rgb:e=>uy(oU(e)),xyz65:oU}}),Uue=qyt,NN=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},Oyt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"prophoto",r:NN(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*r),g:NN(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*r),b:NN(e*0+t*0+1.2119675456389452*r)};return i!==void 0&&(n.alpha=i),n},lU=Oyt,UN=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},Nyt=e=>{let t=UN(e.r),r=UN(e.g),i=UN(e.b),n={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*i,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*i,z:0*t+0*r+.8251046025104602*i};return e.alpha!==void 0&&(n.alpha=e.alpha),n},uU=Nyt,Uyt=ma(fn({},Fx),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:lU,rgb:e=>lU(W3(e))},toMode:{xyz50:uU,rgb:e=>$3(uU(e))}}),Vue=Uyt,Rle=1.09929682680944,Vyt=.018053968510807,VN=e=>{let t=Math.abs(e);return t>Vyt?(Math.sign(e)||1)*(Rle*Math.pow(t,.45)-(Rle-1)):4.5*e},Gyt=({x:e,y:t,z:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"rec2020",r:VN(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*r),g:VN(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*r),b:VN(e*.0176398574453108-t*.0427706132578085+.9421031212354739*r)};return i!==void 0&&(n.alpha=i),n},cU=Gyt,zle=1.09929682680944,Hyt=.018053968510807,GN=(e=0)=>{let t=Math.abs(e);return t<Hyt*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+zle-1)/zle,1/.45)},jyt=e=>{let t=GN(e.r),r=GN(e.g),i=GN(e.b),n={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*i,y:.262700212011267*t+.6779980715188708*r+.059301716469862*i,z:0*t+.0280726930490874*r+1.0609850577107909*i};return e.alpha!==void 0&&(n.alpha=e.alpha),n},fU=jyt,$yt=ma(fn({},Fx),{mode:"rec2020",fromMode:{xyz65:cU,rgb:e=>cU(ly(e))},toMode:{xyz65:fU,rgb:e=>uy(fU(e))},parse:["rec2020"],serialize:"rec2020"}),Gue=$yt,Cx=.0037930732552754493,Hue=Math.cbrt(Cx),HN=e=>Math.cbrt(e)-Hue,Wyt=e=>{let{r:t,g:r,b:i,alpha:n}=Lx(e),a=HN(.3*t+.622*r+.078*i+Cx),o=HN(.23*t+.692*r+.078*i+Cx),s=HN(.2434226892454782*t+.2047674442449682*r+.5518098665095535*i+Cx),l={mode:"xyb",x:(a-o)/2,y:(a+o)/2,b:s-(a+o)/2};return n!==void 0&&(l.alpha=n),l},jue=Wyt,jN=e=>Math.pow(e+Hue,3),Yyt=({x:e,y:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n=jN(e+t)-Cx,a=jN(t-e)-Cx,o=jN(r+t)-Cx,s=Px({r:11.031566904639861*n-9.866943908131562*a-.16462299650829934*o,g:-3.2541473810744237*n+4.418770377582723*a-.16462299650829934*o,b:-3.6588512867136815*n+2.7129230459360922*a+1.9459282407775895*o});return i!==void 0&&(s.alpha=i),s},$ue=Yyt,Xyt={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:$ue},fromMode:{rgb:jue},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:Ni,y:Ni,b:Ni,alpha:{use:Ni,fixup:Cu}}},Wue=Xyt,Zyt={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:$3,lab:FC},fromMode:{rgb:W3,lab:DC},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:Ni,y:Ni,z:Ni,alpha:{use:Ni,fixup:Cu}}},Yue=Zyt,Kyt=e=>{let{x:t,y:r,z:i,alpha:n}=e;t===void 0&&(t=0),r===void 0&&(r=0),i===void 0&&(i=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*i,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*i,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*i};return n!==void 0&&(a.alpha=n),a},Xue=Kyt,Jyt=e=>{let{x:t,y:r,z:i,alpha:n}=e;t===void 0&&(t=0),r===void 0&&(r=0),i===void 0&&(i=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*i,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*i,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*i};return n!==void 0&&(a.alpha=n),a},Zue=Jyt,Qyt={mode:"xyz65",toMode:{rgb:uy,xyz50:Xue},fromMode:{rgb:ly,xyz50:Zue},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:Ni,y:Ni,z:Ni,alpha:{use:Ni,fixup:Cu}}},Kue=Qyt,e2t=({r:e,g:t,b:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return i!==void 0&&(n.alpha=i),n},Jue=e2t,t2t=({y:e,i:t,q:r,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let n={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return i!==void 0&&(n.alpha=i),n},Que=t2t,r2t={mode:"yiq",toMode:{rgb:Que},fromMode:{rgb:Jue},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:Ni,i:Ni,q:Ni,alpha:{use:Ni,fixup:Cu}}},ece=r2t,i2t=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,n2t=(e=4)=>t=>typeof t=="number"?i2t(t,e):t,tce=n2t,B6=tce(2),O6=e=>Math.max(0,Math.min(1,e||0)),Dx=e=>Math.round(O6(e)*255),RU=ys("rgb"),a2t=ys("hsl"),zU=e=>{if(e===void 0)return;let t=Dx(e.r),r=Dx(e.g),i=Dx(e.b);return"#"+(1<<24|t<<16|r<<8|i).toString(16).slice(1)},rce=e=>{if(e===void 0)return;let t=Dx(e.alpha!==void 0?e.alpha:1);return zU(e)+(256|t).toString(16).slice(1)},ice=e=>{if(e===void 0)return;let t=Dx(e.r),r=Dx(e.g),i=Dx(e.b);return e.alpha===void 0||e.alpha===1?`rgb(${t}, ${r}, ${i})`:`rgba(${t}, ${r}, ${i}, ${B6(O6(e.alpha))})`},nce=e=>{if(e===void 0)return;let t=B6(e.h||0),r=B6(O6(e.s)*100)+"%",i=B6(O6(e.l)*100)+"%";return e.alpha===void 0||e.alpha===1?`hsl(${t}, ${r}, ${i})`:`hsla(${t}, ${r}, ${i}, ${B6(O6(e.alpha))})`},o2t=e=>{let t=Pp(e);if(!t)return;let r=yf(t.mode);if(!r.serialize||typeof r.serialize=="string"){let i=`color(${r.serialize||`--${t.mode}`} `;return r.channels.forEach((n,a)=>{n!=="alpha"&&(i+=(a?" ":"")+(t[n]!==void 0?t[n]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(i+=` / ${t.alpha}`),i+")"}if(typeof r.serialize=="function")return r.serialize(t)},s2t=e=>zU(RU(e)),l2t=e=>rce(RU(e)),u2t=e=>ice(RU(e)),c2t=e=>nce(a2t(e)),f2t={normal:(e,t)=>t,multiply:(e,t)=>e*t,screen:(e,t)=>e+t-e*t,"hard-light":(e,t)=>t<.5?e*2*t:2*t*(1-e)-1,overlay:(e,t)=>e<.5?t*2*e:2*e*(1-t)-1,darken:(e,t)=>Math.min(e,t),lighten:(e,t)=>Math.max(e,t),"color-dodge":(e,t)=>e===0?0:t===1?1:Math.min(1,e/(1-t)),"color-burn":(e,t)=>e===1?1:t===0?0:1-Math.min(1,(1-e)/t),"soft-light":(e,t)=>t<.5?e-(1-2*t)*e*(1-e):e+(2*t-1)*((e<.25?((16*e-12)*e+4)*e:Math.sqrt(e))-e),difference:(e,t)=>Math.abs(e-t),exclusion:(e,t)=>e+t-2*e*t},h2t=(e,t="normal",r="rgb")=>{let i=typeof t=="function"?t:f2t[t],n=ys(r),a=yf(r).channels;return e.map(s=>{let l=n(s);return l.alpha===void 0&&(l.alpha=1),l}).reduce((s,l)=>{if(s===void 0)return l;let u=l.alpha+s.alpha*(1-l.alpha);return a.reduce((c,f)=>(f!=="alpha"&&(u===0?c[f]=0:(c[f]=l.alpha*(1-s.alpha)*l[f]+l.alpha*s.alpha*i(s[f],l[f])+(1-l.alpha)*s.alpha*s[f],c[f]=Math.max(0,Math.min(1,c[f]/u)))),c),{mode:r,alpha:u})})},d2t=h2t,p2t=([e,t])=>e+Math.random()*(t-e),v2t=e=>Object.keys(e).reduce((t,r)=>{let i=e[r];return t[r]=Array.isArray(i)?i:[i,i],t},{}),g2t=(e="rgb",t={})=>{let r=yf(e),i=v2t(t);return r.channels.reduce((n,a)=>((i.alpha||a!=="alpha")&&(n[a]=p2t(i[a]||r.ranges[a])),n),{mode:e})},m2t=g2t,W6=(e,t="rgb",r=!1)=>{let i=t?yf(t).channels:null,n=t?ys(t):Pp;return a=>{let o=n(a);if(!o)return;let s=(i||yf(o.mode).channels).reduce((u,c)=>{let f=e(o[c],c,o,t);return f!==void 0&&!isNaN(f)&&(u[c]=f),u},{mode:o.mode});if(!r)return s;let l=Pp(a);return l&&l.mode!==s.mode?ys(l.mode)(s):s}},ace=(e,t,r)=>t!=="alpha"?(e||0)*(r.alpha!==void 0?r.alpha:1):e,oce=(e,t,r)=>t!=="alpha"&&r.alpha!==0?(e||0)/(r.alpha!==void 0?r.alpha:1):e,BU=(e=1,t=0)=>(r,i)=>i!=="alpha"?r*e+t:r,y2t=(e=1,t=1,r=0)=>(i,n)=>n!=="alpha"?e*Math.pow(i,t)+r:i,x2t=e=>{e[0]===void 0&&(e[0]=0),e[e.length-1]===void 0&&(e[e.length-1]=1);let t=1,r,i,n,a;for(;t<e.length;){if(e[t]===void 0){for(i=t,n=e[t-1],r=t;e[r]===void 0;)r++;for(a=(e[r]-n)/(r-t+1);t<r;)e[t]=n+(t+1-i)*a,t++}else e[t]<e[t-1]&&(e[t]=e[t-1]);t++}return e},_2t=x2t,b2t=(e=.5)=>t=>e<=0?1:e>=1?0:Math.pow(t,Math.log(.5)/Math.log(e)),sce=b2t,dC=e=>typeof e=="function",Ex=e=>e&&typeof e=="object",Ble=e=>typeof e=="number",lce=(e,t="rgb",r,i)=>{let n=yf(t),a=ys(t),o=[],s=[],l={};e.forEach(h=>{Array.isArray(h)?(o.push(a(h[0])),s.push(h[1])):Ble(h)||dC(h)?l[s.length]=h:(o.push(a(h)),s.push(void 0))}),_2t(s);let u=n.channels.reduce((h,d)=>{let p;return Ex(r)&&Ex(r[d])&&r[d].fixup?p=r[d].fixup:Ex(n.interpolate[d])&&n.interpolate[d].fixup?p=n.interpolate[d].fixup:p=v=>v,h[d]=p(o.map(v=>v[d])),h},{});if(i){let h=o.map((d,p)=>n.channels.reduce((v,m)=>(v[m]=u[m][p],v),{mode:t}));u=n.channels.reduce((d,p)=>(d[p]=h.map(v=>{let m=i(v[p],p,v,t);return isNaN(m)?void 0:m}),d),{})}let c=n.channels.reduce((h,d)=>{let p;return dC(r)?p=r:Ex(r)&&dC(r[d])?p=r[d]:Ex(r)&&Ex(r[d])&&r[d].use?p=r[d].use:dC(n.interpolate[d])?p=n.interpolate[d]:Ex(n.interpolate[d])&&(p=n.interpolate[d].use),h[d]=p(u[d]),h},{}),f=o.length-1;return h=>{if(h=Math.min(Math.max(0,h),1),h<=s[0])return o[0];if(h>s[f])return o[f];let d=0;for(;s[d]<h;)d++;let p=s[d-1],v=s[d]-p,m=(h-p)/v,g=l[d]||l[0];g!==void 0&&(Ble(g)&&(g=sce((g-p)/v)),m=g(m));let w=(d-1+m)/f;return n.channels.reduce((b,_)=>{let M=c[_](w);return M!==void 0&&(b[_]=M),b},{mode:t})}},w2t=(e,t="rgb",r)=>lce(e,t,r),uce=(e,t)=>(r,i="rgb",n)=>{let a=t?W6(t,i):void 0,o=lce(r,i,n,e);return a?s=>a(o(s)):o},T2t=uce(ace,oce),pC=(e,t)=>(e+t)%t,cce=(e,t,r,i,n)=>{let a=n*n,o=a*n;return((1-3*n+3*a-o)*e+(4-6*a+3*o)*t+(1+3*n+3*a-3*o)*r+o*i)/6},fce=e=>t=>{let r=e.length-1,i=t>=1?r-1:Math.max(0,Math.floor(t*r));return cce(i>0?e[i-1]:2*e[i]-e[i+1],e[i],e[i+1],i<r-1?e[i+2]:2*e[i+1]-e[i],(t-i/r)*r)},hce=e=>t=>{let r=e.length-1,i=Math.floor(t*r);return cce(e[pC(i-1,e.length)],e[pC(i,e.length)],e[pC(i+1,e.length)],e[pC(i+2,e.length)],(t-i/r)*r)},dce=e=>{let t,r=e.length-1,i=new Array(r),n=new Array(r),a=new Array(r);for(i[1]=1/4,n[1]=(6*e[1]-e[0])/4,t=2;t<r;++t)i[t]=1/(4-i[t-1]),n[t]=(6*e[t]-(t==r-1?e[r]:0)-n[t-1])*i[t];for(a[0]=e[0],a[r]=e[r],r-1>0&&(a[r-1]=n[r-1]),t=r-2;t>0;--t)a[t]=n[t]-i[t]*a[t+1];return a},A2t=e=>fce(dce(e)),M2t=e=>hce(dce(e)),U3=Math.sign,hU=Math.min,f0=Math.abs,qU=e=>{let t=e.length-1,r=[],i=[],n=[];for(let a=0;a<t;a++)r.push((e[a+1]-e[a])*t),i.push(a>0?.5*(e[a+1]-e[a-1])*t:void 0),n.push(a>0?(U3(r[a-1])+U3(r[a]))*hU(f0(r[a-1]),f0(r[a]),.5*f0(i[a])):void 0);return[r,i,n]},OU=(e,t,r)=>{let i=e.length-1,n=i*i;return a=>{let o;a>=1?o=i-1:o=Math.max(0,Math.floor(a*i));let s=a-o/i,l=s*s,u=l*s;return(t[o]+t[o+1]-2*r[o])*n*u+(3*r[o]-2*t[o]-t[o+1])*i*l+t[o]*s+e[o]}},S2t=e=>{if(e.length<3)return Ni(e);let t=e.length-1,[r,,i]=qU(e);return i[0]=r[0],i[t]=r[t-1],OU(e,i,r)},E2t=e=>{if(e.length<3)return Ni(e);let t=e.length-1,[r,i,n]=qU(e);return i[0]=(e[1]*2-e[0]*1.5-e[2]*.5)*t,i[t]=(e[t]*1.5-e[t-1]*2+e[t-2]*.5)*t,n[0]=i[0]*r[0]<=0?0:f0(i[0])>2*f0(r[0])?2*r[0]:i[0],n[t]=i[t]*r[t-1]<=0?0:f0(i[t])>2*f0(r[t-1])?2*r[t-1]:i[t],OU(e,n,r)},k2t=e=>{let t=e.length-1,[r,i,n]=qU(e);i[0]=.5*(e[1]-e[t])*t,i[t]=.5*(e[0]-e[t-1])*t;let a=(e[0]-e[t])*t,o=a;return n[0]=(U3(a)+U3(r[0]))*hU(f0(a),f0(r[0]),.5*f0(i[0])),n[t]=(U3(r[t-1])+U3(o))*hU(f0(r[t-1]),f0(o),.5*f0(i[t])),OU(e,n,r)},C2t=(e=1)=>e===1?t=>t:t=>Math.pow(t,e),pce=C2t,D2t=(e=2,t=1)=>{let r=pce(t);if(e<2)return e<1?[]:[r(.5)];let i=[];for(let n=0;n<e;n++)i.push(r(n/(e-1)));return i},F2t=D2t,vce=ys("rgb"),gce=e=>{let t={mode:e.mode,r:Math.max(0,Math.min(e.r!==void 0?e.r:0,1)),g:Math.max(0,Math.min(e.g!==void 0?e.g:0,1)),b:Math.max(0,Math.min(e.b!==void 0?e.b:0,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},mce=e=>gce(vce(e)),yce=e=>e!==void 0&&(e.r===void 0||e.r>=0&&e.r<=1)&&(e.g===void 0||e.g>=0&&e.g<=1)&&(e.b===void 0||e.b>=0&&e.b<=1);function NU(e){return yce(vce(e))}function IC(e="rgb"){let{gamut:t}=yf(e);if(!t)return i=>!0;let r=ys(typeof t=="string"?t:e);return i=>yce(r(i))}function L2t(e){return e=Pp(e),e===void 0||NU(e)?e:ys(e.mode)(mce(e))}function UU(e="rgb"){let{gamut:t}=yf(e);if(!t)return a=>Pp(a);let r=typeof t=="string"?t:e,i=ys(r),n=IC(r);return a=>{let o=Pp(a);if(!o)return;let s=i(o);if(n(s))return o;let l=gce(s);return o.mode===l.mode?l:ys(o.mode)(l)}}function P2t(e,t="lch",r="rgb"){e=Pp(e);let i=r==="rgb"?NU:IC(r),n=r==="rgb"?mce:UU(r);if(e===void 0||i(e))return e;let a=ys(e.mode);e=ys(t)(e);let o=ma(fn({},e),{c:0});if(!i(o))return a(n(o));let s=0,l=e.c!==void 0?e.c:0,u=yf(t).ranges.c,c=(u[1]-u[0])/Math.pow(2,13),f=o.c;for(;l-s>c;)o.c=s+(l-s)*.5,i(o)?(f=o.c,s=o.c):l=o.c;return a(i(o)?o:ma(fn({},o),{c:f}))}function I2t(e="rgb",t="oklch",r=j3("oklch"),i=.02){let n=ys(e),a=yf(e);if(!a.gamut)return c=>n(c);let o=IC(e),s=UU(e),l=ys(t),{ranges:u}=yf(t);if(!u.l||!u.c)throw new Error("LCH-like space expected");return c=>{if(c=Pp(c),c===void 0)return;let f=fn({},l(c));if(f.l===void 0&&(f.l=0),f.c===void 0&&(f.c=0),f.l>=u.l[1]){let m=ma(fn({},a.white),{mode:e});return c.alpha!==void 0&&(m.alpha=c.alpha),m}if(f.l<=u.l[0]){let m=ma(fn({},a.black),{mode:e});return c.alpha!==void 0&&(m.alpha=c.alpha),m}if(o(f))return n(f);let h=0,d=f.c,p=(u.c[1]-u.c[0])/4e3,v=s(f);for(;d-h>p;)f.c=(h+d)*.5,v=s(f),o(f)||r&&i>0&&r(f,v)<=i?h=f.c:d=f.c;return n(o(f)?f:v)}}var R2t=(e,t=j3(),r=i=>i)=>{let i=e.map((n,a)=>({color:r(n),i:a}));return(n,a=1,o=1/0)=>(isFinite(a)&&(a=Math.max(1,Math.min(a,i.length-1))),i.forEach(s=>{s.d=t(n,s.color)}),i.sort((s,l)=>s.d-l.d).slice(0,a).filter(s=>s.d<o).map(s=>e[s.i]))},z2t=R2t,VU=e=>Math.max(e,0),GU=e=>Math.max(Math.min(e,1),0),B2t=(e,t,r)=>e===void 0||t===void 0?void 0:e+r*(t-e),q2t=e=>{let t=1-GU(e);return[.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1]},O2t=e=>{let t=VU(e);return[.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1]},N2t=e=>{let t=1-GU(e);return[.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1]},U2t=e=>{let t=Math.PI*e/180,r=Math.cos(t),i=Math.sin(t);return[.213+r*.787-i*.213,.715-r*.715-i*.715,.072-r*.072+i*.928,0,.213-r*.213+i*.143,.715+r*.285+i*.14,.072-r*.072-i*.283,0,.213-r*.213-i*.787,.715-r*.715+i*.715,.072+r*.928+i*.072,0,0,0,0,1]},RC=(e,t,r=!1)=>{let i=ys(t),n=yf(t).channels;return a=>{let o=i(a);if(!o)return;let s={mode:t},l,u=n.length;for(let f=0;f<e.length;f++)l=n[Math.floor(f/u)],o[l]!==void 0&&(s[l]=(s[l]||0)+e[f]*(o[n[f%u]]||0));if(!r)return s;let c=Pp(a);return c&&s.mode!==c.mode?ys(c.mode)(s):s}},V2t=(e=1,t="rgb")=>{let r=VU(e);return W6(BU(r),t,!0)},G2t=(e=1,t="rgb")=>{let r=VU(e);return W6(BU(r,(1-r)/2),t,!0)},H2t=(e=1,t="rgb")=>RC(q2t(e),t,!0),j2t=(e=1,t="rgb")=>RC(O2t(e),t,!0),$2t=(e=1,t="rgb")=>RC(N2t(e),t,!0),W2t=(e=1,t="rgb")=>{let r=GU(e);return W6((i,n)=>n==="alpha"?i:B2t(r,1-r,i),t,!0)},Y2t=(e=0,t="rgb")=>RC(U2t(e),t,!0),X2t=ys("rgb"),Z2t=[[1,0,-0,0,1,0,-0,-0,1],[.856167,.182038,-.038205,.029342,.955115,.015544,-.00288,-.001563,1.004443],[.734766,.334872,-.069637,.05184,.919198,.028963,-.004928,-.004209,1.009137],[.630323,.465641,-.095964,.069181,.890046,.040773,-.006308,-.007724,1.014032],[.539009,.579343,-.118352,.082546,.866121,.051332,-.007136,-.011959,1.019095],[.458064,.679578,-.137642,.092785,.846313,.060902,-.007494,-.016807,1.024301],[.38545,.769005,-.154455,.100526,.829802,.069673,-.007442,-.02219,1.029632],[.319627,.849633,-.169261,.106241,.815969,.07779,-.007025,-.028051,1.035076],[.259411,.923008,-.18242,.110296,.80434,.085364,-.006276,-.034346,1.040622],[.203876,.990338,-.194214,.112975,.794542,.092483,-.005222,-.041043,1.046265],[.152286,1.052583,-.204868,.114503,.786281,.099216,-.003882,-.048116,1.051998]],K2t=[[1,0,-0,0,1,0,-0,-0,1],[.866435,.177704,-.044139,.049567,.939063,.01137,-.003453,.007233,.99622],[.760729,.319078,-.079807,.090568,.889315,.020117,-.006027,.013325,.992702],[.675425,.43385,-.109275,.125303,.847755,.026942,-.00795,.018572,.989378],[.605511,.52856,-.134071,.155318,.812366,.032316,-.009376,.023176,.9862],[.547494,.607765,-.155259,.181692,.781742,.036566,-.01041,.027275,.983136],[.498864,.674741,-.173604,.205199,.754872,.039929,-.011131,.030969,.980162],[.457771,.731899,-.18967,.226409,.731012,.042579,-.011595,.034333,.977261],[.422823,.781057,-.203881,.245752,.709602,.044646,-.011843,.037423,.974421],[.392952,.82361,-.216562,.263559,.69021,.046232,-.01191,.040281,.97163],[.367322,.860646,-.227968,.280085,.672501,.047413,-.01182,.04294,.968881]],J2t=[[1,0,-0,0,1,0,-0,-0,1],[.92667,.092514,-.019184,.021191,.964503,.014306,.008437,.054813,.93675],[.89572,.13333,-.02905,.029997,.9454,.024603,.013027,.104707,.882266],[.905871,.127791,-.033662,.026856,.941251,.031893,.01341,.148296,.838294],[.948035,.08949,-.037526,.014364,.946792,.038844,.010853,.193991,.795156],[1.017277,.027029,-.044306,-.006113,.958479,.047634,.006379,.248708,.744913],[1.104996,-.046633,-.058363,-.032137,.971635,.060503,.001336,.317922,.680742],[1.193214,-.109812,-.083402,-.058496,.97941,.079086,-.002346,.403492,.598854],[1.257728,-.139648,-.118081,-.078003,.975409,.102594,-.003316,.501214,.502102],[1.278864,-.125333,-.153531,-.084748,.957674,.127074,-989e-6,.601151,.399838],[1.255528,-.076749,-.178779,-.078411,.930809,.147602,.004733,.691367,.3039]],HU=(e,t)=>{let r=Math.max(0,Math.min(1,t)),i=Math.round(r/.1),n=Math.round(r%.1),a=e[i];if(n>0&&i<e.length-1){let o=e[i+1];a=a.map((s,l)=>kx(a[l],o[l],n))}return o=>{let s=Pp(o);if(s===void 0)return;let{r:l,g:u,b:c}=X2t(s),f={mode:"rgb",r:a[0]*l+a[1]*u+a[2]*c,g:a[3]*l+a[4]*u+a[5]*c,b:a[6]*l+a[7]*u+a[8]*c};return s.alpha!==void 0&&(f.alpha=s.alpha),ys(s.mode)(f)}},Q2t=(e=1)=>HU(Z2t,e),ext=(e=1)=>HU(K2t,e),txt=(e=1)=>HU(J2t,e),rxt=e=>e*e*(3-2*e),ixt=e=>.5-Math.sin(Math.asin(1-2*e)/3),nxt=e=>e*e*e*(e*(e*6-15)+10),axt=nxt,oxt=e=>(1-Math.cos(e*Math.PI))/2,sxt=oxt;function dU(e){let t=ys("lrgb")(e);return .2126*t.r+.7152*t.g+.0722*t.b}function lxt(e,t){let r=dU(e),i=dU(t);return(Math.max(r,i)+.05)/(Math.min(r,i)+.05)}var uxt=jo(Kle),cxt=jo(rue),fxt=jo(sue),hxt=jo(lue),dxt=jo(fue),pxt=jo(xU),vxt=jo(wU),gxt=jo(xue),mxt=jo(wue),yxt=jo(Tue),xxt=jo(Aue),_xt=jo(LC),bxt=jo(Sue),wxt=jo(PC),Txt=jo(kue),Axt=jo(Fue),Mxt=jo(Lue),Sxt=jo(Pue),Ext=jo(Rue),kxt=jo(zue),Cxt=jo(que),Dxt=jo(Nue),Fxt=jo(Uue),Lxt=jo(Vue),Pxt=jo(Gue),Ixt=jo(Fx),Rxt=jo(Wue),zxt=jo(Yue),Bxt=jo(Kue),qxt=jo(ece)});var cy=W((V7r,Ace)=>{"use strict";var bce={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:500,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},wce={};function Tce(e,t){for(var r in e){var i=e[r];i.valType?t[r]=i.dflt:(t[r]||(t[r]={}),Tce(i,t[r]))}}Tce(bce,wce);Ace.exports={configAttributes:bce,dfltConfig:wce}});var $U=W((G7r,Mce)=>{"use strict";var jU=vi(),Oxt=sn(),Y6=[];Mce.exports=function(e,t,r){var s;if(((s=r==null?void 0:r._context)==null?void 0:s.displayNotifier)===!1||Y6.indexOf(e)!==-1)return;Y6.push(e);var i=1e3;Oxt(t)?i=t:t==="long"&&(i=3e3);var n=jU.select("body").selectAll(".plotly-notifier").data([0]);n.enter().append("div").classed("plotly-notifier",!0);var a=n.selectAll(".notifier-note").data(Y6);function o(l){l.duration(700).style("opacity",0).each("end",function(u){var c=Y6.indexOf(u);c!==-1&&Y6.splice(c,1),jU.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(l){var u=jU.select(this);u.append("button").classed("notifier-close",!0).html("&times;").on("click",function(){u.transition().call(o)});for(var c=u.append("p"),f=l.split(/<br\s*\/?>/g),h=0;h<f.length;h++)h&&c.append("br"),c.append("span").text(f[h]);t==="stick"?u.transition().duration(350).style("opacity",1):u.transition().duration(700).style("opacity",1).transition().delay(i).call(o)})}});var Eg=W((H7r,Sce)=>{"use strict";var X3=cy().dfltConfig,WU=$U(),YU=Sce.exports={};YU.log=function(){var e;if(X3.logging>1){var t=["LOG:"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.trace.apply(console,t)}if(X3.notifyOnLogging>1){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);WU(r.join("<br>"),"long")}};YU.warn=function(){var e;if(X3.logging>0){var t=["WARN:"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.trace.apply(console,t)}if(X3.notifyOnLogging>0){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);WU(r.join("<br>"),"stick")}};YU.error=function(){var e;if(X3.logging>0){var t=["ERROR:"];for(e=0;e<arguments.length;e++)t.push(arguments[e]);console.error.apply(console,t)}if(X3.notifyOnLogging>0){var r=[];for(e=0;e<arguments.length;e++)r.push(arguments[e]);WU(r.join("<br>"),"stick")}}});var Vl=W(Ix=>{"use strict";Ix.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];Ix.defaultLine="#444";Ix.lightLine="#eee";Ix.background="#fff";Ix.borderLine="#BEC8D9";Ix.lightFraction=1e3/11});var ni=W(($7r,Rce)=>{"use strict";var{converter:Ece,formatHex:Nxt,formatRgb:Uxt,wcagContrast:Vxt,wcagLuminance:Gxt}=_ce(),{isArrayOrTypedArray:kce}=yc(),{warn:Hxt}=Eg(),{background:Z6,defaultLine:KU,defaults:jxt,lightLine:$xt}=Vl(),Cce=Ece("rgb"),Wxt=Ece("hsl"),Dce=e=>{if(typeof e!="string")return;let t=e.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(t))try{return Cce(t)}catch(r){return}},xf=e=>e>0?e>1?1:e:0,Yxt={mode:"rgb",r:0,g:0,b:0,alpha:1},XU=e=>Math.round(e*255e6)/255e6,Fce=e=>ma(fn({},e),{r:XU(e.r),g:XU(e.g),b:XU(e.b)}),h0=e=>Uxt(Fce(e)),Xxt=e=>Nxt(Fce(e)),Zxt=e=>{var t,r,i,n;return typeof e=="string"?`"${e}"`:kce(e)?`${(r=(t=e.constructor)==null?void 0:t.name)!=null?r:"Array"}(${e.length})`:typeof e=="object"?(n=(i=e.constructor)==null?void 0:i.name)!=null?n:"Object":`${typeof e} ${e}`},el=(e,t)=>{var i;let r=Dce(e);return r?((i=r.alpha)!=null||(r.alpha=1),r):(!t&&e!=null&&Hxt(`Invalid color specifier: ${Zxt(e)}. Defaulting to "#000"`),Yxt)},X6=e=>h0(ma(fn({},el(e)),{alpha:1})),Kxt=e=>e?el(e).alpha:0,Lce=e=>kce(e)&&e.length>2&&Number.isFinite(e[0])&&Number.isFinite(e[1])&&Number.isFinite(e[2]),Jxt=e=>{let[t,r,i,n]=e,a=Math.max(t,r,i)>1?1/255:1,o=n!=null?n:1;return{mode:"rgb",r:t*a,g:r*a,b:i*a,alpha:o>1?o/255:o}},Qxt=(e,t)=>{let r=Lce(e)?Jxt(e):el(e,!0),i=[xf(r.r),xf(r.g),xf(r.b),xf(r.alpha)];return t==="uint8"||t==="uint8_clamped"?Uint8Array.from(i,n=>Math.round(n*255)):t==="float32"?Float32Array.from(i):t==="float64"?Float64Array.from(i):i},e_t=(e,t)=>h0(ma(fn({},el(e)),{alpha:xf(t)})),Pce=(e,t)=>{let r=el(e),i=r.alpha;if(i===1)return h0(r);let n=el(t||Z6),a=n.alpha,o=(s,l)=>(a===1?l:1-a+l*a)*(1-i)+s*i;return h0({mode:"rgb",r:o(r.r,n.r),g:o(r.g,n.g),b:o(r.b,n.b)})},t_t=(e,t,r)=>{let i=el(e),n=el(t),a=(o,s)=>r*o+(1-r)*s;return h0({mode:"rgb",r:a(i.r,n.r),g:a(i.g,n.g),b:a(i.b,n.b)})},ZU=(e,t)=>{let r=el(e),i=Wxt(r)||{mode:"hsl",h:0,s:0,l:0};return h0(Cce(ma(fn({},i),{l:xf((i.l*100+t)/100),alpha:r.alpha})))},zC=(e,t)=>Vxt(el(e),el(t)),Ice=e=>zC(e,Z6)>zC(e,KU),r_t=h0(el(Z6)),i_t=h0(el(KU)),n_t=(e,t,r)=>(el(e).alpha!==1&&(e=Pce(e,Z6)),Ice(e)?t?ZU(e,t):r_t:r?ZU(e,-r):i_t),a_t=(e,t)=>{e.style({stroke:X6(t),"stroke-opacity":el(t).alpha})},o_t=(e,t)=>{e.style({fill:X6(t),"fill-opacity":el(t).alpha})},s_t=(e,t)=>!!(e&&t&&X6(e)===X6(t)),l_t=e=>Dce(e)!==void 0,u_t=(e,t)=>{t=t===0?0:t||10;let r=el(e),i=t/100;return h0(ma(fn({},r),{r:xf(r.r+i),g:xf(r.g+i),b:xf(r.b+i)}))},c_t=(e,t,r)=>{let i=el(e),n=el(t),a=r/100,o=n.alpha-i.alpha,s=2*a-1,l=((s*o===-1?s:(s+o)/(1+s*o))+1)/2,u=1-l,c=(f,h)=>u*f+l*h;return h0({mode:"rgb",r:c(i.r,n.r),g:c(i.g,n.g),b:c(i.b,n.b),alpha:i.alpha*(1-a)+n.alpha*a})},f_t=(e,t=["#000","#fff"])=>{let r,i=-1/0;for(let n of t){let a=zC(e,n);a>i&&(i=a,r=h0(el(n)))}return r},h_t=e=>h0(el(e)),d_t=e=>Xxt(el(e)).toUpperCase(),p_t=e=>{let t=el(e);return[xf(t.r)*255,xf(t.g)*255,xf(t.b)*255,xf(t.alpha)]},v_t=([e,t,r,i])=>h0({mode:"rgb",r:e/255,g:t/255,b:r/255,alpha:i}),g_t=e=>{let t=el(e);return Gxt({mode:"rgb",r:xf(t.r),g:xf(t.g),b:xf(t.b)})};Rce.exports={addOpacity:e_t,adjustLightness:ZU,background:Z6,brighten:u_t,combine:Pce,contrast:n_t,defaultLine:KU,defaults:jxt,equals:s_t,fill:o_t,hexString:d_t,interpolate:t_t,isChannelArray:Lce,isDark:Ice,isValid:l_t,lightLine:$xt,luminosity:g_t,mix:c_t,mostReadable:f_t,normalize:Qxt,opacity:Kxt,parse:el,rgb:X6,rgbaArray:p_t,rgbaArrayToString:v_t,rgbaString:h_t,stroke:a_t,wcagContrast:zC}});var Rx=W((Y7r,qce)=>{"use strict";var m_t=ni(),BC={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)"]]},zce=BC.RdBu;function y_t(e,t){if(t||(t=zce),!e)return t;function r(){try{e=BC[e]||JSON.parse(e)}catch(i){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),Bce(e)?e:t}function Bce(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||+e[0][0]!=0||+e[e.length-1][0]!=1)return!1;for(var r=0;r<e.length;r++){var i=e[r];if(i.length!==2||+i[0]<t||!m_t.isValid(i[1]))return!1;t=+i[0]}return!0}function x_t(e){return BC[e]!==void 0?!0:Bce(e)}qce.exports={scales:BC,defaultScale:zce,get:y_t,isValid:x_t}});var kg=W((X7r,Oce)=>{"use strict";Oce.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var Z3={};Fp(Z3,{counter:()=>__t});function __t(e,t="",r,i){let n=t+(r?"":"$"),a=i===!1?"":"^";return e==="xy"?new RegExp(a+"x"+JU+"y"+JU+n):new RegExp(a+e+JU+n)}var JU,K3=Ea(()=>{"use strict";JU="([2-9]|[1-9][0-9]+)?"});var Vce=W(Ph=>{"use strict";var QU=sn(),Nce=tn().extendFlat,b_t=Wa(),w_t=Rx(),eV=ni(),T_t=kg().DESELECTDIM,J3=k6(),Uce=(K3(),Go(Z3)).counter,A_t=(O3(),Go(q3)).modHalf,Ip=yc().isArrayOrTypedArray,fy=yc().isTypedArraySpec,hy=yc().decodeTypedArraySpec;Ph.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(Ip(e)?e:fy(e)?hy(e):r)}},enumerated:{coerceFunction:function(e,t,r,i){i.coerceNumber&&(e=+e),i.values.indexOf(e)===-1?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,i=0;i<r.length;i++){var n=String(r[i]);if(n.charAt(0)==="/"&&n.charAt(n.length-1)==="/"){var a=new RegExp(n.slice(1,-1));if(a.test(e))return!0}else if(e===r[i])return!0}return!1}},boolean:{coerceFunction:function(e,t,r,i){let n=a=>a===!0||a===!1;n(e)||i.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(n)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,t,r,i){fy(e)&&(e=hy(e)),!QU(e)||i.min!==void 0&&e<i.min||i.max!==void 0&&e>i.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,i){if((i.extras||[]).indexOf(e)!==-1){t.set(e);return}fy(e)&&(e=hy(e)),e%1||!QU(e)||i.min!==void 0&&e<i.min||i.max!==void 0&&e>i.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,i){if(typeof e!="string"){var n=typeof e=="number";i.strict===!0||!n?t.set(r):t.set(String(e))}else i.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){fy(e)&&(e=hy(e)),eV.isValid(e)?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){!Array.isArray(e)||!e.length?t.set(r):e.every(i=>eV.isValid(i))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(w_t.get(e,r))}},angle:{coerceFunction:function(e,t,r){fy(e)&&(e=hy(e)),e==="auto"?t.set("auto"):QU(e)?t.set(A_t(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,i){var n=i.regex||Uce(r);let a=o=>typeof o=="string"&&n.test(o);a(e)||i.arrayOk&&Ip(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!="string"?!1:!!Uce(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,i){if((i.extras||[]).indexOf(e)!==-1){t.set(e);return}if(typeof e!="string"){t.set(r);return}for(var n=e.split("+"),a=0;a<n.length;){var o=n[a];i.flags.indexOf(o)===-1||n.indexOf(o)<a?n.splice(a,1):a++}n.length?t.set(n.join("+")):t.set(r)}},any:{coerceFunction:function(e,t,r){e===void 0?t.set(r):t.set(fy(e)?hy(e):e)}},info_array:{coerceFunction:function(e,t,r,i){function n(w,b,_){var M,x={set:function(T){M=T}};return _===void 0&&(_=b.dflt),Ph.valObjectMeta[b.valType].coerceFunction(w,x,_,b),M}if(fy(e)&&(e=hy(e)),!Ip(e)){t.set(r);return}var a=i.dimensions===2||i.dimensions==="1-2"&&Array.isArray(e)&&Ip(e[0]),o=i.items,s=[],l=Array.isArray(o),u=l&&a&&Ip(o[0]),c=a&&l&&!u,f=l&&!c?o.length:e.length,h,d,p,v,m,g;if(r=Array.isArray(r)?r:[],a)for(h=0;h<f;h++)for(s[h]=[],p=Ip(e[h])?e[h]:[],c?m=o.length:l?m=o[h].length:m=p.length,d=0;d<m;d++)c?v=o[d]:l?v=o[h][d]:v=o,g=n(p[d],v,(r[h]||[])[d]),g!==void 0&&(s[h][d]=g);else for(h=0;h<f;h++)g=n(e[h],l?o[h]:o,r[h]),g!==void 0&&(s[h]=g);t.set(s)},validateFunction:function(e,t){if(!Ip(e))return!1;var r=t.items,i=Array.isArray(r),n=t.dimensions===2;if(!t.freeLength&&e.length!==r.length)return!1;for(var a=0;a<e.length;a++)if(n){if(!Ip(e[a])||!t.freeLength&&e[a].length!==r[a].length)return!1;for(var o=0;o<e[a].length;o++)if(!qC(e[a][o],i?r[a][o]:r))return!1}else if(!qC(e[a],i?r[a]:r))return!1;return!0}}};Ph.coerce=function(e,t,r,i,n){var a=J3(r,i).get(),o=J3(e,i),s=J3(t,i),l=o.get(),u=t._template;if(l===void 0&&u&&(l=J3(u,i).get(),u=0),n===void 0&&(n=a.dflt),a.arrayOk){if(Ip(l))return s.set(l),l;if(fy(l))return l=hy(l),s.set(l),l}var c=Ph.valObjectMeta[a.valType].coerceFunction;c(l,s,n,a);var f=s.get();return u&&f===n&&!qC(l,a)&&(l=J3(u,i).get(),c(l,s,n,a),f=s.get()),f};Ph.coerce2=function(e,t,r,i,n){var a=J3(e,i),o=Ph.coerce(e,t,r,i,n),s=a.get();return s!=null?o:!1};Ph.coerceFont=function(e,t,r,i){i||(i={}),r=Nce({},r),r=Nce(r,i.overrideDflt||{});var n={family:e(t+".family",r.family),size:e(t+".size",r.size),color:e(t+".color",r.color),weight:e(t+".weight",r.weight),style:e(t+".style",r.style)};if(i.noFontVariant||(n.variant=e(t+".variant",r.variant)),i.noFontLineposition||(n.lineposition=e(t+".lineposition",r.lineposition)),i.noFontTextcase||(n.textcase=e(t+".textcase",r.textcase)),!i.noFontShadow){var a=r.shadow;a==="none"&&i.autoShadowDflt&&(a="auto"),n.shadow=e(t+".shadow",a)}return n};Ph.coercePattern=function(e,t,r,i){var n=e(t+".shape"),a;if(n||(a=e(t+".path")),n||a){n&&e(t+".solidity"),e(t+".size");var o=e(t+".fillmode"),s=o==="overlay";if(!i){var l=e(t+".bgcolor",s?r:void 0);e(t+".fgcolor",s?eV.contrast(l):r)}e(t+".fgopacity",s?.5:1)}};Ph.coerceHoverinfo=function(e,t,r){var i=t._module.attributes,n=i.hoverinfo?i:b_t,a=n.hoverinfo,o;if(r._dataLength===1){var s=a.dflt==="all"?a.flags.slice():a.dflt.split("+");s.splice(s.indexOf("name"),1),o=s.join("+")}return Ph.coerce(e,t,n,"hoverinfo",o)};Ph.coerceSelectionMarkerOpacity=function(e,t){if(e.marker){var r=e.marker.opacity;if(r!==void 0){var i,n;!Ip(r)&&!e.selected&&!e.unselected&&(i=r,n=T_t*r),t("selected.marker.opacity",i),t("unselected.marker.opacity",n)}}};function qC(e,t){var r=Ph.valObjectMeta[t.valType];if(t.arrayOk&&Ip(e))return!0;if(r.validateFunction)return r.validateFunction(e,t);var i={},n=i,a={set:function(o){n=o}};return r.coerceFunction(e,a,i,t),n!==i}Ph.validate=qC});var OC=W((K7r,Gce)=>{"use strict";Gce.exports=function(){}});var tV=W((J7r,Hce)=>{"use strict";Hce.exports=function(t,r){if(r instanceof RegExp){for(var i=r.toString(),n=0;n<t.length;n++)if(t[n]instanceof RegExp&&t[n].toString()===i)return t;t.push(r)}else(r||r===0)&&t.indexOf(r)===-1&&t.push(r);return t}});var $ce=W((Q7r,jce)=>{jce.exports=M_t;function M_t(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Yce=W((eFr,Wce)=>{Wce.exports=S_t;function S_t(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}});var Zce=W((tFr,Xce)=>{Xce.exports=E_t;function E_t(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var rV=W((rFr,Kce)=>{Kce.exports=k_t;function k_t(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Qce=W((iFr,Jce)=>{Jce.exports=C_t;function C_t(e,t){if(e===t){var r=t[1],i=t[2],n=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=i,e[9]=a,e[11]=t[14],e[12]=n,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}});var tfe=W((nFr,efe)=>{efe.exports=D_t;function D_t(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],p=t[12],v=t[13],m=t[14],g=t[15],w=r*s-i*o,b=r*l-n*o,_=r*u-a*o,M=i*l-n*s,x=i*u-a*s,T=n*u-a*l,A=c*v-f*p,y=c*m-h*p,E=c*g-d*p,S=f*m-h*v,C=f*g-d*v,k=h*g-d*m,D=w*k-b*C+_*S+M*E-x*y+T*A;return D?(D=1/D,e[0]=(s*k-l*C+u*S)*D,e[1]=(n*C-i*k-a*S)*D,e[2]=(v*T-m*x+g*M)*D,e[3]=(h*x-f*T-d*M)*D,e[4]=(l*E-o*k-u*y)*D,e[5]=(r*k-n*E+a*y)*D,e[6]=(m*_-p*T-g*b)*D,e[7]=(c*T-h*_+d*b)*D,e[8]=(o*C-s*E+u*A)*D,e[9]=(i*E-r*C-a*A)*D,e[10]=(p*x-v*_+g*w)*D,e[11]=(f*_-c*x-d*w)*D,e[12]=(s*y-o*S-l*A)*D,e[13]=(r*S-i*y+n*A)*D,e[14]=(v*b-p*M-m*w)*D,e[15]=(c*M-f*b+h*w)*D,e):null}});var ife=W((aFr,rfe)=>{rfe.exports=F_t;function F_t(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],p=t[12],v=t[13],m=t[14],g=t[15];return e[0]=s*(h*g-d*m)-f*(l*g-u*m)+v*(l*d-u*h),e[1]=-(i*(h*g-d*m)-f*(n*g-a*m)+v*(n*d-a*h)),e[2]=i*(l*g-u*m)-s*(n*g-a*m)+v*(n*u-a*l),e[3]=-(i*(l*d-u*h)-s*(n*d-a*h)+f*(n*u-a*l)),e[4]=-(o*(h*g-d*m)-c*(l*g-u*m)+p*(l*d-u*h)),e[5]=r*(h*g-d*m)-c*(n*g-a*m)+p*(n*d-a*h),e[6]=-(r*(l*g-u*m)-o*(n*g-a*m)+p*(n*u-a*l)),e[7]=r*(l*d-u*h)-o*(n*d-a*h)+c*(n*u-a*l),e[8]=o*(f*g-d*v)-c*(s*g-u*v)+p*(s*d-u*f),e[9]=-(r*(f*g-d*v)-c*(i*g-a*v)+p*(i*d-a*f)),e[10]=r*(s*g-u*v)-o*(i*g-a*v)+p*(i*u-a*s),e[11]=-(r*(s*d-u*f)-o*(i*d-a*f)+c*(i*u-a*s)),e[12]=-(o*(f*m-h*v)-c*(s*m-l*v)+p*(s*h-l*f)),e[13]=r*(f*m-h*v)-c*(i*m-n*v)+p*(i*h-n*f),e[14]=-(r*(s*m-l*v)-o*(i*m-n*v)+p*(i*l-n*s)),e[15]=r*(s*h-l*f)-o*(i*h-n*f)+c*(i*l-n*s),e}});var afe=W((oFr,nfe)=>{nfe.exports=L_t;function L_t(e){var t=e[0],r=e[1],i=e[2],n=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],h=e[11],d=e[12],p=e[13],v=e[14],m=e[15],g=t*o-r*a,w=t*s-i*a,b=t*l-n*a,_=r*s-i*o,M=r*l-n*o,x=i*l-n*s,T=u*p-c*d,A=u*v-f*d,y=u*m-h*d,E=c*v-f*p,S=c*m-h*p,C=f*m-h*v;return g*C-w*S+b*E+_*y-M*A+x*T}});var sfe=W((sFr,ofe)=>{ofe.exports=P_t;function P_t(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],h=t[9],d=t[10],p=t[11],v=t[12],m=t[13],g=t[14],w=t[15],b=r[0],_=r[1],M=r[2],x=r[3];return e[0]=b*i+_*s+M*f+x*v,e[1]=b*n+_*l+M*h+x*m,e[2]=b*a+_*u+M*d+x*g,e[3]=b*o+_*c+M*p+x*w,b=r[4],_=r[5],M=r[6],x=r[7],e[4]=b*i+_*s+M*f+x*v,e[5]=b*n+_*l+M*h+x*m,e[6]=b*a+_*u+M*d+x*g,e[7]=b*o+_*c+M*p+x*w,b=r[8],_=r[9],M=r[10],x=r[11],e[8]=b*i+_*s+M*f+x*v,e[9]=b*n+_*l+M*h+x*m,e[10]=b*a+_*u+M*d+x*g,e[11]=b*o+_*c+M*p+x*w,b=r[12],_=r[13],M=r[14],x=r[15],e[12]=b*i+_*s+M*f+x*v,e[13]=b*n+_*l+M*h+x*m,e[14]=b*a+_*u+M*d+x*g,e[15]=b*o+_*c+M*p+x*w,e}});var ufe=W((lFr,lfe)=>{lfe.exports=I_t;function I_t(e,t,r){var i=r[0],n=r[1],a=r[2],o,s,l,u,c,f,h,d,p,v,m,g;return t===e?(e[12]=t[0]*i+t[4]*n+t[8]*a+t[12],e[13]=t[1]*i+t[5]*n+t[9]*a+t[13],e[14]=t[2]*i+t[6]*n+t[10]*a+t[14],e[15]=t[3]*i+t[7]*n+t[11]*a+t[15]):(o=t[0],s=t[1],l=t[2],u=t[3],c=t[4],f=t[5],h=t[6],d=t[7],p=t[8],v=t[9],m=t[10],g=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=h,e[7]=d,e[8]=p,e[9]=v,e[10]=m,e[11]=g,e[12]=o*i+c*n+p*a+t[12],e[13]=s*i+f*n+v*a+t[13],e[14]=l*i+h*n+m*a+t[14],e[15]=u*i+d*n+g*a+t[15]),e}});var ffe=W((uFr,cfe)=>{cfe.exports=R_t;function R_t(e,t,r){var i=r[0],n=r[1],a=r[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var dfe=W((cFr,hfe)=>{hfe.exports=z_t;function z_t(e,t,r,i){var n=i[0],a=i[1],o=i[2],s=Math.sqrt(n*n+a*a+o*o),l,u,c,f,h,d,p,v,m,g,w,b,_,M,x,T,A,y,E,S,C,k,D,F;return Math.abs(s)<1e-6?null:(s=1/s,n*=s,a*=s,o*=s,l=Math.sin(r),u=Math.cos(r),c=1-u,f=t[0],h=t[1],d=t[2],p=t[3],v=t[4],m=t[5],g=t[6],w=t[7],b=t[8],_=t[9],M=t[10],x=t[11],T=n*n*c+u,A=a*n*c+o*l,y=o*n*c-a*l,E=n*a*c-o*l,S=a*a*c+u,C=o*a*c+n*l,k=n*o*c+a*l,D=a*o*c-n*l,F=o*o*c+u,e[0]=f*T+v*A+b*y,e[1]=h*T+m*A+_*y,e[2]=d*T+g*A+M*y,e[3]=p*T+w*A+x*y,e[4]=f*E+v*S+b*C,e[5]=h*E+m*S+_*C,e[6]=d*E+g*S+M*C,e[7]=p*E+w*S+x*C,e[8]=f*k+v*D+b*F,e[9]=h*k+m*D+_*F,e[10]=d*k+g*D+M*F,e[11]=p*k+w*D+x*F,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var vfe=W((fFr,pfe)=>{pfe.exports=B_t;function B_t(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*n+u*i,e[5]=o*n+c*i,e[6]=s*n+f*i,e[7]=l*n+h*i,e[8]=u*n-a*i,e[9]=c*n-o*i,e[10]=f*n-s*i,e[11]=h*n-l*i,e}});var mfe=W((hFr,gfe)=>{gfe.exports=q_t;function q_t(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n-u*i,e[1]=o*n-c*i,e[2]=s*n-f*i,e[3]=l*n-h*i,e[8]=a*i+u*n,e[9]=o*i+c*n,e[10]=s*i+f*n,e[11]=l*i+h*n,e}});var xfe=W((dFr,yfe)=>{yfe.exports=O_t;function O_t(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],h=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n+u*i,e[1]=o*n+c*i,e[2]=s*n+f*i,e[3]=l*n+h*i,e[4]=u*n-a*i,e[5]=c*n-o*i,e[6]=f*n-s*i,e[7]=h*n-l*i,e}});var bfe=W((pFr,_fe)=>{_fe.exports=N_t;function N_t(e,t,r){var i,n,a,o=r[0],s=r[1],l=r[2],u=Math.sqrt(o*o+s*s+l*l);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,s*=u,l*=u,i=Math.sin(t),n=Math.cos(t),a=1-n,e[0]=o*o*a+n,e[1]=s*o*a+l*i,e[2]=l*o*a-s*i,e[3]=0,e[4]=o*s*a-l*i,e[5]=s*s*a+n,e[6]=l*s*a+o*i,e[7]=0,e[8]=o*l*a+s*i,e[9]=s*l*a-o*i,e[10]=l*l*a+n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var Tfe=W((vFr,wfe)=>{wfe.exports=U_t;function U_t(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=i+i,l=n+n,u=a+a,c=i*s,f=i*l,h=i*u,d=n*l,p=n*u,v=a*u,m=o*s,g=o*l,w=o*u;return e[0]=1-(d+v),e[1]=f+w,e[2]=h-g,e[3]=0,e[4]=f-w,e[5]=1-(c+v),e[6]=p+m,e[7]=0,e[8]=h+g,e[9]=p-m,e[10]=1-(c+d),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var Mfe=W((gFr,Afe)=>{Afe.exports=V_t;function V_t(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Efe=W((mFr,Sfe)=>{Sfe.exports=G_t;function G_t(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var Cfe=W((yFr,kfe)=>{kfe.exports=H_t;function H_t(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Ffe=W((xFr,Dfe)=>{Dfe.exports=j_t;function j_t(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Pfe=W((_Fr,Lfe)=>{Lfe.exports=$_t;function $_t(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Rfe=W((bFr,Ife)=>{Ife.exports=W_t;function W_t(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=r+r,s=i+i,l=n+n,u=r*o,c=i*o,f=i*s,h=n*o,d=n*s,p=n*l,v=a*o,m=a*s,g=a*l;return e[0]=1-f-p,e[1]=c+g,e[2]=h-m,e[3]=0,e[4]=c-g,e[5]=1-u-p,e[6]=d+v,e[7]=0,e[8]=h+m,e[9]=d-v,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Bfe=W((wFr,zfe)=>{zfe.exports=Y_t;function Y_t(e,t,r,i,n,a,o){var s=1/(r-t),l=1/(n-i),u=1/(a-o);return e[0]=a*2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a*2*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(n+i)*l,e[10]=(o+a)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*u,e[15]=0,e}});var Ofe=W((TFr,qfe)=>{qfe.exports=X_t;function X_t(e,t,r,i,n){var a=1/Math.tan(t/2),o=1/(i-n);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(n+i)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*n*i*o,e[15]=0,e}});var Ufe=W((AFr,Nfe)=>{Nfe.exports=Z_t;function Z_t(e,t,r,i){var n=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(n+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(n-a)*u*.5,e[10]=i/(r-i),e[11]=-1,e[12]=0,e[13]=0,e[14]=i*r/(r-i),e[15]=0,e}});var Gfe=W((MFr,Vfe)=>{Vfe.exports=K_t;function K_t(e,t,r,i,n,a,o){var s=1/(t-r),l=1/(i-n),u=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(n+i)*l,e[14]=(o+a)*u,e[15]=1,e}});var jfe=W((SFr,Hfe)=>{var J_t=rV();Hfe.exports=Q_t;function Q_t(e,t,r,i){var n,a,o,s,l,u,c,f,h,d,p=t[0],v=t[1],m=t[2],g=i[0],w=i[1],b=i[2],_=r[0],M=r[1],x=r[2];return Math.abs(p-_)<1e-6&&Math.abs(v-M)<1e-6&&Math.abs(m-x)<1e-6?J_t(e):(c=p-_,f=v-M,h=m-x,d=1/Math.sqrt(c*c+f*f+h*h),c*=d,f*=d,h*=d,n=w*h-b*f,a=b*c-g*h,o=g*f-w*c,d=Math.sqrt(n*n+a*a+o*o),d?(d=1/d,n*=d,a*=d,o*=d):(n=0,a=0,o=0),s=f*o-h*a,l=h*n-c*o,u=c*a-f*n,d=Math.sqrt(s*s+l*l+u*u),d?(d=1/d,s*=d,l*=d,u*=d):(s=0,l=0,u=0),e[0]=n,e[1]=s,e[2]=c,e[3]=0,e[4]=a,e[5]=l,e[6]=f,e[7]=0,e[8]=o,e[9]=u,e[10]=h,e[11]=0,e[12]=-(n*p+a*v+o*m),e[13]=-(s*p+l*v+u*m),e[14]=-(c*p+f*v+h*m),e[15]=1,e)}});var Wfe=W((EFr,$fe)=>{$fe.exports=ebt;function ebt(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}});var iV=W((kFr,Yfe)=>{Yfe.exports={create:$ce(),clone:Yce(),copy:Zce(),identity:rV(),transpose:Qce(),invert:tfe(),adjoint:ife(),determinant:afe(),multiply:sfe(),translate:ufe(),scale:ffe(),rotate:dfe(),rotateX:vfe(),rotateY:mfe(),rotateZ:xfe(),fromRotation:bfe(),fromRotationTranslation:Tfe(),fromScaling:Mfe(),fromTranslation:Efe(),fromXRotation:Cfe(),fromYRotation:Ffe(),fromZRotation:Pfe(),fromQuat:Rfe(),frustum:Bfe(),perspective:Ofe(),perspectiveFromFieldOfView:Ufe(),ortho:Gfe(),lookAt:jfe(),str:Wfe()}});var NC=W(Ml=>{"use strict";var tbt=iV();Ml.init2dArray=function(e,t){for(var r=new Array(e),i=0;i<e;i++)r[i]=new Array(t);return r};Ml.transposeRagged=function(e){var t=0,r=e.length,i,n;for(i=0;i<r;i++)t=Math.max(t,e[i].length);var a=new Array(t);for(i=0;i<t;i++)for(a[i]=new Array(r),n=0;n<r;n++)a[i][n]=e[n][i];return a};Ml.dot=function(e,t){if(!(e.length&&t.length)||e.length!==t.length)return null;var r=e.length,i,n;if(e[0].length)for(i=new Array(r),n=0;n<r;n++)i[n]=Ml.dot(e[n],t);else if(t[0].length){var a=Ml.transposeRagged(t);for(i=new Array(a.length),n=0;n<a.length;n++)i[n]=Ml.dot(e,a[n])}else for(i=0,n=0;n<r;n++)i+=e[n]*t[n];return i};Ml.translationMatrix=function(e,t){return[[1,0,e],[0,1,t],[0,0,1]]};Ml.rotationMatrix=function(e){var t=e*Math.PI/180;return[[Math.cos(t),-Math.sin(t),0],[Math.sin(t),Math.cos(t),0],[0,0,1]]};Ml.rotationXYMatrix=function(e,t,r){return Ml.dot(Ml.dot(Ml.translationMatrix(t,r),Ml.rotationMatrix(e)),Ml.translationMatrix(-t,-r))};Ml.apply3DTransform=function(e){return function(){var t=arguments,r=arguments.length===1?t[0]:[t[0],t[1],t[2]||0];return Ml.dot(e,[r[0],r[1],r[2],1]).slice(0,3)}};Ml.apply2DTransform=function(e){return function(){var t=arguments;t.length===3&&(t=t[0]);var r=arguments.length===1?t[0]:[t[0],t[1]];return Ml.dot(e,[r[0],r[1],1]).slice(0,2)}};Ml.apply2DTransform2=function(e){var t=Ml.apply2DTransform(e);return function(r){return t(r.slice(0,2)).concat(t(r.slice(2,4)))}};Ml.convertCssMatrix=function(e){if(e){var t=e.length;if(t===16)return e;if(t===6)return[e[0],e[1],0,0,e[2],e[3],0,0,0,0,1,0,e[4],e[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]};Ml.inverseTransformMatrix=function(e){var t=[];return tbt.invert(t,e),[[t[0],t[1],t[2],t[3]],[t[4],t[5],t[6],t[7]],[t[8],t[9],t[10],t[11]],[t[12],t[13],t[14],t[15]]]}});var K6=W((DFr,ehe)=>{"use strict";var rbt=vi(),Xfe=Eg(),ibt=NC(),nbt=iV();function abt(e){var t;if(typeof e=="string"){if(t=document.getElementById(e),t===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return t}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function obt(e){var t=rbt.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function Zfe(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function sbt(e,t){Kfe("global",e,t)}function Kfe(e,t,r){var i="plotly.js-style-"+e,n=document.getElementById(i);if(!(n&&n.matches(".no-inline-styles"))){n||(n=document.createElement("style"),n.setAttribute("id",i),n.appendChild(document.createTextNode("")),document.head.appendChild(n));var a=n.sheet;a?a.insertRule?a.insertRule(t+"{"+r+"}",0):a.addRule?a.addRule(t,r,0):Xfe.warn("addStyleRule failed"):Xfe.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function lbt(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&Zfe(r)}function ubt(e,t,r,i,n,a){var o=i.split(":"),s=n.split(":"),l="data-btn-style-event-added";a||(a=document),a.querySelectorAll(e).forEach(function(u){u.getAttribute(l)||(u.addEventListener("mouseenter",function(){var c=this.querySelector(r);c&&(c.style[o[0]]=o[1])}),u.addEventListener("mouseleave",function(){var c=this.querySelector(r);c&&(t&&this.matches(t)?c.style[o[0]]=o[1]:c.style[s[0]]=s[1])}),u.setAttribute(l,!0))})}function cbt(e){var t=Qfe(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach(function(i){var n=Jfe(i);if(n){var a=ibt.convertCssMatrix(n);r=nbt.multiply(r,r,a)}}),r}function Jfe(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return r==="none"?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(i){return+i})}function Qfe(e){for(var t=[];fbt(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function fbt(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function hbt(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}ehe.exports={getGraphDiv:abt,isPlotDiv:obt,removeElement:Zfe,addStyleRule:sbt,addRelatedStyleRule:Kfe,deleteRelatedStyleRule:lbt,setStyleOnHover:ubt,getFullTransformMatrix:cbt,getElementTransformMatrix:Jfe,getElementAndAncestors:Qfe,equalDomRects:hbt}});var J6=W((FFr,the)=>{"use strict";the.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}});var ls=W((LFr,lhe)=>{"use strict";var ihe=tn().extendFlat,dbt=oy(),nhe={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},ahe={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},pbt=nhe.flags.slice().concat(["fullReplot"]),vbt=ahe.flags.slice().concat("layoutReplot");lhe.exports={traces:nhe,layout:ahe,traceFlags:function(){return rhe(pbt)},layoutFlags:function(){return rhe(vbt)},update:function(e,t){var r=t.editType;if(r&&r!=="none")for(var i=r.split("+"),n=0;n<i.length;n++)e[i[n]]=!0},overrideAll:ohe};function rhe(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=!1;return t}function ohe(e,t,r){var i=ihe({},e);for(var n in i){var a=i[n];dbt(a)&&(i[n]=she(a,t,r,n))}return r==="from-root"&&(i.editType=t),i}function she(e,t,r,i){if(e.valType){var n=ihe({},e);if(n.editType=t,Array.isArray(e.items)){n.items=new Array(e.items.length);for(var a=0;a<e.items.length;a++)n.items[a]=she(e.items[a],t,"from-root")}return n}else return ohe(e,t,i.charAt(0)==="_"?"nested":"from-root")}});var Du=W(nV=>{"use strict";nV.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};nV.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},path:{valType:"string",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}});var aV=W((IFr,uhe)=>{"use strict";uhe.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}});var Ga=W(Q3=>{"use strict";var{DATE_FORMAT_LINK:gbt,FORMAT_LINK:mbt}=aV(),ybt=["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 xbt({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}".`,mbt,"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}".`,gbt,"for details on the date formatting syntax.",ybt].join(" ")}Q3.templateFormatStringDescription=xbt;Q3.hovertemplateAttrs=({editType:e="none",arrayOk:t}={},r={})=>fn({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});Q3.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>fn({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});Q3.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e});Q3.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})});var GC=W((BFr,vhe)=>{"use strict";function dy(e,t){return t?t.d2l(e):e}function che(e,t){return t?t.l2d(e):e}function _bt(e){return e.x0}function bbt(e){return e.x1}function wbt(e){return e.y0}function Tbt(e){return e.y1}function fhe(e){return e.x0shift||0}function hhe(e){return e.x1shift||0}function dhe(e){return e.y0shift||0}function phe(e){return e.y1shift||0}function UC(e,t){return dy(e.x1,t)+hhe(e)-dy(e.x0,t)-fhe(e)}function VC(e,t,r){return dy(e.y1,r)+phe(e)-dy(e.y0,r)-dhe(e)}function Abt(e,t){return Math.abs(UC(e,t))}function Mbt(e,t,r){return Math.abs(VC(e,t,r))}function Sbt(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(UC(e,t),2)+Math.pow(VC(e,t,r),2))}function Ebt(e,t){return che((dy(e.x1,t)+hhe(e)+dy(e.x0,t)+fhe(e))/2,t)}function kbt(e,t,r){return che((dy(e.y1,r)+phe(e)+dy(e.y0,r)+dhe(e))/2,r)}function Cbt(e,t,r){return e.type!=="line"?void 0:VC(e,t,r)/UC(e,t)}var Dbt=["x0","x1","y0","y1","dy","height","ycenter"],Fbt=["x0","x1","y0","y1","dx","width","xcenter"];vhe.exports={x0:_bt,x1:bbt,y0:wbt,y1:Tbt,slope:Cbt,dx:UC,dy:VC,width:Abt,height:Mbt,length:Sbt,xcenter:Ebt,ycenter:kbt,simpleXVariables:Dbt,simpleYVariables:Fbt}});var yhe=W((qFr,mhe)=>{"use strict";var Lbt=ls().overrideAll,zx=Wa(),ghe=Ho(),Pbt=Du().dash,py=tn().extendFlat,{shapeTexttemplateAttrs:Ibt,templatefallbackAttrs:Rbt}=Ga(),zbt=GC();mhe.exports=Lbt({newshape:{visible:py({},zx.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:py({},zx.legend,{}),legendgroup:py({},zx.legendgroup,{}),legendgrouptitle:{text:py({},zx.legendgrouptitle.text,{}),font:ghe({})},legendrank:py({},zx.legendrank,{}),legendwidth:py({},zx.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:py({},Pbt,{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:py({},zx.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:Ibt({newshape:!0},{keys:Object.keys(zbt)}),texttemplatefallback:Rbt({editType:"arraydraw"}),font:ghe({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var _he=W((OFr,xhe)=>{"use strict";var Bbt=Du().dash,qbt=tn().extendFlat;xhe.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:qbt({},Bbt,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}});var HC=W((NFr,bhe)=>{"use strict";bhe.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}});var ew=W((UFr,Mhe)=>{"use strict";var oV=Ho(),Obt=J6(),jC=Vl(),whe=yhe(),The=_he(),Nbt=HC(),Ahe=tn().extendFlat,$C=oV({editType:"calc"});$C.family.dflt='"Open Sans", verdana, arial, sans-serif';$C.size.dflt=12;$C.color.dflt=jC.defaultLine;Mhe.exports={font:$C,title:{text:{valType:"string",editType:"layoutstyle"},font:oV({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:oV({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:Ahe(Nbt({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:jC.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:jC.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:jC.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:whe.newshape,activeshape:whe.activeshape,newselection:The.newselection,activeselection:The.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:Ahe({},Obt.transition,{editType:"none"})}});var She=W(()=>{(function(){if(!document.getElementById("9f215cf04c5486422605d13261cb87401f4e7763b6296af81e98efbc0130da53")){var e=document.createElement("style");e.id="9f215cf04c5486422605d13261cb87401f4e7763b6296af81e98efbc0130da53",e.textContent='.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{position:absolute;left:0;top:0}.maplibregl-map:fullscreen{width:100%;height: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{position:absolute;pointer-events:none;z-index:2}.maplibregl-ctrl-top-left{top:0;left:0}.maplibregl-ctrl-top-right{top:0;right:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{right:0;bottom:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{margin:10px 0 0 10px;float:left}.maplibregl-ctrl-top-right .maplibregl-ctrl{margin:10px 10px 0 0;float:right}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{margin:0 0 10px 10px;float:left}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{margin:0 10px 10px 0;float:right}.maplibregl-ctrl-group{border-radius:4px;background:#fff}.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{width:29px;height:29px;display:block;padding:0;outline:none;border:0;box-sizing:border-box;background-color:transparent;cursor:pointer}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M10%2013c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h9c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M14.5%208.5c-.75%200-1.5.75-1.5%201.5v3h-3c-.75%200-1.5.75-1.5%201.5S9.25%2016%2010%2016h3v3c0%20.75.75%201.5%201.5%201.5S16%2019.75%2016%2019v-3h3c.75%200%201.5-.75%201.5-1.5S19.75%2013%2019%2013h-3v-3c0-.75-.75-1.5-1.5-1.5%22%2F%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M24%2016v5.5c0%201.75-.75%202.5-2.5%202.5H16v-1l3-1.5-4-5.5%201-1%205.5%204%201.5-3zM6%2016l1.5%203%205.5-4%201%201-4%205.5%203%201.5v1H7.5C5.75%2024%205%2023.25%205%2021.5V16zm7-11v1l-3%201.5%204%205.5-1%201-5.5-4L6%2013H5V7.5C5%205.75%205.75%205%207.5%205zm11%202.5c0-1.75-.75-2.5-2.5-2.5H16v1l3%201.5-4%205.5%201%201%205.5-4%201.5%203h1z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22M18.5%2016c-1.75%200-2.5.75-2.5%202.5V24h1l1.5-3%205.5%204%201-1-4-5.5%203-1.5v-1zM13%2018.5c0-1.75-.75-2.5-2.5-2.5H5v1l3%201.5L4%2024l1%201%205.5-4%201.5%203h1zm3-8c0%201.75.75%202.5%202.5%202.5H24v-1l-3-1.5L25%205l-1-1-5.5%204L17%205h-1zM10.5%2013c1.75%200%202.5-.75%202.5-2.5V5h-1l-1.5%203L5%204%204%205l4%205.5L5%2012v1z%22%2F%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2029%2029%22%3E%3Cpath%20d%3D%22m10.5%2014%204-8%204%208z%22%2F%3E%3Cpath%20fill%3D%22%23ccc%22%20d%3D%22m10.5%2016%204%208%204-8z%22%2F%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22none%22%20stroke%3D%22%23333%22%20viewBox%3D%220%200%2022%2022%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2211%22%20r%3D%228.5%22%2F%3E%3Cpath%20d%3D%22M17.5%2011c0%204.819-3.02%208.5-6.5%208.5S4.5%2015.819%204.5%2011%207.52%202.5%2011%202.5s6.5%203.681%206.5%208.5Z%22%2F%3E%3Cpath%20d%3D%22M13.5%2011c0%202.447-.331%204.64-.853%206.206-.262.785-.562%201.384-.872%201.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831%2015.64%208.5%2013.446%208.5%2011s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872%201.777.522%201.565.853%203.76.853%206.206Z%22%2F%3E%3Cpath%20d%3D%22M11%207.5c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138q.07-.058.224-.138c.299-.151.763-.302%201.379-.434C7.378%205.666%209.091%205.5%2011%205.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0%209c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138%201.3%201.3%200%200%201%20.224-.138c.299-.151.763-.302%201.379-.434C7.378%2014.666%209.091%2014.5%2011%2014.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138a1.3%201.3%200%200%201-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0-4c-2.46%200-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5%201.5%200%200%201-.39-.272.3.3%200%200%201-.047-.064.3.3%200%200%201%20.048-.064c.066-.073.189-.167.389-.272.399-.21%201.009-.413%201.805-.59C6.328%209.722%208.54%209.5%2011%209.5s4.672.222%206.256.574c.795.177%201.405.38%201.804.59.2.105.323.2.39.272a.3.3%200%200%201%20.047.064.3.3%200%200%201-.048.064%201.4%201.4%200%200%201-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0%20.018v.002zm17.002.002v-.002zm0-.018v-.002z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22none%22%20stroke%3D%22%2333b5e5%22%20viewBox%3D%220%200%2022%2022%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2211%22%20r%3D%228.5%22%2F%3E%3Cpath%20d%3D%22M17.5%2011c0%204.819-3.02%208.5-6.5%208.5S4.5%2015.819%204.5%2011%207.52%202.5%2011%202.5s6.5%203.681%206.5%208.5Z%22%2F%3E%3Cpath%20d%3D%22M13.5%2011c0%202.447-.331%204.64-.853%206.206-.262.785-.562%201.384-.872%201.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831%2015.64%208.5%2013.446%208.5%2011s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872%201.777.522%201.565.853%203.76.853%206.206Z%22%2F%3E%3Cpath%20d%3D%22M11%207.5c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138q.07-.058.224-.138c.299-.151.763-.302%201.379-.434C7.378%205.666%209.091%205.5%2011%205.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0%209c-1.909%200-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3%201.3%200%200%201-.224-.138%201.3%201.3%200%200%201%20.224-.138c.299-.151.763-.302%201.379-.434C7.378%2014.666%209.091%2014.5%2011%2014.5s3.622.166%204.845.428c.616.132%201.08.283%201.379.434.105.053.177.1.224.138a1.3%201.3%200%200%201-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm0-4c-2.46%200-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5%201.5%200%200%201-.39-.272.3.3%200%200%201-.047-.064.3.3%200%200%201%20.048-.064c.066-.073.189-.167.389-.272.399-.21%201.009-.413%201.805-.59C6.328%209.722%208.54%209.5%2011%209.5s4.672.222%206.256.574c.795.177%201.405.38%201.804.59.2.105.323.2.39.272a.3.3%200%200%201%20.047.064.3.3%200%200%201-.048.064%201.4%201.4%200%200%201-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0%20.018v.002zm17.002.002v-.002zm0-.018v-.002z%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2022%2022%22%3E%3Cpath%20d%3D%22m1.754%2013.406%204.453-4.851%203.09%203.09%203.281%203.277.969-.969-3.309-3.312%203.844-4.121%206.148%206.886h1.082v-.855l-7.207-8.07-4.84%205.187L6.169%206.57l-5.48%205.965v.871ZM.688%2016.844h20.625v1.375H.688Zm0%200%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2222%22%20height%3D%2222%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2022%2022%22%3E%3Cpath%20d%3D%22m1.754%2013.406%204.453-4.851%203.09%203.09%203.281%203.277.969-.969-3.309-3.312%203.844-4.121%206.148%206.886h1.082v-.855l-7.207-8.07-4.84%205.187L6.169%206.57l-5.48%205.965v.871ZM.688%2016.844h20.625v1.375H.688Zm0%200%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23333%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23aaa%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e58978%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e54e33%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23fff%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23999%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e58978%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%2333b5e5%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23e54e33%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3C%2Fsvg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2229%22%20height%3D%2229%22%20fill%3D%22%23666%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M10%204C9%204%209%205%209%205v.1A5%205%200%200%200%205.1%209H5s-1%200-1%201%201%201%201%201h.1A5%205%200%200%200%209%2014.9v.1s0%201%201%201%201-1%201-1v-.1a5%205%200%200%200%203.9-3.9h.1s1%200%201-1-1-1-1-1h-.1A5%205%200%200%200%2011%205.1V5s0-1-1-1m0%202.5a3.5%203.5%200%201%201%200%207%203.5%203.5%200%201%201%200-7%22%2F%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%222%22%2F%3E%3Cpath%20fill%3D%22red%22%20d%3D%22m14%205%201%201-9%209-1-1z%22%2F%3E%3C%2Fsvg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{width:88px;height:23px;margin:0 0 -4px -4px;display:block;background-repeat:no-repeat;cursor:pointer;overflow:hidden;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.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%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.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%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.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%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.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%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.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%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.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%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.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%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.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%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2288%22%20height%3D%2223%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20fill-opacity%3D%22.4%22%20fill-rule%3D%22evenodd%22%20d%3D%22M17.408%2016.796h-1.827l2.501-12.095h.198l3.324%206.533.988%202.19.988-2.19%203.258-6.533h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.929%205.644h-.098l-2.914-5.644-.757-1.71-.345%201.71zm1.958-3.42-.726%203.663a1.255%201.255%200%200%201-1.232%201.011h-1.827a1.255%201.255%200%200%201-1.229-1.509l2.501-12.095a1.255%201.255%200%200%201%201.23-1.001h.197a1.25%201.25%200%200%201%201.12.685l3.19%206.273%203.125-6.263a1.25%201.25%200%200%201%201.123-.695h.181a1.255%201.255%200%200%201%201.227.991l1.443%206.71a5%205%200%200%201%20.314-.787l.009-.016a4.6%204.6%200%200%201%201.777-1.887c.782-.46%201.668-.667%202.611-.667a4.6%204.6%200%200%201%201.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255%201.255%200%200%201%201.212.925%201.255%201.255%200%200%201%201.212-.925h1.711c.284%200%20.545.094.755.252.613-.3%201.312-.45%202.075-.45%201.356%200%202.557.445%203.482%201.4q.47.48.763%201.064V4.701a1.255%201.255%200%200%201%201.255-1.255h1.86A1.255%201.255%200%200%201%2054.44%204.7v9.194h2.217c.19%200%20.37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42%202.42%200%200%201-.682-1.71c0-.665.267-1.253.735-1.7a2.45%202.45%200%200%201%201.722-.674%202.43%202.43%200%200%201%201.705.675q.318.302.504.683V4.7a1.255%201.255%200%200%201%201.255-1.255h1.744A1.255%201.255%200%200%201%2065.812%204.7v3.335a4.8%204.8%200%200%201%201.526-.246c.938%200%201.817.214%202.59.69a4.47%204.47%200%200%201%201.67%201.743v-.98a1.255%201.255%200%200%201%201.256-1.256h1.777c.233%200%20.451.064.639.174a3.4%203.4%200%200%201%201.567-.372c.346%200%20.861.02%201.285.232a1.25%201.25%200%200%201%20.689%201.004%204.7%204.7%200%200%201%20.853-.588c.795-.44%201.675-.647%202.61-.647%201.385%200%202.65.39%203.525%201.396.836.938%201.168%202.173%201.168%203.528q-.001.515-.056%201.051a1.255%201.255%200%200%201-.947%201.09l.408.952a1.255%201.255%200%200%201-.477%201.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06%200-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8%205.8%200%200%201-.548-2.512q0-.429.053-.843a1.3%201.3%200%200%201-.333-.086l-.166-.004c-.223%200-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255%201.255%200%200%201-1.256%201.256h-1.777a1.255%201.255%200%200%201-1.256-1.256V15.69l-.032.057a4.8%204.8%200%200%201-1.86%201.833%205.04%205.04%200%200%201-2.484.634%204.5%204.5%200%200%201-1.935-.424%201.25%201.25%200%200%201-.764.258h-1.71a1.255%201.255%200%200%201-1.256-1.255V7.687a2.4%202.4%200%200%201-.428.625c.253.23.412.561.412.93v7.553a1.255%201.255%200%200%201-1.256%201.255h-1.843a1.25%201.25%200%200%201-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255%201.255%200%200%201-1.256-1.255v-1.251l-.061.117a4.7%204.7%200%200%201-1.782%201.884%204.77%204.77%200%200%201-2.485.67%205.6%205.6%200%200%201-1.485-.188l.009%202.764a1.255%201.255%200%200%201-1.255%201.259h-1.729a1.255%201.255%200%200%201-1.255-1.255v-3.537a1.255%201.255%200%200%201-1.167.793h-1.679a1.25%201.25%200%200%201-.77-.263%204.5%204.5%200%200%201-1.945.429c-.885%200-1.724-.21-2.495-.632l-.017-.01a5%205%200%200%201-1.081-.836%201.255%201.255%200%200%201-1.254%201.312h-1.81a1.255%201.255%200%200%201-1.228-.99l-.782-3.625-2.044%203.939a1.25%201.25%200%200%201-1.115.676h-.098a1.25%201.25%200%200%201-1.116-.68l-2.061-3.994zM35.92%2016.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033%201.332h1.678V9.242h-1.694l-.033%201.267q-.133-.329-.526-.658l-.032-.028a3.2%203.2%200%200%200-.668-.428l-.27-.12a3.3%203.3%200%200%200-1.235-.23q-1.136-.001-1.974.493a3.36%203.36%200%200%200-1.3%201.382q-.445.89-.444%202.074%200%201.2.51%202.107a3.8%203.8%200%200%200%201.382%201.381%203.9%203.9%200%200%200%201.893.477q.795%200%201.455-.33zm-2.789-5.38q-.576.675-.575%201.762%200%201.102.559%201.794.576.675%201.645.675a2.25%202.25%200%200%200%20.934-.19%202.2%202.2%200%200%200%20.468-.29l.178-.161a2.2%202.2%200%200%200%20.397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2%202.2%200%200%200-.633-.709l-.13-.086-.047-.028a2.1%202.1%200%200%200-1.073-.285q-1.052%200-1.629.692zm2.316%202.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96%200%200%200-.353-.389.85.85%200%200%200-.464-.127c-.4%200-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945%200%20.506.122.801.27.99.097.11.266.224.68.224.303%200%20.504-.09.687-.269zm7.545%201.705a2.6%202.6%200%200%200%20.331.423q.319.33.755.548l.173.074q.65.255%201.49.255%201.02%200%201.844-.493a3.45%203.45%200%200%200%201.316-1.4q.493-.904.493-2.089%200-1.909-.988-2.913-.988-1.02-2.584-1.02-.898%200-1.575.347a3%203%200%200%200-.415.262l-.199.166a3.4%203.4%200%200%200-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296%201.119.297%201.07%200%201.645-.675.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.435%200-.835.16a2%202%200%200%200-.284.136%202%202%200%200%200-.363.254%202.2%202.2%200%200%200-.46.569l-.082.162a2.6%202.6%200%200%200-.213%201.072v.115q0%20.707.296%201.267l.135.211zm.964-.818a1.1%201.1%200%200%200%20.367.385.94.94%200%200%200%20.476.118c.423%200%20.59-.117.687-.23.159-.194.28-.478.28-.95%200-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1%201%200%200%200-.503.135l-.012.007a.86.86%200%200%200-.335.343c-.073.133-.132.324-.132.614v.115a1.4%201.4%200%200%200%20.14.66zm15.7-6.222q.347-.346.346-.856a1.05%201.05%200%200%200-.345-.79%201.18%201.18%200%200%200-.84-.329q-.51%200-.855.33a1.05%201.05%200%200%200-.346.79q0%20.51.346.855.345.346.856.346.51%200%20.839-.346zm4.337%209.314.033-1.332q.191.403.59.747l.098.081a4%204%200%200%200%20.316.224l.223.122a3.2%203.2%200%200%200%201.44.322%203.8%203.8%200%200%200%201.875-.477%203.5%203.5%200%200%200%201.382-1.366q.527-.89.526-2.09%200-1.184-.444-2.073a3.24%203.24%200%200%200-1.283-1.399q-.823-.51-1.942-.51a3.5%203.5%200%200%200-1.527.344l-.086.043-.165.09a3%203%200%200%200-.33.214q-.432.315-.656.707a2%202%200%200%200-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5%202.5%200%200%200%20.566.7q.117.098.245.18l.144.08a2.1%202.1%200%200%200%20.975.232q1.07%200%201.645-.675.576-.69.576-1.778%200-1.102-.576-1.777-.56-.691-1.645-.692a2.2%202.2%200%200%200-1.015.235q-.22.113-.415.282l-.15.142a2.1%202.1%200%200%200-.42.594q-.223.479-.223%201.1v.115q0%20.705.293%201.26zm2.616-.293c.157-.191.28-.479.28-.967%200-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87%200%200%200-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0%20.285.057.499.144.669a1.1%201.1%200%200%200%20.367.405c.137.082.28.123.455.123.423%200%20.59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493%200%20.642.099l.247-1.794q-.196-.099-.717-.099a2.3%202.3%200%200%200-.545.063%202%202%200%200%200-.411.148%202.2%202.2%200%200%200-.4.249%202.5%202.5%200%200%200-.485.499%202.7%202.7%200%200%200-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5%201.5%200%200%201%20.466-.636%202.5%202.5%200%200%201%20.399-.253%202%202%200%200%201%20.224-.099zm9.784%202.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46%203.46%200%200%200-1.4%201.382q-.493.906-.493%202.106%200%201.07.428%201.975.428.89%201.332%201.432.906.526%202.255.526.973%200%201.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%200-1.497-.444a1.6%201.6%200%200%201-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1%201%200%200%200-.156-.176q-.46-.428-1.316-.428-.986%200-1.494.604-.379.45-.494%201.234zm-27.053%202.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22m19.63%2011.151-.757-1.71-.345%201.71-1.12%205.644h-1.827L18.083%204.7h.197l3.325%206.533.988%202.19.988-2.19L26.839%204.7h.181l2.6%2012.095h-1.81l-1.218-5.644-.362-1.71-.658%201.71-2.93%205.644h-.098l-2.913-5.644zm14.836%205.81q-1.02%200-1.893-.478a3.8%203.8%200%200%201-1.381-1.382q-.51-.906-.51-2.106%200-1.185.444-2.074a3.36%203.36%200%200%201%201.3-1.382q.839-.494%201.974-.494a3.3%203.3%200%200%201%201.234.231%203.3%203.3%200%200%201%20.97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02%201.053a3.17%203.17%200%200%201-1.662.444zm.296-1.482q.938%200%201.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2%202.2%200%200%200-.807-.872%202.1%202.1%200%200%200-1.119-.313q-1.053%200-1.629.692-.575.675-.575%201.76%200%201.103.559%201.795.577.675%201.645.675zm6.521-6.237h1.711v1.4q.906-1.597%202.83-1.597%201.596%200%202.584%201.02.988%201.005.988%202.914%200%201.185-.493%202.09a3.46%203.46%200%200%201-1.316%201.399%203.5%203.5%200%200%201-1.844.493q-.954%200-1.662-.329a2.67%202.67%200%200%201-1.086-.97l.017%205.134h-1.728zm4.048%206.22q1.07%200%201.645-.674.577-.69.576-1.762%200-1.119-.576-1.777-.558-.675-1.645-.675-.592%200-1.12.296-.51.28-.822.823-.296.527-.296%201.234v.115q0%20.708.296%201.267.313.543.823.855.51.296%201.119.297z%22%2F%3E%3Cpath%20fill%3D%22%23e1e3e9%22%20d%3D%22M51.325%204.7h1.86v10.45h3.473v1.646h-5.333zm7.12%204.542h1.843v7.553h-1.843zm.905-1.415a1.16%201.16%200%200%201-.856-.346%201.17%201.17%200%200%201-.346-.856%201.05%201.05%200%200%201%20.346-.79q.346-.329.856-.329.494%200%20.839.33a1.05%201.05%200%200%201%20.345.79%201.16%201.16%200%200%201-.345.855q-.33.346-.84.346zm7.875%209.133a3.17%203.17%200%200%201-1.662-.444q-.723-.46-1.004-1.053l-.033%201.332h-1.71V4.701h1.743v4.657l-.082%201.283q.279-.658%201.086-1.119a3.5%203.5%200%200%201%201.778-.477q1.119%200%201.942.51a3.24%203.24%200%200%201%201.283%201.4q.445.888.444%202.072%200%201.201-.526%202.09a3.5%203.5%200%200%201-1.382%201.366%203.8%203.8%200%200%201-1.876.477zm-.296-1.481q1.069%200%201.645-.675.577-.69.577-1.778%200-1.102-.577-1.776-.56-.691-1.645-.692a2.12%202.12%200%200%200-1.58.659q-.642.641-.642%201.694v.115q0%20.71.296%201.267a2.4%202.4%200%200%200%20.807.872%202.1%202.1%200%200%200%201.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14%202.14%200%200%201%201.349-.46q.527%200%20.724.098l-.247%201.794q-.149-.099-.642-.099-.774%200-1.416.494-.626.493-.626%201.58v3.883h-1.777V9.242zm9.534%207.718q-1.35%200-2.255-.526-.904-.543-1.332-1.432a4.6%204.6%200%200%201-.428-1.975q0-1.2.493-2.106a3.46%203.46%200%200%201%201.4-1.382q.889-.495%202.007-.494%201.744%200%202.584.97.855.956.856%202.7%200%20.444-.05.92h-5.43q.18%201.005.708%201.45.542.443%201.497.443.79%200%201.3-.131a4%204%200%200%200%20.938-.362l.542%201.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%200-1.991%201.86z%22%2F%3E%3Cpath%20d%3D%22M5.074%2015.948a.484.657%200%200%200-.486.659v1.84a.484.657%200%200%200%20.486.659h4.101a.484.657%200%200%200%20.486-.659v-1.84a.484.657%200%200%200-.486-.659zm3.56%201.16H5.617v.838h3.017z%22%20style%3D%22fill%3A%23fff%3Bfill-rule%3Aevenodd%3Bstroke-width%3A1.03600001%22%2F%3E%3Cg%20style%3D%22stroke-width%3A1.12603545%22%3E%3Cpath%20d%3D%22M-9.408-1.416c-3.833-.025-7.056%202.912-7.08%206.615-.02%203.08%201.653%204.832%203.107%206.268.903.892%201.721%201.74%202.32%202.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87%201.87%200%200%200-.362%201.121l-.011%201.877c-.003.402.104.787.347%201.125.244.338.688.653%201.23.656l4.142.028c.542.003.99-.306%201.238-.641a1.87%201.87%200%200%200%20.363-1.121l.012-1.875a1.87%201.87%200%200%200-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145%201.425-1.983%202.348-2.87%201.473-1.414%203.18-3.149%203.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006%201.1v.002c3.274.02%205.92%202.532%205.9%205.6-.017%202.706-1.39%204.026-2.863%205.44-1.034.994-2.118%202.033-2.814%203.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34%200%200%201-.226.084.34.34%200%200%201-.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%202.7-5.545%205.975-5.523m-.02%202.826c-1.62-.01-2.944%201.315-2.955%202.96-.01%201.646%201.295%202.988%202.916%202.999h.002c1.621.01%202.943-1.316%202.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005%201.1c1.017.006%201.829.83%201.822%201.89s-.83%201.874-1.848%201.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874%201.848-1.868m-2.155%2011.857%204.14.025c.271.002.49.305.487.676l-.013%201.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%22%20style%3D%22color%3A%23000%3Bfont-style%3Anormal%3Bfont-variant%3Anormal%3Bfont-weight%3A400%3Bfont-stretch%3Anormal%3Bfont-size%3Amedium%3Bline-height%3Anormal%3Bfont-family%3Asans-serif%3Bfont-variant-ligatures%3Anormal%3Bfont-variant-position%3Anormal%3Bfont-variant-caps%3Anormal%3Bfont-variant-numeric%3Anormal%3Bfont-variant-alternates%3Anormal%3Bfont-feature-settings%3Anormal%3Btext-indent%3A0%3Btext-align%3Astart%3Btext-decoration%3Anone%3Btext-decoration-line%3Anone%3Btext-decoration-style%3Asolid%3Btext-decoration-color%3A%23000%3Bletter-spacing%3Anormal%3Bword-spacing%3Anormal%3Btext-transform%3Anone%3Bwriting-mode%3Alr-tb%3Bdirection%3Altr%3Btext-orientation%3Amixed%3Bdominant-baseline%3Aauto%3Bbaseline-shift%3Abaseline%3Btext-anchor%3Astart%3Bwhite-space%3Anormal%3Bshape-padding%3A0%3Bclip-rule%3Aevenodd%3Bdisplay%3Ainline%3Boverflow%3Avisible%3Bvisibility%3Avisible%3Bopacity%3A1%3Bisolation%3Aauto%3Bmix-blend-mode%3Anormal%3Bcolor-interpolation%3AsRGB%3Bcolor-interpolation-filters%3AlinearRGB%3Bsolid-color%3A%23000%3Bsolid-opacity%3A1%3Bvector-effect%3Anone%3Bfill%3A%23000%3Bfill-opacity%3A.4%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-linecap%3Abutt%3Bstroke-linejoin%3Amiter%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-dashoffset%3A0%3Bstroke-opacity%3A1%3Bcolor-rendering%3Aauto%3Bimage-rendering%3Aauto%3Bshape-rendering%3Aauto%3Btext-rendering%3Aauto%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-9.415-.316C-12.69-.338-15.37%202.14-15.39%205.207c-.017%202.716%201.326%204.041%202.78%205.477%201.013%201%202.081%202.055%202.78%203.67l.092.076a.34.34%200%200%200%20.225.086.34.34%200%200%200%20.227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6%201.78-2.64%202.814-3.634%201.473-1.414%202.847-2.733%202.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057%208.784c1.621.011%202.944-1.315%202.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945%201.315-2.955%202.96s1.295%202.989%202.916%203%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23e1e3e9%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3Cpath%20d%3D%22M-11.594%2015.465c-.27-.002-.492.297-.494.668l-.012%201.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z%22%20style%3D%22clip-rule%3Aevenodd%3Bfill%3A%23fff%3Bfill-opacity%3A1%3Bfill-rule%3Aevenodd%3Bstroke%3Anone%3Bstroke-width%3A2.47727823%3Bstroke-miterlimit%3A4%3Bstroke-dasharray%3Anone%3Bstroke-opacity%3A.4%22%20transform%3D%22translate(15.553%202.85)scale(.88807)%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{padding:0 5px;background-color:hsla(0,0%,100%,.5);margin:0}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{min-height:20px;padding:2px 24px 2px 0;margin:10px;position:relative;background-color:#fff;color:#000;border-radius:12px;box-sizing:content-box}.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{padding:2px 8px 2px 28px;border-radius:12px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{display:none;cursor:pointer;position:absolute;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%3E");background-color:hsla(0,0%,100%,.5);width:24px;height:24px;box-sizing:border-box;border-radius:12px;outline:none;top:0;right:0;border:0}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{top:0;right:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{top:0;left: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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22%23fff%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%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%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20fill-rule%3D%22evenodd%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20d%3D%22M4%2010a6%206%200%201%200%2012%200%206%206%200%201%200-12%200m5-3a1%201%200%201%200%202%200%201%201%200%201%200-2%200m0%203a1%201%200%201%201%202%200v3a1%201%200%201%201-2%200%22%2F%3E%3C%2Fsvg%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);font-size:10px;white-space:nowrap;border-color:#333;border-style:none solid solid;border-width:medium 2px 2px;padding:0 5px;color:#333;box-sizing:border-box}.maplibregl-popup{position:absolute;top:0;left:0;display:flex;will-change:transform;pointer-events:none}.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{width:0;height:0;border:10px solid transparent;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-top:none;border-bottom-color:#fff}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-top:none;border-left:none;border-bottom-color:#fff}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-top:none;border-right:none;border-bottom-color:#fff}.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-right:none;border-left-color:#fff}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{position:absolute;right:0;top:0;border:0;border-radius:0 3px 0 0;cursor:pointer;background-color:transparent}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{position:relative;background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto}.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{position:absolute;top:0;left:0;will-change:transform;transition:opacity .2s}.maplibregl-marker-draggable{cursor:grab}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;width:15px;height:15px;border-radius:50%}.maplibregl-user-location-dot:before{content:"";position:absolute;animation:maplibregl-user-location-dot-pulse 2s infinite}.maplibregl-user-location-dot:after{border-radius:50%;border:2px solid #fff;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px;box-sizing:border-box;box-shadow:0 0 3px rgba(0,0,0,.35)}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{transform:scale(1);opacity:1}70%{transform:scale(3);opacity:0}to{transform:scale(1);opacity:0}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;width:1px;height:1px;border-radius:100%}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{position:absolute;top:0;left:0;width:0;height:0;background:#fff;border:2px dotted #202020;opacity:.5}.maplibregl-cooperative-gesture-screen{background:rgba(0,0,0,.4);position:absolute;inset:0;display:flex;justify-content:center;align-items:center;color:#fff;padding:1rem;font-size:1.4em;line-height:1.2;opacity:0;pointer-events:none;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{position:fixed!important;width:100%!important;height:100%!important;top:0!important;left:0!important;z-index:99999}',document.head.appendChild(e)}})()});var yi=W(ya=>{"use strict";var sV=Eg(),Ehe=OC(),khe=tV(),HFr=K6().addStyleRule,Che=tn(),Ubt=Wa(),Vbt=ew(),Gbt=Che.extendFlat,lV=Che.extendDeepAll;ya.modules={};ya.allCategories={};ya.allTypes=[];ya.subplotsRegistry={};ya.componentsRegistry={};ya.layoutArrayContainers=[];ya.layoutArrayRegexes=[];ya.traceLayoutAttributes={};ya.localeRegistry={};ya.apiMethodRegistry={};ya.collectableSubplotTypes=null;ya.register=function(t){if(ya.collectableSubplotTypes=null,t)t&&!Array.isArray(t)&&(t=[t]);else throw new Error("No argument passed to Plotly.register.");for(var r=0;r<t.length;r++){var i=t[r];if(!i)throw new Error("Invalid module was attempted to be registered!");switch(i.moduleType){case"trace":Hbt(i);break;case"component":$bt(i);break;case"locale":Wbt(i);break;case"apiMethod":var n=i.name;ya.apiMethodRegistry[n]=i.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}};ya.getModule=function(e){var t=ya.modules[Phe(e)];return t?t._module:!1};ya.traceIs=function(e,t){if(e=Phe(e),e==="various")return!1;var r=ya.modules[e];return r||(e&&sV.log("Unrecognized trace type "+e+"."),r=ya.modules[Ubt.type.dflt]),!!r.categories[t]};ya.getComponentMethod=function(e,t){var r=ya.componentsRegistry[e];return r&&r[t]||Ehe};ya.call=function(){var e=arguments[0],t=[].slice.call(arguments,1);return ya.apiMethodRegistry[e].apply(null,t)};function Hbt(e){var t=e.name,r=e.categories,i=e.meta;if(ya.modules[t]){sV.log("Type "+t+" already registered");return}ya.subplotsRegistry[e.basePlotModule.name]||jbt(e.basePlotModule);for(var n={},a=0;a<r.length;a++)n[r[a]]=!0,ya.allCategories[r[a]]=!0;ya.modules[t]={_module:e,categories:n},i&&Object.keys(i).length&&(ya.modules[t].meta=i),ya.allTypes.push(t);for(var o in ya.componentsRegistry)Fhe(o,t);e.layoutAttributes&&Gbt(ya.traceLayoutAttributes,e.layoutAttributes);var s=e.basePlotModule,l=s.name;l==="map"&&She(),(l==="geo"||l==="map")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function jbt(e){var t=e.name;if(ya.subplotsRegistry[t]){sV.log("Plot type "+t+" already registered.");return}Dhe(e),ya.subplotsRegistry[t]=e;for(var r in ya.componentsRegistry)Lhe(r,e.name)}function $bt(e){if(typeof e.name!="string")throw new Error("Component module *name* must be a string.");var t=e.name;ya.componentsRegistry[t]=e,e.layoutAttributes&&(e.layoutAttributes._isLinkedToArray&&khe(ya.layoutArrayContainers,t),Dhe(e));for(var r in ya.modules)Fhe(t,r);for(var i in ya.subplotsRegistry)Lhe(t,i);e.schema&&e.schema.layout&&lV(Vbt,e.schema.layout)}function Wbt(e){var t=e.name,r=t.split("-")[0],i=e.dictionary,n=e.format,a=i&&Object.keys(i).length,o=n&&Object.keys(n).length,s=ya.localeRegistry,l=s[t];if(l||(s[t]=l={}),r!==t){var u=s[r];u||(s[r]=u={}),a&&u.dictionary===l.dictionary&&(u.dictionary=i),o&&u.format===l.format&&(u.format=n)}a&&(l.dictionary=i),o&&(l.format=n)}function Dhe(e){if(e.layoutAttributes){var t=e.layoutAttributes._arrayAttrRegexps;if(t)for(var r=0;r<t.length;r++)khe(ya.layoutArrayRegexes,t[r])}}function Fhe(e,t){var r=ya.componentsRegistry[e].schema;if(!(!r||!r.traces)){var i=r.traces[t];i&&lV(ya.modules[t]._module.attributes,i)}}function Lhe(e,t){var r=ya.componentsRegistry[e].schema;if(!(!r||!r.subplots)){var i=ya.subplotsRegistry[t],n=i.layoutAttributes,a=i.attr==="subplot"?i.name:i.attr;Array.isArray(a)&&(a=a[0]);var o=r.subplots[a];n&&o&&lV(n,o)}}function Phe(e){return typeof e=="object"&&(e=e.type),e}});var Vhe=W(Sl=>{"use strict";var Ybt=z3().timeFormat,Nhe=sn(),uV=Eg(),gy=(O3(),Go(q3)).mod,iw=Kn(),ad=iw.BADNUM,Ih=iw.ONEDAY,Q6=iw.ONEHOUR,vy=iw.ONEMIN,rw=iw.ONESEC,eA=iw.EPOCHJD,Cg=yi(),Ihe=z3().utcFormat,Xbt=/^\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,Zbt=/^\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,Rhe=new Date().getFullYear()-70;function Dg(e){return e&&Cg.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}Sl.dateTick0=function(e,t){var r=Kbt(e,!!t);if(t<2)return r;var i=Sl.dateTime2ms(r,e);return i+=Ih*(t-1),Sl.ms2DateTime(i,0,e)};function Kbt(e,t){return Dg(e)?t?Cg.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:Cg.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}Sl.dfltRange=function(e){return Dg(e)?Cg.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};Sl.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var YC,XC;Sl.dateTime2ms=function(e,t){if(Sl.isJSDate(e)){var r=e.getTimezoneOffset()*vy,i=(e.getUTCMinutes()-e.getMinutes())*vy+(e.getUTCSeconds()-e.getSeconds())*rw+(e.getUTCMilliseconds()-e.getMilliseconds());if(i){var n=3*vy;r=r-n/2+gy(i-r+n/2,n)}return e=Number(e)-r,e>=YC&&e<=XC?e:ad}if(typeof e!="string"&&typeof e!="number")return ad;e=String(e);var a=Dg(t),o=e.charAt(0);a&&(o==="G"||o==="g")&&(e=e.slice(1),t="");var s=a&&t.slice(0,7)==="chinese",l=e.match(s?Zbt:Xbt);if(!l)return ad;var u=l[1],c=l[3]||"1",f=Number(l[5]||1),h=Number(l[7]||0),d=Number(l[9]||0),p=Number(l[11]||0);if(a){if(u.length===2)return ad;u=Number(u);var v;try{var m=Cg.getComponentMethod("calendars","getCal")(t);if(s){var g=c.charAt(c.length-1)==="i";c=parseInt(c,10),v=m.newDate(u,m.toMonthIndex(u,c,g),f)}else v=m.newDate(u,Number(c),f)}catch(b){return ad}return v?(v.toJD()-eA)*Ih+h*Q6+d*vy+p*rw:ad}u.length===2?u=(Number(u)+2e3-Rhe)%100+Rhe:u=Number(u),c-=1;var w=new Date(Date.UTC(2e3,c,f,h,d));return w.setUTCFullYear(u),w.getUTCMonth()!==c||w.getUTCDate()!==f?ad:w.getTime()+p*rw};YC=Sl.MIN_MS=Sl.dateTime2ms("-9999");XC=Sl.MAX_MS=Sl.dateTime2ms("9999-12-31 23:59:59.9999");Sl.isDateTime=function(e,t){return Sl.dateTime2ms(e,t)!==ad};function tw(e,t){return String(e+Math.pow(10,t)).slice(1)}var WC=90*Ih,zhe=3*Q6,Bhe=5*vy;Sl.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=YC&&e<=XC))return ad;t||(t=0);var i=Math.floor(gy(e+.05,1)*10),n=Math.round(e-i/10),a,o,s,l,u,c;if(Dg(r)){var f=Math.floor(n/Ih)+eA,h=Math.floor(gy(e,Ih));try{a=Cg.getComponentMethod("calendars","getCal")(r).fromJD(f).formatDate("yyyy-mm-dd")}catch(d){a=Ihe("G%Y-%m-%d")(new Date(n))}if(a.charAt(0)==="-")for(;a.length<11;)a="-0"+a.slice(1);else for(;a.length<10;)a="0"+a;o=t<WC?Math.floor(h/Q6):0,s=t<WC?Math.floor(h%Q6/vy):0,l=t<zhe?Math.floor(h%vy/rw):0,u=t<Bhe?h%rw*10+i:0}else c=new Date(n),a=Ihe("%Y-%m-%d")(c),o=t<WC?c.getUTCHours():0,s=t<WC?c.getUTCMinutes():0,l=t<zhe?c.getUTCSeconds():0,u=t<Bhe?c.getUTCMilliseconds()*10+i:0;return Uhe(a,o,s,l,u)};Sl.ms2DateTimeLocal=function(e){if(!(e>=YC+Ih&&e<=XC-Ih))return ad;var t=Math.floor(gy(e+.05,1)*10),r=new Date(Math.round(e-t/10)),i=Ybt("%Y-%m-%d")(r),n=r.getHours(),a=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return Uhe(i,n,a,o,s)};function Uhe(e,t,r,i,n){if((t||r||i||n)&&(e+=" "+tw(t,2)+":"+tw(r,2),(i||n)&&(e+=":"+tw(i,2),n))){for(var a=4;n%10===0;)a-=1,n/=10;e+="."+tw(n,a)}return e}Sl.cleanDate=function(e,t,r){if(e===ad)return t;if(Sl.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(Dg(r))return uV.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=Sl.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!Sl.isDateTime(e,r))return uV.error("unrecognized date",e),t;return e};var Jbt=/%\d?f/g,Qbt=/%h/g,e3t={1:"1",2:"1",3:"2",4:"2"};function qhe(e,t,r,i){e=e.replace(Jbt,function(a){var o=Math.min(+a.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).slice(2).replace(/0+$/,"")||"0";return s});var n=new Date(Math.floor(t+.05));if(e=e.replace(Qbt,function(){return e3t[r("%q")(n)]}),Dg(i))try{e=Cg.getComponentMethod("calendars","worldCalFmt")(e,t,i)}catch(a){return"Invalid"}return r(e)(n)}var t3t=[59,59.9,59.99,59.999,59.9999];function r3t(e,t){var r=gy(e+.05,Ih),i=tw(Math.floor(r/Q6),2)+":"+tw(gy(Math.floor(r/vy),60),2);if(t!=="M"){Nhe(t)||(t=0);var n=Math.min(gy(e/rw,60),t3t[t]),a=(100+n).toFixed(t).slice(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),i+=":"+a}return i}Sl.formatDate=function(e,t,r,i,n,a){if(n=Dg(n)&&n,!t)if(r==="y")t=a.year;else if(r==="m")t=a.month;else if(r==="d")t=a.dayMonth+`
`+a.year;else return r3t(e,r)+`
`+qhe(a.dayMonthYear,e,i,n);return qhe(t,e,i,n)};var Ohe=3*Ih;Sl.incrementMonth=function(e,t,r){r=Dg(r)&&r;var i=gy(e,Ih);if(e=Math.round(e-i),r)try{var n=Math.round(e/Ih)+eA,a=Cg.getComponentMethod("calendars","getCal")(r),o=a.fromJD(n);return t%12?a.add(o,t,"m"):a.add(o,t/12,"y"),(o.toJD()-eA)*Ih+i}catch(l){uV.error("invalid ms "+e+" in calendar "+r)}var s=new Date(e+Ohe);return s.setUTCMonth(s.getUTCMonth()+t)+i-Ohe};Sl.findExactDates=function(e,t){for(var r=0,i=0,n=0,a=0,o,s,l=Dg(t)&&Cg.getComponentMethod("calendars","getCal")(t),u=0;u<e.length;u++){if(s=e[u],!Nhe(s)){a++;continue}if(!(s%Ih))if(l)try{o=l.fromJD(s/Ih+eA),o.day()===1?o.month()===1?r++:i++:n++}catch(f){}else o=new Date(s),o.getUTCDate()===1?o.getUTCMonth()===0?r++:i++:n++}i+=r,n+=i;var c=e.length-a;return{exactYears:r/c,exactMonths:i/c,exactDays:n/c}}});var tA=W((WFr,Ghe)=>{"use strict";Ghe.exports=function(t){return t}});var ZC=W(Fg=>{"use strict";var i3t=sn(),n3t=Eg(),a3t=tA(),o3t=Kn().BADNUM,cV=1e-9;Fg.findBin=function(e,t,r){if(i3t(t.start))return r?Math.ceil((e-t.start)/t.size-cV)-1:Math.floor((e-t.start)/t.size+cV);var i=0,n=t.length,a=0,o=n>1?(t[n-1]-t[0])/(n-1):1,s,l;for(o>=0?l=r?s3t:l3t:l=r?c3t:u3t,e+=o*cV*(r?-1:1)*(o>=0?1:-1);i<n&&a++<100;)s=Math.floor((i+n)/2),l(t[s],e)?i=s+1:n=s;return a>90&&n3t.log("Long binary search..."),i-1};function s3t(e,t){return e<t}function l3t(e,t){return e<=t}function u3t(e,t){return e>t}function c3t(e,t){return e>=t}Fg.sorterAsc=function(e,t){return e-t};Fg.sorterDes=function(e,t){return t-e};Fg.distinctVals=function(e){var t=e.slice();t.sort(Fg.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===o3t;r--);for(var i=t[r]-t[0]||1,n=i/(r||1)/1e4,a=[],o,s=0;s<=r;s++){var l=t[s],u=l-o;o===void 0?(a.push(l),o=l):u>n&&(i=Math.min(i,u),a.push(l),o=l)}return{vals:a,minDiff:i}};Fg.roundUp=function(e,t,r){for(var i=0,n=t.length-1,a,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;i<n&&o++<100;)a=u((i+n)/2),t[a]<=e?i=a+s:n=a-l;return t[i]};Fg.sort=function(e,t){for(var r=0,i=0,n=1;n<e.length;n++){var a=t(e[n],e[n-1]);if(a<0?r=1:a>0&&(i=1),r&&i)return e.sort(t)}return i?e:e.reverse()};Fg.findIndexOfMin=function(e,t){t=t||a3t;for(var r=1/0,i,n=0;n<e.length;n++){var a=t(e[n]);a<r&&(r=a,i=n)}return i}});var Bx={};Fp(Bx,{default:()=>h3t});function f3t(e){return Object.keys(e).sort()}var h3t,qx=Ea(()=>{"use strict";h3t=f3t});var Hhe=W(El=>{"use strict";var rA=sn(),d3t=yc().isArrayOrTypedArray;El.aggNums=function(e,t,r,i){var n,a;if((!i||i>r.length)&&(i=r.length),rA(t)||(t=!1),d3t(r[0])){for(a=new Array(i),n=0;n<i;n++)a[n]=El.aggNums(e,t,r[n]);r=a}for(n=0;n<i;n++)rA(t)?rA(r[n])&&(t=e(+t,+r[n])):t=r[n];return t};El.len=function(e){return El.aggNums(function(t){return t+1},0,e)};El.mean=function(e,t){return t||(t=El.len(e)),El.aggNums(function(r,i){return r+i},0,e)/t};El.geometricMean=function(e,t){return t||(t=El.len(e)),Math.pow(El.aggNums(function(r,i){return r*i},1,e),1/t)};El.midRange=function(e){if(!(e===void 0||e.length===0))return(El.aggNums(Math.max,null,e)+El.aggNums(Math.min,null,e))/2};El.variance=function(e,t,r){return t||(t=El.len(e)),rA(r)||(r=El.mean(e,t)),El.aggNums(function(i,n){return i+Math.pow(n-r,2)},0,e)/t};El.stdev=function(e,t,r){return Math.sqrt(El.variance(e,t,r))};El.median=function(e){var t=e.slice().sort();return El.interp(t,.5)};El.interp=function(e,t){if(!rA(t))throw"n should be a finite number";if(t=t*e.length-.5,t<0)return e[0];if(t>e.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}});var Xhe=W((ZFr,Yhe)=>{"use strict";var jhe=(O3(),Go(q3)),fV=jhe.mod,p3t=jhe.modHalf,iA=Math.PI,my=2*iA;function v3t(e){return e/180*iA}function g3t(e){return e/iA*180}function hV(e){return Math.abs(e[1]-e[0])>my-1e-14}function $he(e,t){return p3t(t-e,my)}function m3t(e,t){return Math.abs($he(e,t))}function Whe(e,t){if(hV(t))return!0;var r,i;t[0]<t[1]?(r=t[0],i=t[1]):(r=t[1],i=t[0]),r=fV(r,my),i=fV(i,my),r>i&&(i+=my);var n=fV(e,my),a=n+my;return n>=r&&n<=i||a>=r&&a<=i}function y3t(e,t,r,i){if(!Whe(t,i))return!1;var n,a;return r[0]<r[1]?(n=r[0],a=r[1]):(n=r[1],a=r[0]),e>=n&&e<=a}function dV(e,t,r,i,n,a,o){n=n||0,a=a||0;var s=hV([r,i]),l,u,c,f,h;s?(l=0,u=iA,c=my):r<i?(l=r,c=i):(l=i,c=r),e<t?(f=e,h=t):(f=t,h=e);function d(g,w){return[g*Math.cos(w)+n,a-g*Math.sin(w)]}var p=Math.abs(c-l)<=iA?0:1;function v(g,w,b){return"A"+[g,g]+" "+[0,p,b]+" "+d(g,w)}var m;return s?f===null?m="M"+d(h,l)+v(h,u,0)+v(h,c,0)+"Z":m="M"+d(f,l)+v(f,u,0)+v(f,c,0)+"ZM"+d(h,l)+v(h,u,1)+v(h,c,1)+"Z":f===null?(m="M"+d(h,l)+v(h,c,0),o&&(m+="L0,0Z")):m="M"+d(f,l)+"L"+d(h,l)+v(h,c,0)+"L"+d(f,c)+v(f,l,1)+"Z",m}function x3t(e,t,r,i,n){return dV(null,e,t,r,i,n,0)}function _3t(e,t,r,i,n){return dV(null,e,t,r,i,n,1)}function b3t(e,t,r,i,n,a){return dV(e,t,r,i,n,a,1)}Yhe.exports={deg2rad:v3t,rad2deg:g3t,angleDelta:$he,angleDist:m3t,isFullCircle:hV,isAngleInsideSector:Whe,isPtInsideSector:y3t,pathArc:x3t,pathSector:_3t,pathAnnulus:b3t}});var Zhe=W(Ox=>{"use strict";Ox.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};Ox.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};Ox.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};Ox.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};Ox.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};Ox.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var Qhe=W(Nx=>{"use strict";var pV=(O3(),Go(q3)).mod;Nx.segmentsIntersect=Jhe;function Jhe(e,t,r,i,n,a,o,s){var l=r-e,u=n-e,c=o-n,f=i-t,h=a-t,d=s-a,p=l*d-c*f;if(p===0)return null;var v=(u*d-c*h)/p,m=(u*f-l*h)/p;return m<0||m>1||v<0||v>1?null:{x:e+l*v,y:t+f*v}}Nx.segmentDistance=function(t,r,i,n,a,o,s,l){if(Jhe(t,r,i,n,a,o,s,l))return 0;var u=i-t,c=n-r,f=s-a,h=l-o,d=u*u+c*c,p=f*f+h*h,v=Math.min(KC(u,c,d,a-t,o-r),KC(u,c,d,s-t,l-r),KC(f,h,p,t-a,r-o),KC(f,h,p,i-a,n-o));return Math.sqrt(v)};function KC(e,t,r,i,n){var a=i*e+n*t;if(a<0)return i*i+n*n;if(a>r){var o=i-e,s=n-t;return o*o+s*s}else{var l=i*t-n*e;return l*l/r}}var JC,vV,Khe;Nx.getTextLocation=function(t,r,i,n){if((t!==vV||n!==Khe)&&(JC={},vV=t,Khe=n),JC[i])return JC[i];var a=t.getPointAtLength(pV(i-n/2,r)),o=t.getPointAtLength(pV(i+n/2,r)),s=Math.atan((o.y-a.y)/(o.x-a.x)),l=t.getPointAtLength(pV(i,r)),u=(l.x*4+a.x+o.x)/6,c=(l.y*4+a.y+o.y)/6,f={x:u,y:c,theta:s};return JC[i]=f,f};Nx.clearLocationCache=function(){vV=null};Nx.getVisibleSegment=function(t,r,i){var n=r.left,a=r.right,o=r.top,s=r.bottom,l=0,u=t.getTotalLength(),c=u,f,h;function d(v){var m=t.getPointAtLength(v);v===0?f=m:v===u&&(h=m);var g=m.x<n?n-m.x:m.x>a?m.x-a:0,w=m.y<o?o-m.y:m.y>s?m.y-s:0;return Math.sqrt(g*g+w*w)}for(var p=d(l);p;){if(l+=p+i,l>c)return;p=d(l)}for(p=d(c);p;){if(c-=p+i,l>c)return;p=d(c)}return{min:l,max:c,len:c-l,total:u,isClosed:l===0&&c===u&&Math.abs(f.x-h.x)<.1&&Math.abs(f.y-h.y)<.1}};Nx.findPointOnPath=function(t,r,i,n){n=n||{};for(var a=n.pathLength||t.getTotalLength(),o=n.tolerance||.001,s=n.iterationLimit||30,l=t.getPointAtLength(0)[i]>t.getPointAtLength(a)[i]?-1:1,u=0,c=0,f=a,h,d,p;u<s;){if(h=(c+f)/2,d=t.getPointAtLength(h),p=d[i]-r,Math.abs(p)<o)return d;l*p>0?f=h:c=h,u++}return d}});var QC=W(nA=>{"use strict";var Lg={};nA.throttle=function(t,r,i){var n=Lg[t],a=Date.now();if(!n){for(var o in Lg)Lg[o].ts<a-6e4&&delete Lg[o];n=Lg[t]={ts:0,timer:null}}e0e(n);function s(){i(),n.ts=Date.now(),n.onDone&&(n.onDone(),n.onDone=null)}if(a>n.ts+r){s();return}n.timer=setTimeout(function(){s(),n.timer=null},r)};nA.done=function(e){var t=Lg[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var i=t.onDone;t.onDone=function(){i&&i(),r(),t.onDone=null}})};nA.clear=function(e){if(e)e0e(Lg[e]),delete Lg[e];else for(var t in Lg)nA.clear(t)};function e0e(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var r0e=W((eLr,t0e)=>{"use strict";t0e.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var i0e=W((tLr,eD)=>{"use strict";eD.exports=gV;eD.exports.isMobile=gV;eD.exports.default=gV;var w3t=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,T3t=/CrOS/,A3t=/android|ipad|playbook|silk/i;function gV(e){e||(e={});let t=e.ua;if(!t&&typeof navigator!="undefined"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),typeof t!="string")return!1;let r=w3t.test(t)&&!T3t.test(t)||!!e.tablet&&A3t.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var a0e=W((rLr,n0e)=>{"use strict";var M3t=sn(),S3t=i0e();n0e.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=E3t(),typeof r!="string")return!0;var i=S3t({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!i)for(var n=r.split(" "),a=1;a<n.length;a++){var o=n[a];if(o.indexOf("Safari")!==-1)for(var s=a-1;s>-1;s--){var l=n[s];if(l.slice(0,8)==="Version/"){var u=l.slice(8).split(".")[0];if(M3t(u)&&(u=+u),u>=13)return!0}}}return i};function E3t(){var e;return typeof navigator!="undefined"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),e}});var s0e=W((iLr,o0e)=>{"use strict";var k3t=vi();o0e.exports=function(t,r,i){var n=t.selectAll("g."+i.replace(/\s/g,".")).data(r,function(o){return o[0].trace.uid});n.exit().remove(),n.enter().append("g").attr("class",i),n.order();var a=t.classed("rangeplot")?"nodeRangePlot3":"node3";return n.each(function(o){o[0][a]=k3t.select(this)}),n}});var u0e=W((nLr,l0e)=>{"use strict";var C3t=yi();l0e.exports=function(t,r){for(var i=t._context.locale,n=0;n<2;n++){for(var a=t._context.locales,o=0;o<2;o++){var s=(a[i]||{}).dictionary;if(s){var l=s[r];if(l)return l}a=C3t.localeRegistry}var u=i.split("-")[0];if(u===i)break;i=u}return r}});var mV=W((aLr,c0e)=>{"use strict";c0e.exports=function(t){for(var r={},i=[],n=0,a=0;a<t.length;a++){var o=t[a];r[o]!==1&&(r[o]=1,i[n++]=o)}return i}});var h0e=W((oLr,f0e)=>{"use strict";f0e.exports=function(t){for(var r=L3t(t)?F3t:D3t,i=[],n=0;n<t.length;n++){var a=t[n];r(a)&&i.push(a)}return i};function D3t(e){return e.visible===!0}function F3t(e){var t=e[0].trace;return t.visible===!0&&t._length!==0}function L3t(e){return Array.isArray(e)&&Array.isArray(e[0])&&e[0][0]&&e[0][0].trace}});var p0e=W((sLr,d0e)=>{"use strict";d0e.exports=function(t,r){if(!r)return t;var i=1/Math.abs(r),n=i>1?(i*t+i*r)/i:t+r,a=String(n).length;if(a>16){var o=String(r).length,s=String(t).length;if(a>=s+o){var l=parseFloat(n).toPrecision(12);l.indexOf("e+")===-1&&(n=+l)}}return n}});var m0e={};Fp(m0e,{default:()=>R3t});function I3t(e){return typeof e=="string"&&(e=e.replace(P3t,"")),(0,v0e.default)(e)?Number(e):g0e.BADNUM}var v0e,g0e,P3t,R3t,y0e=Ea(()=>{"use strict";v0e=nd(sn()),g0e=nd(Kn()),P3t=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;R3t=I3t});var b0e=W((lLr,_0e)=>{"use strict";var z3t=/<[^>]*>/g,B3t=/[\p{S}\p{P}]/gu,q3t=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,O3t=/<2F>/g,N3t=/\s+/g,tD="-",x0e=tD.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),U3t=new RegExp(x0e+"{3,}","g"),V3t=new RegExp(x0e+"$","g"),G3t=60;function H3t(e){return typeof e.toWellFormed=="function"?e.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(e))}_0e.exports=function(t,r=G3t){var i=H3t(t!=null?t:"").replace(O3t,"").replace(z3t," ").replace(B3t,n=>n===tD?n:"").toLowerCase().trim().replace(N3t,tD).replace(q3t,"").replace(U3t,tD);return i.length<=r?i:Array.from(i).slice(0,r).join("").replace(V3t,"")}});var it=W((uLr,P0e)=>{"use strict";var aA=vi(),j3t=z3().utcFormat,$3t=gN().format,E0e=sn(),k0e=Kn(),C0e=k0e.FP_SAFE,W3t=-C0e,w0e=k0e.BADNUM,qt=P0e.exports={};qt.adjustFormat=function(t){if(!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t))return t;if(t==="0.f")return"~f";if(/^\d%/.test(t))return"~%";if(/^\ds/.test(t))return"~s";var r=(t.match(/^[+\-( ]?/)||[""])[0],i=t.slice(r.length);return!/^[~,.0$#]/.test(i)&&/[&fps]/.test(i)?r+"~"+i:t};var T0e={};qt.warnBadFormat=function(e){var t=String(e);T0e[t]||(T0e[t]=1,qt.warn('encountered bad format: "'+t+'"'))};qt.noFormat=function(e){return String(e)};qt.numberFormat=function(e){var t;try{t=$3t(qt.adjustFormat(e))}catch(r){return qt.warnBadFormat(e),qt.noFormat}return t};qt.nestedProperty=k6();qt.keyedContainer=ple();qt.relativeAttr=gle();qt.isPlainObject=oy();qt.toLogRange=cC();qt.relinkPrivateKeys=_le();var yy=yc();qt.isArrayBuffer=yy.isArrayBuffer;qt.isTypedArray=yy.isTypedArray;qt.isArrayOrTypedArray=yy.isArrayOrTypedArray;qt.isArray1D=yy.isArray1D;qt.ensureArray=yy.ensureArray;qt.concat=yy.concat;qt.maxRowLength=yy.maxRowLength;qt.minRowLength=yy.minRowLength;var D0e=(O3(),Go(q3));qt.mod=D0e.mod;qt.modHalf=D0e.modHalf;var xy=Vce();qt.valObjectMeta=xy.valObjectMeta;qt.coerce=xy.coerce;qt.coerce2=xy.coerce2;qt.coerceFont=xy.coerceFont;qt.coercePattern=xy.coercePattern;qt.coerceHoverinfo=xy.coerceHoverinfo;qt.coerceSelectionMarkerOpacity=xy.coerceSelectionMarkerOpacity;qt.validate=xy.validate;var d0=Vhe();qt.dateTime2ms=d0.dateTime2ms;qt.isDateTime=d0.isDateTime;qt.ms2DateTime=d0.ms2DateTime;qt.ms2DateTimeLocal=d0.ms2DateTimeLocal;qt.cleanDate=d0.cleanDate;qt.isJSDate=d0.isJSDate;qt.formatDate=d0.formatDate;qt.incrementMonth=d0.incrementMonth;qt.dateTick0=d0.dateTick0;qt.dfltRange=d0.dfltRange;qt.findExactDates=d0.findExactDates;qt.MIN_MS=d0.MIN_MS;qt.MAX_MS=d0.MAX_MS;var Ux=ZC();qt.findBin=Ux.findBin;qt.sorterAsc=Ux.sorterAsc;qt.sorterDes=Ux.sorterDes;qt.distinctVals=Ux.distinctVals;qt.roundUp=Ux.roundUp;qt.sort=Ux.sort;qt.findIndexOfMin=Ux.findIndexOfMin;qt.sortObjectKeys=(qx(),Go(Bx)).default;var Pg=Hhe();qt.aggNums=Pg.aggNums;qt.len=Pg.len;qt.mean=Pg.mean;qt.geometricMean=Pg.geometricMean;qt.median=Pg.median;qt.midRange=Pg.midRange;qt.variance=Pg.variance;qt.stdev=Pg.stdev;qt.interp=Pg.interp;var Rp=NC();qt.init2dArray=Rp.init2dArray;qt.transposeRagged=Rp.transposeRagged;qt.dot=Rp.dot;qt.translationMatrix=Rp.translationMatrix;qt.rotationMatrix=Rp.rotationMatrix;qt.rotationXYMatrix=Rp.rotationXYMatrix;qt.apply3DTransform=Rp.apply3DTransform;qt.apply2DTransform=Rp.apply2DTransform;qt.apply2DTransform2=Rp.apply2DTransform2;qt.convertCssMatrix=Rp.convertCssMatrix;qt.inverseTransformMatrix=Rp.inverseTransformMatrix;var Qv=Xhe();qt.deg2rad=Qv.deg2rad;qt.rad2deg=Qv.rad2deg;qt.angleDelta=Qv.angleDelta;qt.angleDist=Qv.angleDist;qt.isFullCircle=Qv.isFullCircle;qt.isAngleInsideSector=Qv.isAngleInsideSector;qt.isPtInsideSector=Qv.isPtInsideSector;qt.pathArc=Qv.pathArc;qt.pathSector=Qv.pathSector;qt.pathAnnulus=Qv.pathAnnulus;var aw=Zhe();qt.isLeftAnchor=aw.isLeftAnchor;qt.isCenterAnchor=aw.isCenterAnchor;qt.isRightAnchor=aw.isRightAnchor;qt.isTopAnchor=aw.isTopAnchor;qt.isMiddleAnchor=aw.isMiddleAnchor;qt.isBottomAnchor=aw.isBottomAnchor;var ow=Qhe();qt.segmentsIntersect=ow.segmentsIntersect;qt.segmentDistance=ow.segmentDistance;qt.getTextLocation=ow.getTextLocation;qt.clearLocationCache=ow.clearLocationCache;qt.getVisibleSegment=ow.getVisibleSegment;qt.findPointOnPath=ow.findPointOnPath;var nD=tn();qt.extendFlat=nD.extendFlat;qt.extendDeep=nD.extendDeep;qt.extendDeepAll=nD.extendDeepAll;qt.extendDeepNoArrays=nD.extendDeepNoArrays;var yV=Eg();qt.log=yV.log;qt.warn=yV.warn;qt.error=yV.error;var Y3t=(K3(),Go(Z3));qt.counterRegex=Y3t.counter;var xV=QC();qt.throttle=xV.throttle;qt.throttleDone=xV.done;qt.clearThrottle=xV.clear;var zp=K6();qt.getGraphDiv=zp.getGraphDiv;qt.isPlotDiv=zp.isPlotDiv;qt.removeElement=zp.removeElement;qt.addStyleRule=zp.addStyleRule;qt.addRelatedStyleRule=zp.addRelatedStyleRule;qt.deleteRelatedStyleRule=zp.deleteRelatedStyleRule;qt.setStyleOnHover=zp.setStyleOnHover;qt.getFullTransformMatrix=zp.getFullTransformMatrix;qt.getElementTransformMatrix=zp.getElementTransformMatrix;qt.getElementAndAncestors=zp.getElementAndAncestors;qt.equalDomRects=zp.equalDomRects;qt.clearResponsive=r0e();qt.preserveDrawingBuffer=a0e();qt.makeTraceGroups=s0e();qt._=u0e();qt.notifier=$U();qt.filterUnique=mV();qt.filterVisible=h0e();qt.pushUnique=tV();qt.increment=p0e();qt.cleanNumber=(y0e(),Go(m0e)).default;qt.slugify=b0e();qt.ensureNumber=function(t){return E0e(t)?(t=Number(t),t>C0e||t<W3t?w0e:t):w0e};qt.isIndex=function(e,t){return t!==void 0&&e>=t?!1:E0e(e)&&e>=0&&e%1===0};qt.noop=OC();qt.identity=tA();qt.repeat=function(e,t){for(var r=new Array(t),i=0;i<t;i++)r[i]=e;return r};qt.swapAttrs=function(e,t,r,i){r||(r="x"),i||(i="y");for(var n=0;n<t.length;n++){var a=t[n],o=qt.nestedProperty(e,a.replace("?",r)),s=qt.nestedProperty(e,a.replace("?",i)),l=o.get();o.set(s.get()),s.set(l)}};qt.raiseToTop=function(t){t.parentNode.appendChild(t)};qt.cancelTransition=function(e){return e.transition().duration(0)};qt.constrain=function(e,t,r){return t>r?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))};qt.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r};qt.simpleMap=function(e,t,r,i,n){for(var a=e.length,o=new Array(a),s=0;s<a;s++)o[s]=t(e[s],r,i,n);return o};qt.randstr=function e(t,r,i,n){if(i||(i=16),r===void 0&&(r=24),r<=0)return"0";var a=Math.log(Math.pow(2,r))/Math.log(i),o="",s,l,u;for(s=2;a===1/0;s*=2)a=Math.log(Math.pow(2,r/s))/Math.log(i)*s;var c=a-Math.floor(a);for(s=0;s<Math.floor(a);s++)u=Math.floor(Math.random()*i).toString(i),o=u+o;c&&(l=Math.pow(i,c),u=Math.floor(Math.random()*l).toString(i),o=u+o);var f=parseInt(o,i);return t&&t[o]||f!==1/0&&f>=Math.pow(2,r)?n>10?(qt.warn("randstr failed uniqueness"),o):e(t,r,i,(n||0)+1):o};qt.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={};return r.optionList=[],r._newoption=function(i){i[t]=e,r[i.name]=i,r.optionList.push(i)},r["_"+t]=e,r};qt.smooth=function(e,t){if(t=Math.round(t)||0,t<2)return e;var r=e.length,i=2*r,n=2*t-1,a=new Array(n),o=new Array(r),s,l,u,c;for(s=0;s<n;s++)a[s]=(1-Math.cos(Math.PI*(s+1)/t))/(2*t);for(s=0;s<r;s++){for(c=0,l=0;l<n;l++)u=s+l+1-t,u<-r?u-=i*Math.round(u/i):u>=i&&(u-=i*Math.floor(u/i)),u<0?u=-1-u:u>=r&&(u=i-1-u),c+=e[u]*a[l];o[s]=c}return o};qt.syncOrAsync=function(e,t,r){var i,n;function a(){return qt.syncOrAsync(e,t,r)}for(;e.length;)if(n=e.splice(0,1)[0],i=n(t),i&&i.then)return i.then(a);return r&&r(t)};qt.stripTrailingSlash=function(e){return e.slice(-1)==="/"?e.slice(0,-1):e};qt.noneOrAll=function(e,t,r){if(e){var i=!1,n=!0,a,o;for(a=0;a<r.length;a++)o=e[r[a]],o!=null?i=!0:n=!1;if(i&&!n)for(a=0;a<r.length;a++)e[r[a]]=t[r[a]]}};qt.mergeArray=function(e,t,r,i){var n=typeof i=="function";if(qt.isArrayOrTypedArray(e))for(var a=Math.min(e.length,t.length),o=0;o<a;o++){var s=e[o];t[o][r]=n?i(s):s}};qt.mergeArrayCastPositive=function(e,t,r){return qt.mergeArray(e,t,r,function(i){var n=+i;return isFinite(n)&&n>0?n:0})};qt.fillArray=function(e,t,r,i){if(i=i||qt.identity,qt.isArrayOrTypedArray(e))for(var n=0;n<t.length;n++)t[n][r]=i(e[n])};qt.castOption=function(e,t,r,i){i=i||qt.identity;var n=qt.nestedProperty(e,r).get();return qt.isArrayOrTypedArray(n)?Array.isArray(t)&&qt.isArrayOrTypedArray(n[t[0]])?i(n[t[0]][t[1]]):i(n[t]):n};qt.extractOption=function(e,t,r,i){if(r in e)return e[r];var n=qt.nestedProperty(t,i).get();if(!Array.isArray(n))return n};qt.tagSelected=function(e,t,r){var i=t.selectedpoints;function n(u){return u!==void 0&&u<e.length}for(var a=0;a<i.length;a++){var o=i[a];if(qt.isIndex(o)||qt.isArrayOrTypedArray(o)&&qt.isIndex(o[0])&&qt.isIndex(o[1])){var s=o,l=r?r[s]:s;n(l)&&(e[l].selected=1)}}};qt.getTargetArray=function(e,t){var r=t.target;if(typeof r=="string"&&r){var i=qt.nestedProperty(e,r).get();return qt.isArrayOrTypedArray(i)?i:!1}else if(qt.isArrayOrTypedArray(r))return r;return!1};function F0e(e,t,r){var i={};typeof t!="object"&&(t={});var n=r==="pieLike"?-1:3,a=Object.keys(e),o,s,l;for(o=0;o<a.length;o++)s=a[o],l=e[s],!(s.charAt(0)==="_"||typeof l=="function")&&(s==="module"?i[s]=l:Array.isArray(l)?s==="colorscale"||n===-1?i[s]=l.slice():i[s]=l.slice(0,n):qt.isTypedArray(l)?n===-1?i[s]=l.subarray():i[s]=l.subarray(0,n):l&&typeof l=="object"?i[s]=F0e(e[s],t[s],r):i[s]=l);for(a=Object.keys(t),o=0;o<a.length;o++)s=a[o],l=t[s],(typeof l!="object"||!(s in i)||typeof i[s]!="object")&&(i[s]=l);return i}qt.minExtend=F0e;qt.titleCase=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};qt.containsAny=function(e,t){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])!==-1)return!0;return!1};var X3t=/Version\/[\d\.]+.*Safari/;qt.isSafari=function(){return X3t.test(window.navigator.userAgent)};var Z3t=/iPad|iPhone|iPod/;qt.isIOS=function(){return Z3t.test(window.navigator.userAgent)};var K3t=/Macintosh.+AppleWebKit.+Gecko\)$/;qt.isMacWKWebView=()=>K3t.test(window.navigator.userAgent);var J3t=/Firefox\/(\d+)\.\d+/;qt.getFirefoxVersion=function(){var e=J3t.exec(window.navigator.userAgent);if(e&&e.length===2){var t=parseInt(e[1]);if(!isNaN(t))return t}return null};qt.isD3Selection=function(e){return e instanceof aA.selection};qt.ensureSingle=function(e,t,r,i){var n=e.select(t+(r?"."+r:""));if(n.size())return n;var a=e.append(t);return r&&a.classed(r,!0),i&&a.call(i),a};qt.ensureSingleById=function(e,t,r,i){var n=e.select(t+"#"+r);if(n.size())return n;var a=e.append(t).attr("id",r);return i&&a.call(i),a};qt.objectFromPath=function(e,t){for(var r=e.split("."),i,n=i={},a=0;a<r.length;a++){var o=r[a],s=null,l=r[a].match(/(.*)\[([0-9]+)\]/);l?(o=l[1],s=l[2],i=i[o]=[],a===r.length-1?i[s]=t:i[s]={},i=i[s]):(a===r.length-1?i[o]=t:i[o]={},i=i[o])}return n};var Q3t=/^([^\[\.]+)\.(.+)?/,ewt=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function rD(e){return e.slice(0,2)==="__"}qt.expandObjectPaths=function(e){var t,r,i,n,a,o,s;if(typeof e=="object"&&!Array.isArray(e)){for(r in e)if(e.hasOwnProperty(r))if(t=r.match(Q3t)){if(n=e[r],i=t[1],rD(i))continue;delete e[r],e[i]=qt.extendDeepNoArrays(e[i]||{},qt.objectFromPath(r,qt.expandObjectPaths(n))[i])}else if(t=r.match(ewt)){if(n=e[r],i=t[1],rD(i))continue;if(a=parseInt(t[2]),delete e[r],e[i]=e[i]||[],t[3]===".")s=t[4],o=e[i][a]=e[i][a]||{},qt.extendDeepNoArrays(o,qt.objectFromPath(s,qt.expandObjectPaths(n)));else{if(rD(i))continue;e[i][a]=qt.expandObjectPaths(n)}}else{if(rD(r))continue;e[r]=qt.expandObjectPaths(e[r])}}return e};qt.numSeparate=function(e,t,r){if(r||(r=!1),typeof t!="string"||t.length===0)throw new Error("Separator string required for formatting!");typeof e=="number"&&(e=String(e));var i=/(\d+)(\d{3})/,n=t.charAt(0),a=t.charAt(1),o=e.split("."),s=o[0],l=o.length>1?n+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;i.test(s);)s=s.replace(i,"$1"+a+"$2");return s+l};qt.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var L0e=/^\w*$/;qt.templateString=function(e,t){var r={};return e.replace(qt.TEMPLATE_STRING_REGEX,function(i,n){var a;return L0e.test(n)?a=t[n]:(r[n]=r[n]||qt.nestedProperty(t,n).get,a=r[n](!0)),a!==void 0?a:""})};var twt={max:10,count:0,name:"hovertemplate"};qt.hovertemplateString=e=>_V(ma(fn({},e),{opts:twt}));var rwt={max:10,count:0,name:"texttemplate"};qt.texttemplateString=e=>_V(ma(fn({},e),{opts:rwt}));var iwt=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function nwt(e){var t=e.match(iwt);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var awt={max:10,count:0,name:"texttemplate",parseMultDiv:!0};qt.texttemplateStringForShapes=e=>_V(ma(fn({},e),{opts:awt}));var A0e=/^[:|\|]/;function _V({data:e=[],locale:t,fallback:r,labels:i={},opts:n,template:a}){return a.replace(qt.TEMPLATE_STRING_REGEX,(o,s,l)=>{let u=["xother","yother"].includes(s),c=["_xother","_yother"].includes(s),f=["_xother_","_yother_"].includes(s),h=["xother_","yother_"].includes(s),d=u||c||h||f;(c||f)&&(s=s.substring(1)),(h||f)&&(s=s.substring(0,s.length-1));let p=null,v=null;if(n.parseMultDiv){var m=nwt(s);s=m.key,p=m.op,v=m.number}let g;if(d){if(i[s]===void 0)return"";g=i[s]}else for(let M of e)if(M){if(M.hasOwnProperty(s)){g=M[s];break}if(L0e.test(s)||(g=qt.nestedProperty(M,s).get(!0)),g!==void 0)break}if(g===void 0){let{count:M,max:x,name:T}=n,A=r===!1?o:r;return M<x&&qt.warn([`Variable '${s}' in ${T} could not be found!`,"Please verify that the template is correct.",`Using value: '${A}'.`].join(" ")),M===x&&qt.warn(`Too many '${T}' warnings - additional warnings will be suppressed.`),n.count++,A}if(p==="*"&&(g*=v),p==="/"&&(g/=v),l){var w;if(l[0]===":"&&(w=t?t.numberFormat:qt.numberFormat,g!==""&&(g=w(l.replace(A0e,""))(g))),l[0]==="|"){w=t?t.timeFormat:j3t;var b=qt.dateTime2ms(g);g=qt.formatDate(b,l.replace(A0e,""),!1,w)}}else{var _=s+"Label";i.hasOwnProperty(_)&&(g=i[_])}return d&&(g="("+g+")",(c||f)&&(g=" "+g),(h||f)&&(g=g+" ")),g})}var iD=48,M0e=57;qt.subplotSort=function(e,t){for(var r=Math.min(e.length,t.length)+1,i=0,n=0,a=0;a<r;a++){var o=e.charCodeAt(a)||0,s=t.charCodeAt(a)||0,l=o>=iD&&o<=M0e,u=s>=iD&&s<=M0e;if(l&&(i=10*i+o-iD),u&&(n=10*n+s-iD),!l||!u){if(i!==n)return i-n;if(o!==s)return o-s}}return n-i};var nw=2e9;qt.seedPseudoRandom=function(){nw=2e9};qt.pseudoRandom=function(){var e=nw;return nw=(69069*nw+1)%4294967296,Math.abs(nw-e)<429496729?qt.pseudoRandom():nw/4294967296};qt.fillText=function(e,t,r){var i=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},n=qt.extractOption(e,t,"htx","hovertext");if(qt.isValidTextValue(n))return i(n);var a=qt.extractOption(e,t,"tx","text");if(qt.isValidTextValue(a))return i(a)};qt.isValidTextValue=function(e){return e||e===0};qt.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",i=0;i<t;i++)r.indexOf(".")!==-1&&(r=r.replace("0%","%"),r=r.replace(".%","%"));return r};qt.isHidden=function(e){var t=window.getComputedStyle(e).display;return!t||t==="none"};qt.strTranslate=function(e,t){return e||t?"translate("+e+","+t+")":""};qt.strRotate=function(e){return e?"rotate("+e+")":""};qt.strScale=function(e){return e!==1?"scale("+e+")":""};qt.getTextTransform=function(e){var t=e.noCenter,r=e.textX,i=e.textY,n=e.targetX,a=e.targetY,o=e.anchorX||0,s=e.anchorY||0,l=e.rotate,u=e.scale;return u?u>1&&(u=1):u=0,qt.strTranslate(n-u*(r+o),a-u*(i+s))+qt.strScale(u)+(l?"rotate("+l+(t?"":" "+r+" "+i)+")":"")};qt.setTransormAndDisplay=function(e,t){e.attr("transform",qt.getTextTransform(t)),e.style("display",t.scale?null:"none")};qt.ensureUniformFontSize=function(e,t){var r=qt.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};qt.join2=function(e,t,r){var i=e.length;return i>1?e.slice(0,-1).join(t)+r+e[i-1]:e.join(t)};qt.bigFont=function(e){return Math.round(1.2*e)};var S0e=qt.getFirefoxVersion(),owt=S0e!==null&&S0e<86;qt.getPositionFromD3Event=function(){return owt?[aA.event.layerX,aA.event.layerY]:[aA.event.offsetX,aA.event.offsetY]}});var z0e=W(()=>{"use strict";var swt=it(),I0e={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--hostname":"font-weight:bold;text-decoration:underline;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--account":"margin-top:16px;padding:8px;border-radius:3px;font-size:.9em;background-color:#edf1f8;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#f3f3f3;margin-left:auto;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#e0e2e5;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(bV in I0e)R0e=bV.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),swt.addStyleRule(R0e,I0e[bV]);var R0e,bV});var wV=W((dLr,B0e)=>{B0e.exports=!0});var AV=W((pLr,q0e)=>{"use strict";var lwt=wV(),TV;typeof window.matchMedia=="function"?TV=!window.matchMedia("(hover: none)").matches:TV=lwt;q0e.exports=TV});var Vx=W((vLr,MV)=>{"use strict";var sw=typeof Reflect=="object"?Reflect:null,O0e=sw&&typeof sw.apply=="function"?sw.apply:function(t,r,i){return Function.prototype.apply.call(t,r,i)},aD;sw&&typeof sw.ownKeys=="function"?aD=sw.ownKeys:Object.getOwnPropertySymbols?aD=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:aD=function(t){return Object.getOwnPropertyNames(t)};function uwt(e){console&&console.warn&&console.warn(e)}var U0e=Number.isNaN||function(t){return t!==t};function xs(){xs.init.call(this)}MV.exports=xs;MV.exports.once=dwt;xs.EventEmitter=xs;xs.prototype._events=void 0;xs.prototype._eventsCount=0;xs.prototype._maxListeners=void 0;var N0e=10;function oD(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(xs,"defaultMaxListeners",{enumerable:!0,get:function(){return N0e},set:function(e){if(typeof e!="number"||e<0||U0e(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");N0e=e}});xs.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};xs.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||U0e(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function V0e(e){return e._maxListeners===void 0?xs.defaultMaxListeners:e._maxListeners}xs.prototype.getMaxListeners=function(){return V0e(this)};xs.prototype.emit=function(t){for(var r=[],i=1;i<arguments.length;i++)r.push(arguments[i]);var n=t==="error",a=this._events;if(a!==void 0)n=n&&a.error===void 0;else if(!n)return!1;if(n){var o;if(r.length>0&&(o=r[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[t];if(l===void 0)return!1;if(typeof l=="function")O0e(l,this,r);else for(var u=l.length,c=W0e(l,u),i=0;i<u;++i)O0e(c[i],this,r);return!0};function G0e(e,t,r,i){var n,a,o;if(oD(r),a=e._events,a===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]),o===void 0)o=a[t]=r,++e._eventsCount;else if(typeof o=="function"?o=a[t]=i?[r,o]:[o,r]:i?o.unshift(r):o.push(r),n=V0e(e),n>0&&o.length>n&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,uwt(s)}return e}xs.prototype.addListener=function(t,r){return G0e(this,t,r,!1)};xs.prototype.on=xs.prototype.addListener;xs.prototype.prependListener=function(t,r){return G0e(this,t,r,!0)};function cwt(){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 H0e(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=cwt.bind(i);return n.listener=r,i.wrapFn=n,n}xs.prototype.once=function(t,r){return oD(r),this.on(t,H0e(this,t,r)),this};xs.prototype.prependOnceListener=function(t,r){return oD(r),this.prependListener(t,H0e(this,t,r)),this};xs.prototype.removeListener=function(t,r){var i,n,a,o,s;if(oD(r),n=this._events,n===void 0)return this;if(i=n[t],i===void 0)return this;if(i===r||i.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,i.listener||r));else if(typeof i!="function"){for(a=-1,o=i.length-1;o>=0;o--)if(i[o]===r||i[o].listener===r){s=i[o].listener,a=o;break}if(a<0)return this;a===0?i.shift():fwt(i,a),i.length===1&&(n[t]=i[0]),n.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};xs.prototype.off=xs.prototype.removeListener;xs.prototype.removeAllListeners=function(t){var r,i,n;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[t]),this;if(arguments.length===0){var a=Object.keys(i),o;for(n=0;n<a.length;++n)o=a[n],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=i[t],typeof r=="function")this.removeListener(t,r);else if(r!==void 0)for(n=r.length-1;n>=0;n--)this.removeListener(t,r[n]);return this};function j0e(e,t,r){var i=e._events;if(i===void 0)return[];var n=i[t];return n===void 0?[]:typeof n=="function"?r?[n.listener||n]:[n]:r?hwt(n):W0e(n,n.length)}xs.prototype.listeners=function(t){return j0e(this,t,!0)};xs.prototype.rawListeners=function(t){return j0e(this,t,!1)};xs.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):$0e.call(e,t)};xs.prototype.listenerCount=$0e;function $0e(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}xs.prototype.eventNames=function(){return this._eventsCount>0?aD(this._events):[]};function W0e(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e[i];return r}function fwt(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function hwt(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function dwt(e,t){return new Promise(function(r,i){function n(o){e.removeListener(t,a),i(o)}function a(){typeof e.removeListener=="function"&&e.removeListener("error",n),r([].slice.call(arguments))}Y0e(e,t,a,{once:!0}),t!=="error"&&pwt(e,n,{once:!0})})}function pwt(e,t,r){typeof e.on=="function"&&Y0e(e,"error",t,r)}function Y0e(e,t,r,i){if(typeof e.on=="function")i.once?e.once(t,r):e.on(t,r);else if(typeof e.addEventListener=="function")e.addEventListener(t,function n(a){i.once&&e.removeEventListener(t,n),r(a)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}});var lw=W((gLr,X0e)=>{"use strict";var SV=Vx().EventEmitter,vwt={init:function(e){if(e._ev instanceof SV)return e;var t=new SV,r=new SV;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(i,n){t.emit(i,n),r.emit(i,n)},typeof e.addEventListener=="function"&&e.addEventListener("wheel",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var i,n=e._ev;if(!n)return;var a=n._events[t];if(!a)return;function o(l){if(l.listener){if(n.removeListener(t,l.listener),!l.fired)return l.fired=!0,l.listener.apply(n,[r])}else return l.apply(n,[r])}a=Array.isArray(a)?a:[a];var s;for(s=0;s<a.length-1;s++)o(a[s]);return i=o(a[s]),i},purge:function(e){return delete e._ev,delete e.on,delete e.once,delete e.removeListener,delete e.removeAllListeners,delete e.emit,delete e._ev,delete e._internalEv,delete e._internalOn,delete e._internalOnce,delete e._removeInternalListener,delete e._removeAllInternalListeners,e}};X0e.exports=vwt});var J0e=W((mLr,K0e)=>{"use strict";var Z0e=it(),gwt=cy().dfltConfig;function mwt(e,t){for(var r=[],i,n=0;n<t.length;n++)i=t[n],i===e?r[n]=i:typeof i=="object"?r[n]=Array.isArray(i)?Z0e.extendDeep([],i):Z0e.extendDeepAll({},i):r[n]=i;return r}var Ig={};Ig.add=function(e,t,r,i,n){var a,o;if(e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},o=e.undoQueue.index,e.autoplay){e.undoQueue.inSequence||(e.autoplay=!1);return}!e.undoQueue.sequence||e.undoQueue.beginSequence?(a={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},e.undoQueue.queue.splice(o,e.undoQueue.queue.length-o,a),e.undoQueue.index+=1):a=e.undoQueue.queue[o-1],e.undoQueue.beginSequence=!1,a&&(a.undo.calls.unshift(t),a.undo.args.unshift(r),a.redo.calls.push(i),a.redo.args.push(n)),e.undoQueue.queue.length>gwt.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};Ig.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};Ig.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};Ig.undo=function(t){var r,i;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,i=0;i<r.undo.calls.length;i++)Ig.plotDo(t,r.undo.calls[i],r.undo.args[i]);t.undoQueue.inSequence=!1,t.autoplay=!1}};Ig.redo=function(t){var r,i;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,i=0;i<r.redo.calls.length;i++)Ig.plotDo(t,r.redo.calls[i],r.redo.args[i]);t.undoQueue.inSequence=!1,t.autoplay=!1,t.undoQueue.index++}};Ig.plotDo=function(e,t,r){e.autoplay=!0,r=mwt(e,r),t.apply(null,r)};K0e.exports=Ig});var EV=W((yLr,Q0e)=>{"use strict";Q0e.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var fw=W(su=>{"use strict";var od=yi(),oA=it(),lD=Wa(),kV=ew(),ywt=EV(),xwt=J6(),_wt=cy().configAttributes,ede=ls(),Bp=oA.extendDeepAll,uw=oA.isPlainObject,bwt=oA.isArrayOrTypedArray,uD=oA.nestedProperty,wwt=oA.valObjectMeta,CV="_isSubplotObj",cD="_isLinkedToArray",Twt="_arrayAttrRegexps",rde="_deprecated",DV=[CV,cD,Twt,rde];su.IS_SUBPLOT_OBJ=CV;su.IS_LINKED_TO_ARRAY=cD;su.DEPRECATED=rde;su.UNDERSCORE_ATTRS=DV;su.get=function(){var e={};return od.allTypes.forEach(function(t){e[t]=Mwt(t)}),{defs:{valObjects:wwt,metaKeys:DV.concat(["description","role","editType","impliedEdits"]),editType:{traces:ede.traces,layout:ede.layout},impliedEdits:{}},traces:e,layout:Swt(),frames:Ewt(),animation:cw(xwt),config:cw(_wt)}};su.crawl=function(e,t,r,i){var n=r||0;i=i||"",Object.keys(e).forEach(function(a){var o=e[a];if(DV.indexOf(a)===-1){var s=(i?i+".":"")+a;t(o,a,e,n,s),!su.isValObject(o)&&uw(o)&&a!=="impliedEdits"&&su.crawl(o,t,n+1,s)}})};su.isValObject=function(e){return e&&e.valType!==void 0};su.findArrayAttributes=function(e){var t=[],r=[],i=[],n,a;function o(l,u,c,f){r=r.slice(0,f).concat([u]),i=i.slice(0,f).concat([l&&l._isLinkedToArray]);var h=l&&(l.valType==="data_array"||l.arrayOk===!0)&&!(r[f-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));h&&s(n,0,"")}function s(l,u,c){var f=l[r[u]],h=c+r[u];if(u===r.length-1)bwt(f)&&t.push(a+h);else if(i[u]){if(Array.isArray(f))for(var d=0;d<f.length;d++)uw(f[d])&&s(f[d],u+1,h+"["+d+"].")}else uw(f)&&s(f,u+1,h+".")}return n=e,a="",su.crawl(lD,o),e._module&&e._module.attributes&&su.crawl(e._module.attributes,o),t};su.getTraceValObject=function(e,t){var r=t[0],i=1,n,a,o=e._module;if(o||(o=(od.modules[e.type||lD.type.dflt]||{})._module),!o)return!1;if(n=o.attributes,a=n&&n[r],!a){var s=o.basePlotModule;s&&s.attributes&&(a=s.attributes[r])}return a||(a=lD[r]),ide(a,t,i)};su.getLayoutValObject=function(e,t){var r=Awt(e,t[0]);return ide(r,t,1)};function Awt(e,t){var r,i,n,a,o=e._basePlotModules;if(o){var s;for(r=0;r<o.length;r++){if(n=o[r],n.attrRegex&&n.attrRegex.test(t)){if(n.layoutAttrOverrides)return n.layoutAttrOverrides;!s&&n.layoutAttributes&&(s=n.layoutAttributes)}var l=n.baseLayoutAttrOverrides;if(l&&t in l)return l[t]}if(s)return s}var u=e._modules;if(u){for(r=0;r<u.length;r++)if(a=u[r].layoutAttributes,a&&t in a)return a[t]}for(i in od.componentsRegistry){if(n=od.componentsRegistry[i],n.name==="colorscale"&&t.indexOf("coloraxis")===0)return n.layoutAttributes[t];if(!n.schema&&t===n.name)return n.layoutAttributes}return t in kV?kV[t]:!1}function ide(e,t,r){if(!e)return!1;if(e._isLinkedToArray){if(sD(t[r]))r++;else if(r<t.length)return!1}for(;r<t.length;r++){var i=e[t[r]];if(uw(i))e=i;else break;if(r===t.length-1)break;if(e._isLinkedToArray){if(r++,!sD(t[r]))return!1}else if(e.valType==="info_array"){r++;var n=t[r];if(!sD(n))return!1;var a=e.items;if(Array.isArray(a)){if(n>=a.length)return!1;if(e.dimensions===2){if(r++,t.length===r)return e;var o=t[r];if(!sD(o))return!1;e=a[n][o]}else e=a[n]}else e=a}}return e}function sD(e){return e===Math.round(e)&&e>=0}function Mwt(e){var t,r;t=od.modules[e]._module,r=t.basePlotModule;var i={};i.type=null;var n=Bp({},lD),a=Bp({},t.attributes);su.crawl(a,function(l,u,c,f,h){uD(n,h).set(void 0),l===void 0&&uD(a,h).set(void 0)}),Bp(i,n),od.traceIs(e,"noOpacity")&&delete i.opacity,od.traceIs(e,"showLegend")||(delete i.showlegend,delete i.legendgroup),od.traceIs(e,"noHover")&&(delete i.hoverinfo,delete i.hoverlabel),t.selectPoints||delete i.selectedpoints,Bp(i,a),r.attributes&&Bp(i,r.attributes),i.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:cw(i)};if(t.layoutAttributes){var s={};Bp(s,t.layoutAttributes),o.layoutAttributes=cw(s)}return t.animatable||su.crawl(o,function(l){su.isValObject(l)&&"anim"in l&&delete l.anim}),o}function Swt(){var e={},t,r;Bp(e,kV);for(t in od.subplotsRegistry)if(r=od.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var i=0;i<r.attr.length;i++)tde(e,r,r.attr[i]);else{var n=r.attr==="subplot"?r.name:r.attr;tde(e,r,n)}for(t in od.componentsRegistry){r=od.componentsRegistry[t];var a=r.schema;if(a&&(a.subplots||a.layout)){var o=a.subplots;if(o&&o.xaxis&&!o.yaxis)for(var s in o.xaxis)delete e.yaxis[s];delete e.xaxis.shift,delete e.xaxis.autoshift}else r.name==="colorscale"?Bp(e,r.layoutAttributes):r.layoutAttributes&&Fwt(e,r.layoutAttributes,r.name)}return{layoutAttributes:cw(e)}}function Ewt(){var e={frames:Bp({},ywt)};return cw(e),e.frames}function cw(e){return kwt(e),Cwt(e),Dwt(e),e}function kwt(e){function t(r,i,n){!su.isValObject(r)&&uw(r)&&(r.role="object")}su.crawl(e,t)}function Cwt(e){function t(r,i,n){if(r){var a=r[cD];a&&(delete r[cD],n[i]={items:{}},n[i].items[a]=r,n[i].role="object")}}su.crawl(e,t)}function Dwt(e){function t(r){for(var i in r)if(uw(r[i]))t(r[i]);else if(Array.isArray(r[i]))for(var n=0;n<r[i].length;n++)t(r[i][n]);else r[i]instanceof RegExp&&(r[i]=r[i].toString())}t(e)}function tde(e,t,r){var i=uD(e,r),n=Bp({},t.layoutAttributes);n[CV]=!0,i.set(n)}function Fwt(e,t,r){var i=uD(e,r);i.set(Bp(i.get()||{},t))}});var Da=W(Gx=>{"use strict";var hw=it(),Lwt=Wa(),_y="templateitemname",FV={name:{valType:"string",editType:"none"}};FV[_y]={valType:"string",editType:"calc"};Gx.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=FV.name,t[_y]=FV[_y],t};Gx.traceTemplater=function(e){var t={},r,i;for(r in e)i=e[r],Array.isArray(i)&&i.length&&(t[r]=0);function n(a){r=hw.coerce(a,{},Lwt,"type");var o={type:r,_template:null};if(r in t){i=e[r];var s=t[r]%i.length;t[r]++,o._template=i[s]}return o}return{newTrace:n}};Gx.newContainer=function(e,t,r){var i=e._template,n=i&&(i[t]||r&&i[r]);hw.isPlainObject(n)||(n=null);var a=e[t]={_template:n};return a};Gx.arrayTemplater=function(e,t,r){var i=e._template,n=i&&i[ade(t)],a=i&&i[t];(!Array.isArray(a)||!a.length)&&(a=[]);var o={};function s(u){var c={name:u.name,_input:u},f=c[_y]=u[_y];if(!nde(f))return c._template=n,c;for(var h=0;h<a.length;h++){var d=a[h];if(d.name===f)return o[f]=1,c._template=d,c}return c[r]=u[r]||!1,c._template=!1,c}function l(){for(var u=[],c=0;c<a.length;c++){var f=a[c],h=f.name;if(nde(h)&&!o[h]){var d={_template:f,name:h,_input:{_templateitemname:h}};d[_y]=f[_y],u.push(d),o[h]=1}}return u}return{newItem:s,defaultItems:l}};function nde(e){return e&&typeof e=="string"}function ade(e){var t=e.length-1;return e.charAt(t)!=="s"&&hw.warn("bad argument to arrayDefaultKey: "+e),e.slice(0,-1)+"defaults"}Gx.arrayDefaultKey=ade;Gx.arrayEditor=function(e,t,r){var i=(hw.nestedProperty(e,t).get()||[]).length,n=r._index,a=n>=i&&(r._input||{})._templateitemname;a&&(n=i);var o=t+"["+n+"]",s;function l(){s={},a&&(s[o]={},s[o][_y]=a)}l();function u(d,p){s[d]=p}function c(d,p){a?hw.nestedProperty(s[o],d).set(p):s[o+"."+d]=p}function f(){var d=s;return l(),d}function h(d,p){d&&c(d,p);var v=f();for(var m in v)hw.nestedProperty(e,m).set(v[m])}return{modifyBase:u,modifyItem:c,getUpdateObj:f,applyUpdate:h}}});var Gl=W((bLr,ode)=>{"use strict";var sA=(K3(),Go(Z3)).counter;ode.exports={idRegex:{x:sA("x","( domain)?"),y:sA("y","( domain)?")},attrRegex:sA("[xy]axis"),xAxisMatch:sA("xaxis"),yAxisMatch:sA("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}});var Cs=W(Rh=>{"use strict";var Pwt=yi(),LV=Gl();Rh.id2name=function(t){if(!(typeof t!="string"||!t.match(LV.AX_ID_PATTERN))){var r=t.split(" ")[0].slice(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Rh.name2id=function(t){if(t.match(LV.AX_NAME_PATTERN)){var r=t.slice(5);return r==="1"&&(r=""),t.charAt(0)+r}};Rh.cleanId=function(t,r,i){var n=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(LV.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(n&&!i)){var a=t.split(" ")[0].slice(1).replace(/^0+/,"");return a==="1"&&(a=""),t.charAt(0)+a+(n&&i?" domain":"")}};Rh.list=function(e,t,r){var i=e._fullLayout;if(!i)return[];var n=Rh.listIds(e,t),a=new Array(n.length),o;for(o=0;o<n.length;o++){var s=n[o];a[o]=i[s.charAt(0)+"axis"+s.slice(1)]}if(!r){var l=i._subplots.gl3d||[];for(o=0;o<l.length;o++){var u=i[l[o]];t?a.push(u[t+"axis"]):a.push(u.xaxis,u.yaxis,u.zaxis)}}return a};Rh.listIds=function(e,t){var r=e._fullLayout;if(!r)return[];var i=r._subplots;return t?i[t+"axis"]:i.xaxis.concat(i.yaxis)};Rh.getFromId=function(e,t,r){var i=e._fullLayout;return t=t===void 0||typeof t!="string"?t:t.replace(" domain",""),r==="x"?t=t.replace(/y[0-9]*/,""):r==="y"&&(t=t.replace(/x[0-9]*/,"")),i[Rh.id2name(t)]};Rh.getFromTrace=function(e,t,r){var i=e._fullLayout,n=null;if(Pwt.traceIs(t,"gl3d")){var a=t.scene;a.slice(0,5)==="scene"&&(n=i[a][r+"axis"])}else n=Rh.getFromId(e,t[r+"axis"]||r);return n};Rh.idSort=function(e,t){var r=e.charAt(0),i=t.charAt(0);return r!==i?r>i?1:-1:+(e.slice(1)||1)-+(t.slice(1)||1)};Rh.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function sde(e,t){if(t&&t.length){for(var r=0;r<t.length;r++)if(t[r][e])return!0}return!1}Rh.isLinked=function(e,t){return sde(t,e._axisMatchGroups)||sde(t,e._axisConstraintGroups)}});var by=W((TLr,lde)=>{"use strict";function Iwt(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function Rwt(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}lde.exports={clearOutlineControllers:Iwt,clearOutline:Rwt}});var fD=W((ALr,ude)=>{"use strict";ude.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var _c=W(dD=>{"use strict";var hD=yi(),MLr=Gl().SUBPLOT_PATTERN;dD.getSubplotCalcData=function(e,t,r){var i=hD.subplotsRegistry[t];if(!i)return[];for(var n=i.attr,a=[],o=0;o<e.length;o++){var s=e[o],l=s[0].trace;l[n]===r&&a.push(s)}return a};dD.getModuleCalcData=function(e,t,r){var i=[],n=[],a;if(typeof t=="string"?a=hD.getModule(t).plot:typeof t=="function"?a=t:a=t.plot,!a)return[i,e];for(var o=r,s=0;s<e.length;s++){var l=e[s],u=l[0].trace,c=u.zorder!==void 0;u.visible!==!0||u._length===0||(u._module&&u._module.plot===a&&(!c||u.zorder===o)?i.push(l):n.push(l))}return[i,n]};dD.getSubplotData=function(t,r,i){if(!hD.subplotsRegistry[r])return[];for(var n=hD.subplotsRegistry[r].attr,a=[],o,s,l,u=0;u<t.length;u++)o=t[u],o[n]===i&&a.push(o);return a}});var dde=W(Hx=>{"use strict";var zwt=yi(),dw=it();Hx.manageCommandObserver=function(e,t,r,i){var n={},a=!0;t&&t._commandObserver&&(n=t._commandObserver),n.cache||(n.cache={}),n.lookupTable={};var o=Hx.hasSimpleAPICommandBindings(e,r,n.lookupTable);if(t&&t._commandObserver){if(o)return n;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,n}if(o){cde(e,o,n.cache),n.check=function(){if(a){var c=cde(e,o,n.cache);return c.changed&&i&&n.lookupTable[c.value]!==void 0&&(n.disable(),Promise.resolve(i({value:c.value,type:o.type,prop:o.prop,traces:o.traces,index:n.lookupTable[c.value]})).then(n.enable,n.enable)),c.changed}};for(var s=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],l=0;l<s.length;l++)e._internalOn(s[l],n.check);n.remove=function(){for(var u=0;u<s.length;u++)e._removeInternalListener(s[u],n.check)}}else dw.log("Unable to automatically bind plot updates to API command"),n.lookupTable={},n.remove=function(){};return n.disable=function(){a=!1},n.enable=function(){a=!0},t&&(t._commandObserver=n),n};Hx.hasSimpleAPICommandBindings=function(e,t,r){var i,n=t.length,a;for(i=0;i<n;i++){var o,s=t[i],l=s.method,u=s.args;if(Array.isArray(u)||(u=[]),!l)return!1;var c=Hx.computeAPICommandBindings(e,l,u);if(c.length!==1)return!1;if(!a)a=c[0],Array.isArray(a.traces)&&a.traces.sort();else{if(o=c[0],o.type!==a.type||o.prop!==a.prop)return!1;if(Array.isArray(a.traces))if(Array.isArray(o.traces)){o.traces.sort();for(var f=0;f<a.traces.length;f++)if(a.traces[f]!==o.traces[f])return!1}else return!1;else if(o.prop!==a.prop)return!1}o=c[0];var h=o.value;if(Array.isArray(h))if(h.length===1)h=h[0];else return!1;r&&(r[h]=i)}return a};function cde(e,t,r){var i,n,a,o=!1;if(t.type==="data")i=e._fullData[t.traces!==null?t.traces[0]:0];else if(t.type==="layout")i=e._fullLayout;else return!1;return n=dw.nestedProperty(i,t.prop).get(),a=r[t.type]=r[t.type]||{},a.hasOwnProperty(t.prop)&&a[t.prop]!==n&&(o=!0),a[t.prop]=n,{changed:o,value:n}}Hx.executeAPICommand=function(e,t,r){if(t==="skip")return Promise.resolve();var i=zwt.apiMethodRegistry[t],n=[e];Array.isArray(r)||(r=[]);for(var a=0;a<r.length;a++)n.push(r[a]);return i.apply(null,n).catch(function(o){return dw.warn("API call to Plotly."+t+" rejected.",o),Promise.reject(o)})};Hx.computeAPICommandBindings=function(e,t,r){var i;switch(Array.isArray(r)||(r=[]),t){case"restyle":i=hde(e,r);break;case"relayout":i=fde(e,r);break;case"update":i=hde(e,[r[0],r[2]]).concat(fde(e,[r[1]]));break;case"animate":i=Bwt(e,r);break;default:i=[]}return i};function Bwt(e,t){return Array.isArray(t[0])&&t[0].length===1&&["string","number"].indexOf(typeof t[0][0])!==-1?[{type:"layout",prop:"_currentFrame",value:t[0][0].toString()}]:[]}function fde(e,t){var r=[],i=t[0],n={};if(typeof i=="string")n[i]=t[1];else if(dw.isPlainObject(i))n=i;else return r;return PV(n,function(a,o,s){r.push({type:"layout",prop:a,value:s})},"",0),r}function hde(e,t){var r,i,n,a,o=[];if(i=t[0],n=t[1],r=t[2],a={},typeof i=="string")a[i]=n;else if(dw.isPlainObject(i))a=i,r===void 0&&(r=n);else return o;return r===void 0&&(r=null),PV(a,function(s,l,u){var c,f;if(Array.isArray(u)){f=u.slice();var h=Math.min(f.length,e.data.length);r&&(h=Math.min(h,r.length)),c=[];for(var d=0;d<h;d++)c[d]=r?r[d]:d}else f=u,c=r?r.slice():null;if(c===null)Array.isArray(f)&&(f=f[0]);else if(Array.isArray(c)){if(!Array.isArray(f)){var p=f;f=[];for(var v=0;v<c.length;v++)f[v]=p}f.length=Math.min(c.length,f.length)}o.push({type:"data",prop:s,traces:c,value:f})},"",0),o}function PV(e,t,r,i){Object.keys(e).forEach(function(n){var a=e[n];if(n[0]!=="_"){var o=r+(i>0?".":"")+n;dw.isPlainObject(a)?PV(a,t,o,i+1):t(o,n,a)}})}});var Ko=W((CLr,Tde)=>{"use strict";var kLr=vi(),qwt=z3().timeFormatLocale,Owt=gN().formatLocale,lA=sn(),Nwt=mN(),Uwt=E6().version,Ha=yi(),Vwt=fw(),Gwt=Da(),Si=it(),Hwt=ni(),pde=Kn().BADNUM,zh=Cs(),jwt=by().clearOutline,$wt=fD(),IV=J6(),Wwt=EV(),Ywt=_c().getModuleCalcData,vde=Si.relinkPrivateKeys,jx=Si._,ui=Tde.exports={};Si.extendFlat(ui,Ha);ui.attributes=Wa();ui.attributes.type.values=ui.allTypes;ui.fontAttrs=Ho();ui.layoutAttributes=ew();var vD=dde();ui.executeAPICommand=vD.executeAPICommand;ui.computeAPICommandBindings=vD.computeAPICommandBindings;ui.manageCommandObserver=vD.manageCommandObserver;ui.hasSimpleAPICommandBindings=vD.hasSimpleAPICommandBindings;ui.redrawText=function(e){return e=Si.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(Ha.getComponentMethod("annotations","draw")(e),Ha.getComponentMethod("legend","draw")(e),Ha.getComponentMethod("colorbar","draw")(e),t(ui.previousPromises(e)))},300)})};ui.resize=function(e){e=Si.getGraphDiv(e);var t,r=new Promise(function(i,n){(!e||Si.isHidden(e))&&n(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=i,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Si.isHidden(e)){i(e);return}delete e.layout.width,delete e.layout.height;var a=e.changed;e.autoplay=!0,Ha.call("relayout",e,{autosize:!0}).then(function(){e.changed=a,e._resolveResize===i&&(delete e._resolveResize,i(e))})},100)});return t&&t(r),r};ui.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};ui.sendDataToCloud=function(e,t){e.emit("plotly_beforeexport");let r=new URL(t).origin;var i=ui.graphJson(e,!1,"object");i.version=Uwt;var n=new URL(t);n.searchParams.set("origin",window.location.origin);var a=window.open(n.href,"_blank");if(!a){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),e.emit("plotly_exportfail");return}var o=function(s){s.origin===r&&s.data&&s.data.type==="CHART_AUTH_SUCCESS"&&(a.postMessage({type:"chart",chart:i},r),window.removeEventListener("message",o),e.emit("plotly_afterexport"))};return window.addEventListener("message",o),!1};var Xwt=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],Zwt=["year","month","dayMonth","dayMonthYear"];ui.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,i=e._fullLayout||{};if(i._skipDefaults){delete i._skipDefaults;return}var n=e._fullLayout={},a=e.layout||{},o=e._fullData||[],s=e._fullData=[],l=e.data||[],u=e.calcdata||[],c=e._context||{},f;e._transitionData||ui.createTransitionData(e),n._dfltTitle={plot:jx(e,"Click to enter Plot title"),subtitle:jx(e,"Click to enter Plot subtitle"),x:jx(e,"Click to enter X axis title"),y:jx(e,"Click to enter Y axis title"),colorbar:jx(e,"Click to enter Colorscale title"),annotation:jx(e,"new text")},n._traceWord=jx(e,"trace");var h=gde(e,Xwt);if(i._initialAutoSizeIsDone){var d=i.width,p=i.height;ui.supplyLayoutGlobalDefaults(a,n,h),a.width||(n.width=d),a.height||(n.height=p),ui.sanitizeMargins(n)}else{ui.supplyLayoutGlobalDefaults(a,n,h);var v=!a.width||!a.height,m=n.autosize,g=c.autosizable,w=v&&(m||g);w?ui.plotAutoSize(e,a,n):v&&ui.sanitizeMargins(n),!m&&v&&(a.width=n.width,a.height=n.height)}n._d3locale=Qwt(h,n.separators),n._extraFormat=gde(e,Zwt),n._initialAutoSizeIsDone=!0,n._dataLength=l.length,n._modules=[],n._visibleModules=[],n._basePlotModules=[];var b=n._subplots=Jwt(),_=n._splomAxes={x:{},y:{}},M=n._splomSubplots={};n._splomGridDflt={},n._scatterStackOpts={},n._firstScatter={},n._alignmentOpts={},n._colorAxes={},n._requestRangeslider={},n._traceUids=Kwt(o,l),ui.supplyDataDefaults(l,s,a,n);var x=Object.keys(_.x),T=Object.keys(_.y);if(x.length>1&&T.length>1){for(Ha.getComponentMethod("grid","sizeDefaults")(a,n),f=0;f<x.length;f++)Si.pushUnique(b.xaxis,x[f]);for(f=0;f<T.length;f++)Si.pushUnique(b.yaxis,T[f]);for(var A in M)Si.pushUnique(b.cartesian,A)}if(n._has=ui._hasPlotType.bind(n),o.length===s.length)for(f=0;f<s.length;f++)vde(s[f],o[f]);ui.supplyLayoutModuleDefaults(a,n,s,e._transitionData);var y=n._visibleModules,E=[];for(f=0;f<y.length;f++){var S=y[f].crossTraceDefaults;S&&Si.pushUnique(E,S)}for(f=0;f<E.length;f++)E[f](s,n);n._hasOnlyLargeSploms=n._basePlotModules.length===1&&n._basePlotModules[0].name==="splom"&&x.length>15&&T.length>15&&n.shapes.length===0&&n.images.length===0,ui.linkSubplots(s,n,o,i),ui.cleanPlot(s,n,o,i);var C=!!(i._has&&i._has("cartesian")),k=!!(n._has&&n._has("cartesian")),D=C,F=k;D&&!F?i._bgLayer.remove():F&&!D&&(n._shouldCreateBgLayer=!0),i._zoomlayer&&!e._dragging&&jwt({_fullLayout:i}),e5t(s,n),vde(n,i),Ha.getComponentMethod("colorscale","crossTraceDefaults")(s,n),n._preGUI||(n._preGUI={}),n._tracePreGUI||(n._tracePreGUI={});var P=n._tracePreGUI,R={},L;for(L in P)R[L]="old";for(f=0;f<s.length;f++)L=s[f].uid,R[L]||(P[L]={}),R[L]="new";for(L in R)R[L]==="old"&&delete P[L];xde(n),Ha.getComponentMethod("rangeslider","makeData")(n),!r&&u.length===s.length&&ui.supplyDefaultsUpdateCalc(u,s)};ui.supplyDefaultsUpdateCalc=function(e,t){for(var r=0;r<t.length;r++){var i=t[r],n=(e[r]||[])[0];n&&n.trace&&(n.trace=i)}};function Kwt(e,t){var r=t.length,i,n=e.length,a=new Array(r),o={};function s(c,f){a[f]=c,o[c]=1}function l(c,f){if(c&&typeof c=="string"&&!o[c])return s(c,f),!0}for(i=0;i<r;i++){var u=t[i].uid;typeof u=="number"&&(u=String(u)),!l(u,i)&&(i<n&&l(e[i].uid,i)||s(Si.randstr(o),i))}return a}function Jwt(){var e=Ha.collectableSubplotTypes,t={},r,i;if(!e){e=[];var n=Ha.subplotsRegistry;for(var a in n){var o=n[a],s=o.attr;if(s&&(e.push(a),Array.isArray(s)))for(i=0;i<s.length;i++)Si.pushUnique(e,s[i])}}for(r=0;r<e.length;r++)t[e[r]]=[];return t}function gde(e,t){var r=e._context.locale;r||(r="en-US");var i=!1,n={};function a(f){for(var h=!0,d=0;d<t.length;d++){var p=t[d];n[p]||(f[p]?n[p]=f[p]:h=!1)}h&&(i=!0)}for(var o=0;o<2;o++){for(var s=e._context.locales,l=0;l<2;l++){var u=(s[r]||{}).format;if(u&&(a(u),i))break;s=Ha.localeRegistry}var c=r.split("-")[0];if(i||c===r)break;r=c}return i||a(Ha.localeRegistry.en.format),n}function Qwt(e,t){return e.decimal=t.charAt(0),e.thousands=t.charAt(1),{numberFormat:function(r){try{r=Owt(e).format(Si.adjustFormat(r))}catch(i){return Si.warnBadFormat(r),Si.noFormat}return r},timeFormat:qwt(e).utcFormat}}function e5t(e,t){var r,i=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var n=0;n<e.length;n++){var a=e[n];a.meta?i[a.index]=a._meta={meta:a.meta}:t.meta&&(a._meta={meta:t.meta}),t.meta&&(a._meta.layout={meta:t.meta})}i.length&&(r||(r=t._meta={}),r.data=i)}ui.createTransitionData=function(e){e._transitionData||(e._transitionData={}),e._transitionData._frames||(e._transitionData._frames=[]),e._transitionData._frameHash||(e._transitionData._frameHash={}),e._transitionData._counter||(e._transitionData._counter=0),e._transitionData._interruptCallbacks||(e._transitionData._interruptCallbacks=[])};ui._hasPlotType=function(e){var t,r=this._basePlotModules||[];for(t=0;t<r.length;t++)if(r[t].name===e)return!0;var i=this._modules||[];for(t=0;t<i.length;t++){var n=i[t].name;if(n===e)return!0;var a=Ha.modules[n];if(a&&a.categories[e])return!0}return!1};ui.cleanPlot=function(e,t,r,i){var n,a,o=i._basePlotModules||[];for(n=0;n<o.length;n++){var s=o[n];s.clean&&s.clean(e,t,r,i)}var l=i._has&&i._has("gl"),u=t._has&&t._has("gl");l&&!u&&i._glcontainer!==void 0&&(i._glcontainer.selectAll(".gl-canvas").remove(),i._glcontainer.selectAll(".no-webgl").remove(),i._glcanvas=null);var c=!!i._infolayer;e:for(n=0;n<r.length;n++){var f=r[n],h=f.uid;for(a=0;a<e.length;a++){var d=e[a];if(h===d.uid)continue e}c&&i._infolayer.select(".cb"+h).remove()}};ui.linkSubplots=function(e,t,r,i){var n,a,o=i._plots||{},s=t._plots={},l=t._subplots,u={_fullData:e,_fullLayout:t},c=l.cartesian||[];for(n=0;n<c.length;n++){var f=c[n],h=o[f],d=zh.getFromId(u,f,"x"),p=zh.getFromId(u,f,"y"),v;for(h?v=s[f]=h:(v=s[f]={},v.id=f),d._counterAxes.push(p._id),p._counterAxes.push(d._id),d._subplotsWith.push(f),p._subplotsWith.push(f),v.xaxis=d,v.yaxis=p,v._hasClipOnAxisFalse=!1,a=0;a<e.length;a++){var m=e[a];if(m.xaxis===v.xaxis._id&&m.yaxis===v.yaxis._id&&m.cliponaxis===!1){v._hasClipOnAxisFalse=!0;break}}}var g=zh.list(u,null,!0),w;for(n=0;n<g.length;n++){w=g[n];var b=null;w.overlaying&&(b=zh.getFromId(u,w.overlaying),b&&b.overlaying&&(w.overlaying=!1,b=null)),w._mainAxis=b||w,b&&(w.domain=b.domain.slice()),w._anchorAxis=w.anchor==="free"?null:zh.getFromId(u,w.anchor)}for(n=0;n<g.length;n++)if(w=g[n],w._counterAxes.sort(zh.idSort),w._subplotsWith.sort(Si.subplotSort),w._mainSubplot=t5t(w,t),w._counterAxes.length&&(w.spikemode&&w.spikemode.indexOf("across")!==-1||w.automargin&&w.mirror&&w.anchor!=="free"||Ha.getComponentMethod("rangeslider","isVisible")(w))){var _=1,M=0;for(a=0;a<w._counterAxes.length;a++){var x=zh.getFromId(u,w._counterAxes[a]);_=Math.min(_,x.domain[0]),M=Math.max(M,x.domain[1])}_<M&&(w._counterDomainMin=_,w._counterDomainMax=M)}};function t5t(e,t){var r={_fullLayout:t},i=e._id.charAt(0)==="x",n=e._mainAxis._anchorAxis,a="",o="",s="";if(n&&(s=n._mainAxis._id,a=i?e._id+s:s+e._id),!a||!t._plots[a]){a="";for(var l=e._counterAxes,u=0;u<l.length;u++){var c=l[u],f=i?e._id+c:c+e._id;o||(o=f);var h=zh.getFromId(r,c);if(s&&h.overlaying===s){a=f;break}}}return a||o}ui.supplyDataDefaults=function(e,t,r,i){var n=i._modules,a=i._visibleModules,o=i._basePlotModules,s=0,l=0,u,c,f;function h(w){t.push(w);var b=w._module;b&&(Si.pushUnique(n,b),w.visible===!0&&Si.pushUnique(a,b),Si.pushUnique(o,w._module.basePlotModule),s++,w._input.visible!==!1&&l++)}var d={},p=[],v=(r.template||{}).data||{},m=Gwt.traceTemplater(v);for(u=0;u<e.length;u++)f=e[u],c=m.newTrace(f),c.uid=i._traceUids[u],ui.supplyTraceDefaults(f,c,l,i,u),c.index=u,c._input=f,h(c),Ha.traceIs(c,"carpetAxis")&&(d[c.carpet]=c),Ha.traceIs(c,"carpetDependent")&&p.push(u);for(u=0;u<p.length;u++)if(c=t[p[u]],!!c.visible){var g=d[c.carpet];if(c._carpet=g,!g||!g.visible){c.visible=!1;continue}c.xaxis=g.xaxis,c.yaxis=g.yaxis}};ui.supplyAnimationDefaults=function(e){e=e||{};var t,r={};function i(n,a){return Si.coerce(e||{},r,IV,n,a)}if(i("mode"),i("direction"),i("fromcurrent"),Array.isArray(e.frame))for(r.frame=[],t=0;t<e.frame.length;t++)r.frame[t]=ui.supplyAnimationFrameDefaults(e.frame[t]||{});else r.frame=ui.supplyAnimationFrameDefaults(e.frame||{});if(Array.isArray(e.transition))for(r.transition=[],t=0;t<e.transition.length;t++)r.transition[t]=ui.supplyAnimationTransitionDefaults(e.transition[t]||{});else r.transition=ui.supplyAnimationTransitionDefaults(e.transition||{});return r};ui.supplyAnimationFrameDefaults=function(e){var t={};function r(i,n){return Si.coerce(e||{},t,IV.frame,i,n)}return r("duration"),r("redraw"),t};ui.supplyAnimationTransitionDefaults=function(e){var t={};function r(i,n){return Si.coerce(e||{},t,IV.transition,i,n)}return r("duration"),r("easing"),t};ui.supplyFrameDefaults=function(e){var t={};function r(i,n){return Si.coerce(e,t,Wwt,i,n)}return r("group"),r("name"),r("traces"),r("baseframe"),r("data"),r("layout"),t};ui.supplyTraceDefaults=function(e,t,r,i,n){var a=i.colorway||Hwt.defaults,o=a[r%a.length],s;function l(b,_){return Si.coerce(e,t,ui.attributes,b,_)}var u=l("visible");l("type"),l("name",i._traceWord+" "+n),l("uirevision",i.uirevision);var c=ui.getModule(t);if(t._module=c,c){var f=c.basePlotModule,h=f.attr,d=f.attributes;if(h&&d){var p=i._subplots,v="";if(Array.isArray(h))for(s=0;s<h.length;s++){var m=h[s],g=Si.coerce(e,t,d,m);p[m]&&Si.pushUnique(p[m],g),v+=g}else v=Si.coerce(e,t,d,h);p[f.name]&&Si.pushUnique(p[f.name],v)}}if(u&&(l("customdata"),l("ids"),l("meta"),Ha.traceIs(t,"showLegend")?(Si.coerce(e,t,c.attributes.showlegend?c.attributes:ui.attributes,"showlegend"),Si.coerce(e,t,c.attributes.legend?c.attributes:ui.attributes,"legend"),l("legendwidth"),l("legendgroup"),l("legendgrouptitle.text"),Si.coerce(e,t,c.attributes.legend?c.attributes:ui.attributes,"legendrank"),t._dfltShowLegend=!0):t._dfltShowLegend=!1,c&&c.supplyDefaults(e,t,o,i),Ha.traceIs(t,"noOpacity")||l("opacity"),Ha.traceIs(t,"notLegendIsolatable")&&(t.visible=!!t.visible),Ha.traceIs(t,"noHover")||(t.hovertemplate||Si.coerceHoverinfo(e,t,i),t.type!=="parcats"&&Ha.getComponentMethod("fx","supplyDefaults")(e,t,o,i)),c&&c.selectPoints)){var w=l("selectedpoints");Si.isTypedArray(w)&&(t.selectedpoints=Array.from(w))}return t};ui.supplyLayoutGlobalDefaults=function(e,t,r){function i(f,h){return Si.coerce(e,t,ui.layoutAttributes,f,h)}var n=e.template;Si.isPlainObject(n)&&(t.template=n,t._template=n.layout,t._dataTemplate=n.data),i("autotypenumbers");var a=Si.coerceFont(i,"font"),o=a.size;Si.coerceFont(i,"title.font",a,{overrideDflt:{size:Math.round(o*1.4)}}),i("title.text",t._dfltTitle.plot),i("title.xref");var s=i("title.yref");i("title.pad.t"),i("title.pad.r"),i("title.pad.b"),i("title.pad.l");var l=i("title.automargin");i("title.x"),i("title.xanchor"),i("title.y"),i("title.yanchor"),i("title.subtitle.text",t._dfltTitle.subtitle),Si.coerceFont(i,"title.subtitle.font",a,{overrideDflt:{size:Math.round(t.title.font.size*.7)}}),l&&(s==="paper"&&(t.title.y!==0&&(t.title.y=1),t.title.yanchor==="auto"&&(t.title.yanchor=t.title.y===0?"top":"bottom")),s==="container"&&(t.title.y==="auto"&&(t.title.y=1),t.title.yanchor==="auto"&&(t.title.yanchor=t.title.y<.5?"bottom":"top")));var u=i("uniformtext.mode");u&&i("uniformtext.minsize"),i("autosize",!(e.width&&e.height)),i("width"),i("height"),i("minreducedwidth"),i("minreducedheight"),i("margin.l"),i("margin.r"),i("margin.t"),i("margin.b"),i("margin.pad"),i("margin.autoexpand"),e.width&&e.height&&ui.sanitizeMargins(t),Ha.getComponentMethod("grid","sizeDefaults")(e,t),i("paper_bgcolor"),i("separators",r.decimal+r.thousands),i("colorway"),i("datarevision");var c=i("uirevision");i("editrevision",c),i("selectionrevision",c),Ha.getComponentMethod("modebar","supplyLayoutDefaults")(e,t),Ha.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(e,t,i),Ha.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(e,t,i),i("meta"),Si.isPlainObject(e.transition)&&(i("transition.duration"),i("transition.easing"),i("transition.ordering")),Ha.getComponentMethod("calendars","handleDefaults")(e,t,"calendar"),Ha.getComponentMethod("fx","supplyLayoutGlobalDefaults")(e,t,i),Si.coerce(e,t,$wt,"scattermode")};function pD(e){return typeof e=="string"&&e.slice(-2)==="px"&&parseFloat(e)}ui.plotAutoSize=function(t,r,i){var n=t._context||{},a=n.frameMargins,o,s,l=Si.isPlotDiv(t);if(l&&t.emit("plotly_autosize"),n.fillFrame)o=window.innerWidth,s=window.innerHeight,document.body.style.overflow="hidden";else{var u=l?window.getComputedStyle(t):{};if(o=pD(u.width)||pD(u.maxWidth)||i.width,s=pD(u.height)||pD(u.maxHeight)||i.height,lA(a)&&a>0){var c=1-2*a;o=Math.round(c*o),s=Math.round(c*s)}}var f=ui.layoutAttributes.width.min,h=ui.layoutAttributes.height.min;o<f&&(o=f),s<h&&(s=h);var d=!r.width&&Math.abs(i.width-o)>1,p=!r.height&&Math.abs(i.height-s)>1;(p||d)&&(d&&(i.width=o),p&&(i.height=s)),t._initialAutoSize||(t._initialAutoSize={width:o,height:s}),ui.sanitizeMargins(i)};ui.supplyLayoutModuleDefaults=function(e,t,r,i){var n=Ha.componentsRegistry,a=t._basePlotModules,o,s,l,u=Ha.subplotsRegistry.cartesian;for(o in n)l=n[o],l.includeBasePlot&&l.includeBasePlot(e,t);a.length||a.push(u),t._has("cartesian")&&(Ha.getComponentMethod("grid","contentDefaults")(e,t),u.finalizeSubplots(e,t));for(var c in t._subplots)t._subplots[c].sort(Si.subplotSort);for(s=0;s<a.length;s++)l=a[s],l.supplyLayoutDefaults&&l.supplyLayoutDefaults(e,t,r);var f=t._modules;for(s=0;s<f.length;s++)l=f[s],l.supplyLayoutDefaults&&l.supplyLayoutDefaults(e,t,r);for(o in n)l=n[o],l.supplyLayoutDefaults&&l.supplyLayoutDefaults(e,t,r)};ui.purge=function(e){var t=e._fullLayout||{};t._glcontainer!==void 0&&(t._glcontainer.selectAll(".gl-canvas").remove(),t._glcontainer.remove(),t._glcanvas=null),t._modeBar&&t._modeBar.destroy(),e._transitionData&&(e._transitionData._interruptCallbacks&&(e._transitionData._interruptCallbacks.length=0),e._transitionData._animationRaf&&window.cancelAnimationFrame(e._transitionData._animationRaf)),Si.clearThrottle(),Si.clearResponsive(e),delete e.data,delete e.layout,delete e._fullData,delete e._fullLayout,delete e.calcdata,delete e.empty,delete e.fid,delete e.undoqueue,delete e.undonum,delete e.autoplay,delete e.changed,delete e._promises,delete e._redrawTimer,delete e._hmlumcount,delete e._hmpixcount,delete e._transitionData,delete e._transitioning,delete e._initialAutoSize,delete e._transitioningWithDuration,delete e._dragging,delete e._dragged,delete e._dragdata,delete e._hoverdata,delete e._snapshotInProgress,delete e._editing,delete e._mouseDownTime,delete e._legendMouseDownTime,e.removeAllListeners&&e.removeAllListeners()};ui.style=function(e){var t=e._fullLayout._visibleModules,r=[],i;for(i=0;i<t.length;i++){var n=t[i];n.style&&Si.pushUnique(r,n.style)}for(i=0;i<r.length;i++)r[i](e)};ui.sanitizeMargins=function(e){if(!(!e||!e.margin)){var t=e.width,r=e.height,i=e.margin,n=t-(i.l+i.r),a=r-(i.t+i.b),o;n<0&&(o=(t-1)/(i.l+i.r),i.l=Math.floor(o*i.l),i.r=Math.floor(o*i.r)),a<0&&(o=(r-1)/(i.t+i.b),i.t=Math.floor(o*i.t),i.b=Math.floor(o*i.b))}};ui.clearAutoMarginIds=function(e){e._fullLayout._pushmarginIds={}};ui.allowAutoMargin=function(e,t){e._fullLayout._pushmarginIds[t]=1};function xde(e){var t=e.margin;if(!e._size){var r=e._size={l:Math.round(t.l),r:Math.round(t.r),t:Math.round(t.t),b:Math.round(t.b),p:Math.round(t.pad)};r.w=Math.round(e.width)-r.l-r.r,r.h=Math.round(e.height)-r.t-r.b}e._pushmargin||(e._pushmargin={}),e._pushmarginIds||(e._pushmarginIds={}),e._reservedMargin||(e._reservedMargin={})}var _de=2,bde=2;ui.autoMargin=function(e,t,r){var i=e._fullLayout,n=i.width,a=i.height,o=i.margin,s=i.minreducedwidth,l=i.minreducedheight,u=Si.constrain(n-o.l-o.r,_de,s),c=Si.constrain(a-o.t-o.b,bde,l),f=Math.max(0,n-u),h=Math.max(0,a-c),d=i._pushmargin,p=i._pushmarginIds;if(o.autoexpand!==!1){if(!r)delete d[t],delete p[t];else{var v=r.pad;if(v===void 0&&(v=Math.min(12,o.l,o.r,o.t,o.b)),f){var m=(r.l+r.r)/f;m>1&&(r.l/=m,r.r/=m)}if(h){var g=(r.t+r.b)/h;g>1&&(r.t/=g,r.b/=g)}var w=r.xl!==void 0?r.xl:r.x,b=r.xr!==void 0?r.xr:r.x,_=r.yt!==void 0?r.yt:r.y,M=r.yb!==void 0?r.yb:r.y;d[t]={l:{val:w,size:r.l+v},r:{val:b,size:r.r+v},b:{val:M,size:r.b+v},t:{val:_,size:r.t+v}},p[t]=1}if(!i._replotting)return ui.doAutoMargin(e)}};function r5t(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=zh.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}ui.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,i=t.height;t._size||(t._size={}),xde(t);var n=t._size,a=t.margin,o={t:0,b:0,l:0,r:0},s=Si.extendFlat({},n),l=a.l,u=a.r,c=a.t,f=a.b,h=t._pushmargin,d=t._pushmarginIds,p=t.minreducedwidth,v=t.minreducedheight;if(a.autoexpand!==!1){for(var m in h)d[m]||delete h[m];var g=e._fullLayout._reservedMargin;for(var w in g)for(var b in g[w]){var _=g[w][b];o[b]=Math.max(o[b],_)}h.base={l:{val:0,size:l},r:{val:1,size:u},t:{val:1,size:c},b:{val:0,size:f}};for(var M in o){var x=0;for(var T in h)T!=="base"&&lA(h[T][M].size)&&(x=h[T][M].size>x?h[T][M].size:x);var A=Math.max(0,a[M]-x);o[M]=Math.max(0,o[M]-A)}for(var y in h){var E=h[y].l||{},S=h[y].b||{},C=E.val,k=E.size,D=S.val,F=S.size,P=r-o.r-o.l,R=i-o.t-o.b;for(var L in h){if(lA(k)&&h[L].r){var I=h[L].r.val,B=h[L].r.size;if(I>C){var O=(k*I+(B-P)*C)/(I-C),$=(B*(1-C)+(k-P)*(1-I))/(I-C);O+$>l+u&&(l=O,u=$)}}if(lA(F)&&h[L].t){var Y=h[L].t.val,K=h[L].t.size;if(Y>D){var j=(F*Y+(K-R)*D)/(Y-D),q=(K*(1-D)+(F-R)*(1-Y))/(Y-D);j+q>f+c&&(f=j,c=q)}}}}}var J=Si.constrain(r-a.l-a.r,_de,p),U=Si.constrain(i-a.t-a.b,bde,v),V=Math.max(0,r-J),X=Math.max(0,i-U);if(V){var H=(l+u)/V;H>1&&(l/=H,u/=H)}if(X){var G=(f+c)/X;G>1&&(f/=G,c/=G)}if(n.l=Math.round(l)+o.l,n.r=Math.round(u)+o.r,n.t=Math.round(c)+o.t,n.b=Math.round(f)+o.b,n.p=Math.round(a.pad),n.w=Math.round(r)-n.l-n.r,n.h=Math.round(i)-n.t-n.b,!t._replotting&&(ui.didMarginChange(s,n)||r5t(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var Q=3*(1+Object.keys(d).length);if(t._redrawFromAutoMarginCount<Q)return Ha.call("_doPlot",e);t._size=s,Si.warn("Too many auto-margin redraws.")}i5t(e)};function i5t(e){var t=zh.list(e,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(r){for(var i=0;i<t.length;i++){var n=t[i][r];n&&n()}})}var mde=["l","r","t","b","p","w","h"];ui.didMarginChange=function(e,t){for(var r=0;r<mde.length;r++){var i=mde[r],n=e[i],a=t[i];if(!lA(n)||Math.abs(a-n)>1)return!0}return!1};ui.graphJson=function(e,t=!1,r="json",i=!1,n=!1){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&ui.supplyDefaults(e);var a=i?e._fullData:e.data,o=i?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function l(f,h){if(typeof f=="function")return h?"_function_":null;if(Si.isPlainObject(f)){var d={};return Object.keys(f).sort().forEach(function(g){if(["_","["].indexOf(g.charAt(0))===-1){if(typeof f[g]=="function"){h&&(d[g]="_function");return}d[g]=l(f[g],h)}}),d}var p=Array.isArray(f),v=Si.isTypedArray(f);if((p||v)&&f.dtype&&f.shape){var m=f.bdata;return l({dtype:f.dtype,shape:f.shape,bdata:Si.isArrayBuffer(m)?Nwt.encode(m):m},h)}return p?f.map(function(g){return l(g,h)}):v?Si.simpleMap(f,Si.identity):Si.isJSDate(f)?Si.ms2DateTimeLocal(+f):f}var u={data:(a||[]).map(function(f){var h=l(f);return t&&delete h.fit,h})};if(!t&&(u.layout=l(o),i)){var c=o._size;u.layout.computed={margin:{b:c.b,l:c.l,r:c.r,t:c.t}}}return s&&(u.frames=l(s)),n&&(u.config=l(e._context,!0)),r==="object"?u:JSON.stringify(u)};ui.modifyFrames=function(e,t){var r,i,n,a=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r<t.length;r++)switch(i=t[r],i.type){case"replace":n=i.value;var s=(a[i.index]||{}).name,l=n.name;a[i.index]=o[l]=n,l!==s&&(delete o[s],o[l]=n);break;case"insert":n=i.value,o[n.name]=n,a.splice(i.index,0,n);break;case"delete":n=a[i.index],delete o[n.name],a.splice(i.index,1);break}return Promise.resolve()};ui.computeFrame=function(e,t){var r=e._transitionData._frameHash,i,n,a,o;if(!t)throw new Error("computeFrame must be given a string frame name");var s=r[t.toString()];if(!s)return!1;for(var l=[s],u=[s.name];s.baseframe&&(s=r[s.baseframe.toString()])&&u.indexOf(s.name)===-1;)l.push(s),u.push(s.name);for(var c={};s=l.pop();)if(s.layout&&(c.layout=ui.extendLayout(c.layout,s.layout)),s.data){if(c.data||(c.data=[]),n=s.traces,!n)for(n=[],i=0;i<s.data.length;i++)n[i]=i;for(c.traces||(c.traces=[]),i=0;i<s.data.length;i++)a=n[i],a!=null&&(o=c.traces.indexOf(a),o===-1&&(o=c.data.length,c.traces[o]=a),c.data[o]=ui.extendTrace(c.data[o],s.data[i]))}return c};ui.recomputeFrameHash=function(e){for(var t=e._transitionData._frameHash={},r=e._transitionData._frames,i=0;i<r.length;i++){var n=r[i];n&&n.name&&(t[n.name]=n)}};ui.extendObjectWithContainers=function(e,t,r){var i,n,a,o,s,l,u,c,f=Si.extendDeepNoArrays({},t||{}),h=Si.expandObjectPaths(f),d={};if(r&&r.length)for(a=0;a<r.length;a++)i=Si.nestedProperty(h,r[a]),n=i.get(),n===void 0?Si.nestedProperty(d,r[a]).set(null):(i.set(null),Si.nestedProperty(d,r[a]).set(n));if(e=Si.extendDeepNoArrays(e||{},h),r&&r.length){for(a=0;a<r.length;a++)if(s=Si.nestedProperty(d,r[a]),u=s.get(),!!u){for(l=Si.nestedProperty(e,r[a]),c=l.get(),Array.isArray(c)||(c=[],l.set(c)),o=0;o<u.length;o++){var p=u[o];p===null?c[o]=null:c[o]=ui.extendObjectWithContainers(c[o],p)}l.set(c)}}return e};ui.dataArrayContainers=["dimensions"];ui.layoutArrayContainers=Ha.layoutArrayContainers;ui.extendTrace=function(e,t){return ui.extendObjectWithContainers(e,t,ui.dataArrayContainers)};ui.extendLayout=function(e,t){return ui.extendObjectWithContainers(e,t,ui.layoutArrayContainers)};ui.transition=function(e,t,r,i,n,a){var o={redraw:n.redraw},s={},l=[];return o.prepareFn=function(){for(var u=Array.isArray(t)?t.length:0,c=i.slice(0,u),f=0;f<c.length;f++){var h=c[f],d=e._fullData[h],p=d._module;if(p){if(p.animatable){var v=p.basePlotModule.name;s[v]||(s[v]=[]),s[v].push(h)}e.data[c[f]]=ui.extendTrace(e.data[c[f]],t[f])}}var m=Si.expandObjectPaths(Si.extendDeepNoArrays({},r)),g=/^[xy]axis[0-9]*$/;for(var w in m)g.test(w)&&delete m[w].range;ui.extendLayout(e.layout,m),delete e.calcdata,ui.supplyDefaults(e),ui.doCalcdata(e);var b=Si.expandObjectPaths(r);if(b){var _=e._fullLayout._plots;for(var M in _){var x=_[M],T=x.xaxis,A=x.yaxis,y=T.range.slice(),E=A.range.slice(),S=null,C=null,k=null,D=null;Array.isArray(b[T._name+".range"])?S=b[T._name+".range"].slice():Array.isArray((b[T._name]||{}).range)&&(S=b[T._name].range.slice()),Array.isArray(b[A._name+".range"])?C=b[A._name+".range"].slice():Array.isArray((b[A._name]||{}).range)&&(C=b[A._name].range.slice()),y&&S&&(T.r2l(y[0])!==T.r2l(S[0])||T.r2l(y[1])!==T.r2l(S[1]))&&(k={xr0:y,xr1:S}),E&&C&&(A.r2l(E[0])!==A.r2l(C[0])||A.r2l(E[1])!==A.r2l(C[1]))&&(D={yr0:E,yr1:C}),(k||D)&&l.push(Si.extendFlat({plotinfo:x},k,D))}}return Promise.resolve()},o.runFn=function(u){var c,f=e._fullLayout._basePlotModules,h=l.length,d;if(r)for(d=0;d<f.length;d++)f[d].transitionAxes&&f[d].transitionAxes(e,l,a,u);h?(c=Si.extendFlat({},a),c.duration=0,delete s.cartesian):c=a;for(var p in s){var v=s[p],m=e._fullData[v[0]]._module;m.basePlotModule.plot(e,v,c,u)}},wde(e,a,o)};ui.transitionFromReact=function(e,t,r,i){var n=e._fullLayout,a=n.transition,o={},s=[];return o.prepareFn=function(){var l=n._plots;o.redraw=!1,t.anim==="some"&&(o.redraw=!0),r.anim==="some"&&(o.redraw=!0);for(var u in l){var c=l[u],f=c.xaxis,h=c.yaxis,d=i[f._name].range.slice(),p=i[h._name].range.slice(),v=f.range.slice(),m=h.range.slice();f.setScale(),h.setScale();var g=null,w=null;(f.r2l(d[0])!==f.r2l(v[0])||f.r2l(d[1])!==f.r2l(v[1]))&&(g={xr0:d,xr1:v}),(h.r2l(p[0])!==h.r2l(m[0])||h.r2l(p[1])!==h.r2l(m[1]))&&(w={yr0:p,yr1:m}),(g||w)&&s.push(Si.extendFlat({plotinfo:c},g,w))}return Promise.resolve()},o.runFn=function(l){for(var u=e._fullData,c=e._fullLayout,f=c._basePlotModules,h,d,p,v=[],m=0;m<u.length;m++)v.push(m);function g(){if(e._fullLayout)for(var b=0;b<f.length;b++)f[b].transitionAxes&&f[b].transitionAxes(e,s,h,l)}function w(){if(e._fullLayout)for(var b=0;b<f.length;b++)f[b].plot(e,p,d,l)}s.length&&t.anim?a.ordering==="traces first"?(h=Si.extendFlat({},a,{duration:0}),p=v,d=a,setTimeout(g,a.duration),w()):(h=a,p=null,d=Si.extendFlat({},a,{duration:0}),setTimeout(w,h.duration),g()):s.length?(h=a,g()):t.anim&&(p=v,d=a,w())},wde(e,a,o)};function wde(e,t,r){var i=!1;function n(f){var h=Promise.resolve();if(!f)return h;for(;f.length;)h=h.then(f.shift());return h}function a(f){if(f)for(;f.length;)f.shift()}function o(){return e.emit("plotly_transitioning",[]),new Promise(function(f){e._transitioning=!0,t.duration>0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){i=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return Ha.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,d=0;function p(){return h++,function(){d++,!i&&d===h&&s(f)}}r.runFn(p),setTimeout(p())})}function s(f){if(e._transitionData)return a(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return Ha.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(f)}function l(){if(e._transitionData)return e._transitioning=!1,n(e._transitionData._interruptCallbacks)}var u=[ui.previousPromises,l,r.prepareFn,ui.rehover,ui.reselect,o],c=Si.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return e})}ui.doCalcdata=function(e,t){var r=zh.list(e),i=e._fullData,n=e._fullLayout,a,o,s,l=new Array(i.length),u=(e.calcdata||[]).slice();for(e.calcdata=l,n._numBoxes=0,n._numViolins=0,n._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,n._piecolormap={},n._sunburstcolormap={},n._treemapcolormap={},n._iciclecolormap={},n._funnelareacolormap={},s=0;s<i.length;s++)if(Array.isArray(t)&&t.indexOf(s)===-1){l[s]=u[s];continue}for(s=0;s<i.length;s++)a=i[s],a._arrayAttrs=Vwt.findArrayAttributes(a),a._extremes={};var c=n._subplots.polar||[];for(s=0;s<c.length;s++)r.push(n[c[s]].radialaxis,n[c[s]].angularaxis);for(var f in n._colorAxes){var h=n[f];h.cauto!==!1&&(delete h.cmin,delete h.cmax)}function d(v,m){if(a=i[v],o=a._module,!!o.isContainer===m){var g=[];a.visible===!0&&a._length!==0&&o&&o.calc&&(g=o.calc(e,a)),(!Array.isArray(g)||!g[0])&&(g=[{x:pde,y:pde}]),g[0].t||(g[0].t={}),g[0].trace=a,l[v]=g}}for(o5t(r,i,n),s=0;s<i.length;s++)d(s,!0);for(s=0;s<i.length;s++)d(s,!1);yde(e);var p=a5t(r,e);if(p.length){for(n._numBoxes=0,n._numViolins=0,s=0;s<p.length;s++)d(p[s],!0);for(s=0;s<p.length;s++)d(p[s],!1);yde(e)}Ha.getComponentMethod("fx","calc")(e),Ha.getComponentMethod("errorbars","calc")(e)};var n5t=/(total|sum|min|max|mean|geometric mean|median) (ascending|descending)/;function a5t(e,t){var r=[],i,n,a,o,s;function l(L,I,B){var O=I._id.charAt(0);if(L==="histogram2dcontour"){var $=I._counterAxes[0],Y=zh.getFromId(t,$),K=O==="x"||$==="x"&&Y.type==="category",j=O==="y"||$==="y"&&Y.type==="category";return function(q,J){return q===0||J===0||K&&q===B[J].length-1||j&&J===B.length-1?-1:(O==="y"?J:q)-1}}else return function(q,J){return O==="y"?J:q}}var u={min:function(L){return Si.aggNums(Math.min,null,L)},max:function(L){return Si.aggNums(Math.max,null,L)},sum:function(L){return Si.aggNums(function(I,B){return I+B},null,L)},total:function(L){return Si.aggNums(function(I,B){return I+B},null,L)},mean:function(L){return Si.mean(L)},"geometric mean":function(L){return Si.geometricMean(L)},median:function(L){return Si.median(L)}};function c(L,I){return L[1]-I[1]}function f(L,I){return I[1]-L[1]}for(i=0;i<e.length;i++){var h=e[i];if(h.type==="category"){var d=h.categoryorder.match(n5t);if(d){var p=d[1],v=d[2],m=h._id.charAt(0),g=m==="x",w=[];for(n=0;n<h._categories.length;n++)w.push([h._categories[n],[]]);for(n=0;n<h._traceIndices.length;n++){var b=h._traceIndices[n],_=t._fullData[b];if(_.visible===!0){var M=_.type;Ha.traceIs(_,"histogram")&&(delete _._xautoBinFinished,delete _._yautoBinFinished);var x=M==="splom",T=M==="scattergl",A=t.calcdata[b];for(a=0;a<A.length;a++){var y=A[a],E,S;if(x){var C=_._axesDim[h._id];if(!g){var k=_._diag[C][0];k&&(h=t._fullLayout[zh.id2name(k)])}var D=y.trace.dimensions[C].values;for(o=0;o<D.length;o++)for(E=h._categoriesMap[D[o]],s=0;s<y.trace.dimensions.length;s++)if(s!==C){var F=y.trace.dimensions[s];w[E][1].push(F.values[o])}}else if(T){for(o=0;o<y.t.x.length;o++)g?(E=y.t.x[o],S=y.t.y[o]):(E=y.t.y[o],S=y.t.x[o]),w[E][1].push(S);y.t&&y.t._scene&&delete y.t._scene.dirty}else if(y.hasOwnProperty("z")){S=y.z;var P=l(_.type,h,S);for(o=0;o<S.length;o++)for(s=0;s<S[o].length;s++)E=P(s,o),E+1&&w[E][1].push(S[o][s])}else{if(E=y.p,E===void 0&&(E=y[m]),isNaN(E)||E<0)continue;for(S=y.s,S===void 0&&(S=y.v),S===void 0&&(S=g?y.y:y.x),Array.isArray(S)||(S===void 0?S=[]:S=[S]),o=0;o<S.length;o++)w[E][1].push(S[o])}}}}h._categoriesValue=w;var R=[];for(n=0;n<w.length;n++)R.push([w[n][0],u[p](w[n][1])]);R.sort(v==="descending"?f:c),h._categoriesAggregatedValue=R,h._initialCategories=R.map(function(L){return L[0]}),r=r.concat(h.sortByInitialCategories())}}}return r}function o5t(e,t,r){var i={};function n(l){l.clearCalc(),l.type==="multicategory"&&l.setupMultiCategory(t),i[l._id]=1}Si.simpleMap(e,n);for(var a=r._axisMatchGroups||[],o=0;o<a.length;o++)for(var s in a[o])i[s]||n(r[zh.id2name(s)])}function yde(e){var t=e._fullLayout,r=t._visibleModules,i={},n,a,o;for(a=0;a<r.length;a++){var s=r[a],l=s.crossTraceCalc;if(l){var u=s.basePlotModule.name;i[u]?Si.pushUnique(i[u],l):i[u]=[l]}}for(o in i){var c=i[o],f=t._subplots[o];if(Array.isArray(f))for(n=0;n<f.length;n++){var h=f[n],d=o==="cartesian"?t._plots[h]:t[h];for(a=0;a<c.length;a++)c[a](e,d,h)}else for(a=0;a<c.length;a++)c[a](e)}}ui.rehover=function(e){e._fullLayout._rehover&&e._fullLayout._rehover()};ui.redrag=function(e){e._fullLayout._redrag&&e._fullLayout._redrag()};ui.reselect=function(e){var t=e._fullLayout,r=(e.layout||{}).selections,i=t._previousSelections;t._previousSelections=r;var n=t._reselect||JSON.stringify(r)!==JSON.stringify(i);Ha.getComponentMethod("selections","reselect")(e,n)};ui.generalUpdatePerTraceModule=function(e,t,r,i){var n=t.traceHash,a={},o;for(o=0;o<r.length;o++){var s=r[o],l=s[0].trace;l.visible&&(a[l.type]=a[l.type]||[],a[l.type].push(s))}for(var u in n)if(!a[u]){var c=n[u][0],f=c[0].trace;f.visible=!1,a[u]=[c]}for(var h in a){var d=a[h],p=d[0][0].trace._module;p.plot(e,t,Si.filterVisible(d),i)}t.traceHash=a};ui.plotBasePlot=function(e,t,r,i,n){var a=Ha.getModule(e),o=Ywt(t.calcdata,a)[0];a.plot(t,o,i,n)};ui.cleanBasePlot=function(e,t,r,i,n){var a=n._has&&n._has(e),o=r._has&&r._has(e);a&&!o&&n["_"+e+"layer"].selectAll("g.trace").remove()}});var sd=W($x=>{"use strict";$x.xmlns="http://www.w3.org/2000/xmlns/";$x.svg="http://www.w3.org/2000/svg";$x.xlink="http://www.w3.org/1999/xlink";$x.svgAttrs={xmlns:$x.svg,"xmlns:xlink":$x.xlink}});var Hl=W((FLr,Ade)=>{"use strict";Ade.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}});var uo=W(p0=>{"use strict";var lu=vi(),ld=it(),s5t=ld.strTranslate,RV=sd(),l5t=Hl().LINE_SPACING,u5t=/([^$]*)([$]+[^$]*[$]+)([^$]*)/,Dde=e=>e?e.match(u5t):null;p0.matchTex=Dde;p0.convertToTspans=function(e,t,r){var i=e.text(),n=!e.attr("data-notex")&&t&&t._context.typesetMath&&Dde(i);n&&!d5t()&&(n=null);var a=lu.select(e.node().parentNode);if(a.empty())return;var o=e.attr("class")?e.attr("class").split(" ")[0]:"text";o+="-math",a.selectAll("svg."+o).remove(),a.selectAll("g."+o+"-group").remove(),e.style("display",null).attr({"data-unformatted":i,"data-math":"N"});function s(){a.empty()||(o=e.attr("class")+"-math",a.select("svg."+o).remove()),e.text("").style("white-space","pre");var l=T5t(e.node(),i);l&&e.style("pointer-events","all"),p0.positionText(e),r&&r.call(e)}return n?(t&&t._promises||[]).push(new Promise(function(l){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),c={fontSize:u},f=e.attr("text-anchor");p5t(n[2],c,function(h,d,p){a.selectAll("svg."+o).remove(),a.selectAll("g."+o+"-group").remove();var v=h&&h.select("svg");if(!v||!v.node()){s(),l();return}e.style("display","none");var m=a.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":i,"data-math":"Y"});m.node().appendChild(v.node()),d&&d.node()&&v.node().insertBefore(d.node().cloneNode(!0),v.node().firstChild);var g=p.width,w=p.height;v.attr({class:o,height:w,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":c.fontSize+"px"});var b=e.node().style.fill||"black",_=v.select("g");_.attr({fill:b,stroke:b});var M=_.node().getBoundingClientRect(),x=M.width,T=M.height;(x>g||T>w)&&(v.style("overflow","hidden"),M=v.node().getBoundingClientRect(),x=M.width,T=M.height);var A=+e.attr("x"),y=+e.attr("y"),E=u||e.node().getBoundingClientRect().height,S=-E/4;o[0]==="y"?m.attr({transform:"rotate("+[-90,A,y]+")"+s5t(-x/2,S-T/2)}):o[0]==="l"?y=S-T/2:o[0]==="a"&&o.indexOf("atitle")!==0?(A=0,y=S):(A=A-x*(f==="middle"?.5:f==="end"?1:0),y=y+S-T/2),v.attr({x:A,y}),r&&r.call(e,m),l(m)})})):s(),e};var c5t=/(<|&lt;|&#60;)/g,f5t=/(>|&gt;|&#62;)/g;function h5t(e){return e.replace(c5t,"\\lt ").replace(f5t,"\\gt ")}var zV=null,Fde=()=>typeof MathJax!="undefined"&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,Mde=!1,Sde=!1;function d5t(){let e=Fde();return e===3||e===4?!0:(e===null?Mde||(Mde=!0,ld.warn("MathJax is not loaded. Math equations will not be rendered.")):Sde||(Sde=!0,ld.warn("Unsupported MathJax version:",MathJax.version)),!1)}function p5t(e,t,r){let i=Fde();var n;let a=function(){if(!zV){let u=MathJax._.output.svg_ts.SVG,c=ld.extendFlat({},MathJax.config.svg,{fontCache:"local"});i===4&&(c.linebreaks=ld.extendFlat({},c.linebreaks,{inline:!1})),zV=MathJax._.mathjax.mathjax.document(document,ld.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new u(c)}))}let s="math-output-"+ld.randstr({},64);n=lu.select("body").append("div").attr({id:s}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"});let l=h5t(e).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return zV.convert(l,{display:!1})}).then(function(u){n.node().appendChild(u)})},o=function(){let s=n.select(".MathJax"),l=!s.empty()&&n.select("svg").node();if(!l)ld.log("There was an error in the tex syntax.",e),r();else{let u=l.getBoundingClientRect(),c=s.select("defs");r(s,c,u)}n.remove()};Promise.resolve().then(a).then(o).catch(s=>{ld.log("MathJax typesetting failed.",e,s),n&&n.remove(),r()})}var Lde={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"},v5t={sub:"0.3em",sup:"-0.6em"},g5t={sub:"-0.21em",sup:"0.42em"},Ede="\u200B",kde=["http:","https:","mailto:","",void 0,":"],Pde=p0.NEWLINES=/(\r\n?|\n)/g,qV=/(<[^<>]*>)/,OV=/<(\/?)([^ >]*)(\s+(.*))?>/i,m5t=/<br(\s+.*)?>/i;p0.BR_TAG_ALL=/<br(\s+.*)?>/gi;var Ide=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,Rde=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,zde=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,y5t=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function Wx(e,t){if(!e)return null;var r=e.match(t),i=r&&(r[3]||r[4]);return i&&gD(i)}var x5t=/(^|;)\s*color:/;p0.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,i=t.allowedTags!==void 0?t.allowedTags:["br"],n="...",a=n.length,o=e.split(qV),s=[],l="",u=0,c=0;c<o.length;c++){var f=o[c],h=f.match(OV),d=h&&h[2].toLowerCase();if(d)i.indexOf(d)!==-1&&(s.push(f),l=d);else{var p=f.length;if(u+p<r)s.push(f),u+=p;else if(u<r){var v=r-u;l&&(l!=="br"||v<=a||p<=a)&&s.pop(),r>a?s.push(f.slice(0,Math.max(0,v-a))+n):s.push(f.slice(0,v));break}l=""}}return s.join("")};var _5t={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},b5t=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function gD(e){return e.replace(b5t,function(t,r){var i;return r.charAt(0)==="#"?i=w5t(r.charAt(1)==="x"?parseInt(r.slice(2),16):parseInt(r.slice(1),10)):i=_5t[r],i||t})}p0.convertEntities=gD;function w5t(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r((e>>10)+55232,e%1024+56320)}}function T5t(e,t){t=t.replace(Pde," ");var r=!1,i=[],n,a=-1;function o(){a++;var x=document.createElementNS(RV.svg,"tspan");lu.select(x).attr({class:"line",dy:a*l5t+"em"}),e.appendChild(x),n=x;var T=i;if(i=[{node:x}],T.length>1)for(var A=1;A<T.length;A++)s(T[A])}function s(x){var T=x.type,A={},y;if(T==="a"){y="a";var E=x.target,S=x.href,C=x.popup;S&&(A={"xlink:xlink:show":E==="_blank"||E.charAt(0)!=="_"?"new":"replace",target:E,"xlink:xlink:href":S},C&&(A.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+C+'");return false;'))}else y="tspan";x.style&&(A.style=x.style);var k=document.createElementNS(RV.svg,y);if(T==="sup"||T==="sub"){l(n,Ede),n.appendChild(k);var D=document.createElementNS(RV.svg,"tspan");l(D,Ede),lu.select(D).attr("dy",g5t[T]),A.dy=v5t[T],n.appendChild(k),n.appendChild(D)}else n.appendChild(k);lu.select(k).attr(A),n=x.node=k,i.push(x)}function l(x,T){x.appendChild(document.createTextNode(T))}function u(x){if(i.length===1){ld.log("Ignoring unexpected end tag </"+x+">.",t);return}var T=i.pop();x!==T.type&&ld.log("Start tag <"+T.type+"> doesnt match end tag <"+x+">. Pretending it did match.",t),n=i[i.length-1].node}var c=m5t.test(t);c?o():(n=e,i=[{node:e}]);for(var f=t.split(qV),h=0;h<f.length;h++){var d=f[h],p=d.match(OV),v=p&&p[2].toLowerCase(),m=Lde[v];if(v==="br")o();else if(m===void 0)l(n,gD(d));else if(p[1])u(v);else{var g=p[4],w={type:v},b=Wx(g,Ide);if(b?(b=b.replace(x5t,"$1 fill:"),m&&(b+=";"+m)):m&&(b=m),b&&(w.style=b),v==="a"){r=!0;var _=Wx(g,Rde);if(_){var M=Bde(_);M&&(w.href=M,w.target=Wx(g,zde)||"_blank",w.popup=Wx(g,y5t))}}s(w)}}return r}function Bde(e){var t=encodeURI(decodeURI(e)),r=document.createElement("a"),i=document.createElement("a");r.href=e,i.href=t;var n=r.protocol,a=i.protocol;return kde.indexOf(n)!==-1&&kde.indexOf(a)!==-1?t:""}p0.sanitizeHTML=function(t){t=t.replace(Pde," ");for(var r=document.createElement("p"),i=r,n=[],a=t.split(qV),o=0;o<a.length;o++){var s=a[o],l=s.match(OV),u=l&&l[2].toLowerCase();if(u in Lde)if(l[1])n.length&&(i=n.pop());else{var c=l[4],f=Wx(c,Ide),h=f?{style:f}:{};if(u==="a"){var d=Wx(c,Rde);if(d){var p=Bde(d);if(p){h.href=p;var v=Wx(c,zde);v&&(h.target=v)}}}var m=document.createElement(u);i.appendChild(m),lu.select(m).attr(h),i=m,n.push(m)}else i.appendChild(document.createTextNode(gD(s)))}var g="innerHTML";return r[g]};p0.lineCount=function(t){return t.selectAll("tspan.line").size()||1};p0.positionText=function(t,r,i){return t.each(function(){var n=lu.select(this);function a(l,u){return u===void 0?(u=n.attr(l),u===null&&(n.attr(l,0),u=0)):n.attr(l,u),u}var o=a("x",r),s=a("y",i);this.nodeName==="text"&&n.selectAll("tspan.line").attr({x:o,y:s})})};function Cde(e,t,r){var i=r.horizontalAlign,n=r.verticalAlign||"top",a=e.node().getBoundingClientRect(),o=t.node().getBoundingClientRect(),s,l,u;return n==="bottom"?l=function(){return a.bottom-s.height}:n==="middle"?l=function(){return a.top+(a.height-s.height)/2}:l=function(){return a.top},i==="right"?u=function(){return a.right-s.width}:i==="center"?u=function(){return a.left+(a.width-s.width)/2}:u=function(){return a.left},function(){s=this.node().getBoundingClientRect();var c=u()-o.left,f=l()-o.top,h=r.gd||{};if(r.gd){h._fullLayout._calcInverseTransform(h);var d=ld.apply3DTransform(h._fullLayout._invTransform)(c,f);c=d[0],f=d[1]}return this.style({top:f+"px",left:c+"px","z-index":1e3}),this}}var BV="1px ";p0.makeTextShadow=function(e){var t=BV,r=BV,i=BV;return t+r+i+e+", -"+t+"-"+r+i+e+", "+t+"-"+r+i+e+", -"+t+r+i+e};p0.makeEditable=function(e,t){var r=t.gd,i=t.delegate,n=lu.dispatch("edit","input","cancel"),a=i||e;if(e.style({"pointer-events":i?"none":"all"}),e.size()!==1)throw new Error("boo");function o(){l(),e.style({opacity:0});var u=a.attr("class"),c;u?c="."+u.split(" ")[0]+"-math-group":c="[class*=-math-group]",c&&lu.select(e.node().parentNode).select(c).style({opacity:0})}function s(u){var c=u.node(),f=document.createRange();f.selectNodeContents(c);var h=window.getSelection();h.removeAllRanges(),h.addRange(f),c.focus()}function l(){var u=lu.select(r),c=u.select(".svg-container"),f=c.append("div"),h=e.node().style,d=parseFloat(h.fontSize||12),p=t.text;p===void 0&&(p=e.attr("data-unformatted")),f.classed("plugin-editable editable",!0).style({position:"absolute","font-family":h.fontFamily||"Arial","font-size":d,color:t.fill||h.fill||"black",opacity:1,"background-color":t.background||"transparent",outline:"#ffffff33 1px solid",margin:[-d/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(p).call(Cde(e,c,t)).on("blur",function(){r._editing=!1,e.text(this.textContent).style({opacity:1});var v=lu.select(this).attr("class"),m;v?m="."+v.split(" ")[0]+"-math-group":m="[class*=-math-group]",m&&lu.select(e.node().parentNode).select(m).style({opacity:0});var g=this.textContent;lu.select(this).transition().duration(0).remove(),lu.select(document).on("mouseup",null),n.edit.call(e,g)}).on("focus",function(){var v=this;r._editing=!0,lu.select(document).on("mouseup",function(){if(lu.event.target===v)return!1;document.activeElement===f.node()&&f.node().blur()})}).on("keyup",function(){lu.event.which===27?(r._editing=!1,e.style({opacity:1}),lu.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),n.cancel.call(e,this.textContent)):(n.input.call(e,this.textContent),lu.select(this).call(Cde(e,c,t)))}).on("keydown",function(){lu.event.which===13&&this.blur()}).call(s)}return t.immediate?o():a.on("click",o),lu.rebind(e,n,"on")}});var bc=W((PLr,Gde)=>{"use strict";var A5t=vi(),cA=sn(),mD=it(),Yx=ni(),M5t=Rx().isValid;function S5t(e,t,r){var i=t?mD.nestedProperty(e,t).get()||{}:e,n=i[r||"color"];n&&n._inputArray&&(n=n._inputArray);var a=!1;if(mD.isArrayOrTypedArray(n)){for(var o=0;o<n.length;o++)if(cA(n[o])){a=!0;break}}return mD.isPlainObject(i)&&(a||i.showscale===!0||cA(i.cmin)&&cA(i.cmax)||M5t(i.colorscale)||mD.isPlainObject(i.colorbar))}var qde=["showscale","autocolorscale","colorscale","reversescale","colorbar"],uA=["min","max","mid","auto"];function Ode(e){var t=e._colorAx,r=t||e,i={},n,a,o;for(a=0;a<qde.length;a++)o=qde[a],i[o]=r[o];if(t)for(n="c",a=0;a<uA.length;a++)o=uA[a],i[o]=r["c"+o];else{var s;for(a=0;a<uA.length;a++){if(o=uA[a],s="c"+o,s in r){i[o]=r[s];continue}s="z"+o,s in r&&(i[o]=r[s])}n=s.charAt(0)}return i._sync=function(l,u){var c=uA.indexOf(l)!==-1?n+l:l;r[c]=r["_"+c]=u},i}function Nde(e){for(var t=Ode(e),r=t.min,i=t.max,n=t.reversescale?Ude(t.colorscale):t.colorscale,a=n.length,o=new Array(a),s=new Array(a),l=0;l<a;l++){var u=n[l];o[l]=r+u[0]*(i-r),s[l]=u[1]}return{domain:o,range:s}}function Ude(e){for(var t=e.length,r=new Array(t),i=t-1,n=0;i>=0;i--,n++){var a=e[i];r[n]=[1-a[0],a[1]]}return r}function Vde(e,t){t=t||{};for(var r=e.domain,i=e.range,n=i.length,a=new Array(n),o=0;o<n;o++)a[o]=Yx.rgbaArray(i[o]);var s=A5t.scale.linear().domain(r).range(a).clamp(!0),l=t.noNumericCheck,u=t.returnArray,c;return l&&u?c=s:l?c=function(f){return Yx.rgbaArrayToString(s(f))}:u?c=function(f){return cA(f)?s(f):Yx.isValid(f)?f:Yx.defaultLine}:c=function(f){return cA(f)?Yx.rgbaArrayToString(s(f)):Yx.isValid(f)?f:Yx.defaultLine},c.domain=s.domain,c.range=function(){return i},c}function E5t(e,t){return Vde(Nde(e),t)}Gde.exports={hasColorscale:S5t,extractOpts:Ode,extractScale:Nde,flipScale:Ude,makeColorScaleFunc:Vde,makeColorScaleFuncFromTrace:E5t}});var _s=W((ILr,$de)=>{"use strict";var Hde=aV(),k5t=Hde.FORMAT_LINK,C5t=Hde.DATE_FORMAT_LINK;function D5t(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?NV:jde)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function NV(e,t){return["Sets the "+e+" formatting rule"+(t?" for `"+t+"`":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+k5t+"."].join(" ")}function jde(e,t){return NV(e,t)+[" And for dates see: "+C5t+".","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(" ")}$de.exports={axisHoverFormat:D5t,descriptionOnlyNumbers:NV,descriptionWithDates:jde}});var ec=W((zLr,upe)=>{"use strict";var Wde=Ho(),pw=Vl(),lpe=Du().dash,VV=tn().extendFlat,Yde=Da().templatedArray,RLr=Ga().templateFormatStringDescription,Xde=_s().descriptionWithDates,F5t=Kn().ONEDAY,e1=Gl(),L5t=e1.HOUR_PATTERN,P5t=e1.WEEKDAY_PATTERN,UV={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},I5t=VV({},UV,{values:UV.values.slice().concat(["sync"])});function Zde(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var Kde={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},Jde={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},Qde={valType:"data_array",editType:"ticks"},epe={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function tpe(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function rpe(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var ipe={valType:"color",dflt:pw.defaultLine,editType:"ticks"},npe={valType:"color",dflt:pw.lightLine,editType:"ticks"};function ape(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var ope=VV({},lpe,{editType:"ticks"}),spe={valType:"boolean",editType:"ticks"};upe.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:pw.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:Wde({editType:"ticks",description:"Sets this axis' title font."}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[e1.idRegex.x.toString(),e1.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:[e1.idRegex.x.toString(),e1.idRegex.y.toString()],editType:"calc"},rangebreaks:Yde("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:[P5t,L5t,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:F5t},editType:"calc"}),tickmode:I5t,nticks:Zde(),tick0:Kde,dtick:Jde,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:Qde,ticktext:{valType:"data_array",editType:"ticks"},ticks:epe,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:tpe(),tickwidth:rpe(),tickcolor:ipe,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:VV({},lpe,{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:Wde({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:Xde("tick label")},tickformatstops:Yde("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:Xde("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:pw.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:spe,gridcolor:npe,gridwidth:ape(),griddash:ope,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:pw.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:pw.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",e1.idRegex.x.toString(),e1.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",e1.idRegex.x.toString(),e1.idRegex.y.toString()],editType:"plot"},minor:{tickmode:UV,nticks:Zde("minor"),tick0:Kde,dtick:Jde,tickvals:Qde,ticks:epe,ticklen:tpe("minor"),tickwidth:rpe("minor"),tickcolor:ipe,gridcolor:npe,gridwidth:ape("minor"),griddash:ope,showgrid:spe,editType:"ticks"},minorloglabels:{valType:"enumerated",values:["small digits","complete","none"],dflt:"small digits",editType:"calc"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var yD=W((BLr,hpe)=>{"use strict";var bs=ec(),cpe=Ho(),fpe=tn().extendFlat,R5t=ls().overrideAll;hpe.exports=R5t({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:bs.linecolor,outlinewidth:bs.linewidth,bordercolor:bs.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:bs.minor.tickmode,nticks:bs.nticks,tick0:bs.tick0,dtick:bs.dtick,tickvals:bs.tickvals,ticktext:bs.ticktext,ticks:fpe({},bs.ticks,{dflt:""}),ticklabeloverflow:fpe({},bs.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:bs.ticklen,tickwidth:bs.tickwidth,tickcolor:bs.tickcolor,ticklabelstep:bs.ticklabelstep,showticklabels:bs.showticklabels,labelalias:bs.labelalias,tickfont:cpe({description:"Sets the color bar's tick label font"}),tickangle:bs.tickangle,tickformat:bs.tickformat,tickformatstops:bs.tickformatstops,tickprefix:bs.tickprefix,showtickprefix:bs.showtickprefix,ticksuffix:bs.ticksuffix,showticksuffix:bs.showticksuffix,separatethousands:bs.separatethousands,exponentformat:bs.exponentformat,minexponent:bs.minexponent,showexponent:bs.showexponent,title:{text:{valType:"string"},font:cpe({description:"Sets this color bar's title font."}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var Eo=W((OLr,ppe)=>{"use strict";var z5t=yD(),B5t=(K3(),Go(Z3)).counter,q5t=(qx(),Go(Bx)).default,dpe=Rx().scales,qLr=q5t(dpe);function xD(e){return"`"+e+"`"}ppe.exports=function(t,r){t=t||"",r=r||{};var i=r.cLetter||"c",n="onlyIfNumerical"in r?r.onlyIfNumerical:!!t,a="noScale"in r?r.noScale:t==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:i==="z",s=typeof r.colorscaleDflt=="string"?dpe[r.colorscaleDflt]:null,l=r.editTypeOverride||"",u=t?t+".":"",c,f;"colorAttr"in r?(c=r.colorAttr,f=r.colorAttr):(c={z:"z",c:"color"}[i],f="in "+xD(u+c));var h=n?" Has an effect only if "+f+" is set to a numerical array.":"",d=i+"auto",p=i+"min",v=i+"max",m=i+"mid",g=xD(u+d),w=xD(u+p),b=xD(u+v),_=w+" and "+b,M={};M[p]=M[v]=void 0;var x={};x[d]=!1;var T={};return c==="color"&&(T.color={valType:"color",arrayOk:!0,editType:l||"style"},r.anim&&(T.color.anim=!0)),T[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:M},T[p]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},T[v]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},T[m]={valType:"number",dflt:null,editType:"calc",impliedEdits:M},T.colorscale={valType:"colorscale",editType:"calc",dflt:s,impliedEdits:{autocolorscale:!1}},T.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},T.reversescale={valType:"boolean",dflt:!1,editType:"plot"},a||(T.showscale={valType:"boolean",dflt:o,editType:"calc"},T.colorbar=z5t),r.noColorAxis||(T.coloraxis={valType:"subplotid",regex:B5t("coloraxis"),dflt:null,editType:"calc"}),T}});var HV=W((NLr,vpe)=>{"use strict";var O5t=tn().extendFlat,N5t=Eo(),GV=Rx().scales;vpe.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:GV.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:GV.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:GV.RdBu,editType:"calc"}},coloraxis:O5t({_isSubplotObj:!0,editType:"calc"},N5t("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var jV=W((ULr,gpe)=>{"use strict";var U5t=it();gpe.exports=function(t){return U5t.isPlainObject(t.colorbar)}});var YV=W(WV=>{"use strict";var $V=sn(),mpe=it(),ype=Kn(),V5t=ype.ONEDAY,G5t=ype.ONEWEEK;WV.dtick=function(e,t){var r=t==="log",i=t==="date",n=t==="category",a=i?V5t:1;if(!e)return a;if($V(e))return e=Number(e),e<=0?a:n?Math.max(1,Math.round(e)):i?Math.max(.1,e):e;if(typeof e!="string"||!(i||r))return a;var o=e.charAt(0),s=e.slice(1);return s=$V(s)?Number(s):0,s<=0||!(i&&o==="M"&&s===Math.round(s)||r&&o==="L"||r&&o==="D"&&(s===1||s===2))?a:e};WV.tick0=function(e,t,r,i){if(t==="date")return mpe.cleanDate(e,mpe.dateTick0(r,i%G5t===0?1:0));if(!(i==="D1"||i==="D2"))return $V(e)?Number(e):0}});var Xx=W((GLr,_pe)=>{"use strict";var xpe=YV(),H5t=it().isArrayOrTypedArray,j5t=yc().isTypedArraySpec,$5t=yc().decodeTypedArraySpec;_pe.exports=function(t,r,i,n,a={}){var o=a.isMinor,s=o?t.minor||{}:t,l=o?r.minor:r,u=o?"minor.":"";function c(_){var M=s[_];return j5t(M)&&(M=$5t(M)),M!==void 0?M:(l._template||{})[_]}var f=c("tick0"),h=c("dtick"),d=c("tickvals"),p=c("overlaying"),v=n==="category"||n==="multicategory",m;H5t(d)?m="array":h?m="linear":p&&!v?m="sync":m="auto";var g=i(u+"tickmode",m);if(g==="auto"||g==="sync")i(u+"nticks");else if(g==="linear"){var w=l.dtick=xpe.dtick(h,n);l.tick0=xpe.tick0(f,n,r.calendar,w)}else if(n!=="multicategory"){var b=i(u+"tickvals");b===void 0?l.tickmode="auto":o||i("ticktext")}}});var vw=W((HLr,wpe)=>{"use strict";var XV=it(),bpe=ec();wpe.exports=function(t,r,i,n){var a=n.isMinor,o=a?t.minor||{}:t,s=a?r.minor:r,l=a?bpe.minor:bpe,u=a?"minor.":"",c=XV.coerce2(o,s,l,"ticklen",a?(r.ticklen||5)*.6:void 0),f=XV.coerce2(o,s,l,"tickwidth",a?r.tickwidth||1:void 0),h=XV.coerce2(o,s,l,"tickcolor",(a?r.tickcolor:void 0)||s.color),d=i(u+"ticks",!a&&n.outerTicks||c||f||h?"outside":"");d||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}});var ZV=W((jLr,Tpe)=>{"use strict";Tpe.exports=function(t){var r=["showexponent","showtickprefix","showticksuffix"],i=r.filter(function(a){return t[a]!==void 0}),n=function(a){return t[a]===t[i[0]]};if(i.every(n)||i.length===1)return t[i[0]]}});var Xc=W(($Lr,Ape)=>{"use strict";var _D=it(),W5t=Da();Ape.exports=function(t,r,i){var n=i.name,a=i.inclusionAttr||"visible",o=r[n],s=_D.isArrayOrTypedArray(t[n])?t[n]:[],l=r[n]=[],u=W5t.arrayTemplater(r,n,a),c,f;for(c=0;c<s.length;c++){var h=s[c];_D.isPlainObject(h)?f=u.newItem(h):(f=u.newItem({}),f[a]=!1),f._index=c,f[a]!==!1&&i.handleItemDefaults(h,f,r,i),l.push(f)}var d=u.defaultItems();for(c=0;c<d.length;c++)f=d[c],f._index=l.length,i.handleItemDefaults({},f,r,i,{}),l.push(f);if(_D.isArrayOrTypedArray(o)){var p=Math.min(o.length,l.length);for(c=0;c<p;c++)_D.relinkPrivateKeys(l[c],o[c])}return l}});var wy=W((WLr,Spe)=>{"use strict";var KV=it(),Y5t=ni().contrast,Mpe=ec(),X5t=ZV(),Z5t=Xc();Spe.exports=function(t,r,i,n,a){a||(a={});var o=i("labelalias");KV.isPlainObject(o)||delete r.labelalias;var s=X5t(t),l=i("showticklabels");if(l){a.noTicklabelshift||i("ticklabelshift"),a.noTicklabelstandoff||i("ticklabelstandoff");var u=a.font||{},c=r.color,f=r.ticklabelposition||"",h=f.indexOf("inside")!==-1?Y5t(a.bgColor):c&&c!==Mpe.color.dflt?c:u.color;if(KV.coerceFont(i,"tickfont",u,{overrideDflt:{color:h}}),!a.noTicklabelstep&&n!=="multicategory"&&n!=="log"&&i("ticklabelstep"),!a.noAng){var d=i("tickangle");!a.noAutotickangles&&d==="auto"&&i("autotickangles")}if(n!=="category"){var p=i("tickformat");Z5t(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:K5t}),r.tickformatstops.length||delete r.tickformatstops,!a.noExp&&!p&&n!=="date"&&(i("showexponent",s),i("exponentformat"),i("minexponent"),i("separatethousands"))}!a.noMinorloglabels&&n==="log"&&i("minorloglabels")}};function K5t(e,t){function r(n,a){return KV.coerce(e,t,Mpe.tickformatstops,n,a)}var i=r("enabled");i&&(r("dtickrange"),r("value"))}});var Ty=W((YLr,Epe)=>{"use strict";var J5t=ZV();Epe.exports=function(t,r,i,n,a){a||(a={});var o=a.tickSuffixDflt,s=J5t(t),l=i("tickprefix");l&&i("showtickprefix",s);var u=i("ticksuffix",o);u&&i("showticksuffix",s)}});var JV=W((XLr,kpe)=>{"use strict";var Ay=it(),Q5t=Da(),e4t=Xx(),t4t=vw(),r4t=wy(),i4t=Ty(),n4t=yD();kpe.exports=function(t,r,i){var n=Q5t.newContainer(r,"colorbar"),a=t.colorbar||{};function o(S,C){return Ay.coerce(a,n,n4t,S,C)}var s=i.margin||{t:0,b:0,l:0,r:0},l=i.width-s.l-s.r,u=i.height-s.t-s.b,c=o("orientation"),f=c==="v",h=o("thicknessmode");o("thickness",h==="fraction"?30/(f?l:u):30);var d=o("lenmode");o("len",d==="fraction"?1:f?u:l);var p=o("yref"),v=o("xref"),m=p==="paper",g=v==="paper",w,b,_,M="left";f?(_="middle",M=g?"left":"right",w=g?1.02:1,b=.5):(_=m?"bottom":"top",M="center",w=.5,b=m?1.02:1),Ay.coerce(a,n,{x:{valType:"number",min:g?-2:0,max:g?3:1,dflt:w}},"x"),Ay.coerce(a,n,{y:{valType:"number",min:m?-2:0,max:m?3:1,dflt:b}},"y"),o("xanchor",M),o("xpad"),o("yanchor",_),o("ypad"),Ay.noneOrAll(a,n,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var x=Ay.coerce(a,n,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:f?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",x.indexOf("inside")!==-1?"hide past domain":"hide past div"),e4t(a,n,o,"linear");var T=i.font,A={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:T};x.indexOf("inside")!==-1&&(A.bgColor="black"),i4t(a,n,o,"linear",A),r4t(a,n,o,"linear",A),t4t(a,n,o,"linear",A),o("title.text",i._dfltTitle.colorbar);var y=n.showticklabels?n.tickfont:T,E=Ay.extendFlat({},T,{family:y.family,size:Ay.bigFont(y.size)});Ay.coerceFont(o,"title.font",E),o("title.side",f?"top":"right")}});var Fu=W((ZLr,Fpe)=>{"use strict";var Cpe=sn(),eG=it(),a4t=jV(),o4t=JV(),Dpe=Rx().isValid,s4t=yi().traceIs;function QV(e,t){var r=t.slice(0,t.length-1);return t?eG.nestedProperty(e,r).get()||{}:e}Fpe.exports=function e(t,r,i,n,a){var o=a.prefix,s=a.cLetter,l="_module"in r,u=QV(t,o),c=QV(r,o),f=QV(r._template||{},o)||{},h=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,i,n,a)};if(l){var d=i._colorAxes||{},p=n(o+"coloraxis");if(p){var v=s4t(r,"contour")&&eG.nestedProperty(r,"contours.coloring").get()||"heatmap",m=d[p];m?(m[2].push(h),m[0]!==v&&(m[0]=!1,eG.warn(["Ignoring coloraxis:",p,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[p]=[v,r,[h]];return}}var g=u[s+"min"],w=u[s+"max"],b=Cpe(g)&&Cpe(w)&&g<w,_=n(o+s+"auto",!b);_?n(o+s+"mid"):(n(o+s+"min"),n(o+s+"max"));var M=u.colorscale,x=f.colorscale,T;if(M!==void 0&&(T=!Dpe(M)),x!==void 0&&(T=!Dpe(x)),n(o+"autocolorscale",T),n(o+"colorscale"),n(o+"reversescale"),o!=="marker.line."){var A;o&&l&&(A=a4t(u));var y=n(o+"showscale",A);y&&(o&&f&&(c._template=f),o4t(u,c,i))}}});var Rpe=W((KLr,Ipe)=>{"use strict";var Lpe=it(),l4t=Da(),Ppe=HV(),u4t=Fu();Ipe.exports=function(t,r){function i(f,h){return Lpe.coerce(t,r,Ppe,f,h)}i("colorscale.sequential"),i("colorscale.sequentialminus"),i("colorscale.diverging");var n=r._colorAxes,a,o;function s(f,h){return Lpe.coerce(a,o,Ppe.coloraxis,f,h)}for(var l in n){var u=n[l];if(u[0])a=t[l]||{},o=l4t.newContainer(r,l,"coloraxis"),o._name=l,u4t(a,o,r,s,{prefix:"",cLetter:"c"});else{for(var c=0;c<u[2].length;c++)u[2][c]();delete r._colorAxes[l]}}}});var Bpe=W((JLr,zpe)=>{"use strict";var c4t=it(),f4t=bc().hasColorscale,h4t=bc().extractOpts;zpe.exports=function(t,r){function i(c,f){var h=c["_"+f];h!==void 0&&(c[f]=h)}function n(c,f){var h=f.container?c4t.nestedProperty(c,f.container).get():c;if(h)if(h.coloraxis)h._colorAx=r[h.coloraxis];else{var d=h4t(h),p=d.auto;(p||d.min===void 0)&&i(h,f.min),(p||d.max===void 0)&&i(h,f.max),d.autocolorscale&&i(h,"colorscale")}}for(var a=0;a<t.length;a++){var o=t[a],s=o._module.colorbar;if(s)if(Array.isArray(s))for(var l=0;l<s.length;l++)n(o,s[l]);else n(o,s);f4t(o,"marker.line")&&n(o,{container:"marker.line",min:"cmin",max:"cmax"})}for(var u in r._colorAxes)n(r[u],{min:"cmin",max:"cmax"})}});var Zc=W((QLr,Ope)=>{"use strict";var qpe=sn(),tG=it(),d4t=bc().extractOpts;Ope.exports=function(t,r,i){var n=t._fullLayout,a=i.vals,o=i.containerStr,s=o?tG.nestedProperty(r,o).get():r,l=d4t(s),u=l.auto!==!1,c=l.min,f=l.max,h=l.mid,d=function(){return tG.aggNums(Math.min,null,a)},p=function(){return tG.aggNums(Math.max,null,a)};if(c===void 0?c=d():u&&(s._colorAx&&qpe(c)?c=Math.min(c,d()):c=d()),f===void 0?f=p():u&&(s._colorAx&&qpe(f)?f=Math.max(f,p()):f=p()),u&&h!==void 0&&(f-h>h-c?c=h-(f-h):f-h<h-c&&(f=h+(h-c))),c===f&&(c-=.5,f+=.5),l._sync("min",c),l._sync("max",f),l.autocolorscale){var v;c*f<0?v=n.colorscale.diverging:c>=0?v=n.colorscale.sequential:v=n.colorscale.sequentialminus,l._sync("colorscale",v)}}});var Jo=W((e9r,Npe)=>{"use strict";var bD=Rx(),gw=bc();Npe.exports={moduleType:"component",name:"colorscale",attributes:Eo(),layoutAttributes:HV(),supplyLayoutDefaults:Rpe(),handleDefaults:Fu(),crossTraceDefaults:Bpe(),calc:Zc(),scales:bD.scales,defaultScale:bD.defaultScale,getScale:bD.get,isValidScale:bD.isValid,hasColorscale:gw.hasColorscale,extractOpts:gw.extractOpts,extractScale:gw.extractScale,flipScale:gw.flipScale,makeColorScaleFunc:gw.makeColorScaleFunc,makeColorScaleFuncFromTrace:gw.makeColorScaleFuncFromTrace}});var $o=W((t9r,Vpe)=>{"use strict";var Upe=it(),p4t=yc().isTypedArraySpec;Vpe.exports={hasLines:function(e){return e.visible&&e.mode&&e.mode.indexOf("lines")!==-1},hasMarkers:function(e){return e.visible&&(e.mode&&e.mode.indexOf("markers")!==-1||e.type==="splom")},hasText:function(e){return e.visible&&e.mode&&e.mode.indexOf("text")!==-1},isBubble:function(e){var t=e.marker;return Upe.isPlainObject(t)&&(Upe.isArrayOrTypedArray(t.size)||p4t(t.size))}}});var fA=W((r9r,Gpe)=>{"use strict";var v4t=sn();Gpe.exports=function(t,r){r||(r=2);var i=t.marker,n=i.sizeref||1,a=i.sizemin||0,o=i.sizemode==="area"?function(s){return Math.sqrt(s/n)}:function(s){return s/n};return function(s){var l=o(s/r);return v4t(l)&&l>0?Math.max(l,a):0}}});var Kf=W(wc=>{"use strict";var hA=it();wc.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};wc.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var r=e.xaxes||[],i=e.yaxes||[],n=0;n<r.length;n++)for(var a=0;a<i.length;a++)if(t.indexOf(r[n]+i[a])!==-1)return!0;return!1}return t.indexOf(wc.getSubplot(e))!==-1};wc.flat=function(e,t){for(var r=new Array(e.length),i=0;i<e.length;i++)r[i]=t;return r};wc.p2c=function(e,t){for(var r=new Array(e.length),i=0;i<e.length;i++)r[i]=e[i].p2c(t);return r};wc.c2dApply=function(e,t){e.length!==t.length&&hA.warn("c2dApply: axArray and valArray must be the same length");for(var r=new Array(t.length),i=0;i<t.length;i++){var n=e&&e[i];r[i]=n&&n.c2d?n.c2d(t[i]):t[i]}return r};wc.getDistanceFunction=function(e,t,r,i){return e==="closest"?i||wc.quadrature(t,r):e.charAt(0)==="x"?t:r};wc.getClosest=function(e,t,r){if(r.index!==!1)r.index>=0&&r.index<e.length?r.distance=0:r.index=!1;else for(var i=1/0,n=e.length,a=0;a<n;a++)i=t(e[a]),i<=r.distance&&(r.index=a,r.distance=i);return r};wc.inbox=function(e,t,r){return e*t<0||e===0?r:1/0};wc.quadrature=function(e,t){return function(r){var i=e(r),n=t(r);return Math.sqrt(i*i+n*n)}};wc.makeEventData=function(e,t,r){var i="index"in e?e.index:e.pointNumber,n={data:t._input,fullData:t,curveNumber:t.index,pointNumber:i};return n.pointIndex=i,t._module.eventData?n=t._module.eventData(n,e,t,r,i):("xVal"in e?n.x=e.xVal:"x"in e&&(n.x=e.x),"yVal"in e?n.y=e.yVal:"y"in e&&(n.y=e.y),e.xa&&(n.xaxis=e.xa),e.ya&&(n.yaxis=e.ya),e.zLabelVal!==void 0&&(n.z=e.zLabelVal)),wc.appendArrayPointValue(n,t,i),n};wc.appendArrayPointValue=function(e,t,r){var i=t._arrayAttrs;if(i)for(var n=0;n<i.length;n++){var a=i[n],o=Hpe(a);if(e[o]===void 0){var s=hA.nestedProperty(t,a).get(),l=jpe(s,r);l!==void 0&&(e[o]=l)}}};wc.appendArrayMultiPointValues=function(e,t,r){var i=t._arrayAttrs;if(i)for(var n=0;n<i.length;n++){var a=i[n],o=Hpe(a);if(e[o]===void 0){for(var s=hA.nestedProperty(t,a).get(),l=new Array(r.length),u=0;u<r.length;u++)l[u]=jpe(s,r[u]);e[o]=l}}};var g4t={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function Hpe(e){return g4t[e]||e}function jpe(e,t){if(Array.isArray(t)){if(hA.isArrayOrTypedArray(e)&&hA.isArrayOrTypedArray(e[t[0]]))return e[t[0]][t[1]]}else return e[t]}var m4t={x:!0,y:!0},y4t={"x unified":!0,"y unified":!0};wc.isUnifiedHover=function(e){return typeof e!="string"?!1:!!y4t[e]};wc.isXYhover=function(e){return typeof e!="string"?!1:!!m4t[e]}});var iG=W((n9r,$pe)=>{var rG={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},x4t=/([astvzqmhlc])([^astvzqmhlc]*)/gi,_4t=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function b4t(e){let t=[];return e.replace(x4t,(r,i,n)=>{let a=i.toLowerCase(),o=i,s=w4t(n);for(a==="m"&&s.length>2&&(t.push([o,...s.splice(0,2)]),a="l",o=o==="m"?"l":"L");;){if(s.length===rG[a])return t.push([o,...s]),"";if(s.length<rG[a])throw new Error("malformed path data");t.push([o,...s.splice(0,rG[a])])}}),t}function w4t(e){let t=e.match(_4t);return t?t.map(Number):[]}$pe.exports=b4t});var Qpe=W((a9r,Jpe)=>{"use strict";var T4t=iG(),$r=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},On="M0,0Z",Wpe=Math.sqrt(2),My=Math.sqrt(3),nG=Math.PI,aG=Math.cos,oG=Math.sin;Jpe.exports={circle:{n:0,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2),n="M"+i+",0A"+i+","+i+" 0 1,1 0,-"+i+"A"+i+","+i+" 0 0,1 "+i+",0Z";return r?Un(t,r,n):n}},square:{n:1,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2);return Un(t,r,"M"+i+","+i+"H-"+i+"V-"+i+"H"+i+"Z")}},diamond:{n:2,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.3,2);return Un(t,r,"M"+i+",0L0,"+i+"L-"+i+",0L0,-"+i+"Z")}},cross:{n:3,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.4,2),n=$r(e*1.2,2);return Un(t,r,"M"+n+","+i+"H"+i+"V"+n+"H-"+i+"V"+i+"H-"+n+"V-"+i+"H-"+i+"V-"+n+"H"+i+"V-"+i+"H"+n+"Z")}},x:{n:4,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.8/Wpe,2),n="l"+i+","+i,a="l"+i+",-"+i,o="l-"+i+",-"+i,s="l-"+i+","+i;return Un(t,r,"M0,"+i+n+a+o+a+o+s+o+s+n+s+n+"Z")}},"triangle-up":{n:5,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*2/My,2),n=$r(e/2,2),a=$r(e,2);return Un(t,r,"M-"+i+","+n+"H"+i+"L0,-"+a+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*2/My,2),n=$r(e/2,2),a=$r(e,2);return Un(t,r,"M-"+i+",-"+n+"H"+i+"L0,"+a+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*2/My,2),n=$r(e/2,2),a=$r(e,2);return Un(t,r,"M"+n+",-"+i+"V"+i+"L-"+a+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*2/My,2),n=$r(e/2,2),a=$r(e,2);return Un(t,r,"M-"+n+",-"+i+"V"+i+"L"+a+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.6,2),n=$r(e*1.2,2);return Un(t,r,"M-"+n+",-"+i+"H"+i+"V"+n+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.6,2),n=$r(e*1.2,2);return Un(t,r,"M"+i+",-"+n+"V"+i+"H-"+n+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.6,2),n=$r(e*1.2,2);return Un(t,r,"M"+n+","+i+"H-"+i+"V-"+n+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.6,2),n=$r(e*1.2,2);return Un(t,r,"M-"+i+","+n+"V-"+i+"H"+n+"Z")}},pentagon:{n:13,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.951,2),n=$r(e*.588,2),a=$r(-e,2),o=$r(e*-.309,2),s=$r(e*.809,2);return Un(t,r,"M"+i+","+o+"L"+n+","+s+"H-"+n+"L-"+i+","+o+"L0,"+a+"Z")}},hexagon:{n:14,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2),n=$r(e/2,2),a=$r(e*My/2,2);return Un(t,r,"M"+a+",-"+n+"V"+n+"L0,"+i+"L-"+a+","+n+"V-"+n+"L0,-"+i+"Z")}},hexagon2:{n:15,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2),n=$r(e/2,2),a=$r(e*My/2,2);return Un(t,r,"M-"+n+","+a+"H"+n+"L"+i+",0L"+n+",-"+a+"H-"+n+"L-"+i+",0Z")}},octagon:{n:16,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.924,2),n=$r(e*.383,2);return Un(t,r,"M-"+n+",-"+i+"H"+n+"L"+i+",-"+n+"V"+n+"L"+n+","+i+"H-"+n+"L-"+i+","+n+"V-"+n+"Z")}},star:{n:17,f:function(e,t,r){if(Nn(t))return On;var i=e*1.4,n=$r(i*.225,2),a=$r(i*.951,2),o=$r(i*.363,2),s=$r(i*.588,2),l=$r(-i,2),u=$r(i*-.309,2),c=$r(i*.118,2),f=$r(i*.809,2),h=$r(i*.382,2);return Un(t,r,"M"+n+","+u+"H"+a+"L"+o+","+c+"L"+s+","+f+"L0,"+h+"L-"+s+","+f+"L-"+o+","+c+"L-"+a+","+u+"H-"+n+"L0,"+l+"Z")}},hexagram:{n:18,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.66,2),n=$r(e*.38,2),a=$r(e*.76,2);return Un(t,r,"M-"+a+",0l-"+n+",-"+i+"h"+a+"l"+n+",-"+i+"l"+n+","+i+"h"+a+"l-"+n+","+i+"l"+n+","+i+"h-"+a+"l-"+n+","+i+"l-"+n+",-"+i+"h-"+a+"Z")}},"star-triangle-up":{n:19,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*My*.8,2),n=$r(e*.8,2),a=$r(e*1.6,2),o=$r(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Un(t,r,"M-"+i+","+n+s+i+","+n+s+"0,-"+a+s+"-"+i+","+n+"Z")}},"star-triangle-down":{n:20,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*My*.8,2),n=$r(e*.8,2),a=$r(e*1.6,2),o=$r(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Un(t,r,"M"+i+",-"+n+s+"-"+i+",-"+n+s+"0,"+a+s+i+",-"+n+"Z")}},"star-square":{n:21,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.1,2),n=$r(e*2,2),a="A "+n+","+n+" 0 0 1 ";return Un(t,r,"M-"+i+",-"+i+a+"-"+i+","+i+a+i+","+i+a+i+",-"+i+a+"-"+i+",-"+i+"Z")}},"star-diamond":{n:22,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.4,2),n=$r(e*1.9,2),a="A "+n+","+n+" 0 0 1 ";return Un(t,r,"M-"+i+",0"+a+"0,"+i+a+i+",0"+a+"0,-"+i+a+"-"+i+",0Z")}},"diamond-tall":{n:23,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*.7,2),n=$r(e*1.4,2);return Un(t,r,"M0,"+n+"L"+i+",0L0,-"+n+"L-"+i+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.4,2),n=$r(e*.7,2);return Un(t,r,"M0,"+n+"L"+i+",0L0,-"+n+"L-"+i+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2);return Un(t,r,"M"+i+","+i+"H-"+i+"L"+i+",-"+i+"H-"+i+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2);return Un(t,r,"M"+i+","+i+"V-"+i+"L-"+i+","+i+"V-"+i+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2);return Un(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i+"M"+i+",0A"+i+","+i+" 0 1,1 0,-"+i+"A"+i+","+i+" 0 0,1 "+i+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2),n=$r(e/Wpe,2);return Un(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+i+",0A"+i+","+i+" 0 1,1 0,-"+i+"A"+i+","+i+" 0 0,1 "+i+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2);return Un(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i+"M"+i+","+i+"H-"+i+"V-"+i+"H"+i+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2);return Un(t,r,"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i+"M"+i+","+i+"H-"+i+"V-"+i+"H"+i+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.3,2);return Un(t,r,"M"+i+",0L0,"+i+"L-"+i+",0L0,-"+i+"ZM0,-"+i+"V"+i+"M-"+i+",0H"+i)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.3,2),n=$r(e*.65,2);return Un(t,r,"M"+i+",0L0,"+i+"L-"+i+",0L0,-"+i+"ZM-"+n+",-"+n+"L"+n+","+n+"M-"+n+","+n+"L"+n+",-"+n)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.4,2);return Un(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2);return Un(t,r,"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.2,2),n=$r(e*.85,2);return Un(t,r,"M0,"+i+"V-"+i+"M"+i+",0H-"+i+"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,r){if(Nn(t))return On;var i=$r(e/2,2),n=$r(e,2);return Un(t,r,"M"+i+","+n+"V-"+n+"M"+(i-n)+",-"+n+"V"+n+"M"+n+","+i+"H-"+n+"M-"+n+","+(i-n)+"H"+n)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.2,2),n=$r(e*1.6,2),a=$r(e*.8,2);return Un(t,r,"M-"+i+","+a+"L0,0M"+i+","+a+"L0,0M0,-"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.2,2),n=$r(e*1.6,2),a=$r(e*.8,2);return Un(t,r,"M-"+i+",-"+a+"L0,0M"+i+",-"+a+"L0,0M0,"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.2,2),n=$r(e*1.6,2),a=$r(e*.8,2);return Un(t,r,"M"+a+","+i+"L0,0M"+a+",-"+i+"L0,0M-"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.2,2),n=$r(e*1.6,2),a=$r(e*.8,2);return Un(t,r,"M-"+a+","+i+"L0,0M-"+a+",-"+i+"L0,0M"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.4,2);return Un(t,r,"M"+i+",0H-"+i)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*1.4,2);return Un(t,r,"M0,"+i+"V-"+i)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2);return Un(t,r,"M"+i+",-"+i+"L-"+i+","+i)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2);return Un(t,r,"M"+i+","+i+"L-"+i+",-"+i)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2),n=$r(e*2,2);return Un(t,r,"M0,0L-"+i+","+n+"H"+i+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2),n=$r(e*2,2);return Un(t,r,"M0,0L-"+i+",-"+n+"H"+i+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*2,2),n=$r(e,2);return Un(t,r,"M0,0L"+i+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*2,2),n=$r(e,2);return Un(t,r,"M0,0L-"+i+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2),n=$r(e*2,2);return Un(t,r,"M-"+i+",0H"+i+"M0,0L-"+i+","+n+"H"+i+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,t,r){if(Nn(t))return On;var i=$r(e,2),n=$r(e*2,2);return Un(t,r,"M-"+i+",0H"+i+"M0,0L-"+i+",-"+n+"H"+i+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*2,2),n=$r(e,2);return Un(t,r,"M0,-"+n+"V"+n+"M0,0L"+i+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,t,r){if(Nn(t))return On;var i=$r(e*2,2),n=$r(e,2);return Un(t,r,"M0,-"+n+"V"+n+"M0,0L-"+i+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,r){if(Nn(t))return On;var i=nG/2.5,n=2*e*aG(i),a=2*e*oG(i);return Un(t,r,"M0,0L"+-n+","+a+"L"+n+","+a+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(Nn(t))return On;var i=nG/4,n=2*e*aG(i),a=2*e*oG(i);return Un(t,r,"M0,0L"+-n+","+a+"A "+2*e+","+2*e+" 0 0 1 "+n+","+a+"Z")},backoff:.4,noDot:!0}};function Nn(e){return e===null}var Ype,Xpe,Zpe,Kpe;function Un(e,t,r){if((!e||e%360===0)&&!t)return r;if(Zpe===e&&Kpe===t&&Ype===r)return Xpe;Zpe=e,Kpe=t,Ype=r;function i(m,g){var w=aG(m),b=oG(m),_=g[0],M=g[1]+(t||0);return[_*w-M*b,_*b+M*w]}for(var n=e/180*nG,a=0,o=0,s=T4t(r),l="",u=0;u<s.length;u++){var c=s[u],f=c[0],h=a,d=o;if(f==="M"||f==="L")a=+c[1],o=+c[2];else if(f==="m"||f==="l")a+=+c[1],o+=+c[2];else if(f==="H")a=+c[1];else if(f==="h")a+=+c[1];else if(f==="V")o=+c[1];else if(f==="v")o+=+c[1];else if(f==="A"){a=+c[1],o=+c[2];var p=i(n,[+c[6],+c[7]]);c[6]=p[0],c[7]=p[1],c[3]=+c[3]+e}(f==="H"||f==="V")&&(f="L"),(f==="h"||f==="v")&&(f="l"),(f==="m"||f==="l")&&(a-=h,o-=d);var v=i(n,[a,o]);(f==="H"||f==="V")&&(f="L"),(f==="M"||f==="L"||f==="m"||f==="l")&&(c[1]=v[0],c[2]=v[1]),c[0]=f,l+=c[0]+c.slice(1).join(",")}return Xpe=l,l}});var Ji=W((o9r,xve)=>{"use strict";var Lu=vi(),_o=it(),A4t=_o.numberFormat,Sy=sn(),TD=yi(),uu=ni(),M4t=Jo(),pA=_o.strTranslate,AD=uo(),S4t=sd(),E4t=Hl(),k4t=E4t.LINE_SPACING,uve=kg().DESELECTDIM,C4t=$o(),D4t=fA(),F4t=Kf().appendArrayPointValue,ci=xve.exports={};ci.font=function(e,t){var r=t.variant,i=t.style,n=t.weight,a=t.color,o=t.size,s=t.family,l=t.shadow,u=t.lineposition,c=t.textcase;s&&e.style("font-family",s),o+1&&e.style("font-size",o+"px"),a&&e.call(uu.fill,a),n&&e.style("font-weight",n),i&&e.style("font-style",i),r&&e.style("font-variant",r),c&&e.style("text-transform",sG(P4t(c))),l&&e.style("text-shadow",l==="auto"?AD.makeTextShadow(uu.contrast(a)):sG(l)),u&&e.style("text-decoration-line",sG(I4t(u)))};function sG(e){return e==="none"?void 0:e}var L4t={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function P4t(e){return L4t[e]}function I4t(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}ci.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};ci.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};ci.setRect=function(e,t,r,i,n){e.call(ci.setPosition,t,r).call(ci.setSize,i,n)};ci.translatePoint=function(e,t,r,i){var n=r.c2p(e.x),a=i.c2p(e.y);if(Sy(n)&&Sy(a)&&t.node())t.node().nodeName==="text"?t.attr("x",n).attr("y",a):t.attr("transform",pA(n,a));else return!1;return!0};ci.translatePoints=function(e,t,r){e.each(function(i){var n=Lu.select(this);ci.translatePoint(i,n,t,r)})};ci.hideOutsideRangePoint=function(e,t,r,i,n,a){t.attr("display",r.isPtWithinRange(e,n)&&i.isPtWithinRange(e,a)?null:"none")};ci.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,i=t.yaxis;e.each(function(n){var a=n[0].trace,o=a.xcalendar,s=a.ycalendar,l=TD.traceIs(a,"bar-like")?".bartext":".point,.textpoint";e.selectAll(l).each(function(u){ci.hideOutsideRangePoint(u,Lu.select(this),r,i,o,s)})})}};ci.crispRound=function(e,t,r){return!t||!Sy(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};ci.singleLineStyle=function(e,t,r,i,n){t.style("fill","none");var a=(((e||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=n||a.dash||"";uu.stroke(t,i||a.color),ci.dashLine(t,s,o)};ci.lineGroupStyle=function(e,t,r,i){e.style("fill","none").each(function(n){var a=(((n||[])[0]||{}).trace||{}).line||{},o=t||a.width||0,s=i||a.dash||"";Lu.select(this).call(uu.stroke,r||a.color).call(ci.dashLine,s,o)})};ci.dashLine=function(e,t,r){r=+r||0,t=ci.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};ci.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return e==="solid"?e="":e==="dot"?e=r+"px,"+r+"px":e==="dash"?e=3*r+"px,"+3*r+"px":e==="longdash"?e=5*r+"px,"+5*r+"px":e==="dashdot"?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":e==="longdashdot"&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e};function cve(e,t,r,i){var n=t.fillpattern,a=t.fillgradient,o=ci.getPatternAttr,s=n&&(o(n.shape,0,"")||o(n.path,0,""));if(s){var l=o(n.bgcolor,0,null),u=o(n.fgcolor,0,null),c=n.fgopacity,f=o(n.size,0,8),h=o(n.solidity,0,.3),d=t.uid;ci.pattern(e,"point",r,d,s,f,h,void 0,n.fillmode,l,u,c)}else if(a&&a.type!=="none"){var p=a.type,v="scatterfill-"+t.uid;if(i&&(v="legendfill-"+t.uid),!i&&(a.start!==void 0||a.stop!==void 0)){var m,g;p==="horizontal"?(m={x:a.start,y:0},g={x:a.stop,y:0}):p==="vertical"&&(m={x:0,y:a.start},g={x:0,y:a.stop}),m.x=t._xA.c2p(m.x===void 0?t._extremes.x.min[0].val:m.x,!0),m.y=t._yA.c2p(m.y===void 0?t._extremes.y.min[0].val:m.y,!0),g.x=t._xA.c2p(g.x===void 0?t._extremes.x.max[0].val:g.x,!0),g.y=t._yA.c2p(g.y===void 0?t._extremes.y.max[0].val:g.y,!0),e.call(dve,r,v,"linear",a.colorscale,"fill",m,g,!0,!1)}else p==="horizontal"&&(p=p+"reversed"),e.call(ci.gradient,r,v,p,a.colorscale,"fill")}else t.fillcolor&&e.call(uu.fill,t.fillcolor)}ci.singleFillStyle=function(e,t){var r=Lu.select(e.node()),i=r.data(),n=((i[0]||[])[0]||{}).trace||{};cve(e,n,t,!1)};ci.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(i){var n=Lu.select(this);i[0].trace&&cve(n,i[0].trace,t,r)})};var eve=Qpe();ci.symbolNames=[];ci.symbolFuncs=[];ci.symbolBackOffs=[];ci.symbolNeedLines={};ci.symbolNoDot={};ci.symbolNoFill={};ci.symbolList=[];Object.keys(eve).forEach(function(e){var t=eve[e],r=t.n;ci.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),ci.symbolNames[r]=e,ci.symbolFuncs[r]=t.f,ci.symbolBackOffs[r]=t.backoff||0,t.needLine&&(ci.symbolNeedLines[r]=!0),t.noDot?ci.symbolNoDot[r]=!0:ci.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(ci.symbolNoFill[r]=!0)});var R4t=ci.symbolNames.length,z4t="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";ci.symbolNumber=function(e){if(Sy(e))e=+e;else if(typeof e=="string"){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),e=ci.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=R4t||e>=400?0:Math.floor(Math.max(e,0))};function fve(e,t,r,i){var n=e%100;return ci.symbolFuncs[n](t,r,i)+(e>=200?z4t:"")}var tve=A4t("~f"),hve={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}};ci.gradient=function(e,t,r,i,n,a){var o=hve[i];return dve(e,t,r,o.type,n,a,o.start,o.stop,!1,o.reversed)};function dve(e,t,r,i,n,a,o,s,l,u){var c=n.length,f;i==="linear"?f={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:i==="radial"&&(f={node:"radialGradient",reversed:u});for(var h=new Array(c),d=0;d<c;d++)f.reversed?h[c-1-d]=[tve((1-n[d][0])*100),n[d][1]]:h[d]=[tve(n[d][0]*100),n[d][1]];var p=t._fullLayout,v="g"+p._uid+"-"+r,m=p._defs.select(".gradients").selectAll("#"+v).data([i+h.join(";")],_o.identity);m.exit().remove(),m.enter().append(f.node).each(function(){var g=Lu.select(this);f.attrs&&g.attr(f.attrs),g.attr("id",v);var w=g.selectAll("stop").data(h);w.exit().remove(),w.enter().append("stop"),w.each(function(b){Lu.select(this).attr({offset:b[0]+"%","stop-color":uu.rgb(b[1]),"stop-opacity":uu.parse(b[1]).alpha})})}),e.style(a,hG(v,t)).style(a+"-opacity",null),e.classed("gradient_filled",!0)}ci.pattern=function(e,t,r,i,n,a,o,s,l,u,c,f){var h=t==="legend";s&&(l==="overlay"?(u=s,c=uu.contrast(u)):(u=void 0,c=s));var d=r._fullLayout,p="p"+d._uid+"-"+i,v,m,g=function(C,k,D,F,P){return F+(P-F)*(C-k)/(D-k)},w,b,_,M,x={},T=uu.rgb(c),A=uu.parse(c).alpha,y=f*A;switch(n){case"/":v=a*Math.sqrt(2),m=a*Math.sqrt(2),w="M-"+v/4+","+m/4+"l"+v/2+",-"+m/2+"M0,"+m+"L"+v+",0M"+v/4*3+","+m/4*5+"l"+v/2+",-"+m/2,b=o*a,M="path",x={d:w,opacity:y,stroke:T,"stroke-width":b+"px"};break;case"\\":v=a*Math.sqrt(2),m=a*Math.sqrt(2),w="M"+v/4*3+",-"+m/4+"l"+v/2+","+m/2+"M0,0L"+v+","+m+"M-"+v/4+","+m/4*3+"l"+v/2+","+m/2,b=o*a,M="path",x={d:w,opacity:y,stroke:T,"stroke-width":b+"px"};break;case"x":v=a*Math.sqrt(2),m=a*Math.sqrt(2),w="M-"+v/4+","+m/4+"l"+v/2+",-"+m/2+"M0,"+m+"L"+v+",0M"+v/4*3+","+m/4*5+"l"+v/2+",-"+m/2+"M"+v/4*3+",-"+m/4+"l"+v/2+","+m/2+"M0,0L"+v+","+m+"M-"+v/4+","+m/4*3+"l"+v/2+","+m/2,b=a-a*Math.sqrt(1-o),M="path",x={d:w,opacity:y,stroke:T,"stroke-width":b+"px"};break;case"|":v=a,m=a,M="path",w="M"+v/2+",0L"+v/2+","+m,b=o*a,M="path",x={d:w,opacity:y,stroke:T,"stroke-width":b+"px"};break;case"-":v=a,m=a,M="path",w="M0,"+m/2+"L"+v+","+m/2,b=o*a,M="path",x={d:w,opacity:y,stroke:T,"stroke-width":b+"px"};break;case"+":v=a,m=a,M="path",w="M"+v/2+",0L"+v/2+","+m+"M0,"+m/2+"L"+v+","+m/2,b=a-a*Math.sqrt(1-o),M="path",x={d:w,opacity:y,stroke:T,"stroke-width":b+"px"};break;case".":v=a,m=a,o<Math.PI/4?_=Math.sqrt(o*a*a/Math.PI):_=g(o,Math.PI/4,1,a/2,a/Math.sqrt(2)),M="circle",x={cx:v/2,cy:m/2,r:_,opacity:y,fill:T};break;default:v=a,m=a,M="path",x={d:n,opacity:y,fill:T};break}var E=[n||"noSh",u||"noBg",c||"noFg",a,o].join(";"),S=d._defs.select(".patterns").selectAll("#"+p).data([E],_o.identity);S.exit().remove(),S.enter().append("pattern").each(function(){var C=Lu.select(this);if(C.attr({id:p,width:v+"px",height:m+"px",patternUnits:"userSpaceOnUse",patternTransform:h?"scale(0.8)":""}),u){var k=uu.rgb(u),D=uu.parse(u).alpha,F=C.selectAll("rect").data([0]);F.exit().remove(),F.enter().append("rect").attr({width:v+"px",height:m+"px",fill:k,"fill-opacity":D})}var P=C.selectAll(M).data([0]);P.exit().remove(),P.enter().append(M).attr(x)}),e.style("fill",hG(p,r)).style("fill-opacity",null),e.classed("pattern_filled",!0)};ci.initGradients=function(e){var t=e._fullLayout,r=_o.ensureSingle(t._defs,"g","gradients");r.selectAll("linearGradient,radialGradient").remove(),Lu.select(e).selectAll(".gradient_filled").classed("gradient_filled",!1)};ci.initPatterns=function(e){var t=e._fullLayout,r=_o.ensureSingle(t._defs,"g","patterns");r.selectAll("pattern").remove(),Lu.select(e).selectAll(".pattern_filled").classed("pattern_filled",!1)};ci.getPatternAttr=function(e,t,r){return e&&_o.isArrayOrTypedArray(e)?t<e.length?e[t]:r:e};ci.pointStyle=function(e,t,r,i){if(e.size()){var n=ci.makePointStyleFns(t);e.each(function(a){ci.singlePointStyle(a,Lu.select(this),t,n,r,i)})}};ci.singlePointStyle=function(e,t,r,i,n,a){var o=r.marker,s=o.line;if(a&&a.i>=0&&e.i===void 0&&(e.i=a.i),t.style("opacity",i.selectedOpacityFn?i.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),i.ms2mrc){var l;e.ms==="various"||o.size==="various"?l=3:l=i.ms2mrc(e.ms),e.mrc=l,i.selectedSizeFn&&(l=e.mrc=i.selectedSizeFn(e));var u=ci.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var c=pG(e,r),f=dG(e,r);t.attr("d",fve(u,l,c,f))}var h=!1,d,p,v;if(e.so)v=s.outlierwidth,p=s.outliercolor,d=o.outliercolor;else{var m=(s||{}).width;v=(e.mlw+1||m+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?p=e.mlcc=i.lineScale(e.mlc):_o.isArrayOrTypedArray(s.color)?p=uu.defaultLine:p=s.color,_o.isArrayOrTypedArray(o.color)&&(d=uu.defaultLine,h=!0),"mc"in e?d=e.mcc=i.markerScale(e.mc):d=o.color||o.colors||"rgba(0,0,0,0)",i.selectedColorFn&&(d=i.selectedColorFn(e))}let g=e.mld||(s||{}).dash;if(g&&ci.dashLine(t,g,v),e.om)t.call(uu.stroke,d).style({"stroke-width":(v||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:v)+"px");var w=o.gradient,b=e.mgt;b?h=!0:b=w&&w.type,_o.isArrayOrTypedArray(b)&&(b=b[0],hve[b]||(b=0));var _=o.pattern,M=ci.getPatternAttr,x=_&&(M(_.shape,e.i,"")||M(_.path,e.i,""));if(b&&b!=="none"){var T=e.mgc;T?h=!0:T=w.color;var A=r.uid;h&&(A+="-"+e.i),ci.gradient(t,n,A,b,[[0,T],[1,d]],"fill")}else if(x){var y=!1,E=_.fgcolor;!E&&a&&a.color&&(E=a.color,y=!0);var S=M(E,e.i,a&&a.color||null),C=M(_.bgcolor,e.i,null),k=_.fgopacity,D=M(_.size,e.i,8),F=M(_.solidity,e.i,.3);y=y||e.mcc||_o.isArrayOrTypedArray(_.shape)||_o.isArrayOrTypedArray(_.path)||_o.isArrayOrTypedArray(_.bgcolor)||_o.isArrayOrTypedArray(_.fgcolor)||_o.isArrayOrTypedArray(_.size)||_o.isArrayOrTypedArray(_.solidity);var P=r.uid;y&&(P+="-"+e.i),ci.pattern(t,"point",n,P,x,D,F,e.mcc,_.fillmode,C,S,k)}else _o.isArrayOrTypedArray(d)?uu.fill(t,d[e.i]):uu.fill(t,d);v&&uu.stroke(t,p)}};ci.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=ci.tryColorscale(r,""),t.lineScale=ci.tryColorscale(r,"line"),TD.traceIs(e,"symbols")&&(t.ms2mrc=C4t.isBubble(e)?D4t(e):function(){return(r.size||6)/2}),e.selectedpoints&&_o.extendFlat(t,ci.makeSelectedPointStyleFns(e)),t};ci.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},i=e.unselected||{},n=e.marker||{},a=r.marker||{},o=i.marker||{},s=n.opacity,l=a.opacity,u=o.opacity,c=l!==void 0,f=u!==void 0;(_o.isArrayOrTypedArray(s)||c||f)&&(t.selectedOpacityFn=function(_){var M=_.mo===void 0?n.opacity:_.mo;return _.selected?c?l:M:f?u:uve*M});var h=n.color,d=a.color,p=o.color;(d||p)&&(t.selectedColorFn=function(_){var M=_.mcc||h;return _.selected?d||M:p||M});var v=n.size,m=a.size,g=o.size,w=m!==void 0,b=g!==void 0;return TD.traceIs(e,"symbols")&&(w||b)&&(t.selectedSizeFn=function(_){var M=_.mrc||v/2;return _.selected?w?m/2:M:b?g/2:M}),t};ci.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},i=e.unselected||{},n=e.textfont||{},a=r.textfont||{},o=i.textfont||{},s=n.color,l=a.color,u=o.color;return t.selectedTextColorFn=function(c){var f=c.tc||s;return c.selected?l||f:u||(l?f:uu.addOpacity(f,uve))},t};ci.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=ci.makeSelectedPointStyleFns(t),i=t.marker||{},n=[];r.selectedOpacityFn&&n.push(function(a,o){a.style("opacity",r.selectedOpacityFn(o))}),r.selectedColorFn&&n.push(function(a,o){uu.fill(a,r.selectedColorFn(o))}),r.selectedSizeFn&&n.push(function(a,o){var s=o.mx||i.symbol||0,l=r.selectedSizeFn(o);a.attr("d",fve(ci.symbolNumber(s),l,pG(o,t),dG(o,t))),o.mrc2=l}),n.length&&e.each(function(a){for(var o=Lu.select(this),s=0;s<n.length;s++)n[s](o,a)})}};ci.tryColorscale=function(e,t){var r=t?_o.nestedProperty(e,t).get():e;if(r){var i=r.color;if((r.colorscale||r._colorAx)&&_o.isArrayOrTypedArray(i))return M4t.makeColorScaleFuncFromTrace(r)}return _o.identity};var lG={start:1,end:-1,middle:0,bottom:1,top:-1};function pve(e,t,r,i,n){var a=Lu.select(e.node().parentNode),o=t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle",s=t.indexOf("left")!==-1?"end":t.indexOf("right")!==-1?"start":"middle",l=i?i/.8+1:0,u=(AD.lineCount(e)-1)*k4t+1,c=lG[s]*l,f=r*.75+lG[o]*l+(lG[o]-1)*u*r/2;e.attr("text-anchor",s),n||a.attr("transform",pA(c,f))}function vve(e,t){var r=e.ts||t.textfont.size;return Sy(r)&&r>0?r:0}ci.textPointStyle=function(e,t,r){if(e.size()){var i;if(t.selectedpoints){var n=ci.makeSelectedTextStyleFns(t);i=n.selectedTextColorFn}var a=t.texttemplate,o=r._fullLayout;e.each(function(s){var l=Lu.select(this),u=a?_o.extractOption(s,t,"txt","texttemplate"):_o.extractOption(s,t,"tx","text");if(!u&&u!==0){l.remove();return}if(a){var c=t._module.formatLabels,f=c?c(s,t,o):{},h={};F4t(h,t,s.i),u=_o.texttemplateString({data:[h,s,t._meta],fallback:t.texttemplatefallback,labels:f,locale:o._d3locale,template:u})}var d=s.tp||t.textposition,p=vve(s,t),v=i?i(s):s.tc||t.textfont.color;l.call(ci.font,{family:s.tf||t.textfont.family,weight:s.tw||t.textfont.weight,style:s.ty||t.textfont.style,variant:s.tv||t.textfont.variant,textcase:s.tC||t.textfont.textcase,lineposition:s.tE||t.textfont.lineposition,shadow:s.tS||t.textfont.shadow,size:p,color:v}).text(u).call(AD.convertToTspans,r).call(pve,d,p,s.mrc)})}};ci.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=ci.makeSelectedTextStyleFns(t);e.each(function(i){var n=Lu.select(this),a=r.selectedTextColorFn(i),o=i.tp||t.textposition,s=vve(i,t);uu.fill(n,a);var l=TD.traceIs(t,"bar-like");pve(n,o,s,i.mrc2||i.mrc,l)})}};var rve=.5;ci.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r="M"+e[0],i=[],n;for(n=1;n<e.length-1;n++)i.push(wD(e[n-1],e[n],e[n+1],t));for(r+="Q"+i[0][0]+" "+e[1],n=2;n<e.length-1;n++)r+="C"+i[n-2][1]+" "+i[n-1][0]+" "+e[n];return r+="Q"+i[e.length-3][1]+" "+e[e.length-1],r};ci.smoothclosed=function(e,t){if(e.length<3)return"M"+e.join("L")+"Z";var r="M"+e[0],i=e.length-1,n=[wD(e[i],e[0],e[1],t)],a;for(a=1;a<i;a++)n.push(wD(e[a-1],e[a],e[a+1],t));for(n.push(wD(e[i-1],e[i],e[0],t)),a=1;a<=i;a++)r+="C"+n[a-1][1]+" "+n[a][0]+" "+e[a];return r+="C"+n[i][1]+" "+n[0][0]+" "+e[0]+"Z",r};var gve,mve;function mw(e,t,r){return r&&(e=yve(e)),t?Jx(e[1]):Kx(e[0])}function Kx(e){var t=Lu.round(e,2);return gve=t,t}function Jx(e){var t=Lu.round(e,2);return mve=t,t}function wD(e,t,r,i){var n=e[0]-t[0],a=e[1]-t[1],o=r[0]-t[0],s=r[1]-t[1],l=Math.pow(n*n+a*a,rve/2),u=Math.pow(o*o+s*s,rve/2),c=(u*u*n-l*l*o)*i,f=(u*u*a-l*l*s)*i,h=3*u*(l+u),d=3*l*(l+u);return[[Kx(t[0]+(h&&c/h)),Jx(t[1]+(h&&f/h))],[Kx(t[0]-(d&&c/d)),Jx(t[1]-(d&&f/d))]]}var B4t={hv:function(e,t,r){return"H"+Kx(t[0])+"V"+mw(t,1,r)},vh:function(e,t,r){return"V"+Jx(t[1])+"H"+mw(t,0,r)},hvh:function(e,t,r){return"H"+Kx((e[0]+t[0])/2)+"V"+Jx(t[1])+"H"+mw(t,0,r)},vhv:function(e,t,r){return"V"+Jx((e[1]+t[1])/2)+"H"+Kx(t[0])+"V"+mw(t,1,r)}},q4t=function(e,t,r){return"L"+mw(t,0,r)+","+mw(t,1,r)};ci.steps=function(e){var t=B4t[e]||q4t;return function(r){for(var i="M"+Kx(r[0][0])+","+Jx(r[0][1]),n=r.length,a=1;a<n;a++)i+=t(r[a-1],r[a],a===n-1);return i}};function yve(e,t){var r=e.backoff,i=e.trace,n=e.d,a=e.i;if(r&&i&&i.marker&&i.marker.angle%360===0&&i.line&&i.line.shape!=="spline"){var o=_o.isArrayOrTypedArray(r),s=e,l=t?t[0]:gve||0,u=t?t[1]:mve||0,c=s[0],f=s[1],h=c-l,d=f-u,p=Math.atan2(d,h),v=o?r[a]:r;if(v==="auto"){var m=s.i;i.type==="scatter"&&m--;var g=s.marker,w=g.symbol;_o.isArrayOrTypedArray(w)&&(w=w[m]);var b=g.size;_o.isArrayOrTypedArray(b)&&(b=b[m]),v=g?ci.symbolBackOffs[ci.symbolNumber(w)]*b:0,v+=ci.getMarkerStandoff(n[m],i)||0}var _=c-v*Math.cos(p),M=f-v*Math.sin(p);(_<=c&&_>=l||_>=c&&_<=l)&&(M<=f&&M>=u||M>=f&&M<=u)&&(e=[_,M])}return e}ci.applyBackoff=yve;ci.makeTester=function(){var e=_o.ensureSingleById(Lu.select("body"),"svg","js-plotly-tester",function(r){r.attr(S4t.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),t=_o.ensureSingle(e,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});ci.tester=e,ci.testref=t};ci.savedBBoxes={};var uG=0,O4t=1e4;ci.bBox=function(e,t,r){r||(r=ive(e));var i;if(r){if(i=ci.savedBBoxes[r],i)return _o.extendFlat({},i)}else if(e.childNodes.length===1){var n=e.childNodes[0];if(r=ive(n),r){var a=+n.getAttribute("x")||0,o=+n.getAttribute("y")||0,s=n.getAttribute("transform");if(!s){var l=ci.bBox(n,!1,r);return a&&(l.left+=a,l.right+=a),o&&(l.top+=o,l.bottom+=o),l}if(r+="~"+a+"~"+o+"~"+s,i=ci.savedBBoxes[r],i)return _o.extendFlat({},i)}}var u,c;t?u=e:(c=ci.tester.node(),u=e.cloneNode(!0),c.appendChild(u)),Lu.select(u).attr("transform",null).call(AD.positionText,0,0);var f=u.getBoundingClientRect(),h=ci.testref.node().getBoundingClientRect();t||c.removeChild(u);var d={height:f.height,width:f.width,left:f.left-h.left,top:f.top-h.top,right:f.right-h.left,bottom:f.bottom-h.top};return uG>=O4t&&(ci.savedBBoxes={},uG=0),r&&(ci.savedBBoxes[r]=d),uG++,_o.extendFlat({},d)};function ive(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}ci.setClipUrl=function(e,t,r){e.attr("clip-path",hG(t,r))};function hG(e,t){if(!e)return null;var r=t._context,i=r._exportedPlot?"":r._baseUrl||"";return i?"url('"+i+"#"+e+"')":"url(#"+e+")"}ci.getTranslate=function(e){var t=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",i=e[r]("transform")||"",n=i.replace(t,function(a,o,s){return[o,s].join(" ")}).split(" ");return{x:+n[0]||0,y:+n[1]||0}};ci.setTranslate=function(e,t,r){var i=/(\btranslate\(.*?\);?)/,n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",o=e[n]("transform")||"";return t=t||0,r=r||0,o=o.replace(i,"").trim(),o+=pA(t,r),o=o.trim(),e[a]("transform",o),o};ci.getScale=function(e){var t=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",i=e[r]("transform")||"",n=i.replace(t,function(a,o,s){return[o,s].join(" ")}).split(" ");return{x:+n[0]||1,y:+n[1]||1}};ci.setScale=function(e,t,r){var i=/(\bscale\(.*?\);?)/,n=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",o=e[n]("transform")||"";return t=t||1,r=r||1,o=o.replace(i,"").trim(),o+="scale("+t+","+r+")",o=o.trim(),e[a]("transform",o),o};var N4t=/\s*sc.*/;ci.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,!!e){var i=t===1&&r===1?"":"scale("+t+","+r+")";e.each(function(){var n=(this.getAttribute("transform")||"").replace(N4t,"");n+=i,n=n.trim(),this.setAttribute("transform",n)})}};var U4t=/translate\([^)]*\)\s*$/;ci.setTextPointsScale=function(e,t,r){e&&e.each(function(){var i,n=Lu.select(this),a=n.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(n.attr("transform")||"").match(U4t);t===1&&r===1?i=[]:i=[pA(o,s),"scale("+t+","+r+")",pA(-o,-s)],l&&i.push(l),n.attr("transform",i.join(""))}})};function dG(e,t){var r;return e&&(r=e.mf),r===void 0&&(r=t.marker&&t.marker.standoff||0),!t._geo&&!t._xA?-r:r}ci.getMarkerStandoff=dG;var dA=Math.atan2,Zx=Math.cos,yw=Math.sin;function nve(e,t){var r=t[0],i=t[1];return[r*Zx(e)-i*yw(e),r*yw(e)+i*Zx(e)]}var ave,ove,sve,lve,cG,fG;function pG(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!Sy(r)||_o.isArrayOrTypedArray(r))&&(r=0));var i,n,a=t.marker.angleref;if(a==="previous"||a==="north"){if(t._geo){var o=t._geo.project(e.lonlat);i=o[0],n=o[1]}else{var s=t._xA,l=t._yA;if(s&&l)i=s.c2p(e.x),n=l.c2p(e.y);else return 90}if(t._geo){var u=e.lonlat[0],c=e.lonlat[1],f=t._geo.project([u,c+1e-5]),h=t._geo.project([u+1e-5,c]),d=dA(h[1]-n,h[0]-i),p=dA(f[1]-n,f[0]-i),v;if(a==="north")v=r/180*Math.PI;else if(a==="previous"){var m=u/180*Math.PI,g=c/180*Math.PI,w=ave/180*Math.PI,b=ove/180*Math.PI,_=w-m,M=Zx(b)*yw(_),x=yw(b)*Zx(g)-Zx(b)*yw(g)*Zx(_);v=-dA(M,x)-Math.PI,ave=u,ove=c}var T=nve(d,[Zx(v),0]),A=nve(p,[yw(v),0]);r=dA(T[1]+A[1],T[0]+A[0])/Math.PI*180,a==="previous"&&!(fG===t.uid&&e.i===cG+1)&&(r=null)}if(a==="previous"&&!t._geo)if(fG===t.uid&&e.i===cG+1&&Sy(i)&&Sy(n)){var y=i-sve,E=n-lve,S=t.line&&t.line.shape||"",C=S.slice(S.length-1);C==="h"&&(E=0),C==="v"&&(y=0),r+=dA(E,y)/Math.PI*180+90}else r=null}return sve=i,lve=n,cG=e.i,fG=t.uid,r}ci.getMarkerAngle=pG});var e_=W((s9r,Tve)=>{"use strict";var xw=vi(),V4t=sn(),G4t=Ko(),vG=yi(),Qx=it(),_ve=Qx.strTranslate,MD=Ji(),SD=ni(),_w=uo(),bve=kg(),H4t=Hl().OPPOSITE_SIDE,wve=/ [XY][0-9]* /,gG=1.6,mG=1.6;function j4t(e,t,r){var i=e._fullLayout,n=r.propContainer,a=r.propName,o=r.placeholder,s=r.traceIndex,l=r.avoid||{},u=r.attributes,c=r.transform,f=r.containerGroup,h=1,d=n.title,p=(d&&d.text?d.text:"").trim(),v=!1,m=d&&d.font?d.font:{},g=m.family,w=m.size,b=m.color,_=m.weight,M=m.style,x=m.variant,T=m.textcase,A=m.lineposition,y=m.shadow,E=r.subtitlePropName,S=!!E,C=r.subtitlePlaceholder,k=(n.title||{}).subtitle||{text:"",font:{}},D=(k.text||"").trim(),F=!1,P=1,R=k.font,L=R.family,I=R.size,B=R.color,O=R.weight,$=R.style,Y=R.variant,K=R.textcase,j=R.lineposition,q=R.shadow,J;a==="title.text"?J="titleText":a.indexOf("axis")!==-1?J="axisTitleText":a.indexOf("colorbar")!==-1&&(J="colorbarTitleText");var U=e._context.edits[J];function V(ye,ue){return ye===void 0||ue===void 0?!1:ye.replace(wve," % ")===ue.replace(wve," % ")}p===""?h=0:V(p,o)&&(U||(p=""),h=.2,v=!0),S&&(D===""?P=0:V(D,C)&&(U||(D=""),P=.2,F=!0)),r._meta?p=Qx.templateString(p,r._meta):i._meta&&(p=Qx.templateString(p,i._meta));var X=p||D||U,H;f||(f=Qx.ensureSingle(i._infolayer,"g","g-"+t),H=i._hColorbarMoveTitle);var G=f.selectAll("text."+t).data(X?[0]:[]);G.enter().append("text"),G.text(p).attr("class",t),G.exit().remove();var Q=null,te=t+"-subtitle",ce=D||U;if(S&&(Q=f.selectAll("text."+te).data(ce?[0]:[]),Q.enter().append("text"),Q.text(D).attr("class",te),Q.exit().remove()),!X)return f;function ge(ye,ue){Qx.syncOrAsync([Ce,be],{title:ye,subtitle:ue})}function Ce(ye){var ue=ye.title,ee=ye.subtitle,ae;!c&&H&&(c={}),c?(ae="",c.rotate&&(ae+="rotate("+[c.rotate,u.x,u.y]+")"),(c.offset||H)&&(ae+=_ve(0,(c.offset||0)-(H||0)))):ae=null,ue.attr("transform",ae);function xe(ke){if(ke){var _e=xw.select(ke.node().parentNode).select("."+te);if(!_e.empty()){var Ie=ke.node().getBBox();if(Ie.height){var Oe=Ie.y+Ie.height+gG*I;_e.attr("y",Oe)}}}}if(ue.style("opacity",h*SD.opacity(b)).call(MD.font,{color:SD.rgb(b),size:xw.round(w,2),family:g,weight:_,style:M,variant:x,textcase:T,shadow:y,lineposition:A}).attr(u).call(_w.convertToTspans,e,xe),ee&&!ee.empty()){var re=f.select("."+t+"-math-group"),pe=ue.node().getBBox(),we=re.node()?re.node().getBBox():void 0,Fe=we?we.y+we.height+gG*I:pe.y+pe.height+mG*I,Se=Qx.extendFlat({},u,{y:Fe});ee.attr("transform",ae),ee.style("opacity",P*SD.opacity(B)).call(MD.font,{color:SD.rgb(B),size:xw.round(I,2),family:L,weight:O,style:$,variant:Y,textcase:K,shadow:q,lineposition:j}).attr(Se).call(_w.convertToTspans,e)}return G4t.previousPromises(e)}function be(ye){var ue=ye.title,ee=xw.select(ue.node().parentNode);if(l&&l.selection&&l.side&&p){ee.attr("transform",null);var ae=H4t[l.side],xe=l.side==="left"||l.side==="top"?-1:1,re=V4t(l.pad)?l.pad:2,pe=MD.bBox(ee.node()),we={t:0,b:0,l:0,r:0},Fe=e._fullLayout._reservedMargin;for(var Se in Fe)for(var ke in Fe[Se]){var _e=Fe[Se][ke];we[ke]=Math.max(we[ke],_e)}var Ie={left:we.l,top:we.t,right:i.width-we.r,bottom:i.height-we.b},Oe=l.maxShift||xe*(Ie[l.side]-pe[l.side]),Qe=0;if(Oe<0)Qe=Oe;else{var et=l.offsetLeft||0,_t=l.offsetTop||0;pe.left-=et,pe.right-=et,pe.top-=_t,pe.bottom-=_t,l.selection.each(function(){var vt=MD.bBox(this);Qx.bBoxIntersect(pe,vt,re)&&(Qe=Math.max(Qe,xe*(vt[l.side]-pe[ae])+re))}),Qe=Math.min(Oe,Qe),n._titleScoot=Math.abs(Qe)}if(Qe>0||Oe<0){var ut={left:[-Qe,0],right:[Qe,0],top:[0,-Qe],bottom:[0,Qe]}[l.side];ee.attr("transform",_ve(ut[0],ut[1]))}}}G.call(ge,Q);function he(ye,ue){ye.text(ue).on("mouseover.opacity",function(){xw.select(this).transition().duration(bve.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){xw.select(this).transition().duration(bve.HIDE_PLACEHOLDER).style("opacity",0)})}if(U&&(p?G.on(".opacity",null):(he(G,o),v=!0),G.call(_w.makeEditable,{gd:e}).on("edit",function(ye){s!==void 0?vG.call("_guiRestyle",e,a,ye,s):vG.call("_guiRelayout",e,a,ye)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ge)}).on("input",function(ye){this.text(ye||" ").call(_w.positionText,u.x,u.y)}),S)){if(S&&!p){var oe=G.node().getBBox(),Ee=oe.y+oe.height+mG*I;Q.attr("y",Ee)}D?Q.on(".opacity",null):(he(Q,C),F=!0),Q.call(_w.makeEditable,{gd:e}).on("edit",function(ye){vG.call("_guiRelayout",e,"title.subtitle.text",ye)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ge)}).on("input",function(ye){this.text(ye||" ").call(_w.positionText,Q.attr("x"),Q.attr("y"))})}return G.classed("js-placeholder",v),Q&&!Q.empty()&&Q.classed("js-placeholder",F),f}Tve.exports={draw:j4t,SUBTITLE_PADDING_EM:mG,SUBTITLE_PADDING_MATHJAX_EM:gG}});var i1=W((l9r,kve)=>{"use strict";var $4t=vi(),W4t=z3().utcFormat,Wo=it(),Y4t=Wo.numberFormat,t1=sn(),Ey=Wo.cleanNumber,X4t=Wo.ms2DateTime,Ave=Wo.dateTime2ms,r1=Wo.ensureNumber,Mve=Wo.isArrayOrTypedArray,ky=Kn(),ED=ky.FP_SAFE,qp=ky.BADNUM,Z4t=ky.LOG_CLIP,K4t=ky.ONEWEEK,kD=ky.ONEDAY,CD=ky.ONEHOUR,Sve=ky.ONEMIN,Eve=ky.ONESEC,DD=Cs(),PD=Gl(),FD=PD.HOUR_PATTERN,LD=PD.WEEKDAY_PATTERN;function vA(e){return Math.pow(10,e)}function yG(e){return e!=null}kve.exports=function(t,r){r=r||{};var i=t._id||"x",n=i.charAt(0);function a(_,M){if(_>0)return Math.log(_)/Math.LN10;if(_<=0&&M&&t.range&&t.range.length===2){var x=t.range[0],T=t.range[1];return .5*(x+T-2*Z4t*Math.abs(x-T))}else return qp}function o(_,M,x,T){if((T||{}).msUTC&&t1(_))return+_;var A=Ave(_,x||t.calendar);if(A===qp)if(t1(_)){_=+_;var y=Math.floor(Wo.mod(_+.05,1)*10),E=Math.round(_-y/10);A=Ave(new Date(E))+y/10}else return qp;return A}function s(_,M,x){return X4t(_,M,x||t.calendar)}function l(_){return t._categories[Math.round(_)]}function u(_){if(yG(_)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[_]!==void 0)return t._categoriesMap[_];t._categories.push(typeof _=="number"?String(_):_);var M=t._categories.length-1;return t._categoriesMap[_]=M,M}return qp}function c(_,M){for(var x=new Array(M),T=0;T<M;T++){var A=(_[0]||[])[T],y=(_[1]||[])[T];x[T]=f([A,y])}return x}function f(_){if(t._categoriesMap)return t._categoriesMap[_]}function h(_){var M=f(_);if(M!==void 0)return M;if(t1(_))return+_}function d(_){return t1(_)?+_:f(_)}function p(_,M,x){return $4t.round(x+M*_,2)}function v(_,M,x){return(_-x)/M}var m=function(M){return t1(M)?p(M,t._m,t._b):qp},g=function(_){return v(_,t._m,t._b)};if(t.rangebreaks){var w=n==="y";m=function(_){if(!t1(_))return qp;var M=t._rangebreaks.length;if(!M)return p(_,t._m,t._b);var x=w;t.range[0]>t.range[1]&&(x=!x);for(var T=x?-1:1,A=T*_,y=0,E=0;E<M;E++){var S=T*t._rangebreaks[E].min,C=T*t._rangebreaks[E].max;if(A<S)break;if(A>C)y=E+1;else{y=A<(S+C)/2?E:E+1;break}}var k=t._B[y]||0;return isFinite(k)?p(_,t._m2,k):0},g=function(_){var M=t._rangebreaks.length;if(!M)return v(_,t._m,t._b);for(var x=0,T=0;T<M&&!(_<t._rangebreaks[T].pmin);T++)_>t._rangebreaks[T].pmax&&(x=T+1);return v(_,t._m2,t._B[x])}}t.c2l=t.type==="log"?a:r1,t.l2c=t.type==="log"?vA:r1,t.l2p=m,t.p2l=g,t.c2p=t.type==="log"?function(_,M){return m(a(_,M))}:m,t.p2c=t.type==="log"?function(_){return vA(g(_))}:g,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=Ey,t.c2d=t.c2r=t.l2d=t.l2r=r1,t.d2p=t.r2p=function(_){return t.l2p(Ey(_))},t.p2d=t.p2r=g,t.cleanPos=r1):t.type==="log"?(t.d2r=t.d2l=function(_,M){return a(Ey(_),M)},t.r2d=t.r2c=function(_){return vA(Ey(_))},t.d2c=t.r2l=Ey,t.c2d=t.l2r=r1,t.c2r=a,t.l2d=vA,t.d2p=function(_,M){return t.l2p(t.d2r(_,M))},t.p2d=function(_){return vA(g(_))},t.r2p=function(_){return t.l2p(Ey(_))},t.p2r=g,t.cleanPos=r1):t.type==="date"?(t.d2r=t.r2d=Wo.identity,t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=s,t.d2p=t.r2p=function(_,M,x){return t.l2p(o(_,0,x))},t.p2d=t.p2r=function(_,M,x){return s(g(_),M,x)},t.cleanPos=function(_){return Wo.cleanDate(_,qp,t.calendar)}):t.type==="category"?(t.d2c=t.d2l=u,t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(_){var M=d(_);return M!==void 0?M:t.fraction2r(.5)},t.l2r=t.c2r=r1,t.r2l=d,t.d2p=function(_){return t.l2p(t.r2c(_))},t.p2d=function(_){return l(g(_))},t.r2p=t.d2p,t.p2r=g,t.cleanPos=function(_){return typeof _=="string"&&_!==""?_:r1(_)}):t.type==="multicategory"&&(t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(_){var M=h(_);return M!==void 0?M:t.fraction2r(.5)},t.r2c_just_indices=f,t.l2r=t.c2r=r1,t.r2l=h,t.d2p=function(_){return t.l2p(t.r2c(_))},t.p2d=function(_){return l(g(_))},t.r2p=t.d2p,t.p2r=g,t.cleanPos=function(_){return Array.isArray(_)||typeof _=="string"&&_!==""?_:r1(_)},t.setupMultiCategory=function(_){var M=t._traceIndices,x,T,A=t._matchGroup;if(A&&t._categories.length===0){for(var y in A)if(y!==i){var E=r[DD.id2name(y)];M=M.concat(E._traceIndices)}}var S=[[0,{}],[0,{}]],C=[];for(x=0;x<M.length;x++){var k=_[M[x]];if(n in k){var D=k[n],F=k._length||Wo.minRowLength(D);if(Mve(D[0])&&Mve(D[1]))for(T=0;T<F;T++){var P=D[0][T],R=D[1][T];yG(P)&&yG(R)&&(C.push([P,R]),P in S[0][1]||(S[0][1][P]=S[0][0]++),R in S[1][1]||(S[1][1][R]=S[1][0]++))}}}for(C.sort(function(L,I){var B=S[0][1],O=B[L[0]]-B[I[0]];if(O)return O;var $=S[1][1];return $[L[1]]-$[I[1]]}),x=0;x<C.length;x++)u(C[x])}),t.fraction2r=function(_){var M=t.r2l(t.range[0]),x=t.r2l(t.range[1]);return t.l2r(M+_*(x-M))},t.r2fraction=function(_){var M=t.r2l(t.range[0]),x=t.r2l(t.range[1]);return(t.r2l(_)-M)/(x-M)},t.limitRange=function(_){var M=t.minallowed,x=t.maxallowed;if(!(M===void 0&&x===void 0)){_||(_="range");var T=Wo.nestedProperty(t,_).get(),A=Wo.simpleMap(T,t.r2l),y=A[1]<A[0];y&&A.reverse();var E=Wo.simpleMap([M,x],t.r2l);if(M!==void 0&&A[0]<E[0]&&(T[y?1:0]=M,A[0]=E[0]),x!==void 0&&A[1]>E[1]&&(T[y?0:1]=x,A[1]=E[1]),A[0]>=A[1])if(M!==void 0){var S=E[0]+1;x!==void 0&&(S=Math.min(S,E[1])),T[y?0:1]=t.l2r(S)}else x!==void 0&&(T[y?1:0]=t.l2r(E[1]-1))}},t.cleanRange=function(_,M){t._cleanRange(_,M),t.limitRange(_)},t._cleanRange=function(_,M){M||(M={}),_||(_="range");var x=Wo.nestedProperty(t,_).get(),T,A;if(t.type==="date"?A=Wo.dfltRange(t.calendar):n==="y"?A=PD.DFLTRANGEY:t._name==="realaxis"?A=[0,1]:A=M.dfltRange||PD.DFLTRANGEX,A=A.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(A[0]=0),!x||x.length!==2){Wo.nestedProperty(t,_).set(A);return}var y=x[0]===null,E=x[1]===null;for(t.type==="date"&&!t.autorange&&(x[0]=Wo.cleanDate(x[0],qp,t.calendar),x[1]=Wo.cleanDate(x[1],qp,t.calendar)),T=0;T<2;T++)if(t.type==="date"){if(!Wo.isDateTime(x[T],t.calendar)){t[_]=A;break}if(t.r2l(x[0])===t.r2l(x[1])){var S=Wo.constrain(t.r2l(x[0]),Wo.MIN_MS+1e3,Wo.MAX_MS-1e3);x[0]=t.l2r(S-1e3),x[1]=t.l2r(S+1e3);break}}else{if(!t1(x[T]))if(!(y||E)&&t1(x[1-T]))x[T]=x[1-T]*(T?10:.1);else{t[_]=A;break}if(x[T]<-ED?x[T]=-ED:x[T]>ED&&(x[T]=ED),x[0]===x[1]){var C=Math.max(1,Math.abs(x[0]*1e-6));x[0]-=C,x[1]+=C}}},t.setScale=function(_){var M=r._size;if(t.overlaying){var x=DD.getFromId({_fullLayout:r},t.overlaying);t.domain=x.domain}var T=_&&t._r?"_r":"range",A=t.calendar;t.cleanRange(T);var y=t.r2l(t[T][0],A),E=t.r2l(t[T][1],A),S=n==="y";if(S?(t._offset=M.t+(1-t.domain[1])*M.h,t._length=M.h*(t.domain[1]-t.domain[0]),t._m=t._length/(y-E),t._b=-t._m*E):(t._offset=M.l+t.domain[0]*M.w,t._length=M.w*(t.domain[1]-t.domain[0]),t._m=t._length/(E-y),t._b=-t._m*y),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var C,k;if(t._rangebreaks=t.locateBreaks(Math.min(y,E),Math.max(y,E)),t._rangebreaks.length){for(C=0;C<t._rangebreaks.length;C++)k=t._rangebreaks[C],t._lBreaks+=Math.abs(k.max-k.min);var D=S;y>E&&(D=!D),D&&t._rangebreaks.reverse();var F=D?-1:1;for(t._m2=F*t._length/(Math.abs(E-y)-t._lBreaks),t._B.push(-t._m2*(S?E:y)),C=0;C<t._rangebreaks.length;C++)k=t._rangebreaks[C],t._B.push(t._B[t._B.length-1]-F*t._m2*(k.max-k.min));for(C=0;C<t._rangebreaks.length;C++)k=t._rangebreaks[C],k.pmin=m(k.min),k.pmax=m(k.max)}}if(!isFinite(t._m)||!isFinite(t._b)||t._length<0)throw r._replotting=!1,new Error("Something went wrong with axis scaling")},t.maskBreaks=function(_){var M=t.rangebreaks||[],x,T,A,y,E;M._cachedPatterns||(M._cachedPatterns=M.map(function(B){return B.enabled&&B.bounds?Wo.simpleMap(B.bounds,B.pattern?Ey:t.d2c):null})),M._cachedValues||(M._cachedValues=M.map(function(B){return B.enabled&&B.values?Wo.simpleMap(B.values,t.d2c).sort(Wo.sorterAsc):null}));for(var S=0;S<M.length;S++){var C=M[S];if(C.enabled){if(C.bounds){var k=C.pattern;switch(x=M._cachedPatterns[S],T=x[0],A=x[1],k){case LD:E=new Date(_),y=E.getUTCDay(),T>A&&(A+=7,y<T&&(y+=7));break;case FD:E=new Date(_);var D=E.getUTCHours(),F=E.getUTCMinutes(),P=E.getUTCSeconds(),R=E.getUTCMilliseconds();y=D+(F/60+P/3600+R/36e5),T>A&&(A+=24,y<T&&(y+=24));break;case"":y=_;break}if(y>=T&&y<A)return qp}else for(var L=M._cachedValues[S],I=0;I<L.length;I++)if(T=L[I],A=T+C.dvalue,_>=T&&_<A)return qp}}return _},t.locateBreaks=function(_,M){var x,T,A,y,E=[];if(!t.rangebreaks)return E;var S=t.rangebreaks.slice().sort(function($,Y){return $.pattern===LD&&Y.pattern===FD?-1:Y.pattern===LD&&$.pattern===FD?1:0}),C=function($,Y){if($=Wo.constrain($,_,M),Y=Wo.constrain(Y,_,M),$!==Y){for(var K=!0,j=0;j<E.length;j++){var q=E[j];$<q.max&&Y>=q.min&&($<q.min&&(q.min=$),Y>q.max&&(q.max=Y),K=!1)}K&&E.push({min:$,max:Y})}};for(x=0;x<S.length;x++){var k=S[x];if(k.enabled)if(k.bounds){var D=_,F=M;k.pattern&&(D=Math.floor(D)),T=Wo.simpleMap(k.bounds,k.pattern?Ey:t.r2l),A=T[0],y=T[1];var P=new Date(D),R,L;switch(k.pattern){case LD:L=K4t,R=((y<A?7:0)+(y-A))*kD,D+=A*kD-(P.getUTCDay()*kD+P.getUTCHours()*CD+P.getUTCMinutes()*Sve+P.getUTCSeconds()*Eve+P.getUTCMilliseconds());break;case FD:L=kD,R=((y<A?24:0)+(y-A))*CD,D+=A*CD-(P.getUTCHours()*CD+P.getUTCMinutes()*Sve+P.getUTCSeconds()*Eve+P.getUTCMilliseconds());break;default:D=Math.min(T[0],T[1]),F=Math.max(T[0],T[1]),L=F-D,R=L}for(var I=D;I<F;I+=L)C(I,I+R)}else for(var B=Wo.simpleMap(k.values,t.d2c),O=0;O<B.length;O++)A=B[O],y=A+k.dvalue,C(A,y)}return E.sort(function($,Y){return $.min-Y.min}),E},t.makeCalcdata=function(_,M,x){var T,A,y,E,S=t.type,C=S==="date"&&_[M+"calendar"];if(M in _){if(T=_[M],E=_._length||Wo.minRowLength(T),Wo.isTypedArray(T)&&(S==="linear"||S==="log")){if(E===T.length)return T;if(T.subarray)return T.subarray(0,E)}if(S==="multicategory")return c(T,E);for(A=new Array(E),y=0;y<E;y++)A[y]=t.d2c(T[y],0,C,x)}else{var k=M+"0"in _?t.d2c(_[M+"0"],0,C):0,D=_["d"+M]?Number(_["d"+M]):1;for(T=_[{x:"y",y:"x"}[M]],E=_._length||T.length,A=new Array(E),y=0;y<E;y++)A[y]=k+y*D}if(t.rangebreaks)for(y=0;y<E;y++)A[y]=t.maskBreaks(A[y]);return A},t.isValidRange=function(_,M){return Array.isArray(_)&&_.length===2&&(M&&_[0]===null||t1(t.r2l(_[0])))&&(M&&_[1]===null||t1(t.r2l(_[1])))},t.getAutorangeDflt=function(_,M){var x=!t.isValidRange(_,"nullOk");return x&&M&&M.reverseDflt?x="reversed":_&&(_[0]===null&&_[1]===null?x=!0:_[0]===null&&_[1]!==null?x="min":_[0]!==null&&_[1]===null&&(x="max")),x},t.isReversed=function(){var _=t.autorange;return _==="reversed"||_==="min reversed"||_==="max reversed"},t.isPtWithinRange=function(_,M){var x=t.c2l(_[n],null,M),T=t.r2l(t.range[0]),A=t.r2l(t.range[1]);return T<A?T<=x&&x<=A:A<=x&&x<=T},t._emptyCategories=function(){t._categories=[],t._categoriesMap={}},t.clearCalc=function(){var _=t._matchGroup;if(_){var M=null,x=null;for(var T in _){var A=r[DD.id2name(T)];if(A._categories){M=A._categories,x=A._categoriesMap;break}}M&&x?(t._categories=M,t._categoriesMap=x):t._emptyCategories()}else t._emptyCategories();if(t._initialCategories)for(var y=0;y<t._initialCategories.length;y++)u(t._initialCategories[y])},t.sortByInitialCategories=function(){var _=[];if(t._emptyCategories(),t._initialCategories)for(var M=0;M<t._initialCategories.length;M++)u(t._initialCategories[M]);_=_.concat(t._traceIndices);var x=t._matchGroup;for(var T in x)if(i!==T){var A=r[DD.id2name(T)];A._categories=t._categories,A._categoriesMap=t._categoriesMap,_=_.concat(A._traceIndices)}return _};var b=r._d3locale;t.type==="date"&&(t._dateFormat=b?b.timeFormat:W4t,t._extraFormat=r._extraFormat),t._separators=r.separators,t._numFormat=b?b.numberFormat:Y4t,delete t._minDtick,delete t._forceTick0}});var bw=W((u9r,Lve)=>{"use strict";var Cve=sn(),xG=it(),J4t=Kn().BADNUM,ID=xG.isArrayOrTypedArray,Q4t=xG.isDateTime,eTt=xG.cleanNumber,Dve=Math.round;Lve.exports=function(t,r,i){var n=t,a=i.noMultiCategory;if(ID(n)&&!n.length)return"-";if(!a&&aTt(n))return"multicategory";if(a&&Array.isArray(n[0])){for(var o=[],s=0;s<n.length;s++)if(ID(n[s]))for(var l=0;l<n[s].length;l++)o.push(n[s][l]);n=o}if(iTt(n,r))return"date";var u=i.autotypenumbers!=="strict";return nTt(n,u)?"category":rTt(n,u)?"linear":"-"};function tTt(e,t){return t?Cve(e):typeof e=="number"}function rTt(e,t){for(var r=e.length,i=0;i<r;i++)if(tTt(e[i],t))return!0;return!1}function iTt(e,t){for(var r=e.length,i=Fve(r),n=0,a=0,o={},s=0;s<r;s+=i){var l=Dve(s),u=e[l],c=String(u);o[c]||(o[c]=1,Q4t(u,t)&&n++,Cve(u)&&a++)}return n>a*2}function Fve(e){return Math.max(1,(e-1)/1e3)}function nTt(e,t){for(var r=e.length,i=Fve(r),n=0,a=0,o={},s=0;s<r;s+=i){var l=Dve(s),u=e[l],c=String(u);if(!o[c]){o[c]=1;var f=typeof u;f==="boolean"?a++:(t?eTt(u)!==J4t:f==="number")?n++:f==="string"&&a++}}return a>n*2}function aTt(e){return ID(e[0])&&ID(e[1])}});var Op=W((c9r,Nve)=>{"use strict";var oTt=vi(),zve=sn(),Cy=it(),RD=Kn().FP_SAFE,sTt=yi(),lTt=Ji(),Bve=Cs(),uTt=Bve.getFromId,cTt=Bve.isLinked;Nve.exports={applyAutorangeOptions:Ove,getAutoRange:_G,makePadFn:bG,doAutoRange:hTt,findExtremes:dTt,concatExtremes:AG};function _G(e,t){var r,i,n=[],a=e._fullLayout,o=bG(a,t,0),s=bG(a,t,1),l=AG(e,t),u=l.min,c=l.max;if(u.length===0||c.length===0)return Cy.simpleMap(t.range,t.r2l);var f=u[0].val,h=c[0].val;for(r=1;r<u.length&&f===h;r++)f=Math.min(f,u[r].val);for(r=1;r<c.length&&f===h;r++)h=Math.max(h,c[r].val);var d=t.autorange,p=d==="reversed"||d==="min reversed"||d==="max reversed";if(!p&&t.range){var v=Cy.simpleMap(t.range,t.r2l);p=v[1]<v[0]}t.autorange==="reversed"&&(t.autorange=!0);var m=t.rangemode,g=m==="tozero",w=m==="nonnegative",b=t._length,_=b/10,M=0,x,T,A,y,E,S;for(r=0;r<u.length;r++)for(x=u[r],i=0;i<c.length;i++)T=c[i],S=T.val-x.val-Pve(t,x.val,T.val),S>0&&(E=b-o(x)-s(T),E>_?S/E>M&&(A=x,y=T,M=S/E):S/b>M&&(A={val:x.val,nopad:1},y={val:T.val,nopad:1},M=S/b));function C(R,L){return Math.max(R,s(L))}if(f===h){var k=f-1,D=f+1;if(g)if(f===0)n=[0,1];else{var F=(f>0?c:u).reduce(C,0),P=f/(1-Math.min(.5,F/b));n=f>0?[0,P]:[P,0]}else w?n=[Math.max(0,k),Math.max(1,D)]:n=[k,D]}else g?(A.val>=0&&(A={val:0,nopad:1}),y.val<=0&&(y={val:0,nopad:1})):w&&(A.val-M*o(A)<0&&(A={val:0,nopad:1}),y.val<=0&&(y={val:1,nopad:1})),M=(y.val-A.val-Pve(t,x.val,T.val))/(b-o(A)-s(y)),n=[A.val-M*o(A),y.val+M*s(y)];return n=Ove(n,t),t.limitRange&&t.limitRange(),p&&n.reverse(),Cy.simpleMap(n,t.l2r||Number)}function Pve(e,t,r){var i=0;if(e.rangebreaks)for(var n=e.locateBreaks(t,r),a=0;a<n.length;a++){var o=n[a];i+=o.max-o.min}return i}function bG(e,t,r){var i=.05*t._length,n=t._anchorAxis||{};if((t.ticklabelposition||"").indexOf("inside")!==-1||(n.ticklabelposition||"").indexOf("inside")!==-1){var a=t.isReversed();if(!a){var o=Cy.simpleMap(t.range,t.r2l);a=o[1]<o[0]}a&&(r=!r)}var s=0;return cTt(e,t._id)||(s=fTt(e,t,r)),i=Math.max(s,i),t.constrain==="domain"&&t._inputDomain&&(i*=(t._inputDomain[1]-t._inputDomain[0])/(t.domain[1]-t.domain[0])),function(u){return u.nopad?0:u.pad+(u.extrapad?i:s)}}var Ive=3;function fTt(e,t,r){var i=0,n=t._id.charAt(0)==="x";for(var a in e._plots){var o=e._plots[a];if(!(t._id!==o.xaxis._id&&t._id!==o.yaxis._id)){var s=(n?o.yaxis:o.xaxis)||{};if((s.ticklabelposition||"").indexOf("inside")!==-1&&(!r&&(s.side==="left"||s.side==="bottom")||r&&(s.side==="top"||s.side==="right"))){if(s._vals){var l=Cy.deg2rad(s._tickAngles[s._id+"tick"]||0),u=Math.abs(Math.cos(l)),c=Math.abs(Math.sin(l));if(!s._vals[0].bb){var f=s._id+"tick",h=s._selections[f];h.each(function(w){var b=oTt.select(this),_=b.select(".text-math-group");_.empty()&&(w.bb=lTt.bBox(b.node()))})}for(var d=0;d<s._vals.length;d++){var p=s._vals[d],v=p.bb;if(v){var m=2*Ive+v.width,g=2*Ive+v.height;i=Math.max(i,n?Math.max(m*u,g*c):Math.max(g*u,m*c))}}}s.ticks==="inside"&&s.ticklabelposition==="inside"&&(i+=s.ticklen||0)}}}return i}function AG(e,t,r){var i=t._id,n=e._fullData,a=e._fullLayout,o=[],s=[],l,u,c;function f(m,g){for(l=0;l<g.length;l++){var w=m[g[l]],b=(w._extremes||{})[i];if(w.visible===!0&&b){for(u=0;u<b.min.length;u++)c=b.min[u],wG(o,c.val,c.pad,{extrapad:c.extrapad});for(u=0;u<b.max.length;u++)c=b.max[u],TG(s,c.val,c.pad,{extrapad:c.extrapad})}}}if(f(n,t._traceIndices),f(a.annotations||[],t._annIndices||[]),f(a.shapes||[],t._shapeIndices||[]),t._matchGroup&&!r){for(var h in t._matchGroup)if(h!==t._id){var d=uTt(e,h),p=AG(e,d,!0),v=t._length/d._length;for(u=0;u<p.min.length;u++)c=p.min[u],wG(o,c.val,c.pad*v,{extrapad:c.extrapad});for(u=0;u<p.max.length;u++)c=p.max[u],TG(s,c.val,c.pad*v,{extrapad:c.extrapad})}}return{min:o,max:s}}function hTt(e,t,r){if(t.setScale(),t.autorange){t.range=r?r.slice():_G(e,t),t._r=t.range.slice(),t._rl=Cy.simpleMap(t._r,t.r2l);var i=t._input,n={};n[t._attr+".range"]=t.range,n[t._attr+".autorange"]=t.autorange,sTt.call("_storeDirectGUIEdit",e.layout,e._fullLayout._preGUI,n),i.range=t.range.slice(),i.autorange=t.autorange}var a=t._anchorAxis;if(a&&a.rangeslider){var o=a.rangeslider[t._name];o&&o.rangemode==="auto"&&(o.range=_G(e,t)),a._input.rangeslider[t._name]=Cy.extendFlat({},o)}}function dTt(e,t,r){r||(r={}),e._m||e.setScale();var i=[],n=[],a=t.length,o=r.padded||!1,s=r.tozero&&(e.type==="linear"||e.type==="-"),l=e.type==="log",u=!1,c=r.vpadLinearized||!1,f,h,d,p,v,m,g,w,b;function _(C){if(Array.isArray(C))return u=!0,function(D){return Math.max(Number(C[D]||0),0)};var k=Math.max(Number(C||0),0);return function(){return k}}var M=_((e._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),x=_((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),T=_(r.vpadplus||r.vpad),A=_(r.vpadminus||r.vpad);if(!u){if(w=1/0,b=-1/0,l)for(f=0;f<a;f++)h=t[f],h<w&&h>0&&(w=h),h>b&&h<RD&&(b=h);else for(f=0;f<a;f++)h=t[f],h<w&&h>-RD&&(w=h),h>b&&h<RD&&(b=h);t=[w,b],a=2}var y={tozero:s,extrapad:o};function E(C){d=t[C],zve(d)&&(m=M(C),g=x(C),c?(p=e.c2l(d)-A(C),v=e.c2l(d)+T(C)):(w=d-A(C),b=d+T(C),l&&w<b/10&&(w=b/10),p=e.c2l(w),v=e.c2l(b)),s&&(p=Math.min(0,p),v=Math.max(0,v)),Rve(p)&&wG(i,p,g,y),Rve(v)&&TG(n,v,m,y))}var S=Math.min(6,a);for(f=0;f<S;f++)E(f);for(f=a-1;f>=S;f--)E(f);return{min:i,max:n,opts:r}}function wG(e,t,r,i){qve(e,t,r,i,pTt)}function TG(e,t,r,i){qve(e,t,r,i,vTt)}function qve(e,t,r,i,n){for(var a=i.tozero,o=i.extrapad,s=!0,l=0;l<e.length&&s;l++){var u=e[l];if(n(u.val,t)&&u.pad>=r&&(u.extrapad||!o)){s=!1;break}else n(t,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(e.splice(l,1),l--)}if(s){var c=a&&t===0;e.push({val:t,pad:c?0:r,extrapad:c?!1:o})}}function Rve(e){return zve(e)&&Math.abs(e)<RD}function pTt(e,t){return e<=t}function vTt(e,t){return e>=t}function gTt(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&zD(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&zD(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function mTt(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&zD(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&zD(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function zD(e,t,r){return t!==void 0&&r!==void 0?(t=e.d2l(t),r=e.d2l(r),t<r):!0}function Ove(e,t){if(!t||!t.autorangeoptions)return e;var r=e[0],i=e[1],n=t.autorangeoptions.include;if(n!==void 0){var a=t.d2l(r),o=t.d2l(i);Cy.isArrayOrTypedArray(n)||(n=[n]);for(var s=0;s<n.length;s++){var l=t.d2l(n[s]);a>=l&&(a=l,r=l),o<=l&&(o=l,i=l)}}return r=gTt(r,t),i=mTt(i,t),[r,i]}});var ji=W((h9r,u1e)=>{"use strict";var ud=vi(),kl=sn(),ww=Ko(),mA=yi(),bn=it(),Tw=bn.strTranslate,t_=uo(),yTt=e_(),yA=ni(),v0=Ji(),xTt=ec(),Uve=YV(),f9r=Gl(),Tc=Kn(),_Tt=Tc.ONEMAXYEAR,OD=Tc.ONEAVGYEAR,ND=Tc.ONEMINYEAR,bTt=Tc.ONEMAXQUARTER,kG=Tc.ONEAVGQUARTER,UD=Tc.ONEMINQUARTER,wTt=Tc.ONEMAXMONTH,Aw=Tc.ONEAVGMONTH,VD=Tc.ONEMINMONTH,g0=Tc.ONEWEEK,_f=Tc.ONEDAY,Dy=_f/2,a1=Tc.ONEHOUR,xA=Tc.ONEMIN,GD=Tc.ONESEC,TTt=Tc.ONEMILLI,ATt=Tc.ONEMICROSEC,r_=Tc.MINUS_SIGN,jD=Tc.BADNUM,CG={K:"zeroline"},DG={K:"gridline",L:"path"},FG={K:"minor-gridline",L:"path"},Jve={K:"tick",L:"path"},Vve={K:"tick",L:"text"},Gve={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},$D=Hl(),gA=$D.MID_SHIFT,i_=$D.CAP_SHIFT,_A=$D.LINE_SPACING,MTt=$D.OPPOSITE_SIDE,HD=3,Rr=u1e.exports={};Rr.setConvert=i1();var STt=bw(),o1=Cs(),ETt=o1.idSort,kTt=o1.isLinked;Rr.id2name=o1.id2name;Rr.name2id=o1.name2id;Rr.cleanId=o1.cleanId;Rr.list=o1.list;Rr.listIds=o1.listIds;Rr.getFromId=o1.getFromId;Rr.getFromTrace=o1.getFromTrace;var Qve=Op();Rr.getAutoRange=Qve.getAutoRange;Rr.findExtremes=Qve.findExtremes;var CTt=1e-4;function RG(e){var t=(e[1]-e[0])*CTt;return[e[0]-t,e[1]+t]}function DTt(e,t,r){if(![r,e,t].every(kl)||r===0)return e;let i=Math.round((e-t)/r),n=t+i*r;return e!==n&&Math.abs(e-n)<Math.abs(r)*1e-6?n:e}Rr.coerceRef=function(e,t,r,i,n,a){var o=i.charAt(i.length-1),s=r._fullLayout._subplots[o+"axis"],l=i+"ref",u={};return n||(n=s[0]||(typeof a=="string"?a:a[0])),a||(a=n),s=s.concat(s.map(function(c){return c+" domain"})),u[l]={valType:"enumerated",values:s.concat(a?typeof a=="string"?[a]:a:[]),dflt:n},bn.coerce(e,t,u,l)};Rr.coerceRefArray=function(e,t,r,i,n,a,o){let s=i.charAt(i.length-1);var l=r._fullLayout._subplots[s+"axis"];let u=i+"ref";var c=e[u];n||(n=l[0]||(typeof a=="string"?a:a[0])),l=l.concat(l.map(h=>h+" domain")),l=l.concat(a||[]),c.length>o?(bn.warn("Array attribute "+u+" has more entries than expected, truncating to "+o),c=c.slice(0,o)):c.length<o&&(bn.warn("Array attribute "+u+" has fewer entries than expected, extending with default value"),c=c.concat(Array(o-c.length).fill(n)));for(var f=0;f<c.length;f++)c[f]=o1.cleanId(c[f],s,!0)||c[f],l.includes(c[f])||(c[f]=n);return t[u]=c,c};Rr.getRefType=function(e){return e===void 0?e:Array.isArray(e)?"array":e==="paper"?"paper":e==="pixel"?"pixel":/( domain)$/.test(e)?"domain":"range"};Rr.coercePosition=function(e,t,r,i,n,a){var o,s,l=Rr.getRefType(i);if(l!=="range")o=bn.ensureNumber,s=r(n,a);else{var u=Rr.getFromId(t,i);a=u.fraction2r(a),s=r(n,a),o=u.cleanPos}e[n]=o(s)};Rr.cleanPosition=function(e,t,r){var i=r==="paper"||r==="pixel"?bn.ensureNumber:Rr.getFromId(t,r).cleanPos;return i(e)};Rr.redrawComponents=function(e,t){t=t||Rr.listIds(e);var r=e._fullLayout;function i(n,a,o,s){for(var l=mA.getComponentMethod(n,a),u={},c=0;c<t.length;c++)for(var f=r[Rr.id2name(t[c])],h=f[o],d=0;d<h.length;d++){var p=h[d];if(!u[p]&&(l(e,p),u[p]=1,s))return}}i("annotations","drawOne","_annIndices"),i("shapes","drawOne","_shapeIndices"),i("images","draw","_imgIndices",!0),i("selections","drawOne","_selectionIndices")};var FTt=Rr.getDataConversions=function(e,t,r,i){var n,a=r==="x"||r==="y"||r==="z"?r:i;if(bn.isArrayOrTypedArray(a)){if(n={type:STt(i,void 0,{autotypenumbers:e._fullLayout.autotypenumbers}),_categories:[]},Rr.setConvert(n),n.type==="category")for(var o=0;o<i.length;o++)n.d2c(i[o])}else n=Rr.getFromTrace(e,t,a);return n?{d2c:n.d2c,c2d:n.c2d}:a==="ids"?{d2c:jve,c2d:jve}:{d2c:Hve,c2d:Hve}};function Hve(e){return+e}function jve(e){return String(e)}Rr.getDataToCoordFunc=function(e,t,r,i){return FTt(e,t,r,i).d2c};Rr.counterLetter=function(e){var t=e.charAt(0);if(t==="x")return"y";if(t==="y")return"x"};Rr.minDtick=function(e,t,r,i){["log","category","multicategory"].indexOf(e.type)!==-1||!i?e._minDtick=0:e._minDtick===void 0?(e._minDtick=t,e._forceTick0=r):e._minDtick&&((e._minDtick/t+1e-6)%1<2e-6&&((r-e._forceTick0)/t%1+1.000001)%1<2e-6?(e._minDtick=t,e._forceTick0=r):((t/e._minDtick+1e-6)%1>2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};Rr.saveRangeInitial=function(e,t){for(var r=Rr.list(e,"",!0),i=!1,n=0;n<r.length;n++){var a=r[n],o=a._rangeInitial0===void 0&&a._rangeInitial1===void 0,s=o||a.range[0]!==a._rangeInitial0||a.range[1]!==a._rangeInitial1,l=a.autorange;(o&&l!==!0||t&&s)&&(a._rangeInitial0=l==="min"||l==="max reversed"?void 0:a.range[0],a._rangeInitial1=l==="max"||l==="min reversed"?void 0:a.range[1],a._autorangeInitial=l,i=!0)}return i};Rr.saveShowSpikeInitial=function(e,t){for(var r=Rr.list(e,"",!0),i=!1,n="on",a=0;a<r.length;a++){var o=r[a],s=o._showSpikeInitial===void 0,l=s||o.showspikes!==o._showspikes;(s||t&&l)&&(o._showSpikeInitial=o.showspikes,i=!0),n==="on"&&!o.showspikes&&(n="off")}return e._fullLayout._cartesianSpikesEnabled=n,i};Rr.autoBin=function(e,t,r,i,n,a){var o=bn.aggNums(Math.min,null,e),s=bn.aggNums(Math.max,null,e);if(t.type==="category"||t.type==="multicategory")return{start:o-.5,end:s+.5,size:Math.max(1,Math.round(a)||1),_dataSpan:s-o};n||(n=t.calendar);var l;if(t.type==="log"?l={type:"linear",range:[o,s]}:l={type:t.type,range:bn.simpleMap([o,s],t.c2r,0,n),calendar:n},Rr.setConvert(l),a=a&&Uve.dtick(a,l.type),a)l.dtick=a,l.tick0=Uve.tick0(void 0,l.type,n);else{var u;if(r)u=(s-o)/r;else{var c=bn.distinctVals(e),f=Math.pow(10,Math.floor(Math.log(c.minDiff)/Math.LN10)),h=f*bn.roundUp(c.minDiff/f,[.9,1.9,4.9,9.9],!0);u=Math.max(h,2*bn.stdev(e)/Math.pow(e.length,i?.25:.4)),kl(u)||(u=1)}Rr.autoTicks(l,u)}var d=l.dtick,p=Rr.tickIncrement(Rr.tickFirst(l),d,"reverse",n),v,m;if(typeof d=="number")p=LTt(p,e,l,o,s),m=1+Math.floor((s-p)/d),v=p+m*d;else for(l.dtick.charAt(0)==="M"&&(p=PTt(p,e,d,o,n)),v=p,m=0;v<=s;)v=Rr.tickIncrement(v,d,!1,n),m++;return{start:t.c2r(p,0,n),end:t.c2r(v,0,n),size:d,_dataSpan:s-o}};function LTt(e,t,r,i,n){var a=0,o=0,s=0,l=0;function u(d){return(1+(d-e)*100/r.dtick)%100<2}for(var c=0;c<t.length;c++)t[c]%1===0?s++:kl(t[c])||l++,u(t[c])&&a++,u(t[c]+r.dtick/2)&&o++;var f=t.length-l;if(s===f&&r.type!=="date")r.dtick<1?e=i-.5*r.dtick:(e-=.5,e+r.dtick<i&&(e+=r.dtick));else if(o<f*.1&&(a>f*.3||u(i)||u(n))){var h=r.dtick/2;e+=e+h<i?h:-h}return e}function PTt(e,t,r,i,n){var a=bn.findExactDates(t,n),o=.8;if(a.exactDays>o){var s=Number(r.slice(1));a.exactYears>o&&s%12===0?e=Rr.tickIncrement(e,"M6","reverse")+_f*1.5:a.exactMonths>o?e=Rr.tickIncrement(e,"M1","reverse")+_f*15.5:e-=Dy;var l=Rr.tickIncrement(e,r);if(l<=i)return l}return e}Rr.prepMinorTicks=function(e,t,r){var f,h;if(!((f=t.minor)!=null&&f.dtick)){delete e.dtick;var i=t.dtick&&kl(t._tmin),n;if(i){var a=Rr.tickIncrement(t._tmin,t.dtick,!0);n=[t._tmin,a*.99+t._tmin*.01]}else{var o=bn.simpleMap(t.range,t.r2l);n=[o[0],.8*o[0]+.2*o[1]]}if(e.range=bn.simpleMap(n,t.l2r),e._isMinor=!0,Rr.prepTicks(e,r),i){var s=kl(t.dtick),l=kl(e.dtick),u=s?t.dtick:+t.dtick.substring(1),c=l?e.dtick:+e.dtick.substring(1);s&&l?MG(u,c)?u===2*g0&&c===2*_f&&(e.dtick=g0):u===2*g0&&c===3*_f?e.dtick=g0:u===g0&&!(t._input.minor||{}).nticks?e.dtick=_f:$ve(u/c,2.5)?e.dtick=u/2:e.dtick=u:String(t.dtick).charAt(0)==="M"?l?e.dtick="M1":MG(u,c)?u>=12&&c===2&&(e.dtick="M3"):e.dtick=t.dtick:String(e.dtick).charAt(0)==="L"?String(t.dtick).charAt(0)==="L"?MG(u,c)||(e.dtick=$ve(u/c,2.5)?t.dtick/2:t.dtick):e.dtick="D1":e.dtick==="D2"&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}((h=t.minor)==null?void 0:h._tick0Init)===void 0&&(e.tick0=t.tick0)};function MG(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function $ve(e,t){return Math.abs(e/t-1)<.001}Rr.prepTicks=function(e,t){var r=bn.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e.tickmode==="auto"||!e.dtick){var i=e.nticks,n;i||(e.type==="category"||e.type==="multicategory"?(n=e.tickfont?bn.bigFont(e.tickfont.size||12):15,i=e._length/n):(n=e._id.charAt(0)==="y"?40:80,i=bn.constrain(e._length/n,4,9)+1),e._name==="radialaxis"&&(i*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(i*=100),e._roughDTick=Math.abs(r[1]-r[0])/i,Rr.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<e._minDtick*2&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}e.ticklabelmode==="period"&&ITt(e),e.tick0||(e.tick0=e.type==="date"?"2000-01-01":0),e.type==="date"&&e.dtick<.1&&(e.dtick=.1),i1e(e)};function SG(e){return+e.substring(1)}function ITt(e){var t;function r(){return!(kl(e.dtick)||e.dtick.charAt(0)!=="M")}var i=r(),n=Rr.getTickFormat(e);if(n){var a=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(n)||(/%[HI]/.test(n)?(t=a1,a&&!i&&e.dtick<a1&&(e.dtick=a1)):/%p/.test(n)?(t=Dy,a&&!i&&e.dtick<Dy&&(e.dtick=Dy)):/%[Aadejuwx]/.test(n)?(t=_f,a&&!i&&e.dtick<_f&&(e.dtick=_f)):/%[UVW]/.test(n)?(t=g0,a&&!i&&e.dtick<g0&&(e.dtick=g0)):/%[Bbm]/.test(n)?(t=Aw,a&&(i?SG(e.dtick)<1:e.dtick<VD)&&(e.dtick="M1")):/%[q]/.test(n)?(t=kG,a&&(i?SG(e.dtick)<3:e.dtick<UD)&&(e.dtick="M3")):/%[Yy]/.test(n)&&(t=OD,a&&(i?SG(e.dtick)<12:e.dtick<ND)&&(e.dtick="M12")))}i=r(),i&&e.tick0===e._dowTick0&&(e.tick0=e._rawTick0),e._definedDelta=t}function RTt(e,t,r){for(var i=0;i<e.length;i++){var n=e[i].value,a=i,o=i+1;i<e.length-1?(a=i,o=i+1):i>0?(a=i-1,o=i):(a=i,o=i);var s=e[a].value,l=e[o].value,u=Math.abs(l-s),c=r||u,f=0;c>=ND?u>=ND&&u<=_Tt?f=u:f=OD:r===kG&&c>=UD?u>=UD&&u<=bTt?f=u:f=kG:c>=VD?u>=VD&&u<=wTt?f=u:f=Aw:r===g0&&c>=g0?f=g0:c>=_f?f=_f:r===Dy&&c>=Dy?f=Dy:r===a1&&c>=a1&&(f=a1);var h;f>=u&&(f=u,h=!0);var d=n+f;if(t.rangebreaks&&f>0){for(var p=84,v=0,m=0;m<p;m++){var g=(m+.5)/p;t.maskBreaks(n*(1-g)+g*d)!==jD&&v++}f*=v/p,f||(e[i].drop=!0),h&&u>g0&&(f=u)}(f>0||i===0)&&(e[i].periodX=n+f/2)}}Rr.calcTicks=function(t,r){for(var i=t.type,n=t.calendar,a=t.ticklabelstep,o=t.ticklabelmode==="period",s=t.range[0]>t.range[1],l=!t.ticklabelindex||bn.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],u=bn.simpleMap(t.range,t.r2l,void 0,void 0,r),c=u[1]<u[0],f=Math.min(u[0],u[1]),h=Math.max(u[0],u[1]),d=Math.max(1e3,t._length||0),p=[],v=[],m=[],g=[],w=[],b=t.minor&&(t.minor.ticks||t.minor.showgrid),_=b||l,M=1;M>=(_?0:1);M--){var x=!M;M?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):_&&(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var T=M?t:bn.extendFlat({},t,_?t.minor:{minor:{}});if(x?Rr.prepMinorTicks(T,t,r):Rr.prepTicks(T,r),T.tickmode==="array"){M?(m=[],p=Wve(t,!x)):(g=[],v=Wve(t,!x));continue}if(T.tickmode==="sync"){m=[],p=zTt(t);continue}var A=RG(u),y=A[0],E=A[1],S=kl(T.dtick),C=i==="log"&&!(S||T.dtick.charAt(0)==="L"),k=Rr.tickFirst(T,r);if(M){if(t._tmin=k,k<y!==c)break;(i==="category"||i==="multicategory")&&(E=c?Math.max(-.5,E):Math.min(t._categories.length-.5,E))}var D=null,F=k,P;if(M){var R;S?R=t.dtick:i==="date"?typeof t.dtick=="string"&&t.dtick.charAt(0)==="M"&&(R=Aw*t.dtick.substring(1)):R=t._roughDTick,P=Math.round((t.r2l(F)-t.r2l(t.tick0))/R)-1}var L=T.dtick,I=i==="linear"?T.r2l(T.tick0):void 0;for(T.rangebreaks&&T._tick0Init!==T.tick0&&(F=EG(F,t),c||(F=Rr.tickIncrement(F,L,!c,n))),(M||l)&&o&&(F=Rr.tickIncrement(F,L,!c,n),M&&P--);c?F>=E:F<=E;F=Rr.tickIncrement(F,L,c,n)){if(M&&P++,T.rangebreaks&&!c){if(F<y)continue;if(T.maskBreaks(F)===jD&&EG(F,T)>=h)break}if(m.length>d||F===D)break;D=F;var B={value:DTt(F,I,L)};M?(F===k&&(B.first=!0),C&&F!==(F|0)&&(B.simpleLabel=!0),a>1&&P%a&&(B.skipLabel=!0),m.push(B)):(B.minor=!0,g.push(B))}}if(!g||g.length<3)l=!1;else{var O=(g[2].value-g[1].value)*(s?-1:1);s6t(O,t.tickformat)||(l=!1,g=g.slice(1))}if(!l)w=m;else{var $=m.concat(g);o&&m.length&&($=$.slice(1)),$=$.sort(function(ue,ee){return ue.value-ee.value}).filter(function(ue,ee,ae){return ee===0||ue.value!==ae[ee-1].value});var Y=$.map(function(ue,ee){return ue.minor===void 0&&!ue.skipLabel?ee:null}).filter(function(ue){return ue!==null});Y.forEach(function(ue){l.map(function(ee){var ae=ue+ee;ae>=0&&ae<$.length&&bn.pushUnique(w,$[ae])})}),m.forEach(function(ue){ue.skipLabel=w.indexOf(ue)===-1})}if(b){var K=t.minor.ticks==="inside"&&t.ticks==="outside"||t.minor.ticks==="outside"&&t.ticks==="inside";if(!K){for(var j=m.map(function(ue){return ue.value}),q=[],J=0;J<g.length;J++){var U=g[J],V=U.value;if(j.indexOf(V)===-1){for(var X=!1,H=0;!X&&H<m.length;H++)1e7+m[H].value===1e7+V&&(X=!0);X||q.push(U)}}g=q}}o&&RTt(w,t,t._definedDelta);var G;if(t.rangebreaks){var Q=t._id.charAt(0)==="y",te=1;t.tickmode==="auto"&&(te=t.tickfont?t.tickfont.size:12);var ce=NaN;for(G=m.length-1;G>-1;G--){if(m[G].drop){m.splice(G,1);continue}m[G].value=EG(m[G].value,t);var ge=t.c2p(m[G].value);(Q?ce>ge-te:ce<ge+te)?m.splice(c?G+1:G,1):ce=ge}}OG(t)&&Math.abs(u[1]-u[0])===360&&m.pop(),t._tmax=(m[m.length-1]||{}).value,m.length&&(m[m.length-1].last=!0),t._prevDateHead="",t._inCalcTicks=!0;var Ce,be=function(ue){ue.text="",t._prevDateHead=Ce};m=m.concat(g);function he(ue,ee){var ae=Rr.tickText(ue,ee.value,!1,ee.simpleLabel,{first:ee.first,last:ee.last}),xe=ee.periodX;return xe!==void 0&&(ae.periodX=xe,(xe>h||xe<f)&&(xe>h&&(ae.periodX=h),xe<f&&(ae.periodX=f),be(ae))),ae}var oe;for(G=0;G<m.length;G++){var Ee=m[G].minor,ye=m[G].value;Ee?(l&&w.indexOf(m[G])!==-1?oe=he(t,m[G]):oe={x:ye},oe.minor=!0,v.push(oe)):(Ce=t._prevDateHead,oe=he(t,m[G]),m[G].skipLabel&&be(oe),p.push(oe))}return o&&l&&v.length&&(v[0].noTick=!0),p=p.concat(v),t._inCalcTicks=!1,o&&p.length&&(p[0].noTick=!0),p};function e1e(e,t){return e.rangebreaks&&(t=t.filter(function(r){return e.maskBreaks(r.x)!==jD})),t}function zTt(e){var t=e._mainAxis,r=[];if(t._vals){for(var i=-1,n=-1,a=0;a<t._vals.length;a++)t._vals[a].noTick||t._vals[a].minor||(i===-1&&(i=a),n=a);for(var o=0;o<t._vals.length;o++)if(!t._vals[o].noTick){var s=t.l2p(t._vals[o].x),l=e.p2l(s),u=Rr.tickText(e,l,!1,void 0,{first:o===i,last:o===n});t._vals[o].minor&&(u.minor=!0,u.text=""),r.push(u)}}return r=e1e(e,r),r}function Wve(e,t){var r=bn.simpleMap(e.range,e.r2l),i=RG(r),n=Math.min(i[0],i[1]),a=Math.max(i[0],i[1]),o=e.type==="category"?e.d2l_noadd:e.d2l;e.type==="log"&&String(e.dtick).charAt(0)!=="L"&&(e.dtick="L"+Math.pow(10,Math.floor(Math.min(e.range[0],e.range[1]))-1));for(var s=[],l=0;l<=1;l++)if(!(t!==void 0&&(t&&l||t===!1&&!l))&&!(l&&!e.minor)){var u=l?e.minor.tickvals:e.tickvals,c=l?[]:e.ticktext;if(u){bn.isArrayOrTypedArray(c)||(c=[]);var f=-1,h=-1;if(!l)for(var d=0;d<u.length;d++){var p=o(u[d]);p>n&&p<a&&(f===-1&&(f=d),h=d)}for(var v=0;v<u.length;v++){var m=o(u[v]);if(m>n&&m<a){var g=Rr.tickText(e,m,!1,String(c[v]),{first:v===f,last:v===h});l&&(g.minor=!0,g.text=""),s.push(g)}}}}return s=e1e(e,s),s}var BD=[2,5,10],Yve=[1,2,3,6,12],Xve=[1,2,5,10,15,30],BTt=[1,2,3,7,14],t1e=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],r1e=[-.301,0,.301,.699,1],qTt=[15,30,45,90,180];function n1(e,t,r){return t*bn.roundUp(e/t,r)}Rr.autoTicks=function(e,t,r){var i;function n(f){return Math.pow(f,Math.floor(Math.log(t)/Math.LN10))}if(e.type==="date"){e.tick0=bn.dateTick0(e.calendar,0);var a=2*t;if(a>OD)t/=OD,i=n(10),e.dtick="M"+12*n1(t,i,BD);else if(a>Aw)t/=Aw,e.dtick="M"+n1(t,1,Yve);else if(a>_f){if(e.dtick=n1(t,_f,e._hasDayOfWeekBreaks?[1,2,7,14]:BTt),!r){var o=Rr.getTickFormat(e),s=e.ticklabelmode==="period";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=bn.dateTick0(e.calendar,2):e.tick0=bn.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else a>a1?e.dtick=n1(t,a1,Yve):a>xA?e.dtick=n1(t,xA,Xve):a>GD?e.dtick=n1(t,GD,Xve):(i=n(10),e.dtick=n1(t,i,BD))}else if(e.type==="log"){e.tick0=0;var l=bn.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(l[1]-l[0])<1){var u=1.5*Math.abs((l[1]-l[0])/t);t=Math.abs(Math.pow(10,l[1])-Math.pow(10,l[0]))/u,i=n(10),e.dtick="L"+n1(t,i,BD)}else e.dtick=t>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):OG(e)?(e.tick0=0,i=1,e.dtick=n1(t,i,qTt)):(e.tick0=0,i=n(10),e.dtick=n1(t,i,BD));if(e.dtick===0&&(e.dtick=1),!kl(e.dtick)&&typeof e.dtick!="string"){var c=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(c)}};function i1e(e){var t=e.dtick;if(e._tickexponent=0,!kl(t)&&typeof t!="string"&&(t=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var r=e.r2l(e.tick0),i=e.l2r(r).replace(/(^-|i)/g,""),n=i.length;if(String(t).charAt(0)==="M")n>10||i.slice(5)!=="01-01"?e._tickround="d":e._tickround=+t.slice(1)%12===0?"y":"m";else if(t>=_f&&n<=10||t>=_f*15)e._tickround="d";else if(t>=xA&&n<=16||t>=a1)e._tickround="M";else if(t>=GD&&n<=19||t>=xA)e._tickround="S";else{var a=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(n,a)-20,e._tickround<0&&(e._tickround=4)}}else if(kl(t)||t.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);kl(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),l=Math.floor(Math.log(s)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(l)>u&&(Mw(e.exponentformat)&&e.exponentformat!=="SI extended"&&!zG(l)||Mw(e.exponentformat)&&e.exponentformat==="SI extended"&&!BG(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}Rr.tickIncrement=function(e,t,r,i){var n=r?-1:1;if(kl(t))return bn.increment(e,n*t);var a=t.charAt(0),o=n*Number(t.slice(1));if(a==="M")return bn.incrementMonth(e,o,i);if(a==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(a==="D"){var s=t==="D2"?r1e:t1e,l=e+n*.01,u=bn.roundUp(bn.mod(l,1),s,r);return Math.floor(l)+Math.log(ud.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(t)};Rr.tickFirst=function(e,t){var r=e.r2l||Number,i=bn.simpleMap(e.range,r,void 0,void 0,t),n=i[1]<i[0],a=n?Math.floor:Math.ceil,o=RG(i)[0],s=e.dtick,l=r(e.tick0);if(kl(s)){var u=a((o-l)/s)*s+l;return(e.type==="category"||e.type==="multicategory")&&(u=bn.constrain(u,0,e._categories.length-1)),u}var c=s.charAt(0),f=Number(s.slice(1));if(c==="M"){for(var h=0,d=l,p,v,m;h<10;){if(p=Rr.tickIncrement(d,s,n,e.calendar),(p-o)*(d-o)<=0)return n?Math.min(d,p):Math.max(d,p);v=(o-(d+p)/2)/(p-d),m=c+(Math.abs(Math.round(v))||1)*f,d=Rr.tickIncrement(d,m,v<0?!n:n,e.calendar),h++}return bn.error("tickFirst did not converge",e),d}else{if(c==="L")return Math.log(a((Math.pow(10,o)-l)/f)*f+l)/Math.LN10;if(c==="D"){var g=s==="D2"?r1e:t1e,w=bn.roundUp(bn.mod(o,1),g,n);return Math.floor(o)+Math.log(ud.round(Math.pow(10,w),1))/Math.LN10}else throw"unrecognized dtick "+String(s)}};Rr.tickText=function(e,t,r,i,n){var a=!!(n!=null&&n.first),o=!!(n!=null&&n.last),s=n1e(e,t),l=e.tickmode==="array",u=r||l,c=e.type,f=c==="category"?e.d2l_noadd:e.d2l,h,d=function(b){var _=e.l2p(b);return _>=0&&_<=e._length?b:null};if(l&&bn.isArrayOrTypedArray(e.ticktext)){var p=bn.simpleMap(e.range,e.r2l),v=(Math.abs(p[1]-p[0])-(e._lBreaks||0))/1e4;for(h=0;h<e.ticktext.length&&!(Math.abs(t-f(e.tickvals[h]))<v);h++);if(h<e.ticktext.length)return s.text=String(e.ticktext[h]),s.xbnd=[d(s.x-.5),d(s.x+e.dtick-.5)],s}function m(b){return b===void 0?!0:r?b==="none":b==="all"?!1:b==="first"?!a:b==="last"?!o:!0}var g=r?"never":e.exponentformat!=="none"&&m(e.showexponent)?"hide":"";if(c==="date"?OTt(e,s,r,u):c==="log"?NTt(e,s,r,u,g):c==="category"?UTt(e,s):c==="multicategory"?VTt(e,s,r):OG(e)?HTt(e,s,r,u,g):GTt(e,s,r,u,g),i||(e.tickprefix&&!m(e.showtickprefix)&&(s.text=e.tickprefix+s.text),e.ticksuffix&&!m(e.showticksuffix)&&(s.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(s.text)){var w=e.labelalias[s.text];typeof w=="string"&&(s.text=w)}return(e.tickson==="boundaries"||e.showdividers)&&(s.xbnd=[d(s.x-.5),d(s.x+e.dtick-.5)]),s};Rr.hoverLabelText=function(e,t,r){r&&(e=bn.extendFlat({},e,{hoverformat:r}));var i=bn.isArrayOrTypedArray(t)?t[0]:t,n=bn.isArrayOrTypedArray(t)?t[1]:void 0;if(n!==void 0&&n!==i)return Rr.hoverLabelText(e,i,r)+" - "+Rr.hoverLabelText(e,n,r);var a=e.type==="log"&&i<=0,o=Rr.tickText(e,e.c2l(a?-i:i),"hover").text;return a?i===0?"0":r_+o:o};function n1e(e,t,r){var i=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:i.size,font:i.family,fontWeight:i.weight,fontStyle:i.style,fontVariant:i.variant,fontTextcase:i.textcase,fontLineposition:i.lineposition,fontShadow:i.shadow,fontColor:i.color}}function OTt(e,t,r,i){var n=e._tickround,a=r&&e.hoverformat||Rr.getTickFormat(e);i=!a&&i,i&&(kl(n)?n=4:n={y:"m",m:"d",d:"M",M:"S",S:4}[n]);var o=bn.formatDate(t.x,a,n,e._dateFormat,e.calendar,e._extraFormat),s,l=o.indexOf(`
`);if(l!==-1&&(s=o.slice(l+1),o=o.slice(0,l)),i&&(s!==void 0&&(o==="00:00:00"||o==="00:00")?(o=s,s=""):o.length===8&&(o=o.replace(/:00$/,""))),s)if(r)n==="d"?o+=", "+s:o=s+(o?", "+o:"");else if(!e._inCalcTicks||e._prevDateHead!==s)e._prevDateHead=s,o+="<br>"+s;else{var u=wA(e),c=e._trueSide||e.side;(!u&&c==="top"||u&&c==="bottom")&&(o+="<br> ")}t.text=o}function NTt(e,t,r,i,n){var a=e.dtick,o=t.x,s=e.tickformat,l=typeof a=="string"&&a.charAt(0);if(n==="never"&&(n=""),i&&l!=="L"&&(a="L3",l="L"),s||l==="L")t.text=bA(Math.pow(10,o),e,n,i);else if(kl(a)||l==="D"&&(e.minorloglabels==="complete"||bn.mod(o+.01,1)<.1)){var u;e.minorloglabels==="complete"&&!(bn.mod(o+.01,1)<.1)&&(u=!0,t.fontSize*=.75);var c=Math.pow(10,o).toExponential(0),f=c.split("e"),h=+f[1],d=Math.abs(h),p=e.exponentformat;p==="power"||Mw(p)&&p!=="SI extended"&&zG(h)||Mw(p)&&p==="SI extended"&&BG(h)?(t.text=f[0],d>0&&(t.text+="x10"),t.text==="1x10"&&(t.text="10"),h!==0&&h!==1&&(t.text+="<sup>"+(h>0?"":r_)+d+"</sup>"),t.fontSize*=1.25):(p==="e"||p==="E")&&d>2?t.text=f[0]+p+(h>0?"+":r_)+d:(t.text=bA(Math.pow(10,o),e,"","fakehover"),a==="D1"&&e._id.charAt(0)==="y"&&(t.dy-=t.fontSize/6))}else if(l==="D")t.text=e.minorloglabels==="none"?"":String(Math.round(Math.pow(10,bn.mod(o,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(a);if(e.dtick==="D1"){var v=String(t.text).charAt(0);(v==="0"||v==="1")&&(e._id.charAt(0)==="y"?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(o<0?.5:.25)))}}function UTt(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function VTt(e,t,r){var i=Math.round(t.x),n=e._categories[i]||[],a=n[1]===void 0?"":String(n[1]),o=n[0]===void 0?"":String(n[0]);r?t.text=o+" - "+a:(t.text=a,t.text2=o)}function GTt(e,t,r,i,n){n==="never"?n="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(n="hide"),t.text=bA(t.x,e,n,i)}function HTt(e,t,r,i,n){if(e.thetaunit==="radians"&&!r){var a=t.x/180;if(a===0)t.text="0";else{var o=jTt(a);if(o[1]>=100)t.text=bA(bn.deg2rad(t.x),e,n,i);else{var s=t.x<0;o[1]===1?o[0]===1?t.text="\u03C0":t.text=o[0]+"\u03C0":t.text=["<sup>",o[0],"</sup>","\u2044","<sub>",o[1],"</sub>","\u03C0"].join(""),s&&(t.text=r_+t.text)}}}else t.text=bA(t.x,e,n,i)}function jTt(e){function t(s,l){return Math.abs(s-l)<=1e-6}function r(s,l){return t(l,0)?s:r(l,s%l)}function i(s){for(var l=1;!t(Math.round(s*l)/l,s);)l*=10;return l}var n=i(e),a=e*n,o=Math.abs(r(a,n));return[Math.round(a/o),Math.round(n/o)]}var a1e=["f","p","n","\u03BC","m","","k","M","G","T"],$Tt=["q","r","y","z","a",...a1e,"P","E","Z","Y","R","Q"],Mw=e=>["SI","SI extended","B"].includes(e);function zG(e){return e>14||e<-15}function BG(e){return e>32||e<-30}function WTt(e,t){return Mw(t)?!!(t==="SI extended"&&BG(e)||t!=="SI extended"&&zG(e)):!1}function bA(e,t,r,i){var n=e<0,a=t._tickround,o=r||t.exponentformat||"B",s=t._tickexponent,l=Rr.getTickFormat(t),u=t.separatethousands;if(i){var c={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:kl(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};i1e(c),a=(Number(c._tickround)||0)+4,s=c._tickexponent,t.hoverformat&&(l=t.hoverformat)}if(l)return t._numFormat(l)(e).replace(/-/g,r_);o==="none"&&(s=0),e=Math.abs(e);let f=Math.pow(10,-a)/2;if(e<f)e="0",n=!1;else{if(s&&(e*=Math.pow(10,-s),a+=s),a===0)e=String(Math.round(e));else if(a<0){let d=Math.pow(10,-a);e=String(Math.round(e/d)*d)}else e=e.toFixed(Math.min(20,a)).replace(/\.?0+$/,"");e=bn.numSeparate(e,t._separators,u)}if(s&&o!=="hide"){WTt(s,o)&&(o="power");var h;s<0?h=r_+-s:o!=="power"?h="+"+s:h=String(s),o==="e"||o==="E"?e+=o+h:o==="power"?e+="\xD710<sup>"+h+"</sup>":o==="B"&&s===9?e+="B":Mw(o)&&(e+=o==="SI extended"?$Tt[s/3+10]:a1e[s/3+5])}return n?r_+e:e}Rr.getTickFormat=function(e){var t;function r(l){return typeof l!="string"?l:Number(l.replace("M",""))*Aw}function i(l,u){var c=["L","D"];if(typeof l==typeof u){if(typeof l=="number")return l-u;var f=c.indexOf(l.charAt(0)),h=c.indexOf(u.charAt(0));return f===h?Number(l.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):f-h}else return typeof l=="number"?1:-1}function n(l,u,c){var f=c||function(p){return p},h=u[0],d=u[1];return(!h&&typeof h!="number"||f(h)<=f(l))&&(!d&&typeof d!="number"||f(d)>=f(l))}function a(l,u){var c=u[0]===null,f=u[1]===null,h=i(l,u[0])>=0,d=i(l,u[1])<=0;return(c||h)&&(f||d)}var o,s;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(t=0;t<e.tickformatstops.length;t++)if(s=e.tickformatstops[t],s.enabled&&n(e.dtick,s.dtickrange,r)){o=s;break}break}case"log":{for(t=0;t<e.tickformatstops.length;t++)if(s=e.tickformatstops[t],s.enabled&&a(e.dtick,s.dtickrange)){o=s;break}break}default:}return o?o.value:e.tickformat};Rr.getSubplots=function(e,t){var r=e._fullLayout._subplots,i=r.cartesian.concat(r.gl2d||[]),n=t?Rr.findSubplotsWithAxis(i,t):i;return n.sort(function(a,o){var s=a.slice(1).split("y"),l=o.slice(1).split("y");return s[0]===l[0]?+s[1]-+l[1]:+s[0]-+l[0]}),n};Rr.findSubplotsWithAxis=function(e,t){for(var r=new RegExp(t._id.charAt(0)==="x"?"^"+t._id+"y":t._id+"$"),i=[],n=0;n<e.length;n++){var a=e[n];r.test(a)&&i.push(a)}return i};Rr.makeClipPaths=function(e){var t=e._fullLayout;if(!t._hasOnlyLargeSploms){var r={_offset:0,_length:t.width,_id:""},i={_offset:0,_length:t.height,_id:""},n=Rr.list(e,"x",!0),a=Rr.list(e,"y",!0),o=[],s,l;for(s=0;s<n.length;s++)for(o.push({x:n[s],y:i}),l=0;l<a.length;l++)s===0&&o.push({x:r,y:a[l]}),o.push({x:n[s],y:a[l]});var u=t._clips.selectAll(".axesclip").data(o,function(c){return c.x._id+c.y._id});u.enter().append("clipPath").classed("axesclip",!0).attr("id",function(c){return"clip"+t._uid+c.x._id+c.y._id}).append("rect"),u.exit().remove(),u.each(function(c){ud.select(this).select("rect").attr({x:c.x._offset||0,y:c.y._offset||0,width:c.x._length||1,height:c.y._length||1})})}};Rr.draw=function(e,t,r){var i=e._fullLayout;t==="redraw"&&i._paper.selectAll("g.subplot").each(function(l){var u=l[0],c=i._plots[u];if(c){var f=c.xaxis,h=c.yaxis;c.xaxislayer.selectAll("."+f._id+"tick").remove(),c.yaxislayer.selectAll("."+h._id+"tick").remove(),c.xaxislayer.selectAll("."+f._id+"tick2").remove(),c.yaxislayer.selectAll("."+h._id+"tick2").remove(),c.xaxislayer.selectAll("."+f._id+"divider").remove(),c.yaxislayer.selectAll("."+h._id+"divider").remove(),c.minorGridlayer&&c.minorGridlayer.selectAll("path").remove(),c.gridlayer&&c.gridlayer.selectAll("path").remove(),c.zerolinelayer&&c.zerolinelayer.selectAll("path").remove(),c.zerolinelayerAbove&&c.zerolinelayerAbove.selectAll("path").remove(),i._infolayer.select(".g-"+f._id+"title").remove(),i._infolayer.select(".g-"+h._id+"title").remove()}});var n=!t||t==="redraw"?Rr.listIds(e):t,a=Rr.list(e),o=a.filter(function(l){return l.autoshift}).map(function(l){return l.overlaying});n.map(function(l){var u=Rr.getFromId(e,l);if(u.tickmode==="sync"&&u.overlaying){var c=n.findIndex(function(f){return f===u.overlaying});c>=0&&n.unshift(n.splice(c,1).shift())}});var s={false:{left:0,right:0}};return bn.syncOrAsync(n.map(function(l){return function(){if(l){var u=Rr.getFromId(e,l);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var c=Rr.drawOne(e,u,r);return u._shiftPusher&&IG(u,u._fullDepth||0,s,!0),u._r=u.range.slice(),u._rl=bn.simpleMap(u._r,u.r2l),c}}}))};Rr.drawOne=function(e,t,r){r=r||{};var i=r.axShifts||{},n=r.overlayingShiftedAx||[],a,o,s;t.setScale();var l=e._fullLayout,u=t._id,c=u.charAt(0),f=Rr.counterLetter(u),h=l._plots[t._mainSubplot],d=t.zerolinelayer==="above traces";if(!h)return;if(t._shiftPusher=t.autoshift||n.indexOf(t._id)!==-1||n.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var p=t.linewidth/2||0;t.ticks==="inside"&&(p+=t.ticklen),IG(t,p,i,!0),IG(t,t.shift||0,i,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=o6t(t,i));var v=h[c+"axislayer"],m=t._mainLinePosition,g=m+=t._shift,w=t._mainMirrorPosition,b=t._vals=Rr.calcTicks(t),_=[t.mirror,g,w].join("_");for(a=0;a<b.length;a++)b[a].axInfo=_;t._selections={},t._tickAngles&&(t._prevTickAngles=t._tickAngles),t._tickAngles={},t._depth=null;var M={};function x(oe){var Ee=u+(oe||"tick");return M[Ee]||(M[Ee]=KTt(t,Ee,g)),M[Ee]}if(t.visible){var T=Rr.makeTransTickFn(t),A=Rr.makeTransTickLabelFn(t),y,E,S=t.ticks==="inside",C=t.ticks==="outside";if(t.tickson==="boundaries"){var k=YTt(t,b);E=Rr.clipEnds(t,k),y=S?E:k}else E=Rr.clipEnds(t,b),y=S&&t.ticklabelmode!=="period"?E:b;var D=t._gridVals=E,F=ZTt(t,b);if(!l._hasOnlyLargeSploms){var P=t._subplotsWith,R={};for(a=0;a<P.length;a++){o=P[a],s=l._plots[o];var L=s[f+"axis"],I=L._mainAxis._id;if(!R[I]){R[I]=1;var B=c==="x"?"M0,"+L._offset+"v"+L._length:"M"+L._offset+",0h"+L._length;Rr.drawGrid(e,t,{vals:D,counterAxis:L,layer:s.gridlayer.select("."+u),minorLayer:s.minorGridlayer.select("."+u),path:B,transFn:T}),Rr.drawZeroLine(e,t,{counterAxis:L,layer:d?s.zerolinelayerAbove:s.zerolinelayer,path:B,transFn:T})}}}var O,$=Rr.getTickSigns(t),Y=Rr.getTickSigns(t,"minor");if(t.ticks||t.minor&&t.minor.ticks){var K=Rr.makeTickPath(t,g,$[2]),j=Rr.makeTickPath(t,g,Y[2],{minor:!0}),q,J,U,V;if(t._anchorAxis&&t.mirror&&t.mirror!==!0?(q=Rr.makeTickPath(t,w,$[3]),J=Rr.makeTickPath(t,w,Y[3],{minor:!0}),U=K+q,V=j+J):(q="",J="",U=K,V=j),t.showdividers&&C&&t.tickson==="boundaries"){var X={};for(a=0;a<F.length;a++)X[F[a].x]=1;O=function(oe){return X[oe.x]?q:U}}else O=function(oe){return oe.minor?V:U}}if(Rr.drawTicks(e,t,{vals:y,layer:v,path:O,transFn:T}),t.mirror==="allticks"){var H=Object.keys(t._linepositions||{});for(a=0;a<H.length;a++){o=H[a],s=l._plots[o];var G=t._linepositions[o]||[],Q=G[0],te=G[1],ce=G[2],ge=Rr.makeTickPath(t,Q,ce?$[0]:Y[0],{minor:ce})+Rr.makeTickPath(t,te,ce?$[1]:Y[1],{minor:ce});Rr.drawTicks(e,t,{vals:y,layer:s[c+"axislayer"],path:ge,transFn:T})}}var Ce=[];if(Ce.push(function(){return Rr.drawLabels(e,t,{vals:b,layer:v,plotinfo:s,transFn:A,labelFns:Rr.makeLabelFns(t,g)})}),t.type==="multicategory"){var be={x:2,y:10}[c];Ce.push(function(){var oe={x:"height",y:"width"}[c],Ee=x()[oe]+be+(t._tickAngles[u+"tick"]?t.tickfont.size*_A:0);return Rr.drawLabels(e,t,{vals:XTt(t,b),layer:v,cls:u+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:T,labelFns:Rr.makeLabelFns(t,g+Ee*$[4])})}),Ce.push(function(){return t._depth=$[4]*(x("tick2")[t.side]-g),QTt(e,t,{vals:F,layer:v,path:Rr.makeTickPath(t,g,$[4],{len:t._depth}),transFn:T})})}else t.title.hasOwnProperty("standoff")&&Ce.push(function(){t._depth=$[4]*(x()[t.side]-g)});var he=mA.getComponentMethod("rangeslider","isVisible")(t);return!r.skipTitle&&!(he&&t.side==="bottom")&&Ce.push(function(){return e6t(e,t)}),Ce.push(function(){var oe=t.side.charAt(0),Ee=MTt[t.side].charAt(0),ye=Rr.getPxPosition(e,t),ue=C?t.ticklen:0,ee,ae,xe,re;(t.automargin||he||t._shiftPusher)&&(t.type==="multicategory"?ee=x("tick2"):(ee=x(),c==="x"&&oe==="b"&&(t._depth=Math.max(ee.width>0?ee.bottom-ye:0,ue))));var pe=0,we=0;if(t._shiftPusher&&(pe=Math.max(ue,ee.height>0?oe==="l"?ye-ee.left:ee.right-ye:0),t.title.text!==l._dfltTitle[c]&&(we=(t._titleStandoff||0)+(t._titleScoot||0),oe==="l"&&(we+=Kve(t))),t._fullDepth=Math.max(pe,we)),t.automargin){ae={x:0,y:0,r:0,l:0,t:0,b:0};var Fe=[0,1],Se=typeof t._shift=="number"?t._shift:0;if(c==="x"){if(oe==="b"?ae[oe]=t._depth:(ae[oe]=t._depth=Math.max(ee.width>0?ye-ee.top:0,ue),Fe.reverse()),ee.width>0){var ke=ee.right-(t._offset+t._length);ke>0&&(ae.xr=1,ae.r=ke);var _e=t._offset-ee.left;_e>0&&(ae.xl=0,ae.l=_e)}}else if(oe==="l"?(t._depth=Math.max(ee.height>0?ye-ee.left:0,ue),ae[oe]=t._depth-Se):(t._depth=Math.max(ee.height>0?ee.right-ye:0,ue),ae[oe]=t._depth+Se,Fe.reverse()),ee.height>0){var Ie=ee.bottom-(t._offset+t._length);Ie>0&&(ae.yb=0,ae.b=Ie);var Oe=t._offset-ee.top;Oe>0&&(ae.yt=1,ae.t=Oe)}ae[f]=t.anchor==="free"?t.position:t._anchorAxis.domain[Fe[0]],t.title.text!==l._dfltTitle[c]&&(ae[oe]+=Kve(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(xe={x:0,y:0,r:0,l:0,t:0,b:0},xe[Ee]=t.linewidth,t.mirror&&t.mirror!==!0&&(xe[Ee]+=ue),t.mirror===!0||t.mirror==="ticks"?xe[f]=t._anchorAxis.domain[Fe[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(xe[f]=[t._counterDomainMin,t._counterDomainMax][Fe[1]]))}he&&(re=mA.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(Zve(ae,t.automargin),Zve(xe,t.automargin)),ww.autoMargin(e,qG(t),ae),ww.autoMargin(e,s1e(t),xe),ww.autoMargin(e,l1e(t),re)}),bn.syncOrAsync(Ce)}};function Zve(e,t){if(e){var r=Object.keys(Gve).reduce(function(i,n){return t.indexOf(n)!==-1&&Gve[n].forEach(function(a){i[a]=1}),i},{});Object.keys(e).forEach(function(i){r[i]||(i.length===1?e[i]=0:delete e[i])})}}function YTt(e,t){var r=[],i,n=function(a,o){var s=a.xbnd[o];s!==null&&r.push(bn.extendFlat({},a,{x:s}))};if(t.length){for(i=0;i<t.length;i++)n(t[i],0);n(t[i-1],1)}return r}function XTt(e,t){for(var r=[],i={},n=0;n<t.length;n++){var a=t[n];i[a.text2]?i[a.text2].push(a.x):i[a.text2]=[a.x]}for(var o in i)r.push(n1e(e,bn.interp(i[o],.5),o));return r}function ZTt(e,t){var r=[],i,n,a=t.length&&t[t.length-1].x<t[0].x,o=function(l,u){var c=l.xbnd[u];c!==null&&r.push(bn.extendFlat({},l,{x:c}))};if(e.showdividers&&t.length){for(i=0;i<t.length;i++){var s=t[i];s.text2!==n&&o(s,a?1:0),n=s.text2}o(t[i-1],a?0:1)}return r}function KTt(e,t,r){var i,n,a,o;if(e._selections[t].size())i=1/0,n=-1/0,a=1/0,o=-1/0,e._selections[t].each(function(){var l=PG(this);if(l.node().style.display!=="none"){var u=v0.bBox(l.node().parentNode);i=Math.min(i,u.top),n=Math.max(n,u.bottom),a=Math.min(a,u.left),o=Math.max(o,u.right)}});else{var s=Rr.makeLabelFns(e,r);i=n=s.yFn({dx:0,dy:0,fontSize:0}),a=o=s.xFn({dx:0,dy:0,fontSize:0})}return{top:i,bottom:n,left:a,right:o,height:n-i,width:o-a}}Rr.getTickSigns=function(e,t){var r=e._id.charAt(0),i={x:"top",y:"right"}[r],n=e.side===i?1:-1,a=[-1,1,n,-n],o=t?(e.minor||{}).ticks:e.ticks;return o!=="inside"==(r==="x")&&(a=a.map(function(s){return-s})),e.side&&a.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),a};Rr.makeTransTickFn=function(e){return e._id.charAt(0)==="x"?function(t){return Tw(e._offset+e.l2p(t.x),0)}:function(t){return Tw(0,e._offset+e.l2p(t.x))}};Rr.makeTransTickLabelFn=function(e){var t=JTt(e),r=e.ticklabelshift||0,i=e.ticklabelstandoff||0,n=t[0],a=t[1],o=e.range[0]>e.range[1],s=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,l=!s;if(r){var u=o?-1:1;r=r*u}if(i){var c=e.side,f=s&&(c==="top"||c==="left")||l&&(c==="bottom"||c==="right")?1:-1;i=i*f}return e._id.charAt(0)==="x"?function(h){return Tw(n+e._offset+e.l2p(LG(h))+r,a+i)}:function(h){return Tw(a+i,n+e._offset+e.l2p(LG(h))+r)}};function LG(e){return e.periodX!==void 0?e.periodX:e.x}function JTt(e){var t=e.ticklabelposition||"",r=e.tickson||"",i=function(p){return t.indexOf(p)!==-1},n=i("top"),a=i("left"),o=i("right"),s=i("bottom"),l=i("inside"),u=r!=="boundaries"&&(s||a||n||o);if(!u&&!l)return[0,0];var c=e.side,f=u?(e.tickwidth||0)/2:0,h=HD,d=e.tickfont?e.tickfont.size:12;return(s||n)&&(f+=d*i_,h+=(e.linewidth||0)/2),(a||o)&&(f+=(e.linewidth||0)/2,h+=HD),l&&c==="top"&&(h-=d*(1-i_)),(a||n)&&(f=-f),(c==="bottom"||c==="right")&&(h=-h),[u?f:0,l?h:0]}Rr.makeTickPath=function(e,t,r,i){i||(i={});var n=i.minor;if(n&&!e.minor)return"";var a=i.len!==void 0?i.len:n?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return o==="x"?"M0,"+(t+s*r)+"v"+a*r:"M"+(t+s*r)+",0h"+a*r};Rr.makeLabelFns=function(e,t,r){var i=e.ticklabelposition||"",n=e.tickson||"",a=function(k){return i.indexOf(k)!==-1},o=a("top"),s=a("left"),l=a("right"),u=a("bottom"),c=n!=="boundaries"&&(u||s||o||l),f=a("inside"),h=i==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&n!=="boundaries",d=0,p=0,v=h?e.ticklen:0;if(f?v*=-1:c&&(v=0),h&&(d+=v,r)){var m=bn.deg2rad(r);d=v*Math.cos(m)+1,p=v*Math.sin(m)}e.showticklabels&&(h||e.showline)&&(d+=.2*e.tickfont.size),d+=(e.linewidth||1)/2*(f?-1:1);var g={labelStandoff:d,labelShift:p},w,b,_,M,x=0,T=e.side,A=e._id.charAt(0),y=e.tickangle,E;if(A==="x")E=!f&&T==="bottom"||f&&T==="top",M=E?1:-1,f&&(M*=-1),w=p*M,b=t+d*M,_=E?1:-.2,Math.abs(y)===90&&(f?_+=gA:y===-90&&T==="bottom"?_=i_:y===90&&T==="top"?_=gA:_=.5,x=gA/2*(y/90)),g.xFn=function(k){return k.dx+w+x*k.fontSize},g.yFn=function(k){return k.dy+b+k.fontSize*_},g.anchorFn=function(k,D){if(c){if(s)return"end";if(l)return"start"}return!kl(D)||D===0||D===180?"middle":D*M<0!==f?"end":"start"},g.heightFn=function(k,D,F){return D<-60||D>60?-.5*F:e.side==="top"!==f?-F:0};else if(A==="y"){if(E=!f&&T==="left"||f&&T==="right",M=E?1:-1,f&&(M*=-1),w=d,b=p*M,_=0,!f&&Math.abs(y)===90&&(y===-90&&T==="left"||y===90&&T==="right"?_=i_:_=.5),f){var S=kl(y)?+y:0;if(S!==0){var C=bn.deg2rad(S);x=Math.abs(Math.sin(C))*i_*M,_=0}}g.xFn=function(k){return k.dx+t-(w+k.fontSize*_)*M+x*k.fontSize},g.yFn=function(k){return k.dy+b+k.fontSize*gA},g.anchorFn=function(k,D){return kl(D)&&Math.abs(D)===90?"middle":E?"end":"start"},g.heightFn=function(k,D,F){return e.side==="right"&&(D*=-1),D<-30?-F:D<30?-.5*F:0}}return g};function WD(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}Rr.drawTicks=function(e,t,r){r=r||{};var i=t._id+"tick",n=[].concat(t.minor&&t.minor.ticks?r.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(t.ticks?r.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),a=r.layer.selectAll("path."+i).data(n,WD);a.exit().remove(),a.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return yA.stroke(ud.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(o){return v0.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),YD(t,[Jve]),a.attr("transform",r.transFn)};Rr.drawGrid=function(e,t,r){if(r=r||{},t.tickmode!=="sync"){var i=t._id+"grid",n=t.minor&&t.minor.showgrid,a=n?r.vals.filter(function(g){return g.minor}):[],o=t.showgrid?r.vals.filter(function(g){return!g.minor}):[],s=r.counterAxis;if(s&&Rr.shouldShowZeroLine(e,t,s))for(var l=t.tickmode==="array",u=0;u<o.length;u++){var c=o[u].x;if(l?!c:Math.abs(c)<t.dtick/100)if(o=o.slice(0,u).concat(o.slice(u+1)),l)u--;else break}t._gw=v0.crispRound(e,t.gridwidth,1);for(var f=n?v0.crispRound(e,t.minor.gridwidth,1):0,h=r.layer,d=r.minorLayer,p=1;p>=0;p--){var v=p?h:d;if(v){var m=v.selectAll("path."+i).data(p?o:a,WD);m.exit().remove(),m.enter().append("path").classed(i,1).classed("crisp",r.crisp!==!1),m.attr("transform",r.transFn).attr("d",r.path).each(function(g){return yA.stroke(ud.select(this),g.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(g){return v0.dashStyle(g.minor?t.minor.griddash:t.griddash,g.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(g){return(g.minor?f:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&m.attr("d",r.path)}}YD(t,[DG,FG])}};Rr.drawZeroLine=function(e,t,r){r=r||r;var i=t._id+"zl",n=Rr.shouldShowZeroLine(e,t,r.counterAxis),a=r.layer.selectAll("path."+i).data(n?[{x:0,id:t._id}]:[]);a.exit().remove(),a.enter().append("path").classed(i,1).classed("zl",1).classed("crisp",r.crisp!==!1).each(function(){r.layer.selectAll("path").sort(function(o,s){return ETt(o.id,s.id)})}),a.attr("transform",r.transFn).attr("d",r.path).call(yA.stroke,t.zerolinecolor||yA.defaultLine).style("stroke-width",v0.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),YD(t,[CG])};Rr.drawLabels=function(e,t,r){r=r||{};var i=e._fullLayout,n=t._id,a=t.zerolinelayer==="above traces",o=r.cls||n+"tick",s=r.vals.filter(function(I){return I.text}),l=r.labelFns,u=r.secondary?0:t.tickangle,c=(t._prevTickAngles||{})[o],f=r.layer.selectAll("g."+o).data(t.showticklabels?s:[],WD),h=[];f.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(I){var B=ud.select(this),O=e._promises.length;B.call(t_.positionText,l.xFn(I),l.yFn(I)).call(v0.font,{family:I.font,size:I.fontSize,color:I.fontColor,weight:I.fontWeight,style:I.fontStyle,variant:I.fontVariant,textcase:I.fontTextcase,lineposition:I.fontLineposition,shadow:I.fontShadow}).text(I.text).call(t_.convertToTspans,e),e._promises[O]?h.push(e._promises.pop().then(function(){d(B,u)})):d(B,u)}),YD(t,[Vve]),f.exit().remove(),r.repositionOnUpdate&&f.each(function(I){ud.select(this).select("text").call(t_.positionText,l.xFn(I),l.yFn(I))});function d(I,B){I.each(function(O){var $=ud.select(this),Y=$.select(".text-math-group"),K=l.anchorFn(O,B),j=r.transFn.call($.node(),O)+(kl(B)&&+B!=0?" rotate("+B+","+l.xFn(O)+","+(l.yFn(O)-O.fontSize/2)+")":""),q=t_.lineCount($),J=_A*O.fontSize,U=l.heightFn(O,kl(B)?+B:0,(q-1)*J);if(U&&(j+=Tw(0,U)),Y.empty()){var V=$.select("text");V.attr({transform:j,"text-anchor":K}),V.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var X=v0.bBox(Y.node()).width,H=X*{end:-.5,start:.5}[K];Y.attr("transform",j+Tw(H,0))}})}t._adjustTickLabelsOverflow=function(){var I=t.ticklabeloverflow;if(!(!I||I==="allow")){var B=I.indexOf("hide")!==-1,O=t._id.charAt(0)==="x",$=0,Y=O?e._fullLayout.width:e._fullLayout.height;if(I.indexOf("domain")!==-1){var K=bn.simpleMap(t.range,t.r2l);$=t.l2p(K[0])+t._offset,Y=t.l2p(K[1])+t._offset}var j=Math.min($,Y),q=Math.max($,Y),J=t.side,U=1/0,V=-1/0;f.each(function(Q){var te=ud.select(this),ce=te.select(".text-math-group");if(ce.empty()){var ge=v0.bBox(te.node()),Ce=0;O?(ge.right>q||ge.left<j)&&(Ce=1):(ge.bottom>q||ge.top+(t.tickangle?0:Q.fontSize/4)<j)&&(Ce=1);var be=te.select("text");Ce?B&&be.style("display","none"):be.node().style.display!=="none"&&(be.style("display",null),J==="bottom"||J==="right"?U=Math.min(U,O?ge.top:ge.left):U=-1/0,J==="top"||J==="left"?V=Math.max(V,O?ge.bottom:ge.right):V=1/0)}});for(var X in i._plots){var H=i._plots[X];if(!(t._id!==H.xaxis._id&&t._id!==H.yaxis._id)){var G=O?H.yaxis:H.xaxis;G&&(G["_visibleLabelMin_"+t._id]=U,G["_visibleLabelMax_"+t._id]=V)}}}},t._hideCounterAxisInsideTickLabels=function(I){var B=t._id.charAt(0)==="x",O=[];for(var $ in i._plots){var Y=i._plots[$];t._id!==Y.xaxis._id&&t._id!==Y.yaxis._id||O.push(B?Y.yaxis:Y.xaxis)}O.forEach(function(K,j){K&&wA(K)&&(I||[CG,FG,DG,Jve,Vve]).forEach(function(q){var J=q.K==="tick"&&q.L==="text"&&t.ticklabelmode==="period",U=i._plots[t._mainSubplot],V;if(q.K===CG.K){var X=a?U.zerolinelayerAbove:U.zerolinelayer;V=X.selectAll("."+t._id+"zl")}else q.K===FG.K?V=U.minorGridlayer.selectAll("."+t._id):q.K===DG.K?V=U.gridlayer.selectAll("."+t._id):V=U[t._id.charAt(0)+"axislayer"];V.each(function(){var H=ud.select(this);q.L&&(H=H.selectAll(q.L)),H.each(function(G){var Q=t.l2p(J?LG(G):G.x)+t._offset,te=ud.select(this);Q<t["_visibleLabelMax_"+K._id]&&Q>t["_visibleLabelMin_"+K._id]?te.style("display","none"):q.K==="tick"&&!j&&te.node().style.display!=="none"&&te.style("display",null)})})})})},d(f,c+1?c:u);function p(){return h.length&&Promise.all(h)}var v=null;function m(){if(d(f,u),s.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){v=t.autotickangles[0];var I=0,B=[],O,$=1;f.each(function(ae){I=Math.max(I,ae.fontSize);var xe=t.l2p(ae.x),re=PG(this),pe=v0.bBox(re.node());$=Math.max($,t_.lineCount(re)),B.push({top:0,bottom:10,height:10,left:xe-pe.width/2,right:xe+pe.width/2+2,width:pe.width+2})});var Y=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,K=s.length,j=Math.abs((s[K-1].x-s[0].x)*t._m)/(K-1),q=Y?j/2:j,J=Y?t.ticklen:I*1.25*$,U=Math.sqrt(Math.pow(q,2)+Math.pow(J,2)),V=q/U,X=t.autotickangles.map(function(ae){return ae*Math.PI/180}),H=X.find(function(ae){return Math.abs(Math.cos(ae))<=V});H===void 0&&(H=X.reduce(function(ae,xe){return Math.abs(Math.cos(ae))<Math.abs(Math.cos(xe))?ae:xe},X[0]));var G=H*(180/Math.PI);if(Y){var Q=2;for(t.ticks&&(Q+=t.tickwidth/2),O=0;O<B.length;O++){var te=s[O].xbnd,ce=B[O];if(te[0]!==null&&ce.left-t.l2p(te[0])<Q||te[1]!==null&&t.l2p(te[1])-ce.right<Q){v=G;break}}}else{var ge=t.ticklabelposition||"",Ce=t.tickson||"",be=function(ae){return ge.indexOf(ae)!==-1},he=be("top"),oe=be("left"),Ee=be("right"),ye=be("bottom"),ue=Ce!=="boundaries"&&(ye||oe||he||Ee),ee=ue?(t.tickwidth||0)+2*HD:0;for(O=0;O<B.length-1;O++)if(bn.bBoxIntersect(B[O],B[O+1],ee)){v=G;break}}v&&d(f,v)}}t._selections&&(t._selections[o]=f);var g=[p];t.automargin&&i._redrawFromAutoMarginCount&&c===90?(v=c,g.push(function(){d(f,c)})):g.push(m),t._tickAngles&&g.push(function(){t._tickAngles[o]=v===null?kl(u)?u:0:v});var w=function(){var I=0,B=0;return f.each(function(O,$){var Y=PG(this),K=Y.select(".text-math-group");if(K.empty()){var j;t._vals[$]&&(j=t._vals[$].bb||v0.bBox(Y.node()),t._vals[$].bb=j),I=Math.max(I,j.width),B=Math.max(B,j.height)}}),{labelsMaxW:I,labelsMaxH:B}},b=t._anchorAxis;if(b&&(b.autorange||b.insiderange)&&wA(t)&&!kTt(i,t._id)&&(i._insideTickLabelsUpdaterange||(i._insideTickLabelsUpdaterange={}),b.autorange&&(i._insideTickLabelsUpdaterange[b._name+".autorange"]=b.autorange,g.push(w)),b.insiderange)){var _=w(),M=t._id.charAt(0)==="y"?_.labelsMaxW:_.labelsMaxH;M+=2*HD,t.ticklabelposition==="inside"&&(M+=t.ticklen||0);var x=t.side==="right"||t.side==="top"?1:-1,T=x===1?1:0,A=x===1?0:1,y=[];y[A]=b.range[A];var E=b.range,S=b.r2p(E[T]),C=b.r2p(E[A]),k=i._insideTickLabelsUpdaterange[b._name+".range"];if(k){var D=b.r2p(k[T]),F=b.r2p(k[A]),P=x*(t._id.charAt(0)==="y"?1:-1);P*S<P*D&&(S=D,y[T]=E[T]=k[T]),P*C>P*F&&(C=F,y[A]=E[A]=k[A])}var R=Math.abs(C-S);R-M>0?(R-=M,M*=1+M/R):M=0,t._id.charAt(0)!=="y"&&(M=-M),y[T]=b.p2r(b.r2p(E[T])+x*M),b.autorange==="min"||b.autorange==="max reversed"?(y[0]=null,b._rangeInitial0=void 0,b._rangeInitial1=void 0):(b.autorange==="max"||b.autorange==="min reversed")&&(y[1]=null,b._rangeInitial0=void 0,b._rangeInitial1=void 0),i._insideTickLabelsUpdaterange[b._name+".range"]=y}var L=bn.syncOrAsync(g);return L&&L.then&&e._promises.push(L),L};function QTt(e,t,r){var i=t._id+"divider",n=r.vals,a=r.layer.selectAll("path."+i).data(n,WD);a.exit().remove(),a.enter().insert("path",":first-child").classed(i,1).classed("crisp",1).call(yA.stroke,t.dividercolor).style("stroke-width",v0.crispRound(e,t.dividerwidth,1)+"px"),a.attr("transform",r.transFn).attr("d",r.path)}Rr.getPxPosition=function(e,t){var r=e._fullLayout._size,i=t._id.charAt(0),n=t.side,a;if(t.anchor!=="free"?a=t._anchorAxis:i==="x"?a={_offset:r.t+(1-(t.position||0))*r.h,_length:0}:i==="y"&&(a={_offset:r.l+(t.position||0)*r.w+t._shift,_length:0}),n==="top"||n==="left")return a._offset;if(n==="bottom"||n==="right")return a._offset+a._length};function Kve(e){var t=e.title.font.size,r=(e.title.text.match(t_.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(i_+r*_A):r?t*(r+1)*_A:t}function e6t(e,t){var r=e._fullLayout,i=t._id,n=i.charAt(0),a=t.title.font.size,o,s=(t.title.text.match(t_.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?o=t._depth+t.title.standoff+a*i_:(t.side==="top"||t.side==="left")&&(o=t._depth+t.title.standoff+a*(gA+s*_A));else{var l=wA(t);if(t.type==="multicategory")o=t._depth;else{var u=1.5*a;l&&(u=.5*a,t.ticks==="outside"&&(u+=t.ticklen)),o=10+u+(t.linewidth?t.linewidth-1:0)}l||(n==="x"?o+=t.side==="top"?a*(t.showticklabels?1:0):a*(t.showticklabels?1.5:.5):o+=t.side==="right"?a*(t.showticklabels?1:.5):a*(t.showticklabels?.5:0))}var c=Rr.getPxPosition(e,t),f,h,d;n==="x"?(h=t._offset+t._length/2,d=t.side==="top"?c-o:c+o):(d=t._offset+t._length/2,h=t.side==="right"?c+o:c-o,f={rotate:"-90",offset:0});var p;if(t.type!=="multicategory"){var v=t._selections[t._id+"tick"];if(p={selection:v,side:t.side},v&&v.node()&&v.node().parentNode){var m=v0.getTranslate(v.node().parentNode);p.offsetLeft=m.x,p.offsetTop=m.y}t.title.hasOwnProperty("standoff")&&(p.pad=0)}return t._titleStandoff=o,yTt.draw(e,i+"title",{propContainer:t,propName:t._name+".title.text",placeholder:r._dfltTitle[n],avoid:p,transform:f,attributes:{x:h,y:d,"text-anchor":"middle"}})}Rr.shouldShowZeroLine=function(e,t,r){var i=bn.simpleMap(t.range,t.r2l);return i[0]*i[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===jD)&&(o1e(t,0)||!t6t(e,t,r,i)||r6t(e,t))};Rr.clipEnds=function(e,t){return t.filter(function(r){return o1e(e,r.x)})};function o1e(e,t){var r=e.l2p(t);return r>1&&r<e._length-1}function t6t(e,t,r,i){var n=r._mainAxis;if(!n)return;var a=e._fullLayout,o=t._id.charAt(0),s=Rr.counterLetter(t._id),l=t._offset+(Math.abs(i[0])<Math.abs(i[1])==(o==="x")?0:t._length);function u(p){if(!p.showline||!p.linewidth)return!1;var v=Math.max((p.linewidth+t.zerolinewidth)/2,1);function m(b){return typeof b=="number"&&Math.abs(b-l)<v}if(m(p._mainLinePosition)||m(p._mainMirrorPosition))return!0;var g=p._linepositions||{};for(var w in g)if(m(g[w][0])||m(g[w][1]))return!0}var c=a._plots[r._mainSubplot];if(!(c.mainplotinfo||c).overlays.length)return u(r,l);for(var f=Rr.list(e,s),h=0;h<f.length;h++){var d=f[h];if(d._mainAxis===n&&u(d,l))return!0}}function r6t(e,t){for(var r=e._fullData,i=t._mainSubplot,n=t._id.charAt(0),a=0;a<r.length;a++){var o=r[a];if(o.visible===!0&&o.xaxis+o.yaxis===i&&(mA.traceIs(o,"bar-like")&&o.orientation==={x:"h",y:"v"}[n]||o.fill&&o.fill.charAt(o.fill.length-1)===n))return!0}return!1}function PG(e){var t=ud.select(e),r=t.select(".text-math-group");return r.empty()?t.select("text"):r}Rr.allowAutoMargin=function(e){for(var t=Rr.list(e,"",!0),r=0;r<t.length;r++){var i=t[r];i.automargin&&(ww.allowAutoMargin(e,qG(i)),i.mirror&&ww.allowAutoMargin(e,s1e(i))),mA.getComponentMethod("rangeslider","isVisible")(i)&&ww.allowAutoMargin(e,l1e(i))}};function qG(e){return e._id+".automargin"}function s1e(e){return qG(e)+".mirror"}function l1e(e){return e._id+".rangeslider"}Rr.swap=function(e,t){for(var r=i6t(e,t),i=0;i<r.length;i++)n6t(e,r[i].x,r[i].y)};function i6t(e,t){var r=[],i,n;for(i=0;i<t.length;i++){var a=[],o=e._fullData[t[i]].xaxis,s=e._fullData[t[i]].yaxis;if(!(!o||!s)){for(n=0;n<r.length;n++)(r[n].x.indexOf(o)!==-1||r[n].y.indexOf(s)!==-1)&&a.push(n);if(!a.length){r.push({x:[o],y:[s]});continue}var l=r[a[0]],u;if(a.length>1)for(n=1;n<a.length;n++)u=r[a[n]],qD(l.x,u.x),qD(l.y,u.y);qD(l.x,[o]),qD(l.y,[s])}}return r}function qD(e,t){for(var r=0;r<t.length;r++)e.indexOf(t[r])===-1&&e.push(t[r])}function n6t(e,t,r){var i=[],n=[],a=e.layout,o,s;for(o=0;o<t.length;o++)i.push(Rr.getFromId(e,t[o]));for(o=0;o<r.length;o++)n.push(Rr.getFromId(e,r[o]));var l=Object.keys(xTt),u=["anchor","domain","overlaying","position","side","tickangle","editType"],c=["linear","log"];for(o=0;o<l.length;o++){var f=l[o],h=i[0][f],d=n[0][f],p=!0,v=!1,m=!1;if(!(f.charAt(0)==="_"||typeof h=="function"||u.indexOf(f)!==-1)){for(s=1;s<i.length&&p;s++){var g=i[s][f];f==="type"&&c.indexOf(h)!==-1&&c.indexOf(g)!==-1&&h!==g?v=!0:g!==h&&(p=!1)}for(s=1;s<n.length&&p;s++){var w=n[s][f];f==="type"&&c.indexOf(d)!==-1&&c.indexOf(w)!==-1&&d!==w?m=!0:n[s][f]!==d&&(p=!1)}p&&(v&&(a[i[0]._name].type="linear"),m&&(a[n[0]._name].type="linear"),a6t(a,f,i,n,e._fullLayout._dfltTitle))}}for(o=0;o<e._fullLayout.annotations.length;o++){var b=e._fullLayout.annotations[o];t.indexOf(b.xref)!==-1&&r.indexOf(b.yref)!==-1&&bn.swapAttrs(a.annotations[o],["?"])}}function a6t(e,t,r,i,n){var a=bn.nestedProperty,o=a(e[r[0]._name],t).get(),s=a(e[i[0]._name],t).get(),l;for(t==="title"&&(o&&o.text===n.x&&(o.text=n.y),s&&s.text===n.y&&(s.text=n.x)),l=0;l<r.length;l++)a(e,r[l]._name+"."+t).set(s);for(l=0;l<i.length;l++)a(e,i[l]._name+"."+t).set(o)}function OG(e){return e._id==="angularaxis"}function EG(e,t){for(var r=t._rangebreaks.length,i=0;i<r;i++){var n=t._rangebreaks[i];if(e>=n.min&&e<n.max)return n.max}return e}function wA(e){return(e.ticklabelposition||"").indexOf("inside")!==-1}function YD(e,t){wA(e._anchorAxis||{})&&e._hideCounterAxisInsideTickLabels&&e._hideCounterAxisInsideTickLabels(t)}function IG(e,t,r,i){var n=e.anchor!=="free"&&(e.overlaying===void 0||e.overlaying===!1)?e._id:e.overlaying,a;i?a=e.side==="right"?t:-t:a=t,n in r||(r[n]={}),e.side in r[n]||(r[n][e.side]=0),r[n][e.side]+=a}function o6t(e,t){return e.autoshift?t[e.overlaying][e.side]:e.shift||0}function s6t(e,t){return/%f/.test(t)?e>=ATt:/%L/.test(t)?e>=TTt:/%[SX]/.test(t)?e>=GD:/%M/.test(t)?e>=xA:/%[HI]/.test(t)?e>=a1:/%p/.test(t)?e>=Dy:/%[Aadejuwx]/.test(t)?e>=_f:/%[UVW]/.test(t)?e>=g0:/%[Bbm]/.test(t)?e>=VD:/%[q]/.test(t)?e>=UD:/%[Yy]/.test(t)?e>=ND:!0}});var NG=W((d9r,c1e)=>{"use strict";c1e.exports=function(t,r,i){var n,a;if(i){var o=r==="reversed"||r==="min reversed"||r==="max reversed";n=i[o?1:0],a=i[o?0:1]}var s=t("autorangeoptions.minallowed",a===null?n:void 0),l=t("autorangeoptions.maxallowed",n===null?a:void 0);s===void 0&&t("autorangeoptions.clipmin"),l===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}});var UG=W((p9r,f1e)=>{"use strict";var l6t=NG();f1e.exports=function(t,r,i,n){var a=r._template||{},o=r.type||a.type||"-";i("minallowed"),i("maxallowed");var s=i("range");if(!s){var l;!n.noInsiderange&&o!=="log"&&(l=i("insiderange"),l&&(l[0]===null||l[1]===null)&&(r.insiderange=!1,l=void 0),l&&(s=i("range",l)))}var u=r.getAutorangeDflt(s,n),c=i("autorange",u),f;s&&(s[0]===null&&s[1]===null||(s[0]===null||s[1]===null)&&(c==="reversed"||c===!0)||s[0]!==null&&(c==="min"||c==="max reversed")||s[1]!==null&&(c==="max"||c==="min reversed"))&&(s=void 0,delete r.range,r.autorange=!0,f=!0),f||(u=r.getAutorangeDflt(s,n),c=i("autorange",u)),c&&(l6t(i,c,s),(o==="linear"||o==="-")&&i("rangemode")),r.cleanRange()}});var d1e=W((v9r,h1e)=>{var u6t={left:0,top:0};h1e.exports=c6t;function c6t(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var i=e.clientX||0,n=e.clientY||0,a=f6t(t);return r[0]=i-a.left,r[1]=n-a.top,r}function f6t(e){return e===window||e===document||e===document.body?u6t:e.getBoundingClientRect()}});var XD=W((g9r,p1e)=>{"use strict";var h6t=wV();function d6t(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(r){e=!1}return e}p1e.exports=h6t&&d6t()});var g1e=W((m9r,v1e)=>{"use strict";v1e.exports=function(t,r,i,n,a){var o=(t-i)/(n-i),s=o+r/(n-i),l=(o+s)/2;return a==="left"||a==="bottom"?o:a==="center"||a==="middle"?l:a==="right"||a==="top"?s:o<2/3-l?o:s>4/3-l?s:l}});var x1e=W((y9r,y1e)=>{"use strict";var m1e=it(),p6t=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];y1e.exports=function(t,r,i,n){return i==="left"?t=0:i==="center"?t=1:i==="right"?t=2:t=m1e.constrain(Math.floor(t*3),0,2),n==="bottom"?r=0:n==="middle"?r=1:n==="top"?r=2:r=m1e.constrain(Math.floor(r*3),0,2),p6t[r][t]}});var b1e=W((x9r,_1e)=>{"use strict";var v6t=lw(),g6t=QC(),m6t=K6().getGraphDiv,y6t=P6(),VG=_1e.exports={};VG.wrapped=function(e,t,r){var a;e=m6t(e),e._fullLayout&&g6t.clear(e._fullLayout._uid+y6t.HOVERID);let i=e._hoverdata;VG.raw(e,t,r)&&e._hoverAnywhereActive&&(e._hoverAnywhereActive=!1,(a=e._fullLayout)!=null&&a.hoveranywhere&&(t!=null&&t.target)&&!i&&e.emit("plotly_unhover",{event:t,points:[]}))};VG.raw=function(t,r){var i=t._fullLayout,n=t._hoverdata;return r||(r={}),r.target&&!t._dragged&&v6t.triggerHandler(t,"plotly_beforehover",r)===!1?!1:(i._hoverlayer.selectAll("g").remove(),i._hoverlayer.selectAll("line").remove(),i._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,r.target&&n&&t.emit("plotly_unhover",{event:r,points:n}),!0)}});var bf=W((_9r,M1e)=>{"use strict";var x6t=d1e(),GG=AV(),_6t=XD(),b6t=it().removeElement,w6t=Gl(),n_=M1e.exports={};n_.align=g1e();n_.getCursor=x1e();var T1e=b1e();n_.unhover=T1e.wrapped;n_.unhoverRaw=T1e.raw;n_.init=function(t){var r=t.gd,i=1,n=r._context.doubleClickDelay,a=t.element,o,s,l,u,c,f,h,d;r._mouseDownTime||(r._mouseDownTime=0),a.style.pointerEvents="all",a.onmousedown=m,_6t?(a._ontouchstart&&a.removeEventListener("touchstart",a._ontouchstart),a._ontouchstart=m,a.addEventListener("touchstart",m,{passive:!1})):a.ontouchstart=m;function p(b,_,M){return Math.abs(b)<M&&(b=0),Math.abs(_)<M&&(_=0),[b,_]}var v=t.clampFn||p;function m(b){r._dragged=!1,r._dragging=!0;var _=w1e(b);o=_[0],s=_[1],h=b.target,f=b,d=b.buttons===2||b.ctrlKey,typeof b.clientX=="undefined"&&typeof b.clientY=="undefined"&&(b.clientX=o,b.clientY=s),l=new Date().getTime(),l-r._mouseDownTime<n?i+=1:(i=1,r._mouseDownTime=l),t.prepFn&&t.prepFn(b,o,s),GG&&!d?(c=A1e(),c.style.cursor=window.getComputedStyle(a).cursor):GG||(c=document,u=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(a).cursor),document.addEventListener("mouseup",w),document.addEventListener("touchend",w),t.dragmode!==!1&&(b.preventDefault(),document.addEventListener("mousemove",g),document.addEventListener("touchmove",g,{passive:!1}))}function g(b){b.preventDefault();var _=w1e(b),M=t.minDrag||w6t.MINDRAG,x=v(_[0]-o,_[1]-s,M),T=x[0],A=x[1];(T||A)&&(r._dragged=!0,n_.unhover(r,b)),r._dragged&&t.moveFn&&!d&&(r._dragdata={element:a,dx:T,dy:A},t.moveFn(T,A))}function w(b){if(delete r._dragdata,t.dragmode!==!1&&(b.preventDefault(),document.removeEventListener("mousemove",g),document.removeEventListener("touchmove",g)),document.removeEventListener("mouseup",w),document.removeEventListener("touchend",w),GG?b6t(c):u&&(c.documentElement.style.cursor=u,u=null),!r._dragging){r._dragged=!1;return}if(r._dragging=!1,new Date().getTime()-r._mouseDownTime>n&&(i=Math.max(i-1,1)),r._dragged)t.doneFn&&t.doneFn();else{var _;f.target===h?_=f:(_={target:h,srcElement:h,toElement:h},Object.keys(f).concat(Object.keys(f.__proto__)).forEach(M=>{var x=f[M];!_[M]&&typeof x!="function"&&(_[M]=x)})),t.clickFn&&t.clickFn(i,_),d||h.dispatchEvent(new MouseEvent("click",b))}r._dragging=!1,r._dragged=!1}};function A1e(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}n_.coverSlip=A1e;function w1e(e){return x6t(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Np=W((b9r,S1e)=>{"use strict";S1e.exports=function(t,r){(t.attr("class")||"").split(" ").forEach(function(i){i.indexOf("cursor-")===0&&t.classed(i,!1)}),r&&t.classed("cursor-"+r,!0)}});var C1e=W((w9r,k1e)=>{"use strict";var HG=Np(),TA="data-savedcursor",E1e="!!";k1e.exports=function(t,r){var i=t.attr(TA);if(r){if(!i){for(var n=(t.attr("class")||"").split(" "),a=0;a<n.length;a++){var o=n[a];o.indexOf("cursor-")===0&&t.attr(TA,o.slice(7)).classed(o,!1)}t.attr(TA)||t.attr(TA,E1e)}HG(t,r)}else i&&(t.attr(TA,null),i===E1e?HG(t):HG(t,i))}});var $G=W((T9r,D1e)=>{"use strict";var jG=Ho(),T6t=Vl();D1e.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:T6t.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:jG({editType:"legend"}),grouptitlefont:jG({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"},groupdoubleclick:{valType:"enumerated",values:["toggleitem","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:jG({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var MA=W(AA=>{"use strict";AA.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};AA.isVertical=function(t){return t.orientation!=="h"};AA.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1};AA.getId=function(t){return t._id||"legend"}});var YG=W((M9r,F1e)=>{"use strict";var ZD=yi(),m0=it(),A6t=Da(),M6t=Wa(),S6t=$G(),E6t=ew(),WG=MA();function k6t(e,t,r,i,n){var a=t[e]||{},o=A6t.newContainer(r,e);function s(B,O){return m0.coerce(a,o,S6t,B,O)}var l=m0.coerceFont(s,"font",r.font);s("bgcolor",r.paper_bgcolor),s("bordercolor");var u=s("visible");if(!u)return;var c,f=function(B,O){var $=c._input,Y=c;return m0.coerce($,Y,M6t,B,O)},h=r.font||{},d=m0.coerceFont(s,"grouptitlefont",h,{overrideDflt:{size:Math.round(h.size*1.1)}}),p=0,v=!1,m="normal",g=(r.shapes||[]).filter(function(B){return B.showlegend});function w(B){return ZD.traceIs(B,"pie-like")&&B._length!=null&&(Array.isArray(B.legend)||Array.isArray(B.showlegend))}i.filter(w).forEach(function(B){B.visible&&p++;for(var O=0;O<B._length;O++){var $=(Array.isArray(B.legend)?B.legend[O]:B.legend)||"legend";$===e&&((Array.isArray(B.showlegend)?B.showlegend[O]:B.showlegend)||B._dfltShowLegend)&&(v=!0,p++)}if(e==="legend"&&B._length>B.legend.length)for(var Y=B.legend.length;Y<B._length;Y++)v=!0,p++});for(var b=i.concat(g).filter(function(B){return!w(c)&&e===(B.legend||"legend")}),_=0;_<b.length;_++)if(c=b[_],!!c.visible){var M=c._isShape;(c.showlegend||c._dfltShowLegend&&!(c._module&&c._module.attributes&&c._module.attributes.showlegend&&c._module.attributes.showlegend.dflt===!1))&&(p++,c.showlegend&&(v=!0,(!M&&ZD.traceIs(c,"pie-like")||c._input.showlegend===!0)&&p++),m0.coerceFont(f,"legendgrouptitle.font",d)),(!M&&ZD.traceIs(c,"bar")&&r.barmode==="stack"||["tonextx","tonexty"].indexOf(c.fill)!==-1)&&(m=WG.isGrouped({traceorder:m})?"grouped+reversed":"reversed"),c.legendgroup!==void 0&&c.legendgroup!==""&&(m=WG.isReversed({traceorder:m})?"reversed+grouped":"grouped")}var x=m0.coerce(t,r,E6t,"showlegend",r.showlegend||v&&p>(e==="legend"?1:0));if(x===!1&&(r[e]=void 0),x===!1&&!a.uirevision||(s("uirevision",r.uirevision),x===!1))return;s("borderwidth");var T=s("orientation"),A=s("yref"),y=s("xref"),E=T==="h",S=A==="paper",C=y==="paper",k,D,F,P="left";E?(k=0,ZD.getComponentMethod("rangeslider","isVisible")(t.xaxis)?S?(D=1.1,F="bottom"):(D=1,F="top"):S?(D=-.1,F="top"):(D=0,F="bottom")):(D=1,F="auto",C?k=1.02:(k=1,P="right")),m0.coerce(a,o,{x:{valType:"number",editType:"legend",min:C?-2:0,max:C?3:1,dflt:k}},"x"),m0.coerce(a,o,{y:{valType:"number",editType:"legend",min:S?-2:0,max:S?3:1,dflt:D}},"y"),s("traceorder",m),WG.isGrouped(r[e])&&s("tracegroupgap"),s("entrywidth"),s("entrywidthmode"),s("indentation"),s("itemsizing"),s("itemwidth"),s("itemclick"),s("itemdoubleclick");let R=s("groupclick");s("groupdoubleclick",R),s("xanchor",P),s("yanchor",F),s("maxheight"),s("valign"),m0.noneOrAll(a,o,["x","y"]);var L=s("title.text");if(L){s("title.side",E?"left":"top");var I=m0.extendFlat({},l,{size:m0.bigFont(l.size)});m0.coerceFont(s,"title.font",I);let B=n>1;s("titleclick",B?"toggle":!1),s("titledoubleclick",B?"toggleothers":!1)}}F1e.exports=function(t,r,i){var n,a=i.slice(),o=r.shapes;if(o)for(n=0;n<o.length;n++){var s=o[n];if(s.showlegend){var l={_input:s._input,visible:s.visible,showlegend:s.showlegend,legend:s.legend};a.push(l)}}var u=["legend"];for(n=0;n<a.length;n++)Array.isArray(a[n].legend)?u=u.concat(a[n].legend):m0.pushUnique(u,a[n].legend);for(r._legends=[],n=0;n<u.length;n++){var c=u[n];k6t(c,t,r,a,u.length),r[c]&&(r[c]._id=c),r._legends.push(c)}}});var KG=W(ZG=>{"use strict";var Fy=yi(),XG=it(),C6t=XG.pushUnique,D6t=MA(),L1e=!0;ZG.handleItemClick=function(t,r,i,n,a){var o=r._fullLayout;if(r._dragged||r._editing)return;var s=t.data()[0][0];if(s.groupTitle&&s.noClick)return;let l=a===2?i.groupdoubleclick:i.groupclick;n==="toggle"&&i.itemdoubleclick==="toggleothers"&&L1e&&r.data&&r._context.showTips&&(XG.notifier(XG._(r,"Double-click on legend to isolate one trace"),"long",r),L1e=!1);var u=l==="togglegroup",c=o.hiddenlabels?o.hiddenlabels.slice():[],f=r._fullData;let h=(o.shapes||[]).filter(be=>be.showlegend||be.legendgroup);var d=f.concat(h),p=s.trace;p._isShape&&(p=o.shapes[p.index]);var v=p.legendgroup,m,g,w,b,_,M,x={},T=[],A=[],y=[];function E(be,he){var oe=T.indexOf(be),Ee=x.visible;return Ee||(Ee=x.visible=[]),T.indexOf(be)===-1&&(T.push(be),oe=T.length-1),Ee[oe]=he,oe}var S=(o.shapes||[]).map(function(be){return be._input}),C=!1;function k(be,he){S[be].visible=he,C=!0}function D(be,he){if(!(s.groupTitle&&!u)){var oe=be._isShape,Ee=be.index;Ee===void 0&&(Ee=be._index);var ye=be.visible===!1?!1:he;oe?k(Ee,ye):E(Ee,ye)}}var F=p.legend;if(!p._isShape&&Fy.traceIs(p,"pie-like")){var P=s.label,R=c.indexOf(P);if(n==="toggle")R===-1?c.push(P):c.splice(R,1);else if(n==="toggleothers"){var L=R!==-1,I=[];for(m=0;m<r.calcdata.length;m++){var B=r.calcdata[m];for(g=0;g<B.length;g++){var O=B[g],$=O.label;F===B[0].trace.legend&&P!==$&&(c.indexOf($)===-1&&(L=!0),C6t(c,$),I.push($))}}if(!L)for(var Y=0;Y<I.length;Y++){var K=c.indexOf(I[Y]);K!==-1&&c.splice(K,1)}}Fy.call("_guiRelayout",r,"hiddenlabels",c)}else{var j=v&&v.length,q=[],J;if(j)for(m=0;m<d.length;m++)J=d[m],J.visible&&J.legendgroup===v&&q.push(m);if(n==="toggle"){var U;switch(p.visible){case!0:U="legendonly";break;case!1:U=!1;break;case"legendonly":U=!0;break}if(j)if(u)for(m=0;m<d.length;m++){var V=d[m];V.visible!==!1&&V.legendgroup===v&&D(V,U)}else D(p,U);else D(p,U)}else if(n==="toggleothers"){var X,H,G,Q,te,ce=!0;let be=j&&u;for(m=0;m<d.length;m++)if(te=d[m],X=te===p,G=te.showlegend!==!0,!(X||G)&&(H=be&&te.legendgroup===v,!H&&te.legend===F&&te.visible===!0&&!Fy.traceIs(te,"notLegendIsolatable"))){ce=!1;break}for(m=0;m<d.length;m++)if(te=d[m],!(te.visible===!1||te.legend!==F)&&!Fy.traceIs(te,"notLegendIsolatable"))switch(p.visible){case"legendonly":D(te,!0);break;case!0:Q=ce?!0:"legendonly",X=te===p,G=te.showlegend!==!0&&!te.legendgroup,H=X||be&&te.legendgroup===v,D(te,H||G?!0:Q);break}}for(m=0;m<A.length;m++)if(w=A[m],!!w){var ge=w.constructUpdate(),Ce=Object.keys(ge);for(g=0;g<Ce.length;g++)b=Ce[g],M=x[b]=x[b]||[],M[y[m]]=ge[b]}for(_=Object.keys(x),m=0;m<_.length;m++)for(b=_[m],g=0;g<T.length;g++)x[b].hasOwnProperty(g)||(x[b][g]=void 0);C?Fy.call("_guiUpdate",r,x,{shapes:S},T):Fy.call("_guiRestyle",r,x,T)}};ZG.handleTitleClick=function(t,r,i){let n=t._fullLayout,a=t._fullData,o=D6t.getId(r),s=(n.shapes||[]).filter(g=>g.showlegend||g.legendgroup),l=a.concat(s);function u(g){return(g.legend||"legend")===o}var c,f;if(i==="toggle")c=!l.some(function(w){return u(w)&&w.visible===!0}),f=!1;else{let g=l.some(function(w){return!u(w)&&w.visible===!0&&w.showlegend!==!1});c=!0,f=!g}let h={visible:[]},d=[],p=(n.shapes||[]).map(function(g){return g._input});for(var v=!1,m=0;m<l.length;m++){let g=l[m],w=u(g);if(!w){let M=g.showlegend!==!0&&!g.legendgroup;if(i==="toggle"||M)continue}let _=(w?c:f)?!0:"legendonly";g.visible!==!1&&g.visible!==_&&(g._isShape?(p[g._index].visible=_,v=!0):(d.push(g.index),h.visible.push(_)))}v?Fy.call("_guiUpdate",t,h,{shapes:p},d):d.length&&Fy.call("_guiRestyle",t,h,d)}});var JG=W((E9r,P1e)=>{"use strict";P1e.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var z1e=W((k9r,R1e)=>{"use strict";var{isArrayOrTypedArray:QG}=yc(),I1e=yi(),eH=MA();R1e.exports=function(t,r,i){var n=r._inHover,a=eH.isGrouped(r),o=eH.isReversed(r),s={},l=[],u=!1,c={},f=0,h=0,d,p;function v(B,O,$){if(r.visible!==!1&&!(i&&B!==r._id))if(O===""||!eH.isGrouped(r)){var Y="~~i"+f;l.push(Y),s[Y]=[$],f++}else l.indexOf(O)===-1?(l.push(O),u=!0,s[O]=[$]):s[O].push($)}for(d=0;d<t.length;d++){var m=t[d],g=m[0],w=g.trace,b=w.legend,_=w.legendgroup;if(!(!n&&(!w.visible||!w.showlegend)))if(I1e.traceIs(w,"pie-like")){var M=Array.isArray(w.legend),x=Array.isArray(w.showlegend);for(c[_]||(c[_]={}),p=0;p<m.length;p++)if(!(x&&w.showlegend[m[p].i]===!1)){M&&(b=w.legend[m[p].i]||"legend");var T=m[p].label;c[_][T]||(v(b,_,{label:T,color:m[p].color,i:m[p].i,trace:w,pts:m[p].pts}),c[_][T]=!0,h=Math.max(h,(T||"").length))}}else v(b,_,g),h=Math.max(h,(w.name||"").length)}if(!l.length)return[];var A=!u||!a,y=[];for(d=0;d<l.length;d++){var E=s[l[d]];A?y.push(E[0]):y.push(E)}for(A&&(y=[y]),d=0;d<y.length;d++){var S=1/0;for(p=0;p<y[d].length;p++){var C=y[d][p].trace.legendrank,k=QG(C)?Math.min(C):C;S>k&&(S=k)}y[d][0]._groupMinRank=S,y[d][0]._preGroupSort=d}var D=function(B,O){return B[0]._groupMinRank-O[0]._groupMinRank||B[0]._preGroupSort-O[0]._preGroupSort},F=function(B,O){var $=QG(B.trace.legendrank)?B.trace.legendrank[B.i]:B.trace.legendrank,Y=QG(O.trace.legendrank)?O.trace.legendrank[O.i]:O.trace.legendrank;return $-Y||B._preSort-O._preSort};for(y.forEach(function(B,O){B[0]._preGroupSort=O}),y.sort(D),d=0;d<y.length;d++){y[d].forEach(function(B,O){B._preSort=O}),y[d].sort(F);var P=y[d][0].trace,R=null;for(p=0;p<y[d].length;p++){var L=y[d][p].trace.legendgrouptitle;if(L&&L.text){R=L,n&&(L.font=r._groupTitleFont);break}}if(o&&y[d].reverse(),R){var I=!1;for(p=0;p<y[d].length;p++)if(I1e.traceIs(y[d][p].trace,"pie-like")){I=!0;break}y[d].unshift({i:-1,groupTitle:R,noClick:I,trace:{showlegend:P.showlegend,legendgroup:P.legendgroup,legend:P.legend,visible:r.groupclick==="toggleitem"?!0:P.visible}})}for(p=0;p<y[d].length;p++)y[d][p]=[y[d][p]]}return r._lgroupsLength=y.length,r._maxNameLength=h,y}});var Ly=W(a_=>{"use strict";var KD=it();function B1e(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}a_.formatPiePercent=function(t,r){var i=B1e((t*100).toPrecision(3));return KD.numSeparate(i,r)+"%"};a_.formatPieValue=function(t,r){var i=B1e(t.toPrecision(10));return KD.numSeparate(i,r)};a_.getFirstFilled=function(t,r){if(KD.isArrayOrTypedArray(t))for(var i=0;i<r.length;i++){var n=t[r[i]];if(n||n===0||n==="")return n}};a_.castOption=function(t,r){if(KD.isArrayOrTypedArray(t))return a_.getFirstFilled(t,r);if(t)return t};a_.getRotationAngle=function(e){return(e==="auto"?0:e)*Math.PI/180}});var O1e=W((D9r,q1e)=>{"use strict";var F6t=Ji(),L6t=ni();q1e.exports=function(t,r,i,n){var a=i.marker.pattern;a&&a.shape?F6t.pointStyle(t,i,n,r):L6t.fill(t,r.color)}});var Sw=W((F9r,V1e)=>{"use strict";var N1e=ni(),U1e=Ly().castOption,P6t=O1e();V1e.exports=function(t,r,i,n){var a=i.marker.line,o=U1e(a.color,r.pts)||N1e.defaultLine,s=U1e(a.width,r.pts)||0;t.call(P6t,r,i,n).style("stroke-width",s).call(N1e.stroke,o)}});var nH=W((L9r,Y1e)=>{"use strict";var wf=vi(),tH=yi(),Kc=it(),G1e=Kc.strTranslate,y0=Ji(),cd=ni(),rH=bc().extractOpts,JD=$o(),I6t=Sw(),R6t=Ly().castOption,z6t=JG(),H1e=12,j1e=5,o_=2,B6t=10,Ew=5;Y1e.exports=function(t,r,i){var n=r._fullLayout;i||(i=n.legend);var a=i.itemsizing==="constant",o=i.itemwidth,s=(o+z6t.itemGap*2)/2,l=G1e(s,0),u=function(T,A,y,E){var S;if(T+1)S=T;else if(A&&A.width>0)S=A.width;else return 0;return a?E:Math.min(S,y)};t.each(function(T){var A=wf.select(this),y=Kc.ensureSingle(A,"g","layers");y.style("opacity",T[0].trace.opacity);var E=i.indentation,S=i.valign,C=T[0].lineHeight,k=T[0].height;if(S==="middle"&&E===0||!C||!k)y.attr("transform",null);else{var D={top:1,bottom:-1}[S],F=D*(.5*(C-k+3))||0,P=i.indentation;y.attr("transform",G1e(P,F))}var R=y.selectAll("g.legendfill").data([T]);R.enter().append("g").classed("legendfill",!0);var L=y.selectAll("g.legendlines").data([T]);L.enter().append("g").classed("legendlines",!0);var I=y.selectAll("g.legendsymbols").data([T]);I.enter().append("g").classed("legendsymbols",!0),I.selectAll("g.legendpoints").data([T]).enter().append("g").classed("legendpoints",!0)}).each(x).each(h).each(p).each(d).each(m).each(_).each(b).each(c).each(f).each(g).each(w);function c(T){var A=$1e(T),y=A.showFill,E=A.showLine,S=A.showGradientLine,C=A.showGradientFill,k=A.anyFill,D=A.anyLine,F=T[0],P=F.trace,R,L,I=rH(P),B=I.colorscale,O=I.reversescale,$=function(V){if(V.size())if(y)y0.fillGroupStyle(V,r,!0);else{var X="legendfill-"+P.uid;y0.gradient(V,r,X,iH(O),B,"fill")}},Y=function(V){if(V.size()){var X="legendline-"+P.uid;y0.lineGroupStyle(V),y0.gradient(V,r,X,iH(O),B,"stroke")}},K=JD.hasMarkers(P)||!k?"M5,0":D?"M5,-2":"M5,-3",j=wf.select(this),q=j.select(".legendfill").selectAll("path").data(y||C?[T]:[]);if(q.enter().append("path").classed("js-fill",!0),q.exit().remove(),q.attr("d",K+"h"+o+"v6h-"+o+"z").call($),E||S){var J=u(void 0,P.line,B6t,j1e);L=Kc.minExtend(P,{line:{width:J}}),R=[Kc.minExtend(F,{trace:L})]}var U=j.select(".legendlines").selectAll("path").data(E||S?[R]:[]);U.enter().append("path").classed("js-line",!0),U.exit().remove(),U.attr("d",K+(S?"l"+o+",0.0001":"h"+o)).call(E?y0.lineGroupStyle:Y)}function f(T){var A=$1e(T),y=A.anyFill,E=A.anyLine,S=A.showLine,C=A.showMarker,k=T[0],D=k.trace,F=!C&&!E&&!y&&JD.hasText(D),P,R;function L(J,U,V,X){var H=Kc.nestedProperty(D,J).get(),G=Kc.isArrayOrTypedArray(H)&&U?U(H):H;if(a&&G&&X!==void 0&&(G=X),V){if(G<V[0])return V[0];if(G>V[1])return V[1]}return G}function I(J){return k._distinct&&k.index&&J[k.index]?J[k.index]:J[0]}if(C||F||S){var B={},O={};if(C){B.mc=L("marker.color",I);var $=D.type==="scattermap";B.mx=$?"circle":L("marker.symbol",I),B.mo=L("marker.opacity",Kc.mean,[.2,1]),B.mlc=L("marker.line.color",I),B.mlw=L("marker.line.width",Kc.mean,[0,5],o_),B.mld=L("marker.line.dash",I),O.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Y=L("marker.size",Kc.mean,[2,16],H1e);B.ms=Y,O.marker.size=Y}S&&(O.line={width:L("line.width",I,[0,10],j1e)}),F&&(B.tx="Aa",B.tp=L("textposition",I),B.ts=10,B.tc=L("textfont.color",I),B.tf=L("textfont.family",I),B.tw=L("textfont.weight",I),B.ty=L("textfont.style",I),B.tv=L("textfont.variant",I),B.tC=L("textfont.textcase",I),B.tE=L("textfont.lineposition",I),B.tS=L("textfont.shadow",I)),P=[Kc.minExtend(k,B)],R=Kc.minExtend(D,O),R.selectedpoints=null,R.texttemplate=null}var K=wf.select(this).select("g.legendpoints"),j=K.selectAll("path.scatterpts").data(C?P:[]);j.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",l),j.exit().remove(),j.call(y0.pointStyle,R,r),C&&(P[0].mrc=3);var q=K.selectAll("g.pointtext").data(F?P:[]);q.enter().append("g").classed("pointtext",!0).append("text").attr("transform",l),q.exit().remove(),q.selectAll("text").call(y0.textPointStyle,R,r)}function h(T){var A=T[0].trace,y=A.type==="waterfall";if(T[0]._distinct&&y){var E=T[0].trace[T[0].dir].marker;return T[0].mc=E.color,T[0].mlw=E.line.width,T[0].mlc=E.line.color,v(T,this,"waterfall")}var S=[];A.visible&&y&&(S=T[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 C=wf.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(S);C.enter().append("path").classed("legendwaterfall",!0).attr("transform",l).style("stroke-miterlimit",1),C.exit().remove(),C.each(function(k){var D=wf.select(this),F=A[k[0]].marker,P=u(void 0,F.line,Ew,o_);D.attr("d",k[1]).style("stroke-width",P+"px").call(cd.fill,F.color),P&&D.call(cd.stroke,F.line.color)})}function d(T){v(T,this)}function p(T){v(T,this,"funnel")}function v(T,A,y){var E=T[0].trace,S=E.marker||{},C=S.line||{},k=S.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",D=y?E.visible&&E.type===y:tH.traceIs(E,"bar"),F=wf.select(A).select("g.legendpoints").selectAll("path.legend"+y).data(D?[T]:[]);F.enter().append("path").classed("legend"+y,!0).attr("d",k).attr("transform",l),F.exit().remove(),F.each(function(P){var R=wf.select(this),L=P[0],I=u(L.mlw,S.line,Ew,o_);R.style("stroke-width",I+"px");var B=L.mcc;if(!i._inHover&&"mc"in L){var O=rH(S),$=O.mid;$===void 0&&($=(O.max+O.min)/2),B=y0.tryColorscale(S,"")($)}var Y=B||L.mc||S.color,K=S.pattern,j=y0.getPatternAttr,q=K&&(j(K.shape,0,"")||j(K.path,0,""));if(q){var J=j(K.bgcolor,0,null),U=j(K.fgcolor,0,null),V=K.fgopacity,X=W1e(K.size,8,10),H=W1e(K.solidity,.5,1),G="legend-"+E.uid;R.call(y0.pattern,"legend",r,G,q,X,H,B,K.fillmode,J,U,V)}else R.call(cd.fill,Y);I&&cd.stroke(R,L.mlc||C.color)})}function m(T){var A=T[0].trace,y=wf.select(this).select("g.legendpoints").selectAll("path.legendbox").data(A.visible&&tH.traceIs(A,"box-violin")?[T]:[]);y.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),y.exit().remove(),y.each(function(){var E=wf.select(this);if((A.boxpoints==="all"||A.points==="all")&&cd.opacity(A.fillcolor)===0&&cd.opacity((A.line||{}).color)===0){var S=Kc.minExtend(A,{marker:{size:a?H1e:Kc.constrain(A.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});y.call(y0.pointStyle,S,r)}else{var C=u(void 0,A.line,Ew,o_);E.style("stroke-width",C+"px").call(cd.fill,A.fillcolor),C&&cd.stroke(E,A.line.color)}})}function g(T){var A=T[0].trace,y=wf.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(A.visible&&A.type==="candlestick"?[T,T]:[]);y.enter().append("path").classed("legendcandle",!0).attr("d",function(E,S){return S?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",l).style("stroke-miterlimit",1),y.exit().remove(),y.each(function(E,S){var C=wf.select(this),k=A[S?"increasing":"decreasing"],D=u(void 0,k.line,Ew,o_);C.style("stroke-width",D+"px").call(cd.fill,k.fillcolor),D&&cd.stroke(C,k.line.color)})}function w(T){var A=T[0].trace,y=wf.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(A.visible&&A.type==="ohlc"?[T,T]:[]);y.enter().append("path").classed("legendohlc",!0).attr("d",function(E,S){return S?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",l).style("stroke-miterlimit",1),y.exit().remove(),y.each(function(E,S){var C=wf.select(this),k=A[S?"increasing":"decreasing"],D=u(void 0,k.line,Ew,o_);C.style("fill","none").call(y0.dashLine,k.line.dash,D),D&&cd.stroke(C,k.line.color)})}function b(T){M(T,this,"pie")}function _(T){M(T,this,"funnelarea")}function M(T,A,y){var E=T[0],S=E.trace,C=y?S.visible&&S.type===y:tH.traceIs(S,y),k=wf.select(A).select("g.legendpoints").selectAll("path.legend"+y).data(C?[T]:[]);if(k.enter().append("path").classed("legend"+y,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),k.exit().remove(),k.size()){var D=S.marker||{},F=u(R6t(D.line.width,E.pts),D.line,Ew,o_),P="pieLike",R=Kc.minExtend(S,{marker:{line:{width:F}}},P),L=Kc.minExtend(E,{trace:R},P);I6t(k,L,R,r)}}function x(T){var A=T[0].trace,y,E=[];if(A.visible)switch(A.type){case"histogram2d":case"heatmap":E=[["M-15,-2V4H15V-2Z"]],y=!0;break;case"choropleth":case"choroplethmap":E=[["M-6,-6V6H6V-6Z"]],y=!0;break;case"densitymap":E=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],y="radial";break;case"cone":E=[["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"]],y=!1;break;case"streamtube":E=[["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"]],y=!1;break;case"surface":E=[["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"]],y=!0;break;case"mesh3d":E=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],y=!1;break;case"volume":E=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],y=!0;break;case"isosurface":E=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],y=!1;break}var S=wf.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(E);S.enter().append("path").classed("legend3dandfriends",!0).attr("transform",l).style("stroke-miterlimit",1),S.exit().remove(),S.each(function(C,k){var D=wf.select(this),F=rH(A),P=F.colorscale,R=F.reversescale,L=function($){if($.size()){var Y="legendfill-"+A.uid;y0.gradient($,r,Y,iH(R,y==="radial"),P,"fill")}},I;if(P){if(!y){var O=P.length;I=k===0?P[R?O-1:0][1]:k===1?P[R?0:O-1][1]:P[Math.floor((O-1)/2)][1]}}else{var B=A.vertexcolor||A.facecolor||A.color;I=Kc.isArrayOrTypedArray(B)?B[k]||B[0]:B}D.attr("d",C[0]),I?D.call(cd.fill,I):D.call(L)})}};function iH(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function $1e(e){var t=e[0].trace,r=t.contours,i=JD.hasLines(t)||t.visible&&t.type==="quiver",n=JD.hasMarkers(t),a=t.visible&&t.fill&&t.fill!=="none",o=!1,s=!1;if(r){var l=r.coloring;l==="lines"?o=!0:i=l==="none"||l==="heatmap"||r.showlines,r.type==="constraint"?a=r._operation!=="=":(l==="fill"||l==="heatmap")&&(s=!0)}return{showMarker:n,showLine:i,showFill:a,showGradientLine:o,showGradientFill:s,anyLine:i||o,anyFill:a||s}}function W1e(e,t,r){return e&&Kc.isArrayOrTypedArray(e)?t:e>r?r:e}});var lH=W((P9r,ige)=>{"use strict";var Jf=vi(),Cl=it(),oH=Ko(),s_=yi(),t7=lw(),aH=bf(),Dl=Ji(),SA=ni(),l_=uo(),X1e=KG().handleItemClick,Z1e=KG().handleTitleClick,jl=JG(),sH=Hl(),tge=sH.LINE_SPACING,Cw=sH.FROM_TL,K1e=sH.FROM_BR,J1e=z1e(),q6t=nH(),Dw=MA(),kw=1,O6t=/^legend[0-9]*$/;ige.exports=function(t,r){if(r)Q1e(t,r);else{var i=t._fullLayout,n=i._legends,a=i._infolayer.selectAll('[class^="legend"]');a.each(function(){var u=Jf.select(this),c=u.attr("class"),f=c.split(" ")[0];f.match(O6t)&&n.indexOf(f)===-1&&u.remove()});for(var o=0;o<n.length;o++){var s=n[o],l=t._fullLayout[s];Q1e(t,l)}}};function N6t(e,t,r){if(!(t.title.side!=="top center"&&t.title.side!=="top right")){var i=t.title.font,n=i.size*tge,a=0,o=e.node(),s=Dl.bBox(o).width;t.title.side==="top center"?a=.5*(t._width-2*r-2*jl.titlePad-s):t.title.side==="top right"&&(a=t._width-2*r-2*jl.titlePad-s),l_.positionText(e,r+jl.titlePad+a,r+n)}}function Q1e(e,t){var r=t||{},i=e._fullLayout,n=Dw.getId(r),a,o,s=r._inHover;if(s?(o=r.layer,a="hover"):(o=i._infolayer,a=n),!!o){a+=i._uid,e._legendMouseDownTime||(e._legendMouseDownTime=0);var l;if(s){if(!r.entries)return;l=J1e(r.entries,r)}else{for(var u=(e.calcdata||[]).slice(),c=i.shapes,f=0;f<c.length;f++){var h=c[f];if(h.showlegend){var d={_isShape:!0,index:h._index,name:h.name||h.label.text||"shape "+h._index,legend:h.legend,legendgroup:h.legendgroup,legendgrouptitle:h.legendgrouptitle,legendrank:h.legendrank,legendwidth:h.legendwidth,showlegend:h.showlegend,visible:h.visible,opacity:h.opacity,mode:h.type==="line"?"lines":"markers",line:h.line,marker:{line:h.line,color:h.fillcolor,size:12,symbol:h.type==="rect"?"square":h.type==="circle"?"circle":"hexagon2"}};u.push([{trace:d}])}}l=i.showlegend&&J1e(u,r,i._legends.length>1)}var p=i.hiddenlabels||[];if(!s&&(!i.showlegend||!l.length))return o.selectAll("."+n).remove(),i._topdefs.select("#"+a).remove(),oH.autoMargin(e,n);var v=Cl.ensureSingle(o,"g",n,function(A){s||A.attr("pointer-events","all")}),m=Cl.ensureSingleById(i._topdefs,"clipPath",a,function(A){A.append("rect")}),g=Cl.ensureSingle(v,"rect","bg",function(A){A.attr("shape-rendering","crispEdges")});g.call(SA.stroke,r.bordercolor).call(SA.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var w=Cl.ensureSingle(v,"g","scrollbox"),b=r.title;r._titleWidth=0,r._titleHeight=0;var _;b.text?(_=Cl.ensureSingle(w,"text",n+"titletext"),_.attr("text-anchor","start").call(Dl.font,b.font).text(b.text),e7(_,w,e,r,kw),!s&&(r.titleclick||r.titledoubleclick)&&G6t(w,e,r,n)):(w.selectAll("."+n+"titletext").remove(),w.selectAll("."+n+"titletoggle").remove());var M=Cl.ensureSingle(v,"rect","scrollbar",function(A){A.attr(jl.scrollBarEnterAttrs).call(SA.fill,jl.scrollBarColor)}),x=w.selectAll("g.groups").data(l);x.enter().append("g").attr("class","groups"),x.exit().remove();var T=x.selectAll("g.traces").data(Cl.identity);T.enter().append("g").attr("class","traces"),T.exit().remove(),T.style("opacity",function(A){let y=A[0],E=y.trace;if(y.groupTitle){let S=E.legendgroup,C=(i.shapes||[]).filter(function(D){return D.showlegend});return e._fullData.concat(C).some(function(D){return D.legendgroup===S&&(D.legend||"legend")===n&&D.visible===!0})?1:.5}return s_.traceIs(E,"pie-like")?p.indexOf(A[0].label)!==-1?.5:1:E.visible==="legendonly"?.5:1}).each(function(){Jf.select(this).call(U6t,e,r)}).call(q6t,e,r).each(function(A){s||A[0].groupTitle&&r.groupclick==="toggleitem"||Jf.select(this).call(V6t,e,n)}),Cl.syncOrAsync([oH.previousPromises,function(){return $6t(e,x,T,r,w)},function(){var A=i._size,y=r.borderwidth,E=r.xref==="paper",S=r.yref==="paper";if(b.text){let ce=(i.shapes||[]).filter(function(Ce){return Ce.showlegend}),ge=e._fullData.concat(ce).some(function(Ce){let be=Ce.legend||"legend";var he=Array.isArray(be)?be.includes(n):be===n;return he&&Ce.visible===!0});_.style("opacity",ge?1:.5)}if(!s){var C,k;E?C=A.l+A.w*r.x-Cw[r7(r)]*r._width:C=i.width*r.x-Cw[r7(r)]*r._width,S?k=A.t+A.h*(1-r.y)-Cw[i7(r)]*r._effHeight:k=i.height*(1-r.y)-Cw[i7(r)]*r._effHeight;var D=W6t(e,n,C,k);if(D)return;if(i.margin.autoexpand){var F=C,P=k;C=E?Cl.constrain(C,0,i.width-r._width):F,k=S?Cl.constrain(k,0,i.height-r._effHeight):P,C!==F&&Cl.log("Constrain "+n+".x to make legend fit inside graph"),k!==P&&Cl.log("Constrain "+n+".y to make legend fit inside graph")}Dl.setTranslate(v,C,k)}if(M.on(".drag",null),v.on("wheel",null),s||r._height<=r._maxHeight||e._context.staticPlot){var R=r._effHeight;s&&(R=r._height),g.attr({width:r._width-y,height:R-y,x:y/2,y:y/2}),Dl.setTranslate(w,0,0),m.select("rect").attr({width:r._width-2*y,height:R-2*y,x:y,y}),Dl.setClipUrl(w,a,e),Dl.setRect(M,0,0,0,0),delete r._scrollY}else{var L=Math.max(jl.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),I=r._effHeight-L-2*jl.scrollBarMargin,B=r._height-r._effHeight,O=I/B,$=Math.min(r._scrollY||0,B);g.attr({width:r._width-2*y+jl.scrollBarWidth+jl.scrollBarMargin,height:r._effHeight-y,x:y/2,y:y/2}),m.select("rect").attr({width:r._width-2*y+jl.scrollBarWidth+jl.scrollBarMargin,height:r._effHeight-2*y,x:y,y:y+$}),Dl.setClipUrl(w,a,e),X($,L,O),v.on("wheel",function(){$=Cl.constrain(r._scrollY+Jf.event.deltaY/B*I,0,B),X($,L,O),$!==0&&$!==B&&Jf.event.preventDefault()});var Y,K,j,q=function(ce,ge,Ce){var be=(Ce-ge)/O+ce;return Cl.constrain(be,0,B)},J=function(ce,ge,Ce){var be=(ge-Ce)/O+ce;return Cl.constrain(be,0,B)},U=Jf.behavior.drag().on("dragstart",function(){var ce=Jf.event.sourceEvent;ce.type==="touchstart"?Y=ce.changedTouches[0].clientY:Y=ce.clientY,j=$}).on("drag",function(){var ce=Jf.event.sourceEvent;ce.buttons===2||ce.ctrlKey||(ce.type==="touchmove"?K=ce.changedTouches[0].clientY:K=ce.clientY,$=q(j,Y,K),X($,L,O))});M.call(U);var V=Jf.behavior.drag().on("dragstart",function(){var ce=Jf.event.sourceEvent;ce.type==="touchstart"&&(Y=ce.changedTouches[0].clientY,j=$)}).on("drag",function(){var ce=Jf.event.sourceEvent;ce.type==="touchmove"&&(K=ce.changedTouches[0].clientY,$=J(j,Y,K),X($,L,O))});w.call(V)}function X(ce,ge,Ce){r._scrollY=e._fullLayout[n]._scrollY=ce,Dl.setTranslate(w,0,-ce),Dl.setRect(M,r._width,jl.scrollBarMargin+ce*Ce,jl.scrollBarWidth,ge),m.select("rect").attr("y",y+ce)}if(e._context.edits.legendPosition){var H,G,Q,te;v.classed("cursor-move",!0),aH.init({element:v.node(),gd:e,prepFn:function(ce){if(ce.target!==M.node()){var ge=Dl.getTranslate(v);Q=ge.x,te=ge.y}},moveFn:function(ce,ge){if(Q!==void 0&&te!==void 0){var Ce=Q+ce,be=te+ge;Dl.setTranslate(v,Ce,be),H=aH.align(Ce,r._width,A.l,A.l+A.w,r.xanchor),G=aH.align(be+r._height,-r._height,A.t+A.h,A.t,r.yanchor)}},doneFn:function(){if(H!==void 0&&G!==void 0){var ce={};ce[n+".x"]=H,ce[n+".y"]=G,s_.call("_guiRelayout",e,ce)}},clickFn:function(ce,ge){var Ce=o.selectAll("g.traces").filter(function(){var be=this.getBoundingClientRect();return ge.clientX>=be.left&&ge.clientX<=be.right&&ge.clientY>=be.top&&ge.clientY<=be.bottom});Ce.size()>0&&rge(e,r,Ce,ce,ge)}})}}],e)}}function QD(e,t,r){var i=e[0],n=i.width,a=t.entrywidthmode,o=i.trace.legendwidth||t.entrywidth;return a==="fraction"?t._maxWidth*o:r+(o||n)}function rge(e,t,r,i,n){var a=e._fullLayout,o=r.data()[0][0].trace,s=t.itemclick,l=t.itemdoubleclick,u={event:n,node:r.node(),curveNumber:o.index,expandedIndex:o.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:a};o._group&&(u.group=o._group),s_.traceIs(o,"pie-like")&&(u.label=r.datum()[0].label);var c=t7.triggerHandler(e,"plotly_legendclick",u);if(i===1){if(c===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&s&&X1e(r,e,t,s,i)},e._context.doubleClickDelay)}else if(i===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var f=t7.triggerHandler(e,"plotly_legenddoubleclick",u);f!==!1&&c!==!1&&l&&X1e(r,e,t,l,i)}}function U6t(e,t,r){var i=Dw.getId(r),n=e.data()[0][0],a=n.trace,o=s_.traceIs(a,"pie-like"),s=!r._inHover&&t._context.edits.legendText&&!o,l=r._maxNameLength,u,c;n.groupTitle?(u=n.groupTitle.text,c=n.groupTitle.font):(c=r.font,r.entries?u=n.text:(u=o?n.label:a.name,a._meta&&(u=Cl.templateString(u,a._meta))));var f=Cl.ensureSingle(e,"text",i+"text");f.attr("text-anchor","start").call(Dl.font,c).text(s?ege(u,l):u);var h=r.indentation+r.itemwidth+jl.itemGap*2;l_.positionText(f,h,0),s?f.call(l_.makeEditable,{gd:t,text:u}).call(e7,e,t,r).on("edit",function(d){this.text(ege(d,l)).call(e7,e,t,r);var p={};return p.name=d,n.trace._isShape?s_.call("_guiRelayout",t,"shapes["+a.index+"].name",p.name):s_.call("_guiRestyle",t,p,a.index)}):e7(f,e,t,r)}function ege(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||"";for(var i=r-e.length;i>0;i--)e+=" ";return e}function V6t(e,t,r){var i=t._context.doubleClickDelay,n,a=1,o=Cl.ensureSingle(e,"rect",r+"toggle",function(s){t._context.staticPlot||s.style("cursor","pointer").attr("pointer-events","all"),s.call(SA.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(o.on("mousedown",function(){n=new Date().getTime(),n-t._legendMouseDownTime<i?a+=1:(a=1,t._legendMouseDownTime=n)}),o.on("mouseup",function(){if(!(t._dragged||t._editing)){var s=t._fullLayout[r];new Date().getTime()-t._legendMouseDownTime>i&&(a=Math.max(a-1,1)),rge(t,s,e,a,Jf.event)}}))}function G6t(e,t,r,i){if(t._fullData.some(function(u){let c=u.legend||"legend";return(Array.isArray(c)?c.includes(i):c===i)&&s_.traceIs(u,"pie-like")}))return;let a=t._context.doubleClickDelay;var o,s=1;let l=Cl.ensureSingle(e,"rect",i+"titletoggle",function(u){t._context.staticPlot||u.style("cursor","pointer").attr("pointer-events","all"),u.call(SA.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(l.on("mousedown",function(){o=new Date().getTime(),o-t._legendMouseDownTime<a?s+=1:(s=1,t._legendMouseDownTime=o)}),l.on("mouseup",function(){if(t._dragged||t._editing)return;new Date().getTime()-t._legendMouseDownTime>a&&(s=Math.max(s-1,1));let u={event:Jf.event,legendId:i,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(s===1&&r.titleclick){if(t7.triggerHandler(t,"plotly_legendtitleclick",u)===!1)return;r._titleClickTimeout=setTimeout(function(){t._fullLayout&&Z1e(t,r,r.titleclick)},a)}else s===2&&(r._titleClickTimeout&&clearTimeout(r._titleClickTimeout),t._legendMouseDownTime=0,t7.triggerHandler(t,"plotly_legendtitledoubleclick",u)!==!1&&r.titledoubleclick&&Z1e(t,r,r.titledoubleclick))}))}function e7(e,t,r,i,n){i._inHover&&e.attr("data-notex",!0),l_.convertToTspans(e,r,function(){H6t(t,r,i,n)})}function H6t(e,t,r,i){var n=e.data()[0][0],a=n&&n.trace.showlegend;if(Array.isArray(a)&&(a=a[n.i]!==!1),!r._inHover&&n&&!a){e.remove();return}var o=e.select("g[class*=math-group]"),s=o.node(),l=Dw.getId(r);r||(r=t._fullLayout[l]);var u=r.borderwidth,c;i===kw?c=r.title.font:n.groupTitle?c=n.groupTitle.font:c=r.font;var f=c.size*tge,h,d;if(s){var p=Dl.bBox(s);h=p.height,d=p.width,i===kw?Dl.setTranslate(o,u,u+h*.75):Dl.setTranslate(o,0,h*.25)}else{var v="."+l+(i===kw?"title":"")+"text",m=e.select(v),g=l_.lineCount(m),w=m.node();if(h=f*g,d=w?Dl.bBox(w).width:0,i===kw)r.title.side==="left"&&(d+=jl.itemGap*2),l_.positionText(m,u+jl.titlePad,u+f);else{var b=jl.itemGap*2+r.indentation+r.itemwidth;n.groupTitle&&(b=jl.itemGap,d-=r.indentation+r.itemwidth),l_.positionText(m,b,-f*((g-1)/2-.3))}}i===kw?(r._titleWidth=d,r._titleHeight=h):(n.lineHeight=f,n.height=Math.max(h,16)+3,n.width=d)}function j6t(e){var t=0,r=0,i=e.title.side;return i&&(i.indexOf("left")!==-1&&(t=e._titleWidth),i.indexOf("top")!==-1&&(r=e._titleHeight)),[t,r]}function $6t(e,t,r,i,n){var a=e._fullLayout,o=Dw.getId(i);i||(i=a[o]);var s=a._size,l=Dw.isVertical(i),u=Dw.isGrouped(i),c=i.entrywidthmode==="fraction",f=i.borderwidth,h=2*f,d=jl.itemGap,p=i.indentation+i.itemwidth+d*2,v=2*(f+d),m=i7(i),g=i.y<0||i.y===0&&m==="top",w=i.y>1||i.y===1&&m==="bottom",b=i.tracegroupgap,_={};let{orientation:M,yref:x}=i,{maxheight:T}=i,A=g||w||M!=="v"||x!=="paper";T||(T=A?.5:1);let y=A?a.height:s.h;i._maxHeight=Math.max(T>1?T:T*y,30);var E=0;i._width=0,i._height=0;var S=j6t(i);if(l)r.each(function(ce){var ge=ce[0].height;Dl.setTranslate(this,f+S[0],f+S[1]+i._height+ge/2+d),i._height+=ge,i._width=Math.max(i._width,ce[0].width)}),E=p+i._width,i._width+=d+p+h,i._height+=v,u&&(t.each(function(ce,ge){Dl.setTranslate(this,0,ge*i.tracegroupgap)}),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var C=r7(i),k=i.x<0||i.x===0&&C==="right",D=i.x>1||i.x===1&&C==="left",F=w||g,P=a.width/2;i._maxWidth=Math.max(k?F&&C==="left"?s.l+s.w:P:D?F&&C==="right"?s.r+s.w:P:s.w,2*p);var R=0,L=0;r.each(function(ce){var ge=QD(ce,i,p);R=Math.max(R,ge),L+=ge}),E=null;var I=0;if(u){var B=0,O=0,$=0;t.each(function(){var ce=0,ge=0;Jf.select(this).selectAll("g.traces").each(function(be){var he=QD(be,i,p),oe=be[0].height;Dl.setTranslate(this,S[0],S[1]+f+d+oe/2+ge),ge+=oe,ce=Math.max(ce,he),_[be[0].trace.legendgroup]=ce});var Ce=ce+d;O>0&&Ce+f+O>i._maxWidth?(I=Math.max(I,O),O=0,$+=B+b,B=ge):B=Math.max(B,ge),Dl.setTranslate(this,O,$),O+=Ce}),i._width=Math.max(I,O)+f,i._height=$+B+v}else{var Y=r.size(),K=L+h+(Y-1)*d<i._maxWidth,j=0,q=0,J=0,U=0;r.each(function(ce){var ge=ce[0].height,Ce=QD(ce,i,p,u),be=K?Ce:R;c||(be+=d),be+f+q-d>=i._maxWidth&&(I=Math.max(I,U),q=0,J+=j,i._height+=j,j=0),Dl.setTranslate(this,S[0]+f+q,S[1]+f+J+ge/2+d),U=q+Ce+d,q+=be,j=Math.max(j,ge)}),K?(i._width=q+h,i._height=j+v):(i._width=Math.max(I,U)+h,i._height+=j+v)}}i._width=Math.ceil(Math.max(i._width+S[0],i._titleWidth+2*(f+jl.titlePad))),i._height=Math.ceil(Math.max(i._height+S[1],i._titleHeight+2*(f+jl.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var V=e._context.edits,X=V.legendText||V.legendPosition;r.each(function(ce){var ge=Jf.select(this).select("."+o+"toggle"),Ce=ce[0].height,be=ce[0].trace.legendgroup,he=QD(ce,i,p);u&&be!==""&&(he=_[be]);var oe=X?p:E||he;!l&&!c&&(oe+=d/2),Dl.setRect(ge,0,-Ce/2,oe,Ce)});var H=n.select("."+o+"titletext");H.node()&&N6t(H,i,f);var G=n.select("."+o+"titletoggle");if(G.size()&&H.node()){var Q=H.attr("x")||0,te=jl.titlePad;Dl.setRect(G,Q-te,f,i._titleWidth+2*te,i._titleHeight+2*te)}}function W6t(e,t,r,i){var n=e._fullLayout,a=n[t],o=r7(a),s=i7(a),l=a.xref==="paper",u=a.yref==="paper";e._fullLayout._reservedMargin[t]={};var c=a.y<.5?"b":"t",f=a.x<.5?"l":"r",h={r:n.width-r,l:r+a._width,b:n.height-i,t:i+a._effHeight};if(l&&u)return oH.autoMargin(e,t,{x:a.x,y:a.y,l:a._width*Cw[o],r:a._width*K1e[o],b:a._effHeight*K1e[s],t:a._effHeight*Cw[s]});l?e._fullLayout._reservedMargin[t][c]=h[c]:u||a.orientation==="v"?e._fullLayout._reservedMargin[t][f]=h[f]:e._fullLayout._reservedMargin[t][c]=h[c]}function r7(e){return Cl.isRightAnchor(e)?"right":Cl.isCenterAnchor(e)?"center":"left"}function i7(e){return Cl.isBottomAnchor(e)?"bottom":Cl.isMiddleAnchor(e)?"middle":"top"}});var hH=W(fH=>{"use strict";var u_=vi(),Rg=sn(),tl=it(),Y6t=tl.pushUnique,uH=tl.strTranslate,X6t=tl.strRotate,Z6t=lw(),fd=uo(),K6t=C1e(),s1=Ji(),$l=ni(),n7=bf(),l1=ji(),J6t=Gl().zindexSeparator,Lw=yi(),x0=Kf(),c_=P6(),Q6t=YG(),eAt=lH(),fge=c_.YANGLE,cH=Math.PI*fge/180,tAt=1/Math.sin(cH),rAt=Math.cos(cH),iAt=Math.sin(cH),ws=c_.HOVERARROWSIZE,wa=c_.HOVERTEXTPAD,nge={box:!0,ohlc:!0,violin:!0,candlestick:!0},nAt={scatter:!0,scattergl:!0,splom:!0};function age(e,t){return e.distance-t.distance}fH.hover=function(t,r,i,n){t=tl.getGraphDiv(t);var a=r.target;tl.throttle(t._fullLayout._uid+c_.HOVERID,c_.HOVERMINTIME,function(){aAt(t,r,i,n,a)})};fH.loneHover=function(t,r){var i=!0;Array.isArray(t)||(i=!1,t=[t]);var n=r.gd,a=gge(n),o=mge(n),s=t.map(function(m){var g=m._x0||m.x0||m.x||0,w=m._x1||m.x1||m.x||0,b=m._y0||m.y0||m.y||0,_=m._y1||m.y1||m.y||0,M=m.eventData;if(M){var x=Math.min(g,w),T=Math.max(g,w),A=Math.min(b,_),y=Math.max(b,_),E=m.trace;if(Lw.traceIs(E,"gl3d")){var S=n._fullLayout[E.scene]._scene.container,C=S.offsetLeft,k=S.offsetTop;x+=C,T+=C,A+=k,y+=k}M.bbox={x0:x+o,x1:T+o,y0:A+a,y1:y+a},M.xPixel=(g+w)/2,M.yPixel=(b+_)/2,r.inOut_bbox&&r.inOut_bbox.push(M.bbox)}else M=!1;return{color:m.color||$l.defaultLine,x0:m.x0||m.x||0,x1:m.x1||m.x||0,y0:m.y0||m.y||0,y1:m.y1||m.y||0,xLabel:m.xLabel,yLabel:m.yLabel,zLabel:m.zLabel,text:m.text,name:m.name,idealAlign:m.idealAlign,borderColor:m.borderColor,fontFamily:m.fontFamily,fontSize:m.fontSize,fontColor:m.fontColor,fontWeight:m.fontWeight,fontStyle:m.fontStyle,fontVariant:m.fontVariant,nameLength:m.nameLength,textAlign:m.textAlign,trace:m.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:m.hovertemplate||!1,hovertemplateLabels:m.hovertemplateLabels||!1,eventData:M}}),l=!1,u=dge(s,{gd:n,hovermode:"closest",rotateLabels:l,bgColor:r.bgColor||$l.background,container:u_.select(r.container),outerContainer:r.outerContainer||r.container}),c=u.hoverLabels,f=5,h=0,d=0;c.sort(function(m,g){return m.y0-g.y0}).each(function(m,g){var w=m.y0-m.by/2;w-f<h?m.offset=h-w+f:m.offset=0,h=w+m.by+m.offset,g===r.anchorIndex&&(d=m.offset)}).each(function(m){m.offset-=d});var p=n._fullLayout._invScaleX,v=n._fullLayout._invScaleY;return vge(c,l,p,v),i?c:c.node()};function aAt(e,t,r,i,n){r||(r="xy"),typeof r=="string"&&(r=r.split(J6t)[0]);var a=Array.isArray(r)?r:[r],o,s=e._fullLayout,l=s.hoversubplots,u=s._plots||[],c=u[r],f=s._has("cartesian"),h=t.hovermode||s.hovermode,d=(h||"").charAt(0)==="x",p=(h||"").charAt(0)==="y",v,m;if(f&&(d||p)&&l==="axis"){for(var g=a.length,w=0;w<g;w++)if(o=a[w],u[o]){v=l1.getFromId(e,o,"x"),m=l1.getFromId(e,o,"y");var b=(d?v:m)._subplotsWith;if(b&&b.length)for(var _=0;_<b.length;_++)Y6t(a,b[_])}}if(c&&l!=="single"){var M=c.overlays.map(function(Je){return Je.id});a=a.concat(M)}for(var x=a.length,T=new Array(x),A=new Array(x),y=!1,E=0;E<x;E++)if(o=a[E],u[o])y=!0,T[E]=u[o].xaxis,A[E]=u[o].yaxis;else if(s[o]&&s[o]._subplot){var S=s[o]._subplot;T[E]=S.xaxis,A[E]=S.yaxis}else{tl.warn("Unrecognized subplot: "+o);return}if(h&&!y&&(h="closest"),["x","y","closest","x unified","y unified"].indexOf(h)===-1||!e.calcdata||e.querySelector(".zoombox")||e._dragging)return n7.unhoverRaw(e,t);var C=s.hoverdistance;C===-1&&(C=1/0);var k=s.spikedistance;k===-1&&(k=1/0);var D=[],F=[],P,R,L,I,B,O,$,Y,K,j,q,J,U,V={hLinePoint:null,vLinePoint:null},X=!1;if(Array.isArray(t))for(h="array",L=0;L<t.length;L++)B=e.calcdata[t[L].curveNumber||0],B&&(O=B[0].trace,B[0].trace.hoverinfo!=="skip"&&(F.push(B),O.orientation==="h"&&(X=!0)));else{var H=e.calcdata.slice();for(H.sort(function(Je,Ct){var ir=Je[0].trace.zorder||0,hr=Ct[0].trace.zorder||0;return ir-hr}),I=0;I<H.length;I++)B=H[I],O=B[0].trace,O.hoverinfo!=="skip"&&x0.isTraceInSubplots(O,a)&&(F.push(B),O.orientation==="h"&&(X=!0));var G=!n,Q,te;if(G)"xpx"in t?Q=t.xpx:Q=T[0]._length/2,"ypx"in t?te=t.ypx:te=A[0]._length/2;else{if(Z6t.triggerHandler(e,"plotly_beforehover",t)===!1)return;var ce=n.getBoundingClientRect();Q=t.clientX-ce.left,te=t.clientY-ce.top,s._calcInverseTransform(e);var ge=tl.apply3DTransform(s._invTransform)(Q,te);if(Q=ge[0],te=ge[1],Q<0||Q>T[0]._length||te<0||te>A[0]._length)return n7.unhoverRaw(e,t)}if(t.pointerX=Q+T[0]._offset,t.pointerY=te+A[0]._offset,"xval"in t?P=x0.flat(a,t.xval):P=x0.p2c(T,Q),"yval"in t?R=x0.flat(a,t.yval):R=x0.p2c(A,te),e._hoverPointerX=t.pointerX,e._hoverPointerY=t.pointerY,!Rg(P[0])||!Rg(R[0]))return tl.warn("Fx.hover failed",t,e),n7.unhoverRaw(e,t)}s.clickanywhere&&(e._hoverXVals=P,e._hoverYVals=R,e._hoverXAxes=T,e._hoverYAxes=A);var Ce=1/0;function be(Je,Ct){for(I=0;I<F.length;I++)if(B=F[I],!(!B||!B[0]||!B[0].trace)&&(O=B[0].trace,!(O.visible!==!0||O._length===0)&&["carpet","contourcarpet"].indexOf(O._module.name)===-1)){if(K=h,x0.isUnifiedHover(K)&&(K=K.charAt(0)),O.type==="splom"?(Y=0,$=a[Y]):($=x0.getSubplot(O),Y=a.indexOf($)),J={cd:B,trace:O,xa:T[Y],ya:A[Y],maxHoverDistance:C,maxSpikeDistance:k,index:!1,distance:Math.min(Ce,C),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:$l.defaultLine,name:O.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},s[$]&&(J.subplot=s[$]._subplot),s._splomScenes&&s._splomScenes[O.uid]&&(J.scene=s._splomScenes[O.uid]),K==="array"){var ir=t[I];if("pointNumber"in ir){let ca=B[ir.pointNumber];ca&&(J.index=ir.pointNumber,ca.lonlat?(j=ca.lonlat[0],q=ca.lonlat[1]):(j=ca.x,q=ca.y)),K="closest"}else K="","xval"in ir&&(j=ir.xval,K="x"),"yval"in ir&&(q=ir.yval,K=K?"closest":"y")}else Je!==void 0&&Ct!==void 0?(j=Je,q=Ct):(j=P[Y],q=R[Y]);if(U=D.length,C!==0)if(O._module&&O._module.hoverPoints){var hr=O._module.hoverPoints(J,j,q,K,{finiteRange:!0,hoverLayer:s._hoverlayer,hoversubplots:l,gd:e});if(hr)for(var Ur,si=0;si<hr.length;si++)Ur=hr[si],Rg(Ur.x0)&&Rg(Ur.y0)&&D.push(uAt(Ur,h))}else tl.log("Unrecognized trace type in hover:",O);if(h==="closest"&&D.length>U&&(D.splice(0,U),Ce=D[0].distance),f&&k!==0&&D.length===0){J.distance=k,J.index=!1;var ei=O._module.hoverPoints(J,j,q,"closest",{hoverLayer:s._hoverlayer});if(ei&&(ei=ei.filter(function(ca){return ca.spikeDistance<=k})),ei&&ei.length){var Lr,$i=ei.filter(function(ca){return ca.xa.showspikes&&ca.xa.spikesnap!=="hovered data"});if($i.length){var Tn=$i[0];Rg(Tn.x0)&&Rg(Tn.y0)&&(Lr=oe(Tn),(!V.vLinePoint||V.vLinePoint.spikeDistance>Lr.spikeDistance)&&(V.vLinePoint=Lr))}var hn=ei.filter(function(ca){return ca.ya.showspikes&&ca.ya.spikesnap!=="hovered data"});if(hn.length){var ta=hn[0];Rg(ta.x0)&&Rg(ta.y0)&&(Lr=oe(ta),(!V.hLinePoint||V.hLinePoint.spikeDistance>Lr.spikeDistance)&&(V.hLinePoint=Lr))}}}}}be();function he(Je,Ct,ir){for(var hr=null,Ur=1/0,si,ei=0;ei<Je.length;ei++)v&&v._id!==Je[ei].xa._id||m&&m._id!==Je[ei].ya._id||(si=Je[ei].spikeDistance,ir&&ei===0&&(si=-1/0),si<=Ur&&si<=Ct&&(hr=Je[ei],Ur=si));return hr}function oe(Je){return Je?{xa:Je.xa,ya:Je.ya,x:Je.xSpike!==void 0?Je.xSpike:(Je.x0+Je.x1)/2,y:Je.ySpike!==void 0?Je.ySpike:(Je.y0+Je.y1)/2,distance:Je.distance,spikeDistance:Je.spikeDistance,curveNumber:Je.trace.index,color:Je.color,pointNumber:Je.index}:null}var Ee={fullLayout:s,container:s._hoverlayer,event:t},ye=e._spikepoints,ue={vLinePoint:V.vLinePoint,hLinePoint:V.hLinePoint};e._spikepoints=ue;var ee=function(){var Je=D.filter(function(ir){return v&&v._id===ir.xa._id&&m&&m._id===ir.ya._id}),Ct=D.filter(function(ir){return!(v&&v._id===ir.xa._id&&m&&m._id===ir.ya._id)});Je.sort(age),Ct.sort(age),D=Je.concat(Ct),D=fAt(D,h)};ee();var ae=h.charAt(0),xe=(ae==="x"||ae==="y")&&D[0]&&nAt[D[0].trace.type];if(f&&k!==0&&D.length!==0){var re=D.filter(function(Je){return Je.ya.showspikes}),pe=he(re,k,xe);V.hLinePoint=oe(pe);var we=D.filter(function(Je){return Je.xa.showspikes}),Fe=he(we,k,xe);V.vLinePoint=oe(Fe)}if(D.length===0){var Se=n7.unhoverRaw(e,t);if(f&&(V.hLinePoint!==null||V.vLinePoint!==null)&&lge(ye)&&sge(e,V,Ee),s.hoveranywhere&&!i&&n){var ke=e._hoverdata;ke&&ke.length&&(e.emit("plotly_unhover",{event:t,points:ke}),e._hoverdata=[]),xt([]),e._hoverAnywhereActive=!0}return Se}if(f&&lge(ye)&&sge(e,V,Ee),x0.isXYhover(K)&&D[0].length!==0&&D[0].trace.type!=="splom"){var _e=D[0];nge[_e.trace.type]?D=D.filter(Je=>Je.trace.index===_e.trace.index):D=[_e];var Ie=D.length,Oe=cge("x",_e,s),Qe=cge("y",_e,s);be(Oe,Qe);var et=[],_t={},ut=0,vt=function(Je){var Ct=nge[Je.trace.type]?hge(Je):Je.trace.index;if(!_t[Ct])ut++,_t[Ct]=ut,et.push(Je);else{var ir=_t[Ct]-1,hr=et[ir];ir>0&&Math.abs(Je.distance)<Math.abs(hr.distance)&&(et[ir]=Je)}},Xe;for(Xe=0;Xe<Ie;Xe++)vt(D[Xe]);for(Xe=D.length-1;Xe>Ie-1;Xe--)vt(D[Xe]);D=et,ee()}var mt=e._hoverdata,bt=[],Ne=gge(e),Ue=mge(e);for(let Je of D){var Ge=x0.makeEventData(Je,Je.trace,Je.cd);if(Je.hovertemplate!==!1){var je=!1;Je.cd[Je.index]&&Je.cd[Je.index].ht&&(je=Je.cd[Je.index].ht),Je.hovertemplate=je||Je.trace.hovertemplate||!1}if(Je.xa&&Je.ya){var Re=Je.x0+Je.xa._offset,Ve=Je.x1+Je.xa._offset,ct=Je.y0+Je.ya._offset,Tt=Je.y1+Je.ya._offset,Xt=Math.min(Re,Ve),Vt=Math.max(Re,Ve),lr=Math.min(ct,Tt),ur=Math.max(ct,Tt);Ge.bbox={x0:Xt+Ue,x1:Vt+Ue,y0:lr+Ne,y1:ur+Ne},Ge.xPixel=(Re+Ve)/2,Ge.yPixel=(ct+Tt)/2}Je.eventData=[Ge],bt.push(Ge)}e._hoverdata=bt;var Bt=h==="y"&&(F.length>1||D.length>1)||h==="closest"&&X&&D.length>1,Zt=$l.combine(s.plot_bgcolor||$l.background,s.paper_bgcolor),kr=dge(D,{gd:e,hovermode:h,rotateLabels:Bt,bgColor:Zt,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),$e=kr.hoverLabels;if(x0.isUnifiedHover(h)||(sAt($e,Bt,s,kr.commonLabelBoundingBox),vge($e,Bt,s._invScaleX,s._invScaleY)),n&&n.tagName){var tt=Lw.getComponentMethod("annotations","hasClickToShow")(e,bt);K6t(u_.select(n),tt?"pointer":"")}var st=cAt(e,t,mt);if(!n||i||!st&&!s.hoveranywhere)return;mt&&st&&e.emit("plotly_unhover",{event:t,points:mt}),xt(e._hoverdata);function xt(Je){e.emit("plotly_hover",{event:t,points:Je,xaxes:T,yaxes:A,xvals:x0.c2dApply(T,P),yvals:x0.c2dApply(A,R),xPixel:t.pointerX,yPixel:t.pointerY})}}function hge(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:"",e.ya?e.ya._id:""].join(",")}var oAt=/<extra>([\s\S]*)<\/extra>/;function dge(e,t){var r=t.gd,i=r._fullLayout,n=t.hovermode,a=t.rotateLabels,o=t.bgColor,s=t.container,l=t.outerContainer,u=t.commonLabelOpts||{};if(e.length===0)return[[]];var c=t.fontFamily||c_.HOVERFONT,f=t.fontSize||c_.HOVERFONTSIZE,h=t.fontWeight||i.font.weight,d=t.fontStyle||i.font.style,p=t.fontVariant||i.font.variant,v=t.fontTextcase||i.font.textcase,m=t.fontLineposition||i.font.lineposition,g=t.fontShadow||i.font.shadow,w=e[0],b=w.xa,_=w.ya,M=n.charAt(0),x=M+"Label",T=w[x];if(T===void 0&&b.type==="multicategory")for(var A=0;A<e.length&&(T=e[A][x],T===void 0);A++);var y=Fw(r,l),E=y.top,S=y.width,C=y.height,k=T!==void 0&&w.distance<=t.hoverdistance&&(n==="x"||n==="y");if(k){var D=!0,F,P;for(F=0;F<e.length;F++)if(D&&e[F].zLabel===void 0&&(D=!1),P=e[F].hoverinfo||e[F].trace.hoverinfo,P){var R=Array.isArray(P)?P:P.split("+");if(R.indexOf("all")===-1&&R.indexOf(n)===-1){k=!1;break}}D&&(k=!1)}var L=s.selectAll("g.axistext").data(k?[0]:[]);L.enter().append("g").classed("axistext",!0),L.exit().remove();var I={minX:0,maxX:0,minY:0,maxY:0};if(L.each(function(){var Se=u_.select(this),ke=tl.ensureSingle(Se,"path","",function(lr){lr.style({"stroke-width":"1px"})}),_e=tl.ensureSingle(Se,"text","",function(lr){lr.attr("data-notex",1)}),Ie=u.bgcolor||$l.defaultLine,Oe=u.bordercolor||$l.contrast(Ie),Qe=$l.contrast(Ie),et=u.font,_t={weight:et.weight||h,style:et.style||d,variant:et.variant||p,textcase:et.textcase||v,lineposition:et.lineposition||m,shadow:et.shadow||g,family:et.family||c,size:et.size||f,color:et.color||Qe};ke.style({fill:Ie,stroke:Oe}),_e.text(T).call(s1.font,_t).call(fd.positionText,0,0).call(fd.convertToTspans,r),Se.attr("transform","");var ut=Fw(r,_e.node()),vt,Xe;if(n==="x"){var mt=b.side==="top"?"-":"";_e.attr("text-anchor","middle").call(fd.positionText,0,b.side==="top"?E-ut.bottom-ws-wa:E-ut.top+ws+wa),vt=b._offset+(w.x0+w.x1)/2,Xe=_._offset+(b.side==="top"?0:_._length);var bt=ut.width/2+wa,Ne=vt;vt<bt?Ne=bt:vt>i.width-bt&&(Ne=i.width-bt),ke.attr("d","M"+(vt-Ne)+",0L"+(vt-Ne+ws)+","+mt+ws+"H"+bt+"v"+mt+(wa*2+ut.height)+"H"+-bt+"V"+mt+ws+"H"+(vt-Ne-ws)+"Z"),vt=Ne,I.minX=vt-bt,I.maxX=vt+bt,b.side==="top"?(I.minY=Xe-(wa*2+ut.height),I.maxY=Xe-wa):(I.minY=Xe+wa,I.maxY=Xe+(wa*2+ut.height))}else{var Ue,Ge,je;_.side==="right"?(Ue="start",Ge=1,je="",vt=b._offset+b._length):(Ue="end",Ge=-1,je="-",vt=b._offset),Xe=_._offset+(w.y0+w.y1)/2,_e.attr("text-anchor",Ue),ke.attr("d","M0,0L"+je+ws+","+ws+"V"+(wa+ut.height/2)+"h"+je+(wa*2+ut.width)+"V-"+(wa+ut.height/2)+"H"+je+ws+"V-"+ws+"Z"),I.minY=Xe-(wa+ut.height/2),I.maxY=Xe+(wa+ut.height/2),_.side==="right"?(I.minX=vt+ws,I.maxX=vt+ws+(wa*2+ut.width)):(I.minX=vt-ws-(wa*2+ut.width),I.maxX=vt-ws);var Re=ut.height/2,Ve=E-ut.top-Re,ct="clip"+i._uid+"commonlabel"+_._id,Tt;if(vt<ut.width+2*wa+ws){Tt="M-"+(ws+wa)+"-"+Re+"h-"+(ut.width-wa)+"V"+Re+"h"+(ut.width-wa)+"Z";var Xt=ut.width-vt+wa;fd.positionText(_e,Xt,Ve),Ue==="end"&&_e.selectAll("tspan").each(function(){var lr=u_.select(this),ur=s1.tester.append("text").text(lr.text()).call(s1.font,_t),Bt=Fw(r,ur.node());Math.round(Bt.width)<Math.round(ut.width)&&lr.attr("x",Xt-Bt.width),ur.remove()})}else fd.positionText(_e,Ge*(wa+ws),Ve),Tt=null;var Vt=i._topclips.selectAll("#"+ct).data(Tt?[0]:[]);Vt.enter().append("clipPath").attr("id",ct).append("path"),Vt.exit().remove(),Vt.select("path").attr("d",Tt),s1.setClipUrl(_e,Tt?ct:null,r)}Se.attr("transform",uH(vt,Xe))}),x0.isUnifiedHover(n)){s.selectAll("g.hovertext").remove();let Se=e.filter(ke=>ke.hoverinfo!=="none");if(Se.length===0)return[];var B=i.hoverlabel,O=B.font,$=Se[0],Y=((n==="x unified"?$.xa:$.ya).unifiedhovertitle||{}).text,K=Y?tl.hovertemplateString({data:n==="x unified"?[{xa:$.xa,x:$.xVal}]:[{ya:$.ya,y:$.yVal}],fallback:$.trace.hovertemplatefallback,locale:i._d3locale,template:Y}):T,j={showlegend:!0,legend:{title:{text:K,font:O},font:O,bgcolor:B.bgcolor,bordercolor:B.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:i.legend?i.legend.traceorder:void 0,orientation:"v"}},q={font:O};Q6t(j,q,r._fullData);var J=q.legend;J.entries=[];for(var U=0;U<Se.length;U++){var V=Se[U];if(V.hoverinfo!=="none"){var X=oge(V,!0,n,i,T),H=X[0],G=X[1];V.name=G,G!==""?V.text=G+" : "+H:V.text=H;var Q=V.cd[V.index];Q&&(Q.mc&&(V.mc=Q.mc),Q.mcc&&(V.mc=Q.mcc),Q.mlc&&(V.mlc=Q.mlc),Q.mlcc&&(V.mlc=Q.mlcc),Q.mlw&&(V.mlw=Q.mlw),Q.mrc&&(V.mrc=Q.mrc),Q.dir&&(V.dir=Q.dir)),V._distinct=!0,J.entries.push([V])}}J.entries.sort(function(ke,_e){var Ie=i.hoversort;if(Ie==="value descending"||Ie==="value ascending"){var Oe=n.charAt(0)==="x"?"y":"x",Qe=ke[0][Oe+"LabelVal"],et=_e[0][Oe+"LabelVal"];if(Qe!==et)return Ie==="value descending"?et-Qe:Qe-et}return ke[0].trace.index-_e[0].trace.index}),J.layer=s,J._inHover=!0,J._groupTitleFont=B.grouptitlefont,eAt(r,J);var te=s.select("g.legend"),ce=Fw(r,te.node()),ge=ce.width+2*wa,Ce=ce.height+2*wa,be=Se[0],he=(be.x0+be.x1)/2,oe=(be.y0+be.y1)/2,Ee=!(Lw.traceIs(be.trace,"bar-like")||Lw.traceIs(be.trace,"box-violin")),ye,ue;M==="y"?Ee?(ue=oe-wa,ye=oe+wa):(ue=Math.min.apply(null,Se.map(function(ke){return Math.min(ke.y0,ke.y1)})),ye=Math.max.apply(null,Se.map(function(ke){return Math.max(ke.y0,ke.y1)}))):ue=ye=tl.mean(Se.map(function(ke){return(ke.y0+ke.y1)/2}))-Ce/2;var ee,ae;M==="x"?Ee?(ee=he+wa,ae=he-wa):(ee=Math.max.apply(null,Se.map(function(ke){return Math.max(ke.x0,ke.x1)})),ae=Math.min.apply(null,Se.map(function(ke){return Math.min(ke.x0,ke.x1)}))):ee=ae=tl.mean(Se.map(function(ke){return(ke.x0+ke.x1)/2}))-ge/2;var xe=b._offset,re=_._offset;ye+=re,ee+=xe,ae+=xe-ge,ue+=re-Ce;var pe,we;return ee+ge<S&&ee>=0?pe=ee:ae+ge<S&&ae>=0?pe=ae:xe+ge<S?pe=xe:ee-he<he-ae+ge?pe=S-ge:pe=0,pe+=wa,ye+Ce<C&&ye>=0?we=ye:ue+Ce<C&&ue>=0?we=ue:re+Ce<C?we=re:ye-oe<oe-ue+Ce?we=C-Ce:we=0,we+=wa,te.attr("transform",uH(pe-1,we-1)),te}var Fe=s.selectAll("g.hovertext").data(e,function(Se){return hge(Se)});return Fe.enter().append("g").classed("hovertext",!0).each(function(){var Se=u_.select(this);Se.append("rect").call($l.fill,$l.addOpacity(o,.8)),Se.append("text").classed("name",!0),Se.append("path").style("stroke-width","1px"),Se.append("text").classed("nums",!0).call(s1.font,{weight:h,style:d,variant:p,textcase:v,lineposition:m,shadow:g,family:c,size:f})}),Fe.exit().remove(),Fe.each(function(Se){var ke=u_.select(this).attr("transform",""),_e=Se.color;Array.isArray(_e)&&(_e=_e[Se.eventData[0].pointNumber]);var Ie=Se.bgcolor||_e,Oe=$l.combine($l.opacity(Ie)?Ie:$l.defaultLine,o),Qe=$l.combine($l.opacity(_e)?_e:$l.defaultLine,o),et=Se.borderColor||$l.contrast(Oe),_t=oge(Se,k,n,i,T,ke),ut=_t[0],vt=_t[1],Xe=ke.select("text.nums").call(s1.font,{family:Se.fontFamily||c,size:Se.fontSize||f,color:Se.fontColor||et,weight:Se.fontWeight||h,style:Se.fontStyle||d,variant:Se.fontVariant||p,textcase:Se.fontTextcase||v,lineposition:Se.fontLineposition||m,shadow:Se.fontShadow||g}).text(ut).attr("data-notex",1).call(fd.positionText,0,0).call(fd.convertToTspans,r),mt=ke.select("text.name"),bt=0,Ne=0;if(vt&&vt!==ut){mt.call(s1.font,{family:Se.fontFamily||c,size:Se.fontSize||f,color:Qe,weight:Se.fontWeight||h,style:Se.fontStyle||d,variant:Se.fontVariant||p,textcase:Se.fontTextcase||v,lineposition:Se.fontLineposition||m,shadow:Se.fontShadow||g}).text(vt).attr("data-notex",1).call(fd.positionText,0,0).call(fd.convertToTspans,r);var Ue=Fw(r,mt.node());bt=Ue.width+2*wa,Ne=Ue.height+2*wa}else mt.remove(),ke.select("rect").remove();ke.select("path").style({fill:Oe,stroke:et});var Ge=Se.xa._offset+(Se.x0+Se.x1)/2,je=Se.ya._offset+(Se.y0+Se.y1)/2,Re=Math.abs(Se.x1-Se.x0),Ve=Math.abs(Se.y1-Se.y0),ct=Fw(r,Xe.node()),Tt=ct.width/i._invScaleX,Xt=ct.height/i._invScaleY;Se.ty0=(E-ct.top)/i._invScaleY,Se.bx=Tt+2*wa,Se.by=Math.max(Xt+2*wa,Ne),Se.anchor="start",Se.txwidth=Tt,Se.tx2width=bt,Se.offset=0;var Vt=(Tt+ws+wa+bt)*i._invScaleX,lr,ur;if(a)Se.pos=Ge,lr=je+Ve/2+Vt<=C,ur=je-Ve/2-Vt>=0,(Se.idealAlign==="top"||!lr)&&ur?(je-=Ve/2,Se.anchor="end"):lr?(je+=Ve/2,Se.anchor="start"):Se.anchor="middle",Se.crossPos=je;else{if(Se.pos=je,lr=Ge+Re/2+Vt<=S,ur=Ge-Re/2-Vt>=0,(Se.idealAlign==="left"||!lr)&&ur)Ge-=Re/2,Se.anchor="end";else if(lr)Ge+=Re/2,Se.anchor="start";else{Se.anchor="middle";var Bt=Vt/2,Zt=Ge+Bt-S,kr=Ge-Bt;Zt>0&&(Ge-=Zt),kr<0&&(Ge+=-kr)}Se.crossPos=Ge}Xe.attr("text-anchor",Se.anchor),bt&&mt.attr("text-anchor",Se.anchor),ke.attr("transform",uH(Ge,je)+(a?X6t(fge):""))}),{hoverLabels:Fe,commonLabelBoundingBox:I}}function oge(e,t,r,i,n,a){var f,h;var o="",s="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=tl.templateString(e.name,e.trace._meta)),o=uge(e.name,e.nameLength));var l=r.charAt(0),u=l==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(s+="x: "+e.xLabel+"<br>"),e.yLabel!==void 0&&(s+="y: "+e.yLabel+"<br>"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmap"&&(s+=(s?"z: ":"")+e.zLabel)):t&&e[l+"Label"]===n?s=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(s=e.yLabel):e.yLabel===void 0?s=e.xLabel:s="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(s+=(s?"<br>":"")+e.text),e.extraText!==void 0&&(s+=(s?"<br>":"")+e.extraText),a&&s===""&&!e.hovertemplate&&(o===""&&a.remove(),s=o),(h=(f=e.trace)==null?void 0:f.hoverlabel)!=null&&h.split&&(e.hovertemplate="");let{hovertemplate:c=!1}=e;if(c){let d=e.hovertemplateLabels||e;e[l+"Label"]!==n&&(d[l+"other"]=d[l+"Val"],d[l+"otherLabel"]=d[l+"Label"]),s=tl.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:d,locale:i._d3locale,template:c}),s=s.replace(oAt,(p,v)=>(o=uge(v,e.nameLength),""))}return[s,o]}function sAt(e,t,r,i){var n=t?"xa":"ya",a=t?"ya":"xa",o=0,s=1,l=e.size(),u=new Array(l),c=0,f=i.minX,h=i.maxX,d=i.minY,p=i.maxY,v=function(P){return P*r._invScaleX},m=function(P){return P*r._invScaleY};e.each(function(P){var R=P[n],L=P[a],I=R._id.charAt(0)==="x",B=R.range;c===0&&B&&B[0]>B[1]!==I&&(s=-1);var O=0,$=I?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var Y=pge(P,t),K=P.anchor,j=K==="end"?-1:1,q,J;if(K==="middle")q=P.crossPos+(I?m(Y.y-P.by/2):v(P.bx/2+P.tx2width/2)),J=q+(I?m(P.by):v(P.bx));else if(I)q=P.crossPos+m(ws+Y.y)-m(P.by/2-ws),J=q+m(P.by);else{var U=v(j*ws+Y.x),V=U+v(j*P.bx);q=P.crossPos+Math.min(U,V),J=P.crossPos+Math.max(U,V)}I?d!==void 0&&p!==void 0&&Math.min(J,p)-Math.max(q,d)>1&&(L.side==="left"?(O=L._mainLinePosition,$=r.width):$=L._mainLinePosition):f!==void 0&&h!==void 0&&Math.min(J,h)-Math.max(q,f)>1&&(L.side==="top"?(O=L._mainLinePosition,$=r.height):$=L._mainLinePosition)}u[c++]=[{datum:P,traceIndex:P.trace.index,dp:0,pos:P.pos,posref:P.posref,size:P.by*(I?tAt:1)/2,pmin:O,pmax:$}]}),u.sort(function(P,R){return P[0].posref-R[0].posref||s*(R[0].traceIndex-P[0].traceIndex)});var g,w,b,_,M,x,T;function A(P){var R=P[0],L=P[P.length-1];if(w=R.pmin-R.pos-R.dp+R.size,b=L.pos+L.dp+L.size-R.pmax,w>.01){for(M=P.length-1;M>=0;M--)P[M].dp+=w;g=!1}if(!(b<.01)){if(w<-.01){for(M=P.length-1;M>=0;M--)P[M].dp-=b;g=!1}if(g){var I=0;for(_=0;_<P.length;_++)x=P[_],x.pos+x.dp+x.size>R.pmax&&I++;for(_=P.length-1;_>=0&&!(I<=0);_--)x=P[_],x.pos>R.pmax-1&&(x.del=!0,I--);for(_=0;_<P.length&&!(I<=0);_++)if(x=P[_],x.pos<R.pmin+1)for(x.del=!0,I--,b=x.size*2,M=P.length-1;M>=0;M--)P[M].dp-=b;for(_=P.length-1;_>=0&&!(I<=0);_--)x=P[_],x.pos+x.dp+x.size>R.pmax&&(x.del=!0,I--)}}}for(;!g&&o<=l;){for(o++,g=!0,_=0;_<u.length-1;){var y=u[_],E=u[_+1],S=y[y.length-1],C=E[0];if(w=S.pos+S.dp+S.size-C.pos-C.dp+C.size,w>.01){for(M=E.length-1;M>=0;M--)E[M].dp+=w;for(y.push.apply(y,E),u.splice(_+1,1),T=0,M=y.length-1;M>=0;M--)T+=y[M].dp;for(b=T/y.length,M=y.length-1;M>=0;M--)y[M].dp-=b;g=!1}else _++}u.forEach(A)}for(_=u.length-1;_>=0;_--){var k=u[_];for(M=k.length-1;M>=0;M--){var D=k[M],F=D.datum;F.offset=D.dp,F.del=D.del}}}function pge(e,t){var r=0,i=e.offset;return t&&(i*=-iAt,r=e.offset*rAt),{x:r,y:i}}function lAt(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(ws+wa),i=r+t*(e.txwidth+wa),n=e.anchor==="middle";return n&&(r-=e.tx2width/2,i+=e.txwidth/2+wa),{alignShift:t,textShiftX:r,text2ShiftX:i}}function vge(e,t,r,i){var n=function(o){return o*r},a=function(o){return o*i};e.each(function(o){var s=u_.select(this);if(o.del)return s.remove();var l=s.select("text.nums"),u=o.anchor,c=u==="end"?-1:1,f=lAt(o),h=pge(o,t),d=h.x,p=h.y,v=u==="middle",m="hoverlabel"in o.trace?o.trace.hoverlabel.showarrow:!0,g;v?g="M-"+n(o.bx/2+o.tx2width/2)+","+a(p-o.by/2)+"h"+n(o.bx)+"v"+a(o.by)+"h-"+n(o.bx)+"Z":m?g="M0,0L"+n(c*ws+d)+","+a(ws+p)+"v"+a(o.by/2-ws)+"h"+n(c*o.bx)+"v-"+a(o.by)+"H"+n(c*ws+d)+"V"+a(p-ws)+"Z":g="M"+n(c*ws+d)+","+a(p-o.by/2)+"h"+n(c*o.bx)+"v"+a(o.by)+"h"+n(-c*o.bx)+"Z",s.select("path").attr("d",g);var w=d+f.textShiftX,b=p+o.ty0-o.by/2+wa,_=o.textAlign||"auto";_!=="auto"&&(_==="left"&&u!=="start"?(l.attr("text-anchor","start"),w=v?-o.bx/2-o.tx2width/2+wa:-o.bx-wa):_==="right"&&u!=="end"&&(l.attr("text-anchor","end"),w=v?o.bx/2-o.tx2width/2-wa:o.bx+wa)),l.call(fd.positionText,n(w),a(b)),o.tx2width&&(s.select("text.name").call(fd.positionText,n(f.text2ShiftX+f.alignShift*wa+d),a(p+o.ty0-o.by/2+wa)),s.select("rect").call(s1.setRect,n(f.text2ShiftX+(f.alignShift-1)*o.tx2width/2+d),a(p-o.by/2-1),n(o.tx2width),a(o.by+2)))})}function uAt(e,t){var r=e.index,i=e.trace||{},n=e.cd[0],a=e.cd[r]||{};function o(h){return h||Rg(h)&&h===0}var s=Array.isArray(r)?function(h,d){var p=tl.castOption(n,r,h);return o(p)?p:tl.extractOption({},i,"",d)}:function(h,d){return tl.extractOption(a,i,h,d)};function l(h,d,p){var v=s(d,p);o(v)&&(e[h]=v)}if(l("hoverinfo","hi","hoverinfo"),l("bgcolor","hbg","hoverlabel.bgcolor"),l("borderColor","hbc","hoverlabel.bordercolor"),l("fontFamily","htf","hoverlabel.font.family"),l("fontSize","hts","hoverlabel.font.size"),l("fontColor","htc","hoverlabel.font.color"),l("fontWeight","htw","hoverlabel.font.weight"),l("fontStyle","hty","hoverlabel.font.style"),l("fontVariant","htv","hoverlabel.font.variant"),l("nameLength","hnl","hoverlabel.namelength"),l("textAlign","hta","hoverlabel.align"),e.posref=t==="y"||t==="closest"&&i.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=tl.constrain(e.x0,0,e.xa._length),e.x1=tl.constrain(e.x1,0,e.xa._length),e.y0=tl.constrain(e.y0,0,e.ya._length),e.y1=tl.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:l1.hoverLabelText(e.xa,e.xLabelVal,i.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:l1.hoverLabelText(e.ya,e.yLabelVal,i.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),e.zLabelVal!==void 0&&e.zLabel===void 0&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!(e.xa.type==="log"&&e.xerr<=0)){var u=l1.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+l1.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,t==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var c=l1.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+c+" / -"+l1.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+c,t==="y"&&(e.distance+=1)}var f=e.hoverinfo||e.trace.hoverinfo;return f&&f!=="all"&&(f=Array.isArray(f)?f:f.split("+"),f.indexOf("x")===-1&&(e.xLabel=void 0),f.indexOf("y")===-1&&(e.yLabel=void 0),f.indexOf("z")===-1&&(e.zLabel=void 0),f.indexOf("text")===-1&&(e.text=void 0),f.indexOf("name")===-1&&(e.name=void 0)),e}function sge(e,t,r){var i=r.container,n=r.fullLayout,a=n._size,o=r.event,s=!!t.hLinePoint,l=!!t.vLinePoint,u,c;if(i.selectAll(".spikeline").remove(),!!(l||s)){var f=$l.combine(n.plot_bgcolor,n.paper_bgcolor);if(s){var h=t.hLinePoint,d,p;u=h&&h.xa,c=h&&h.ya;var v=c.spikesnap;v==="cursor"?(d=o.pointerX,p=o.pointerY):(d=u._offset+h.x,p=c._offset+h.y);var m=$l.wcagContrast(h.color,f)<1.5?$l.contrast(f):h.color,g=c.spikemode,w=c.spikethickness,b=c.spikecolor||m,_=l1.getPxPosition(e,c),M,x;if(g.indexOf("toaxis")!==-1||g.indexOf("across")!==-1){if(g.indexOf("toaxis")!==-1&&(M=_,x=d),g.indexOf("across")!==-1){var T=c._counterDomainMin,A=c._counterDomainMax;c.anchor==="free"&&(T=Math.min(T,c.position),A=Math.max(A,c.position)),M=a.l+T*a.w,x=a.l+A*a.w}i.insert("line",":first-child").attr({x1:M,x2:x,y1:p,y2:p,"stroke-width":w,stroke:b,"stroke-dasharray":s1.dashStyle(c.spikedash,w)}).classed("spikeline",!0).classed("crisp",!0),i.insert("line",":first-child").attr({x1:M,x2:x,y1:p,y2:p,"stroke-width":w+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}g.indexOf("marker")!==-1&&i.insert("circle",":first-child").attr({cx:_+(c.side!=="right"?w:-w),cy:p,r:w,fill:b}).classed("spikeline",!0)}if(l){var y=t.vLinePoint,E,S;u=y&&y.xa,c=y&&y.ya;var C=u.spikesnap;C==="cursor"?(E=o.pointerX,S=o.pointerY):(E=u._offset+y.x,S=c._offset+y.y);var k=$l.wcagContrast(y.color,f)<1.5?$l.contrast(f):y.color,D=u.spikemode,F=u.spikethickness,P=u.spikecolor||k,R=l1.getPxPosition(e,u),L,I;if(D.indexOf("toaxis")!==-1||D.indexOf("across")!==-1){if(D.indexOf("toaxis")!==-1&&(L=R,I=S),D.indexOf("across")!==-1){var B=u._counterDomainMin,O=u._counterDomainMax;u.anchor==="free"&&(B=Math.min(B,u.position),O=Math.max(O,u.position)),L=a.t+(1-O)*a.h,I=a.t+(1-B)*a.h}i.insert("line",":first-child").attr({x1:E,x2:E,y1:L,y2:I,"stroke-width":F,stroke:P,"stroke-dasharray":s1.dashStyle(u.spikedash,F)}).classed("spikeline",!0).classed("crisp",!0),i.insert("line",":first-child").attr({x1:E,x2:E,y1:L,y2:I,"stroke-width":F+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}D.indexOf("marker")!==-1&&i.insert("circle",":first-child").attr({cx:E,cy:R-(u.side!=="top"?F:-F),r:F,fill:P}).classed("spikeline",!0)}}}function cAt(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var i=r.length-1;i>=0;i--){var n=r[i],a=e._hoverdata[i];if(n.curveNumber!==a.curveNumber||String(n.pointNumber)!==String(a.pointNumber)||String(n.pointNumbers)!==String(a.pointNumbers)||n.binNumber!==a.binNumber)return!0}return!1}function lge(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function uge(e,t){return fd.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function fAt(e,t){for(var r=t.charAt(0),i=[],n=[],a=[],o=0;o<e.length;o++){var s=e[o];Lw.traceIs(s.trace,"bar-like")||Lw.traceIs(s.trace,"box-violin")?a.push(s):s.trace[r+"period"]?n.push(s):i.push(s)}return i.concat(n).concat(a)}function cge(e,t,r){var i=t[e+"a"],n=t[e+"Val"],a=t.cd[0];if(i.type==="category"||i.type==="multicategory")n=i._categoriesMap[n];else if(i.type==="date"){var o=t.trace[e+"periodalignment"];if(o){var s=t.cd[t.index],l=s[e+"Start"];l===void 0&&(l=s[e]);var u=s[e+"End"];u===void 0&&(u=s[e]);var c=u-l;o==="end"?n+=c:o==="middle"&&(n+=c/2)}n=i.d2c(n)}return a&&a.t&&a.t.posLetter===i._id&&(r.boxmode==="group"||r.violinmode==="group")&&(n+=a.t.dPos),n}var gge=e=>e.offsetTop+e.clientTop,mge=e=>e.offsetLeft+e.clientLeft;function Fw(e,t){var r=e._fullLayout,i=t.getBoundingClientRect(),n=i.left,a=i.top,o=n+i.width,s=a+i.height,l=tl.apply3DTransform(r._invTransform)(n,a),u=tl.apply3DTransform(r._invTransform)(o,s),c=l[0],f=l[1],h=u[0],d=u[1];return{x:c,y:f,width:h-c,height:d-f,top:Math.min(f,d),left:Math.min(c,h),right:Math.max(c,h),bottom:Math.max(f,d)}}});var EA=W((R9r,yge)=>{"use strict";var hAt=it(),dAt=ni(),pAt=Kf().isUnifiedHover;yge.exports=function(t,r,i,n){n=n||{};var a=r.legend;function o(s){n.font[s]||(n.font[s]=a?r.legend.font[s]:r.font[s])}r&&pAt(r.hovermode)&&(n.font||(n.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),a?(n.bgcolor||(n.bgcolor=dAt.combine(r.legend.bgcolor,r.paper_bgcolor)),n.bordercolor||(n.bordercolor=r.legend.bordercolor)):n.bgcolor||(n.bgcolor=r.paper_bgcolor)),i("hoverlabel.bgcolor",n.bgcolor),i("hoverlabel.bordercolor",n.bordercolor),i("hoverlabel.namelength",n.namelength),i("hoverlabel.showarrow",n.showarrow),hAt.coerceFont(i,"hoverlabel.font",n.font),i("hoverlabel.align",n.align)}});var _ge=W((z9r,xge)=>{"use strict";var vAt=it(),gAt=EA(),mAt=sy();xge.exports=function(t,r){function i(n,a){return vAt.coerce(t,r,mAt,n,a)}gAt(t,r,i)}});var Tge=W((B9r,wge)=>{"use strict";var bge=it(),yAt=N3(),xAt=EA();wge.exports=function(t,r,i,n){function a(s,l){return bge.coerce(t,r,yAt,s,l)}var o=bge.extendFlat({},n.hoverlabel);r.hovertemplate&&(o.namelength=-1),xAt(t,r,a,o)}});var dH=W((q9r,Age)=>{"use strict";var _At=it(),bAt=sy();Age.exports=function(t,r){function i(n,a){return r[n]!==void 0?r[n]:_At.coerce(t,r,bAt,n,a)}return i("clickmode"),i("hoversubplots"),i("hoveranywhere"),i("clickanywhere"),i("hovermode")}});var Ege=W((O9r,Sge)=>{"use strict";var Mge=it(),wAt=sy(),TAt=dH(),AAt=EA();Sge.exports=function(t,r){function i(u,c){return Mge.coerce(t,r,wAt,u,c)}var n=TAt(t,r);n&&(i("hoverdistance"),i("spikedistance"),n.indexOf("unified")!==-1&&i("hoversort"));var a=i("dragmode");a==="select"&&i("selectdirection");var o=r._has("map"),s=r._has("geo"),l=r._basePlotModules.length;r.dragmode==="zoom"&&((o||s)&&l===1||o&&s&&l===2)&&(r.dragmode="pan"),AAt(t,r,i),Mge.coerceFont(i,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var Dge=W((N9r,Cge)=>{"use strict";var pH=it(),kge=yi();Cge.exports=function(t){var r=t.calcdata,i=t._fullLayout;function n(u){return function(c){return pH.coerceHoverinfo({hoverinfo:c},{_module:u._module},i)}}for(var a=0;a<r.length;a++){var o=r[a],s=o[0].trace;if(!kge.traceIs(s,"pie-like")){var l=kge.traceIs(s,"2dMap")?MAt:pH.fillArray;l(s.hoverinfo,o,"hi",n(s)),s.hovertemplate&&l(s.hovertemplate,o,"ht"),s.hoverlabel&&(l(s.hoverlabel.bgcolor,o,"hbg"),l(s.hoverlabel.bordercolor,o,"hbc"),l(s.hoverlabel.font.size,o,"hts"),l(s.hoverlabel.font.color,o,"htc"),l(s.hoverlabel.font.family,o,"htf"),l(s.hoverlabel.font.weight,o,"htw"),l(s.hoverlabel.font.style,o,"hty"),l(s.hoverlabel.font.variant,o,"htv"),l(s.hoverlabel.namelength,o,"hnl"),l(s.hoverlabel.align,o,"hta"),l(s.hoverlabel.showarrow,o,"htsa"))}}};function MAt(e,t,r,i){i=i||pH.identity,Array.isArray(e)&&(t[0][r]=i(e))}});var Pge=W((U9r,Lge)=>{"use strict";var SAt=yi(),Fge=Kf(),EAt=hH().hover;Lge.exports=function(t,r,i){var n=SAt.getComponentMethod("annotations","onClick")(t,t._hoverdata),a=t._fullLayout;i!==void 0&&EAt(t,r,i,!0);function o(){var l,u,c,f,h,d;var s={points:t._hoverdata,event:r};(l=s.xaxes)!=null||(s.xaxes=t._hoverXAxes),(u=s.yaxes)!=null||(s.yaxes=t._hoverYAxes),(c=s.xvals)!=null||(s.xvals=t._hoverXVals&&Fge.c2dApply(t._hoverXAxes,t._hoverXVals)),(f=s.yvals)!=null||(s.yvals=t._hoverYVals&&Fge.c2dApply(t._hoverYAxes,t._hoverYVals)),(h=s.xPixel)!=null||(s.xPixel=t._hoverPointerX),(d=s.yPixel)!=null||(s.yPixel=t._hoverPointerY),t.emit("plotly_click",s)}(t._hoverdata||a.clickanywhere)&&r&&r.target&&(t._hoverdata||(t._hoverdata=[]),n&&n.then?n.then(o):o(),r.stopImmediatePropagation&&r.stopImmediatePropagation())}});var Ds=W((V9r,zge)=>{"use strict";var kAt=vi(),a7=it(),CAt=bf(),kA=Kf(),Ige=sy(),Rge=hH();zge.exports={moduleType:"component",name:"fx",constants:P6(),schema:{layout:Ige},attributes:N3(),layoutAttributes:Ige,supplyLayoutGlobalDefaults:_ge(),supplyDefaults:Tge(),supplyLayoutDefaults:Ege(),calc:Dge(),getDistanceFunction:kA.getDistanceFunction,getClosest:kA.getClosest,inbox:kA.inbox,quadrature:kA.quadrature,appendArrayPointValue:kA.appendArrayPointValue,castHoverOption:FAt,castHoverinfo:LAt,hover:Rge.hover,unhover:CAt.unhover,loneHover:Rge.loneHover,loneUnhover:DAt,click:Pge()};function DAt(e){var t=a7.isD3Selection(e)?e:kAt.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function FAt(e,t,r){return a7.castOption(e,t,"hoverlabel."+r)}function LAt(e,t,r){function i(n){return a7.coerceHoverinfo({hoverinfo:n},{_module:e._module},t)}return a7.castOption(e,r,"hoverinfo",i)}});var u1=W(zg=>{"use strict";zg.selectMode=function(e){return e==="lasso"||e==="select"};zg.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};zg.openMode=function(e){return e==="drawline"||e==="drawopenpath"};zg.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};zg.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};zg.selectingOrDrawing=function(e){return zg.freeMode(e)||zg.rectMode(e)}});var CA=W((H9r,Bge)=>{"use strict";Bge.exports=function(t){var r=t._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(i){i.regl&&i.regl.clear({color:!0,depth:!0})})}});var o7=W((j9r,qge)=>{"use strict";qge.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)"},curlybraces:{width:18,height:16,path:"M 9,4 C 7.354992,4 6,5.354992 6,7 V 9 C 6,9.2999997 5.8778068,9.8883542 5.5878906,10.291016 5.2979744,10.693677 4.9222213,11 4,11 a 1.0001,1.0001 0 0 0 0,2 c 0.2999997,0 0.8883542,0.122193 1.2910156,0.412109 C 5.693677,13.702026 6,14.077779 6,15 v 2 c 0,1.645008 1.354992,3 3,3 h 0.5 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 H 9 C 8.4358712,18 8,17.564129 8,17 V 15 C 8,13.625876 7.3766799,12.602305 6.6113281,11.96875 6.8086352,11.794047 7.0679793,11.657537 7.2109375,11.458984 7.8210204,10.611647 8,9.6999993 8,9 V 7 C 8,6.4358712 8.4358712,6 9,6 h 0.5 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z m 5.5,0 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 H 15 c 0.564129,0 1,0.4358712 1,1 v 2 c 0,0.6999993 0.17898,1.611647 0.789062,2.458984 0.142959,0.198553 0.402303,0.335063 0.59961,0.509766 C 16.62332,12.602305 16,13.625876 16,15 v 2 c 0,0.564129 -0.435871,1 -1,1 h -0.5 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 H 15 c 1.645008,0 3,-1.354992 3,-3 v -2 c 0,-0.922221 0.306323,-1.297974 0.708984,-1.587891 C 19.111646,13.122193 19.7,13 20,13 a 1.0001,1.0001 0 0 0 0,-2 C 19.077779,11 18.702026,10.693677 18.412109,10.291016 18.122193,9.8883542 18,9.2999997 18,9 V 7 C 18,5.354992 16.645008,4 15,4 Z",transform:"translate(-3 -4)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},cloudupload:{width:640,height:640,path:"M451.5 160C434.9 160 418.8 164.5 404.7 172.7C388.9 156.7 370.5 143.3 350.2 133.2C378.4 109.2 414.3 96 451.5 96C537.9 96 608 166 608 252.5C608 294 591.5 333.8 562.2 363.1L491.1 434.2C461.8 463.5 422 480 380.5 480C294.1 480 224 410 224 323.5C224 322 224 320.5 224.1 319C224.6 301.3 239.3 287.4 257 287.9C274.7 288.4 288.6 303.1 288.1 320.8C288.1 321.7 288.1 322.6 288.1 323.4C288.1 374.5 329.5 415.9 380.6 415.9C405.1 415.9 428.6 406.2 446 388.8L517.1 317.7C534.4 300.4 544.2 276.8 544.2 252.3C544.2 201.2 502.8 159.8 451.7 159.8zM307.2 237.3C305.3 236.5 303.4 235.4 301.7 234.2C289.1 227.7 274.7 224 259.6 224C235.1 224 211.6 233.7 194.2 251.1L123.1 322.2C105.8 339.5 96 363.1 96 387.6C96 438.7 137.4 480.1 188.5 480.1C205 480.1 221.1 475.7 235.2 467.5C251 483.5 269.4 496.9 289.8 507C261.6 530.9 225.8 544.2 188.5 544.2C102.1 544.2 32 474.2 32 387.7C32 346.2 48.5 306.4 77.8 277.1L148.9 206C178.2 176.7 218 160.2 259.5 160.2C346.1 160.2 416 230.8 416 317.1C416 318.4 416 319.7 416 321C415.6 338.7 400.9 352.6 383.2 352.2C365.5 351.8 351.6 337.1 352 319.4C352 318.6 352 317.9 352 317.1C352 283.4 334 253.8 307.2 237.5z",transform:"matrix(1 0 0 1 -15 -15)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:["<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("")}}});var l7=W(($9r,Oge)=>{"use strict";var s7=32;Oge.exports={CIRCLE_SIDES:s7,i000:0,i090:s7/4,i180:s7/2,i270:s7/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var u7=W((W9r,Uge)=>{"use strict";var PAt=it().strTranslate;function Nge(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function IAt(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function RAt(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return Nge(e,r[t])}}function zAt(e){return PAt(e.xaxis._offset,e.yaxis._offset)}Uge.exports={p2r:Nge,r2p:IAt,axValue:RAt,getTransform:zAt}});var Py=W(Bg=>{"use strict";var BAt=iG(),Hge=l7(),Pw=Hge.CIRCLE_SIDES,vH=Hge.SQRT2,jge=u7(),Vge=jge.p2r,Gge=jge.r2p,qAt=[0,3,4,5,6,1,2],OAt=[0,3,4,1,2];Bg.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",i=0;i<t;i++)for(var n=e[i].length,a=0;a<n;a++){var o=e[i][a][0];if(o==="Z")r+="Z";else for(var s=e[i][a].length,l=0;l<s;l++){var u=l;o==="Q"||o==="S"?u=OAt[l]:o==="C"&&(u=qAt[l]),r+=e[i][a][u],l>0&&l<s-1&&(r+=",")}}return r};Bg.readPaths=function(e,t,r,i){var n=BAt(e),a=[],o=-1,s=function(){o++,a[o]=[]},l,u=0,c=0,f,h,d=function(){f=u,h=c};d();for(var p=0;p<n.length;p++){var v=[],m,g,w,b,_=n[p][0],M=_;switch(_){case"M":s(),u=+n[p][1],c=+n[p][2],v.push([M,u,c]),d();break;case"Q":case"S":m=+n[p][1],w=+n[p][2],u=+n[p][3],c=+n[p][4],v.push([M,u,c,m,w]);break;case"C":m=+n[p][1],w=+n[p][2],g=+n[p][3],b=+n[p][4],u=+n[p][5],c=+n[p][6],v.push([M,u,c,m,w,g,b]);break;case"T":case"L":u=+n[p][1],c=+n[p][2],v.push([M,u,c]);break;case"H":M="L",u=+n[p][1],v.push([M,u,c]);break;case"V":M="L",c=+n[p][1],v.push([M,u,c]);break;case"A":M="L";var x=+n[p][1],T=+n[p][2];+n[p][4]||(x=-x,T=-T);var A=u-x,y=c;for(l=1;l<=Pw/2;l++){var E=2*Math.PI*l/Pw;v.push([M,A+x*Math.cos(E),y+T*Math.sin(E)])}break;case"Z":(u!==f||c!==h)&&(u=f,c=h,v.push([M,u,c]));break}for(var S=(r||{}).domain,C=t._fullLayout._size,k=r&&r.xsizemode==="pixel",D=r&&r.ysizemode==="pixel",F=i===!1,P=0;P<v.length;P++){for(l=0;l+2<7;l+=2){var R=v[P][l+1],L=v[P][l+2];R===void 0||L===void 0||(u=R,c=L,r&&(r.xaxis&&r.xaxis.p2r?(F&&(R-=r.xaxis._offset),k?R=Gge(r.xaxis,r.xanchor)+R:R=Vge(r.xaxis,R)):(F&&(R-=C.l),S?R=S.x[0]+R/C.w:R=R/C.w),r.yaxis&&r.yaxis.p2r?(F&&(L-=r.yaxis._offset),D?L=Gge(r.yaxis,r.yanchor)-L:L=Vge(r.yaxis,L)):(F&&(L-=C.t),S?L=S.y[1]-L/C.h:L=1-L/C.h)),v[P][l+1]=R,v[P][l+2]=L)}a[o].push(v[P].slice())}}return a};function DA(e,t){return Math.abs(e-t)<=1e-6}function c7(e,t){var r=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+i*i)}Bg.pointsOnRectangle=function(e){var t=e.length;if(t!==5)return!1;for(var r=1;r<3;r++){var i=e[0][r]-e[1][r],n=e[3][r]-e[2][r];if(!DA(i,n))return!1;var a=e[0][r]-e[3][r],o=e[1][r]-e[2][r];if(!DA(a,o))return!1}return!DA(e[0][1],e[1][1])&&!DA(e[0][1],e[3][1])?!1:!!(c7(e[0],e[1])*c7(e[0],e[3]))};Bg.pointsOnEllipse=function(e){var t=e.length;if(t!==Pw+1)return!1;t=Pw;for(var r=0;r<t;r++){var i=(t*2-r)%t,n=(t/2+i)%t,a=(t/2+r)%t;if(!DA(c7(e[r],e[a]),c7(e[i],e[n])))return!1}return!0};Bg.handleEllipse=function(e,t,r){if(!e)return[t,r];var i=Bg.ellipseOver({x0:t[0],y0:t[1],x1:r[0],y1:r[1]}),n=(i.x1+i.x0)/2,a=(i.y1+i.y0)/2,o=(i.x1-i.x0)/2,s=(i.y1-i.y0)/2;o||(o=s=s/vH),s||(s=o=o/vH);for(var l=[],u=0;u<Pw;u++){var c=u*2*Math.PI/Pw;l.push([n+o*Math.cos(c),a+s*Math.sin(c)])}return l};Bg.ellipseOver=function(e){var t=e.x0,r=e.y0,i=e.x1,n=e.y1,a=i-t,o=n-r;t-=a,r-=o;var s=(t+i)/2,l=(r+n)/2,u=vH;return a*=u,o*=u,{x0:s-a,y0:l-o,x1:s+a,y1:l+o}};Bg.fixDatesForPaths=function(e,t,r){var i=t.type==="date",n=r.type==="date";if(!i&&!n)return e;for(var a=0;a<e.length;a++)for(var o=0;o<e[a].length;o++)for(var s=0;s+2<e[a][o].length;s+=2)i&&(e[a][o][s+1]=e[a][o][s+1].replace(" ","_")),n&&(e[a][o][s+2]=e[a][o][s+2].replace(" ","_"));return e}});var d7=W((X9r,eme)=>{"use strict";var $ge=Cs(),Kge=u1(),NAt=Kge.drawMode,UAt=Kge.openMode,Iw=l7(),Wge=Iw.i000,Yge=Iw.i090,Xge=Iw.i180,Zge=Iw.i270,VAt=Iw.cos45,GAt=Iw.sin45,Jge=u7(),f7=Jge.p2r,Iy=Jge.r2p,HAt=by(),jAt=HAt.clearOutline,h7=Py(),$At=h7.readPaths,WAt=h7.writePaths,YAt=h7.ellipseOver,XAt=h7.fixDatesForPaths;function ZAt(e,t){if(e.length){var r=e[0][0];if(r){var i=t.gd,n=t.isActiveShape,a=t.dragmode,o=(i.layout||{}).shapes||[];if(!NAt(a)&&n!==void 0){var s=i._fullLayout._activeShapeIndex;if(s<o.length)switch(i._fullLayout.shapes[s].type){case"rect":a="drawrect";break;case"circle":a="drawcircle";break;case"line":a="drawline";break;case"path":var l=o[s].path||"";l[l.length-1]==="Z"?a="drawclosedpath":a="drawopenpath";break}}var u=Qge(e,t,a);jAt(i);for(var c=t.editHelpers,f=(c||{}).modifyItem,h=[],d=0;d<o.length;d++){var p=i._fullLayout.shapes[d];if(h[d]=p._input,n!==void 0&&d===i._fullLayout._activeShapeIndex){var v=u;switch(p.type){case"line":case"rect":case"circle":var m=$ge.getFromId(i,p.xref);p.xref.charAt(0)==="x"&&m.type.includes("category")?(f("x0",v.x0-(p.x0shift||0)),f("x1",v.x1-(p.x1shift||0))):(f("x0",v.x0),f("x1",v.x1));var g=$ge.getFromId(i,p.yref);p.yref.charAt(0)==="y"&&g.type.includes("category")?(f("y0",v.y0-(p.y0shift||0)),f("y1",v.y1-(p.y1shift||0))):(f("y0",v.y0),f("y1",v.y1));break;case"path":f("path",v.path);break}}}return n===void 0?(h.push(u),h):c?c.getUpdateObj():{}}}}function Qge(e,t,r){var i=e[0][0],n=t.gd,a=i.getAttribute("d"),o=n._fullLayout.newshape,s=t.plotinfo,l=t.isActiveShape,u=s.xaxis,c=s.yaxis,f=!!s.domain||!s.xaxis,h=!!s.domain||!s.yaxis,d=UAt(r),p=$At(a,n,s,l),v={editable:!0,visible:o.visible,name:o.name,showlegend:o.showlegend,legend:o.legend,legendwidth:o.legendwidth,legendgroup:o.legendgroup,legendgrouptitle:{text:o.legendgrouptitle.text,font:o.legendgrouptitle.font},legendrank:o.legendrank,label:o.label,xref:f?"paper":u._id,yref:h?"paper":c._id,layer:o.layer,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}};d||(v.fillcolor=o.fillcolor,v.fillrule=o.fillrule);var m;if(p.length===1&&(m=p[0]),m&&m.length===5&&r==="drawrect")v.type="rect",v.x0=m[0][1],v.y0=m[0][2],v.x1=m[2][1],v.y1=m[2][2];else if(m&&r==="drawline")v.type="line",v.x0=m[0][1],v.y0=m[0][2],v.x1=m[1][1],v.y1=m[1][2];else if(m&&r==="drawcircle"){v.type="circle";var g=m[Wge][1],w=m[Yge][1],b=m[Xge][1],_=m[Zge][1],M=m[Wge][2],x=m[Yge][2],T=m[Xge][2],A=m[Zge][2],y=s.xaxis&&(s.xaxis.type==="date"||s.xaxis.type==="log"),E=s.yaxis&&(s.yaxis.type==="date"||s.yaxis.type==="log");y&&(g=Iy(s.xaxis,g),w=Iy(s.xaxis,w),b=Iy(s.xaxis,b),_=Iy(s.xaxis,_)),E&&(M=Iy(s.yaxis,M),x=Iy(s.yaxis,x),T=Iy(s.yaxis,T),A=Iy(s.yaxis,A));var S=(w+_)/2,C=(M+T)/2,k=(_-w+b-g)/2,D=(A-x+T-M)/2,F=YAt({x0:S,y0:C,x1:S+k*VAt,y1:C+D*GAt});y&&(F.x0=f7(s.xaxis,F.x0),F.x1=f7(s.xaxis,F.x1)),E&&(F.y0=f7(s.yaxis,F.y0),F.y1=f7(s.yaxis,F.y1)),v.x0=F.x0,v.y0=F.y0,v.x1=F.x1,v.y1=F.y1}else v.type="path",u&&c&&XAt(p,u,c),v.path=WAt(p),m=null;return v}eme.exports={newShapes:ZAt,createShapeObj:Qge}});var mH=W((Z9r,tme)=>{"use strict";var KAt=u1(),JAt=KAt.selectMode,QAt=by(),eMt=QAt.clearOutline,gH=Py(),tMt=gH.readPaths,rMt=gH.writePaths,iMt=gH.fixDatesForPaths;tme.exports=function(t,r){if(t.length){var i=t[0][0];if(i){var n=i.getAttribute("d"),a=r.gd,o=a._fullLayout.newselection,s=r.plotinfo,l=s.xaxis,u=s.yaxis,c=r.isActiveSelection,f=r.dragmode,h=(a.layout||{}).selections||[];if(!JAt(f)&&c!==void 0){var d=a._fullLayout._activeSelectionIndex;if(d<h.length)switch(a._fullLayout.selections[d].type){case"rect":f="select";break;case"path":f="lasso";break}}var p=tMt(n,a,s,c),v={xref:l._id,yref:u._id,opacity:o.opacity,line:{color:o.line.color,width:o.line.width,dash:o.line.dash}},m;p.length===1&&(m=p[0]),m&&m.length===5&&f==="select"?(v.type="rect",v.x0=m[0][1],v.y0=m[0][2],v.x1=m[2][1],v.y1=m[2][2]):(v.type="path",l&&u&&iMt(p,l,u),v.path=rMt(p),m=null),eMt(a);for(var g=r.editHelpers,w=(g||{}).modifyItem,b=[],_=0;_<h.length;_++){var M=a._fullLayout.selections[_];if(!M){b[_]=M;continue}if(b[_]=M._input,c!==void 0&&_===a._fullLayout._activeSelectionIndex){var x=v;switch(M.type){case"rect":w("x0",x.x0),w("x1",x.x1),w("y0",x.y0),w("y1",x.y1);break;case"path":w("path",x.path);break}}}return c===void 0?(b.push(v),b):g?g.getUpdateObj():{}}}}});var FA=W((K9r,rme)=>{"use strict";rme.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:3},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}});var zy=W(tc=>{"use strict";var f1=FA(),ime=it(),Ry=ji();tc.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};tc.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};tc.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};tc.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};tc.extractPathCoords=function(e,t,r){var i=[],n=e.match(f1.segmentRE);return n.forEach(function(a){var o=t[a.charAt(0)].drawn;if(o!==void 0){var s=a.slice(1).match(f1.paramRE);if(!(!s||s.length<o)){var l=s[o],u=r?l:ime.cleanNumber(l);i.push(u)}}}),i};tc.countDefiningCoords=function(e,t,r){if(e!=="path")return 2;if(!t)return 0;let i=t.match(f1.segmentRE);if(!i)return 0;let n=r==="x"?f1.paramIsX:f1.paramIsY;return i.reduce((a,o)=>{let s=o.charAt(0),l=n[s].drawn!==void 0;return a+(l?1:0)},0)};tc.getDataToPixel=function(e,t,r,i,n){var a=e._fullLayout._size,o;if(t)if(n==="domain")o=function(l){return t._length*(i?1-l:l)+t._offset};else{var s=tc.shapePositionToRange(t);o=function(l){var u=c1(t,r);return t._offset+t.r2p(s(l,!0))+u},t.type==="date"&&(o=tc.decodeDate(o))}else i?o=function(l){return a.t+a.h*(1-l)}:o=function(l){return a.l+a.w*l};return o};tc.getPixelToData=function(e,t,r,i){var n=e._fullLayout._size,a;if(t)if(i==="domain")a=function(s){var l=(s-t._offset)/t._length;return r?1-l:l};else{var o=tc.rangeToShapePosition(t);a=function(s){return o(t.p2r(s-t._offset))}}else r?a=function(s){return 1-(s-n.t)/n.h}:a=function(s){return(s-n.l)/n.w};return a};tc.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(t%2)===1,i=Math.round(e);return r?i+.5:i};tc.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},i=e._fullLayout._plots[r.xref+r.yref],n=!!i;return n?i._hadPlotinfo=!0:(i={},r.xref&&r.xref!=="paper"&&(i.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&r.yref!=="paper"&&(i.yaxis=e._fullLayout[r.yref+"axis"])),i.xsizemode=r.xsizemode,i.ysizemode=r.ysizemode,i.xanchor=r.xanchor,i.yanchor=r.yanchor,{options:r,plotinfo:i}};tc.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},i=e._fullLayout._plots[r.xref+r.yref],n=!!i;return n?i._hadPlotinfo=!0:(i={},r.xref&&(i.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(i.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:i}};tc.getPathString=function(e,t){let r=t.type,i=Ry.getRefType(t.xref),n=Ry.getRefType(t.yref),a=e._fullLayout._size;var o,s,l,u,c,f,h,d,p,v,m,g;function w(E,S,C,k){var D;if(E)if(S==="domain")k?D=function(F){return E._offset+E._length*(1-F)}:D=function(F){return E._offset+E._length*F};else{let F=tc.shapePositionToRange(E);D=function(P){return E._offset+E.r2p(F(P,!0))},C==="path"&&E.type==="date"&&(D=tc.decodeDate(D))}else k?D=function(F){return a.t+a.h*(1-F)}:D=function(F){return a.l+a.w*F};return D}if(i==="array"?(h=[],o=t.xref.map(function(E){return Ry.getFromId(e,E)}),h=t.xref.map(function(E,S){return w(o[S],Ry.getRefType(E),r,!1)})):(o=Ry.getFromId(e,t.xref),h=w(o,i,r,!1)),n==="array"?(d=[],s=t.yref.map(function(E){return Ry.getFromId(e,E)}),d=t.yref.map(function(E,S){return w(s[S],Ry.getRefType(E),r,!0)})):(s=Ry.getFromId(e,t.yref),d=w(s,n,r,!0)),r==="path")return nMt(t,h,d);if(i==="array")l=c1(o[0],t.x0shift),u=c1(o[1],t.x1shift),p=h[0](t.x0)+l,v=h[1](t.x1)+u;else if(l=c1(o,t.x0shift),u=c1(o,t.x1shift),t.xsizemode==="pixel"){let E=h(t.xanchor);p=E+t.x0+l,v=E+t.x1+u}else p=h(t.x0)+l,v=h(t.x1)+u;if(n==="array")c=c1(s[0],t.y0shift),f=c1(s[1],t.y1shift),m=d[0](t.y0)+c,g=d[1](t.y1)+f;else if(c=c1(s,t.y0shift),f=c1(s,t.y1shift),t.ysizemode==="pixel"){let E=d(t.yanchor);m=E-t.y0+c,g=E-t.y1+f}else m=d(t.y0)+c,g=d(t.y1)+f;if(r==="line")return"M"+p+","+m+"L"+v+","+g;if(r==="rect")return"M"+p+","+m+"H"+v+"V"+g+"H"+p+"Z";var b=(p+v)/2,_=(m+g)/2,M=Math.abs(b-p),x=Math.abs(_-m),T="A"+M+","+x,A=b+M+","+_,y=b+","+(_-x);return"M"+A+T+" 0 1,1 "+y+T+" 0 0,1 "+A+"Z"};function nMt(e,t,r){let i=e.path,n=e.xsizemode,a=e.ysizemode,o=e.xanchor,s=e.yanchor,l=Array.isArray(e.xref),u=Array.isArray(e.yref);var c=0,f=0;return i.replace(f1.segmentRE,function(h){var d=0,p=h.charAt(0),v=f1.paramIsX[p],m=f1.paramIsY[p],g=f1.numParams[p];let w=v.drawn!==void 0,b=m.drawn!==void 0,_=l?t[c]:t,M=u?r[f]:r;var x=h.slice(1).replace(f1.paramRE,function(T){return v[d]?n==="pixel"?T=_(o)+Number(T):T=_(T):m[d]&&(a==="pixel"?T=M(s)-Number(T):T=M(T)),d++,d>g&&(T="X"),T});return d>g&&(x=x.replace(/[\s,]*X.*/,""),ime.log("Ignoring extra params in segment "+h)),w&&c++,b&&f++,p+x})}tc.getPixelShift=c1;function c1(e,t){t=t||0;var r=0;return t&&e&&(e.type==="category"||e.type==="multicategory")&&(r=(e.r2p(1)-e.r2p(0))*t),r}});var yH=W((Q9r,ome)=>{"use strict";var aMt=it(),h1=ji(),nme=uo(),ame=Ji(),oMt=Py().readPaths,f_=zy(),sMt=f_.getPathString,LA=GC(),lMt=Hl().FROM_TL;ome.exports=function(t,r,i,n){if(n.selectAll(".shape-label").remove(),!!(i.label.text||i.label.texttemplate)){var a;if(i.label.texttemplate){var o={};if(i.type!=="path"){var s=h1.getFromId(t,i.xref),l=h1.getFromId(t,i.yref);let O=Array.isArray(i.xref),$=Array.isArray(i.yref);for(var u in LA){var c=typeof LA[u]=="function",f=!O||LA.simpleXVariables.includes(u),h=!$||LA.simpleYVariables.includes(u);if(c&&f&&h){var d=LA[u](i,s,l);d!==void 0&&(o[u]=d)}}}a=aMt.texttemplateStringForShapes({data:[o],fallback:i.label.texttemplatefallback,locale:t._fullLayout._d3locale,template:i.label.texttemplate})}else a=i.label.text;var p={"data-index":r},v=i.label.font,m={"data-notex":1},g=n.append("g").attr(p).classed("shape-label",!0),w=g.append("text").attr(m).classed("shape-label-text",!0).text(a),b,_,M,x;if(i.path){var T=sMt(t,i),A=oMt(T,t);b=1/0,M=1/0,_=-1/0,x=-1/0;for(var y=0;y<A.length;y++)for(var E=0;E<A[y].length;E++)for(var S=A[y][E],C=1;C<S.length;C+=2){var k=S[C],D=S[C+1];b=Math.min(b,k),_=Math.max(_,k),M=Math.min(M,D),x=Math.max(x,D)}}else{let O=Array.isArray(i.xref),$=Array.isArray(i.yref),Y=h1.getFromId(t,O?i.xref[0]:i.xref),K=h1.getFromId(t,O?i.xref[1]:i.xref),j=h1.getFromId(t,$?i.yref[0]:i.yref),q=h1.getFromId(t,$?i.yref[1]:i.yref),J=h1.getRefType(O?i.xref[0]:i.xref),U=h1.getRefType(O?i.xref[1]:i.xref),V=h1.getRefType($?i.yref[0]:i.yref),X=h1.getRefType($?i.yref[1]:i.yref),H=(Q,te,ce,ge)=>f_.getDataToPixel(t,ce,te,!1,ge)(Q),G=(Q,te,ce,ge)=>f_.getDataToPixel(t,ce,te,!0,ge)(Q);if(i.xsizemode==="pixel"){let Q=H(i.xanchor,void 0,Y,J),te=f_.getPixelShift(Y,i.x0shift),ce=f_.getPixelShift(Y,i.x1shift);b=Q+i.x0+te,_=Q+i.x1+ce}else b=H(i.x0,i.x0shift,Y,J),_=H(i.x1,i.x1shift,K,U);if(i.ysizemode==="pixel"){let Q=G(i.yanchor,void 0,j,V),te=f_.getPixelShift(j,i.y0shift),ce=f_.getPixelShift(j,i.y1shift);M=Q-i.y0+te,x=Q-i.y1+ce}else M=G(i.y0,i.y0shift,j,V),x=G(i.y1,i.y1shift,q,X)}var F=i.label.textangle;F==="auto"&&(i.type==="line"?F=uMt(b,M,_,x):F=0),w.call(function(O){return O.call(ame.font,v).attr({}),nme.convertToTspans(O,t),O});var P=ame.bBox(w.node()),R=cMt(b,M,_,x,i,F,P),L=R.textx,I=R.texty,B=R.xanchor;w.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[B],y:I,x:L,transform:"rotate("+F+","+L+","+I+")"}).call(nme.positionText,L,I)}};function uMt(e,t,r,i){var n,a;return a=Math.abs(r-e),r>=e?n=t-i:n=i-t,-180/Math.PI*Math.atan2(n,a)}function cMt(e,t,r,i,n,a,o){var s=n.label.textposition,l=n.label.textangle,u=n.label.padding,c=n.type,f=Math.PI/180*a,h=Math.sin(f),d=Math.cos(f),p=n.label.xanchor,v=n.label.yanchor,m,g,w,b;if(c==="line"){s==="start"?(m=e,g=t):s==="end"?(m=r,g=i):(m=(e+r)/2,g=(t+i)/2),p==="auto"&&(s==="start"?l==="auto"?r>e?p="left":r<e?p="right":p="center":r>e?p="right":r<e?p="left":p="center":s==="end"?l==="auto"?r>e?p="right":r<e?p="left":p="center":r>e?p="left":r<e?p="right":p="center":p="center");var _={left:1,center:0,right:-1},M={bottom:-1,middle:0,top:1};if(l==="auto"){var x=M[v];w=-u*h*x,b=u*d*x}else{var T=_[p],A=M[v];w=u*T,b=u*A}m=m+w,g=g+b}else w=u+3,s.indexOf("right")!==-1?(m=Math.max(e,r)-w,p==="auto"&&(p="right")):s.indexOf("left")!==-1?(m=Math.min(e,r)+w,p==="auto"&&(p="left")):(m=(e+r)/2,p==="auto"&&(p="center")),s.indexOf("top")!==-1?g=Math.min(t,i):s.indexOf("bottom")!==-1?g=Math.max(t,i):g=(t+i)/2,b=u,v==="bottom"?g=g-b:v==="top"&&(g=g+b);var y=lMt[v],E=n.label.font.size,S=o.height,C=(S*y-E)*h,k=-(S*y-E)*d;return{textx:m+C,texty:g+k,xanchor:p}}});var g7=W((ePr,pme)=>{"use strict";var fMt=it(),hMt=fMt.strTranslate,sme=bf(),cme=u1(),dMt=cme.drawMode,fme=cme.selectMode,hme=yi(),lme=ni(),v7=l7(),pMt=v7.i000,vMt=v7.i090,gMt=v7.i180,mMt=v7.i270,yMt=by(),dme=yMt.clearOutlineControllers,_H=Py(),p7=_H.pointsOnRectangle,xH=_H.pointsOnEllipse,xMt=_H.writePaths,_Mt=d7().newShapes,bMt=d7().createShapeObj,wMt=mH(),TMt=yH();pme.exports=function e(t,r,i,n){n||(n=0);var a=i.gd;function o(){e(t,r,i,n++),(xH(t[0])||i.hasText)&&s({redrawing:!0})}function s(R){var L={};i.isActiveShape!==void 0&&(i.isActiveShape=!1,L=_Mt(r,i)),i.isActiveSelection!==void 0&&(i.isActiveSelection=!1,L=wMt(r,i),a._fullLayout._reselect=!0),Object.keys(L).length&&hme.call((R||{}).redrawing?"relayout":"_guiRelayout",a,L)}var l=a._fullLayout,u=l._zoomlayer,c=i.dragmode,f=dMt(c),h=fme(c);(f||h)&&(a._fullLayout._outlining=!0),dme(a),r.attr("d",xMt(t));var d,p,v,m,g;if(!n&&(i.isActiveShape||i.isActiveSelection)){g=AMt([],t);var w=u.append("g").attr("class","outline-controllers");E(w),P()}if(f&&i.hasText){var b=u.select(".label-temp"),_=bMt(r,i,i.dragmode);TMt(a,"label-temp",_,b)}function M(R){v=+R.srcElement.getAttribute("data-i"),m=+R.srcElement.getAttribute("data-j"),d[v][m].moveFn=x}function x(R,L){if(t.length){var I=g[v][m][1],B=g[v][m][2],O=t[v],$=O.length;if(p7(O)){var Y=R,K=L;if(i.isActiveSelection){var j=ume(O,m);j[1]===O[m][1]?K=0:Y=0}for(var q=0;q<$;q++)if(q!==m){var J=O[q];J[1]===O[m][1]&&(J[1]=I+Y),J[2]===O[m][2]&&(J[2]=B+K)}if(O[m][1]=I+Y,O[m][2]=B+K,!p7(O))for(var U=0;U<$;U++)for(var V=0;V<O[U].length;V++)O[U][V]=g[v][U][V]}else O[m][1]=I+R,O[m][2]=B+L;o()}}function T(){s()}function A(){if(t.length&&t[v]&&t[v].length){for(var R=[],L=0;L<t[v].length;L++)L!==m&&R.push(t[v][L]);R.length>1&&!(R.length===2&&R[1][0]==="Z")&&(m===0&&(R[0][0]="M"),t[v]=R,o(),s())}}function y(R,L){if(R===2){v=+L.srcElement.getAttribute("data-i"),m=+L.srcElement.getAttribute("data-j");var I=t[v];!p7(I)&&!xH(I)&&A()}}function E(R){d=[];for(var L=0;L<t.length;L++){var I=t[L],B=p7(I),O=!B&&xH(I);d[L]=[];for(var $=I.length,Y=0;Y<$;Y++)if(I[Y][0]!=="Z"&&!(O&&Y!==pMt&&Y!==vMt&&Y!==gMt&&Y!==mMt)){var K=B&&i.isActiveSelection,j;K&&(j=ume(I,Y));var q=I[Y][1],J=I[Y][2],U=R.append(K?"rect":"circle").attr("data-i",L).attr("data-j",Y).style({fill:lme.background,stroke:lme.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(K){var V=j[1]-q,X=j[2]-J,H=X?5:Math.max(Math.min(25,Math.abs(V)-5),5),G=V?5:Math.max(Math.min(25,Math.abs(X)-5),5);U.classed(X?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",H).attr("height",G).attr("x",q-H/2).attr("y",J-G/2).attr("transform",hMt(V/2,X/2))}else U.classed("cursor-grab",!0).attr("r",5).attr("cx",q).attr("cy",J);d[L][Y]={element:U.node(),gd:a,prepFn:M,doneFn:T,clickFn:y},sme.init(d[L][Y])}}}function S(R,L){if(t.length)for(var I=0;I<t.length;I++)for(var B=0;B<t[I].length;B++)for(var O=0;O+2<t[I][B].length;O+=2)t[I][B][O+1]=g[I][B][O+1]+R,t[I][B][O+2]=g[I][B][O+2]+L}function C(R,L){S(R,L),o()}function k(R){v=+R.srcElement.getAttribute("data-i"),v||(v=0),p[v].moveFn=C}function D(){s()}function F(R){R===2&&MMt(a)}function P(){if(p=[],!!t.length){var R=0;p[R]={element:r[0][0],gd:a,prepFn:k,doneFn:D,clickFn:F},sme.init(p[R])}}};function AMt(e,t){for(var r=0;r<t.length;r++){var i=t[r];e[r]=[];for(var n=0;n<i.length;n++){e[r][n]=[];for(var a=0;a<i[n].length;a++)e[r][n][a]=i[n][a]}}return e}function ume(e,t){var r=e[t][1],i=e[t][2],n=e.length,a,o,s;return a=(t+1)%n,o=e[a][1],s=e[a][2],o===r&&s===i&&(a=(t+2)%n,o=e[a][1],s=e[a][2]),[a,o,s]}function MMt(e){if(fme(e._fullLayout.dragmode)){dme(e);var t=e._fullLayout._activeSelectionIndex,r=(e.layout||{}).selections||[];if(t<r.length){for(var i=[],n=0;n<r.length;n++)n!==t&&i.push(r[n]);delete e._fullLayout._activeSelectionIndex;var a=e._fullLayout.selections[t];e._fullLayout._deselect={xref:a.xref,yref:a.yref},hme.call("_guiRelayout",e,{selections:i})}}}});var b7=W((tPr,Ame)=>{"use strict";var SMt=vi(),_me=yi(),wH=it(),h_=ji(),EMt=Py().readPaths,kMt=g7(),y7=yH(),bme=by().clearOutlineControllers,bH=ni(),x7=Ji(),CMt=Da().arrayEditor,vme=bf(),gme=Ds(),mme=Np(),d_=FA(),Bh=zy(),TH=Bh.getPathString;Ame.exports={draw:AH,drawOne:wme,eraseActiveShape:IMt,drawLabel:y7};function AH(e){var t=e._fullLayout;t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._shapeUpperLayer.selectAll("text").remove(),t._shapeLowerLayer.selectAll("text").remove();for(var r in t._plots){var i=t._plots[r].shapelayer;i&&(i.selectAll("path").remove(),i.selectAll("text").remove())}for(var n=0;n<t.shapes.length;n++)t.shapes[n].visible===!0&&wme(e,n)}function m7(e){return!!e._fullLayout._outlining}function _7(e){return!e._context.edits.shapePosition}function wme(e,t){e._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+t+'"]').remove();var r=Bh.makeShapesOptionsAndPlotinfo(e,t),i=r.options,n=r.plotinfo;if(!i._input||i.visible!==!0)return;let a=Array.isArray(i.xref)||Array.isArray(i.yref);if(i.layer==="above")s(e._fullLayout._shapeUpperLayer);else if(i.xref.includes("paper")||i.yref.includes("paper"))s(e._fullLayout._shapeLowerLayer);else if(i.layer==="between"&&!a)s(n.shapelayerBetween);else if(n._hadPlotinfo){var o=n.mainplotinfo||n;s(o.shapelayer)}else s(e._fullLayout._shapeLowerLayer);function s(l){var u=TH(e,i),c={"data-index":t,"fill-rule":i.fillrule,d:u},f=i.opacity,h=i.fillcolor,d=i.line.width?i.line.color:"rgba(0,0,0,0)",p=i.line.width,v=i.line.dash;!p&&i.editable===!0&&(p=5,v="solid");var m=u[u.length-1]!=="Z",g=_7(e)&&i.editable&&e._fullLayout._activeShapeIndex===t;g&&(h=m?"rgba(0,0,0,0)":e._fullLayout.activeshape.fillcolor,f=e._fullLayout.activeshape.opacity);var w=l.append("g").classed("shape-group",!0).attr({"data-index":t}),b=w.append("path").attr(c).style("opacity",f).call(bH.stroke,d).call(bH.fill,h).call(x7.dashLine,v,p);Tme(w,e,i),y7(e,t,i,w);var _;if((g||e._context.edits.shapePosition)&&(_=CMt(e.layout,"shapes",i)),g){b.style({cursor:"move"});var M={element:b.node(),plotinfo:n,gd:e,editHelpers:_,hasText:i.label.text||i.label.texttemplate,isActiveShape:!0},x=EMt(u,e);kMt(x,b,M)}else e._context.edits.shapePosition?LMt(e,b,i,t,l,_):i.editable===!0&&b.style("pointer-events",m||bH.opacity(h)*f<=.5?"stroke":"all");b.node().addEventListener("click",function(){return PMt(e,b)}),DMt(e,b,n)}}function DMt(e,t,r){if(!(r!=null&&r.id))return;let i=t.node();function n(a){var l;let o=r.mainplotinfo||r,s=(l=o==null?void 0:o.draglayer)==null?void 0:l.select(".nsewdrag").node();return s?{clientX:a.clientX,clientY:a.clientY,target:s}:null}i.addEventListener("mousemove",a=>{if(!e._dragging&&e._fullLayout.hoveranywhere){let o=n(a);o&&gme.hover(e,o,r.id)}}),i.addEventListener("click",a=>{if(!e._dragged&&e._fullLayout.clickanywhere){let o=n(a);o&&gme.click(e,o,r.id)}})}function Tme(e,t,r){let i=r.xref,n=r.yref;if(Array.isArray(i)||Array.isArray(n)){let a="clip"+t._fullLayout._uid+"shape"+r._index,o=FMt(t,i,n);wH.ensureSingleById(t._fullLayout._clips,"clipPath",a,function(s){s.append("rect")}).select("rect").attr(o),x7.setClipUrl(e,a,t)}else{let a=(i+n).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");x7.setClipUrl(e,a?"clip"+t._fullLayout._uid+a:null,t)}}function FMt(e,t,r){let i=e._fullLayout._size;function n(s,l){let u=(Array.isArray(s)?s:[s]).map(h=>h_.getFromId(e,h)).filter(Boolean);if(!u.length)return l?[i.t,i.t+i.h]:[i.l,i.l+i.w];let c=u.map(function(h){return h._offset}),f=u.map(function(h){return h._offset+h._length});return[Math.min(...c),Math.max(...f)]}let a=n(t,!1),o=n(r,!0);return{x:a[0],y:o[0],width:a[1]-a[0],height:o[1]-o[0]}}function LMt(e,t,r,i,n,a){var o=10,s=10,l=r.xsizemode==="pixel",u=r.ysizemode==="pixel",c=r.type==="line",f=r.type==="path",h=a.modifyItem,d,p,v,m,g,w,b,_,M,x,T,A,y,E,S,C=SMt.select(t.node().parentNode),k=h_.getFromId(e,r.xref),D=h_.getRefType(r.xref),F=h_.getFromId(e,r.yref),P=h_.getRefType(r.yref),R=r.x0shift,L=r.x1shift,I=r.y0shift,B=r.y1shift,O=function(he,oe){var Ee=Bh.getDataToPixel(e,k,oe,!1,D);return Ee(he)},$=function(he,oe){var Ee=Bh.getDataToPixel(e,F,oe,!0,P);return Ee(he)},Y=Bh.getPixelToData(e,k,!1,D),K=Bh.getPixelToData(e,F,!0,P),j=U(),q={element:j.node(),gd:e,prepFn:H,doneFn:G,clickFn:Q},J;vme.init(q),j.node().onmousemove=X;function U(){return c?V():t}function V(){var he=10,oe=Math.max(r.line.width,he),Ee=n.append("g").attr("data-index",i).attr("drag-helper",!0);Ee.append("path").attr("d",t.attr("d")).style({cursor:"move","stroke-width":oe,"stroke-opacity":"0"});var ye={"fill-opacity":"0"},ue=Math.max(oe/2,he);return Ee.append("circle").attr({"data-line-point":"start-point",cx:l?O(r.xanchor)+r.x0:O(r.x0,R),cy:u?$(r.yanchor)-r.y0:$(r.y0,I),r:ue}).style(ye).classed("cursor-grab",!0),Ee.append("circle").attr({"data-line-point":"end-point",cx:l?O(r.xanchor)+r.x1:O(r.x1,L),cy:u?$(r.yanchor)-r.y1:$(r.y1,B),r:ue}).style(ye).classed("cursor-grab",!0),Ee}function X(he){if(m7(e)){J=null;return}if(c)he.target.tagName==="path"?J="move":J=he.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var oe=q.element.getBoundingClientRect(),Ee=oe.right-oe.left,ye=oe.bottom-oe.top,ue=he.clientX-oe.left,ee=he.clientY-oe.top,ae=!f&&Ee>o&&ye>s&&!he.shiftKey?vme.getCursor(ue/Ee,1-ee/ye):"move";mme(t,ae),J=ae.split("-")[0]}}function H(he){m7(e)||(l&&(g=O(r.xanchor)),u&&(w=$(r.yanchor)),r.type==="path"?S=r.path:(d=l?r.x0:O(r.x0),p=u?r.y0:$(r.y0),v=l?r.x1:O(r.x1),m=u?r.y1:$(r.y1)),d<v?(M=d,y="x0",x=v,E="x1"):(M=v,y="x1",x=d,E="x0"),!u&&p<m||u&&p>m?(b=p,T="y0",_=m,A="y1"):(b=m,T="y1",_=p,A="y0"),X(he),ge(n,r),be(t,r,e),q.moveFn=J==="move"?te:ce,q.altKey=he.altKey)}function G(){m7(e)||(mme(t),Ce(n),Tme(t,e,r),_me.call("_guiRelayout",e,a.getUpdateObj()))}function Q(){m7(e)||Ce(n)}function te(he,oe){if(r.type==="path"){var Ee=function(ee){return ee},ye=Ee,ue=Ee;l?h("xanchor",r.xanchor=Y(g+he)):(ye=function(ae){return Y(O(ae)+he)},k&&k.type==="date"&&(ye=Bh.encodeDate(ye))),u?h("yanchor",r.yanchor=K(w+oe)):(ue=function(ae){return K($(ae)+oe)},F&&F.type==="date"&&(ue=Bh.encodeDate(ue))),h("path",r.path=yme(S,ye,ue))}else l?h("xanchor",r.xanchor=Y(g+he)):(h("x0",r.x0=Y(d+he)),h("x1",r.x1=Y(v+he))),u?h("yanchor",r.yanchor=K(w+oe)):(h("y0",r.y0=K(p+oe)),h("y1",r.y1=K(m+oe)));t.attr("d",TH(e,r)),ge(n,r),y7(e,i,r,C)}function ce(he,oe){if(f){var Ee=function(et){return et},ye=Ee,ue=Ee;l?h("xanchor",r.xanchor=Y(g+he)):(ye=function(_t){return Y(O(_t)+he)},k&&k.type==="date"&&(ye=Bh.encodeDate(ye))),u?h("yanchor",r.yanchor=K(w+oe)):(ue=function(_t){return K($(_t)+oe)},F&&F.type==="date"&&(ue=Bh.encodeDate(ue))),h("path",r.path=yme(S,ye,ue))}else if(c){if(J==="resize-over-start-point"){var ee=d+he,ae=u?p-oe:p+oe;h("x0",r.x0=l?ee:Y(ee)),h("y0",r.y0=u?ae:K(ae))}else if(J==="resize-over-end-point"){var xe=v+he,re=u?m-oe:m+oe;h("x1",r.x1=l?xe:Y(xe)),h("y1",r.y1=u?re:K(re))}}else{var pe=function(et){return J.indexOf(et)!==-1},we=pe("n"),Fe=pe("s"),Se=pe("w"),ke=pe("e"),_e=we?b+oe:b,Ie=Fe?_+oe:_,Oe=Se?M+he:M,Qe=ke?x+he:x;u&&(we&&(_e=b-oe),Fe&&(Ie=_-oe)),(!u&&Ie-_e>s||u&&_e-Ie>s)&&(h(T,r[T]=u?_e:K(_e)),h(A,r[A]=u?Ie:K(Ie))),Qe-Oe>o&&(h(y,r[y]=l?Oe:Y(Oe)),h(E,r[E]=l?Qe:Y(Qe)))}t.attr("d",TH(e,r)),ge(n,r),y7(e,i,r,C)}function ge(he,oe){(l||u)&&Ee();function Ee(){var ye=oe.type!=="path",ue=he.selectAll(".visual-cue").data([0]),ee=1;ue.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":ee}).classed("visual-cue",!0);var ae=O(l?oe.xanchor:wH.midRange(ye?[oe.x0,oe.x1]:Bh.extractPathCoords(oe.path,d_.paramIsX))),xe=$(u?oe.yanchor:wH.midRange(ye?[oe.y0,oe.y1]:Bh.extractPathCoords(oe.path,d_.paramIsY)));if(ae=Bh.roundPositionForSharpStrokeRendering(ae,ee),xe=Bh.roundPositionForSharpStrokeRendering(xe,ee),l&&u){var re="M"+(ae-1-ee)+","+(xe-1-ee)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";ue.attr("d",re)}else if(l){var pe="M"+(ae-1-ee)+","+(xe-9-ee)+"v18 h2 v-18 Z";ue.attr("d",pe)}else{var we="M"+(ae-9-ee)+","+(xe-1-ee)+"h18 v2 h-18 Z";ue.attr("d",we)}}}function Ce(he){he.selectAll(".visual-cue").remove()}function be(he,oe,Ee){var ye=oe.xref,ue=oe.yref,ee=h_.getFromId(Ee,ye),ae=h_.getFromId(Ee,ue),xe="";ye!=="paper"&&!ee.autorange&&(xe+=ye),ue!=="paper"&&!ae.autorange&&(xe+=ue),x7.setClipUrl(he,xe?"clip"+Ee._fullLayout._uid+xe:null,Ee)}}function yme(e,t,r){return e.replace(d_.segmentRE,function(i){var n=0,a=i.charAt(0),o=d_.paramIsX[a],s=d_.paramIsY[a],l=d_.numParams[a],u=i.slice(1).replace(d_.paramRE,function(c){return n>=l||(o[n]?c=t(c):s[n]&&(c=r(c)),n++),c});return a+u})}function PMt(e,t){if(_7(e)){var r=t.node(),i=+r.getAttribute("data-index");if(i>=0){if(i===e._fullLayout._activeShapeIndex){xme(e);return}e._fullLayout._activeShapeIndex=i,e._fullLayout._deactivateShape=xme,AH(e)}}}function xme(e){if(_7(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(bme(e),delete e._fullLayout._activeShapeIndex,AH(e))}}function IMt(e){if(_7(e)){bme(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t<r.length){for(var i=[],n=0;n<r.length;n++)n!==t&&i.push(r[n]);return delete e._fullLayout._activeShapeIndex,_me.call("_guiRelayout",e,{shapes:i})}}}});var Sme=W((rPr,Mme)=>{"use strict";var Rw=it()._,RMt=function(e){return{DIALOG_TITLE:Rw(e,"Share chart"),DIALOG_MESSAGE_CLOUD:Rw(e,"This chart will be uploaded to {Plotly Cloud} to create a sharing link. Only you can see it until you change its visibility."),DIALOG_MESSAGE_CLOUD_ACCOUNT:Rw(e,"If you don't have a Plotly Cloud account yet, you'll have a chance to create one."),DIALOG_MESSAGE_OTHER:Rw(e,"This chart will be sent to {serverUrl}."),DIALOG_CANCEL:Rw(e,"Cancel"),DIALOG_CONFIRM:Rw(e,"Share")}};Mme.exports=RMt});var Cme=W((iPr,kme)=>{"use strict";var Eme=vi(),{dfltConfig:zMt}=cy(),BMt=Sme(),qMt=(e,t,r,i,n)=>{let a=BMt(e),o=t.append("div").classed("plotly-cloud-dialog-box",!0);if(o.append("div").classed("plotly-cloud-dialog-title",!0).text(a.DIALOG_TITLE),r===zMt.plotlyServerURL){let l=o.append("div").classed("plotly-cloud-dialog-message",!0),u=new URL(r).origin,c=a.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),f=c[0],h=c[2],d=c[4];l.append("span").text(f),l.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",u).attr("target","_blank").text(h),l.append("span").text(d),l.append("div").classed("plotly-cloud-dialog-message--account",!0).text(a.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let l=new URL(r),u=l.hostname,c=l.origin,f=a.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),h=f[0],d=f[4],p=o.append("div").classed("plotly-cloud-dialog-message",!0);p.append("span").text(h),p.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",c).attr("target","_blank").text(u),p.append("span").text(d)}let s=o.append("div").classed("plotly-cloud-dialog-buttons",!0);s.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(a.DIALOG_CANCEL).on("click",n),s.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(a.DIALOG_CONFIRM).on("click",i)},OMt=(e,t,r)=>{let i=Eme.select(e._fullLayout._paperdiv.node());i.selectAll(".plotly-cloud-dialog").remove();let n=i.append("div").classed("plotly-cloud-dialog",!0),a=()=>{n.remove(),document.removeEventListener("keydown",o)},o=s=>{(s.key==="Escape"||s.keyCode===27)&&a()};document.addEventListener("keydown",o),n.on("click",()=>{Eme.event.target===n.node()&&a()}),qMt(e,n,t,()=>{a(),r()},a)};kme.exports=OMt});var EH=W((nPr,zme)=>{"use strict";var _0=yi(),NMt=Ko(),Fme=Cs(),Ya=o7(),UMt=b7().eraseActiveShape,VMt=Cme(),zw=it(),Ta=zw._,Xa=zme.exports={};Xa.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?Ta(e,"Download plot as a PNG"):Ta(e,"Download plot")},icon:Ya.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};zw.notifier(Ta(e,"Preparing image - this may take a few seconds"),"long",e),["filename","width","height","scale"].forEach(function(i){i in t&&(r[i]=t[i])}),_0.call("downloadImage",e,r).then(function(i){zw.notifier(Ta(e,"Image download succeeded")+" - "+i,"long",e)}).catch(function(){zw.notifier(Ta(e,"Sorry, there was a problem downloading your image!"),"long",e)})}};Xa.downloadJson={name:"downloadJson",title:function(e){return Ta(e,"Download plot as JSON")},icon:Ya.curlybraces,click:function(e){_0.call("downloadImage",e,{format:"full-json"}).then(function(t){zw.notifier(Ta(e,"JSON download succeeded")+" - "+t,"long",e)}).catch(function(){zw.notifier(Ta(e,"Sorry, there was a problem downloading your JSON file!"),"long",e)})}};Xa.sendChartToCloud={name:"sendChartToCloud",title:function(e){return Ta(e,"Share chart...")},icon:Ya.cloudupload,click:function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(!t){console.error("No destination URL provided (plotlyServerURL is empty)");return}var r;try{r=new URL(t)}catch(n){console.error("Invalid plotlyServerURL: "+t);return}let i=["http:","https:"];if(!i.includes(r.protocol)){console.error(`Invalid protocol '${r.protocol}' in plotlyServerURL '${t}'. Must be one of: ${i.join(", ")}`);return}VMt(e,t,function(){NMt.sendDataToCloud(e,t)})}};Xa.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Ta(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Ya.zoombox,click:Tf};Xa.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Ta(e,"Pan")},attr:"dragmode",val:"pan",icon:Ya.pan,click:Tf};Xa.select2d={name:"select2d",_cat:"select",title:function(e){return Ta(e,"Box Select")},attr:"dragmode",val:"select",icon:Ya.selectbox,click:Tf};Xa.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Ta(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Ya.lasso,click:Tf};Xa.drawclosedpath={name:"drawclosedpath",title:function(e){return Ta(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Ya.drawclosedpath,click:Tf};Xa.drawopenpath={name:"drawopenpath",title:function(e){return Ta(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Ya.drawopenpath,click:Tf};Xa.drawline={name:"drawline",title:function(e){return Ta(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Ya.drawline,click:Tf};Xa.drawrect={name:"drawrect",title:function(e){return Ta(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Ya.drawrect,click:Tf};Xa.drawcircle={name:"drawcircle",title:function(e){return Ta(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Ya.drawcircle,click:Tf};Xa.eraseshape={name:"eraseshape",title:function(e){return Ta(e,"Erase active shape")},icon:Ya.eraseshape,click:UMt};Xa.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Ta(e,"Zoom in")},attr:"zoom",val:"in",icon:Ya.zoom_plus,click:Tf};Xa.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Ta(e,"Zoom out")},attr:"zoom",val:"out",icon:Ya.zoom_minus,click:Tf};Xa.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Ta(e,"Autoscale")},attr:"zoom",val:"auto",icon:Ya.autoscale,click:Tf};Xa.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Ta(e,"Reset axes")},attr:"zoom",val:"reset",icon:Ya.home,click:Tf};Xa.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Ta(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Ya.tooltip_basic,gravity:"ne",click:Tf};Xa.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Ta(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Ya.tooltip_compare,gravity:"ne",click:Tf};function Tf(e,t){var r=t.currentTarget,i=r.getAttribute("data-attr"),n=r.getAttribute("data-val")||!0,a=e._fullLayout,o={},s=Fme.list(e,null,!0),l=a._cartesianSpikesEnabled,u,c;if(i==="zoom"){var f=n==="in"?.5:2,h=(1+f)/2,d=(1-f)/2,p,v;for(c=0;c<s.length;c++)if(u=s[c],v=u.modebardisable==="none"||u.modebardisable.indexOf(n==="auto"||n==="reset"?"autoscale":"zoominout")===-1,v&&!u.fixedrange)if(p=u._name,n==="auto")o[p+".autorange"]=!0;else if(n==="reset")u._rangeInitial0===void 0&&u._rangeInitial1===void 0?o[p+".autorange"]=!0:u._rangeInitial0===void 0?(o[p+".autorange"]=u._autorangeInitial,o[p+".range"]=[null,u._rangeInitial1]):u._rangeInitial1===void 0?(o[p+".range"]=[u._rangeInitial0,null],o[p+".autorange"]=u._autorangeInitial):o[p+".range"]=[u._rangeInitial0,u._rangeInitial1],u._showSpikeInitial!==void 0&&(o[p+".showspikes"]=u._showSpikeInitial,l==="on"&&!u._showSpikeInitial&&(l="off"));else{var m=[u.r2l(u.range[0]),u.r2l(u.range[1])],g=[h*m[0]+d*m[1],h*m[1]+d*m[0]];o[p+".range[0]"]=u.l2r(g[0]),o[p+".range[1]"]=u.l2r(g[1])}}else i==="hovermode"&&(n==="x"||n==="y")&&(n=a._isHoriz?"y":"x",r.setAttribute("data-val",n)),o[i]=n;a._cartesianSpikesEnabled=l,_0.call("_guiRelayout",e,o)}Xa.zoom3d={name:"zoom3d",_cat:"zoom",title:function(e){return Ta(e,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:Ya.zoombox,click:T7};Xa.pan3d={name:"pan3d",_cat:"pan",title:function(e){return Ta(e,"Pan")},attr:"scene.dragmode",val:"pan",icon:Ya.pan,click:T7};Xa.orbitRotation={name:"orbitRotation",title:function(e){return Ta(e,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:Ya["3d_rotate"],click:T7};Xa.tableRotation={name:"tableRotation",title:function(e){return Ta(e,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:Ya["z-axis"],click:T7};function T7(e,t){for(var r=t.currentTarget,i=r.getAttribute("data-attr"),n=r.getAttribute("data-val")||!0,a=e._fullLayout._subplots.gl3d||[],o={},s=i.split("."),l=0;l<a.length;l++)o[a[l]+"."+s[1]]=n;var u=n==="pan"?n:"zoom";o.dragmode=u,_0.call("_guiRelayout",e,o)}Xa.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(e){return Ta(e,"Reset camera to default")},attr:"resetDefault",icon:Ya.home,click:MH};Xa.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(e){return Ta(e,"Reset camera to last save")},attr:"resetLastSave",icon:Ya.movie,click:MH};function MH(e,t){for(var r=t.currentTarget,i=r.getAttribute("data-attr"),n=i==="resetLastSave",a=i==="resetDefault",o=e._fullLayout,s=o._subplots.gl3d||[],l={},u=0;u<s.length;u++){var c=s[u],f=c+".camera",h=c+".aspectratio",d=c+".aspectmode",p=o[c]._scene,v;n?(l[f+".up"]=p.viewInitial.up,l[f+".eye"]=p.viewInitial.eye,l[f+".center"]=p.viewInitial.center,v=!0):a&&(l[f+".up"]=null,l[f+".eye"]=null,l[f+".center"]=null,v=!0),v&&(l[h+".x"]=p.viewInitial.aspectratio.x,l[h+".y"]=p.viewInitial.aspectratio.y,l[h+".z"]=p.viewInitial.aspectratio.z,l[d]=p.viewInitial.aspectmode)}_0.call("_guiRelayout",e,l)}Xa.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(e){return Ta(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Ya.tooltip_basic,gravity:"ne",click:GMt};function Lme(e,t){var r=t.currentTarget,i=r._previousVal,n=e._fullLayout,a=n._subplots.gl3d||[],o=["xaxis","yaxis","zaxis"],s={},l={};if(i)l=i,r._previousVal=null;else{for(var u=0;u<a.length;u++){var c=a[u],f=n[c],h=c+".hovermode";s[h]=f.hovermode,l[h]=!1;for(var d=0;d<3;d++){var p=o[d],v=c+"."+p+".showspikes";l[v]=!1,s[v]=f[p].showspikes}}r._previousVal=s}return l}function GMt(e,t){var r=Lme(e,t);_0.call("_guiRelayout",e,r)}Xa.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(e){return Ta(e,"Zoom in")},attr:"zoom",val:"in",icon:Ya.zoom_plus,click:SH};Xa.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(e){return Ta(e,"Zoom out")},attr:"zoom",val:"out",icon:Ya.zoom_minus,click:SH};Xa.resetGeo={name:"resetGeo",_cat:"reset",title:function(e){return Ta(e,"Reset")},attr:"reset",val:null,icon:Ya.autoscale,click:SH};Xa.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(e){return Ta(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Ya.tooltip_basic,gravity:"ne",click:Ime};var Dme=2;function SH(e,t){var s;let r=t.currentTarget,i=r.getAttribute("data-attr"),n=r.getAttribute("data-val")||!0,a=e._fullLayout,o=a._subplots.geo||[];for(let l of o){let u=a[l],c=u._subplot;if(i==="zoom"){let f=c.projection,h=f.scale()/c.fitScale,[d,p]=f.rotate().map(x=>-x),[v,m]=f.invert(c.midPt),{minscale:g}=u.projection,w=(s=u.projection.maxscale)!=null?s:1/0,b=Math.min(g,w),_=Math.max(g,w),M=n==="in"?Dme*h:1/Dme*h;M>_?M=_:M<b&&(M=b),M!==h&&_0.call("_guiRelayout",e,{[l+".projection.scale"]:M,[l+".projection.rotation.lon"]:d,[l+".projection.rotation.lat"]:p,[l+".center.lon"]:v,[l+".center.lat"]:m,[l+".fitbounds"]:!1})}}i==="reset"&&w7(e,"geo")}Xa.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(e){return Ta(e,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:Ya.tooltip_basic,gravity:"ne",click:Ime};function Pme(e){var t=e._fullLayout;return t.hovermode?!1:t._has("cartesian")?t._isHoriz?"y":"x":"closest"}function Ime(e){var t=Pme(e);_0.call("_guiRelayout",e,"hovermode",t)}Xa.resetViewSankey={name:"resetSankeyGroup",title:function(e){return Ta(e,"Reset view")},icon:Ya.home,click:function(e){for(var t={"node.groups":[],"node.x":[],"node.y":[]},r=0;r<e._fullData.length;r++){var i=e._fullData[r]._viewInitial;t["node.groups"].push(i.node.groups.slice()),t["node.x"].push(i.node.x.slice()),t["node.y"].push(i.node.y.slice())}_0.call("restyle",e,t)}};Xa.toggleHover={name:"toggleHover",title:function(e){return Ta(e,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:Ya.tooltip_basic,gravity:"ne",click:function(e,t){var r=Lme(e,t);r.hovermode=Pme(e),_0.call("_guiRelayout",e,r)}};Xa.resetViews={name:"resetViews",title:function(e){return Ta(e,"Reset views")},icon:Ya.home,click:function(e,t){var r=t.currentTarget;r.setAttribute("data-attr","zoom"),r.setAttribute("data-val","reset"),Tf(e,t),r.setAttribute("data-attr","resetLastSave"),MH(e,t),w7(e,"geo"),w7(e,"map")}};Xa.toggleSpikelines={name:"toggleSpikelines",title:function(e){return Ta(e,"Toggle Spike Lines")},icon:Ya.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(e){var t=e._fullLayout,r=t._cartesianSpikesEnabled;t._cartesianSpikesEnabled=r==="on"?"off":"on",_0.call("_guiRelayout",e,HMt(e))}};function HMt(e){for(var t=e._fullLayout,r=t._cartesianSpikesEnabled==="on",i=Fme.list(e,null,!0),n={},a=0;a<i.length;a++){var o=i[a];n[o._name+".showspikes"]=r?!0:o._showSpikeInitial}return n}Xa.resetViewMap={name:"resetViewMap",_cat:"resetView",title:function(e){return Ta(e,"Reset view")},attr:"reset",icon:Ya.home,click:function(e){w7(e,"map")}};Xa.zoomInMap={name:"zoomInMap",_cat:"zoomin",title:function(e){return Ta(e,"Zoom in")},attr:"zoom",val:"in",icon:Ya.zoom_plus,click:Rme};Xa.zoomOutMap={name:"zoomOutMap",_cat:"zoomout",title:function(e){return Ta(e,"Zoom out")},attr:"zoom",val:"out",icon:Ya.zoom_minus,click:Rme};function Rme(e,t){jMt(e,t,"map")}function jMt(e,t,r){for(var i=t.currentTarget,n=i.getAttribute("data-val"),a=e._fullLayout,o=a._subplots[r]||[],s=1.05,l={},u=0;u<o.length;u++){var c=o[u],f=a[c].zoom,h=n==="in"?s*f:f/s;l[c+".zoom"]=h}_0.call("_guiRelayout",e,l)}function w7(e,t){for(var r=e._fullLayout,i=r._subplots[t]||[],n={},a=0;a<i.length;a++)for(var o=i[a],s=r[o]._subplot,l=s.viewInitial,u=Object.keys(l),c=0;c<u.length;c++){var f=u[c];n[o+"."+f]=l[f]}_0.call("_guiRelayout",e,n)}});var kH=W((aPr,Nme)=>{"use strict";var Bme=EH(),$Mt=Object.keys(Bme),qme=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],Ome=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(qme,["downloadJson"]),Bw=[],WMt=function(e){if(Ome.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();Bw.indexOf(t)===-1&&Bw.push(t),Bw.indexOf(r)===-1&&Bw.push(r)}};$Mt.forEach(function(e){WMt(Bme[e])});Bw.sort();Nme.exports={DRAW_MODES:qme,backButtons:Ome,foreButtons:Bw}});var DH={};Fp(DH,{default:()=>XMt});var CH,YMt,XMt,FH=Ea(()=>{"use strict";CH=nd(kH()),YMt={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.",`This may include *${CH.default.backButtons.join("*, *")}*.`].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.",`This may include *${CH.default.foreButtons.join("*, *")}*.`].join(" ")}},XMt=YMt});var Vme=W((oPr,Ume)=>{"use strict";var ZMt=it(),PA=ni(),KMt=Da(),JMt=(FH(),Go(DH)).default;Ume.exports=function(t,r){var i=t.modebar||{},n=KMt.newContainer(r,"modebar");function a(s,l){return ZMt.coerce(i,n,JMt,s,l)}a("orientation"),a("bgcolor",PA.addOpacity(r.paper_bgcolor,.5));var o=PA.contrast(PA.rgb(r.modebar.bgcolor));a("color",PA.addOpacity(o,.3)),a("activecolor",PA.addOpacity(o,.7)),a("uirevision",r.uirevision),a("add"),a("remove")}});var $me=W((sPr,jme)=>{"use strict";var LH=vi(),QMt=sn(),A7=it(),Gme=o7(),eSt=E6().version,tSt=new DOMParser;function Hme(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var d1=Hme.prototype;d1.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,i=this.graphInfo._fullLayout,n="modebar-"+i._uid;this.element.setAttribute("id",n),this.element.setAttribute("role","toolbar"),this._uid=n,this.element.className="modebar modebar--custom",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),i.modebar.orientation==="v"&&(this.element.className+=" vertical",t=t.reverse());var a=i.modebar,o="#"+n+" .modebar-group";document.querySelectorAll(o).forEach(function(f){f.style.backgroundColor=a.bgcolor});var s=!this.hasButtons(t),l=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(s||l||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+" watermark"),i.modebar.orientation==="v"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton(),A7.setStyleOnHover("#"+n+" .modebar-btn",".active",".icon path","fill: "+a.activecolor,"fill: "+a.color,this.element)};d1.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var i=t.createGroup();r.forEach(function(n){var a=n.name;if(!a)throw new Error("must provide button 'name' in button config");if(t.buttonsNames.indexOf(a)!==-1)throw new Error("button name '"+a+"' is taken");t.buttonsNames.push(a);var o=t.createButton(n);t.buttonElements.push(o),i.appendChild(o)}),t.element.appendChild(i)})};d1.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e};d1.createButton=function(e){var t=this,r=document.createElement("button");r.setAttribute("type","button"),r.setAttribute("rel","tooltip"),r.className="modebar-btn";var i=e.title;i===void 0?i=e.name:typeof i=="function"&&(i=i(this.graphInfo)),(i||i===0)&&(r.setAttribute("data-title",i),r.setAttribute("aria-label",i)),e.attr!==void 0&&r.setAttribute("data-attr",e.attr);var n=e.val;n!==void 0&&(typeof n=="function"&&(n=n(this.graphInfo)),r.setAttribute("data-val",n));var a=e.click;if(typeof a!="function")throw new Error("must provide button 'click' function in button config");r.addEventListener("click",function(s){e.click(t.graphInfo,s),t.updateActiveButton(s.currentTarget)}),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&LH.select(r).classed("active",!0);var o=e.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||Gme.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};d1.createIcon=function(e){var t=QMt(e.height)?Number(e.height):e.ascent-e.descent,r="http://www.w3.org/2000/svg",i;if(e.path){i=document.createElementNS(r,"svg"),i.setAttribute("viewBox",[0,0,e.width,t].join(" ")),i.setAttribute("class","icon");var n=document.createElementNS(r,"path");n.setAttribute("d",e.path),e.transform?n.setAttribute("transform",e.transform):e.ascent!==void 0&&n.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),i.appendChild(n)}if(e.svg){var a=tSt.parseFromString(e.svg,"application/xml");i=a.childNodes[0]}return i.setAttribute("height","1em"),i.setAttribute("width","1em"),i};d1.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(i){var n=i.getAttribute("data-val")||!0,a=i.getAttribute("data-attr"),o=i.getAttribute("data-toggle")==="true",s=LH.select(i),l=function(f,h){var d=t.modebar,p=f.querySelector(".icon path");p&&(h||f.matches(":hover")?p.style.fill=d.activecolor:p.style.fill=d.color)};if(o){if(a===r){var u=!s.classed("active");s.classed("active",u),l(i,u)}}else{var c=a===null?a:A7.nestedProperty(t,a).get();s.classed("active",c===n),l(i,c===n)}})};d1.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r<e.length;++r){if(e[r].length!==t[r].length)return!1;for(var i=0;i<e[r].length;i++)if(e[r][i].name!==t[r][i].name)return!1}return!0};function rSt(e){return e+" (v"+eSt+")"}d1.getLogo=function(){var e=this.createGroup(),t=document.createElement("a");return t.href="https://plotly.com/",t.target="_blank",t.setAttribute("data-title",rSt(A7._(this.graphInfo,"Produced with Plotly.js"))),t.className="modebar-btn plotlyjsicon modebar-btn--logo",t.appendChild(this.createIcon(Gme.newplotlylogo)),e.appendChild(t),e};d1.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1};d1.destroy=function(){A7.removeElement(this.container.querySelector(".modebar"))};function iSt(e,t){var r=e._fullLayout,i=new Hme({graphInfo:e,container:r._modebardiv.node(),buttons:t});return r._privateplot&&LH.select(i.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),i}jme.exports=iSt});var Xme=W((lPr,Yme)=>{"use strict";var nSt=Cs(),Wme=$o(),PH=yi(),aSt=Kf().isUnifiedHover,oSt=$me(),M7=EH(),sSt=kH().DRAW_MODES,lSt=it().extendDeep;Yme.exports=function(t){var r=t._fullLayout,i=t._context,n=r._modeBar;if(!i.displayModeBar&&!i.watermark){n&&(n.destroy(),delete r._modeBar);return}if(!Array.isArray(i.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(i.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var a=i.modeBarButtons,o;Array.isArray(a)&&a.length?o=pSt(a):!i.displayModeBar&&i.watermark?o=[]:o=uSt(t),n?n.update(t,o):r._modeBar=oSt(t,o)};function uSt(e){var t=e._fullLayout,r=e._fullData,i=e._context;function n(L,I){if(typeof I=="string"){if(I.toLowerCase()===L.toLowerCase())return!0}else{var B=I.name,O=I._cat||I.name;if(B===L||O===L.toLowerCase())return!0}return!1}var a=t.modebar.add;typeof a=="string"&&(a=[a]);var o=t.modebar.remove;typeof o=="string"&&(o=[o]);var s=i.modeBarButtonsToAdd.concat(a.filter(function(L){for(var I=0;I<i.modeBarButtonsToRemove.length;I++)if(n(L,i.modeBarButtonsToRemove[I]))return!1;return!0})),l=i.modeBarButtonsToRemove.concat(o.filter(function(L){for(var I=0;I<i.modeBarButtonsToAdd.length;I++)if(n(L,i.modeBarButtonsToAdd[I]))return!1;return!0})),u=t._has("cartesian"),c=t._has("gl3d"),f=t._has("geo"),h=t._has("pie"),d=t._has("funnelarea"),p=t._has("ternary"),v=t._has("map"),m=t._has("polar"),g=t._has("smith"),w=t._has("sankey"),b=cSt(t),_=aSt(t.hovermode),M=[];function x(L){if(L.length){for(var I=[],B=0;B<L.length;B++){for(var O=L[B],$=M7[O],Y=$.name.toLowerCase(),K=($._cat||$.name).toLowerCase(),j=!1,q=0;q<l.length;q++){var J=l[q].toLowerCase();if(J===Y||J===K){j=!0;break}}j||I.push(M7[O])}M.push(I)}}var T=!1,A=[],y=[],E=[],S=[];(u||h||d||p)+f+c+v+m+g>1?(y=["toggleHover"],E=["resetViews"]):f?(A=["zoomInGeo","zoomOutGeo"],y=["hoverClosestGeo"],E=["resetGeo"]):c?(y=["hoverClosest3d"],E=["resetCameraDefault3d","resetCameraLastSave3d"]):v?(A=["zoomInMap","zoomOutMap"],y=["toggleHover"],E=["resetViewMap"]):h?y=["hoverClosestPie"]:w?(y=["hoverClosestCartesian","hoverCompareCartesian"],E=["resetViewSankey"]):y=["toggleHover"],u&&y.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(hSt(r)||_)&&(y=[]),u&&!b&&(A=["zoomIn2d","zoomOut2d","autoScale2d"],E[0]!=="resetViews"&&(E=["resetScale2d"])),c?S=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!b||p?S=["zoom2d","pan2d"]:v||f?S=["pan2d"]:m&&(S=["zoom2d"]),fSt(r)&&S.push("select2d","lasso2d");var C=[],k=function(L){C.indexOf(L)===-1&&y.indexOf(L)!==-1&&C.push(L)};if(Array.isArray(s)){for(var D=[],F=0;F<s.length;F++){var P=s[F];typeof P=="string"?(P=P.toLowerCase(),sSt.indexOf(P)!==-1?(t._has("map")||t._has("cartesian"))&&S.push(P):P==="togglespikelines"?k("toggleSpikelines"):P==="togglehover"?k("toggleHover"):P==="hovercompare"?k("hoverCompareCartesian"):P==="hoverclosest"?(k("hoverClosestCartesian"),k("hoverClosestGeo"),k("hoverClosest3d"),k("hoverClosestPie")):P==="v1hovermode"?(k("hoverClosestCartesian"),k("hoverCompareCartesian"),k("hoverClosestGeo"),k("hoverClosest3d"),k("hoverClosestPie")):P==="downloadjson"&&(T=!0)):D.push(P)}s=D}var R=["toImage"];return T&&R.push("downloadJson"),i.showSendToCloud&&R.push("sendChartToCloud"),x(R),x(S),x(A.concat(E)),x(C),dSt(M,s)}function cSt(e){for(var t=nSt.list({_fullLayout:e},null,!0),r=0;r<t.length;r++){var i=t[r].modebardisable;if(!t[r].fixedrange&&i!=="autoscale+zoominout"&&i!=="zoominout+autoscale")return!1}return!0}function fSt(e){for(var t=!1,r=0;r<e.length&&!t;r++){var i=e[r];!i._module||!i._module.selectPoints||(PH.traceIs(i,"scatter-like")&&i.type!=="quiver"?(Wme.hasMarkers(i)||Wme.hasText(i))&&(t=!0):PH.traceIs(i,"box-violin")?(i.boxpoints==="all"||i.points==="all")&&(t=!0):t=!0)}return t}function hSt(e){for(var t=0;t<e.length;t++)if(!PH.traceIs(e[t],"noHover"))return!1;return!0}function dSt(e,t){if(t.length)if(Array.isArray(t[0]))for(var r=0;r<t.length;r++)e.push(t[r]);else e.push(t);return e}function pSt(e){for(var t=lSt([],e),r=0;r<t.length;r++)for(var i=t[r],n=0;n<i.length;n++){var a=i[n];if(typeof a=="string")if(M7[a]!==void 0)t[r][n]=M7[a];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return t}});var IH=W((uPr,Zme)=>{"use strict";Zme.exports={moduleType:"component",name:"modebar",layoutAttributes:(FH(),Go(DH)).default,supplyLayoutDefaults:Vme(),manage:Xme()}});var RH=W((cPr,Kme)=>{"use strict";var vSt=Hl().FROM_BL;Kme.exports=function(t,r,i){i===void 0&&(i=vSt[t.constraintoward||"center"]);var n=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=n[0]+(n[1]-n[0])*i;t.range=t._input.range=[t.l2r(a+(n[0]-a)*r),t.l2r(a+(n[1]-a)*r)],t.setScale()}});var v_=W(IA=>{"use strict";var p_=it(),zH=Op(),Up=Cs().id2name,gSt=ec(),Jme=RH(),mSt=i1(),ySt=Kn().ALMOST_EQUAL,xSt=Hl().FROM_BL;IA.handleDefaults=function(e,t,r){var i=r.axIds,n=r.axHasImage,a=t._axisConstraintGroups=[],o=t._axisMatchGroups=[],s,l,u,c,f,h,d,p;for(s=0;s<i.length;s++)c=Up(i[s]),f=e[c],h=t[c],_St(f,h,{axIds:i,layoutOut:t,hasImage:n[c]});function v(A,y){for(s=0;s<A.length;s++){l=A[s];for(u in l)t[Up(u)][y]=l}}for(v(o,"_matchGroup"),s=0;s<a.length;s++){l=a[s];for(u in l)if(h=t[Up(u)],h.fixedrange){for(var m in l){var g=Up(m);(e[g]||{}).fixedrange===!1&&p_.warn("fixedrange was specified as false for axis "+g+" but was overridden because another axis in its constraint group has fixedrange true"),t[g].fixedrange=!0}break}}for(s=0;s<a.length;){l=a[s];for(u in l){h=t[Up(u)],h._matchGroup&&Object.keys(h._matchGroup).length===Object.keys(l).length&&(a.splice(s,1),s--);break}s++}v(a,"_constraintGroup");var w=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],b=!1,_=!1;function M(){p=h[d],d==="rangebreaks"&&(_=h._hasDayOfWeekBreaks)}for(s=0;s<o.length;s++){l=o[s];for(var x=0;x<w.length;x++){d=w[x],p=null;var T;for(u in l)if(c=Up(u),f=e[c],h=t[c],d in h){if(!h.matches&&(T=h,d in f)){M();break}p===null&&d in f&&M()}if(d==="range"&&p&&f.range&&f.range.length===2&&f.range[0]!==null&&f.range[1]!==null&&(b=!0),d==="autorange"&&p===null&&b&&(p=!1),p===null&&d in T&&(p=T[d]),p!==null)for(u in l)h=t[Up(u)],h[d]=d==="range"?p.slice():p,d==="rangebreaks"&&(h._hasDayOfWeekBreaks=_,mSt(h,t))}}};function _St(e,t,r){var i=r.axIds,n=r.layoutOut,a=r.hasImage,o=n._axisConstraintGroups,s=n._axisMatchGroups,l=t._id,u=l.charAt(0),c=((n._splomAxes||{})[u]||{})[l]||{},f=t._id,h=f.charAt(0)==="x";t._matchGroup=null,t._constraintGroup=null;function d(C,k){return p_.coerce(e,t,gSt,C,k)}d("constrain",a?"domain":"range"),p_.coerce(e,t,{constraintoward:{valType:"enumerated",values:h?["left","center","right"]:["bottom","middle","top"],dflt:h?"center":"middle"}},"constraintoward");var p=t.type,v,m,g=[];for(v=0;v<i.length;v++)if(m=i[v],m!==f){var w=n[Up(m)];w.type===p&&g.push(m)}var b=tye(o,f);if(b){var _=[];for(v=0;v<g.length;v++)m=g[v],b[m]||_.push(m);g=_}var M=g.length,x,T;M&&(e.matches||c.matches)&&(x=p_.coerce(e,t,{matches:{valType:"enumerated",values:g,dflt:g.indexOf(c.matches)!==-1?c.matches:void 0}},"matches"));var A=a&&!h?t.anchor:void 0;if(M&&!x&&(e.scaleanchor||A)&&(T=p_.coerce(e,t,{scaleanchor:{valType:"enumerated",values:g.concat([!1])}},"scaleanchor",A)),x){t._matchGroup=BH(s,f,x,1);var y=n[Up(x)],E=Qme(n,t)/Qme(n,y);h!==(x.charAt(0)==="x")&&(E=(h?"x":"y")+E),BH(o,f,x,E)}else e.matches&&i.indexOf(e.matches)!==-1&&p_.warn("ignored "+t._name+'.matches: "'+e.matches+'" to avoid an infinite loop');if(T){var S=d("scaleratio");S||(S=t.scaleratio=1),BH(o,f,T,S)}else e.scaleanchor&&i.indexOf(e.scaleanchor)!==-1&&p_.warn("ignored "+t._name+'.scaleanchor: "'+e.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function Qme(e,t){var r=t.domain;return r||(r=e[Up(t.overlaying)].domain),r[1]-r[0]}function tye(e,t){for(var r=0;r<e.length;r++)if(e[r][t])return e[r];return null}function BH(e,t,r,i){var n,a,o,s,l,u=tye(e,t);u===null?(u={},u[t]=1,l=e.length,e.push(u)):l=e.indexOf(u);var c=Object.keys(u);for(n=0;n<e.length;n++)if(o=e[n],n!==l&&o[r]){var f=o[r];for(a=0;a<c.length;a++)s=c[a],o[s]=qH(f,qH(i,u[s]));e.splice(l,1);return}if(i!==1)for(a=0;a<c.length;a++){var h=c[a];u[h]=qH(i,u[h])}u[r]=1}function qH(e,t){var r="",i="",n,a;typeof e=="string"&&(r=e.match(/^[xy]*/)[0],n=r.length,e=+e.slice(n)),typeof t=="string"&&(i=t.match(/^[xy]*/)[0],a=i.length,t=+t.slice(a));var o=e*t;return!n&&!a?o:!n||!a||r.charAt(0)===i.charAt(0)?r+i+e*t:n===a?o:(n>a?r.slice(a):i.slice(n))+o}function bSt(e,t){for(var r=t._size,i=r.h/r.w,n={},a=Object.keys(e),o=0;o<a.length;o++){var s=a[o],l=e[s];if(typeof l=="string"){var u=l.match(/^[xy]*/)[0],c=u.length;l=+l.slice(c);for(var f=u.charAt(0)==="y"?i:1/i,h=0;h<c;h++)l*=f}n[s]=l}return n}IA.enforce=function(t){var r=t._fullLayout,i=r._axisConstraintGroups||[],n,a,o,s,l,u,c,f;for(n=0;n<i.length;n++){o=bSt(i[n],r);var h=Object.keys(o),d=1/0,p=0,v=1/0,m={},g={},w=!1;for(a=0;a<h.length;a++)s=h[a],g[s]=l=r[Up(s)],l._inputDomain?l.domain=l._inputDomain.slice():l._inputDomain=l.domain.slice(),l._inputRange||(l._inputRange=l.range.slice()),l.setScale(),m[s]=u=Math.abs(l._m)/o[s],d=Math.min(d,u),(l.constrain==="domain"||!l._constraintShrinkable)&&(v=Math.min(v,u)),delete l._constraintShrinkable,p=Math.max(p,u),l.constrain==="domain"&&(w=!0);if(!(d>ySt*p&&!w)){for(a=0;a<h.length;a++)if(s=h[a],u=m[s],l=g[s],c=l.constrain,u!==v||c==="domain")if(f=u/v,c==="range")Jme(l,f);else{var b=l._inputDomain,_=(l.domain[1]-l.domain[0])/(b[1]-b[0]),M=(l.r2l(l.range[1])-l.r2l(l.range[0]))/(l.r2l(l._inputRange[1])-l.r2l(l._inputRange[0]));if(f/=_,f*M<1){l.domain=l._input.domain=b.slice(),Jme(l,f);continue}if(M<1&&(l.range=l._input.range=l._inputRange.slice(),f*=M),l.autorange){var x=l.r2l(l.range[0]),T=l.r2l(l.range[1]),A=(x+T)/2,y=A,E=A,S=Math.abs(T-A),C=A-S*f*1.0001,k=A+S*f*1.0001,D=zH.makePadFn(r,l,0),F=zH.makePadFn(r,l,1);eye(l,f);var P=Math.abs(l._m),R=zH.concatExtremes(t,l),L=R.min,I=R.max,B,O;for(O=0;O<L.length;O++)B=L[O].val-D(L[O])/P,B>C&&B<y&&(y=B);for(O=0;O<I.length;O++)B=I[O].val+F(I[O])/P,B<k&&B>E&&(E=B);var $=(E-y)/(2*S);f/=$,y=l.l2r(y),E=l.l2r(E),l.range=l._input.range=x<T?[y,E]:[E,y]}eye(l,f)}}}};IA.getAxisGroup=function(t,r){for(var i=t._axisMatchGroups,n=0;n<i.length;n++){var a=i[n];if(a[r])return"g"+n}return r};IA.clean=function(t,r){if(r._inputDomain){for(var i=!1,n=r._id,a=t._fullLayout._axisConstraintGroups,o=0;o<a.length;o++)if(a[o][n]){i=!0;break}(!i||r.constrain!=="domain")&&(r._input.domain=r.domain=r._inputDomain,delete r._inputDomain)}};function eye(e,t){var r=e._inputDomain,i=xSt[e.constraintoward],n=r[0]+(r[1]-r[0])*i;e.domain=e._input.domain=[n+(r[0]-n)/t,n+(r[1]-n)/t],e.setScale()}});var BA=W(Pu=>{"use strict";var E7=vi(),Af=yi(),b0=Ko(),hd=it(),OH=uo(),NH=CA(),RA=ni(),qw=Ji(),rye=e_(),sye=IH(),zA=ji(),qg=Hl(),lye=v_(),wSt=lye.enforce,TSt=lye.clean,iye=Op().doAutoRange,uye="start",ASt="middle",cye="end",MSt=Gl().zindexSeparator;Pu.layoutStyles=function(e){return hd.syncOrAsync([b0.doAutoMargin,ESt],e)};function SSt(e,t,r){for(var i=0;i<r.length;i++){var n=r[i][0],a=r[i][1];if(!(n[0]>=e[1]||n[1]<=e[0])&&a[0]<t[1]&&a[1]>t[0])return!0}return!1}function ESt(e){var t=e._fullLayout,r=t._size,i=r.p,n=zA.list(e,"",!0),a,o,s,l,u,c;if(t._paperdiv.style({width:e._context.responsive&&t.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":t.width+"px",height:e._context.responsive&&t.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":t.height+"px"}).selectAll(".main-svg").call(qw.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),Pu.drawMainTitle(e),sye.manage(e),!t._has("cartesian"))return b0.previousPromises(e);function f(H,G,Q){var te=H._lw/2;if(H._id.charAt(0)==="x"){if(G){if(Q==="top")return G._offset-i-te}else return r.t+r.h*(1-(H.position||0))+te%1;return G._offset+G._length+i+te}if(G){if(Q==="right")return G._offset+G._length+i+te}else return r.l+r.w*(H.position||0)+te%1;return G._offset-i-te}for(a=0;a<n.length;a++){l=n[a];var h=l._anchorAxis;l._linepositions={},l._lw=qw.crispRound(e,l.linewidth,1),l._mainLinePosition=f(l,h,l.side),l._mainMirrorPosition=l.mirror&&h?f(l,h,qg.OPPOSITE_SIDE[l.side]):null}var d=[],p=[],v=[],m=RA.opacity(t.paper_bgcolor)===1&&RA.opacity(t.plot_bgcolor)===1&&t.paper_bgcolor===t.plot_bgcolor;for(o in t._plots)if(s=t._plots[o],s.mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var g=s.xaxis.domain,w=s.yaxis.domain,b=s.plotgroup;if(SSt(g,w,v)&&o.indexOf(MSt)===-1){var _=b.node(),M=s.bg=hd.ensureSingle(b,"rect","bg");_.insertBefore(M.node(),_.childNodes[0]),p.push(o)}else b.select("rect.bg").remove(),v.push([g,w]),m||(d.push(o),p.push(o))}var x=t._bgLayer.selectAll(".bg").data(d);for(x.enter().append("rect").classed("bg",!0),x.exit().remove(),x.each(function(H){t._plots[H].bg=E7.select(this)}),a=0;a<p.length;a++)s=t._plots[p[a]],u=s.xaxis,c=s.yaxis,s.bg&&u._offset!==void 0&&c._offset!==void 0&&s.bg.call(qw.setRect,u._offset-i,c._offset-i,u._length+2*i,c._length+2*i).call(RA.fill,t.plot_bgcolor).style("stroke-width",0);if(!t._hasOnlyLargeSploms)for(o in t._plots){s=t._plots[o],u=s.xaxis,c=s.yaxis;var T=s.clipId="clip"+t._uid+o+"plot",A=hd.ensureSingleById(t._clips,"clipPath",T,function(H){H.classed("plotclip",!0).append("rect")});s.clipRect=A.select("rect").attr({width:u._length,height:c._length}),qw.setTranslate(s.plot,u._offset,c._offset);var y,E;s._hasClipOnAxisFalse?(y=null,E=T):(y=T,E=null),qw.setClipUrl(s.plot,y,e),s.layerClipId=E}var S,C,k,D,F,P,R,L,I,B,O,$,Y;function K(H){return"M"+S+","+H+"H"+C}function j(H){return"M"+u._offset+","+H+"h"+u._length}function q(H){return"M"+H+","+L+"V"+R}function J(H){return c._shift!==void 0&&(H+=c._shift),"M"+H+","+c._offset+"v"+c._length}function U(H,G,Q){if(!H.showline||o!==H._mainSubplot)return"";if(!H._anchorAxis)return Q(H._mainLinePosition);var te=G(H._mainLinePosition);return H.mirror&&(te+=G(H._mainMirrorPosition)),te}for(o in t._plots){s=t._plots[o],u=s.xaxis,c=s.yaxis;var V="M0,0";nye(u,o)&&(F=S7(u,"left",c,n),S=u._offset-(F?i+F:0),P=S7(u,"right",c,n),C=u._offset+u._length+(P?i+P:0),k=f(u,c,"bottom"),D=f(u,c,"top"),Y=!u._anchorAxis||o!==u._mainSubplot,Y&&(u.mirror==="allticks"||u.mirror==="all")&&(u._linepositions[o]=[k,D]),V=U(u,K,j),Y&&u.showline&&(u.mirror==="all"||u.mirror==="allticks")&&(V+=K(k)+K(D)),s.xlines.style("stroke-width",u._lw+"px").call(RA.stroke,u.showline?u.linecolor:"rgba(0,0,0,0)")),s.xlines.attr("d",V);var X="M0,0";nye(c,o)&&(O=S7(c,"bottom",u,n),R=c._offset+c._length+(O?i:0),$=S7(c,"top",u,n),L=c._offset-($?i:0),I=f(c,u,"left"),B=f(c,u,"right"),Y=!c._anchorAxis||o!==c._mainSubplot,Y&&(c.mirror==="allticks"||c.mirror==="all")&&(c._linepositions[o]=[I,B]),X=U(c,q,J),Y&&c.showline&&(c.mirror==="all"||c.mirror==="allticks")&&(X+=q(I)+q(B)),s.ylines.style("stroke-width",c._lw+"px").call(RA.stroke,c.showline?c.linecolor:"rgba(0,0,0,0)")),s.ylines.attr("d",X)}return zA.makeClipPaths(e),b0.previousPromises(e)}function nye(e,t){return(e.ticks||e.showline)&&(t===e._mainSubplot||e.mirror==="all"||e.mirror==="allticks")}function aye(e,t,r){if(!r.showline||!r._lw)return!1;if(r.mirror==="all"||r.mirror==="allticks")return!0;var i=r._anchorAxis;if(!i)return!1;var n=qg.FROM_BL[t];return r.side===t?i.domain[n]===e.domain[n]:r.mirror&&i.domain[1-n]===e.domain[1-n]}function S7(e,t,r,i){if(aye(e,t,r))return r._lw;for(var n=0;n<i.length;n++){var a=i[n];if(a._mainAxis===r._mainAxis&&aye(e,t,a))return a._lw}return 0}Pu.drawMainTitle=function(e){var t=e._fullLayout.title,r=e._fullLayout,i=ISt(r),n=RSt(r),a=PSt(r,n),o=LSt(r,i);if(rye.draw(e,"gtitle",{propContainer:r,propName:"title.text",subtitlePropName:"title.subtitle.text",placeholder:r._dfltTitle.plot,subtitlePlaceholder:r._dfltTitle.subtitle,attributes:{x:o,y:a,"text-anchor":i,dy:n}}),t.text&&t.automargin){var s=E7.select(e).selectAll(".gtitle"),l=qw.bBox(E7.select(e).selectAll(".g-gtitle").node()).height,u=DSt(e,t,l);if(u>0){FSt(e,a,u,l),s.attr({x:o,y:a,"text-anchor":i,dy:oye(t.yanchor)}).call(OH.positionText,o,a);var c=(t.text.match(OH.BR_TAG_ALL)||[]).length;if(c){var f=qg.LINE_SPACING*c+qg.MID_SHIFT;t.y===0&&(f=-f),s.selectAll(".line").each(function(){var m=+this.getAttribute("dy").slice(0,-2)-f+"em";this.setAttribute("dy",m)})}var h=E7.select(e).selectAll(".gtitle-subtitle");if(h.node()){var d=s.node().getBBox(),p=d.y+d.height,v=p+rye.SUBTITLE_PADDING_EM*t.subtitle.font.size;h.attr({x:o,y:v,"text-anchor":i,dy:oye(t.yanchor)}).call(OH.positionText,o,v)}}}};function kSt(e,t,r,i,n){var a=t.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=hd.isTopAnchor(t)?i:i-n,s=r==="b"?a-o:o;return hd.isTopAnchor(t)&&r==="t"||hd.isBottomAnchor(t)&&r==="b"?!1:s<n}function CSt(e,t,r,i,n){var a=0;return r==="middle"&&(a+=n/2),e==="t"?(r==="top"&&(a+=n),a+=i-t*i):(r==="bottom"&&(a+=n),a+=t*i),a}function DSt(e,t,r){var i=t.y,n=t.yanchor,a=i>.5?"t":"b",o=e._fullLayout.margin[a],s=0;return t.yref==="paper"?s=r+t.pad.t+t.pad.b:t.yref==="container"&&(s=CSt(a,i,n,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function FSt(e,t,r,i){var n="title.automargin",a=e._fullLayout.title,o=a.y>.5?"t":"b",s={x:a.x,y:a.y,t:0,b:0},l={};a.yref==="paper"&&kSt(e,a,o,t,i)?s[o]=r:a.yref==="container"&&(l[o]=r,e._fullLayout._reservedMargin[n]=l),b0.allowAutoMargin(e,n),b0.autoMargin(e,n,s)}function LSt(e,t){var r=e.title,i=e._size,n=0;return t===uye?n=r.pad.l:t===cye&&(n=-r.pad.r),r.xref==="paper"?i.l+i.w*r.x+n:e.width*r.x+n}function PSt(e,t){var r=e.title,i=e._size,n=0;return t==="0em"||!t?n=-r.pad.b:t===qg.CAP_SHIFT+"em"&&(n=r.pad.t),r.y==="auto"?i.t/2:r.yref==="paper"?i.t+i.h-i.h*r.y+n:e.height-e.height*r.y+n}function oye(e){return e==="top"?qg.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":qg.MID_SHIFT+"em"}function ISt(e){var t=e.title,r=ASt;return hd.isRightAnchor(t)?r=cye:hd.isLeftAnchor(t)&&(r=uye),r}function RSt(e){var t=e.title,r="0em";return hd.isTopAnchor(t)?r=qg.CAP_SHIFT+"em":hd.isMiddleAnchor(t)&&(r=qg.MID_SHIFT+"em"),r}Pu.doTraceStyle=function(e){var t=e.calcdata,r=[],i;for(i=0;i<t.length;i++){var n=t[i],a=n[0]||{},o=a.trace||{},s=o._module||{},l=s.arraysToCalcdata;l&&l(n,o);var u=s.editStyle;u&&r.push({fn:u,cd0:a})}if(r.length){for(i=0;i<r.length;i++){var c=r[i];c.fn(e,c.cd0)}NH(e),Pu.redrawReglTraces(e)}return b0.style(e),Af.getComponentMethod("legend","draw")(e),b0.previousPromises(e)};Pu.doColorBars=function(e){return Af.getComponentMethod("colorbar","draw")(e),b0.previousPromises(e)};Pu.layoutReplot=function(e){var t=e.layout;return e.layout=void 0,Af.call("_doPlot",e,"",t)};Pu.doLegend=function(e){return Af.getComponentMethod("legend","draw")(e),b0.previousPromises(e)};Pu.doTicksRelayout=function(e){var t=zA.draw(e,"redraw");return e._fullLayout._hasOnlyLargeSploms&&(Af.subplotsRegistry.splom.updateGrid(e),NH(e),Pu.redrawReglTraces(e)),Pu.drawMainTitle(e),Promise.resolve(t).then(function(){return b0.previousPromises(e)})};Pu.doModeBar=function(e){var t=e._fullLayout;sye.manage(e);for(var r=0;r<t._basePlotModules.length;r++){var i=t._basePlotModules[r].updateFx;i&&i(e)}return b0.previousPromises(e)};Pu.doCamera=function(e){for(var t=e._fullLayout,r=t._subplots.gl3d,i=0;i<r.length;i++){var n=t[r[i]],a=n._scene;a.setViewport(n)}};Pu.drawData=function(e){var t=e._fullLayout;NH(e);for(var r=t._basePlotModules,i=0;i<r.length;i++)r[i].plot(e);return Pu.redrawReglTraces(e),b0.style(e),Af.getComponentMethod("selections","draw")(e),Af.getComponentMethod("shapes","draw")(e),Af.getComponentMethod("annotations","draw")(e),Af.getComponentMethod("images","draw")(e),t._replotting=!1,b0.previousPromises(e)};Pu.redrawReglTraces=function(e){var t=e._fullLayout;if(t._has("regl")){var r=e._fullData,i=[],n=[],a,o;for(t._hasOnlyLargeSploms&&t._splomGrid.draw(),a=0;a<r.length;a++){var s=r[a];s.visible===!0&&s._length!==0&&(s.type==="splom"?t._splomScenes[s.uid].draw():s.type==="scattergl"?hd.pushUnique(i,s.xaxis+s.yaxis):s.type==="scatterpolargl"&&hd.pushUnique(n,s.subplot))}for(a=0;a<i.length;a++)o=t._plots[i[a]],o._scene&&o._scene.draw();for(a=0;a<n.length;a++)o=t[n[a]]._subplot,o._scene&&o._scene.draw()}};Pu.doAutoRangeAndConstraints=function(e){for(var t=zA.list(e,"",!0),r,i={},n=0;n<t.length;n++)if(r=t[n],!i[r._id]){i[r._id]=1,TSt(e,r),iye(e,r);var a=r._matchGroup;if(a)for(var o in a){var s=zA.getFromId(e,o);iye(e,s,r.range),i[o]=1}}wSt(e)};Pu.finalDraw=function(e){Af.getComponentMethod("rangeslider","draw")(e),Af.getComponentMethod("rangeselector","draw")(e)};Pu.drawMarginPushers=function(e){Af.getComponentMethod("legend","draw")(e),Af.getComponentMethod("rangeselector","draw")(e),Af.getComponentMethod("sliders","draw")(e),Af.getComponentMethod("updatemenus","draw")(e),Af.getComponentMethod("colorbar","draw")(e)}});var GH=W((dPr,vye)=>{"use strict";var zSt=Py().readPaths,BSt=g7(),fye=by().clearOutlineControllers,UH=ni(),hye=Ji(),qSt=Da().arrayEditor,dye=zy(),OSt=dye.getPathString;vye.exports={draw:k7,drawOne:pye,activateLastSelection:VSt};function k7(e){var t=e._fullLayout;fye(e),t._selectionLayer.selectAll("path").remove();for(var r in t._plots){var i=t._plots[r].selectionLayer;i&&i.selectAll("path").remove()}for(var n=0;n<t.selections.length;n++)pye(e,n)}function C7(e){return e._context.editSelection}function pye(e,t){e._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+t+'"]').remove();var r=dye.makeSelectionsOptionsAndPlotinfo(e,t),i=r.options,n=r.plotinfo;if(!i._input)return;a(e._fullLayout._selectionLayer);function a(o){var s=OSt(e,i),l={"data-index":t,"fill-rule":"evenodd",d:s},u=i.opacity,c="rgba(0,0,0,0)",f=i.line.color||UH.contrast(e._fullLayout.plot_bgcolor),h=i.line.width,d=i.line.dash;h||(h=5,d="solid");var p=C7(e)&&e._fullLayout._activeSelectionIndex===t;p&&(c=e._fullLayout.activeselection.fillcolor,u=e._fullLayout.activeselection.opacity);for(var v=[],m=1;m>=0;m--){var g=o.append("path").attr(l).style("opacity",m?.1:u).call(UH.stroke,f).call(UH.fill,c).call(hye.dashLine,m?"solid":d,m?4+h:h);if(NSt(g,e,i),p){var w=qSt(e.layout,"selections",i);g.style({cursor:"move"});var b={element:g.node(),plotinfo:n,gd:e,editHelpers:w,isActiveSelection:!0},_=zSt(s,e);BSt(_,g,b)}else g.style("pointer-events",m?"all":"none");v[m]=g}var M=v[0],x=v[1];x.node().addEventListener("click",function(){return USt(e,M)})}}function NSt(e,t,r){var i=r.xref+r.yref;hye.setClipUrl(e,"clip"+t._fullLayout._uid+i,t)}function USt(e,t){if(C7(e)){var r=t.node(),i=+r.getAttribute("data-index");if(i>=0){if(i===e._fullLayout._activeSelectionIndex){VH(e);return}e._fullLayout._activeSelectionIndex=i,e._fullLayout._deactivateSelection=VH,k7(e)}}}function VSt(e){if(C7(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=VH,k7(e)}}function VH(e){if(C7(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(fye(e),delete e._fullLayout._activeSelectionIndex,k7(e))}}});var mye=W((pPr,gye)=>{function GSt(){var e,t=0,r=!1;function i(n,a){return e.list.push({type:n,data:a?JSON.parse(JSON.stringify(a)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(n,a){return i("check",{seg1:n,seg2:a})},segmentChop:function(n,a){return i("div_seg",{seg:n,pt:a}),i("chop",{seg:n,pt:a})},statusRemove:function(n){return i("pop_seg",{seg:n})},segmentUpdate:function(n){return i("seg_update",{seg:n})},segmentNew:function(n,a){return i("new_seg",{seg:n,primary:a})},segmentRemove:function(n){return i("rem_seg",{seg:n})},tempStatus:function(n,a,o){return i("temp_status",{seg:n,above:a,below:o})},rewind:function(n){return i("rewind",{seg:n})},status:function(n,a,o){return i("status",{seg:n,above:a,below:o})},vert:function(n){return n===r?e:(r=n,i("vert",{x:n}))},log:function(n){return typeof n!="string"&&(n=JSON.stringify(n,!1," ")),i("log",{txt:n})},reset:function(){return i("reset")},selected:function(n){return i("selected",{segs:n})},chainStart:function(n){return i("chain_start",{seg:n})},chainRemoveHead:function(n,a){return i("chain_rem_head",{index:n,pt:a})},chainRemoveTail:function(n,a){return i("chain_rem_tail",{index:n,pt:a})},chainNew:function(n,a){return i("chain_new",{pt1:n,pt2:a})},chainMatch:function(n){return i("chain_match",{index:n})},chainClose:function(n){return i("chain_close",{index:n})},chainAddHead:function(n,a){return i("chain_add_head",{index:n,pt:a})},chainAddTail:function(n,a){return i("chain_add_tail",{index:n,pt:a})},chainConnect:function(n,a){return i("chain_con",{index1:n,index2:a})},chainReverse:function(n){return i("chain_rev",{index:n})},chainJoin:function(n,a){return i("chain_join",{index1:n,index2:a})},done:function(){return i("done")}},e}gye.exports=GSt});var xye=W((vPr,yye)=>{function HSt(e){typeof e!="number"&&(e=1e-10);var t={epsilon:function(r){return typeof r=="number"&&(e=r),e},pointAboveOrOnLine:function(r,i,n){var a=i[0],o=i[1],s=n[0],l=n[1],u=r[0],c=r[1];return(s-a)*(c-o)-(l-o)*(u-a)>=-e},pointBetween:function(r,i,n){var a=r[1]-i[1],o=n[0]-i[0],s=r[0]-i[0],l=n[1]-i[1],u=s*o+a*l;if(u<e)return!1;var c=o*o+l*l;return!(u-c>-e)},pointsSameX:function(r,i){return Math.abs(r[0]-i[0])<e},pointsSameY:function(r,i){return Math.abs(r[1]-i[1])<e},pointsSame:function(r,i){return t.pointsSameX(r,i)&&t.pointsSameY(r,i)},pointsCompare:function(r,i){return t.pointsSameX(r,i)?t.pointsSameY(r,i)?0:r[1]<i[1]?-1:1:r[0]<i[0]?-1:1},pointsCollinear:function(r,i,n){var a=r[0]-i[0],o=r[1]-i[1],s=i[0]-n[0],l=i[1]-n[1];return Math.abs(a*l-s*o)<e},linesIntersect:function(r,i,n,a){var o=i[0]-r[0],s=i[1]-r[1],l=a[0]-n[0],u=a[1]-n[1],c=o*u-s*l;if(Math.abs(c)<e)return!1;var f=r[0]-n[0],h=r[1]-n[1],d=(l*h-u*f)/c,p=(o*h-s*f)/c,v={alongA:0,alongB:0,pt:[r[0]+d*o,r[1]+d*s]};return d<=-e?v.alongA=-2:d<e?v.alongA=-1:d-1<=-e?v.alongA=0:d-1<e?v.alongA=1:v.alongA=2,p<=-e?v.alongB=-2:p<e?v.alongB=-1:p-1<=-e?v.alongB=0:p-1<e?v.alongB=1:v.alongB=2,v},pointInsideRegion:function(r,i){for(var n=r[0],a=r[1],o=i[i.length-1][0],s=i[i.length-1][1],l=!1,u=0;u<i.length;u++){var c=i[u][0],f=i[u][1];f-a>e!=s-a>e&&(o-c)*(a-f)/(s-f)+c-n>e&&(l=!l),o=c,s=f}return l}};return t}yye.exports=HSt});var bye=W((gPr,_ye)=>{var jSt={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(t===null||t===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var i=e.root,n=e.root.next;n!==null;){if(r(n)){t.prev=n.prev,t.next=n,n.prev.next=t,n.prev=t;return}i=n,n=n.next}i.next=t,t.prev=i,t.next=null},findTransition:function(t){for(var r=e.root,i=e.root.next;i!==null&&!t(i);)r=i,i=i.next;return{before:r===e.root?null:r,after:i,insert:function(n){return n.prev=r,n.next=i,r.next=n,i!==null&&(i.prev=n),n}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};_ye.exports=jSt});var Tye=W((mPr,wye)=>{var qA=bye();function $St(e,t,r){function i(p,v){return{id:r?r.segmentId():-1,start:p,end:v,myFill:{above:null,below:null},otherFill:null}}function n(p,v,m){return{id:r?r.segmentId():-1,start:p,end:v,myFill:{above:m.myFill.above,below:m.myFill.below},otherFill:null}}var a=qA.create();function o(p,v,m,g,w,b){var _=t.pointsCompare(v,w);return _!==0?_:t.pointsSame(m,b)?0:p!==g?p?1:-1:t.pointAboveOrOnLine(m,g?w:b,g?b:w)?1:-1}function s(p,v){a.insertBefore(p,function(m){var g=o(p.isStart,p.pt,v,m.isStart,m.pt,m.other.pt);return g<0})}function l(p,v){var m=qA.node({isStart:!0,pt:p.start,seg:p,primary:v,other:null,status:null});return s(m,p.end),m}function u(p,v,m){var g=qA.node({isStart:!1,pt:v.end,seg:v,primary:m,other:p,status:null});p.other=g,s(g,p.pt)}function c(p,v){var m=l(p,v);return u(m,p,v),m}function f(p,v){r&&r.segmentChop(p.seg,v),p.other.remove(),p.seg.end=v,p.other.pt=v,s(p.other,p.pt)}function h(p,v){var m=n(v,p.seg.end,p.seg);return f(p,v),c(m,p.primary)}function d(p,v){var m=qA.create();function g(F,P){var R=F.seg.start,L=F.seg.end,I=P.seg.start,B=P.seg.end;return t.pointsCollinear(R,I,B)?t.pointsCollinear(L,I,B)||t.pointAboveOrOnLine(L,I,B)?1:-1:t.pointAboveOrOnLine(R,I,B)?1:-1}function w(F){return m.findTransition(function(P){var R=g(F,P.ev);return R>0})}function b(F,P){var R=F.seg,L=P.seg,I=R.start,B=R.end,O=L.start,$=L.end;r&&r.checkIntersection(R,L);var Y=t.linesIntersect(I,B,O,$);if(Y===!1){if(!t.pointsCollinear(I,B,O)||t.pointsSame(I,$)||t.pointsSame(B,O))return!1;var K=t.pointsSame(I,O),j=t.pointsSame(B,$);if(K&&j)return P;var q=!K&&t.pointBetween(I,O,$),J=!j&&t.pointBetween(B,O,$);if(K)return J?h(P,B):h(F,$),P;q&&(j||(J?h(P,B):h(F,$)),h(P,I))}else Y.alongA===0&&(Y.alongB===-1?h(F,O):Y.alongB===0?h(F,Y.pt):Y.alongB===1&&h(F,$)),Y.alongB===0&&(Y.alongA===-1?h(P,I):Y.alongA===0?h(P,Y.pt):Y.alongA===1&&h(P,B));return!1}for(var _=[];!a.isEmpty();){var M=a.getHead();if(r&&r.vert(M.pt[0]),M.isStart){let F=function(){if(T){var P=b(M,T);if(P)return P}return A?b(M,A):!1};var D=F;r&&r.segmentNew(M.seg,M.primary);var x=w(M),T=x.before?x.before.ev:null,A=x.after?x.after.ev:null;r&&r.tempStatus(M.seg,T?T.seg:!1,A?A.seg:!1);var y=F();if(y){if(e){var E;M.seg.myFill.below===null?E=!0:E=M.seg.myFill.above!==M.seg.myFill.below,E&&(y.seg.myFill.above=!y.seg.myFill.above)}else y.seg.otherFill=M.seg.myFill;r&&r.segmentUpdate(y.seg),M.other.remove(),M.remove()}if(a.getHead()!==M){r&&r.rewind(M.seg);continue}if(e){var E;M.seg.myFill.below===null?E=!0:E=M.seg.myFill.above!==M.seg.myFill.below,A?M.seg.myFill.below=A.seg.myFill.above:M.seg.myFill.below=p,E?M.seg.myFill.above=!M.seg.myFill.below:M.seg.myFill.above=M.seg.myFill.below}else if(M.seg.otherFill===null){var S;A?M.primary===A.primary?S=A.seg.otherFill.above:S=A.seg.myFill.above:S=M.primary?v:p,M.seg.otherFill={above:S,below:S}}r&&r.status(M.seg,T?T.seg:!1,A?A.seg:!1),M.other.status=x.insert(qA.node({ev:M}))}else{var C=M.status;if(C===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(m.exists(C.prev)&&m.exists(C.next)&&b(C.prev.ev,C.next.ev),r&&r.statusRemove(C.ev.seg),C.remove(),!M.primary){var k=M.seg.myFill;M.seg.myFill=M.seg.otherFill,M.seg.otherFill=k}_.push(M.seg)}a.getHead().remove()}return r&&r.done(),_}return e?{addRegion:function(p){for(var v,m=p[p.length-1],g=0;g<p.length;g++){v=m,m=p[g];var w=t.pointsCompare(v,m);w!==0&&c(i(w<0?v:m,w<0?m:v),!0)}},calculate:function(p){return d(p,!1)}}:{calculate:function(p,v,m,g){return p.forEach(function(w){c(n(w.start,w.end,w),!0)}),m.forEach(function(w){c(n(w.start,w.end,w),!1)}),d(v,g)}}}wye.exports=$St});var Mye=W((yPr,Aye)=>{function WSt(e,t,r){var i=[],n=[];return e.forEach(function(a){var o=a.start,s=a.end;if(t.pointsSame(o,s)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}r&&r.chainStart(a);var l={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},c=l;function f(D,F,P){return c.index=D,c.matches_head=F,c.matches_pt1=P,c===l?(c=u,!1):(c=null,!0)}for(var h=0;h<i.length;h++){var d=i[h],p=d[0],v=d[1],m=d[d.length-1],g=d[d.length-2];if(t.pointsSame(p,o)){if(f(h,!0,!0))break}else if(t.pointsSame(p,s)){if(f(h,!0,!1))break}else if(t.pointsSame(m,o)){if(f(h,!1,!0))break}else if(t.pointsSame(m,s)&&f(h,!1,!1))break}if(c===l){i.push([o,s]),r&&r.chainNew(o,s);return}if(c===u){r&&r.chainMatch(l.index);var w=l.index,b=l.matches_pt1?s:o,_=l.matches_head,d=i[w],M=_?d[0]:d[d.length-1],x=_?d[1]:d[d.length-2],T=_?d[d.length-1]:d[0],A=_?d[d.length-2]:d[1];if(t.pointsCollinear(x,M,b)&&(_?(r&&r.chainRemoveHead(l.index,b),d.shift()):(r&&r.chainRemoveTail(l.index,b),d.pop()),M=x),t.pointsSame(T,b)){i.splice(w,1),t.pointsCollinear(A,T,M)&&(_?(r&&r.chainRemoveTail(l.index,M),d.pop()):(r&&r.chainRemoveHead(l.index,M),d.shift())),r&&r.chainClose(l.index),n.push(d);return}_?(r&&r.chainAddHead(l.index,b),d.unshift(b)):(r&&r.chainAddTail(l.index,b),d.push(b));return}function y(D){r&&r.chainReverse(D),i[D].reverse()}function E(D,F){var P=i[D],R=i[F],L=P[P.length-1],I=P[P.length-2],B=R[0],O=R[1];t.pointsCollinear(I,L,B)&&(r&&r.chainRemoveTail(D,L),P.pop(),L=I),t.pointsCollinear(L,B,O)&&(r&&r.chainRemoveHead(F,B),R.shift()),r&&r.chainJoin(D,F),i[D]=P.concat(R),i.splice(F,1)}var S=l.index,C=u.index;r&&r.chainConnect(S,C);var k=i[S].length<i[C].length;l.matches_head?u.matches_head?k?(y(S),E(S,C)):(y(C),E(C,S)):E(C,S):u.matches_head?E(S,C):k?(y(S),E(C,S)):(y(C),E(S,C))}),n}Aye.exports=WSt});var Eye=W((xPr,Sye)=>{function OA(e,t,r){var i=[];return e.forEach(function(n){var a=(n.myFill.above?8:0)+(n.myFill.below?4:0)+(n.otherFill&&n.otherFill.above?2:0)+(n.otherFill&&n.otherFill.below?1:0);t[a]!==0&&i.push({id:r?r.segmentId():-1,start:n.start,end:n.end,myFill:{above:t[a]===1,below:t[a]===2},otherFill:null})}),r&&r.selected(i),i}var YSt={union:function(e,t){return OA(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return OA(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return OA(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return OA(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return OA(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};Sye.exports=YSt});var Cye=W((_Pr,kye)=>{var XSt={toPolygon:function(e,t){function r(a){if(a.length<=0)return e.segments({inverted:!1,regions:[]});function o(u){var c=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[c]})}for(var s=o(a[0]),l=1;l<a.length;l++)s=e.selectDifference(e.combine(s,o(a[l])));return s}if(t.type==="Polygon")return e.polygon(r(t.coordinates));if(t.type==="MultiPolygon"){for(var i=e.segments({inverted:!1,regions:[]}),n=0;n<t.coordinates.length;n++)i=e.selectUnion(e.combine(i,r(t.coordinates[n])));return e.polygon(i)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(e,t,r){r=e.polygon(e.segments(r));function i(d,p){return t.pointInsideRegion([(d[0][0]+d[1][0])*.5,(d[0][1]+d[1][1])*.5],p)}function n(d){return{region:d,children:[]}}var a=n(null);function o(d,p){for(var v=0;v<d.children.length;v++){var m=d.children[v];if(i(p,m.region)){o(m,p);return}}for(var g=n(p),v=0;v<d.children.length;v++){var m=d.children[v];i(m.region,p)&&(g.children.push(m),d.children.splice(v,1),v--)}d.children.push(g)}for(var s=0;s<r.regions.length;s++){var l=r.regions[s];l.length<3||o(a,l)}function u(d,p){for(var v=0,m=d[d.length-1][0],g=d[d.length-1][1],w=[],b=0;b<d.length;b++){var _=d[b][0],M=d[b][1];w.push([_,M]),v+=M*m-_*g,m=_,g=M}var x=v<0;return x!==p&&w.reverse(),w.push([w[0][0],w[0][1]]),w}var c=[];function f(d){var p=[u(d.region,!1)];c.push(p);for(var v=0;v<d.children.length;v++)p.push(h(d.children[v]))}function h(d){for(var p=0;p<d.children.length;p++)f(d.children[p]);return u(d.region,!0)}for(var s=0;s<a.children.length;s++)f(a.children[s]);return c.length<=0?{type:"Polygon",coordinates:[]}:c.length==1?{type:"Polygon",coordinates:c[0]}:{type:"MultiPolygon",coordinates:c}}};kye.exports=XSt});var Pye=W((bPr,Lye)=>{var ZSt=mye(),KSt=xye(),Dye=Tye(),JSt=Mye(),NA=Eye(),Fye=Cye(),dd=!1,UA=KSt(),qh;qh={buildLog:function(e){return e===!0?dd=ZSt():e===!1&&(dd=!1),dd===!1?!1:dd.list},epsilon:function(e){return UA.epsilon(e)},segments:function(e){var t=Dye(!0,UA,dd);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=Dye(!1,UA,dd);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:NA.union(e.combined,dd),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:NA.intersect(e.combined,dd),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:NA.difference(e.combined,dd),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:NA.differenceRev(e.combined,dd),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:NA.xor(e.combined,dd),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:JSt(e.segments,UA,dd),inverted:e.inverted}},polygonFromGeoJSON:function(e){return Fye.toPolygon(qh,e)},polygonToGeoJSON:function(e){return Fye.fromPolygon(qh,UA,e)},union:function(e,t){return VA(e,t,qh.selectUnion)},intersect:function(e,t){return VA(e,t,qh.selectIntersect)},difference:function(e,t){return VA(e,t,qh.selectDifference)},differenceRev:function(e,t){return VA(e,t,qh.selectDifferenceRev)},xor:function(e,t){return VA(e,t,qh.selectXor)}};function VA(e,t,r){var i=qh.segments(e),n=qh.segments(t),a=qh.combine(i,n),o=r(a);return qh.polygon(o)}typeof window=="object"&&(window.PolyBool=qh);Lye.exports=qh});var Rye=W((wPr,Iye)=>{Iye.exports=function(t,r,i,n){var a=t[0],o=t[1],s=!1;i===void 0&&(i=0),n===void 0&&(n=r.length);for(var l=n-i,u=0,c=l-1;u<l;c=u++){var f=r[u+i][0],h=r[u+i][1],d=r[c+i][0],p=r[c+i][1],v=h>o!=p>o&&a<(d-f)*(o-h)/(p-h)+f;v&&(s=!s)}return s}});var GA=W((TPr,zye)=>{"use strict";var HH=NC().dot,D7=Kn().BADNUM,F7=zye.exports={};F7.tester=function(t){var r=t.slice(),i=r[0][0],n=i,a=r[0][1],o=a,s;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),s=1;s<r.length;s++)i=Math.min(i,r[s][0]),n=Math.max(n,r[s][0]),a=Math.min(a,r[s][1]),o=Math.max(o,r[s][1]);var l=!1,u;r.length===5&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(l=!0,u=function(p){return p[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(l=!0,u=function(p){return p[1]===r[0][1]}));function c(p,v){var m=p[0],g=p[1];return!(m===D7||m<i||m>n||g===D7||g<a||g>o||v&&u(p))}function f(p,v){var m=p[0],g=p[1];if(m===D7||m<i||m>n||g===D7||g<a||g>o)return!1;var w=r.length,b=r[0][0],_=r[0][1],M=0,x,T,A,y,E;for(x=1;x<w;x++)if(T=b,A=_,b=r[x][0],_=r[x][1],y=Math.min(T,b),!(m<y||m>Math.max(T,b)||g>Math.max(A,_)))if(g<Math.min(A,_))m!==y&&M++;else{if(b===T?E=g:E=A+(m-T)*(_-A)/(b-T),g===E)return!(x===1&&v);g<=E&&m!==y&&M++}return M%2===1}var h=!0,d=r[0];for(s=1;s<r.length;s++)if(d[0]!==r[s][0]||d[1]!==r[s][1]){h=!1;break}return{xmin:i,xmax:n,ymin:a,ymax:o,pts:r,contains:l?c:f,isRect:l,degenerate:h}};F7.isSegmentBent=function(t,r,i,n){var a=t[r],o=[t[i][0]-a[0],t[i][1]-a[1]],s=HH(o,o),l=Math.sqrt(s),u=[-o[1]/l,o[0]/l],c,f,h;for(c=r+1;c<i;c++)if(f=[t[c][0]-a[0],t[c][1]-a[1]],h=HH(f,o),h<0||h>s||Math.abs(HH(f,u))>n)return!0;return!1};F7.filter=function(t,r){var i=[t[0]],n=0,a=0;function o(l){t.push(l);var u=i.length,c=n;i.splice(a+1);for(var f=c+1;f<t.length;f++)(f===t.length-1||F7.isSegmentBent(t,c,f+1,r))&&(i.push(t[f]),i.length<u-2&&(n=f,a=i.length-1),c=f)}if(t.length>1){var s=t.pop();o(s)}return{addPt:o,raw:t,filtered:i}}});var qye=W((APr,Bye)=>{"use strict";Bye.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var o2e=W((MPr,a2e)=>{"use strict";var Oye=Pye(),QSt=Rye(),$A=yi(),eEt=Ji().dashStyle,HA=ni(),tEt=Ds(),rEt=Kf().makeEventData,KA=u1(),iEt=KA.freeMode,nEt=KA.rectMode,WA=KA.drawMode,YH=KA.openMode,XH=KA.selectMode,Nye=zy(),Uye=FA(),$ye=g7(),Wye=by().clearOutline,Yye=Py(),jH=Yye.handleEllipse,aEt=Yye.readPaths,oEt=d7().newShapes,sEt=mH(),lEt=GH().activateLastSelection,P7=it(),uEt=P7.sorterAsc,Xye=GA(),jA=QC(),pd=Cs().getFromId,cEt=CA(),fEt=BA().redrawReglTraces,I7=qye(),p1=I7.MINSELECT,hEt=Xye.filter,ZH=Xye.tester,KH=u7(),Vye=KH.p2r,dEt=KH.axValue,pEt=KH.getTransform;function JH(e){return e.subplot!==void 0}function vEt(e,t,r,i,n){var a=!JH(i),o=iEt(n),s=nEt(n),l=YH(n),u=WA(n),c=XH(n),f=n==="drawline",h=n==="drawcircle",d=f||h,p=i.gd,v=p._fullLayout,m=c&&v.newselection.mode==="immediate"&&a,g=v._zoomlayer,w=i.element.getBoundingClientRect(),b=i.plotinfo,_=pEt(b),M=t-w.left,x=r-w.top;v._calcInverseTransform(p);var T=P7.apply3DTransform(v._invTransform)(M,x);M=T[0],x=T[1];var A=v._invScaleX,y=v._invScaleY,E=M,S=x,C="M"+M+","+x,k=i.xaxes[0],D=i.yaxes[0],F=k._length,P=D._length,R=e.altKey&&!(WA(n)&&l),L,I,B,O,$,Y,K;Kye(e,p,i),o&&(L=hEt([[M,x]],I7.BENDPX));var j=g.selectAll("path.select-outline-"+b.id).data([1]),q=u?v.newshape:v.newselection;u&&(i.hasText=q.label.text||q.label.texttemplate);var J=u&&!l?q.fillcolor:"rgba(0,0,0,0)",U=q.line.color||(a?HA.contrast(p._fullLayout.plot_bgcolor):"#7f7f7f");j.enter().append("path").attr("class","select-outline select-outline-"+b.id).style({opacity:u?q.opacity/2:1,"stroke-dasharray":eEt(q.line.dash,q.line.width),"stroke-width":q.line.width+"px","shape-rendering":"crispEdges"}).call(HA.stroke,U).call(HA.fill,J).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",_).attr("d",C+"Z");var V=g.append("path").attr("class","zoombox-corners").style({fill:HA.background,stroke:HA.defaultLine,"stroke-width":1}).attr("transform",_).attr("d","M0,0Z");if(u&&i.hasText){var X=g.select(".label-temp");X.empty()&&(X=g.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var H=v._uid+I7.SELECTID,G=[],Q=R7(p,i.xaxes,i.yaxes,i.subplot);m&&!e.shiftKey&&(i._clearSubplotSelections=function(){if(a){var ce=k._id,ge=D._id;r2e(p,ce,ge,Q);for(var Ce=(p.layout||{}).selections||[],be=[],he=!1,oe=0;oe<Ce.length;oe++){var Ee=v.selections[oe];!Ee||Ee.xref!==ce||Ee.yref!==ge?be.push(Ce[oe]):he=!0}he&&(p._fullLayout._noEmitSelectedAtStart=!0,$A.call("_guiRelayout",p,{selections:be}))}});var te=CEt(i);i.moveFn=function(ce,ge){i._clearSubplotSelections&&(i._clearSubplotSelections(),i._clearSubplotSelections=void 0),E=Math.max(0,Math.min(F,A*ce+M)),S=Math.max(0,Math.min(P,y*ge+x));var Ce=Math.abs(E-M),be=Math.abs(S-x);if(s){var he,oe,Ee;if(c){var ye=v.selectdirection;switch(ye==="any"?be<Math.min(Ce*.6,p1)?he="h":Ce<Math.min(be*.6,p1)?he="v":he="d":he=ye,he){case"h":oe=h?P/2:0,Ee=P;break;case"v":oe=h?F/2:0,Ee=F;break}}if(u)switch(v.newshape.drawdirection){case"vertical":he="h",oe=h?P/2:0,Ee=P;break;case"horizontal":he="v",oe=h?F/2:0,Ee=F;break;case"ortho":Ce<be?(he="h",oe=x,Ee=S):(he="v",oe=M,Ee=E);break;default:he="d"}he==="h"?(O=d?jH(h,[E,oe],[E,Ee]):[[M,oe],[M,Ee],[E,Ee],[E,oe]],O.xmin=d?E:Math.min(M,E),O.xmax=d?E:Math.max(M,E),O.ymin=Math.min(oe,Ee),O.ymax=Math.max(oe,Ee),V.attr("d","M"+O.xmin+","+(x-p1)+"h-4v"+2*p1+"h4ZM"+(O.xmax-1)+","+(x-p1)+"h4v"+2*p1+"h-4Z")):he==="v"?(O=d?jH(h,[oe,S],[Ee,S]):[[oe,x],[oe,S],[Ee,S],[Ee,x]],O.xmin=Math.min(oe,Ee),O.xmax=Math.max(oe,Ee),O.ymin=d?S:Math.min(x,S),O.ymax=d?S:Math.max(x,S),V.attr("d","M"+(M-p1)+","+O.ymin+"v-4h"+2*p1+"v4ZM"+(M-p1)+","+(O.ymax-1)+"v4h"+2*p1+"v-4Z")):he==="d"&&(O=d?jH(h,[M,x],[E,S]):[[M,x],[M,S],[E,S],[E,x]],O.xmin=Math.min(M,E),O.xmax=Math.max(M,E),O.ymin=Math.min(x,S),O.ymax=Math.max(x,S),V.attr("d","M0,0Z"))}else o&&(L.addPt([E,S]),O=L.filtered);if(i.selectionDefs&&i.selectionDefs.length?(B=Jye(i.mergedPolygons,O,R),O.subtract=R,I=QH(i.selectionDefs.concat([O]))):(B=[O],I=ZH(O)),$ye(e2e(B,l),j,i),c){var ue=WH(p,!1),ee=ue.eventData?ue.eventData.points.slice():[];ue=WH(p,!1,I,Q,i),I=ue.selectionTesters,K=ue.eventData;var ae;L?ae=L.filtered:ae=i2e(B),jA.throttle(H,I7.SELECTDELAY,function(){G=t2e(I,Q);for(var xe=G.slice(),re=0;re<ee.length;re++){for(var pe=ee[re],we=!1,Fe=0;Fe<xe.length;Fe++)if(xe[Fe].curveNumber===pe.curveNumber&&xe[Fe].pointNumber===pe.pointNumber){we=!0;break}we||xe.push(pe)}xe.length&&(K||(K={}),K.points=xe),te(K,ae),DEt(p,K)})}},i.clickFn=function(ce,ge){if(V.remove(),p._fullLayout._activeShapeIndex>=0){p._fullLayout._deactivateShape(p);return}if(!u){var Ce=v.clickmode;jA.done(H).then(function(){if(jA.clear(H),ce===2){for(j.remove(),$=0;$<Q.length;$++)Y=Q[$],Y._module.selectPoints(Y,!1);if(XA(p,Q),YA(i),tj(p),Q.length){var be=Q[0].xaxis,he=Q[0].yaxis;if(be&&he){for(var oe=[],Ee=p._fullLayout.selections,ye=0;ye<Ee.length;ye++){var ue=Ee[ye];ue&&(ue.xref!==be._id||ue.yref!==he._id)&&oe.push(ue)}oe.length<Ee.length&&(p._fullLayout._noEmitSelectedAtStart=!0,$A.call("_guiRelayout",p,{selections:oe}))}}}else Ce.indexOf("select")>-1&&Zye(ge,p,i.xaxes,i.yaxes,i.subplot,i,j),Ce==="event"&&ZA(p,void 0);tEt.click(p,ge,b.id)}).catch(P7.error)}},i.doneFn=function(){V.remove(),jA.done(H).then(function(){jA.clear(H),!m&&O&&i.selectionDefs&&(O.subtract=R,i.selectionDefs.push(O),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,B)),(m||u)&&YA(i,m),i.doneFnCompleted&&i.doneFnCompleted(G),c&&ZA(p,K)}).catch(P7.error)}}function Zye(e,t,r,i,n,a,o){var s=t._hoverdata,l=t._fullLayout,u=l.clickmode,c=u.indexOf("event")>-1,f=[],h,d,p,v,m,g,w,b,_,M;if(_Et(s)){Kye(e,t,a),h=R7(t,r,i,n);var x=bEt(s,h),T=x.pointNumbers.length>0;if(T?wEt(h,x):TEt(h)&&(w=Hye(x))){for(o&&o.remove(),M=0;M<h.length;M++)d=h[M],d._module.selectPoints(d,!1);XA(t,h),YA(a),c&&tj(t)}else{b=e.shiftKey&&(w!==void 0?w:Hye(x)),p=gEt(x.pointNumber,x.searchInfo,b);var A=a.selectionDefs.concat([p]);for(v=QH(A,v),M=0;M<h.length;M++)if(m=h[M]._module.selectPoints(h[M],v),g=Qye(m,h[M]),f.length)for(var y=0;y<g.length;y++)f.push(g[y]);else f=g;if(_={points:f},XA(t,h,_),p&&a&&a.selectionDefs.push(p),o){var E=a.mergedPolygons,S=YH(a.dragmode);$ye(e2e(E,S),o,a)}c&&ZA(t,_)}}}function gEt(e,t,r){return{pointNumber:e,searchInfo:t,subtract:!!r}}function $H(e){return"pointNumber"in e&&"searchInfo"in e}function mEt(e){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(t,r,i,n){var a=e.searchInfo.cd[0].trace.index,o=n.cd[0].trace.index;return o===a&&i===e.pointNumber},isRect:!1,degenerate:!1,subtract:!!e.subtract}}function QH(e){if(!e.length)return;for(var t=[],r=$H(e[0])?0:e[0][0][0],i=r,n=$H(e[0])?0:e[0][0][1],a=n,o=0;o<e.length;o++)if($H(e[o]))t.push(mEt(e[o]));else{var s=ZH(e[o]);s.subtract=!!e[o].subtract,t.push(s),r=Math.min(r,s.xmin),i=Math.max(i,s.xmax),n=Math.min(n,s.ymin),a=Math.max(a,s.ymax)}function l(u,c,f,h){for(var d=!1,p=0;p<t.length;p++)t[p].contains(u,c,f,h)&&(d=!t[p].subtract);return d}return{xmin:r,xmax:i,ymin:n,ymax:a,pts:[],contains:l,isRect:!1,degenerate:!1}}function Kye(e,t,r){var i=t._fullLayout,n=r.plotinfo,a=r.dragmode,o=i._lastSelectedSubplot&&i._lastSelectedSubplot===n.id,s=(e.shiftKey||e.altKey)&&!(WA(a)&&YH(a));o&&s&&n.selection&&n.selection.selectionDefs&&!r.selectionDefs?(r.selectionDefs=n.selection.selectionDefs,r.mergedPolygons=n.selection.mergedPolygons):(!s||!n.selection)&&YA(r),o||(Wye(t),i._lastSelectedSubplot=n.id)}function yEt(e){return e._fullLayout._activeShapeIndex>=0}function xEt(e){return e._fullLayout._activeSelectionIndex>=0}function YA(e,t){var r=e.dragmode,i=e.plotinfo,n=e.gd;yEt(n)&&n._fullLayout._deactivateShape(n),xEt(n)&&n._fullLayout._deactivateSelection(n);var a=n._fullLayout,o=a._zoomlayer,s=WA(r),l=XH(r);if(s||l){var u=o.selectAll(".select-outline-"+i.id);if(u&&n._fullLayout._outlining){var c;s&&(c=oEt(u,e)),c&&$A.call("_guiRelayout",n,{shapes:c});var f;l&&!JH(e)&&(f=sEt(u,e)),f&&(n._fullLayout._noEmitSelectedAtStart=!0,$A.call("_guiRelayout",n,{selections:f}).then(function(){t&&lEt(n)})),n._fullLayout._outlining=!1}}i.selection={},i.selection.selectionDefs=e.selectionDefs=[],i.selection.mergedPolygons=e.mergedPolygons=[]}function Gye(e){return e._id}function R7(e,t,r,i){if(!e.calcdata)return[];var n=[],a=t.map(Gye),o=r.map(Gye),s,l,u;for(u=0;u<e.calcdata.length;u++)if(s=e.calcdata[u],l=s[0].trace,!(l.visible!==!0||!l._module||!l._module.selectPoints))if(JH({subplot:i})&&(l.subplot===i||l.geo===i))n.push(L7(l._module,s,t[0],r[0]));else if(l.type==="splom"){if(l._xaxes[a[0]]&&l._yaxes[o[0]]){var c=L7(l._module,s,t[0],r[0]);c.scene=e._fullLayout._splomScenes[l.uid],n.push(c)}}else if(l.type==="sankey"){var f=L7(l._module,s,t[0],r[0]);n.push(f)}else{if(a.indexOf(l.xaxis)===-1&&(!l._xA||!l._xA.overlaying)||o.indexOf(l.yaxis)===-1&&(!l._yA||!l._yA.overlaying))continue;n.push(L7(l._module,s,pd(e,l.xaxis),pd(e,l.yaxis)))}return n}function L7(e,t,r,i){return{_module:e,cd:t,xaxis:r,yaxis:i}}function _Et(e){return e&&Array.isArray(e)&&e[0].hoverOnBox!==!0}function bEt(e,t){var r=e[0],i=-1,n=[],a,o;for(o=0;o<t.length;o++)if(a=t[o],r.fullData.index===a.cd[0].trace.index){if(r.hoverOnBox===!0)break;r.pointNumber!==void 0?i=r.pointNumber:r.binNumber!==void 0&&(i=r.binNumber,n=r.pointNumbers);break}return{pointNumber:i,pointNumbers:n,searchInfo:a}}function Hye(e){var t=e.searchInfo.cd[0].trace,r=e.pointNumber,i=e.pointNumbers,n=i.length>0,a=n?i[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(a)>-1:!1}function wEt(e,t){var r=[],i,n,a,o;for(o=0;o<e.length;o++)i=e[o],i.cd[0].trace.selectedpoints&&i.cd[0].trace.selectedpoints.length>0&&r.push(i);if(r.length===1&&(a=r[0]===t.searchInfo,a&&(n=t.searchInfo.cd[0].trace,n.selectedpoints.length===t.pointNumbers.length))){for(o=0;o<t.pointNumbers.length;o++)if(n.selectedpoints.indexOf(t.pointNumbers[o])<0)return!1;return!0}return!1}function TEt(e){var t=0,r,i,n;for(n=0;n<e.length;n++)if(r=e[n],i=r.cd[0].trace,i.selectedpoints&&(i.selectedpoints.length>1||(t+=i.selectedpoints.length,t>1)))return!1;return t===1}function XA(e,t,r){var i,n;for(i=0;i<t.length;i++){n=t[i].cd[0].trace;var a=e._fullLayout._tracePreGUI[n.uid]||{};a.selectedpoints===void 0&&(a.selectedpoints=n._input.selectedpoints||null)}if(r){var o=r.points||[];for(i=0;i<t.length;i++)n=t[i].cd[0].trace,n._input.selectedpoints=n.selectedpoints=[];for(var s=0;s<o.length;s++){var l=o[s],u=l.data,c=l.pointIndex,f=l.pointIndices;f?[].push.apply(u.selectedpoints,f):u.selectedpoints.push(c)}}else for(i=0;i<t.length;i++)n=t[i].cd[0].trace,delete n.selectedpoints,delete n._input.selectedpoints;AEt(e,t)}function AEt(e,t){for(var r=!1,i=0;i<t.length;i++){var n=t[i],a=n.cd;$A.traceIs(a[0].trace,"regl")&&(r=!0);var o=n._module,s=o.styleOnSelect||o.style;s&&(s(e,a,a[0].node3),a[0].nodeRangePlot3&&s(e,a,a[0].nodeRangePlot3))}r&&(cEt(e),fEt(e))}function Jye(e,t,r){for(var i=r?Oye.difference:Oye.union,n=i({regions:e},{regions:[t]}),a=n.regions.reverse(),o=0;o<a.length;o++){var s=a[o];s.subtract=ej(s,a.slice(0,o))}return a}function Qye(e,t){if(Array.isArray(e))for(var r=t.cd,i=t.cd[0].trace,n=0;n<e.length;n++)e[n]=rEt(e[n],i,r);return e}function e2e(e,t){for(var r=[],i=0;i<e.length;i++){r[i]=[];for(var n=0;n<e[i].length;n++){r[i][n]=[],r[i][n][0]=n?"L":"M";for(var a=0;a<e[i][n].length;a++)r[i][n].push(e[i][n][a])}t||r[i].push(["Z",r[i][0][1],r[i][0][2]])}return r}function t2e(e,t){for(var r=[],i,n=[],a,o=0;o<t.length;o++){var s=t[o];a=s._module.selectPoints(s,e),n.push(a),i=Qye(a,s),r=r.concat(i)}return r}function WH(e,t,r,i,n){var a=!!i,o,s,l;n&&(o=n.plotinfo,s=n.xaxes[0]._id,l=n.yaxes[0]._id);var u=[],c=[],f=jye(e),h=e._fullLayout;if(o){var d=h._zoomlayer,p=h.dragmode,v=WA(p),m=XH(p);if(v||m){var g=pd(e,s,"x"),w=pd(e,l,"y");if(g&&w){var b=d.selectAll(".select-outline-"+o.id);if(b&&e._fullLayout._outlining&&b.length){for(var _=b[0][0],M=_.getAttribute("d"),x=aEt(M,e,o),T=[],A=0;A<x.length;A++){for(var y=x[A],E=[],S=0;S<y.length;S++)E.push([By(g,y[S][1]),By(w,y[S][2])]);E.xref=s,E.yref=l,E.subtract=ej(E,T),T.push(E)}f=f.concat(T)}}}}var C=s&&l?[s+l]:h._subplots.cartesian;MEt(e);for(var k={},D=0;D<C.length;D++){var F=C[D],P=F.indexOf("y"),R=F.slice(0,P),L=F.slice(P),I=s&&l?r:void 0;if(I=EEt(f,R,L,I),I){var B=i;if(!a){var O=pd(e,R,"x"),$=pd(e,L,"y");B=R7(e,[O],[$],F);for(var Y=0;Y<B.length;Y++){var K=B[Y],j=K.cd[0],q=j.trace;if(K._module.name==="scattergl"&&!j.t.xpx){var J=q.x,U=q.y,V=q._length;j.t.xpx=[],j.t.ypx=[];for(var X=0;X<V;X++)j.t.xpx[X]=O.c2p(J[X]),j.t.ypx[X]=$.c2p(U[X])}K._module.name==="splom"&&(k[q.uid]||(k[q.uid]=!0))}}var H=t2e(I,B);u=u.concat(H),c=c.concat(B)}}var G={points:u};XA(e,c,G);var Q=h.clickmode,te=Q.indexOf("event")>-1&&t;if(!o&&t){var ce=jye(e,!0);if(ce.length){var ge=ce[0].xref,Ce=ce[0].yref;if(ge&&Ce){var be=i2e(ce),he=n2e([pd(e,ge,"x"),pd(e,Ce,"y")]);he(G,be)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:te&&ZA(e,G),h._reselect=!1}if(!o&&h._deselect){var oe=h._deselect;s=oe.xref,l=oe.yref,SEt(s,l,c)||r2e(e,s,l,i),te&&(G.points.length?ZA(e,G):tj(e)),h._deselect=!1}return{eventData:G,selectionTesters:r}}function MEt(e){var t=e.calcdata;if(t)for(var r=0;r<t.length;r++){var i=t[r][0],n=i.trace,a=e._fullLayout._splomScenes;if(a){var o=a[n.uid];o&&(o.selectBatch=[])}}}function SEt(e,t,r){for(var i=0;i<r.length;i++){var n=r[i];if(n.xaxis&&n.xaxis._id===e&&n.yaxis&&n.yaxis._id===t)return!0}return!1}function r2e(e,t,r,i){i=R7(e,[pd(e,t,"x")],[pd(e,r,"y")],t+r);for(var n=0;n<i.length;n++){var a=i[n];a._module.selectPoints(a,!1)}XA(e,i)}function EEt(e,t,r,i){for(var n,a=0;a<e.length;a++){var o=e[a];if(!(t!==o.xref||r!==o.yref))if(n){var s=!!o.subtract;n=Jye(n,o,s),i=QH(n)}else n=[o],i=ZH(o)}return i}function jye(e,t){for(var r=[],i=e._fullLayout,n=i.selections,a=n.length,o=0;o<a;o++)if(!(t&&o!==i._activeSelectionIndex)){var s=n[o];if(s){var l=s.xref,u=s.yref,c=pd(e,l,"x"),f=pd(e,u,"y"),h,d,p,v,m;if(s.type==="rect"){m=[];var g=By(c,s.x0),w=By(c,s.x1),b=By(f,s.y0),_=By(f,s.y1);m=[[g,b],[g,_],[w,_],[w,b]],h=Math.min(g,w),d=Math.max(g,w),p=Math.min(b,_),v=Math.max(b,_),m.xmin=h,m.xmax=d,m.ymin=p,m.ymax=v,m.xref=l,m.yref=u,m.subtract=!1,m.isRect=!0,r.push(m)}else if(s.type==="path")for(var M=s.path.split("Z"),x=[],T=0;T<M.length;T++){var A=M[T];if(A){A+="Z";var y=Nye.extractPathCoords(A,Uye.paramIsX,"raw"),E=Nye.extractPathCoords(A,Uye.paramIsY,"raw");h=1/0,d=-1/0,p=1/0,v=-1/0,m=[];for(var S=0;S<y.length;S++){var C=By(c,y[S]),k=By(f,E[S]);m.push([C,k]),h=Math.min(C,h),d=Math.max(C,d),p=Math.min(k,p),v=Math.max(k,v)}m.xmin=h,m.xmax=d,m.ymin=p,m.ymax=v,m.xref=l,m.yref=u,m.subtract=ej(m,x),x.push(m),r.push(m)}}}}return r}function ej(e,t){for(var r=!1,i=0;i<t.length;i++)for(var n=t[i],a=0;a<e.length;a++)if(QSt(e[a],n)){r=!r;break}return r}function By(e,t){return e.type==="date"&&(t=t.replace("_"," ")),e.type==="log"?e.c2p(t):e.r2p(t,null,e.calendar)}function i2e(e){for(var t=e.length,r=[],i=0;i<t;i++){var n=e[i];r=r.concat(n),r=r.concat([n[0]])}return kEt(r)}function kEt(e){return e.isRect=e.length===5&&e[0][0]===e[4][0]&&e[0][1]===e[4][1]&&e[0][0]===e[1][0]&&e[2][0]===e[3][0]&&e[0][1]===e[3][1]&&e[1][1]===e[2][1]||e[0][1]===e[1][1]&&e[2][1]===e[3][1]&&e[0][0]===e[3][0]&&e[1][0]===e[2][0],e.isRect&&(e.xmin=Math.min(e[0][0],e[2][0]),e.xmax=Math.max(e[0][0],e[2][0]),e.ymin=Math.min(e[0][1],e[2][1]),e.ymax=Math.max(e[0][1],e[2][1])),e}function n2e(e){return function(t,r){for(var i,n,a=0;a<e.length;a++){var o=e[a],s=o._id,l=s.charAt(0);if(r.isRect){i||(i={});var u=r[l+"min"],c=r[l+"max"];u!==void 0&&c!==void 0&&(i[s]=[Vye(o,u),Vye(o,c)].sort(uEt))}else n||(n={}),n[s]=r.map(dEt(o))}i&&(t.range=i),n&&(t.lassoPoints=n)}}function CEt(e){var t=e.plotinfo;return t.fillRangeItems||n2e(e.xaxes.concat(e.yaxes))}function DEt(e,t){e.emit("plotly_selecting",t)}function ZA(e,t){t&&(t.selections=(e.layout||{}).selections||[]),e.emit("plotly_selected",t)}function tj(e){e.emit("plotly_deselect",null)}a2e.exports={reselect:WH,prepSelect:vEt,clearOutline:Wye,clearSelectionsCache:YA,selectOnClick:Zye}});var rj=W((SPr,s2e)=>{"use strict";s2e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]});var JA=W((EPr,l2e)=>{"use strict";l2e.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e,"axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}});var qy=W((CPr,f2e)=>{"use strict";var u2e=rj(),c2e=Ho(),z7=Gl(),FEt=Da().templatedArray,kPr=JA();f2e.exports=FEt("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:c2e({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:u2e.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:u2e.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",z7.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",z7.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",z7.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",z7.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:c2e({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var v1=W((DPr,h2e)=>{"use strict";h2e.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var g1=W((FPr,d2e)=>{"use strict";d2e.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var Ns=W((LPr,b2e)=>{"use strict";var p2e=_s().axisHoverFormat,{hovertemplateAttrs:LEt,texttemplateAttrs:PEt,templatefallbackAttrs:v2e}=Ga(),g2e=Eo(),IEt=Ho(),m2e=Du().dash,REt=Du().pattern,zEt=Ji(),BEt=v1(),QA=tn().extendFlat,qEt=g1();function y2e(e){return{valType:"any",dflt:0,editType:"calc"}}function x2e(e){return{valType:"any",editType:"calc"}}function _2e(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}b2e.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:y2e("x"),yperiod:y2e("y"),xperiod0:x2e("x0"),yperiod0:x2e("y0"),xperiodalignment:_2e("x"),yperiodalignment:_2e("y"),xhoverformat:p2e("x"),yhoverformat:p2e("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:PEt(),texttemplatefallback:v2e({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:LEt({},{keys:BEt.eventDataKeys}),hovertemplatefallback:v2e(),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:QA({},m2e,{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:qEt(!0),fillgradient:QA({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:REt,marker:QA({symbol:{valType:"enumerated",values:zEt.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:QA({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:QA({},m2e,{arrayOk:!0}),editType:"calc"},g2e("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"},g2e("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:IEt({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var ij=W((IPr,A2e)=>{"use strict";var w2e=qy(),T2e=Ns().line,OEt=Du().dash,B7=tn().extendFlat,NEt=ls().overrideAll,UEt=Da().templatedArray,PPr=JA();A2e.exports=NEt(UEt("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:B7({},w2e.xref,{}),yref:B7({},w2e.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:T2e.color,width:B7({},T2e.width,{min:1,dflt:1}),dash:B7({},OEt,{dflt:"dot"})}}),"arraydraw","from-root")});var k2e=W((RPr,E2e)=>{"use strict";var M2e=it(),q7=ji(),VEt=Xc(),GEt=ij(),S2e=zy();E2e.exports=function(t,r){VEt(t,r,{name:"selections",handleItemDefaults:HEt});for(var i=r.selections,n=0;n<i.length;n++){var a=i[n];a&&a.path===void 0&&(a.x0===void 0||a.x1===void 0||a.y0===void 0||a.y1===void 0)&&(r.selections[n]=null)}};function HEt(e,t,r){function i(x,T){return M2e.coerce(e,t,GEt,x,T)}var n=i("path"),a=n?"path":"rect",o=i("type",a),s=o!=="path";s&&delete t.path,i("opacity"),i("line.color"),i("line.width"),i("line.dash");for(var l=["x","y"],u=0;u<2;u++){var c=l[u],f={_fullLayout:r},h,d,p,v=q7.coerceRef(e,t,f,c);if(h=q7.getFromId(f,v),h._selectionIndices.push(t._index),p=S2e.rangeToShapePosition(h),d=S2e.shapePositionToRange(h),s){var m=c+"0",g=c+"1",w=e[m],b=e[g];e[m]=d(e[m],!0),e[g]=d(e[g],!0),q7.coercePosition(t,f,i,v,m),q7.coercePosition(t,f,i,v,g);var _=t[m],M=t[g];_!==void 0&&M!==void 0&&(t[m]=p(_),t[g]=p(M),e[m]=w,e[g]=b)}}s&&M2e.noneOrAll(e,t,["x0","x1","y0","y1"])}});var D2e=W((zPr,C2e)=>{"use strict";C2e.exports=function(t,r,i){i("newselection.mode");var n=i("newselection.line.width");n&&(i("newselection.line.color"),i("newselection.line.dash")),i("activeselection.fillcolor"),i("activeselection.opacity")}});var eM=W((BPr,P2e)=>{"use strict";var jEt=yi(),F2e=it(),L2e=Cs();P2e.exports=function(t){return function(i,n){var a=i[t];if(Array.isArray(a))for(var o=jEt.subplotsRegistry.cartesian,s=o.idRegex,l=n._subplots,u=l.xaxis,c=l.yaxis,f=l.cartesian,h=n._has("cartesian"),d=0;d<a.length;d++){var p=a[d];if(F2e.isPlainObject(p)){var v=L2e.cleanId(p.xref,"x",!1),m=L2e.cleanId(p.yref,"y",!1),g=s.x.test(v),w=s.y.test(m);if(g||w){h||F2e.pushUnique(n._basePlotModules,o);var b=!1;g&&u.indexOf(v)===-1&&(u.push(v),b=!0),w&&c.indexOf(m)===-1&&(c.push(m),b=!0),b&&g&&w&&f.push(v+m)}}}}}});var cu=W((qPr,R2e)=>{"use strict";var I2e=GH(),tM=o2e();R2e.exports={moduleType:"component",name:"selections",layoutAttributes:ij(),supplyLayoutDefaults:k2e(),supplyDrawNewSelectionDefaults:D2e(),includeBasePlot:eM()("selections"),draw:I2e.draw,drawOne:I2e.drawOne,reselect:tM.reselect,prepSelect:tM.prepSelect,clearOutline:tM.clearOutline,clearSelectionsCache:tM.clearSelectionsCache,selectOnClick:tM.selectOnClick}});var fj=W((OPr,exe)=>{"use strict";var uj=vi(),vd=it(),z2e=vd.numberFormat,$Et=XD(),O7=yi(),H2e=vd.strTranslate,WEt=uo(),aj=ni(),Oy=Ji(),YEt=Ds(),B2e=ji(),XEt=Np(),ZEt=bf(),j2e=u1(),N7=j2e.selectingOrDrawing,KEt=j2e.freeMode,JEt=Hl().FROM_TL,QEt=CA(),ekt=BA().redrawReglTraces,tkt=Ko(),oj=Cs().getFromId,rkt=cu().prepSelect,ikt=cu().clearOutline,nkt=cu().selectOnClick,nj=RH(),cj=Gl(),q2e=cj.MINDRAG,Qf=cj.MINZOOM,O2e=!0;function akt(e,t,r,i,n,a,o,s){var l=e._fullLayout._zoomlayer,u=o+s==="nsew",c=(o+s).length===1,f,h,d,p,v,m,g,w,b,_,M,x,T,A,y,E,S,C,k,D,F,P,R;r+=t.yaxis._shift;function L(){if(f=t.xaxis,h=t.yaxis,b=f._length,_=h._length,g=f._offset,w=h._offset,d={},d[f._id]=f,p={},p[h._id]=h,o&&s)for(var ke=t.overlays,_e=0;_e<ke.length;_e++){var Ie=ke[_e].xaxis;d[Ie._id]=Ie;var Oe=ke[_e].yaxis;p[Oe._id]=Oe}v=G2e(d),m=G2e(p),T=N2e(v,s),A=N2e(m,o),y=!A&&!T,x=V2e(e,e._fullLayout._axisMatchGroups,d,p),M=V2e(e,e._fullLayout._axisConstraintGroups,d,p,x);var Qe=M.isSubplotConstrained||x.isSubplotConstrained;E=s||Qe,S=o||Qe;var et=e._fullLayout;C=et._has("scattergl"),k=et._has("splom"),D=et._has("svg")}L();var I=lkt(A+T,e._fullLayout.dragmode,u),B=W2e(t,o+s+"drag",I,r,i,n,a);if(y&&!u)return B.onmousedown=null,B.style.pointerEvents="none",B;var O={element:B,gd:e,plotinfo:t};O.prepFn=function(ke,_e,Ie){var Oe=O.dragmode,Qe=e._fullLayout.dragmode;Qe!==Oe&&(O.dragmode=Qe),L(),P=e._fullLayout._invScaleX,R=e._fullLayout._invScaleY,y||(u?ke.shiftKey?Qe==="pan"?Qe="zoom":N7(Qe)||(Qe="pan"):ke.ctrlKey&&(Qe="pan"):Qe="pan"),KEt(Qe)?O.minDrag=1:O.minDrag=void 0,N7(Qe)?(O.xaxes=v,O.yaxes=m,rkt(ke,_e,Ie,O,Qe)):(O.clickFn=Y,N7(Oe)&&$(),y||(Qe==="zoom"?(O.moveFn=ce,O.doneFn=Ce,O.minDrag=1,te(ke,_e,Ie)):Qe==="pan"&&(O.moveFn=ue,O.doneFn=re))),e._fullLayout._redrag=function(){var et=e._dragdata;if(et&&et.element===B){var _t=e._fullLayout.dragmode;N7(_t)||(L(),pe([0,0,b,_]),O.moveFn(et.dx,et.dy))}}};function $(){O.plotinfo.selection=!1,ikt(e)}function Y(ke,_e){var Ie=O.gd;if(Ie._fullLayout._activeShapeIndex>=0){Ie._fullLayout._deactivateShape(Ie);return}var Oe=Ie._fullLayout.clickmode;if(lj(Ie),ke===2&&!c&&xe(),u)Oe.indexOf("select")>-1&&nkt(_e,Ie,v,m,t.id,O),Oe.indexOf("event")>-1&&YEt.click(Ie,_e,t.id);else if(ke===1&&c){var Qe=o?h:f,et=o==="s"||s==="w"?0:1,_t=Qe._name+".range["+et+"]",ut=okt(Qe,et),vt="left",Xe="middle";if(Qe.fixedrange)return;o?(Xe=o==="n"?"top":"bottom",Qe.side==="right"&&(vt="right")):s==="e"&&(vt="right"),Ie._context.showAxisRangeEntryBoxes&&uj.select(B).call(WEt.makeEditable,{gd:Ie,immediate:!0,background:Ie._fullLayout.paper_bgcolor,text:String(ut),fill:Qe.tickfont?Qe.tickfont.color:"#444",horizontalAlign:vt,verticalAlign:Xe}).on("edit",function(mt){var bt=Qe.d2r(mt);bt!==void 0&&O7.call("_guiRelayout",Ie,_t,bt)})}}ZEt.init(O);var K,j,q,J,U,V,X,H,G,Q;function te(ke,_e,Ie){var Oe=B.getBoundingClientRect();K=_e-Oe.left,j=Ie-Oe.top,e._fullLayout._calcInverseTransform(e);var Qe=vd.apply3DTransform(e._fullLayout._invTransform)(K,j);K=Qe[0],j=Qe[1],q={l:K,r:K,w:0,t:j,b:j,h:0},J=e._hmpixcount?e._hmlumcount/e._hmpixcount:aj.luminosity(e._fullLayout.plot_bgcolor),U="M0,0H"+b+"V"+_+"H0V0",V=!1,X="xy",Q=!1,H=Y2e(l,J,g,w,U),G=X2e(l,g,w)}function ce(ke,_e){if(e._transitioningWithDuration)return!1;var Ie=Math.max(0,Math.min(b,P*ke+K)),Oe=Math.max(0,Math.min(_,R*_e+j)),Qe=Math.abs(Ie-K),et=Math.abs(Oe-j);q.l=Math.min(K,Ie),q.r=Math.max(K,Ie),q.t=Math.min(j,Oe),q.b=Math.max(j,Oe);function _t(){X="",q.r=q.l,q.t=q.b,G.attr("d","M0,0Z")}if(M.isSubplotConstrained)Qe>Qf||et>Qf?(X="xy",Qe/b>et/_?(et=Qe*_/b,j>Oe?q.t=j-et:q.b=j+et):(Qe=et*b/_,K>Ie?q.l=K-Qe:q.r=K+Qe),G.attr("d",U7(q))):_t();else if(x.isSubplotConstrained)if(Qe>Qf||et>Qf){X="xy";var ut=Math.min(q.l/b,(_-q.b)/_),vt=Math.max(q.r/b,(_-q.t)/_);q.l=ut*b,q.r=vt*b,q.b=(1-ut)*_,q.t=(1-vt)*_,G.attr("d",U7(q))}else _t();else!A||et<Math.min(Math.max(Qe*.6,q2e),Qf)?Qe<q2e||!T?_t():(q.t=0,q.b=_,X="x",G.attr("d",ukt(q,j))):!T||Qe<Math.min(et*.6,Qf)?(q.l=0,q.r=b,X="y",G.attr("d",ckt(q,K))):(X="xy",G.attr("d",U7(q)));q.w=q.r-q.l,q.h=q.b-q.t,X&&(Q=!0),e._dragged=Q,Z2e(H,G,q,U,V,J),ge(),e.emit("plotly_relayouting",F),V=!0}function ge(){F={},(X==="xy"||X==="x")&&(sj(v,q.l/b,q.r/b,F,M.xaxes),ee("x",F)),(X==="xy"||X==="y")&&(sj(m,(_-q.b)/_,(_-q.t)/_,F,M.yaxes),ee("y",F))}function Ce(){ge(),lj(e),re(),J2e(e)}var be=[0,0,b,_],he=null,oe=cj.REDRAWDELAY,Ee=t.mainplot?e._fullLayout._plots[t.mainplot]:t;function ye(ke){if(!e._context._scrollZoom.cartesian&&!e._fullLayout._enablescrollzoom)return;if($(),e._transitioningWithDuration){ke.preventDefault(),ke.stopPropagation();return}L(),clearTimeout(he);var _e=-ke.deltaY;if(isFinite(_e)||(_e=ke.wheelDelta/10),!isFinite(_e)){vd.log("Did not find wheel motion attributes: ",ke);return}e._fullLayout._replotting=!0;var Ie=Math.exp(-Math.min(Math.max(_e,-20),20)/200),Oe=Ee.draglayer.select(".nsewdrag").node().getBoundingClientRect(),Qe=(ke.clientX-Oe.left)/Oe.width,et=(Oe.bottom-ke.clientY)/Oe.height,_t;function ut(vt,Xe,mt){if(vt.fixedrange)return;var bt=vd.simpleMap(vt.range,vt.r2l),Ne=bt[0]+(bt[1]-bt[0])*Xe;function Ue(Ge){return vt.l2r(Ne+(Ge-Ne)*mt)}vt.range=bt.map(Ue)}if(E){for(s||(Qe=.5),_t=0;_t<v.length;_t++)ut(v[_t],Qe,Ie);ee("x"),be[2]*=Ie,be[0]+=be[2]*Qe*(1/Ie-1)}if(S){for(o||(et=.5),_t=0;_t<m.length;_t++)ut(m[_t],et,Ie);ee("y"),be[3]*=Ie,be[1]+=be[3]*(1-et)*(1/Ie-1)}pe(be),ae(),e.emit("plotly_relayouting",F),he=setTimeout(function(){e._fullLayout&&(be=[0,0,b,_],re())},oe),ke.preventDefault()}o.length*s.length!==1&&Q2e(B,ye);function ue(ke,_e){if(ke=ke*P,_e=_e*R,e._transitioningWithDuration)return;if(e._fullLayout._replotting=!0,T==="ew"||A==="ns"){var Ie=T?-ke:0,Oe=A?-_e:0;if(x.isSubplotConstrained){if(T&&A){var Qe=(ke/b-_e/_)/2;ke=Qe*b,_e=-Qe*_,Ie=-ke,Oe=-_e}A?Ie=-Oe*b/_:Oe=-Ie*_/b}T&&(U2e(v,ke),ee("x")),A&&(U2e(m,_e),ee("y")),pe([Ie,Oe,b,_]),ae(),e.emit("plotly_relayouting",F);return}function et(Ue,Ge,je){for(var Re=1-Ge,Ve,ct,Tt=0;Tt<Ue.length;Tt++){var Xt=Ue[Tt];if(!Xt.fixedrange){Ve=Xt,ct=Xt._rl[Re]+(Xt._rl[Ge]-Xt._rl[Re])/skt(je/Xt._length);var Vt=Xt.l2r(ct);Vt!==!1&&Vt!==void 0&&(Xt.range[Ge]=Vt)}}return Ve._length*(Ve._rl[Ge]-ct)/(Ve._rl[Ge]-Ve._rl[Re])}var _t=T==="w"==(A==="n")?1:-1;if(T&&A&&(M.isSubplotConstrained||x.isSubplotConstrained)){var ut=(ke/b+_t*_e/_)/2;ke=ut*b,_e=_t*ut*_}var vt,Xe;if(T==="w"?ke=et(v,0,ke):T==="e"?ke=et(v,1,-ke):T||(ke=0),A==="n"?_e=et(m,1,_e):A==="s"?_e=et(m,0,-_e):A||(_e=0),vt=T==="w"?ke:0,Xe=A==="n"?_e:0,M.isSubplotConstrained&&!x.isSubplotConstrained||x.isSubplotConstrained&&T&&A&&_t>0){var mt;if(x.isSubplotConstrained||!T&&A.length===1){for(mt=0;mt<v.length;mt++)v[mt].range=v[mt]._r.slice(),nj(v[mt],1-_e/_);ke=_e*b/_,vt=ke/2}if(x.isSubplotConstrained||!A&&T.length===1){for(mt=0;mt<m.length;mt++)m[mt].range=m[mt]._r.slice(),nj(m[mt],1-ke/b);_e=ke*_/b,Xe=_e/2}}(!x.isSubplotConstrained||!A)&&ee("x"),(!x.isSubplotConstrained||!T)&&ee("y");var bt=b-ke,Ne=_-_e;x.isSubplotConstrained&&!(T&&A)&&(T?(Xe=vt?0:ke*_/b,Ne=bt*_/b):(vt=Xe?0:_e*b/_,bt=Ne*b/_)),pe([vt,Xe,bt,Ne]),ae(),e.emit("plotly_relayouting",F)}function ee(ke,_e){for(var Ie=x.isSubplotConstrained?{x:m,y:v}[ke]:x[ke+"axes"],Oe=x.isSubplotConstrained?{x:v,y:m}[ke]:[],Qe=0;Qe<Ie.length;Qe++){var et=Ie[Qe],_t=et._id,ut=x.xLinks[_t]||x.yLinks[_t],vt=Oe[0]||d[ut]||p[ut];vt&&(_e?(_e[et._name+".range[0]"]=_e[vt._name+".range[0]"],_e[et._name+".range[1]"]=_e[vt._name+".range[1]"]):et.range=vt.range.slice())}}function ae(){var ke=[],_e;function Ie(_t){for(_e=0;_e<_t.length;_e++)_t[_e].fixedrange||ke.push(_t[_e]._id)}function Oe(_t,ut){for(_e=0;_e<_t.length;_e++){var vt=_t[_e],Xe=vt[ut],mt=Xe._id;!vt.fixedrange&&Xe.tickmode==="sync"&&!ke.includes(mt)&&ke.push(mt)}}for(E&&(Ie(v),Ie(M.xaxes),Ie(x.xaxes),Oe(t.overlays,"xaxis")),S&&(Ie(m),Ie(M.yaxes),Ie(x.yaxes),Oe(t.overlays,"yaxis")),F={},_e=0;_e<ke.length;_e++){var Qe=ke[_e],et=oj(e,Qe);B2e.drawOne(e,et,{skipTitle:!0}),F[et._name+".range[0]"]=et.range[0],F[et._name+".range[1]"]=et.range[1]}B2e.redrawComponents(e,ke)}function xe(){if(!e._transitioningWithDuration){var ke=e._context.doubleClick,_e=[];T&&(_e=_e.concat(v)),A&&(_e=_e.concat(m)),x.xaxes&&(_e=_e.concat(x.xaxes)),x.yaxes&&(_e=_e.concat(x.yaxes));var Ie={},Oe,Qe;if(ke==="reset+autosize")for(ke="autosize",Qe=0;Qe<_e.length;Qe++){Oe=_e[Qe];var et=Oe._rangeInitial0,_t=Oe._rangeInitial1,ut=et!==void 0||_t!==void 0;if(ut&&(et!==void 0&&et!==Oe.range[0]||_t!==void 0&&_t!==Oe.range[1])||!ut&&Oe.autorange!==!0){ke="reset";break}}if(ke==="autosize")for(Qe=0;Qe<_e.length;Qe++)Oe=_e[Qe],Oe.fixedrange||(Ie[Oe._name+".autorange"]=!0);else if(ke==="reset"){for((T||M.isSubplotConstrained)&&(_e=_e.concat(M.xaxes)),A&&!M.isSubplotConstrained&&(_e=_e.concat(M.yaxes)),M.isSubplotConstrained&&(T?A||(_e=_e.concat(m)):_e=_e.concat(v)),Qe=0;Qe<_e.length;Qe++)if(Oe=_e[Qe],!Oe.fixedrange){var vt=Oe._name,Xe=Oe._autorangeInitial;Oe._rangeInitial0===void 0&&Oe._rangeInitial1===void 0?Ie[vt+".autorange"]=!0:Oe._rangeInitial0===void 0?(Ie[vt+".autorange"]=Xe,Ie[vt+".range"]=[null,Oe._rangeInitial1]):Oe._rangeInitial1===void 0?(Ie[vt+".range"]=[Oe._rangeInitial0,null],Ie[vt+".autorange"]=Xe):Ie[vt+".range"]=[Oe._rangeInitial0,Oe._rangeInitial1]}}e.emit("plotly_doubleclick",null),O7.call("_guiRelayout",e,Ie)}}function re(){pe([0,0,b,_]),vd.syncOrAsync([tkt.previousPromises,function(){e._fullLayout._replotting=!1,O7.call("_guiRelayout",e,F)}],e)}function pe(ke){var _e=e._fullLayout,Ie=_e._plots,Oe=_e._subplots.cartesian,Qe,et,_t,ut;if(k&&O7.subplotsRegistry.splom.drag(e),C){for(Qe=0;Qe<Oe.length;Qe++)if(et=Ie[Oe[Qe]],_t=et.xaxis,ut=et.yaxis,et._scene){_t.limitRange&&_t.limitRange(),ut.limitRange&&ut.limitRange();var vt=vd.simpleMap(_t.range,_t.r2l),Xe=vd.simpleMap(ut.range,ut.r2l);et._scene.update({range:[vt[0],Xe[0],vt[1],Xe[1]]})}}if((k||C)&&(QEt(e),ekt(e)),D){var mt=ke[2]/f._length,bt=ke[3]/h._length;for(Qe=0;Qe<Oe.length;Qe++){et=Ie[Oe[Qe]],_t=et.xaxis,ut=et.yaxis;var Ne=(E||x.isSubplotConstrained)&&!_t.fixedrange&&d[_t._id],Ue=(S||x.isSubplotConstrained)&&!ut.fixedrange&&p[ut._id],Ge,je,Re,Ve;if(Ne?(Ge=mt,Re=s||x.isSubplotConstrained?ke[0]:Se(_t,Ge)):x.xaHash[_t._id]?(Ge=mt,Re=ke[0]*_t._length/f._length):x.yaHash[_t._id]?(Ge=bt,Re=A==="ns"?-ke[1]*_t._length/h._length:Se(_t,Ge,{n:"top",s:"bottom"}[A])):(Ge=we(_t,mt,bt),Re=Fe(_t,Ge)),Ge>1&&(_t.maxallowed!==void 0&&E===(_t.range[0]<_t.range[1]?"e":"w")||_t.minallowed!==void 0&&E===(_t.range[0]<_t.range[1]?"w":"e"))&&(Ge=1,Re=0),Ue?(je=bt,Ve=o||x.isSubplotConstrained?ke[1]:Se(ut,je)):x.yaHash[ut._id]?(je=bt,Ve=ke[1]*ut._length/h._length):x.xaHash[ut._id]?(je=mt,Ve=T==="ew"?-ke[0]*ut._length/f._length:Se(ut,je,{e:"right",w:"left"}[T])):(je=we(ut,mt,bt),Ve=Fe(ut,je)),je>1&&(ut.maxallowed!==void 0&&S===(ut.range[0]<ut.range[1]?"n":"s")||ut.minallowed!==void 0&&S===(ut.range[0]<ut.range[1]?"s":"n"))&&(je=1,Ve=0),!(!Ge&&!je)){Ge||(Ge=1),je||(je=1);var ct=_t._offset-Re/Ge,Tt=ut._offset-Ve/je;et.clipRect.call(Oy.setTranslate,Re,Ve).call(Oy.setScale,Ge,je),et.plot.call(Oy.setTranslate,ct,Tt).call(Oy.setScale,1/Ge,1/je),(Ge!==et.xScaleFactor||je!==et.yScaleFactor)&&(Oy.setPointGroupScale(et.zoomScalePts,Ge,je),Oy.setTextPointsScale(et.zoomScaleTxt,Ge,je)),Oy.hideOutsideRangePoints(et.clipOnAxisFalseTraces,et),et.xScaleFactor=Ge,et.yScaleFactor=je}}}}function we(ke,_e,Ie){return ke.fixedrange?0:E&&M.xaHash[ke._id]?_e:S&&(M.isSubplotConstrained?M.xaHash:M.yaHash)[ke._id]?Ie:0}function Fe(ke,_e){return _e?(ke.range=ke._r.slice(),nj(ke,_e),Se(ke,_e)):0}function Se(ke,_e,Ie){return ke._length*(1-_e)*JEt[Ie||ke.constraintoward||"middle"]}return B}function $2e(e,t,r,i){var n=vd.ensureSingle(e.draglayer,t,r,function(a){a.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",e.id)});return n.call(XEt,i),n.node()}function W2e(e,t,r,i,n,a,o){var s=$2e(e,"rect",t,r);return uj.select(s).call(Oy.setRect,i,n,a,o),s}function N2e(e,t){for(var r=0;r<e.length;r++)if(!e[r].fixedrange)return t;return""}function okt(e,t){var r=e.range[t],i=Math.abs(r-e.range[1-t]),n;return e.type==="date"?r:e.type==="log"?(n=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,z2e("."+n+"g")(Math.pow(10,r))):(n=Math.floor(Math.log(Math.abs(r))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,z2e("."+String(n)+"g")(r))}function sj(e,t,r,i,n){for(var a=0;a<e.length;a++){var o=e[a];if(!o.fixedrange)if(o.rangebreaks){var s=o._id.charAt(0)==="y",l=s?1-t:t,u=s?1-r:r;i[o._name+".range[0]"]=o.l2r(o.p2l(l*o._length)),i[o._name+".range[1]"]=o.l2r(o.p2l(u*o._length))}else{var c=o._rl[0],f=o._rl[1]-c;i[o._name+".range[0]"]=o.l2r(c+f*t),i[o._name+".range[1]"]=o.l2r(c+f*r)}}if(n&&n.length){var h=(t+(1-r))/2;sj(n,h,1-h,i,[])}}function U2e(e,t){for(var r=0;r<e.length;r++){var i=e[r];if(!i.fixedrange){if(i.rangebreaks){var n=0,a=i._length,o=i.p2l(n+t)-i.p2l(n),s=i.p2l(a+t)-i.p2l(a),l=(o+s)/2;i.range=[i.l2r(i._rl[0]-l),i.l2r(i._rl[1]-l)]}else i.range=[i.l2r(i._rl[0]-t/i._m),i.l2r(i._rl[1]-t/i._m)];i.limitRange&&i.limitRange()}}}function skt(e){return 1-(e>=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function lkt(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function Y2e(e,t,r,i,n){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",H2e(r,i)).attr("d",n+"Z")}function X2e(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:aj.background,stroke:aj.defaultLine,"stroke-width":1,opacity:0}).attr("transform",H2e(t,r)).attr("d","M0,0Z")}function Z2e(e,t,r,i,n,a){e.attr("d",i+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),K2e(e,t,n,a)}function K2e(e,t,r,i){r||(e.transition().style("fill",i>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function lj(e){uj.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function J2e(e){O2e&&e.data&&e._context.showTips&&(vd.notifier(vd._(e,"Double-click to zoom back out"),"long",e),O2e=!1)}function ukt(e,t){return"M"+(e.l-.5)+","+(t-Qf-.5)+"h-3v"+(2*Qf+1)+"h3ZM"+(e.r+.5)+","+(t-Qf-.5)+"h3v"+(2*Qf+1)+"h-3Z"}function ckt(e,t){return"M"+(t-Qf-.5)+","+(e.t-.5)+"v-3h"+(2*Qf+1)+"v3ZM"+(t-Qf-.5)+","+(e.b+.5)+"v3h"+(2*Qf+1)+"v-3Z"}function U7(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,Qf)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function V2e(e,t,r,i,n){for(var a=!1,o={},s={},l,u,c,f,h=(n||{}).xaHash,d=(n||{}).yaHash,p=0;p<t.length;p++){var v=t[p];for(l in r)if(v[l]){for(c in v)!(n&&(h[c]||d[c]))&&!(c.charAt(0)==="x"?r:i)[c]&&(o[c]=l);for(u in i)!(n&&(h[u]||d[u]))&&v[u]&&(a=!0)}for(u in i)if(v[u])for(f in v)!(n&&(h[f]||d[f]))&&!(f.charAt(0)==="x"?r:i)[f]&&(s[f]=u)}a&&(vd.extendFlat(o,s),s={});var m={},g=[];for(c in o){var w=oj(e,c);g.push(w),m[w._id]=w}var b={},_=[];for(f in s){var M=oj(e,f);_.push(M),b[M._id]=M}return{xaHash:m,yaHash:b,xaxes:g,yaxes:_,xLinks:o,yLinks:s,isSubplotConstrained:a}}function Q2e(e,t){if(!$Et)e.onwheel!==void 0?e.onwheel=t:e.onmousewheel!==void 0?e.onmousewheel=t:e.isAddedWheelEvent||(e.isAddedWheelEvent=!0,e.addEventListener("wheel",t,{passive:!1}));else{var r=e.onwheel!==void 0?"wheel":"mousewheel";e._onwheel&&e.removeEventListener(r,e._onwheel),e._onwheel=t,e.addEventListener(r,t,{passive:!1})}}function G2e(e){var t=[];for(var r in e)t.push(e[r]);return t}exe.exports={makeDragBox:akt,makeDragger:$2e,makeRectDragger:W2e,makeZoombox:Y2e,makeCorners:X2e,updateZoombox:Z2e,xyCorners:U7,transitionZoombox:K2e,removeZoombox:lj,showDoubleClickNotifier:J2e,attachWheelEventHandler:Q2e}});var hj=W(G7=>{"use strict";var fkt=vi(),V7=Ds(),hkt=bf(),dkt=Np(),Vp=fj().makeDragBox,Iu=Gl().DRAGGERSIZE;G7.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){fkt.select(t).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var i=Object.keys(r._plots||{}).sort(function(a,o){if((r._plots[a].mainplot&&!0)===(r._plots[o].mainplot&&!0)){var s=a.split("y"),l=o.split("y");return s[0]===l[0]?Number(s[1]||1)-Number(l[1]||1):Number(s[0]||1)-Number(l[0]||1)}return r._plots[a].mainplot?1:-1});i.forEach(function(a){var o=r._plots[a],s=o.xaxis,l=o.yaxis;if(!o.mainplot){var u=Vp(t,o,s._offset,l._offset,s._length,l._length,"ns","ew");u.onmousemove=function(h){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===a&&t._fullLayout._plots[a]&&V7.hover(t,h,a)},V7.hover(t,h,a),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=a},u.onmouseout=function(h){t._dragging||(t._fullLayout._hoversubplot=null,hkt.unhover(t,h))},t._context.showAxisDragHandles&&(Vp(t,o,s._offset-Iu,l._offset-Iu,Iu,Iu,"n","w"),Vp(t,o,s._offset+s._length,l._offset-Iu,Iu,Iu,"n","e"),Vp(t,o,s._offset-Iu,l._offset+l._length,Iu,Iu,"s","w"),Vp(t,o,s._offset+s._length,l._offset+l._length,Iu,Iu,"s","e"))}if(t._context.showAxisDragHandles){if(a===s._mainSubplot){var c=s._mainLinePosition;s.side==="top"&&(c-=Iu),Vp(t,o,s._offset+s._length*.1,c,s._length*.8,Iu,"","ew"),Vp(t,o,s._offset,c,s._length*.1,Iu,"","w"),Vp(t,o,s._offset+s._length*.9,c,s._length*.1,Iu,"","e")}if(a===l._mainSubplot){var f=l._mainLinePosition;l.side!=="right"&&(f-=Iu),Vp(t,o,f,l._offset+l._length*.1,Iu,l._length*.8,"ns",""),Vp(t,o,f,l._offset+l._length*.9,Iu,l._length*.1,"s",""),Vp(t,o,f,l._offset,Iu,l._length*.1,"n","")}}});var n=r._hoverlayer.node();n.onmousemove=function(a){a.target=t._fullLayout._lasthover,V7.hover(t,a,r._hoversubplot)},n.onclick=function(a){a.target=t._fullLayout._lasthover,V7.click(t,a)},n.onmousedown=function(a){t._fullLayout._lasthover.onmousedown(a)},G7.updateFx(t)}};G7.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";dkt(t._draggers,r)}});var ixe=W((UPr,rxe)=>{"use strict";var txe=yi();rxe.exports=function(t){for(var r=txe.layoutArrayContainers,i=txe.layoutArrayRegexes,n=t.split("[")[0],a,o,s=0;s<i.length;s++)if(o=t.match(i[s]),o&&o.index===0){a=o[0];break}if(a||(a=r[r.indexOf(n)]),!a)return!1;var l=t.slice(a.length);return l?(o=l.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/),o?{array:a,index:Number(o[1]),property:o[3]||""}:!1):{array:a,index:"",property:""}}});var axe=W(iM=>{"use strict";var pkt=oy(),dj=OC(),rM=Eg(),vkt=ZC().sorterAsc,pj=yi();iM.containerArrayMatch=ixe();var gkt=iM.isAddVal=function(t){return t==="add"||pkt(t)},nxe=iM.isRemoveVal=function(t){return t===null||t==="remove"};iM.applyContainerArrayChanges=function(t,r,i,n,a){var o=r.astr,s=pj.getComponentMethod(o,"supplyLayoutDefaults"),l=pj.getComponentMethod(o,"draw"),u=pj.getComponentMethod(o,"drawOne"),c=n.replot||n.recalc||s===dj||l===dj,f=t.layout,h=t._fullLayout;if(i[""]){Object.keys(i).length>1&&rM.warn("Full array edits are incompatible with other edits",o);var d=i[""][""];if(nxe(d))r.set(null);else if(Array.isArray(d))r.set(d);else return rM.warn("Unrecognized full array edit value",o,d),!0;return c?!1:(s(f,h),l(t),!0)}var p=Object.keys(i).map(Number).sort(vkt),v=r.get(),m=v||[],g=a(h,o).get(),w=[],b=-1,_=m.length,M,x,T,A,y,E,S,C;for(M=0;M<p.length;M++){if(T=p[M],A=i[T],y=Object.keys(A),E=A[""],S=gkt(E),T<0||T>m.length-(S?0:1)){rM.warn("index out of range",o,T);continue}if(E!==void 0)y.length>1&&rM.warn("Insertion & removal are incompatible with edits to the same index.",o,T),nxe(E)?w.push(T):S?(E==="add"&&(E={}),m.splice(T,0,E),g&&g.splice(T,0,{})):rM.warn("Unrecognized full object edit value",o,T,E),b===-1&&(b=T);else for(x=0;x<y.length;x++)C=o+"["+T+"].",a(m[T],y[x],C).set(A[y[x]])}for(M=w.length-1;M>=0;M--)m.splice(w[M],1),g&&g.splice(w[M],1);if(m.length?v||r.set(m):r.set(null),c)return!1;if(s(f,h),u!==dj){var k;if(b===-1)k=p;else{for(_=Math.max(m.length,_),k=[],M=0;M<p.length&&(T=p[M],!(T>=b));M++)k.push(T);for(M=b;M<_;M++)k.push(M)}for(M=0;M<k.length;M++)u(t,k[M])}else l(t);return!0}});var hxe=W(gd=>{"use strict";var uxe=sn(),cxe=yi(),Mf=it(),nM=Ko(),fxe=Cs(),aM=fxe.cleanId,mkt=fxe.getFromTrace,vj=cxe.traceIs,ykt=["x","y","z"];gd.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&Mf.log("Clearing previous rejected promises from queue."),e._promises=[]};gd.cleanLayout=function(e){var t,r;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var i=(nM.subplotsRegistry.cartesian||{}).attrRegex,n=(nM.subplotsRegistry.polar||{}).attrRegex,a=(nM.subplotsRegistry.ternary||{}).attrRegex,o=(nM.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(e);for(t=0;t<s.length;t++){var l=s[t];if(i&&i.test(l)){var u=e[l];u.anchor&&u.anchor!=="free"&&(u.anchor=aM(u.anchor)),u.overlaying&&(u.overlaying=aM(u.overlaying)),u.type||(u.isdate?u.type="date":u.islog?u.type="log":u.isdate===!1&&u.islog===!1&&(u.type="linear")),(u.autorange==="withzero"||u.autorange==="tozero")&&(u.autorange=!0,u.rangemode="tozero"),u.insiderange&&delete u.range,delete u.islog,delete u.isdate,delete u.categories,H7(u,"domain")&&delete u.domain}}var c=Array.isArray(e.annotations)?e.annotations.length:0;for(t=0;t<c;t++){var f=e.annotations[t];Mf.isPlainObject(f)&&(Ow(f,"xref"),Ow(f,"yref"))}var h=Array.isArray(e.shapes)?e.shapes.length:0;for(t=0;t<h;t++){var d=e.shapes[t];Mf.isPlainObject(d)&&(Ow(d,"xref",!0),Ow(d,"yref",!0))}var p=Array.isArray(e.images)?e.images.length:0;for(t=0;t<p;t++){var v=e.images[t];Mf.isPlainObject(v)&&(Ow(v,"xref"),Ow(v,"yref"))}var m=e.legend;return m&&(m.x>3?(m.x=1.02,m.xanchor="left"):m.x<-2&&(m.x=-.02,m.xanchor="right"),m.y>3?(m.y=1.02,m.yanchor="bottom"):m.y<-2&&(m.y=-.02,m.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),e.template&&e.template.layout&&gd.cleanLayout(e.template.layout),e};function Ow(e,t,r=!1){var i=e[t],n=t.charAt(0);r&&Array.isArray(i)||i&&i!=="paper"&&(e[t]=aM(i,n,!0))}gd.cleanData=function(e){for(var t=0;t<e.length;t++){var r=e[t],i;if(r.type==="histogramy"&&"xbins"in r&&!("ybins"in r)&&(r.ybins=r.xbins,delete r.xbins),r.type==="histogramy"&&gd.swapXYData(r),(r.type==="histogramx"||r.type==="histogramy")&&(r.type="histogram"),"scl"in r&&!("colorscale"in r)&&(r.colorscale=r.scl,delete r.scl),"reversescl"in r&&!("reversescale"in r)&&(r.reversescale=r.reversescl,delete r.reversescl),r.xaxis&&(r.xaxis=aM(r.xaxis,"x")),r.yaxis&&(r.yaxis=aM(r.yaxis,"y")),vj(r,"gl3d")&&r.scene&&(r.scene=nM.subplotsRegistry.gl3d.cleanId(r.scene)),!vj(r,"pie-like")&&!vj(r,"bar-like"))if(Array.isArray(r.textposition))for(i=0;i<r.textposition.length;i++)r.textposition[i]=sxe(r.textposition[i]);else r.textposition&&(r.textposition=sxe(r.textposition));var n=cxe.getModule(r);if(n&&n.colorbar){var a=n.colorbar.container,o=a?r[a]:r;o&&o.colorscale&&(o.colorscale==="YIGnBu"&&(o.colorscale="YlGnBu"),o.colorscale==="YIOrRd"&&(o.colorscale="YlOrRd"))}if(r.type==="surface"&&Mf.isPlainObject(r.contours)){var s=["x","y","z"];for(i=0;i<s.length;i++){var l=r.contours[s[i]];Mf.isPlainObject(l)&&(l.highlightColor&&(l.highlightcolor=l.highlightColor,delete l.highlightColor),l.highlightWidth&&(l.highlightwidth=l.highlightWidth,delete l.highlightWidth))}}if(r.type==="candlestick"||r.type==="ohlc"){var u=(r.increasing||{}).showlegend!==!1,c=(r.decreasing||{}).showlegend!==!1,f=oxe(r.increasing),h=oxe(r.decreasing);if(f!==!1&&h!==!1){var d=xkt(f,h,u,c);d&&(r.name=d)}else(f||h)&&!r.name&&(r.name=f||h)}H7(r,"line")&&delete r.line,"marker"in r&&(H7(r.marker,"line")&&delete r.marker.line,H7(r,"marker")&&delete r.marker),r.autobinx&&(delete r.autobinx,delete r.xbins),r.autobiny&&(delete r.autobiny,delete r.ybins)}};function oxe(e){if(!Mf.isPlainObject(e))return!1;var t=e.name;return delete e.name,delete e.showlegend,(typeof t=="string"||typeof t=="number")&&String(t)}function xkt(e,t,r,i){if(r&&!i)return e;if(i&&!r||!e.trim())return t;if(!t.trim())return e;var n=Math.min(e.length,t.length),a;for(a=0;a<n&&e.charAt(a)===t.charAt(a);a++);var o=e.slice(0,a);return o.trim()}function sxe(e){var t="middle",r="center";return typeof e=="string"&&(e.indexOf("top")!==-1?t="top":e.indexOf("bottom")!==-1&&(t="bottom"),e.indexOf("left")!==-1?r="left":e.indexOf("right")!==-1&&(r="right")),t+" "+r}function H7(e,t){return t in e&&typeof e[t]=="object"&&Object.keys(e[t]).length===0}gd.swapXYData=function(e){var t;if(Mf.swapAttrs(e,["?","?0","d?","?bins","nbins?","autobin?","error_?"]),Array.isArray(e.z)&&Array.isArray(e.z[0])&&(e.transpose?delete e.transpose:e.transpose=!0),e.error_x&&e.error_y){var r=e.error_y,i="copy_ystyle"in r?r.copy_ystyle:!(r.color||r.thickness||r.width);Mf.swapAttrs(e,["error_?.copy_ystyle"]),i&&Mf.swapAttrs(e,["error_?.color","error_?.thickness","error_?.width"])}if(typeof e.hoverinfo=="string"){var n=e.hoverinfo.split("+");for(t=0;t<n.length;t++)n[t]==="x"?n[t]="y":n[t]==="y"&&(n[t]="x");e.hoverinfo=n.join("+")}};gd.coerceTraceIndices=function(e,t){if(uxe(t))return[t];if(!Array.isArray(t)||!t.length)return e.data.map(function(n,a){return a});if(Array.isArray(t)){for(var r=[],i=0;i<t.length;i++)Mf.isIndex(t[i],e.data.length)?r.push(t[i]):Mf.warn("trace index (",t[i],") is not a number or is out of bounds");return r}return t};gd.manageArrayContainers=function(e,t,r){var i=e.obj,n=e.parts,a=n.length,o=n[a-1],s=uxe(o);if(s&&t===null){var l=n.slice(0,a-1).join("."),u=Mf.nestedProperty(i,l).get();u.splice(o,1)}else s&&e.get()===void 0&&e.get()===void 0&&(r[e.astr]=null),e.set(t)};var _kt=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function lxe(e){var t=e.search(_kt);if(t>0)return e.slice(0,t)}gd.hasParent=function(e,t){for(var r=lxe(t);r;){if(r in e)return!0;r=lxe(r)}return!1};gd.clearAxisTypes=function(e,t,r){for(var i=0;i<t.length;i++)for(var n=e._fullData[i],a=0;a<3;a++){var o=mkt(e,n,ykt[a]);if(o&&o.type!=="log"){var s=o._name,l=o._id.slice(1);if(l.slice(0,5)==="scene"){if(r[l]!==void 0)continue;s=l+"."+s}var u=s+".type";r[s]===void 0&&r[u]===void 0&&Mf.nestedProperty(e.layout,u).set(null)}}};var gj=(e,t)=>{let r=(...i)=>i.every(n=>Mf.isPlainObject(n))||i.every(n=>Array.isArray(n));if([e,t].every(i=>Array.isArray(i))){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++){let n=e[i],a=t[i];if(n!==a&&!(r(n,a)?gj(n,a):!1))return!1}return!0}else if([e,t].every(i=>Mf.isPlainObject(i))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let i in e){if(i.startsWith("_"))continue;let n=e[i],a=t[i];if(n!==a&&!(r(n,a)?gj(n,a):!1))return!1}return!0}return!1};gd.collectionsAreEqual=gj});var rF=W(Fa=>{"use strict";var W7=vi(),bkt=sn(),wkt=AV(),fi=it(),Qo=fi.nestedProperty,xj=lw(),eh=J0e(),md=yi(),eF=fw(),Fn=Ko(),Sf=ji(),Tkt=UG(),Akt=ec(),mj=Ji(),Mkt=ni(),Skt=hj().initInteractions,Ekt=sd(),kkt=cu().clearOutline,mxe=cy().dfltConfig,j7=axe(),Fl=hxe(),vo=BA(),Ny=ls(),Ckt=Gl().AX_NAME_PATTERN,yj=0,dxe=5;function Dkt(e,t,r,i){var n;if(e=fi.getGraphDiv(e),xj.init(e),fi.isPlainObject(t)){var a=t;t=a.data,r=a.layout,i=a.config,n=a.frames}var o=xj.triggerHandler(e,"plotly_beforeplot",[t,r,i]);if(o===!1)return Promise.reject();!t&&!r&&!fi.isPlotDiv(e)&&fi.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function s(){if(n)return Fa.addFrames(e,n)}xxe(e,i),r||(r={}),W7.select(e).classed("js-plotly-plot",!0),mj.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var l=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(Fl.cleanData(t),l?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||l)&&(e.layout=Fl.cleanLayout(r)),Fn.supplyDefaults(e);var u=e._fullLayout,c=u._has("cartesian");u._replotting=!0,(l||u._shouldCreateBgLayer)&&(Qkt(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),mj.initGradients(e),mj.initPatterns(e),l&&Sf.saveShowSpikeInitial(e);var f=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;f&&Fn.doCalcdata(e);for(var h=0;h<e.calcdata.length;h++)e.calcdata[h][0].trace=e._fullData[h];e._context.responsive?e._responsiveChartHandler||(e._responsiveChartHandler=function(){fi.isHidden(e)||Fn.resize(e)},window.addEventListener("resize",e._responsiveChartHandler)):fi.clearResponsive(e);var d=fi.extendFlat({},u._size),p=0;function v(){for(var T=u._basePlotModules,A=0;A<T.length;A++)T[A].drawFramework&&T[A].drawFramework(e);!u._glcanvas&&u._has("gl")&&(u._glcanvas=u._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(C){return C.key}),u._glcanvas.enter().append("canvas").attr("class",function(C){return"gl-canvas gl-canvas-"+C.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var y=e._context.plotGlPixelRatio;if(u._glcanvas){u._glcanvas.attr("width",u.width*y).attr("height",u.height*y).style("width",u.width+"px").style("height",u.height+"px");var E=u._glcanvas.data()[0].regl;if(E&&(Math.floor(u.width*y)!==E._gl.drawingBufferWidth||Math.floor(u.height*y)!==E._gl.drawingBufferHeight)){var S="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(p)fi.error(S);else return fi.log(S+" Clearing graph and plotting again."),Fn.cleanPlot([],{},e._fullData,u),Fn.supplyDefaults(e),u=e._fullLayout,Fn.doCalcdata(e),p++,v()}}return u.modebar.orientation==="h"?u._modebardiv.style("height",null).style("width","100%"):u._modebardiv.style("width",null).style("height",u.height+"px"),Fn.previousPromises(e)}function m(){if(Fn.clearAutoMarginIds(e),vo.drawMarginPushers(e),Sf.allowAutoMargin(e),e._fullLayout.title.text&&e._fullLayout.title.automargin&&Fn.allowAutoMargin(e,"title.automargin"),u._has("pie"))for(var T=e._fullData,A=0;A<T.length;A++){var y=T[A];y.type==="pie"&&y.automargin&&Fn.allowAutoMargin(e,"pie."+y.uid+".automargin")}return Fn.doAutoMargin(e),Fn.previousPromises(e)}function g(){if(Fn.didMarginChange(d,u._size))return fi.syncOrAsync([m,vo.layoutStyles],e)}function w(){if(!f){b();return}return fi.syncOrAsync([md.getComponentMethod("shapes","calcAutorange"),md.getComponentMethod("annotations","calcAutorange"),b],e)}function b(){e._transitioning||(vo.doAutoRangeAndConstraints(e),l&&Sf.saveRangeInitial(e),md.getComponentMethod("rangeslider","calcAutorange")(e))}function _(){return Sf.draw(e,l?"":"redraw")}var M=[Fn.previousPromises,s,v,m,g];c&&M.push(w),M.push(vo.layoutStyles),c&&M.push(_,function(A){var y=A._fullLayout._insideTickLabelsUpdaterange;if(y)return A._fullLayout._insideTickLabelsUpdaterange=void 0,oM(A,y).then(function(){Sf.saveRangeInitial(A,!0)})}),M.push(vo.drawData,vo.finalDraw,Skt,Fn.rehover,Fn.redrag,Fn.reselect,Fn.doAutoMargin,Fn.previousPromises);var x=fi.syncOrAsync(M,e);return(!x||!x.then)&&(x=Promise.resolve()),x.then(function(){return sM(e),e})}function sM(e){var t=e._fullLayout;t._redrawFromAutoMarginCount?t._redrawFromAutoMarginCount--:e.emit("plotly_afterplot")}function Fkt(e){return fi.extendFlat(mxe,e)}function yxe(e,t){try{e._fullLayout._paper.style("background",t)}catch(r){fi.error(r)}}function Lkt(e,t){var r=Mkt.combine(t,"white");yxe(e,r)}function xxe(e,t){if(!e._context){e._context=fi.extendDeep({},mxe);var r=W7.select("base");e._context._baseUrl=r.size()&&r.attr("href")?window.location.href.split("#")[0]:""}var i=e._context,n,a,o;if(t){for(a=Object.keys(t),n=0;n<a.length;n++)o=a[n],!(o==="editable"||o==="edits")&&o in i&&(o==="setBackground"&&t[o]==="opaque"?i[o]=Lkt:i[o]=t[o]);var s=t.editable;if(s!==void 0)for(i.editable=s,a=Object.keys(i.edits),n=0;n<a.length;n++)i.edits[a[n]]=s;if(t.edits)for(a=Object.keys(t.edits),n=0;n<a.length;n++)o=a[n],o in i.edits&&(i.edits[o]=t.edits[o]);i._exportedPlot=t._exportedPlot}i.staticPlot&&(i.editable=!1,i.edits={},i.autosizable=!1,i.scrollZoom=!1,i.doubleClick=!1,i.showTips=!1,i.displayModeBar=!1),i.displayModeBar==="hover"&&!wkt&&(i.displayModeBar=!0),(i.setBackground==="transparent"||typeof i.setBackground!="function")&&(i.setBackground=yxe),i._hasZeroHeight=i._hasZeroHeight||e.clientHeight===0,i._hasZeroWidth=i._hasZeroWidth||e.clientWidth===0;var l=i.scrollZoom,u=i._scrollZoom={};if(l===!0)u.cartesian=1,u.gl3d=1,u.geo=1,u.map=1;else if(typeof l=="string"){var c=l.split("+");for(n=0;n<c.length;n++)u[c[n]]=1}else l!==!1&&(u.gl3d=1,u.geo=1,u.map=1)}function Pkt(e){if(e=fi.getGraphDiv(e),!fi.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e);return Fl.cleanData(e.data),Fl.cleanLayout(e.layout),e.calcdata=void 0,Fa._doPlot(e).then(function(){return e.emit("plotly_redraw"),e})}function Ikt(e,t,r,i){return e=fi.getGraphDiv(e),Fn.cleanPlot([],{},e._fullData||[],e._fullLayout||{}),Fn.purge(e),Fa._doPlot(e,t,r,i)}function Y7(e,t){var r=t+1,i=[],n,a;for(n=0;n<e.length;n++)a=e[n],a<0?i.push(r+a):i.push(a);return i}function X7(e,t,r){var i,n;for(i=0;i<t.length;i++){if(n=t[i],n!==parseInt(n,10))throw new Error("all values in "+r+" must be integers");if(n>=e.data.length||n<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(n,i+1)>-1||n>=0&&t.indexOf(-e.data.length+n)>-1||n<0&&t.indexOf(e.data.length+n)>-1)throw new Error("each index in "+r+" must be unique.")}}function _xe(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),X7(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&X7(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function Rkt(e,t,r){var i,n;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),i=0;i<t.length;i++)if(n=t[i],typeof n!="object"||Array.isArray(n)||n===null)throw new Error("all values in traces array must be non-array objects");if(typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&r.length!==t.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function zkt(e,t,r,i){var n=fi.isPlainObject(i);if(!Array.isArray(e.data))throw new Error("gd.data must be an array");if(!fi.isPlainObject(t))throw new Error("update must be a key:value object");if(typeof r=="undefined")throw new Error("indices must be an integer or array of integers");X7(e,r,"indices");for(var a in t){if(!Array.isArray(t[a])||t[a].length!==r.length)throw new Error("attribute "+a+" must be an array of length equal to indices array length");if(n&&(!(a in i)||!Array.isArray(i[a])||i[a].length!==t[a].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 Bkt(e,t,r,i){var n=fi.isPlainObject(i),a=[],o,s,l,u,c;Array.isArray(r)||(r=[r]),r=Y7(r,e.data.length-1);for(var f in t)for(var h=0;h<r.length;h++){if(o=e.data[r[h]],l=Qo(o,f),s=l.get(),u=t[f][h],!fi.isArrayOrTypedArray(u))throw new Error("attribute: "+f+" index: "+h+" must be an array");if(!fi.isArrayOrTypedArray(s))throw new Error("cannot extend missing or non-array attribute: "+f);if(s.constructor!==u.constructor)throw new Error("cannot extend array with an array of a different type: "+f);c=n?i[f][h]:i,bkt(c)||(c=-1),a.push({prop:l,target:s,insert:u,maxp:Math.floor(c)})}return a}function bxe(e,t,r,i,n){zkt(e,t,r,i);for(var a=Bkt(e,t,r,i),o={},s={},l=0;l<a.length;l++){var u=a[l].prop,c=a[l].maxp,f=n(a[l].target,a[l].insert,c);u.set(f[0]),Array.isArray(o[u.astr])||(o[u.astr]=[]),o[u.astr].push(f[1]),Array.isArray(s[u.astr])||(s[u.astr]=[]),s[u.astr].push(a[l].target.length)}return{update:o,maxPoints:s}}function wxe(e,t){var r=new e.constructor(e.length+t.length);return r.set(e),r.set(t,e.length),r}function Txe(e,t,r,i){e=fi.getGraphDiv(e);function n(l,u,c){var f,h;if(fi.isTypedArray(l))if(c<0){var d=new l.constructor(0),p=wxe(l,u);c<0?(f=p,h=d):(f=d,h=p)}else if(f=new l.constructor(c),h=new l.constructor(l.length+u.length-c),c===u.length)f.set(u),h.set(l);else if(c<u.length){var v=u.length-c;f.set(u.subarray(v)),h.set(l),h.set(u.subarray(0,v),l.length)}else{var m=c-u.length,g=l.length-m;f.set(l.subarray(g)),f.set(u,m),h.set(l.subarray(0,g))}else f=l.concat(u),h=c>=0&&c<f.length?f.splice(0,f.length-c):[];return[f,h]}var a=bxe(e,t,r,i,n),o=Fa.redraw(e),s=[e,a.update,r,a.maxPoints];return eh.add(e,Fa.prependTraces,s,Txe,arguments),o}function Axe(e,t,r,i){e=fi.getGraphDiv(e);function n(l,u,c){var f,h;if(fi.isTypedArray(l))if(c<=0){var d=new l.constructor(0),p=wxe(u,l);c<0?(f=p,h=d):(f=d,h=p)}else if(f=new l.constructor(c),h=new l.constructor(l.length+u.length-c),c===u.length)f.set(u),h.set(l);else if(c<u.length){var v=u.length-c;f.set(u.subarray(0,v)),h.set(u.subarray(v)),h.set(l,v)}else{var m=c-u.length;f.set(u),f.set(l.subarray(0,m),u.length),h.set(l.subarray(m))}else f=u.concat(l),h=c>=0&&c<f.length?f.splice(c,f.length):[];return[f,h]}var a=bxe(e,t,r,i,n),o=Fa.redraw(e),s=[e,a.update,r,a.maxPoints];return eh.add(e,Fa.extendTraces,s,Axe,arguments),o}function Mxe(e,t,r){e=fi.getGraphDiv(e);var i=[],n=Fa.deleteTraces,a=Mxe,o=[e,i],s=[e,t],l,u;for(Rkt(e,t,r),Array.isArray(t)||(t=[t]),t=t.map(function(c){return fi.extendFlat({},c)}),Fl.cleanData(t),l=0;l<t.length;l++)e.data.push(t[l]);for(l=0;l<t.length;l++)i.push(-t.length+l);if(typeof r=="undefined")return u=Fa.redraw(e),eh.add(e,n,o,a,s),u;Array.isArray(r)||(r=[r]);try{_xe(e,i,r)}catch(c){throw e.data.splice(e.data.length-t.length,t.length),c}return eh.startSequence(e),eh.add(e,n,o,a,s),u=Fa.moveTraces(e,i,r),eh.stopSequence(e),u}function Sxe(e,t){e=fi.getGraphDiv(e);var r=[],i=Fa.addTraces,n=Sxe,a=[e,r,t],o=[e,t],s,l;if(typeof t=="undefined")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(t)||(t=[t]),X7(e,t,"indices"),t=Y7(t,e.data.length-1),t.sort(fi.sorterDes),s=0;s<t.length;s+=1)l=e.data.splice(t[s],1)[0],r.push(l);var u=Fa.redraw(e);return eh.add(e,i,a,n,o),u}function _j(e,t,r){e=fi.getGraphDiv(e);var i=[],n=[],a=_j,o=_j,s=[e,r,t],l=[e,t,r],u;if(_xe(e,t,r),t=Array.isArray(t)?t:[t],typeof r=="undefined")for(r=[],u=0;u<t.length;u++)r.push(-t.length+u);for(r=Array.isArray(r)?r:[r],t=Y7(t,e.data.length-1),r=Y7(r,e.data.length-1),u=0;u<e.data.length;u++)t.indexOf(u)===-1&&i.push(e.data[u]);for(u=0;u<t.length;u++)n.push({newIndex:r[u],trace:e.data[t[u]]});for(n.sort(function(f,h){return f.newIndex-h.newIndex}),u=0;u<n.length;u+=1)i.splice(n[u].newIndex,0,n[u].trace);e.data=i;var c=Fa.redraw(e);return eh.add(e,a,s,o,l),c}function Z7(e,t,r,i){e=fi.getGraphDiv(e),Fl.clearPromiseQueue(e);var n={};if(typeof t=="string")n[t]=r;else if(fi.isPlainObject(t))n=fi.extendFlat({},t),i===void 0&&(i=r);else return fi.warn("Restyle fail.",t,r,i),Promise.reject();Object.keys(n).length&&(e.changed=!0);var a=Fl.coerceTraceIndices(e,i),o=Exe(e,n,a),s=o.flags;s.calc&&(e.calcdata=void 0),s.clearAxisTypes&&Fl.clearAxisTypes(e,a,{});var l=[];s.fullReplot?l.push(Fa._doPlot):(l.push(Fn.previousPromises),Fn.supplyDefaults(e),s.markerSize&&(Fn.doCalcdata(e),tF(l)),s.style&&l.push(vo.doTraceStyle),s.colorbars&&l.push(vo.doColorBars),l.push(sM)),l.push(Fn.rehover,Fn.redrag,Fn.reselect),eh.add(e,Z7,[e,o.undoit,o.traces],Z7,[e,o.redoit,o.traces]);var u=fi.syncOrAsync(l,e);return(!u||!u.then)&&(u=Promise.resolve()),u.then(function(){return e.emit("plotly_restyle",o.eventData),e})}function Og(e){return e===void 0?null:e}function $7(e,t){return t?function(r,i,n){var a=Qo(r,i),o=a.set;return a.set=function(s){var l=(n||"")+i;K7(l,a.get(),s,e),o(s)},a}:Qo}function K7(e,t,r,i){if(Array.isArray(t)||Array.isArray(r))for(var n=Array.isArray(t)?t:[],a=Array.isArray(r)?r:[],o=Math.max(n.length,a.length),s=0;s<o;s++)K7(e+"["+s+"]",n[s],a[s],i);else if(fi.isPlainObject(t)||fi.isPlainObject(r)){var l=fi.isPlainObject(t)?t:{},u=fi.isPlainObject(r)?r:{},c=fi.extendFlat({},l,u);for(var f in c)K7(e+"."+f,l[f],u[f],i)}else i[e]===void 0&&(i[e]=Og(t))}function qkt(e,t,r){for(var i in r){var n=Qo(e,i);K7(i,n.get(),r[i],t)}}function Exe(e,t,r){var i=e._fullLayout,n=e._fullData,a=e.data,o=i._guiEditing,s=$7(i._preGUI,o),l=fi.extendDeepAll({},t),u,c=Ny.traceFlags(),f={},h={},d;function p(){return r.map(function(){})}function v(H){var G=Sf.id2name(H);d.indexOf(G)===-1&&d.push(G)}function m(H){return"LAYOUT"+H+".autorange"}function g(H){return"LAYOUT"+H+".range"}function w(H,G,Q){if(Array.isArray(H)){H.forEach(function(Ce){w(Ce,G,Q)});return}if(!(H in t||Fl.hasParent(t,H))){var te;if(H.slice(0,6)==="LAYOUT")te=s(e.layout,H.replace("LAYOUT",""));else{var ce=r[Q],ge=i._tracePreGUI[n[ce].uid];te=$7(ge,o)(a[ce],H)}H in h||(h[H]=p()),h[H][Q]===void 0&&(h[H][Q]=Og(te.get())),G!==void 0&&te.set(G)}}function b(H){return function(G){return n[G][H]}}function _(H){return function(G,Q){return G===!1?n[r[Q]][H]:null}}for(var M in t){if(Fl.hasParent(t,M))throw new Error("cannot set "+M+" and a parent attribute simultaneously");var x=t[M],T,A,y,E,S,C;if((M==="autobinx"||M==="autobiny")&&(M=M.charAt(M.length-1)+"bins",Array.isArray(x)?x=x.map(_(M)):x===!1?x=r.map(b(M)):x=null),f[M]=x,M.slice(0,6)==="LAYOUT"){y=s(e.layout,M.replace("LAYOUT","")),h[M]=[Og(y.get())],y.set(Array.isArray(x)?x[0]:x),c.calc=!0;continue}for(h[M]=p(),u=0;u<r.length;u++){T=a[r[u]],A=n[r[u]];var k=i._tracePreGUI[A.uid];if(y=$7(k,o)(T,M),E=y.get(),S=Array.isArray(x)?x[u%x.length]:x,S!==void 0){var D=y.parts[y.parts.length-1],F=M.slice(0,M.length-D.length-1),P=F?F+".":"",R=F?Qo(A,F).get():A;if(C=eF.getTraceValObject(A,y.parts),C&&C.impliedEdits&&S!==null)for(var L in C.impliedEdits)w(fi.relativeAttr(M,L),C.impliedEdits[L],u);else if((D==="thicknessmode"||D==="lenmode")&&E!==S&&(S==="fraction"||S==="pixels")&&R){var I=i._size,B=R.orient,O=B==="top"||B==="bottom";if(D==="thicknessmode"){var $=O?I.h:I.w;w(P+"thickness",R.thickness*(S==="fraction"?1/$:$),u)}else{var Y=O?I.w:I.h;w(P+"len",R.len*(S==="fraction"?1/Y:Y),u)}}else if(M==="type"&&(S==="pie"!=(E==="pie")||S==="funnelarea"!=(E==="funnelarea"))){var K="x",j="y";(S==="bar"||E==="bar")&&T.orientation==="h"&&(K="y",j="x"),fi.swapAttrs(T,["?"],"labels",K),fi.swapAttrs(T,["d?","?0"],"label",K),fi.swapAttrs(T,["?"],"values",j),E==="pie"||E==="funnelarea"?(Qo(T,"marker.color").set(Qo(T,"marker.colors").get()),i._pielayer.selectAll("g.trace").remove()):md.traceIs(T,"cartesian")&&Qo(T,"marker.colors").set(Qo(T,"marker.color").get())}h[M][u]=Og(E);var q=["swapxy","swapxyaxes","orientation","orientationaxes"];if(q.indexOf(M)!==-1){if(M==="orientation"){y.set(S);var J=T.x&&!T.y?"h":"v";if((y.get()||J)===A.orientation)continue}else M==="orientationaxes"&&(T.orientation={v:"h",h:"v"}[A.orientation]);Fl.swapXYData(T),c.calc=c.clearAxisTypes=!0}else Fn.dataArrayContainers.indexOf(y.parts[0])!==-1?(Fl.manageArrayContainers(y,S,h),c.calc=!0):(C?C.arrayOk&&!md.traceIs(A,"regl")&&(fi.isArrayOrTypedArray(S)||fi.isArrayOrTypedArray(E))?c.calc=!0:Ny.update(c,C):c.calc=!0,y.set(S))}}if(["swapxyaxes","orientationaxes"].indexOf(M)!==-1&&Sf.swap(e,r),M==="orientationaxes"){var U=Qo(e.layout,"hovermode"),V=U.get();V==="x"?U.set("y"):V==="y"?U.set("x"):V==="x unified"?U.set("y unified"):V==="y unified"&&U.set("x unified")}if(["orientation","type"].indexOf(M)!==-1){for(d=[],u=0;u<r.length;u++){var X=a[r[u]];md.traceIs(X,"cartesian")&&(v(X.xaxis||"x"),v(X.yaxis||"y"))}w(d.map(m),!0,0),w(d.map(g),[0,1],0)}}return(c.calc||c.plot)&&(c.fullReplot=!0),{flags:c,undoit:h,redoit:f,traces:r,eventData:fi.extendDeepNoArrays([],[l,r])}}function oM(e,t,r){e=fi.getGraphDiv(e),Fl.clearPromiseQueue(e);var i={};if(typeof t=="string")i[t]=r;else if(fi.isPlainObject(t))i=fi.extendFlat({},t);else return fi.warn("Relayout fail.",t,r),Promise.reject();Object.keys(i).length&&(e.changed=!0);var n=Fxe(e,i),a=n.flags;a.calc&&(e.calcdata=void 0);var o=[Fn.previousPromises];a.layoutReplot?o.push(vo.layoutReplot):Object.keys(i).length&&(kxe(e,a,n)||Fn.supplyDefaults(e),a.legend&&o.push(vo.doLegend),a.layoutstyle&&o.push(vo.layoutStyles),a.axrange&&tF(o,n.rangesAltered),a.ticks&&o.push(vo.doTicksRelayout),a.modebar&&o.push(vo.doModeBar),a.camera&&o.push(vo.doCamera),a.colorbars&&o.push(vo.doColorBars),o.push(sM)),o.push(Fn.rehover,Fn.redrag,Fn.reselect),eh.add(e,oM,[e,n.undoit],oM,[e,n.redoit]);var s=fi.syncOrAsync(o,e);return(!s||!s.then)&&(s=Promise.resolve(e)),s.then(function(){return e.emit("plotly_relayout",n.eventData),e})}function kxe(e,t,r){var i=e._fullLayout;if(!t.axrange)return!1;for(var n in t)if(n!=="axrange"&&t[n])return!1;var a,o,s=function(d,p){return fi.coerce(a,o,Akt,d,p)},l={};for(var u in r.rangesAltered){var c=Sf.id2name(u);if(a=e.layout[c],o=i[c],Tkt(a,o,s,l),o._matchGroup){for(var f in o._matchGroup)if(f!==u){var h=i[Sf.id2name(f)];h.autorange=o.autorange,h.range=o.range.slice(),h._input.range=o.range.slice()}}}return!0}function tF(e,t){var r=t?function(i){var n=[],a=!0;for(var o in t){var s=Sf.getFromId(i,o);if(n.push(o),(s.ticklabelposition||"").indexOf("inside")!==-1&&s._anchorAxis&&n.push(s._anchorAxis._id),s._matchGroup)for(var l in s._matchGroup)t[l]||n.push(l)}return Sf.draw(i,n,{skipTitle:a})}:function(i){return Sf.draw(i,"redraw")};e.push(kkt,vo.doAutoRangeAndConstraints,r,vo.drawData,vo.finalDraw)}var Cxe=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Dxe=/^[xyz]axis[0-9]*\.autorange$/,Okt=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Fxe(e,t){var r=e.layout,i=e._fullLayout,n=i._guiEditing,a=$7(i._preGUI,n),o=Object.keys(t),s=Sf.list(e),l=fi.extendDeepAll({},t),u={},c,f,h;for(o=Object.keys(t),f=0;f<o.length;f++)if(o[f].indexOf("allaxes")===0){for(h=0;h<s.length;h++){var d=s[h]._id.slice(1),p=d.indexOf("scene")!==-1?d+".":"",v=o[f].replace("allaxes",p+s[h]._name);t[v]||(t[v]=t[o[f]])}delete t[o[f]]}var m=Ny.layoutFlags(),g={},w={};function b(Ce,be){if(Array.isArray(Ce)){Ce.forEach(function(oe){b(oe,be)});return}if(!(Ce in t||Fl.hasParent(t,Ce))){var he=a(r,Ce);Ce in w||(w[Ce]=Og(he.get())),be!==void 0&&he.set(be)}}var _={},M;function x(Ce){var be=Sf.name2id(Ce.split(".")[0]);return _[be]=1,be}for(var T in t){if(Fl.hasParent(t,T))throw new Error("cannot set "+T+" and a parent attribute simultaneously");for(var A=a(r,T),y=t[T],E=A.parts.length,S=E-1;S>0&&typeof A.parts[S]!="string";)S--;var C=A.parts[S],k=A.parts[S-1]+"."+C,D=A.parts.slice(0,S).join("."),F=Qo(e.layout,D).get(),P=Qo(i,D).get(),R=A.get();if(y!==void 0){g[T]=y,w[T]=C==="reverse"?y:Og(R);var L=eF.getLayoutValObject(i,A.parts);if(L&&L.impliedEdits&&y!==null)for(var I in L.impliedEdits)b(fi.relativeAttr(T,I),L.impliedEdits[I]);if(["width","height"].indexOf(T)!==-1)if(y){b("autosize",null);var B=T==="height"?"width":"height";b(B,i[B])}else i[T]=e._initialAutoSize[T];else if(T==="autosize")b("width",y?null:i.width),b("height",y?null:i.height);else if(k.match(Cxe))x(k),Qo(i,D+"._inputRange").set(null);else if(k.match(Dxe)){x(k),Qo(i,D+"._inputRange").set(null);var O=Qo(i,D).get();O._inputDomain&&(O._input.domain=O._inputDomain.slice())}else k.match(Okt)&&Qo(i,D+"._inputDomain").set(null);if(C==="type"){M=F;var $=P.type==="linear"&&y==="log",Y=P.type==="log"&&y==="linear";if($||Y){if(!M||!M.range)b(D+".autorange",!0);else if(P.autorange)$&&(M.range=M.range[1]>M.range[0]?[1,2]:[2,1]);else{var K=M.range[0],j=M.range[1];$?(K<=0&&j<=0&&b(D+".autorange",!0),K<=0?K=j/1e6:j<=0&&(j=K/1e6),b(D+".range[0]",Math.log(K)/Math.LN10),b(D+".range[1]",Math.log(j)/Math.LN10)):(b(D+".range[0]",Math.pow(10,K)),b(D+".range[1]",Math.pow(10,j)))}Array.isArray(i._subplots.polar)&&i._subplots.polar.length&&i[A.parts[0]]&&A.parts[1]==="radialaxis"&&delete i[A.parts[0]]._subplot.viewInitial["radialaxis.range"],md.getComponentMethod("annotations","convertCoords")(e,P,y,b),md.getComponentMethod("images","convertCoords")(e,P,y,b)}else b(D+".autorange",!0),b(D+".range",null);Qo(i,D+"._inputRange").set(null)}else if(C.match(Ckt)){var q=Qo(i,T).get(),J=(y||{}).type;(!J||J==="-")&&(J="linear"),md.getComponentMethod("annotations","convertCoords")(e,q,J,b),md.getComponentMethod("images","convertCoords")(e,q,J,b)}var U=j7.containerArrayMatch(T);if(U){c=U.array,f=U.index;var V=U.property,X=L||{editType:"calc"};f!==""&&V===""&&(j7.isAddVal(y)?w[T]=null:j7.isRemoveVal(y)?w[T]=(Qo(r,c).get()||[])[f]:fi.warn("unrecognized full object value",t)),Ny.update(m,X),u[c]||(u[c]={});var H=u[c][f];H||(H=u[c][f]={}),H[V]=y,delete t[T]}else C==="reverse"?(F.range?F.range.reverse():(b(D+".autorange",!0),F.range=[1,0]),P.autorange?m.calc=!0:m.plot=!0):(T==="dragmode"&&(y===!1&&R!==!1||y!==!1&&R===!1)||i._has("scatter-like")&&i._has("regl")&&T==="dragmode"&&(y==="lasso"||y==="select")&&!(R==="lasso"||R==="select")?m.plot=!0:L?Ny.update(m,L):m.calc=!0,A.set(y))}}for(c in u){var G=j7.applyContainerArrayChanges(e,a(r,c),u[c],m,a);G||(m.plot=!0)}for(var Q in _){M=Sf.getFromId(e,Q);var te=M&&M._constraintGroup;if(te){m.calc=!0;for(var ce in te)_[ce]||(Sf.getFromId(e,ce)._constraintShrinkable=!0)}}(Lxe(e)||t.height||t.width)&&(m.plot=!0);var ge=i.shapes;for(f=0;f<ge.length;f++)if(ge[f].showlegend){m.calc=!0;break}return(m.plot||m.calc)&&(m.layoutReplot=!0),{flags:m,rangesAltered:_,undoit:w,redoit:g,eventData:l}}function Lxe(e){var t=e._fullLayout,r=t.width,i=t.height;return e.layout.autosize&&Fn.plotAutoSize(e,e.layout,t),t.width!==r||t.height!==i}function J7(e,t,r,i){e=fi.getGraphDiv(e),Fl.clearPromiseQueue(e),fi.isPlainObject(t)||(t={}),fi.isPlainObject(r)||(r={}),Object.keys(t).length&&(e.changed=!0),Object.keys(r).length&&(e.changed=!0);var n=Fl.coerceTraceIndices(e,i),a=Exe(e,fi.extendFlat({},t),n),o=a.flags,s=Fxe(e,fi.extendFlat({},r)),l=s.flags;(o.calc||l.calc)&&(e.calcdata=void 0),o.clearAxisTypes&&Fl.clearAxisTypes(e,n,r);var u=[];l.layoutReplot?u.push(vo.layoutReplot):o.fullReplot?u.push(Fa._doPlot):(u.push(Fn.previousPromises),kxe(e,l,s)||Fn.supplyDefaults(e),o.style&&u.push(vo.doTraceStyle),(o.colorbars||l.colorbars)&&u.push(vo.doColorBars),l.legend&&u.push(vo.doLegend),l.layoutstyle&&u.push(vo.layoutStyles),l.axrange&&tF(u,s.rangesAltered),l.ticks&&u.push(vo.doTicksRelayout),l.modebar&&u.push(vo.doModeBar),l.camera&&u.push(vo.doCamera),u.push(sM)),u.push(Fn.rehover,Fn.redrag,Fn.reselect),eh.add(e,J7,[e,a.undoit,s.undoit,a.traces],J7,[e,a.redoit,s.redoit,a.traces]);var c=fi.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve(e)),c.then(function(){return e.emit("plotly_update",{data:a.eventData,layout:s.eventData}),e})}function bj(e){return function(r){r._fullLayout._guiEditing=!0;var i=e.apply(null,arguments);return r._fullLayout._guiEditing=!1,i}}var Nkt=[{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:/^(map\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^selections/,attr:"selectionrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],Ukt=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/^visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/^name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function pxe(e,t){for(var r=0;r<t.length;r++){var i=t[r],n=e.match(i.pattern);if(n){var a=n[1]||"";return{head:a,tail:e.slice(a.length+1),attr:i.attr}}}}function vxe(e,t){var r=Qo(t,e).get();if(r!==void 0)return r;var i=e.split(".");for(i.pop();i.length>1;)if(i.pop(),r=Qo(t,i.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function Vkt(e,t){for(var r=0;r<t.length;r++)if(t[r].uid===e)return r;return-1}function Gkt(e,t,r){for(var i=0;i<t.length;i++)if(t[i].uid===e)return i;return!t[r]||t[r].uid?-1:r}function gxe(e,t){var r=fi.isPlainObject(e),i=Array.isArray(e);return r||i?(r&&fi.isPlainObject(t)||i&&Array.isArray(t))&&JSON.stringify(e)===JSON.stringify(t):e===t}function Hkt(e,t,r,i){var n=i._preGUI,a,o,s,l,u,c,f,h,d,p,v=[],m={},g={};for(a in n){if(u=pxe(a,Nkt),u){if(d=u.head,p=u.tail,o=u.attr||d+".uirevision",s=Qo(i,o).get(),l=s&&vxe(o,t),l&&l===s){if(c=n[a],c===null&&(c=void 0),f=Qo(t,a),h=f.get(),gxe(h,c)){h===void 0&&p==="autorange"&&v.push(d),f.set(Og(Qo(i,a).get()));continue}else if(p==="autorange"||p.slice(0,6)==="range["){var w=n[d+".range[0]"],b=n[d+".range[1]"],_=n[d+".autorange"];if(_||_===null&&w===null&&b===null){if(!(d in m)){var M=Qo(t,d).get();m[d]=M&&(M.autorange||M.autorange!==!1&&(!M.range||M.range.length!==2))}if(m[d]){f.set(Og(Qo(i,a).get()));continue}}}}}else fi.warn("unrecognized GUI edit: "+a);delete n[a],u&&u.tail.slice(0,6)==="range["&&(g[u.head]=1)}for(var x=0;x<v.length;x++){var T=v[x];if(g[T]){var A=Qo(t,T).get();A&&delete A.autorange}}var y=i._tracePreGUI;for(var E in y){var S=y[E],C=null,k;for(a in S){if(!C){var D=Vkt(E,r);if(D<0){delete y[E];break}k=r[D];var F=Gkt(E,e,k.index);if(F<0){delete y[E];break}C=e[F]}if(u=pxe(a,Ukt),u){if(u.attr?(s=Qo(i,u.attr).get(),l=s&&vxe(u.attr,t)):(s=k.uirevision,l=C.uirevision,l===void 0&&(l=t.uirevision)),l&&l===s&&(c=S[a],c===null&&(c=void 0),f=Qo(C,a),h=f.get(),gxe(h,c))){f.set(Og(Qo(k,a).get()));continue}}else fi.warn("unrecognized GUI edit: "+a+" in trace uid "+E);delete S[a]}}}function jkt(e,t,r,i){var n,a;function o(){return Fa.addFrames(e,n)}e=fi.getGraphDiv(e),Fl.clearPromiseQueue(e);var s=e._fullData,l=e._fullLayout;if(!fi.isPlotDiv(e)||!s||!l)a=Fa.newPlot(e,t,r,i);else{if(fi.isPlainObject(t)){var u=t;t=u.data,r=u.layout,i=u.config,n=u.frames}var c=!1;if(i){let k=fi.extendDeepAll({},e._context);e._context=void 0,xxe(e,i),c=!Fl.collectionsAreEqual(k,e._context)}if(c){let k=e._ev.eventNames().map(D=>[D,e._ev.listeners(D)]);a=Fa.newPlot(e,t,r,i).then(()=>{for(let[D,F]of k)F.forEach(P=>e.on(D,P));return Fa.react(e,t,r,i)})}else{e.data=t||[],Fl.cleanData(e.data),e.layout=r||{},Fl.cleanLayout(e.layout),Hkt(e.data,e.layout,s,l),Fn.supplyDefaults(e,{skipUpdateCalc:!0});var f=e._fullData,h=e._fullLayout,d=h.datarevision===void 0,p=h.transition,v=Wkt(e,l,h,d,p),m=v.newDataRevision,g=$kt(e,s,f,d,p,m);if(Lxe(e)&&(v.layoutReplot=!0),g.calc||v.calc){e.calcdata=void 0;for(var w=Object.getOwnPropertyNames(h),b=0;b<w.length;b++){var _=w[b],M=_.substring(0,5);if(M==="xaxis"||M==="yaxis"){var x=h[_]._emptyCategories;x&&x()}}}else Fn.supplyDefaultsUpdateCalc(e.calcdata,f);var T=[];if(n&&(e._transitionData={},Fn.createTransitionData(e),T.push(o)),h.transition&&(g.anim||v.anim))v.ticks&&T.push(vo.doTicksRelayout),Fn.doCalcdata(e),vo.doAutoRangeAndConstraints(e),T.push(function(){return Fn.transitionFromReact(e,g,v,l)});else if(g.fullReplot||v.layoutReplot)e._fullLayout._skipDefaults=!0,T.push(Fa._doPlot);else{for(var A in v.arrays){var y=v.arrays[A];if(y.length){var E=md.getComponentMethod(A,"drawOne");if(E!==fi.noop)for(var S=0;S<y.length;S++)E(e,y[S]);else{var C=md.getComponentMethod(A,"draw");if(C===fi.noop)throw new Error("cannot draw components: "+A);C(e)}}}T.push(Fn.previousPromises),g.style&&T.push(vo.doTraceStyle),(g.colorbars||v.colorbars)&&T.push(vo.doColorBars),v.legend&&T.push(vo.doLegend),v.layoutstyle&&T.push(vo.layoutStyles),v.axrange&&tF(T),v.ticks&&T.push(vo.doTicksRelayout),v.modebar&&T.push(vo.doModeBar),v.camera&&T.push(vo.doCamera),T.push(sM)}T.push(Fn.rehover,Fn.redrag,Fn.reselect),a=fi.syncOrAsync(T,e),(!a||!a.then)&&(a=Promise.resolve(e))}}return a.then(()=>(c||e.emit("plotly_react",{config:i,data:t,layout:r}),e))}function $kt(e,t,r,i,n,a){var o=t.length===r.length;if(!n&&!o)return{fullReplot:!0,calc:!0};var s=Ny.traceFlags();s.arrays={},s.nChanges=0,s.nChangesAnim=0;var l,u;function c(d){var p=eF.getTraceValObject(u,d);return!u._module.animatable&&p.anim&&(p.anim=!1),p}var f={getValObject:c,flags:s,immutable:i,transition:n,newDataRevision:a,gd:e},h={};for(l=0;l<t.length;l++)if(r[l]){if(u=r[l],h[u.uid])continue;h[u.uid]=1,Q7(t[l],u,[],f)}return(s.calc||s.plot)&&(s.fullReplot=!0),n&&s.nChanges&&s.nChangesAnim&&(s.anim=s.nChanges===s.nChangesAnim&&o?"all":"some"),s}function Wkt(e,t,r,i,n){var a=Ny.layoutFlags();a.arrays={},a.rangesAltered={},a.nChanges=0,a.nChangesAnim=0;function o(h){return eF.getLayoutValObject(r,h)}for(var s in r)if(!(!s.startsWith("xaxis")&&!s.startsWith("yaxis"))&&t[s]){var l=r[s].domain,u=t[s].domain,c=t[s]._inputDomain;t[s]._inputDomain&&(l[0]===c[0]&&l[1]===c[1]?r[s].domain=t[s].domain:(l[0]!==u[0]||l[1]!==u[1])&&(r[s]._inputDomain=null))}var f={getValObject:o,flags:a,immutable:i,transition:n,gd:e};return Q7(t,r,[],f),(a.plot||a.calc)&&(a.layoutReplot=!0),n&&a.nChanges&&a.nChangesAnim&&(a.anim=a.nChanges===a.nChangesAnim?"all":"some"),a}function Q7(e,t,r,i){var n,a,o,s=i.getValObject,l=i.flags,u=i.immutable,c=i.inArray,f=i.arrayIndex;function h(){var D=n.editType;if(c&&D.indexOf("arraydraw")!==-1){fi.pushUnique(l.arrays[c],f);return}Ny.update(l,n),D!=="none"&&l.nChanges++,i.transition&&n.anim&&l.nChangesAnim++,(Cxe.test(o)||Dxe.test(o))&&(l.rangesAltered[r[0]]=1),a==="datarevision"&&(l.newDataRevision=1)}function d(D){return D.valType==="data_array"||D.arrayOk}for(a in e){if(l.calc&&!i.transition)return;var p=e[a],v=t[a],m=r.concat(a);if(o=m.join("."),!(a.charAt(0)==="_"||typeof p=="function"||p===v)){if((a==="tick0"||a==="dtick")&&r[0]!=="geo"){var g=t.tickmode;if(g==="auto"||g==="array"||!g)continue}if(!(a==="range"&&t.autorange)&&!((a==="zmin"||a==="zmax")&&t.type==="contourcarpet")&&(n=s(m),!!n&&!(n._compareAsJSON&&JSON.stringify(p)===JSON.stringify(v)))){var w=n.valType,b,_=d(n),M=Array.isArray(p),x=Array.isArray(v);if(M&&x){var T="_input_"+a,A=e[T],y=t[T];if(Array.isArray(A)&&A===y)continue}if(v===void 0)_&&M?l.calc=!0:h();else if(n._isLinkedToArray){var E=[],S=!1;c||(l.arrays[a]=E);var C=Math.min(p.length,v.length),k=Math.max(p.length,v.length);if(C!==k)if(n.editType==="arraydraw")S=!0;else{h();continue}for(b=0;b<C;b++)Q7(p[b],v[b],m.concat(b),fi.extendFlat({inArray:a,arrayIndex:b},i));if(S)for(b=C;b<k;b++)E.push(b)}else!w&&fi.isPlainObject(p)?Q7(p,v,m,i):_?M&&x?(u&&(l.calc=!0),(u||i.newDataRevision)&&h()):M!==x?l.calc=!0:h():M&&x?(p.length!==v.length||String(p)!==String(v))&&h():h()}}}for(a in t)if(!(a in e||a.charAt(0)==="_"||typeof t[a]=="function"))if(n=s(r.concat(a)),d(n)&&Array.isArray(t[a])){l.calc=!0;return}else h()}function Ykt(e,t,r){if(e=fi.getGraphDiv(e),!fi.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var i=e._transitionData;i._frameQueue||(i._frameQueue=[]),r=Fn.supplyAnimationDefaults(r);var n=r.transition,a=r.frame;i._frameWaitingCnt===void 0&&(i._frameWaitingCnt=0);function o(u){return Array.isArray(n)?u>=n.length?n[0]:n[u]:n}function s(u){return Array.isArray(a)?u>=a.length?a[0]:a[u]:a}function l(u,c){var f=0;return function(){if(u&&++f===c)return u()}}return new Promise(function(u,c){function f(){if(i._frameQueue.length!==0){for(;i._frameQueue.length;){var C=i._frameQueue.pop();C.onInterrupt&&C.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(C){if(C.length!==0){for(var k=0;k<C.length;k++){var D;C[k].type==="byname"?D=Fn.computeFrame(e,C[k].name):D=C[k].data;var F=s(k),P=o(k);P.duration=Math.min(P.duration,F.duration);var R={frame:D,name:C[k].name,frameOpts:F,transitionOpts:P};k===C.length-1&&(R.onComplete=l(u,2),R.onInterrupt=c),i._frameQueue.push(R)}r.mode==="immediate"&&(i._lastFrameAt=-1/0),i._animationRaf||v()}}function d(){e.emit("plotly_animated"),window.cancelAnimationFrame(i._animationRaf),i._animationRaf=null}function p(){i._currentFrame&&i._currentFrame.onComplete&&i._currentFrame.onComplete();var C=i._currentFrame=i._frameQueue.shift();if(C){var k=C.name?C.name.toString():null;e._fullLayout._currentFrame=k,i._lastFrameAt=Date.now(),i._timeToNext=C.frameOpts.duration,Fn.transition(e,C.frame.data,C.frame.layout,Fl.coerceTraceIndices(e,C.frame.traces),C.frameOpts,C.transitionOpts).then(function(){C.onComplete&&C.onComplete()}),e.emit("plotly_animatingframe",{name:k,frame:C.frame,animation:{frame:C.frameOpts,transition:C.transitionOpts}})}else d()}function v(){e.emit("plotly_animating"),i._lastFrameAt=-1/0,i._timeToNext=0,i._runningTransitions=0,i._currentFrame=null;var C=function(){i._animationRaf=window.requestAnimationFrame(C),Date.now()-i._lastFrameAt>i._timeToNext&&p()};C()}var m=0;function g(C){return Array.isArray(n)?m>=n.length?C.transitionOpts=n[m]:C.transitionOpts=n[0]:C.transitionOpts=n,m++,C}var w,b,_=[],M=t==null,x=Array.isArray(t),T=!M&&!x&&fi.isPlainObject(t);if(T)_.push({type:"object",data:g(fi.extendFlat({},t))});else if(M||["string","number"].indexOf(typeof t)!==-1)for(w=0;w<i._frames.length;w++)b=i._frames[w],b&&(M||String(b.group)===String(t))&&_.push({type:"byname",name:String(b.name),data:g({name:b.name})});else if(x)for(w=0;w<t.length;w++){var A=t[w];["number","string"].indexOf(typeof A)!==-1?(A=String(A),_.push({type:"byname",name:A,data:g({name:A})})):fi.isPlainObject(A)&&_.push({type:"object",data:g(fi.extendFlat({},A))})}for(w=0;w<_.length;w++)if(b=_[w],b.type==="byname"&&!i._frameHash[b.data.name]){fi.warn('animate failure: frame not found: "'+b.data.name+'"'),c();return}["next","immediate"].indexOf(r.mode)!==-1&&f(),r.direction==="reverse"&&_.reverse();var y=e._fullLayout._currentFrame;if(y&&r.fromcurrent){var E=-1;for(w=0;w<_.length;w++)if(b=_[w],b.type==="byname"&&b.name===y){E=w;break}if(E>0&&E<_.length-1){var S=[];for(w=0;w<_.length;w++)b=_[w],(_[w].type!=="byname"||w>E)&&S.push(b);_=S}}_.length>0?h(_):(e.emit("plotly_animated"),u())})}function Xkt(e,t,r){if(e=fi.getGraphDiv(e),t==null)return Promise.resolve();if(!fi.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var i,n,a,o,s=e._transitionData._frames,l=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var u=s.length+t.length*2,c=[],f={};for(i=t.length-1;i>=0;i--)if(fi.isPlainObject(t[i])){var h=t[i].name,d=(l[h]||f[h]||{}).name,p=t[i].name,v=l[d]||f[d];d&&p&&typeof p=="number"&&v&&yj<dxe&&(yj++,fi.warn('addFrames: overwriting frame "'+(l[d]||f[d]).name+'" with a frame whose name of type "number" also equates to "'+d+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),yj===dxe&&fi.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),f[h]={name:h},c.push({frame:Fn.supplyFrameDefaults(t[i]),index:r&&r[i]!==void 0&&r[i]!==null?r[i]:u+i})}c.sort(function(T,A){return T.index>A.index?-1:T.index<A.index?1:0});var m=[],g=[],w=s.length;for(i=c.length-1;i>=0;i--){if(n=c[i].frame,typeof n.name=="number"&&fi.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!n.name)for(;l[n.name="frame "+e._transitionData._counter++];);if(l[n.name]){for(a=0;a<s.length&&(s[a]||{}).name!==n.name;a++);m.push({type:"replace",index:a,value:n}),g.unshift({type:"replace",index:a,value:s[a]})}else o=Math.max(0,Math.min(c[i].index,w)),m.push({type:"insert",index:o,value:n}),g.unshift({type:"delete",index:o}),w++}var b=Fn.modifyFrames,_=Fn.modifyFrames,M=[e,g],x=[e,m];return eh&&eh.add(e,b,M,_,x),Fn.modifyFrames(e,m)}function Zkt(e,t){if(e=fi.getGraphDiv(e),!fi.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e);var r,i,n=e._transitionData._frames,a=[],o=[];if(!t)for(t=[],r=0;r<n.length;r++)t.push(r);for(t=t.slice(),t.sort(),r=t.length-1;r>=0;r--)i=t[r],a.push({type:"delete",index:i}),o.unshift({type:"insert",index:i,value:n[i]});var s=Fn.modifyFrames,l=Fn.modifyFrames,u=[e,o],c=[e,a];return eh&&eh.add(e,s,u,l,c),Fn.modifyFrames(e,a)}function Kkt(e){e=fi.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return Fn.cleanPlot([],{},r,t),Fn.purge(e),xj.purge(e),t._container&&t._container.remove(),delete e._context,e}function Jkt(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!fi.equalDomRects(r,t._lastBBox)){var i=t._invTransform=fi.inverseTransformMatrix(fi.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(i[0][0]*i[0][0]+i[0][1]*i[0][1]+i[0][2]*i[0][2]),t._invScaleY=Math.sqrt(i[1][0]*i[1][0]+i[1][1]*i[1][1]+i[1][2]*i[1][2]),t._lastBBox=r}}function Qkt(e){var t=W7.select(e),r=e._fullLayout;if(r._calcInverseTransform=Jkt,r._calcInverseTransform(e),r._container=t.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var i={};W7.selectAll("defs").each(function(){this.id&&(i[this.id.split("-")[1]]=1)}),r._uid=fi.randstr(i)}r._paperdiv.selectAll(".main-svg").attr(Ekt.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._clips=r._defs.append("g").classed("clips",!0),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._topclips=r._topdefs.append("g").classed("clips",!0),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var n=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=n.append("g").classed("imagelayer",!0),r._shapeLowerLayer=n.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._polarlayer=r._paper.append("g").classed("polarlayer",!0),r._smithlayer=r._paper.append("g").classed("smithlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0),r._funnelarealayer=r._paper.append("g").classed("funnelarealayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._iciclelayer=r._paper.append("g").classed("iciclelayer",!0),r._treemaplayer=r._paper.append("g").classed("treemaplayer",!0),r._sunburstlayer=r._paper.append("g").classed("sunburstlayer",!0),r._indicatorlayer=r._toppaper.append("g").classed("indicatorlayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0);var a=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=a.append("g").classed("imagelayer",!0),r._shapeUpperLayer=a.append("g").classed("shapelayer",!0),r._selectionLayer=r._toppaper.append("g").classed("selectionlayer",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._menulayer=r._toppaper.append("g").classed("menulayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._hoverpaper.append("g").classed("hoverlayer",!0),r._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}Fa.animate=Ykt;Fa.addFrames=Xkt;Fa.deleteFrames=Zkt;Fa.addTraces=Mxe;Fa.deleteTraces=Sxe;Fa.extendTraces=Txe;Fa.moveTraces=_j;Fa.prependTraces=Axe;Fa.newPlot=Ikt;Fa._doPlot=Dkt;Fa.purge=Kkt;Fa.react=jkt;Fa.redraw=Pkt;Fa.relayout=oM;Fa.restyle=Z7;Fa.setPlotConfig=Fkt;Fa.update=J7;Fa._guiRelayout=bj(oM);Fa._guiRestyle=bj(Z7);Fa._guiUpdate=bj(J7);Fa._storeDirectGUIEdit=qkt});var Ng=W(yd=>{"use strict";var e8t=yi();yd.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("map"))?500:0};yd.getRedrawFunc=function(e){return function(){e8t.getComponentMethod("colorbar","draw")(e)}};yd.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};yd.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var Pxe=window.URL||window.webkitURL;yd.createObjectURL=function(e){return Pxe.createObjectURL(e)};yd.revokeObjectURL=function(e){return Pxe.revokeObjectURL(e)};yd.createBlob=function(e,t){if(t==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(t==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=t8t(window.atob(e));return new window.Blob([r],{type:"image/"+t})};yd.octetStream=function(e){document.location.href="data:application/octet-stream"+e};yd.getPlotTitle=function(e){var i,n,a,o;var t=e._fullLayout;if(t){var r=(i=t.title)==null?void 0:i.text;return r===((n=t._dfltTitle)==null?void 0:n.plot)?void 0:r}return(o=(a=e.layout)==null?void 0:a.title)==null?void 0:o.text};yd.getPlotSubtitle=function(e){var i,n,a,o,s,l;var t=e._fullLayout;if(t){var r=(n=(i=t.title)==null?void 0:i.subtitle)==null?void 0:n.text;return r===((a=t._dfltTitle)==null?void 0:a.subtitle)?void 0:r}return(l=(s=(o=e.layout)==null?void 0:o.title)==null?void 0:s.subtitle)==null?void 0:l.text};function t8t(e){for(var t=e.length,r=new ArrayBuffer(t),i=new Uint8Array(r),n=0;n<t;n++)i[n]=e.charCodeAt(n);return r}yd.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/});var iF=W((YPr,Ixe)=>{"use strict";var Tj=vi(),$Pr=it(),r8t=Ji(),i8t=ni(),WPr=sd(),wj=/"/g,g_="TOBESTRIPPED",n8t=new RegExp(`("${g_})|(${g_}")|(&quot;${g_})|(${g_}&quot;)`,"g"),a8t=["&amp;","&#38;","&#x26;","&quot;","&#34;","&#x22;","&apos;","&#39;","&#x27;"],o8t=["&lt;","&#60;","&#x3c;"],s8t=["&gt;","&#62;","&#x3e;"];function l8t(e){let t=Tj.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,i=>{let n=i.toLowerCase();return a8t.includes(n)?i:o8t.includes(n)?"&#60;":s8t.includes(n)?"&#62;":i.includes("<")||i.includes(">")?"":t.html(i).text()});return t.remove(),r}function u8t(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")}Ixe.exports=function(t,r,i){var n=t._fullLayout,a=n._paper,o=n._toppaper,s=n.width,l=n.height,u;a.insert("rect",":first-child").call(r8t.setRect,0,0,s,l).call(i8t.fill,n.paper_bgcolor);var c=n._basePlotModules||[];for(u=0;u<c.length;u++){var f=c[u];f.toSVG&&f.toSVG(t)}if(o){var h=o.node().childNodes,d=Array.prototype.slice.call(h);for(u=0;u<d.length;u++){var p=d[u];p.childNodes.length&&a.node().appendChild(p)}}n._draggers&&n._draggers.remove(),a.node().style.background="",a.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var m=Tj.select(this);if(this.style.visibility==="hidden"||this.style.display==="none"){m.remove();return}else m.style({visibility:null,display:null});var g=this.style.fontFamily;g&&g.indexOf('"')!==-1&&m.style("font-family",g.replace(wj,g_));var w=this.style.fontWeight;w&&(w==="normal"||w==="400")&&m.style("font-weight",void 0);var b=this.style.fontStyle;b&&b==="normal"&&m.style("font-style",void 0);var _=this.style.fontVariant;_&&_==="normal"&&m.style("font-variant",void 0)}),a.selectAll(".gradient_filled,.pattern_filled").each(function(){var m=Tj.select(this),g=this.style.fill;g&&g.indexOf("url(")!==-1&&m.style("fill",g.replace(wj,g_));var w=this.style.stroke;w&&w.indexOf("url(")!==-1&&m.style("stroke",w.replace(wj,g_))}),(r==="pdf"||r==="eps")&&a.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),r==="svg"&&i&&(a.attr("width",i*s),a.attr("height",i*l),a.attr("viewBox","0 0 "+s+" "+l));var v=new window.XMLSerializer().serializeToString(a.node());return v=l8t(v),v=u8t(v),v=v.replace(n8t,"'"),v}});var nF=W((XPr,Rxe)=>{"use strict";var c8t=it(),f8t=Vx().EventEmitter,lM=Ng();function h8t(e){var t=e.emitter||new f8t,r=new Promise(function(i,n){var a=window.Image,o=e.svg,s=e.format||"png",l=e.canvas,u=e.scale||1,c=e.width||300,f=e.height||150,h=u*c,d=u*f,p=l.getContext("2d",{willReadFrequently:!0}),v=new a,m,g;s==="svg"||c8t.isSafari()?g=lM.encodeSVG(o):(m=lM.createBlob(o,"svg"),g=lM.createObjectURL(m)),l.width=h,l.height=d,v.onload=function(){var w;switch(m=null,lM.revokeObjectURL(g),s!=="svg"&&p.drawImage(v,0,0,h,d),s){case"jpeg":w=l.toDataURL("image/jpeg");break;case"png":w=l.toDataURL("image/png");break;case"webp":w=l.toDataURL("image/webp");break;case"svg":w=g;break;default:var b="Image format is not jpeg, png, svg or webp.";if(n(new Error(b)),!e.promise)return t.emit("error",b)}i(w),e.promise||t.emit("success",w)},v.onerror=function(w){if(m=null,lM.revokeObjectURL(g),n(w),!e.promise)return t.emit("error",w)},v.src=g});return e.promise?r:t}Rxe.exports=h8t});var Mj=W((ZPr,qxe)=>{"use strict";var zxe=sn(),Bxe=rF(),d8t=Ko(),m1=it(),uM=Ng(),p8t=iF(),v8t=nF(),g8t=E6().version,Aj={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 m8t(e,t){t=t||{};var r,i,n,a;m1.isPlainObject(e)?(r=e.data||[],i=e.layout||{},n=e.config||{},a={}):(e=m1.getGraphDiv(e),r=m1.extendDeep([],e.data),i=m1.extendDeep({},e.layout),n=e._context,a=e._fullLayout||{});function o(x){return!(x in t)||m1.validate(t[x],Aj[x])}if(!o("width")&&t.width!==null||!o("height")&&t.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+m1.join2(Aj.format.values,", "," or ")+".");var s={};function l(x,T){return m1.coerce(t,s,Aj,x,T)}var u=l("format"),c=l("width"),f=l("height"),h=l("scale"),d=l("setBackground"),p=l("imageDataOnly"),v=document.createElement("div");v.style.position="absolute",v.style.left="-5000px",document.body.appendChild(v);var m=m1.extendFlat({},i);c?m.width=c:t.width===null&&zxe(a.width)&&(m.width=a.width),f?m.height=f:t.height===null&&zxe(a.height)&&(m.height=a.height);var g=m1.extendFlat({},n,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),w=uM.getRedrawFunc(v);function b(){return new Promise(function(x){setTimeout(x,uM.getDelay(v._fullLayout))})}function _(){return new Promise(function(x,T){var A=p8t(v,u,h),y=v._fullLayout.width,E=v._fullLayout.height;function S(){Bxe.purge(v),document.body.removeChild(v)}if(u==="full-json"){var C=d8t.graphJson(v,!1,"object",!0,!0);return C.version=g8t,C=JSON.stringify(C),S(),x(p?C:uM.encodeJSON(C))}if(S(),u==="svg")return x(p?A:uM.encodeSVG(A));var k=document.createElement("canvas");k.id=m1.randstr(),v8t({format:u,width:y,height:E,scale:h,canvas:k,svg:A,promise:!0}).then(x).catch(T)})}function M(x){return p?x.replace(uM.IMAGE_URL_PREFIX,""):x}return new Promise(function(x,T){Bxe.newPlot(v,r,m,g).then(w).then(b).then(_).then(function(A){x(M(A))}).catch(function(A){T(A)})})}qxe.exports=m8t});var Uxe=W((KPr,Nxe)=>{"use strict";var xd=it(),y8t=Ko(),x8t=fw(),_8t=cy().dfltConfig,Gp=xd.isPlainObject,y_=Array.isArray,Sj=xd.isArrayOrTypedArray;Nxe.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var i=x8t.get(),n=[],a={_context:xd.extendFlat({},_8t)},o,s;y_(t)?(a.data=xd.extendDeep([],t),o=t):(a.data=[],o=[],n.push(Ru("array","data"))),Gp(r)?(a.layout=xd.extendDeep({},r),s=r):(a.layout={},s={},arguments.length>1&&n.push(Ru("object","layout"))),y8t.supplyDefaults(a);for(var l=a._fullData,u=o.length,c=0;c<u;c++){var f=o[c],h=["data",c];if(!Gp(f)){n.push(Ru("object",h));continue}var d=l[c],p=d.type,v=i.traces[p].attributes;v.type={valType:"enumerated",values:[p]},d.visible===!1&&f.visible!==!1&&n.push(Ru("invisible",h)),aF(f,d,v,n,h)}var m=a._fullLayout,g=b8t(i,l);return aF(s,m,g,n,"layout"),n.length===0?void 0:n};function aF(e,t,r,i,n,a){a=a||[];for(var o=Object.keys(e),s=0;s<o.length;s++){var l=o[s],u=a.slice();u.push(l);var c=e[l],f=t[l],h=A8t(r,l),d=(h||{}).valType,p=d==="info_array",v=d==="colorscale",m=(h||{}).items;if(!T8t(r,l))i.push(Ru("schema",n,u));else if(Gp(c)&&Gp(f)&&d!=="any")aF(c,f,h,i,n,u);else if(p&&y_(c)){c.length>f.length&&i.push(Ru("unused",n,u.concat(f.length)));var g=f.length,w=Array.isArray(m);w&&(g=Math.min(g,m.length));var b,_,M,x,T;if(h.dimensions===2)for(_=0;_<g;_++)if(y_(c[_])){c[_].length>f[_].length&&i.push(Ru("unused",n,u.concat(_,f[_].length)));var A=f[_].length;for(b=0;b<(w?Math.min(A,m[_].length):A);b++)M=w?m[_][b]:m,x=c[_][b],T=f[_][b],xd.validate(x,M)?T!==x&&T!==+x&&i.push(Ru("dynamic",n,u.concat(_,b),x,T)):i.push(Ru("value",n,u.concat(_,b),x))}else i.push(Ru("array",n,u.concat(_),c[_]));else for(_=0;_<g;_++)M=w?m[_]:m,x=c[_],T=f[_],xd.validate(x,M)?T!==x&&T!==+x&&i.push(Ru("dynamic",n,u.concat(_),x,T)):i.push(Ru("value",n,u.concat(_),x))}else if(h.items&&!p&&y_(c)){var y=m[Object.keys(m)[0]],E=[],S,C;for(S=0;S<f.length;S++){var k=f[S]._index||S;if(C=u.slice(),C.push(k),Gp(c[k])&&Gp(f[S])){E.push(k);var D=c[k],F=f[S];Gp(D)&&D.visible!==!1&&F.visible===!1?i.push(Ru("invisible",n,C)):aF(D,F,y,i,n,C)}}for(S=0;S<c.length;S++)C=u.slice(),C.push(S),Gp(c[S])?E.indexOf(S)===-1&&i.push(Ru("unused",n,C)):i.push(Ru("object",n,C,c[S]))}else!Gp(c)&&Gp(f)?i.push(Ru("object",n,u,c)):!Sj(c)&&Sj(f)&&!p&&!v?i.push(Ru("array",n,u,c)):l in t?xd.validate(c,h)?h.valType==="enumerated"&&(h.coerceNumber&&c!==+f||!Sj(c)&&c!==f||String(c)!==String(f))&&i.push(Ru("dynamic",n,u,c,f)):i.push(Ru("value",n,u,c)):i.push(Ru("unused",n,u,c))}return i}function b8t(e,t){for(var r=e.layout.layoutAttributes,i=0;i<t.length;i++){var n=t[i],a=e.traces[n.type],o=a.layoutAttributes;o&&(n.subplot?xd.extendFlat(r[a.attributes.subplot.dflt],o):xd.extendFlat(r,o))}return r}var w8t={object:function(e,t){var r;return e==="layout"&&t===""?r="The layout argument":e[0]==="data"&&t===""?r="Trace "+e[1]+" in the data argument":r=m_(e)+"key "+t,r+" must be linked to an object container"},array:function(e,t){var r;return e==="data"?r="The data argument":r=m_(e)+"key "+t,r+" must be linked to an array container"},schema:function(e,t){return m_(e)+"key "+t+" is not part of the schema"},unused:function(e,t,r){var i=Gp(r)?"container":"key";return m_(e)+i+" "+t+" did not get coerced"},dynamic:function(e,t,r,i){return[m_(e)+"key",t,"(set to '"+r+"')","got reset to","'"+i+"'","during defaults."].join(" ")},invisible:function(e,t){return(t?m_(e)+"item "+t:"Trace "+e[1])+" got defaulted to be not visible"},value:function(e,t,r){return[m_(e)+"key "+t,"is set to an invalid value ("+r+")"].join(" ")}};function m_(e){return y_(e)?"In data trace "+e[1]+", ":"In "+e+", "}function Ru(e,t,r,i,n){r=r||"";var a,o;y_(t)?(a=t[0],o=t[1]):(a=t,o=null);var s=S8t(r),l=w8t[e](t,s,i,n);return xd.log(l),{code:e,container:a,trace:o,path:r,astr:s,msg:l}}function T8t(e,t){var r=Oxe(t),i=r.keyMinusId,n=r.id;return i in e&&e[i]._isSubplotObj&&n?!0:t in e}function A8t(e,t){if(t in e)return e[t];var r=Oxe(t);return e[r.keyMinusId]}var M8t=xd.counterRegex("([a-z]+)");function Oxe(e){var t=e.match(M8t);return{keyMinusId:t&&t[1],id:t&&t[2]}}function S8t(e){if(!y_(e))return String(e);for(var t="",r=0;r<e.length;r++){var i=e[r];typeof i=="number"?t=t.slice(0,-1)+"["+i+"]":t+=i,r<e.length-1&&(t+=".")}return t}});var Gxe=W((JPr,Vxe)=>{"use strict";var E8t=it(),oF=Ng();function k8t(e,t,r){var i=document.createElement("a"),n="download"in i,a=new Promise(function(o,s){var l,u;if(n)return l=oF.createBlob(e,r),u=oF.createObjectURL(l),i.href=u,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),oF.revokeObjectURL(u),l=null,o(t);if(E8t.isSafari()){var c=r==="svg"?",":";base64,";return oF.octetStream(c+encodeURIComponent(e)),o(t)}s(new Error("download error"))});return a}Vxe.exports=k8t});var Ej=W((QPr,Wxe)=>{"use strict";var sF=it(),Hxe=uo(),C8t=Mj(),D8t=Gxe(),jxe=Ng(),$xe=40;function F8t(e,t){var r;return sF.isPlainObject(e)||(r=sF.getGraphDiv(e)),t=t||{},t.format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise(function(i,n){r&&r._snapshotInProgress&&n(new Error("Image capture already in progress.")),r&&(r._snapshotInProgress=!0);var a=C8t(e,t),o=t.filename||e.fn;if(!o){let l=jxe.getPlotTitle(e);if(l&&!Hxe.matchTex(l))o=sF.slugify(l,$xe);else{let u=jxe.getPlotSubtitle(e);u&&!Hxe.matchTex(u)&&(o=sF.slugify(u,$xe))}}var s=o||"plot-image";s+="."+t.format.replace("-","."),a.then(function(l){return r&&(r._snapshotInProgress=!1),D8t(l,s,t.format)}).then(function(l){i(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),n(l)})})}Wxe.exports=F8t});var Jxe=W(kj=>{"use strict";var Oh=it(),Nh=Oh.isPlainObject,Yxe=fw(),Xxe=Ko(),L8t=Wa(),Zxe=Da(),Kxe=cy().dfltConfig;kj.makeTemplate=function(e){e=Oh.isPlainObject(e)?e:Oh.getGraphDiv(e),e=Oh.extendDeep({_context:Kxe},{data:e.data,layout:e.layout}),Xxe.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var i={data:{},layout:{}};t.forEach(function(d){var p={};cM(d,p,I8t.bind(null,d));var v=Oh.coerce(d,{},L8t,"type"),m=i.data[v];m||(m=i.data[v]=[]),m.push(p)}),cM(r,i.layout,P8t.bind(null,r)),delete i.layout.template;var n=r.template;if(Nh(n)){var a=n.layout,o,s,l,u,c,f;Nh(a)&&lF(a,i.layout);var h=n.data;if(Nh(h)){for(s in i.data)if(l=h[s],Array.isArray(l)){for(c=i.data[s],f=c.length,u=l.length,o=0;o<f;o++)lF(l[o%u],c[o]);for(o=f;o<u;o++)c.push(Oh.extendDeep({},l[o]))}for(s in h)s in i.data||(i.data[s]=Oh.extendDeep([],h[s]))}}return i};function lF(e,t){e=Oh.extendDeep({},e);var r=Object.keys(e).sort(),i,n;function a(c,f,h){if(Nh(f)&&Nh(c))lF(c,f);else if(Array.isArray(f)&&Array.isArray(c)){var d=Zxe.arrayTemplater({_template:e},h);for(n=0;n<f.length;n++){var p=f[n],v=d.newItem(p)._template;v&&lF(v,p)}var m=d.defaultItems();for(n=0;n<m.length;n++)f.push(m[n]._template);for(n=0;n<f.length;n++)delete f[n].templateitemname}}for(i=0;i<r.length;i++){var o=r[i],s=e[o];if(o in t?a(s,t[o],o):t[o]=s,uF(o)===o)for(var l in t){var u=uF(l);l!==u&&u===o&&!(l in e)&&a(s,t[l],o)}}}function uF(e){return e.replace(/[0-9]+$/,"")}function cM(e,t,r,i,n){var a=n&&r(n);for(var o in e){var s=e[o],l=_d(e,o,i),u=_d(e,o,n),c=r(u);if(!c){var f=uF(o);f!==o&&(u=_d(e,f,n),c=r(u))}if(!(a&&a===c)&&!(!c||c._noTemplating||c.valType==="data_array"||c.arrayOk&&Array.isArray(s)))if(!c.valType&&Nh(s))cM(s,t,r,l,u);else if(c._isLinkedToArray&&Array.isArray(s))for(var h=!1,d=0,p={},v=0;v<s.length;v++){var m=s[v];if(Nh(m)){var g=m.name;if(g)p[g]||(cM(m,t,r,_d(s,d,l),_d(s,d,u)),d++,p[g]=1);else if(!h){var w=Zxe.arrayDefaultKey(o),b=_d(e,w,i),_=_d(s,d,l);cM(m,t,r,_,_d(s,d,u));var M=Oh.nestedProperty(t,_),x=Oh.nestedProperty(t,b);x.set(M.get()),M.set(null),h=!0}}}else{var T=Oh.nestedProperty(t,l);T.set(s)}}}function P8t(e,t){return Yxe.getLayoutValObject(e,Oh.nestedProperty({},t).parts)}function I8t(e,t){return Yxe.getTraceValObject(e,Oh.nestedProperty({},t).parts)}function _d(e,t,r){var i;return r?Array.isArray(e)?i=r+"["+t+"]":i=r+"."+t:i=t,i}kj.validateTemplate=function(e,t){var r=Oh.extendDeep({},{_context:Kxe,data:e.data,layout:e.layout}),i=r.layout||{};Nh(t)||(t=i.template||{});var n=t.layout,a=t.data,o=[];r.layout=i,r.layout.template=t,Xxe.supplyDefaults(r);var s=r._fullLayout,l=r._fullData,u={};function c(b,_){for(var M in b)if(M.charAt(0)!=="_"&&Nh(b[M])){var x=uF(M),T=[],A;for(A=0;A<_.length;A++)T.push(_d(b,M,_[A])),x!==M&&T.push(_d(b,x,_[A]));for(A=0;A<T.length;A++)u[T[A]]=1;c(b[M],T)}}function f(b,_){for(var M in b)if(M.indexOf("defaults")===-1&&Nh(b[M])){var x=_d(b,M,_);u[x]?f(b[M],x):o.push({code:"unused",path:x})}}if(Nh(n)?(c(s,["layout"]),f(n,"layout")):o.push({code:"layout"}),!Nh(a))o.push({code:"data"});else{for(var h={},d,p=0;p<l.length;p++){var v=l[p];d=v.type,h[d]=(h[d]||0)+1,v._template||o.push({code:"missing",index:v.index,traceType:d})}for(d in a){var m=a[d].length,g=h[d]||0;m>g?o.push({code:"unused",traceType:d,templateCount:m,dataCount:g}):g>m&&o.push({code:"reused",traceType:d,templateCount:m,dataCount:g})}}function w(b,_){for(var M in b)if(M.charAt(0)!=="_"){var x=b[M],T=_d(b,M,_);Nh(x)?(Array.isArray(b)&&x._template===!1&&x.templateitemname&&o.push({code:"missing",path:T,templateitemname:x.templateitemname}),w(x,T)):Array.isArray(x)&&R8t(x)&&w(x,T)}}if(w({data:l,layout:s},""),o.length)return o.map(z8t)};function R8t(e){for(var t=0;t<e.length;t++)if(Nh(e[t]))return!0}function z8t(e){var t;switch(e.code){case"data":t="The template has no key data.";break;case"layout":t="The template has no key layout.";break;case"missing":e.path?t="There are no templates for item "+e.path+" with name "+e.templateitemname:t="There are no templates for trace "+e.index+", of type "+e.traceType+".";break;case"unused":e.path?t="The template item at "+e.path+" was not used in constructing the plot.":e.dataCount?t="Some of the templates of type "+e.traceType+" were not used. The template has "+e.templateCount+" traces, the data only has "+e.dataCount+" of this type.":t="The template has "+e.templateCount+" traces of type "+e.traceType+" but there are none in the data.";break;case"reused":t="Some of the templates of type "+e.traceType+" were used more than once. The template has "+e.templateCount+" traces, the data has "+e.dataCount+" of this type.";break}return e.msg=t,e}});var e_e=W(Ts=>{"use strict";var fu=rF();Ts._doPlot=fu._doPlot;Ts.newPlot=fu.newPlot;Ts.restyle=fu.restyle;Ts.relayout=fu.relayout;Ts.redraw=fu.redraw;Ts.update=fu.update;Ts._guiRestyle=fu._guiRestyle;Ts._guiRelayout=fu._guiRelayout;Ts._guiUpdate=fu._guiUpdate;Ts._storeDirectGUIEdit=fu._storeDirectGUIEdit;Ts.react=fu.react;Ts.extendTraces=fu.extendTraces;Ts.prependTraces=fu.prependTraces;Ts.addTraces=fu.addTraces;Ts.deleteTraces=fu.deleteTraces;Ts.moveTraces=fu.moveTraces;Ts.purge=fu.purge;Ts.addFrames=fu.addFrames;Ts.deleteFrames=fu.deleteFrames;Ts.animate=fu.animate;Ts.setPlotConfig=fu.setPlotConfig;var B8t=K6().getGraphDiv,q8t=b7().eraseActiveShape;Ts.deleteActiveShape=function(e){return q8t(B8t(e))};Ts.toImage=Mj();Ts.validate=Uxe();Ts.downloadImage=Ej();var Qxe=Jxe();Ts.makeTemplate=Qxe.makeTemplate;Ts.validateTemplate=Qxe.validateTemplate});var x_=W((rIr,t_e)=>{"use strict";var Cj=it(),O8t=yi();t_e.exports=function(t,r,i,n){var a=n("x"),o=n("y"),s,l=O8t.getComponentMethod("calendars","handleTraceDefaults");if(l(t,r,["x","y"],i),a){var u=Cj.minRowLength(a);o?s=Math.min(u,Cj.minRowLength(o)):(s=u,n("y0"),n("dy"))}else{if(!o)return 0;s=Cj.minRowLength(o),n("x0"),n("dx")}return r._length=s,s}});var Hp=W((iIr,n_e)=>{"use strict";var r_e=it().dateTick0,N8t=Kn(),U8t=N8t.ONEWEEK;function i_e(e,t){return e%U8t===0?r_e(t,1):r_e(t,0)}n_e.exports=function(t,r,i,n,a){if(a||(a={x:!0,y:!0}),a.x){var o=n("xperiod");o&&(n("xperiod0",i_e(o,r.xcalendar)),n("xperiodalignment"))}if(a.y){var s=n("yperiod");s&&(n("yperiod0",i_e(s,r.ycalendar)),n("yperiodalignment"))}}});var s_e=W((nIr,o_e)=>{"use strict";var a_e=["orientation","groupnorm","stackgaps"];o_e.exports=function(t,r,i,n){var a=i._scatterStackOpts,o=n("stackgroup");if(o){var s=r.xaxis+r.yaxis,l=a[s];l||(l=a[s]={});var u=l[o],c=!1;u?u.traces.push(r):(u=l[o]={traceIndices:[],traces:[r]},c=!0);for(var f={orientation:r.x&&!r.y?"h":"v"},h=0;h<a_e.length;h++){var d=a_e[h],p=d+"Found";if(!u[p]){var v=t[d]!==void 0,m=d==="orientation";if((v||c)&&(u[d]=n(d,f[d]),m&&(u.fillDflt=u[d]==="h"?"tonextx":"tonexty"),v&&(u[p]=!0,!c&&(delete u.traces[0][d],m))))for(var g=0;g<u.traces.length-1;g++){var w=u.traces[g];w._input.fill!==w.fill&&(w.fill=u.fillDflt)}}}return u}}});var bd=W((aIr,f_e)=>{"use strict";var l_e=ni(),u_e=bc().hasColorscale,c_e=Fu(),V8t=$o();f_e.exports=function(t,r,i,n,a,o={}){var s=V8t.isBubble(t),l=(t.line||{}).color,u;if(l&&(i=l),a("marker.symbol"),a("marker.opacity",s?.7:1),a("marker.size"),o.noAngle||(a("marker.angle"),o.noAngleRef||a("marker.angleref"),o.noStandOff||a("marker.standoff")),a("marker.color",i),u_e(t,"marker")&&c_e(t,r,n,a,{prefix:"marker.",cLetter:"c"}),o.noSelect||(a("selected.marker.color"),a("unselected.marker.color"),a("selected.marker.size"),a("unselected.marker.size")),o.noLine||(l&&!Array.isArray(l)&&r.marker.color!==l?u=l:s?u=l_e.background:u=l_e.defaultLine,a("marker.line.color",u),u_e(t,"marker.line")&&c_e(t,r,n,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width",s?1:0),o.noLineDash||a("marker.line.dash")),s&&(a("marker.sizeref"),a("marker.sizemin"),a("marker.sizemode")),o.gradient){var c=a("marker.gradient.type");c!=="none"&&a("marker.gradient.color")}}});var jp=W((oIr,h_e)=>{"use strict";var G8t=it().isArrayOrTypedArray,H8t=bc().hasColorscale,j8t=Fu();h_e.exports=function(t,r,i,n,a,o){o||(o={});var s=(t.marker||{}).color;if(s&&s._inputArray&&(s=s._inputArray),a("line.color",i),H8t(t,"line"))j8t(t,r,n,a,{prefix:"line.",cLetter:"c"});else{var l=(G8t(s)?!1:s)||i;a("line.color",l)}a("line.width"),o.noDash||a("line.dash"),o.backoff&&a("line.backoff")}});var Nw=W((sIr,d_e)=>{"use strict";d_e.exports=function(t,r,i){var n=i("line.shape");n==="spline"&&i("line.smoothing")}});var $p=W((lIr,p_e)=>{"use strict";var $8t=it();p_e.exports=function(e,t,r,i,n){n=n||{},i("textposition"),$8t.coerceFont(i,"textfont",n.font||r.font,n),n.noSelect||(i("selected.textfont.color"),i("unselected.textfont.color"))}});var y1=W((uIr,g_e)=>{"use strict";var cF=ni(),v_e=it().isArrayOrTypedArray;function W8t(e){for(var t=cF.interpolate(e[0][1],e[1][1],.5),r=2;r<e.length;r++){var i=cF.interpolate(e[r-1][1],e[r][1],.5);t=cF.interpolate(t,i,e[r-1][0]/e[r][0])}return t}g_e.exports=function(t,r,i,n,a){a||(a={});var o=!1;if(r.marker){var s=r.marker.color,l=(r.marker.line||{}).color;s&&!v_e(s)?o=s:l&&!v_e(l)&&(o=l)}var u;if(a.moduleHasFillgradient){var c=n("fillgradient.type");if(c!=="none"){n("fillgradient.start"),n("fillgradient.stop");var f=n("fillgradient.colorscale");f&&(u=W8t(f))}}n("fillcolor",cF.addOpacity((r.line||{}).color||o||u||i,.5))}});var __e=W((cIr,x_e)=>{"use strict";var m_e=it(),Y8t=yi(),X8t=Ns(),Z8t=v1(),Uw=$o(),K8t=x_(),J8t=Hp(),Q8t=s_e(),eCt=bd(),tCt=jp(),y_e=Nw(),rCt=$p(),iCt=y1(),nCt=it().coercePattern;x_e.exports=function(t,r,i,n){function a(d,p){return m_e.coerce(t,r,X8t,d,p)}var o=K8t(t,r,n,a);if(o||(r.visible=!1),!!r.visible){J8t(t,r,n,a),a("xhoverformat"),a("yhoverformat"),a("zorder");var s=Q8t(t,r,n,a);n.scattermode==="group"&&r.orientation===void 0&&a("orientation","v");var l=!s&&o<Z8t.PTS_LINESONLY?"lines+markers":"lines";a("text"),a("hovertext"),a("mode",l),Uw.hasMarkers(r)&&eCt(t,r,i,n,a,{gradient:!0}),Uw.hasLines(r)&&(tCt(t,r,i,n,a,{backoff:!0}),y_e(t,r,a),a("connectgaps"),a("line.simplify")),Uw.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),rCt(t,r,n,a));var u=[];(Uw.hasMarkers(r)||Uw.hasText(r))&&(a("cliponaxis"),a("marker.maxdisplayed"),u.push("points")),a("fill",s?s.fillDflt:"none"),r.fill!=="none"&&(iCt(t,r,i,a,{moduleHasFillgradient:!0}),Uw.hasLines(r)||y_e(t,r,a),nCt(a,"fillpattern",r.fillcolor,!1));var c=(r.line||{}).color,f=(r.marker||{}).color;(r.fill==="tonext"||r.fill==="toself")&&u.push("fills"),a("hoveron",u.join("+")||"points"),r.hoveron!=="fills"&&(a("hovertemplate"),a("hovertemplatefallback"));var h=Y8t.getComponentMethod("errorbars","supplyDefaults");h(t,r,c||f||i,{axis:"y"}),h(t,r,c||f||i,{axis:"x",inherit:"y"}),m_e.coerceSelectionMarkerOpacity(r,a)}}});var __=W((fIr,b_e)=>{"use strict";var aCt=v_().getAxisGroup;b_e.exports=function(t,r,i,n,a){var o=r.orientation,s=r[{v:"x",h:"y"}[o]+"axis"],l=aCt(i,s)+o,u=i._alignmentOpts||{},c=n("alignmentgroup"),f=u[l];f||(f=u[l]={});var h=f[c];h?h.traces.push(r):h=f[c]={traces:[r],alignmentIndex:Object.keys(f).length,offsetGroups:{}};var d=n("offsetgroup")||"",p=h.offsetGroups,v=p[d];r._offsetIndex=0,(a!=="group"||d)&&(v||(v=p[d]={offsetIndex:Object.keys(p).length}),r._offsetIndex=v.offsetIndex)}});var Dj=W((hIr,w_e)=>{"use strict";var oCt=it(),sCt=__(),lCt=Ns();w_e.exports=function(t,r){var i,n,a,o=r.scattermode;function s(h){return oCt.coerce(n._input,n,lCt,h)}if(r.scattermode==="group")for(a=0;a<t.length;a++)n=t[a],n.type==="scatter"&&(i=n._input,sCt(i,n,r,s,o));for(a=0;a<t.length;a++){var l=t[a];if(l.type==="scatter"){var u=l.fill;if(!(u==="none"||u==="toself")&&(l.opacity=void 0,u==="tonexty"||u==="tonextx"))for(var c=a-1;c>=0;c--){var f=t[c];if(f.type==="scatter"&&f.xaxis===l.xaxis&&f.yaxis===l.yaxis){f.opacity=void 0;break}}}}}});var A_e=W((dIr,T_e)=>{"use strict";var uCt=it(),cCt=fD();T_e.exports=function(e,t){function r(n,a){return uCt.coerce(e,t,cCt,n,a)}var i=t.barmode==="group";t.scattermode==="group"&&r("scattergap",i?t.bargap:.2)}});var Wp=W((pIr,S_e)=>{"use strict";var fCt=sn(),M_e=it(),hCt=M_e.dateTime2ms,fF=M_e.incrementMonth,dCt=Kn(),pCt=dCt.ONEAVGMONTH;S_e.exports=function(t,r,i,n){if(r.type!=="date")return{vals:n};var a=t[i+"periodalignment"];if(!a)return{vals:n};var o=t[i+"period"],s;if(fCt(o)){if(o=+o,o<=0)return{vals:n}}else if(typeof o=="string"&&o.charAt(0)==="M"){var l=+o.substring(1);if(l>0&&Math.round(l)===l)s=l;else return{vals:n}}for(var u=r.calendar,c=a==="start",f=a==="end",h=t[i+"period0"],d=hCt(h,u)||0,p=[],v=[],m=[],g=n.length,w=0;w<g;w++){var b=n[w],_,M,x;if(s){for(_=Math.round((b-d)/(s*pCt)),x=fF(d,s*_,u);x>b;)x=fF(x,-s,u);for(;x<=b;)x=fF(x,s,u);M=fF(x,-s,u)}else{for(_=Math.round((b-d)/o),x=d+_*o;x>b;)x-=o;for(;x<=b;)x+=o;M=x-o}p[w]=c?M:f?x:(M+x)/2,v[w]=M,m[w]=x}return{vals:p,starts:v,ends:m}}});var wd=W((vIr,k_e)=>{"use strict";var Fj=bc().hasColorscale,Lj=Zc(),E_e=$o();k_e.exports=function(t,r){E_e.hasLines(r)&&Fj(r,"line")&&Lj(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),E_e.hasMarkers(r)&&(Fj(r,"marker")&&Lj(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),Fj(r,"marker.line")&&Lj(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var x1=W((gIr,C_e)=>{"use strict";var rl=it();C_e.exports=function(t,r){for(var i=0;i<t.length;i++)t[i].i=i;rl.mergeArray(r.text,t,"tx"),rl.mergeArray(r.texttemplate,t,"txt"),rl.mergeArray(r.hovertext,t,"htx"),rl.mergeArray(r.customdata,t,"data"),rl.mergeArray(r.textposition,t,"tp"),r.textfont&&(rl.mergeArrayCastPositive(r.textfont.size,t,"ts"),rl.mergeArray(r.textfont.color,t,"tc"),rl.mergeArray(r.textfont.family,t,"tf"),rl.mergeArray(r.textfont.weight,t,"tw"),rl.mergeArray(r.textfont.style,t,"ty"),rl.mergeArray(r.textfont.variant,t,"tv"),rl.mergeArray(r.textfont.textcase,t,"tC"),rl.mergeArray(r.textfont.lineposition,t,"tE"),rl.mergeArray(r.textfont.shadow,t,"tS"));var n=r.marker;if(n){rl.mergeArrayCastPositive(n.size,t,"ms"),rl.mergeArrayCastPositive(n.opacity,t,"mo"),rl.mergeArray(n.symbol,t,"mx"),rl.mergeArray(n.angle,t,"ma"),rl.mergeArray(n.standoff,t,"mf"),rl.mergeArray(n.color,t,"mc");var a=n.line;n.line&&(rl.mergeArray(a.color,t,"mlc"),rl.mergeArrayCastPositive(a.width,t,"mlw"),rl.mergeArray(a.dash,t,"mld"));var o=n.gradient;o&&o.type!=="none"&&(rl.mergeArray(o.type,t,"mgt"),rl.mergeArray(o.color,t,"mgc"))}}});var w0=W((mIr,F_e)=>{"use strict";var D_e=it();F_e.exports=function(t,r){D_e.isArrayOrTypedArray(r.selectedpoints)&&D_e.tagSelected(t,r)}});var Td=W((yIr,q_e)=>{"use strict";var L_e=sn(),Ij=it(),fM=ji(),P_e=Wp(),Pj=Kn().BADNUM,Rj=$o(),vCt=wd(),gCt=x1(),mCt=w0();function yCt(e,t){var r=e._fullLayout,i=t._xA=fM.getFromId(e,t.xaxis||"x","x"),n=t._yA=fM.getFromId(e,t.yaxis||"y","y"),a=i.makeCalcdata(t,"x"),o=n.makeCalcdata(t,"y"),s=P_e(t,i,"x",a),l=P_e(t,n,"y",o),u=s.vals,c=l.vals,f=t._length,h=new Array(f),d=t.ids,p=zj(t,r,i,n),v=!1,m,g,w,b,_,M;z_e(r,t);var x="x",T="y",A;if(p)Ij.pushUnique(p.traceIndices,t.index),m=p.orientation==="v",m?(T="s",A="x"):(x="s",A="y"),_=p.stackgaps==="interpolate";else{var y=R_e(t,f);I_e(e,t,i,n,u,c,y)}var E=!!t.xperiodalignment,S=!!t.yperiodalignment;for(g=0;g<f;g++){var C=h[g]={},k=L_e(u[g]),D=L_e(c[g]);k&&D?(C[x]=u[g],C[T]=c[g],E&&(C.orig_x=a[g],C.xEnd=s.ends[g],C.xStart=s.starts[g]),S&&(C.orig_y=o[g],C.yEnd=l.ends[g],C.yStart=l.starts[g])):p&&(m?k:D)?(C[A]=m?u[g]:c[g],C.gap=!0,_?(C.s=Pj,v=!0):C.s=0):C[x]=C[T]=Pj,d&&(C.id=String(d[g]))}if(gCt(h,t),vCt(e,t),mCt(h,t),p){for(g=0;g<h.length;)h[g][A]===Pj?h.splice(g,1):g++;if(Ij.sort(h,function(L,I){return L[A]-I[A]||L.i-I.i}),v){for(g=0;g<h.length-1&&h[g].gap;)g++;for(M=h[g].s,M||(M=h[g].s=0),w=0;w<g;w++)h[w].s=M;for(b=h.length-1;b>g&&h[b].gap;)b--;for(M=h[b].s,w=h.length-1;w>b;w--)h[w].s=M;for(;g<b;)if(g++,h[g].gap){for(w=g+1;h[w].gap;)w++;for(var F=h[g-1][A],P=h[g-1].s,R=(h[w].s-P)/(h[w][A]-F);g<w;)h[g].s=P+(h[g][A]-F)*R,g++}}}return h}function I_e(e,t,r,i,n,a,o){var s=t._length,l=e._fullLayout,u=r._id,c=i._id,f=l._firstScatter[B_e(t)]===t.uid,h=(zj(t,l,r,i)||{}).orientation,d=t.fill;r._minDtick=0,i._minDtick=0;var p={padded:!0},v={padded:!0};o&&(p.ppad=v.ppad=o);var m=s<2||n[0]!==n[s-1]||a[0]!==a[s-1];m&&(d==="tozerox"||d==="tonextx"&&(f||h==="h"))?p.tozero=!0:!(t.error_y||{}).visible&&(d==="tonexty"||d==="tozeroy"||!Rj.hasMarkers(t)&&!Rj.hasText(t))&&(p.padded=!1,p.ppad=0),m&&(d==="tozeroy"||d==="tonexty"&&(f||h==="v"))?v.tozero=!0:(d==="tonextx"||d==="tozerox")&&(v.padded=!1),u&&(t._extremes[u]=fM.findExtremes(r,n,p)),c&&(t._extremes[c]=fM.findExtremes(i,a,v))}function R_e(e,t){if(Rj.hasMarkers(e)){var r=e.marker,i=1.6*(e.marker.sizeref||1),n;if(e.marker.sizemode==="area"?n=function(u){return Math.max(Math.sqrt((u||0)/i),3)}:n=function(u){return Math.max((u||0)/i,3)},Ij.isArrayOrTypedArray(r.size)){var a={type:"linear"};fM.setConvert(a);for(var o=a.makeCalcdata(e.marker,"size"),s=new Array(t),l=0;l<t;l++)s[l]=n(o[l]);return s}else return n(r.size)}}function z_e(e,t){var r=B_e(t),i=e._firstScatter;i[r]||(i[r]=t.uid)}function B_e(e){var t=e.stackgroup;return e.xaxis+e.yaxis+e.type+(t?"-"+t:"")}function zj(e,t,r,i){var n=e.stackgroup;if(n){var a=t._scatterStackOpts[r._id+i._id][n],o=a.orientation==="v"?i:r;if(o.type==="linear"||o.type==="log")return a}}q_e.exports={calc:yCt,calcMarkerSize:R_e,calcAxisExpansion:I_e,setFirstScatter:z_e,getStackOpts:zj}});var N_e=W((xIr,O_e)=>{"use strict";O_e.exports=hF;var xCt=it().distinctVals;function hF(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,i=t.posAxis._id.charAt(0),n=[],a=0;a<e.length;a++){for(var o=e[a],s=0;s<o.length;s++){var l=o[s],u=l.p;u===void 0&&(u=l[i]),u!==void 0&&n.push(u)}o[0]&&o[0].width1&&(r=Math.min(o[0].width1,r))}this.positions=n;var c=xCt(n);this.distinctPositions=c.vals,c.vals.length===1&&r!==1/0?this.minDiff=r:this.minDiff=Math.min(c.minDiff,r);var f=(t.posAxis||{}).type;(f==="category"||f==="multicategory")&&(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}hF.prototype.put=function(t,r,i){var n=this.getLabel(t,r,i),a=this.bins[n]||0;return this.bins[n]=a+i,a};hF.prototype.get=function(t,r,i){var n=this.getLabel(t,r,i);return this.bins[n]||0};hF.prototype.getLabel=function(t,r,i){var n=i<0&&this.sepNegVal?"v":"^",a=this.overlapNoMerge?t:Math.round(t/this.binWidth);return n+a+"g"+r}});var Uy=W((_Ir,U_e)=>{"use strict";U_e.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var b_=W((bIr,j_e)=>{"use strict";var Ad=sn(),{isArrayOrTypedArray:Ug}=it(),{BADNUM:Vw}=Kn(),_Ct=yi(),hM=ji(),{getAxisGroup:bCt}=v_(),dF=N_e(),{TEXTPAD:wCt}=Uy(),{LINE_SPACING:TCt}=Hl(),{BR_TAG_ALL:ACt}=uo();function MCt(e,t){for(var r=t.xaxis,i=t.yaxis,n=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;u<a.length;u++){var c=a[u];if(c.visible===!0&&_Ct.traceIs(c,"bar")&&c.xaxis===r._id&&c.yaxis===i._id&&(c.orientation==="h"?s.push(o[u]):l.push(o[u]),c._computePh))for(var f=e.calcdata[u],h=0;h<f.length;h++)typeof f[h].ph0=="function"&&(f[h].ph0=f[h].ph0()),typeof f[h].ph1=="function"&&(f[h].ph1=f[h].ph1())}var d={xCat:r.type==="category"||r.type==="multicategory",yCat:i.type==="category"||i.type==="multicategory",mode:n.barmode,norm:n.barnorm,gap:n.bargap,groupgap:n.bargroupgap};qj(e,r,i,l,d),qj(e,i,r,s,d)}function qj(e,t,r,i,n){if(i.length){var a,o,s,l,u;switch(kCt(r,i),n.mode){case"overlay":Bj(e,t,r,i,n);break;case"group":for(a=[],o=[],s=0;s<i.length;s++)l=i[s],u=l[0].trace,u.offset===void 0?o.push(l):a.push(l);o.length&&CCt(e,t,r,o,n),a.length&&Bj(e,t,r,a,n);break;case"stack":case"relative":for(a=[],o=[],s=0;s<i.length;s++)l=i[s],u=l[0].trace,u.base===void 0?o.push(l):a.push(l);ECt(o),o.length&&DCt(e,t,r,o,n),a.length&&Bj(e,t,r,a,n);break}SCt(i),zCt(i,t)}}function SCt(e){var t,r,i,n,a,o,s;for(t=0;t<e.length;t++)r=e[t],i=r[0].trace,n=r[0].t,n.cornerradiusvalue===void 0&&(a=i.marker?i.marker.cornerradius:void 0,a!==void 0&&(o=Ad(a)?+a:+a.slice(0,-1),s=Ad(a)?"px":"%",n.cornerradiusvalue=o,n.cornerradiusform=s))}function ECt(e){if(!(e.length<2)){var t,r,i,n,a,o,s;for(t=0;t<e.length&&(r=e[t],i=r[0].trace,a=i.marker?i.marker.cornerradius:void 0,a===void 0);t++);if(a!==void 0)for(o=Ad(a)?+a:+a.slice(0,-1),s=Ad(a)?"px":"%",t=0;t<e.length;t++)r=e[t],n=r[0].t,n.cornerradiusvalue=o,n.cornerradiusform=s}}function kCt(e,t){var r,i;for(r=0;r<t.length;r++){var n=t[r],a=n[0].trace,o=a.type==="funnel"?a._base:a.base,s,l=a.orientation==="h"?a.xcalendar:a.ycalendar,u=e.type==="category"||e.type==="multicategory"?function(){return null}:e.d2c;if(Ug(o)){for(i=0;i<Math.min(o.length,n.length);i++)s=u(o[i],0,l),Ad(s)?(n[i].b=+s,n[i].hasB=1):n[i].b=0;for(;i<n.length;i++)n[i].b=0}else{s=u(o,0,l);var c=Ad(s);for(s=c?s:0,i=0;i<n.length;i++)n[i].b=s,c&&(n[i].hasB=1)}}}function Bj(e,t,r,i,n){for(var a=0;a<i.length;a++){var o=i[a],s=new dF([o],{posAxis:t,sepNegVal:!1,overlapNoMerge:!n.norm});Oj(e,t,s,n),n.norm?(H_e(s),Nj(r,s,n)):G_e(r,s)}}function CCt(e,t,r,i,n){var a=new dF(i,{posAxis:t,sepNegVal:!1,overlapNoMerge:!n.norm});Oj(e,t,a,n),ICt(a,t),n.norm?(H_e(a),Nj(r,a,n)):G_e(r,a)}function DCt(e,t,r,i,n){var a=new dF(i,{posAxis:t,sepNegVal:n.mode==="relative",overlapNoMerge:!(n.norm||n.mode==="stack"||n.mode==="relative")});Oj(e,t,a,n),PCt(r,a,n);for(var o=0;o<i.length;o++)for(var s=i[o],l=s[0].t.offsetindex,u=0;u<s.length;u++){var c=s[u];if(c.s!==Vw){var f=c.b+c.s===a.get(c.p,l,c.s);f&&(c._outmost=!0)}}n.norm&&Nj(r,a,n)}function Oj(e,t,r,i){var n=e._fullLayout,a=r.positions,o=r.distinctPositions,s=r.minDiff,l=r.traces,u=l.length,c=a.length!==o.length,f=s*(1-i.gap),h,d,p,v;if(t._id==="angularaxis")h=f,d=h*(1-(i.groupgap||0)),p=-d/2;else{var m=bCt(n,t._id)+l[0][0].trace.orientation;v=n._alignmentOpts[m]||{}}for(var g=0;g<u;g++){var w=l[g],b=w[0].trace;if(t._id!=="angularaxis"){var _=v[b.alignmentgroup]||{},M=Object.keys(_.offsetGroups||{}).length;M?h=f/M:h=c?f/u:f,d=h*(1-(i.groupgap||0)),M?p=((2*b._offsetIndex+1-M)*h-d)/2:p=c?((2*g+1-u)*h-d)/2:-d/2}var x=w[0].t;x.barwidth=d,x.offsetindex=b._offsetIndex||0,x.poffset=p,x.bargroupwidth=f,x.bardelta=s}r.binWidth=l[0][0].t.barwidth/100,FCt(r),LCt(t,r),t._id==="angularaxis"?V_e(t,r):V_e(t,r,c)}function FCt(e){var t=e.traces,r,i;for(r=0;r<t.length;r++){var n=t[r],a=n[0],o=a.trace,s=a.t,l=o._offset||o.offset,u=s.poffset,c;if(Ug(l)){for(c=Array.prototype.slice.call(l,0,n.length),i=0;i<c.length;i++)Ad(c[i])||(c[i]=u);for(i=c.length;i<n.length;i++)c.push(u);s.poffset=c}else l!==void 0&&(s.poffset=l);var f=o._width||o.width,h=s.barwidth;if(Ug(f)){var d=Array.prototype.slice.call(f,0,n.length);for(i=0;i<d.length;i++)Ad(d[i])||(d[i]=h);for(i=d.length;i<n.length;i++)d.push(h);if(s.barwidth=d,l===void 0){for(c=[],i=0;i<n.length;i++)c.push(u+(h-d[i])/2);s.poffset=c}}else f!==void 0&&(s.barwidth=f,l===void 0&&(s.poffset=u+(h-f)/2))}}function LCt(e,t){for(var r=t.traces,i=Gw(e),n=0;n<r.length;n++)for(var a=r[n],o=a[0].t,s=o.poffset,l=Ug(s),u=o.barwidth,c=Ug(u),f=0;f<a.length;f++){var h=a[f],d=h.w=c?u[f]:u;h.p===void 0&&(h.p=h[i],h["orig_"+i]=h[i]);var p=(l?s[f]:s)+d/2;h[i]=h.p+p}}function V_e(e,t,r){var i=t.traces,n=t.minDiff,a=n/2;hM.minDtick(e,t.minDiff,t.distinctPositions[0],r);for(var o=0;o<i.length;o++){var s=i[o],l=s[0],u=l.trace,c=[],f,h,d,p;for(p=0;p<s.length;p++)f=s[p],h=f.p-a,d=f.p+a,c.push(h,d);if(u.width||u.offset){var v=l.t,m=v.poffset,g=v.barwidth,w=Ug(m),b=Ug(g);for(p=0;p<s.length;p++){f=s[p];var _=w?m[p]:m,M=b?g[p]:g;h=f.p+_,d=h+M,c.push(h,d)}}u._extremes[e._id]=hM.findExtremes(e,c,{padded:!1})}}function G_e(e,t){for(var r=t.traces,i=Gw(e),n=0;n<r.length;n++){for(var a=r[n],o=a[0].trace,s=o.type==="scatter",l=o.orientation==="v",u=[],c=!1,f=0;f<a.length;f++){var h=a[f],d=s?0:h.b,p=s?l?h.y:h.x:d+h.s;h[i]=p,u.push(p),h.hasB&&u.push(d),(!h.hasB||!h.b)&&(c=!0)}let{ppadminus:v,ppadplus:m}=Uj(o,a);o._extremes[e._id]=hM.findExtremes(e,u,{tozero:c,padded:!0,ppadplus:m,ppadminus:v})}}function PCt(e,t,r){var i=Gw(e),n=t.traces,a,o,s,l,u,c,f;for(l=0;l<n.length;l++)if(a=n[l],o=a[0].trace,o.type==="funnel")for(f=a[0].t.offsetindex,u=0;u<a.length;u++)c=a[u],c.s!==Vw&&t.put(c.p,f,-.5*c.s);for(l=0;l<n.length;l++){a=n[l],o=a[0].trace,s=o.type==="funnel",f=o.type==="barpolar"?0:a[0].t.offsetindex;var h=[];for(u=0;u<a.length;u++)if(c=a[u],c.s!==Vw){var d;s?d=c.s:d=c.s+c.b;var p=t.put(c.p,f,d),v=p+d;c.b=p,c[i]=v,r.norm||(h.push(v),c.hasB&&h.push(p))}if(!r.norm){let{ppadminus:m,ppadplus:g}=Uj(o,a);o._extremes[e._id]=hM.findExtremes(e,h,{tozero:!0,padded:!0,ppadplus:g,ppadminus:m})}}}function H_e(e){for(var t=e.traces,r=0;r<t.length;r++)for(var i=t[r],n=i[0].t.offsetindex,a=0;a<i.length;a++){var o=i[a];o.s!==Vw&&e.put(o.p,n,o.b+o.s)}}function ICt(e,t){for(var r=e.traces,i=0;i<r.length;i++){var n=r[i],a=n[0].trace,o=n[0].t.offsetindex;if(a.base===void 0)for(var s=new dF([n],{posAxis:t,sepNegVal:!0,overlapNoMerge:!0}),l=0;l<n.length;l++){var u=n[l];if(u.p!==Vw){var c=s.put(u.p,o,u.b+u.s);c&&(u.b=c)}}}}function Nj(e,t,r){var i=t.traces,n=Gw(e),a=r.norm==="fraction"?1:100,o=a/1e9,s=e.l2c(e.c2l(0)),l=r.mode==="stack"?a:s;function u(x){return Ad(e.c2l(x))&&(x<s-o||x>l+o||!Ad(s))}for(var c=0;c<i.length;c++){for(var f=i[c],h=f[0].t.offsetindex,d=f[0].trace,p=[],v=!1,m=!1,g=0;g<f.length;g++){var w=f[g];if(w.s!==Vw){var b=Math.abs(a/t.get(w.p,h,w.s));w.b*=b,w.s*=b;var _=w.b,M=_+w.s;w[n]=M,p.push(M),m=m||u(M),w.hasB&&(p.push(_),m=m||u(_)),(!w.hasB||!w.b)&&(v=!0)}}let{ppadminus:x,ppadplus:T}=Uj(d,f);d._extremes[e._id]=hM.findExtremes(e,p,{tozero:v,padded:m,ppadplus:T,ppadminus:x})}}function Uj(e,t){if(e.orientation==="v"&&(e.text||e.texttemplate)&&e.textposition==="outside"&&(e.textangle==="auto"||e.textangle===0)){let i=function(a){return!a||typeof a!="string"?0:(a.match(ACt)||[]).length+1};var r;e.texttemplate?r=i(e.texttemplate):r=Ug(e.text)?Math.max(...e.text.map(a=>i(a))):i(e.text);let n=e.outsidetextfont.size*TCt*r+wCt;return{ppadplus:t.some(a=>a.s<0)?n:0,ppadminus:t.some(a=>a.s>=0)?n:0}}return{ppadplus:void 0,ppadminus:void 0}}function RCt(e,t,r,i){for(var n=Gw(i),a=0;a<e.length;a++)for(var o=e[a],s=0;s<o.length;s++){var l=o[s],u=l[n];l._sMin=t[u],l._sMax=r[u]}}function zCt(e,t){var r=Gw(t),i={},n,a,o,s=1/0,l=-1/0;for(n=0;n<e.length;n++)for(o=e[n],a=0;a<o.length;a++){var u=o[a].p;Ad(u)&&(s=Math.min(s,u),l=Math.max(l,u))}var c=1e4/(l-s),f=i.round=function(A){return String(Math.round(c*(A-s)))},h={},d={},p=e.some(function(A){var y=A[0].trace;return"marker"in y&&y.marker.cornerradius});for(n=0;n<e.length;n++){o=e[n],o[0].t.extents=i;var v=o[0].t.poffset,m=Ug(v);for(a=0;a<o.length;a++){var g=o[a],w=g[r]-g.w/2;if(Ad(w)){var b=g[r]+g.w/2,_=f(g.p);i[_]?i[_]=[Math.min(w,i[_][0]),Math.max(b,i[_][1])]:i[_]=[w,b]}if(g.p0=g.p+(m?v[a]:v),g.p1=g.p0+g.w,g.s0=g.b,g.s1=g.s0+g.s,p){var M=Math.min(g.s0,g.s1)||0,x=Math.max(g.s0,g.s1)||0,T=g[r];h[T]=T in h?Math.min(h[T],M):M,d[T]=T in d?Math.max(d[T],x):x}}}p&&RCt(e,h,d,t)}function Gw(e){return e._id.charAt(0)}j_e.exports={crossTraceCalc:MCt,setGroupPositions:qj}});var X_e=W((wIr,Y_e)=>{"use strict";var $_e=Td(),W_e=b_().setGroupPositions;function BCt(e,t){for(var r=t.xaxis,i=t.yaxis,n=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;u<a.length;u++){var c=a[u];c.visible===!0&&c.type==="scatter"&&c.xaxis===r._id&&c.yaxis===i._id&&(c.orientation==="h"?s.push(o[u]):c.orientation==="v"&&l.push(o[u]))}var f={mode:n.scattermode,gap:n.scattergap};W_e(e,r,i,l,f),W_e(e,i,r,s,f)}Y_e.exports=function(t,r){t._fullLayout.scattermode==="group"&&BCt(t,r);var i=r.xaxis,n=r.yaxis,a=i._id+n._id,o=t._fullLayout._scatterStackOpts[a];if(o){var s=t.calcdata,l,u,c,f,h,d,p,v,m,g,w,b,_,M,x;for(var T in o){g=o[T];var A=g.traceIndices;if(A.length){for(w=g.stackgaps==="interpolate",b=g.groupnorm,g.orientation==="v"?(_="x",M="y"):(_="y",M="x"),x=new Array(A.length),l=0;l<x.length;l++)x[l]=!1;d=s[A[0]];var y=new Array(d.length);for(l=0;l<d.length;l++)y[l]=d[l][_];for(l=1;l<A.length;l++){for(h=s[A[l]],u=c=0;u<h.length;u++){for(p=h[u][_];p>y[c]&&c<y.length;c++)Vj(h,u,y[c],l,x,w,_),u++;if(p!==y[c]){for(f=0;f<l;f++)Vj(s[A[f]],c,p,f,x,w,_);y.splice(c,0,p)}c++}for(;c<y.length;c++)Vj(h,u,y[c],l,x,w,_),u++}var E=y.length;for(u=0;u<d.length;u++){for(v=d[u][M]=d[u].s,l=1;l<A.length;l++)h=s[A[l]],h[0].trace._rawLength=h[0].trace._length,h[0].trace._length=E,v+=h[u].s,h[u][M]=v;if(b)for(m=(b==="fraction"?v:v/100)||1,l=0;l<A.length;l++){var S=s[A[l]][u];S[M]/=m,S.sNorm=S.s/m}}for(l=0;l<A.length;l++){h=s[A[l]];var C=h[0].trace,k=$_e.calcMarkerSize(C,C._rawLength),D=Array.isArray(k);if(k&&x[l]||D){var F=k;for(k=new Array(E),u=0;u<E;u++)k[u]=h[u].gap?0:D?F[h[u].i]:F}var P=new Array(E),R=new Array(E);for(u=0;u<E;u++)P[u]=h[u].x,R[u]=h[u].y;$_e.calcAxisExpansion(t,C,i,n,P,R,k),h[0].t.orientation=g.orientation}}}}};function Vj(e,t,r,i,n,a,o){n[i]=!0;var s={i:null,gap:!0,s:0};if(s[o]=r,e.splice(t,0,s),t&&r===e[t-1][o]){var l=e[t-1];s.s=l.s,s.i=l.i,s.gap=l.gap}else a&&(s.s=qCt(e,t,r,o));t||(e[0].t=e[1].t,e[0].trace=e[1].trace,delete e[1].t,delete e[1].trace)}function qCt(e,t,r,i){var n=e[t-1],a=e[t+1];return a?n?n.s+(a.s-n.s)*(r-n[i])/(a[i]-n[i]):a.s:n.s}});var Hj=W((TIr,tbe)=>{"use strict";var OCt=Ji(),Q_e=Kn(),dM=Q_e.BADNUM,ebe=Q_e.LOG_CLIP,Z_e=ebe+.5,K_e=ebe-.5,pF=it(),NCt=pF.segmentsIntersect,J_e=pF.constrain,Gj=v1();tbe.exports=function(t,r){var i=r.trace||{},n=r.xaxis,a=r.yaxis,o=n.type==="log",s=a.type==="log",l=n._length,u=a._length,c=r.backoff,f=i.marker,h=r.connectGaps,d=r.baseTolerance,p=r.shape,v=p==="linear",m=i.fill&&i.fill!=="none",g=[],w=Gj.minTolerance,b=t.length,_=new Array(b),M=0,x,T,A,y,E,S,C,k,D,F,P,R,L,I,B,O;function $(Xe){var mt=t[Xe];if(!mt)return!1;var bt=r.linearized?n.l2p(mt.x):n.c2p(mt.x),Ne=r.linearized?a.l2p(mt.y):a.c2p(mt.y);if(bt===dM){if(o&&(bt=n.c2p(mt.x,!0)),bt===dM)return!1;s&&Ne===dM&&(bt*=Math.abs(n._m*u*(n._m>0?Z_e:K_e)/(a._m*l*(a._m>0?Z_e:K_e)))),bt*=1e3}if(Ne===dM){if(s&&(Ne=a.c2p(mt.y,!0)),Ne===dM)return!1;Ne*=1e3}return[bt,Ne]}function Y(Xe,mt,bt,Ne){var Ue=bt-Xe,Ge=Ne-mt,je=.5-Xe,Re=.5-mt,Ve=Ue*Ue+Ge*Ge,ct=Ue*je+Ge*Re;if(ct>0&&ct<Ve){var Tt=je*Ge-Re*Ue;if(Tt*Tt<Ve)return!0}}var K,j;function q(Xe,mt){var bt=Xe[0]/l,Ne=Xe[1]/u,Ue=Math.max(0,-bt,bt-1,-Ne,Ne-1);return Ue&&K!==void 0&&Y(bt,Ne,K,j)&&(Ue=0),Ue&&mt&&Y(bt,Ne,mt[0]/l,mt[1]/u)&&(Ue=0),(1+Gj.toleranceGrowth*Ue)*d}function J(Xe,mt){var bt=Xe[0]-mt[0],Ne=Xe[1]-mt[1];return Math.sqrt(bt*bt+Ne*Ne)}var U=Gj.maxScreensAway,V=-l*U,X=l*(1+U),H=-u*U,G=u*(1+U),Q=[[V,H,X,H],[X,H,X,G],[X,G,V,G],[V,G,V,H]],te,ce,ge,Ce,be,he;function oe(Xe,mt){for(var bt=[],Ne=0,Ue=0;Ue<4;Ue++){var Ge=Q[Ue],je=NCt(Xe[0],Xe[1],mt[0],mt[1],Ge[0],Ge[1],Ge[2],Ge[3]);je&&(!Ne||Math.abs(je.x-bt[0][0])>1||Math.abs(je.y-bt[0][1])>1)&&(je=[je.x,je.y],Ne&&J(je,Xe)<J(bt[0],Xe)?bt.unshift(je):bt.push(je),Ne++)}return bt}function Ee(Xe){if(Xe[0]<V||Xe[0]>X||Xe[1]<H||Xe[1]>G)return[J_e(Xe[0],V,X),J_e(Xe[1],H,G)]}function ye(Xe,mt){if(Xe[0]===mt[0]&&(Xe[0]===V||Xe[0]===X)||Xe[1]===mt[1]&&(Xe[1]===H||Xe[1]===G))return!0}function ue(Xe,mt){var bt=[],Ne=Ee(Xe),Ue=Ee(mt);return Ne&&Ue&&ye(Ne,Ue)||(Ne&&bt.push(Ne),Ue&&bt.push(Ue)),bt}function ee(Xe,mt,bt){return function(Ne,Ue){var Ge=Ee(Ne),je=Ee(Ue),Re=[];if(Ge&&je&&ye(Ge,je))return Re;Ge&&Re.push(Ge),je&&Re.push(je);var Ve=2*pF.constrain((Ne[Xe]+Ue[Xe])/2,mt,bt)-((Ge||Ne)[Xe]+(je||Ue)[Xe]);if(Ve){var ct;Ge&&je?ct=Ve>0==Ge[Xe]>je[Xe]?Ge:je:ct=Ge||je,ct[Xe]+=Ve}return Re}}var ae;p==="linear"||p==="spline"?ae=oe:p==="hv"||p==="vh"?ae=ue:p==="hvh"?ae=ee(0,V,X):p==="vhv"&&(ae=ee(1,H,G));function xe(Xe,mt){var bt=mt[0]-Xe[0],Ne=(mt[1]-Xe[1])/bt,Ue=(Xe[1]*mt[0]-mt[1]*Xe[0])/bt;return Ue>0?[Ne>0?V:X,G]:[Ne>0?X:V,H]}function re(Xe){var mt=Xe[0],bt=Xe[1],Ne=mt===_[M-1][0],Ue=bt===_[M-1][1];if(!(Ne&&Ue))if(M>1){var Ge=mt===_[M-2][0],je=bt===_[M-2][1];Ne&&(mt===V||mt===X)&&Ge?je?M--:_[M-1]=Xe:Ue&&(bt===H||bt===G)&&je?Ge?M--:_[M-1]=Xe:_[M++]=Xe}else _[M++]=Xe}function pe(Xe){_[M-1][0]!==Xe[0]&&_[M-1][1]!==Xe[1]&&re([ge,Ce]),re(Xe),be=null,ge=Ce=0}var we=pF.isArrayOrTypedArray(f);function Fe(Xe){if(Xe&&c&&(Xe.i=x,Xe.d=t,Xe.trace=i,Xe.marker=we?f[Xe.i]:f,Xe.backoff=c),K=Xe[0]/l,j=Xe[1]/u,te=Xe[0]<V?V:Xe[0]>X?X:0,ce=Xe[1]<H?H:Xe[1]>G?G:0,te||ce){if(!M)_[M++]=[te||Xe[0],ce||Xe[1]];else if(be){var mt=ae(be,Xe);mt.length>1&&(pe(mt[0]),_[M++]=mt[1])}else he=ae(_[M-1],Xe)[0],_[M++]=he;var bt=_[M-1];te&&ce&&(bt[0]!==te||bt[1]!==ce)?(be&&(ge!==te&&Ce!==ce?re(ge&&Ce?xe(be,Xe):[ge||te,Ce||ce]):ge&&Ce&&re([ge,Ce])),re([te,ce])):ge-te&&Ce-ce&&re([te||ge,ce||Ce]),be=Xe,ge=te,Ce=ce}else be&&pe(ae(be,Xe)[0]),_[M++]=Xe}for(x=0;x<b;x++)if(T=$(x),!!T){for(M=0,be=null,Fe(T),x++;x<b;x++){if(y=$(x),!y){if(h)continue;break}if(!v||!r.simplify){Fe(y);continue}var Se=$(x+1);if(F=J(y,T),!(!(m&&(M===0||M===b-1))&&F<q(y,Se)*w)){for(k=[(y[0]-T[0])/F,(y[1]-T[1])/F],E=T,P=F,R=I=B=0,C=!1,A=y,x++;x<t.length;x++){if(S=Se,Se=$(x+1),!S){if(h)continue;break}if(D=[S[0]-T[0],S[1]-T[1]],O=D[0]*k[1]-D[1]*k[0],I=Math.min(I,O),B=Math.max(B,O),B-I>q(S,Se))break;A=S,L=D[0]*k[0]+D[1]*k[1],L>P?(P=L,y=S,C=!1):L<R&&(R=L,E=S,C=!0)}if(C?(Fe(y),A!==E&&Fe(E)):(E!==T&&Fe(E),A!==y&&Fe(y)),Fe(A),x>=t.length||!S)break;Fe(S),T=S}}be&&re([ge||be[0],Ce||be[1]]),g.push(_.slice(0,M))}var ke=p.slice(p.length-1);if(c&&ke!=="h"&&ke!=="v"){for(var _e=!1,Ie=-1,Oe=[],Qe=0;Qe<g.length;Qe++)for(var et=0;et<g[Qe].length-1;et++){var _t=g[Qe][et],ut=g[Qe][et+1],vt=OCt.applyBackoff(ut,_t);(vt[0]!==ut[0]||vt[1]!==ut[1])&&(_e=!0),Oe[Ie+1]||(Ie++,Oe[Ie]=[_t,[vt[0],vt[1]]])}return _e?Oe:g}return g}});var jj=W((AIr,ibe)=>{"use strict";var rbe={tonextx:1,tonexty:1,tonext:1};ibe.exports=function(t,r,i){var n,a,o,s,l,u={},c=!1,f=-1,h=0,d=-1;for(a=0;a<i.length;a++)n=i[a][0].trace,o=n.stackgroup||"",o?o in u?l=u[o]:(l=u[o]=h,h++):n.fill in rbe&&d>=0?l=d:(l=d=h,h++),l<f&&(c=!0),n._groupIndex=f=l;var p=i.slice();c&&p.sort(function(m,g){var w=m[0].trace,b=g[0].trace;return w._groupIndex-b._groupIndex||w.index-b.index});var v={};for(a=0;a<p.length;a++)n=p[a][0].trace,o=n.stackgroup||"",n.visible===!0?(n._nexttrace=null,n.fill in rbe&&(s=v[o],n._prevtrace=s||null,s&&(s._nexttrace=n)),n._ownfill=n.fill&&(n.fill.slice(0,6)==="tozero"||n.fill==="toself"||n.fill.slice(0,2)==="to"&&!n._prevtrace),v[o]=n):n._prevtrace=n._nexttrace=n._ownfill=null;return p}});var $w=W((MIr,obe)=>{"use strict";var Yp=vi(),UCt=yi(),pM=it(),Hw=pM.ensureSingle,abe=pM.identity,hl=Ji(),jw=$o(),VCt=Hj(),GCt=jj(),vF=GA().tester;obe.exports=function(t,r,i,n,a,o){var s,l,u=!a,c=!!a&&a.duration>0,f=GCt(t,r,i);if(s=n.selectAll("g.trace").data(f,function(d){return d[0].trace.uid}),s.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),s.order(),HCt(t,s,r),c){o&&(l=o());var h=Yp.transition().duration(a.duration).ease(a.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});h.each(function(){n.selectAll("g.trace").each(function(d,p){nbe(t,p,r,d,f,this,a)})})}else s.each(function(d,p){nbe(t,p,r,d,f,this,a)});u&&s.exit().remove(),n.selectAll("path:not([d])").remove()};function HCt(e,t,r){t.each(function(i){var n=Hw(Yp.select(this),"g","fills");hl.setClipUrl(n,r.layerClipId,e);var a=i[0].trace;a._ownFill=null,a._nextFill=null;var o=[];a._ownfill&&o.push("_ownFill"),a._nexttrace&&o.push("_nextFill");var s=n.selectAll("g").data(o,abe);s.enter().append("g"),s.exit().remove(),s.order().each(function(l){a[l]=Hw(Yp.select(this),"path","js-fill")})})}function nbe(e,t,r,i,n,a,o){var s=e._context.staticPlot,l;jCt(e,t,r,i,n);var u=!!o&&o.duration>0;function c(ee){return u?ee.transition():ee}var f=r.xaxis,h=r.yaxis,d=i[0].trace,p=d.line,v=Yp.select(a),m=Hw(v,"g","errorbars"),g=Hw(v,"g","lines"),w=Hw(v,"g","points"),b=Hw(v,"g","text");if(UCt.getComponentMethod("errorbars","plot")(e,m,r,o),d.visible!==!0)return;c(v).style("opacity",d.opacity);var _,M,x=d.fill.charAt(d.fill.length-1);x!=="x"&&x!=="y"&&(x="");var T,A;x==="y"?(T=1,A=h.c2p(0,!0)):x==="x"&&(T=0,A=f.c2p(0,!0)),i[0][r.isRangePlot?"nodeRangePlot3":"node3"]=v;var y="",E=[],S=d._prevtrace,C=null,k=null;S&&(y=S._prevRevpath||"",M=S._nextFill,E=S._ownPolygons,C=S._fillsegments,k=S._fillElement);var D,F,P="",R="",L,I,B,O,$,Y,K=[];d._polygons=[];var j=[],q=[],J=pM.noop;if(_=d._ownFill,jw.hasLines(d)||d.fill!=="none"){M&&M.datum(i),["hv","vh","hvh","vhv"].indexOf(p.shape)!==-1?(L=hl.steps(p.shape),I=hl.steps(p.shape.split("").reverse().join(""))):p.shape==="spline"?L=I=function(ee){var ae=ee[ee.length-1];return ee.length>1&&ee[0][0]===ae[0]&&ee[0][1]===ae[1]?hl.smoothclosed(ee.slice(1),p.smoothing):hl.smoothopen(ee,p.smoothing)}:L=I=function(ee){return"M"+ee.join("L")},B=function(ee){return I(ee.reverse())},q=VCt(i,{xaxis:f,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(p.width||1,3)/4,shape:p.shape,backoff:p.backoff,simplify:p.simplify,fill:d.fill}),j=new Array(q.length);var U=0;for(l=0;l<q.length;l++){var V,X=q[l];!V||!x?(V=X.slice(),j[U]=V,U++):V.push.apply(V,X)}d._fillElement=null,d._fillExclusionElement=k,d._fillsegments=j.slice(0,U),j=d._fillsegments,q.length&&(O=q[0][0].slice(),$=q[q.length-1],Y=$[$.length-1].slice()),J=function(ee){return function(ae){if(D=L(ae),F=B(ae),P?x?(P+="L"+D.slice(1),R=F+("L"+R.slice(1))):(P+="Z"+D,R=F+"Z"+R):(P=D,R=F),jw.hasLines(d)){var xe=Yp.select(this);if(xe.datum(i),ee)c(xe.style("opacity",0).attr("d",D).call(hl.lineGroupStyle)).style("opacity",1);else{var re=c(xe);re.attr("d",D),hl.singleLineStyle(i,re)}}}}}var H=g.selectAll(".js-line").data(q);c(H.exit()).style("opacity",0).remove(),H.each(J(!1)),H.enter().append("path").classed("js-line",!0).style("vector-effect",s?"none":"non-scaling-stroke").call(hl.lineGroupStyle).each(J(!0)),hl.setClipUrl(H,r.layerClipId,e);function G(ee){c(ee).attr("d","M0,0Z")}var Q=function(){var ee=new Array(j.length);for(l=0;l<j.length;l++)ee[l]=vF(j[l]);return ee},te=function(ee){var ae,xe;if(!ee||ee.length===0)for(ae=new Array(j.length),xe=0;xe<j.length;xe++){var re=j[xe][0].slice(),pe=j[xe][j[xe].length-1].slice();re[T]=pe[T]=A;var we=[pe,re],Fe=we.concat(j[xe]);ae[xe]=vF(Fe)}else{for(ae=new Array(ee.length-1+j.length),xe=0;xe<ee.length-1;xe++)ae[xe]=vF(ee[xe]);var Se=ee[ee.length-1].slice();for(Se.reverse(),xe=0;xe<j.length;xe++)ae[ee.length-1+xe]=vF(j[xe].concat(Se))}return ae};q.length?(_?(_.datum(i),O&&Y&&(x?(O[T]=Y[T]=A,c(_).attr("d","M"+Y+"L"+O+"L"+P.slice(1)).call(hl.singleFillStyle,e),K=te(null)):(c(_).attr("d",P+"Z").call(hl.singleFillStyle,e),K=Q())),d._polygons=K,d._fillElement=_):M&&(d.fill.slice(0,6)==="tonext"&&P&&y?(d.fill==="tonext"?(c(M).attr("d",P+"Z"+y+"Z").call(hl.singleFillStyle,e),K=Q(),d._polygons=K.concat(E)):(c(M).attr("d",P+"L"+y.slice(1)+"Z").call(hl.singleFillStyle,e),K=te(C),d._polygons=K),d._fillElement=M):G(M)),d._prevRevpath=R):(_?G(_):M&&G(M),d._prevRevpath=null),d._ownPolygons=K;function ce(ee){return ee.filter(function(ae){return!ae.gap&&ae.vis})}function ge(ee){return ee.filter(function(ae){return ae.vis})}function Ce(ee){return ee.filter(function(ae){return!ae.gap})}function be(ee){return ee.id}function he(ee){if(ee.ids)return be}function oe(){return!1}function Ee(ee,ae,xe){var re,pe,we,Fe=xe[0].trace,Se=jw.hasMarkers(Fe),ke=jw.hasText(Fe),_e=he(Fe),Ie=oe,Oe=oe;if(Se||ke){var Qe=abe,et=Fe.stackgroup,_t=et&&e._fullLayout._scatterStackOpts[f._id+h._id][et].stackgaps==="infer zero";Fe.marker.maxdisplayed||Fe._needsCull?Qe=_t?ge:ce:et&&!_t&&(Qe=Ce),Se&&(Ie=Qe),ke&&(Oe=Qe)}pe=ee.selectAll("path.point"),re=pe.data(Ie,_e);var ut=re.enter().append("path").classed("point",!0);u&&ut.call(hl.pointStyle,Fe,e).call(hl.translatePoints,f,h).style("opacity",0).transition().style("opacity",1),re.order();var vt;Se&&(vt=hl.makePointStyleFns(Fe)),re.each(function(Xe){var mt=Yp.select(this),bt=c(mt);we=hl.translatePoint(Xe,bt,f,h),we?(hl.singlePointStyle(Xe,bt,Fe,vt,e),r.layerClipId&&hl.hideOutsideRangePoint(Xe,bt,f,h,Fe.xcalendar,Fe.ycalendar),Fe.customdata&&mt.classed("plotly-customdata",Xe.data!==null&&Xe.data!==void 0)):bt.remove()}),u?re.exit().transition().style("opacity",0).remove():re.exit().remove(),pe=ae.selectAll("g"),re=pe.data(Oe,_e),re.enter().append("g").classed("textpoint",!0).append("text"),re.order(),re.each(function(Xe){var mt=Yp.select(this),bt=c(mt.select("text"));we=hl.translatePoint(Xe,bt,f,h),we?r.layerClipId&&hl.hideOutsideRangePoint(Xe,mt,f,h,Fe.xcalendar,Fe.ycalendar):mt.remove()}),re.selectAll("text").call(hl.textPointStyle,Fe,e).each(function(Xe){var mt=f.c2p(Xe.x),bt=h.c2p(Xe.y);Yp.select(this).selectAll("tspan.line").each(function(){c(Yp.select(this)).attr({x:mt,y:bt})})}),re.exit().remove()}w.datum(i),b.datum(i),Ee(w,b,i);var ye=d.cliponaxis===!1,ue=ye?null:r.layerClipId;hl.setClipUrl(w,ue,e),hl.setClipUrl(b,ue,e)}function jCt(e,t,r,i,n){var a=r.xaxis,o=r.yaxis,s=Yp.extent(pM.simpleMap(a.range,a.r2c)),l=Yp.extent(pM.simpleMap(o.range,o.r2c)),u=i[0].trace;if(jw.hasMarkers(u)){var c=u.marker.maxdisplayed;if(c!==0){var f=i.filter(function(v){return v.x>=s[0]&&v.x<=s[1]&&v.y>=l[0]&&v.y<=l[1]}),h=Math.ceil(f.length/c),d=0;n.forEach(function(v,m){var g=v[0].trace;jw.hasMarkers(g)&&g.marker.maxdisplayed>0&&m<t&&d++});var p=Math.round(d*h/3+Math.floor(d/3)*h/7.1);i.forEach(function(v){delete v.vis}),f.forEach(function(v,m){Math.round((m+p)%h)===0&&(v.vis=!0)})}}}});var Ac=W((SIr,sbe)=>{"use strict";sbe.exports={container:"marker",min:"cmin",max:"cmax"}});var mF=W((EIr,lbe)=>{"use strict";var gF=ji();lbe.exports=function(t,r,i){var n={},a={_fullLayout:i},o=gF.getFromTrace(a,r,"x"),s=gF.getFromTrace(a,r,"y"),l=t.orig_x;l===void 0&&(l=t.x);var u=t.orig_y;return u===void 0&&(u=t.y),n.xLabel=gF.tickText(o,o.c2l(l),!0).text,n.yLabel=gF.tickText(s,s.c2l(u),!0).text,n}});var th=W((kIr,ube)=>{"use strict";var $j=vi(),Ww=Ji(),$Ct=yi();function WCt(e){var t=$j.select(e).selectAll("g.trace.scatter");t.style("opacity",function(r){return r[0].trace.opacity}),t.selectAll("g.points").each(function(r){var i=$j.select(this),n=r.trace||r[0].trace;Wj(i,n,e)}),t.selectAll("g.text").each(function(r){var i=$j.select(this),n=r.trace||r[0].trace;Yj(i,n,e)}),t.selectAll("g.trace path.js-line").call(Ww.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(Ww.fillGroupStyle,e,!1),$Ct.getComponentMethod("errorbars","style")(t)}function Wj(e,t,r){Ww.pointStyle(e.selectAll("path.point"),t,r)}function Yj(e,t,r){Ww.textPointStyle(e.selectAll("text"),t,r)}function YCt(e,t,r){var i=t[0].trace;i.selectedpoints?(Ww.selectedPointStyle(r.selectAll("path.point"),i),Ww.selectedTextStyle(r.selectAll("text"),i)):(Wj(r,i,e),Yj(r,i,e))}ube.exports={style:WCt,stylePoints:Wj,styleText:Yj,styleOnSelect:YCt}});var Xw=W((CIr,cbe)=>{"use strict";var Yw=ni(),XCt=$o();cbe.exports=function(t,r){var i,n;if(t.mode==="lines")return i=t.line.color,i&&Yw.opacity(i)?i:t.fillcolor;if(t.mode==="none")return t.fill?t.fillcolor:"";var a=r.mcc||r.mc||(t.marker||{}).color,o=r.mlcc||((t.marker||{}).line||{}).color;return n=a&&Yw.opacity(a)?a:o&&Yw.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:"",n?Yw.opacity(n)<.3?Yw.addOpacity(n,.3):n:(i=(t.line||{}).color,i&&Yw.opacity(i)&&XCt.hasLines(t)&&t.line.width?i:t.fillcolor)}});var Zw=W((DIr,hbe)=>{"use strict";var yF=it(),fbe=Ds(),ZCt=yi(),KCt=Xw(),Xj=ni(),JCt=yF.fillText;hbe.exports=function(t,r,i,n){var a=t.cd,o=a[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(i),f=[u,c],h=o.hoveron||"",d=o.mode.indexOf("markers")!==-1?3:.5,p=!!o.xperiodalignment,v=!!o.yperiodalignment;if(h.indexOf("points")!==-1){var m=function(R){if(p){var L=s.c2p(R.xStart),I=s.c2p(R.xEnd);return u>=Math.min(L,I)&&u<=Math.max(L,I)?0:1/0}var B=Math.max(3,R.mrc||0),O=1-1/B,$=Math.abs(s.c2p(R.x)-u);return $<B?O*$/B:$-B+O},g=function(R){if(v){var L=l.c2p(R.yStart),I=l.c2p(R.yEnd);return c>=Math.min(L,I)&&c<=Math.max(L,I)?0:1/0}var B=Math.max(3,R.mrc||0),O=1-1/B,$=Math.abs(l.c2p(R.y)-c);return $<B?O*$/B:$-B+O},w=function(R){var L=Math.max(d,R.mrc||0),I=s.c2p(R.x)-u,B=l.c2p(R.y)-c;return Math.max(Math.sqrt(I*I+B*B)-L,1-d/L)},b=fbe.getDistanceFunction(n,m,g,w);if(fbe.getClosest(a,b,t),t.index!==!1){var _=a[t.index],M=s.c2p(_.x,!0),x=l.c2p(_.y,!0),T=_.mrc||1;t.index=_.i;var A=a[0].t.orientation,y=A&&(_.sNorm||_.s),E=A==="h"?y:_.orig_x!==void 0?_.orig_x:_.x,S=A==="v"?y:_.orig_y!==void 0?_.orig_y:_.y;return yF.extendFlat(t,{color:KCt(o,_),x0:M-T,x1:M+T,xLabelVal:E,y0:x-T,y1:x+T,yLabelVal:S,spikeDistance:w(_),hovertemplate:o.hovertemplate}),JCt(_,o,t),ZCt.getComponentMethod("errorbars","hoverInfo")(_,o,t),[t]}}function C(R){if(!R)return!1;var L=R.node();try{var I=new DOMPoint(f[0],f[1]);return L.isPointInFill(I)}catch(O){var B=L.ownerSVGElement.createSVGPoint();return B.x=f[0],B.y=f[1],L.isPointInFill(B)}}function k(R){var L,I=[],B=1/0,O=-1/0,$=1/0,Y=-1/0,K;for(L=0;L<R.length;L++){var j=R[L];j.contains(f)&&(I.push(j),$=Math.min($,j.ymin),Y=Math.max(Y,j.ymax))}if(I.length===0)return null;$=Math.max($,0),Y=Math.min(Y,l._length),K=($+Y)/2;var q,J,U,V,X,H,G;for(L=0;L<I.length;L++)for(J=I[L].pts,q=1;q<J.length;q++)H=J[q-1][1],G=J[q][1],H>K!=G>=K&&(V=J[q-1][0],X=J[q][0],G-H&&(U=V+(X-V)*(K-H)/(G-H),B=Math.min(B,U),O=Math.max(O,U)));return B=Math.max(B,0),O=Math.min(O,s._length),{x0:B,x1:O,y0:K,y1:K}}if(h.indexOf("fills")!==-1&&o._fillElement){var D=C(o._fillElement)&&!C(o._fillExclusionElement);if(D){var F=k(o._polygons);F===null&&(F={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var P=Xj.defaultLine;return Xj.opacity(o.fillcolor)?P=o.fillcolor:Xj.opacity((o.line||{}).color)&&(P=o.line.color),yF.extendFlat(t,{distance:t.maxHoverDistance,x0:F.x0,x1:F.x1,y0:F.y0,y1:F.y1,color:P,hovertemplate:!1}),delete t.index,o.text&&!yF.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var w_=W((FIr,pbe)=>{"use strict";var dbe=$o();pbe.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=[],s=i[0].trace,l,u,c,f,h=s.mode&&!dbe.hasMarkers(s)&&!dbe.hasText(s);if(h)return[];if(r===!1)for(l=0;l<i.length;l++)i[l].selected=0;else for(l=0;l<i.length;l++)u=i[l],c=n.c2p(u.x),f=a.c2p(u.y),u.i!==null&&r.contains([c,f],!1,l,t)?(o.push({pointNumber:u.i,x:n.c2d(u.x),y:a.c2d(u.y)}),u.selected=1):u.selected=0;return o}});var gbe=W((LIr,vbe)=>{"use strict";vbe.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var Kj=W((PIr,xbe)=>{"use strict";var xF=yi().traceIs,Zj=bw();xbe.exports=function(t,r,i,n){i("autotypenumbers",n.autotypenumbersDflt);var a=i("type",(n.splomStash||{}).type);a==="-"&&(QCt(r,n.data),r.type==="-"?r.type="linear":t.type=r.type)};function QCt(e,t){if(e.type==="-"){var r=e._id,i=r.charAt(0),n;r.indexOf("scene")!==-1&&(r=i);var a=eDt(t,r,i);if(a){if(a.type==="histogram"&&i==={v:"y",h:"x"}[a.orientation||"v"]){e.type="linear";return}var o=i+"calendar",s=a[o],l={noMultiCategory:!xF(a,"cartesian")||xF(a,"noMultiCategory")};if(a.type==="box"&&a._hasPreCompStats&&i==={h:"x",v:"y"}[a.orientation||"v"]&&(l.noMultiCategory=!0),l.autotypenumbers=e.autotypenumbers,ybe(a,i)){var u=mbe(a),c=[];for(n=0;n<t.length;n++){var f=t[n];!xF(f,"box-violin")||(f[i+"axis"]||i)!==r||(f[u]!==void 0?c.push(f[u][0]):f.name!==void 0?c.push(f.name):c.push("text"),f[o]!==s&&(s=void 0))}e.type=Zj(c,s,l)}else if(a.type==="splom"){var h=a.dimensions,d=h[a._axesDim[r]];d.visible&&(e.type=Zj(d.values,s,l))}else e.type=Zj(a[i]||[a[i+"0"]],s,l)}}}function eDt(e,t,r){for(var i=0;i<e.length;i++){var n=e[i];if(n.type==="splom"&&n._length>0&&(n["_"+r+"axes"]||{})[t])return n;if((n[r+"axis"]||r)===t){if(ybe(n,r))return n;if((n[r]||[]).length||n[r+"0"])return n}}}function mbe(e){return{v:"x",h:"y"}[e.orientation||"v"]}function ybe(e,t){var r=mbe(e),i=xF(e,"box-violin");return i&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var _F=W((IIr,_be)=>{"use strict";var tDt=yc().isTypedArraySpec;function rDt(e,t){var r=t.dataAttr||e._id.charAt(0),i={},n,a,o;if(t.axData)n=t.axData;else for(n=[],a=0;a<t.data.length;a++){var s=t.data[a];s[r+"axis"]===e._id&&n.push(s)}for(a=0;a<n.length;a++){var l=n[a][r];for(o=0;o<l.length;o++){var u=l[o];u!=null&&(i[u]=1)}}return Object.keys(i)}_be.exports=function(t,r,i,n){if(r.type==="category"){var a=t.categoryarray,o=Array.isArray(a)&&a.length>0||tDt(a),s;o&&(s="array");var l=i("categoryorder",s),u;l==="array"&&(u=i("categoryarray")),!o&&l==="array"&&(l=r.categoryorder="trace"),l==="trace"?r._initialCategories=[]:l==="array"?r._initialCategories=u.slice():(u=rDt(r,n).sort(),l==="category ascending"?r._initialCategories=u:l==="category descending"&&(r._initialCategories=u.reverse()))}}});var vM=W((RIr,wbe)=>{"use strict";var bbe=ni(),iDt=Vl(),nDt=it();wbe.exports=function(t,r,i,n){n=n||{};var a=n.dfltColor;function o(A,y){return nDt.coerce2(t,r,n.attributes,A,y)}var s=o("linecolor",a),l=o("linewidth"),u=i("showline",n.showLine||!!s||!!l);u||(delete r.linecolor,delete r.linewidth);var c=bbe.mix(a,n.bgColor,n.blend||iDt.lightFraction),f=o("gridcolor",c),h=o("gridwidth"),d=o("griddash"),p=i("showgrid",n.showGrid||!!f||!!h||!!d);if(p||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),n.hasMinor){var v=bbe.mix(r.gridcolor,n.bgColor,67),m=o("minor.gridcolor",v),g=o("minor.gridwidth",r.gridwidth||1),w=o("minor.griddash",r.griddash||"solid"),b=i("minor.showgrid",!!m||!!g||!!w);b||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!n.noZeroLine){var _=o("zerolinelayer"),M=o("zerolinecolor",a),x=o("zerolinewidth"),T=i("zeroline",n.showGrid||!!M||!!x);T||(delete r.zerolinelayer,delete r.zerolinecolor,delete r.zerolinewidth)}}});var mM=W((zIr,kbe)=>{"use strict";var Tbe=sn(),aDt=yi(),gM=it(),oDt=Da(),sDt=Xc(),Jj=ec(),Abe=Xx(),Mbe=vw(),lDt=wy(),uDt=Ty(),cDt=_F(),fDt=vM(),hDt=UG(),Sbe=i1(),bF=Gl().WEEKDAY_PATTERN,dDt=Gl().HOUR_PATTERN;kbe.exports=function(t,r,i,n,a){var o=n.letter,s=n.font||{},l=n.splomStash||{},u=i("visible",!n.visibleDflt),c=r._template||{},f=r.type||c.type||"-",h;if(f==="date"){var d=aDt.getComponentMethod("calendars","handleDefaults");d(t,r,"calendar",n.calendar),n.noTicklabelmode||(h=i("ticklabelmode"))}!n.noTicklabelindex&&(f==="date"||f==="linear")&&i("ticklabelindex");var p="";(!n.noTicklabelposition||f==="multicategory")&&(p=gM.coerce(t,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:h==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),n.noTicklabeloverflow||i("ticklabeloverflow",p.indexOf("inside")!==-1?"hide past domain":f==="category"||f==="multicategory"?"allow":"hide past div"),Sbe(r,a),hDt(t,r,i,n),cDt(t,r,i,n),n.noHover||(f!=="category"&&i("hoverformat"),n.noUnifiedhovertitle||i("unifiedhovertitle.text"));var v=i("color"),m=v!==Jj.color.dflt?v:s.color,g=l.label||a._dfltTitle[o];if(uDt(t,r,i,f,n),!u)return r;i("title.text",g),gM.coerceFont(i,"title.font",s,{overrideDflt:{size:gM.bigFont(s.size),color:m}}),Abe(t,r,i,f);var w=n.hasMinor;if(w&&(oDt.newContainer(r,"minor"),Abe(t,r,i,f,{isMinor:!0})),lDt(t,r,i,f,n),Mbe(t,r,i,n),w){var b=n.isMinor;n.isMinor=!0,Mbe(t,r,i,n),n.isMinor=b}fDt(t,r,i,{dfltColor:v,bgColor:n.bgColor,showGrid:n.showGrid,hasMinor:w,attributes:Jj}),w&&r.ticklabelindex==null&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&i("mirror");var _=f==="multicategory";if(!n.noTickson&&(f==="category"||_)&&(r.ticks||r.showgrid)&&(_?(i("tickson","boundaries"),delete r.ticklabelposition):i("tickson")),_){var M=i("showdividers");M&&(i("dividercolor"),i("dividerwidth"))}if(f==="date")if(sDt(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:pDt}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var x=0;x<r.rangebreaks.length;x++)if(r.rangebreaks[x].pattern===bF){r._hasDayOfWeekBreaks=!0;break}if(Sbe(r,a),a._has("scattergl")||a._has("splom"))for(var T=0;T<n.data.length;T++){var A=n.data[T];(A.type==="scattergl"||A.type==="splom")&&(A.visible=!1,gM.warn(A.type+" traces do not work on axes with rangebreaks. Setting trace "+A.index+" to `visible: false`."))}}return r};function pDt(e,t,r){function i(h,d){return gM.coerce(e,t,Jj.rangebreaks,h,d)}var n=i("enabled");if(n){var a=i("bounds");if(a&&a.length>=2){var o="",s,l;if(a.length===2){for(s=0;s<2;s++)if(l=Ebe(a[s]),l){o=bF;break}}var u=i("pattern",o);if(u===bF)for(s=0;s<2;s++)l=Ebe(a[s]),l&&(t.bounds[s]=a[s]=l-1);if(u)for(s=0;s<2;s++)switch(l=a[s],u){case bF:if(!Tbe(l)){t.enabled=!1;return}if(l=+l,l!==Math.floor(l)||l<0||l>=7){t.enabled=!1;return}t.bounds[s]=a[s]=l;break;case dDt:if(!Tbe(l)){t.enabled=!1;return}if(l=+l,l<0||l>24){t.enabled=!1;return}t.bounds[s]=a[s]=l;break}if(r.autorange===!1){var c=r.range;if(c[0]<c[1]){if(a[0]<c[0]&&a[1]>c[1]){t.enabled=!1;return}}else if(a[0]>c[0]&&a[1]<c[1]){t.enabled=!1;return}}}else{var f=i("values");if(f&&f.length)i("dvalue");else{t.enabled=!1;return}}}}var vDt={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function Ebe(e){if(typeof e=="string")return vDt[e.slice(0,3).toLowerCase()]}});var TF=W((BIr,Cbe)=>{"use strict";var gDt=sn(),wF=it();Cbe.exports=function(t,r,i,n){var a=n.counterAxes||[],o=n.overlayableAxes||[],s=n.letter,l=n.grid,u=n.overlayingDomain,c,f,h,d,p,v;l&&(f=l._domains[s][l._axisMap[r._id]],c=l._anchors[r._id],f&&(h=l[s+"side"].split(" ")[0],d=l.domain[s][h==="right"||h==="top"?1:0])),f=f||[0,1],c=c||(gDt(t.position)?"free":a[0]||"free"),h=h||(s==="x"?"bottom":"left"),d=d||0,p=0,v=!1;var m=wF.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(a),dflt:c}},"anchor"),g=wF.coerce(t,r,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(m==="free"){if(s==="y"){var w=i("autoshift");w&&(d=g==="left"?u[0]:u[1],v=r.automargin?r.automargin:!0,p=g==="left"?-3:3),i("shift",p)}i("position",d)}i("automargin",v);var b=!1;if(o.length&&(b=wF.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!b){var _=i("domain",f);_[0]>_[1]-1/4096&&(r.domain=f),wF.noneOrAll(t.domain,r.domain,f),r.tickmode==="sync"&&(r.tickmode="auto")}return i("layer"),r}});var qbe=W((qIr,Bbe)=>{"use strict";var T_=it(),Dbe=ni(),mDt=Kf().isUnifiedHover,yDt=dH(),Fbe=Da(),xDt=ew(),Lbe=ec(),_Dt=Kj(),Pbe=mM(),bDt=v_(),Ibe=TF(),e$=Cs(),_1=e$.id2name,Rbe=e$.name2id,wDt=Gl().AX_ID_PATTERN,zbe=yi(),AF=zbe.traceIs,Qj=zbe.getComponentMethod;function MF(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}Bbe.exports=function(t,r,i){var n=r.autotypenumbers,a={},o={},s={},l={},u={},c={},f={},h={},d={},p={},v,m;for(v=0;v<i.length;v++){var g=i[v];if(AF(g,"cartesian")){var w;if(g.xaxis)w=_1(g.xaxis),MF(a,w,g);else if(g.xaxes)for(m=0;m<g.xaxes.length;m++)MF(a,_1(g.xaxes[m]),g);var b;if(g.yaxis)b=_1(g.yaxis),MF(a,b,g);else if(g.yaxes)for(m=0;m<g.yaxes.length;m++)MF(a,_1(g.yaxes[m]),g);if(g.type==="funnel"?g.orientation==="h"?(w&&(o[w]=!0),b&&(f[b]=!0)):b&&(s[b]=!0):g.type==="image"?(b&&(h[b]=!0),w&&(h[w]=!0)):(b&&(u[b]=!0,c[b]=!0),(!AF(g,"carpet")||g.type==="carpet"&&!g._cheater)&&w&&(l[w]=!0)),g.type==="carpet"&&g._cheater&&w&&(o[w]=!0),AF(g,"2dMap")&&(d[w]=!0,d[b]=!0),AF(g,"oriented")){var _=g.orientation==="h"?b:w;p[_]=!0}}}var M=r._subplots,x=M.xaxis,T=M.yaxis,A=T_.simpleMap(x,_1),y=T_.simpleMap(T,_1),E=A.concat(y),S=Dbe.background;x.length&&T.length&&(S=T_.coerce(t,r,xDt,"plot_bgcolor"));var C=Dbe.combine(S,r.paper_bgcolor),k,D,F,P,R;function L(){var pe=a[k]||[];R._traceIndices=pe.map(function(we){return we.index}),R._annIndices=[],R._shapeIndices=[],R._selectionIndices=[],R._imgIndices=[],R._subplotsWith=[],R._counterAxes=[],R._name=R._attr=k,R._id=D}function I(pe,we){return T_.coerce(P,R,Lbe,pe,we)}function B(pe,we){return T_.coerce2(P,R,Lbe,pe,we)}function O(pe){return pe==="x"?T:x}function $(pe,we){for(var Fe=pe==="x"?A:y,Se=[],ke=0;ke<Fe.length;ke++){var _e=Fe[ke];_e!==we&&!(t[_e]||{}).overlaying&&Se.push(Rbe(_e))}return Se}var Y={x:O("x"),y:O("y")},K=Y.x.concat(Y.y),j={},q=[];function J(){var pe=P.matches;wDt.test(pe)&&K.indexOf(pe)===-1&&(j[pe]=P.type,q=Object.keys(j))}var U=yDt(t,r),V=mDt(U);for(v=0;v<E.length;v++){k=E[v],D=Rbe(k),F=k.charAt(0),T_.isPlainObject(t[k])||(t[k]={}),P=t[k],R=Fbe.newContainer(r,k,F+"axis"),L();var X=F==="x"&&!l[k]&&o[k]||F==="y"&&!u[k]&&s[k],H=F==="y"&&(!c[k]&&f[k]||h[k]),G={hasMinor:!0,letter:F,font:r.font,outerTicks:d[k],showGrid:!p[k],data:a[k]||[],bgColor:C,calendar:r.calendar,automargin:!0,visibleDflt:X,reverseDflt:H,autotypenumbersDflt:n,splomStash:((r._splomAxes||{})[F]||{})[D],noAutotickangles:F==="y"};I("uirevision",r.uirevision),_Dt(P,R,I,G),Pbe(P,R,I,G,r);var Q=V&&F===U.charAt(0),te=B("spikecolor",V?R.color:void 0),ce=B("spikethickness",V?1.5:void 0),ge=B("spikedash",V?"dot":void 0),Ce=B("spikemode",V?"across":void 0),be=B("spikesnap"),he=I("showspikes",!!Q||!!te||!!ce||!!ge||!!Ce||!!be);he||(delete R.spikecolor,delete R.spikethickness,delete R.spikedash,delete R.spikemode,delete R.spikesnap);var oe=_1(P.overlaying),Ee=[0,1];if(r[oe]!==void 0){var ye=_1(r[oe].anchor);r[ye]!==void 0&&(Ee=r[ye].domain)}Ibe(P,R,I,{letter:F,counterAxes:Y[F],overlayableAxes:$(F,k),grid:r.grid,overlayingDomain:Ee}),I("title.standoff"),J(),R._input=P}for(v=0;v<q.length;){D=q[v++],k=_1(D),F=k.charAt(0),T_.isPlainObject(t[k])||(t[k]={}),P=t[k],R=Fbe.newContainer(r,k,F+"axis"),L();var ue={letter:F,font:r.font,outerTicks:d[k],showGrid:!p[k],data:[],bgColor:C,calendar:r.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:n,splomStash:((r._splomAxes||{})[F]||{})[D]};I("uirevision",r.uirevision),R.type=j[D]||"linear",Pbe(P,R,I,ue,r),Ibe(P,R,I,{letter:F,counterAxes:Y[F],overlayableAxes:$(F,k),grid:r.grid}),I("fixedrange"),I("modebardisable"),J(),R._input=P}var ee=Qj("rangeslider","handleDefaults"),ae=Qj("rangeselector","handleDefaults");for(v=0;v<A.length;v++)k=A[v],P=t[k],R=r[k],ee(t,r,k),R.type==="date"&&ae(P,R,r,y,R.calendar),I("fixedrange"),I("modebardisable");for(v=0;v<y.length;v++){k=y[v],P=t[k],R=r[k];var xe=r[_1(R.anchor)],re=Qj("rangeslider","isVisible")(xe);I("fixedrange",re),I("modebardisable")}bDt.handleDefaults(t,r,{axIds:K.concat(q).sort(e$.idSort),axHasImage:h})}});var Ube=W((OIr,Nbe)=>{"use strict";var TDt=vi(),Obe=yi(),SF=it(),T0=Ji(),EF=ji();Nbe.exports=function(t,r,i,n){var a=t._fullLayout;if(r.length===0){EF.redrawComponents(t);return}function o(m){var g=m.xaxis,w=m.yaxis;a._defs.select("#"+m.clipId+"> rect").call(T0.setTranslate,0,0).call(T0.setScale,1,1),m.plot.call(T0.setTranslate,g._offset,w._offset).call(T0.setScale,1,1);var b=m.plot.selectAll(".scatterlayer .trace");b.selectAll(".point").call(T0.setPointGroupScale,1,1),b.selectAll(".textpoint").call(T0.setTextPointsScale,1,1),b.call(T0.hideOutsideRangePoints,m)}function s(m,g){var w=m.plotinfo,b=w.xaxis,_=w.yaxis,M=b._length,x=_._length,T=!!m.xr1,A=!!m.yr1,y=[];if(T){var E=SF.simpleMap(m.xr0,b.r2l),S=SF.simpleMap(m.xr1,b.r2l),C=E[1]-E[0],k=S[1]-S[0];y[0]=(E[0]*(1-g)+g*S[0]-E[0])/(E[1]-E[0])*M,y[2]=M*(1-g+g*k/C),b.range[0]=b.l2r(E[0]*(1-g)+g*S[0]),b.range[1]=b.l2r(E[1]*(1-g)+g*S[1])}else y[0]=0,y[2]=M;if(A){var D=SF.simpleMap(m.yr0,_.r2l),F=SF.simpleMap(m.yr1,_.r2l),P=D[1]-D[0],R=F[1]-F[0];y[1]=(D[1]*(1-g)+g*F[1]-D[1])/(D[0]-D[1])*x,y[3]=x*(1-g+g*R/P),_.range[0]=b.l2r(D[0]*(1-g)+g*F[0]),_.range[1]=_.l2r(D[1]*(1-g)+g*F[1])}else y[1]=0,y[3]=x;EF.drawOne(t,b,{skipTitle:!0}),EF.drawOne(t,_,{skipTitle:!0}),EF.redrawComponents(t,[b._id,_._id]);var L=T?M/y[2]:1,I=A?x/y[3]:1,B=T?y[0]:0,O=A?y[1]:0,$=T?y[0]/y[2]*M:0,Y=A?y[1]/y[3]*x:0,K=b._offset-$,j=_._offset-Y;w.clipRect.call(T0.setTranslate,B,O).call(T0.setScale,1/L,1/I),w.plot.call(T0.setTranslate,K,j).call(T0.setScale,L,I),T0.setPointGroupScale(w.zoomScalePts,1/L,1/I),T0.setTextPointsScale(w.zoomScaleTxt,1/L,1/I)}var l;n&&(l=n());function u(){for(var m={},g=0;g<r.length;g++){var w=r[g],b=w.plotinfo.xaxis,_=w.plotinfo.yaxis;w.xr1&&(m[b._name+".range"]=w.xr1.slice()),w.yr1&&(m[_._name+".range"]=w.yr1.slice())}return l&&l(),Obe.call("relayout",t,m).then(function(){for(var M=0;M<r.length;M++)o(r[M].plotinfo)})}function c(){for(var m={},g=0;g<r.length;g++){var w=r[g],b=w.plotinfo.xaxis,_=w.plotinfo.yaxis;w.xr0&&(m[b._name+".range"]=w.xr0.slice()),w.yr0&&(m[_._name+".range"]=w.yr0.slice())}return Obe.call("relayout",t,m).then(function(){for(var M=0;M<r.length;M++)o(r[M].plotinfo)})}var f,h,d,p=TDt.ease(i.easing);t._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(d),d=null,c()});function v(){h=Date.now();for(var m=Math.min(1,(h-f)/i.duration),g=p(m),w=0;w<r.length;w++)s(r[w],g);h-f>i.duration?(u(),d=window.cancelAnimationFrame(v)):d=window.requestAnimationFrame(v)}return f=Date.now(),d=window.requestAnimationFrame(v),Promise.resolve()}});var dl=W(Jc=>{"use strict";var CF=vi(),Vbe=yi(),A_=it(),ADt=Ko(),MDt=Ji(),Gbe=_c().getModuleCalcData,Vy=Cs(),Xp=Gl(),SDt=sd(),Za=A_.ensureSingle;function kF(e,t,r){return A_.ensureSingle(e,t,r,function(i){i.datum(r)})}var M_=Xp.zindexSeparator;Jc.name="cartesian";Jc.attr=["xaxis","yaxis"];Jc.idRoot=["x","y"];Jc.idRegex=Xp.idRegex;Jc.attrRegex=Xp.attrRegex;Jc.attributes=gbe();Jc.layoutAttributes=ec();Jc.supplyLayoutDefaults=qbe();Jc.transitionAxes=Ube();Jc.finalizeSubplots=function(e,t){var r=t._subplots,i=r.xaxis,n=r.yaxis,a=r.cartesian,o=a,s={},l={},u,c,f;for(u=0;u<o.length;u++){var h=o[u].split("y");s[h[0]]=1,l["y"+h[1]]=1}for(u=0;u<i.length;u++)c=i[u],s[c]||(f=(e[Vy.id2name(c)]||{}).anchor,Xp.idRegex.y.test(f)||(f="y"),a.push(c+f),o.push(c+f),l[f]||(l[f]=1,A_.pushUnique(n,f)));for(u=0;u<n.length;u++)f=n[u],l[f]||(c=(e[Vy.id2name(f)]||{}).anchor,Xp.idRegex.x.test(c)||(c="x"),a.push(c+f),o.push(c+f),s[c]||(s[c]=1,A_.pushUnique(i,c)));if(!o.length){c="",f="";for(var d in e)if(Xp.attrRegex.test(d)){var p=d.charAt(0);p==="x"?(!c||+d.slice(5)<+c.slice(5))&&(c=d):(!f||+d.slice(5)<+f.slice(5))&&(f=d)}c=c?Vy.name2id(c):"x",f=f?Vy.name2id(f):"y",i.push(c),n.push(f),a.push(c+f)}};Jc.plot=function(e,t,r,i){var n=e._fullLayout,a=n._subplots.cartesian,o=e.calcdata,s;if(!Array.isArray(t))for(t=[],s=0;s<o.length;s++)t.push(s);for(var l=n._zindices,u=0;u<l.length;u++){var c=l[u];for(s=0;s<a.length;s++){var f=a[s],h=n._plots[f];if(u>0){var d=h.id;if(d.indexOf(M_)!==-1)continue;d+=M_+(u+1),h=A_.extendFlat({},h,{id:d,plot:n._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var p=[],v,m=0;m<o.length;m++){var g=o[m],w=g[0].trace;c===(w.zorder||0)&&w.xaxis+w.yaxis===f&&((t.indexOf(w.index)!==-1||w.carpet)&&(v&&v[0].trace.xaxis+v[0].trace.yaxis===f&&["tonextx","tonexty","tonext"].indexOf(w.fill)!==-1&&p.indexOf(v)===-1&&p.push(v),p.push(g)),v=g)}Hbe(e,h,p,r,i)}}};function Hbe(e,t,r,i,n){for(var a=Xp.traceLayerClasses,o=e._fullLayout,s=o._zindices,l=o._modules,u,c,f,h=[],d=[],p=0;p<s.length;p++)for(var v=s[p],m=0;m<l.length;m++){u=l[m];var g=u.name,w=Vbe.modules[g].categories;if(w.svg){var b=u.layerName||g+"layer",_=b+(p?Number(p)+1:""),M=u.plot;c=Gbe(r,M,v),f=c[0],r=c[1],f.length&&h.push({i:a.indexOf(b),zindex:p,className:_,plotMethod:M,cdModule:f}),w.zoomScale&&d.push("."+_)}}h.sort(function(A,y){return(A.zindex||0)-(y.zindex||0)||A.i-y.i});var x=t.plot.selectAll("g.mlayer").data(h,function(A){return A.className});if(x.enter().append("g").attr("class",function(A){return A.className}).classed("mlayer",!0).classed("rangeplot",t.isRangePlot),x.exit().remove(),x.order(),x.each(function(A){var y=CF.select(this),E=A.className;A.plotMethod(e,t,A.cdModule,y,i,n),Xp.clipOnAxisFalseQuery.indexOf("."+E)===-1&&MDt.setClipUrl(y,t.layerClipId,e)}),o._has("scattergl")&&(u=Vbe.getModule("scattergl"),f=Gbe(r,u)[0],u.plot(e,t,f)),!e._context.staticPlot&&(t._hasClipOnAxisFalse&&(t.clipOnAxisFalseTraces=t.plot.selectAll(Xp.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),d.length)){var T=t.plot.selectAll(d.join(",")).selectAll(".trace");t.zoomScalePts=T.selectAll("path.point"),t.zoomScaleTxt=T.selectAll(".textpoint")}}Jc.clean=function(e,t,r,i){var n=i._plots||{},a=t._plots||{},o=i._subplots||{},s,l,u;if(i._hasOnlyLargeSploms&&!t._hasOnlyLargeSploms)for(u in n)s=n[u],s.plotgroup&&s.plotgroup.remove();var c=i._has&&i._has("gl"),f=t._has&&t._has("gl");if(c&&!f)for(u in n)s=n[u],s._scene&&s._scene.destroy();if(o.xaxis&&o.yaxis){var h=Vy.listIds({_fullLayout:i});for(l=0;l<h.length;l++){var d=h[l];t[Vy.id2name(d)]||i._infolayer.selectAll(".g-"+d+"title").remove()}}var p=i._has&&i._has("cartesian"),v=t._has&&t._has("cartesian");if(p&&!v)$be(i._cartesianlayer.selectAll(".subplot"),i),i._defs.selectAll(".axesclip").remove(),delete i._axisConstraintGroups,delete i._axisMatchGroups;else if(o.cartesian)for(l=0;l<o.cartesian.length;l++){var m=o.cartesian[l];if(m.indexOf(M_)===-1&&!a[m]){var g="."+m+",."+m+"-x,."+m+"-y";i._cartesianlayer.selectAll(g).remove(),Wbe(m,i)}}};Jc.drawFramework=function(e){var t=e._fullLayout,r=e.calcdata,i,n={};for(i=0;i<r.length;i++){var a=r[i][0],o=a.trace,s=o.zorder||0;n[s]||(n[s]=[]),n[s].push(a)}var l=Object.keys(n).map(Number).sort(A_.sorterAsc);l.length||(l=[0]),t._zindices=l;var u=EDt(e),c=u.length,f=[];for(i=0;i<c;i++)f[i]=u[i].slice();for(var h=1;h<l.length;h++){var d=[];for(i=0;i<c;i++)d[i]=u[i].slice(),d[i][0]+=M_+(h+1);f=f.concat(d)}var p=t._cartesianlayer.selectAll(".subplot").data(f,String);p.enter().append("g").attr("class",function(v){return"subplot "+v[0]}),p.order(),p.exit().call($be,t),p.each(function(v){var m=v[0],g=m.indexOf(M_),w=g!==-1,b=w?m.slice(0,g):m,_=t._plots[m];_||(_=A_.extendFlat({},t._plots[b]),_&&(_.id=m,t._plots[m]=_,t._subplots.cartesian.push(m))),_&&(_.plotgroup=CF.select(this),jbe(e,_),w||(_.draglayer=Za(t._draggers,"g",m)))})};Jc.rangePlot=function(e,t,r){jbe(e,t),Hbe(e,t,r),ADt.style(e)};function EDt(e){var t=e._fullLayout,r=t._zindices.length,i=t._subplots.cartesian,n=i.length,a,o,s,l,u,c,f=[],h=[];for(a=0;a<n;a++){s=i[a],l=t._plots[s],u=l.xaxis,c=l.yaxis;var d=u._mainAxis,p=c._mainAxis,v=d._id+p._id,m=t._plots[v];l.overlays=[],v!==s&&m?(l.mainplot=v,l.mainplotinfo=m,h.push(s)):(l.mainplot=void 0,l.mainplotinfo=void 0,f.push(s))}for(a=0;a<h.length;a++)s=h[a],l=t._plots[s],l.mainplotinfo.overlays.push(l);var g=f.concat(h),w=[];for(a=0;a<n;a++){s=g[a],l=t._plots[s],u=l.xaxis,c=l.yaxis;for(var b=[],_=1;_<=r;_++){var M="";for(_>1&&(M+=M_+_),b.push(s+M),o=0;o<l.overlays.length;o++)b.push(l.overlays[o].id+M)}b=b.concat([u.layer,c.layer,u.overlaying||"",c.overlaying||""]),w.push(b)}return w}function jbe(e,t){var r=e._fullLayout,i=t.plotgroup,n=t.id,a=n.indexOf(M_),o=a!==-1,s=Xp.layerValue2layerClass[t.xaxis.layer],l=Xp.layerValue2layerClass[t.yaxis.layer],u=r._hasOnlyLargeSploms,c=r._zindices.length>1,f=t.mainplotinfo;if(!t.mainplot||c)if(u)t.xlines=Za(i,"path","xlines-above"),t.ylines=Za(i,"path","ylines-above"),t.xaxislayer=Za(i,"g","xaxislayer-above"),t.yaxislayer=Za(i,"g","yaxislayer-above");else{if(!o){var h=Za(i,"g","layer-subplot");t.shapelayer=Za(h,"g","shapelayer"),t.imagelayer=Za(h,"g","imagelayer"),f&&c?(t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer):(t.minorGridlayer=Za(i,"g","minor-gridlayer"),t.gridlayer=Za(i,"g","gridlayer"),t.zerolinelayer=Za(i,"g","zerolinelayer"));var d=Za(i,"g","layer-between");t.shapelayerBetween=Za(d,"g","shapelayer"),t.imagelayerBetween=Za(d,"g","imagelayer"),Za(i,"path","xlines-below"),Za(i,"path","ylines-below"),t.overlinesBelow=Za(i,"g","overlines-below"),Za(i,"g","xaxislayer-below"),Za(i,"g","yaxislayer-below"),t.overaxesBelow=Za(i,"g","overaxes-below")}t.overplot=Za(i,"g","overplot"),t.plot=Za(t.overplot,"g",n),f&&c?t.zerolinelayerAbove=f.zerolinelayerAbove:t.zerolinelayerAbove=Za(i,"g","zerolinelayer-above"),o||(t.xlines=Za(i,"path","xlines-above"),t.ylines=Za(i,"path","ylines-above"),t.overlinesAbove=Za(i,"g","overlines-above"),Za(i,"g","xaxislayer-above"),Za(i,"g","yaxislayer-above"),t.overaxesAbove=Za(i,"g","overaxes-above"),t.xlines=i.select(".xlines-"+s),t.ylines=i.select(".ylines-"+l),t.xaxislayer=i.select(".xaxislayer-"+s),t.yaxislayer=i.select(".yaxislayer-"+l))}else{var p=f.plotgroup,v=n+"-x",m=n+"-y";t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer,t.zerolinelayerAbove=f.zerolinelayerAbove,Za(f.overlinesBelow,"path",v),Za(f.overlinesBelow,"path",m),Za(f.overaxesBelow,"g",v),Za(f.overaxesBelow,"g",m),t.plot=Za(f.overplot,"g",n),Za(f.overlinesAbove,"path",v),Za(f.overlinesAbove,"path",m),Za(f.overaxesAbove,"g",v),Za(f.overaxesAbove,"g",m),t.xlines=p.select(".overlines-"+s).select("."+v),t.ylines=p.select(".overlines-"+l).select("."+m),t.xaxislayer=p.select(".overaxes-"+s).select("."+v),t.yaxislayer=p.select(".overaxes-"+l).select("."+m)}o||(u||(kF(t.minorGridlayer,"g",t.xaxis._id),kF(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(g){return g[0]}).sort(Vy.idSort),kF(t.gridlayer,"g",t.xaxis._id),kF(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(g){return g[0]}).sort(Vy.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function $be(e,t){if(e){var r={};e.each(function(l){var u=l[0],c=CF.select(this);c.remove(),Wbe(u,t),r[u]=!0});for(var i in t._plots)for(var n=t._plots[i],a=n.overlays||[],o=0;o<a.length;o++){var s=a[o];r[s.id]&&s.plot.selectAll(".trace").remove()}}}function Wbe(e,t){t._draggers.selectAll("g."+e).remove(),t._defs.select("#clip"+t._uid+e+"plot").remove()}Jc.toSVG=function(e){var t=e._fullLayout._glimages,r=CF.select(e).selectAll(".svg-container"),i=r.filter(function(a,o){return o===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function n(){var a=this,o=a.toDataURL("image/png"),s=t.append("svg:image");s.attr({xmlns:SDt.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}i.each(n)};Jc.updateFx=hj().updateFx});var Xbe=W((UIr,Ybe)=>{"use strict";var DF=$o();Ybe.exports={hasLines:DF.hasLines,hasMarkers:DF.hasMarkers,hasText:DF.hasText,isBubble:DF.isBubble,attributes:Ns(),layoutAttributes:fD(),supplyDefaults:__e(),crossTraceDefaults:Dj(),supplyLayoutDefaults:A_e(),calc:Td().calc,crossTraceCalc:X_e(),arraysToCalcdata:x1(),plot:$w(),colorbar:Ac(),formatLabels:mF(),style:th().style,styleOnSelect:th().styleOnSelect,hoverPoints:Zw(),selectPoints:w_(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:dl(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var Jbe=W((VIr,Kbe)=>{"use strict";var kDt=vi(),CDt=ni(),Zbe=rj(),t$=it(),DDt=t$.strScale,FDt=t$.strRotate,LDt=t$.strTranslate;Kbe.exports=function(t,r,i){var n=t.node(),a=Zbe[i.arrowhead||0],o=Zbe[i.startarrowhead||0],s=(i.arrowwidth||1)*(i.arrowsize||1),l=(i.arrowwidth||1)*(i.startarrowsize||1),u=r.indexOf("start")>=0,c=r.indexOf("end")>=0,f=a.backoff*s+i.standoff,h=o.backoff*l+i.startstandoff,d,p,v,m;if(n.nodeName==="line"){d={x:+t.attr("x1"),y:+t.attr("y1")},p={x:+t.attr("x2"),y:+t.attr("y2")};var g=d.x-p.x,w=d.y-p.y;if(v=Math.atan2(w,g),m=v+Math.PI,f&&h&&f+h>Math.sqrt(g*g+w*w)){D();return}if(f){if(f*f>g*g+w*w){D();return}var b=f*Math.cos(v),_=f*Math.sin(v);p.x+=b,p.y+=_,t.attr({x2:p.x,y2:p.y})}if(h){if(h*h>g*g+w*w){D();return}var M=h*Math.cos(v),x=h*Math.sin(v);d.x-=M,d.y-=x,t.attr({x1:d.x,y1:d.y})}}else if(n.nodeName==="path"){var T=n.getTotalLength(),A="";if(T<f+h){D();return}var y=n.getPointAtLength(0),E=n.getPointAtLength(.1);v=Math.atan2(y.y-E.y,y.x-E.x),d=n.getPointAtLength(Math.min(h,T)),A="0px,"+h+"px,";var S=n.getPointAtLength(T),C=n.getPointAtLength(T-.1);m=Math.atan2(S.y-C.y,S.x-C.x),p=n.getPointAtLength(Math.max(0,T-f));var k=A?h+f:f;A+=T-k+"px,"+T+"px",t.style("stroke-dasharray",A)}function D(){t.style("stroke-dasharray","0px,100px")}function F(P,R,L,I){P.path&&(P.noRotate&&(L=0),kDt.select(n.parentNode).append("path").attr({class:t.attr("class"),d:P.path,transform:LDt(R.x,R.y)+FDt(L*180/Math.PI)+DDt(I)}).style({fill:CDt.rgb(i.arrowcolor),"stroke-width":0}))}u&&F(o,d,v,l),c&&F(a,p,m,s)}});var FF=W((GIr,i3e)=>{"use strict";var Qbe=vi(),r$=yi(),PDt=Ko(),Hy=it(),i$=Hy.strTranslate,xM=ji(),S_=ni(),Vg=Ji(),e3e=Ds(),n$=uo(),a$=Np(),yM=bf(),IDt=Da().arrayEditor,RDt=Jbe();i3e.exports={draw:zDt,drawOne:t3e,drawRaw:r3e};function zDt(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r<t.annotations.length;r++)t.annotations[r].visible&&t3e(e,r);return PDt.previousPromises(e)}function t3e(e,t){var r=e._fullLayout,i=r.annotations[t]||{},n=xM.getFromId(e,i.xref),a=xM.getFromId(e,i.yref);n&&n.setScale(),a&&a.setScale(),r3e(e,i,t,!1,n,a)}function Gy(e,t,r,i,n){var a=n[r],o=n[r+"ref"],s=r.indexOf("y")!==-1,l=xM.getRefType(o)==="domain",u=s?i.h:i.w;return e?l?a+(s?-t:t)/e._length:e.p2r(e.r2p(a)+t):a+(s?-t:t)/u}function r3e(e,t,r,i,n,a){var o=e._fullLayout,s=e._fullLayout._size,l=e._context.edits,u,c;i?(u="annotation-"+i,c=i+".annotations"):(u="annotation",c="annotations");var f=IDt(e.layout,c,t),h=f.modifyBase,d=f.modifyItem,p=f.getUpdateObj;o._infolayer.selectAll("."+u+'[data-index="'+r+'"]').remove();var v="clip"+o._uid+"_ann"+r;if(!t._input||t.visible===!1){Qbe.selectAll("#"+v).remove();return}var m={x:{},y:{}},g=+t.textangle||0,w=o._infolayer.append("g").classed(u,!0).attr("data-index",String(r)).style("opacity",t.opacity),b=w.append("g").classed("annotation-text-g",!0),_=l[t.showarrow?"annotationTail":"annotationPosition"],M=t.captureevents||l.annotationText||_;function x(I){var B={index:r,annotation:t._input,fullAnnotation:t,event:I};return i&&(B.subplotId=i),B}var T=b.append("g").style("pointer-events",M?"all":null).call(a$,"pointer").on("click",function(){e._dragging=!1,e.emit("plotly_clickannotation",x(Qbe.event))});t.hovertext&&T.on("mouseover",function(){var I=t.hoverlabel,B=I.font,O=this.getBoundingClientRect(),$=e.getBoundingClientRect();e3e.loneHover({x0:O.left-$.left,x1:O.right-$.left,y:(O.top+O.bottom)/2-$.top,text:t.hovertext,color:I.bgcolor,borderColor:I.bordercolor,fontFamily:B.family,fontSize:B.size,fontColor:B.color,fontWeight:B.weight,fontStyle:B.style,fontVariant:B.variant,fontShadow:B.fontShadow,fontLineposition:B.fontLineposition,fontTextcase:B.fontTextcase},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:e})}).on("mouseout",function(){e3e.loneUnhover(o._hoverlayer.node())});var A=t.borderwidth,y=t.borderpad,E=A+y,S=T.append("rect").attr("class","bg").style("stroke-width",A+"px").call(S_.stroke,t.bordercolor).call(S_.fill,t.bgcolor),C=t.width||t.height,k=o._topclips.selectAll("#"+v).data(C?[0]:[]);k.enter().append("clipPath").classed("annclip",!0).attr("id",v).append("rect"),k.exit().remove();var D=t.font,F=o._meta?Hy.templateString(t.text,o._meta):t.text,P=T.append("text").classed("annotation-text",!0).text(F);function R(I){return I.call(Vg.font,D).attr({"text-anchor":{left:"start",right:"end"}[t.align]||"middle"}),n$.convertToTspans(I,e,L),I}function L(){var I=P.selectAll("a");if(I.size()===1&&I.text()===P.text()){var B=T.insert("a",":first-child").attr({"xlink:xlink:href":I.attr("xlink:href"),"xlink:xlink:show":I.attr("xlink:show")}).style({cursor:"pointer"});B.node().appendChild(S.node())}var O=T.select(".annotation-text-math-group"),$=!O.empty(),Y=Vg.bBox(($?O:P).node()),K=Y.width,j=Y.height,q=t.width||K,J=t.height||j,U=Math.round(q+2*E),V=Math.round(J+2*E);function X(Ne,Ue){return Ue==="auto"&&(Ne<1/3?Ue="left":Ne>2/3?Ue="right":Ue="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Ue]}for(var H=!1,G=["x","y"],Q=0;Q<G.length;Q++){var te=G[Q],ce=t[te+"ref"]||te,ge=t["a"+te+"ref"],Ce={x:n,y:a}[te],be=(g+(te==="x"?0:-90))*Math.PI/180,he=U*Math.cos(be),oe=V*Math.sin(be),Ee=Math.abs(he)+Math.abs(oe),ye=t[te+"anchor"],ue=t[te+"shift"]*(te==="x"?1:-1),ee=m[te],ae,xe,re,pe,we,Fe=xM.getRefType(ce);if(Ce&&Fe!=="domain"){var Se=Ce.r2fraction(t[te]);(Se<0||Se>1)&&(ge===ce?(Se=Ce.r2fraction(t["a"+te]),(Se<0||Se>1)&&(H=!0)):H=!0),ae=Ce._offset+Ce.r2p(t[te]),pe=.5}else{var ke=Fe==="domain";te==="x"?(re=t[te],ae=ke?Ce._offset+Ce._length*re:ae=s.l+s.w*re):(re=1-t[te],ae=ke?Ce._offset+Ce._length*re:ae=s.t+s.h*re),pe=t.showarrow?.5:re}if(t.showarrow){ee.head=ae;var _e=t["a"+te];if(we=he*X(.5,t.xanchor)-oe*X(.5,t.yanchor),ge===ce){var Ie=xM.getRefType(ge);Ie==="domain"?(te==="y"&&(_e=1-_e),ee.tail=Ce._offset+Ce._length*_e):Ie==="paper"?te==="y"?(_e=1-_e,ee.tail=s.t+s.h*_e):ee.tail=s.l+s.w*_e:ee.tail=Ce._offset+Ce.r2p(_e),xe=we}else ee.tail=ae+_e,xe=we+_e;ee.text=ee.tail+we;var Oe=o[te==="x"?"width":"height"];if(ce==="paper"&&(ee.head=Hy.constrain(ee.head,1,Oe-1)),ge==="pixel"){var Qe=-Math.max(ee.tail-3,ee.text),et=Math.min(ee.tail+3,ee.text)-Oe;Qe>0?(ee.tail+=Qe,ee.text+=Qe):et>0&&(ee.tail-=et,ee.text-=et)}ee.tail+=ue,ee.head+=ue}else we=Ee*X(pe,ye),xe=we,ee.text=ae+we;ee.text+=ue,we+=ue,xe+=ue,t["_"+te+"padplus"]=Ee/2+xe,t["_"+te+"padminus"]=Ee/2-xe,t["_"+te+"size"]=Ee,t["_"+te+"shift"]=we}if(H){T.remove();return}var _t=0,ut=0;if(t.align!=="left"&&(_t=(q-K)*(t.align==="center"?.5:1)),t.valign!=="top"&&(ut=(J-j)*(t.valign==="middle"?.5:1)),$)O.select("svg").attr({x:E+_t-1,y:E+ut}).call(Vg.setClipUrl,C?v:null,e);else{var vt=E+ut-Y.top,Xe=E+_t-Y.left;P.call(n$.positionText,Xe,vt).call(Vg.setClipUrl,C?v:null,e)}k.select("rect").call(Vg.setRect,E,E,q,J),S.call(Vg.setRect,A/2,A/2,U-A,V-A),T.call(Vg.setTranslate,Math.round(m.x.text-U/2),Math.round(m.y.text-V/2)),b.attr({transform:"rotate("+g+","+m.x.text+","+m.y.text+")"});var mt=function(Ne,Ue){w.selectAll(".annotation-arrow-g").remove();var Ge=m.x.head,je=m.y.head,Re=m.x.tail+Ne,Ve=m.y.tail+Ue,ct=m.x.text+Ne,Tt=m.y.text+Ue,Xt=Hy.rotationXYMatrix(g,ct,Tt),Vt=Hy.apply2DTransform(Xt),lr=Hy.apply2DTransform2(Xt),ur=+S.attr("width"),Bt=+S.attr("height"),Zt=ct-.5*ur,kr=Zt+ur,$e=Tt-.5*Bt,tt=$e+Bt,st=[[Zt,$e,Zt,tt],[Zt,tt,kr,tt],[kr,tt,kr,$e],[kr,$e,Zt,$e]].map(lr);if(!st.reduce(function(hn,ta){return hn^!!Hy.segmentsIntersect(Ge,je,Ge+1e6,je+1e6,ta[0],ta[1],ta[2],ta[3])},!1)){st.forEach(function(hn){var ta=Hy.segmentsIntersect(Re,Ve,Ge,je,hn[0],hn[1],hn[2],hn[3]);ta&&(Re=ta.x,Ve=ta.y)});var xt=t.arrowwidth,Je=t.arrowcolor,Ct=t.arrowside,ir=w.append("g").style({opacity:S_.opacity(Je)}).classed("annotation-arrow-g",!0),hr=ir.append("path").attr("d","M"+Re+","+Ve+"L"+Ge+","+je).style("stroke-width",xt+"px").call(S_.stroke,S_.rgb(Je));if(RDt(hr,Ct,t),l.annotationPosition&&hr.node().parentNode&&!i){var Ur=Ge,si=je;if(t.standoff){var ei=Math.sqrt(Math.pow(Ge-Re,2)+Math.pow(je-Ve,2));Ur+=t.standoff*(Re-Ge)/ei,si+=t.standoff*(Ve-je)/ei}var Lr=ir.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Re-Ur)+","+(Ve-si),transform:i$(Ur,si)}).style("stroke-width",xt+6+"px").call(S_.stroke,"rgba(0,0,0,0)").call(S_.fill,"rgba(0,0,0,0)"),$i,Tn;yM.init({element:Lr.node(),gd:e,prepFn:function(){var hn=Vg.getTranslate(T);$i=hn.x,Tn=hn.y,n&&n.autorange&&h(n._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0)},moveFn:function(hn,ta){var ca=Vt($i,Tn),dn=ca[0]+hn,Vn=ca[1]+ta;T.call(Vg.setTranslate,dn,Vn),d("x",Gy(n,hn,"x",s,t)),d("y",Gy(a,ta,"y",s,t)),t.axref===t.xref&&d("ax",Gy(n,hn,"ax",s,t)),t.ayref===t.yref&&d("ay",Gy(a,ta,"ay",s,t)),ir.attr("transform",i$(hn,ta)),b.attr({transform:"rotate("+g+","+dn+","+Vn+")"})},doneFn:function(){r$.call("_guiRelayout",e,p());var hn=document.querySelector(".js-notes-box-panel");hn&&hn.redraw(hn.selectedObj)}})}}};if(t.showarrow&&mt(0,0),_){var bt;yM.init({element:T.node(),gd:e,prepFn:function(){bt=b.attr("transform")},moveFn:function(Ne,Ue){var Ge="pointer";if(t.showarrow)t.axref===t.xref?d("ax",Gy(n,Ne,"ax",s,t)):d("ax",t.ax+Ne),t.ayref===t.yref?d("ay",Gy(a,Ue,"ay",s.w,t)):d("ay",t.ay+Ue),mt(Ne,Ue);else{if(i)return;var je,Re;if(n)je=Gy(n,Ne,"x",s,t);else{var Ve=t._xsize/s.w,ct=t.x+(t._xshift-t.xshift)/s.w-Ve/2;je=yM.align(ct+Ne/s.w,Ve,0,1,t.xanchor)}if(a)Re=Gy(a,Ue,"y",s,t);else{var Tt=t._ysize/s.h,Xt=t.y-(t._yshift+t.yshift)/s.h-Tt/2;Re=yM.align(Xt-Ue/s.h,Tt,0,1,t.yanchor)}d("x",je),d("y",Re),(!n||!a)&&(Ge=yM.getCursor(n?.5:je,a?.5:Re,t.xanchor,t.yanchor))}b.attr({transform:i$(Ne,Ue)+bt}),a$(T,Ge)},clickFn:function(Ne,Ue){t.captureevents&&e.emit("plotly_clickannotation",x(Ue))},doneFn:function(){a$(T),r$.call("_guiRelayout",e,p());var Ne=document.querySelector(".js-notes-box-panel");Ne&&Ne.redraw(Ne.selectedObj)}})}}l.annotationText?P.call(n$.makeEditable,{delegate:T,gd:e}).call(R).on("edit",function(I){t.text=I,this.call(R),d("text",I),n&&n.autorange&&h(n._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0),r$.call("_guiRelayout",e,p())}):P.call(R)}});var u3e=W((HIr,l3e)=>{"use strict";var n3e=it(),BDt=yi(),a3e=Da().arrayEditor;l3e.exports={hasClickToShow:qDt,onClick:ODt};function qDt(e,t){var r=s3e(e,t);return r.on.length>0||r.explicitOff.length>0}function ODt(e,t){var r=s3e(e,t),i=r.on,n=r.off.concat(r.explicitOff),a={},o=e._fullLayout.annotations,s,l;if(i.length||n.length){for(s=0;s<i.length;s++)l=a3e(e.layout,"annotations",o[i[s]]),l.modifyItem("visible",!0),n3e.extendFlat(a,l.getUpdateObj());for(s=0;s<n.length;s++)l=a3e(e.layout,"annotations",o[n[s]]),l.modifyItem("visible",!1),n3e.extendFlat(a,l.getUpdateObj());return BDt.call("update",e,{},a)}}function s3e(e,t){var r=e._fullLayout.annotations,i=[],n=[],a=[],o=(t||[]).length,s,l,u,c,f,h,d,p;for(s=0;s<r.length;s++)if(u=r[s],c=u.clicktoshow,c){for(l=0;l<o;l++)if(f=t[l],h=f.xaxis,d=f.yaxis,h._id===u.xref&&d._id===u.yref&&h.d2r(f.x)===o3e(u._xclick,h)&&d.d2r(f.y)===o3e(u._yclick,d)){u.visible?c==="onout"?p=n:p=a:p=i,p.push(s);break}l===o&&u.visible&&c==="onout"&&n.push(s)}return{on:i,off:n,explicitOff:a}}function o3e(e,t){return t.type==="log"?t.l2r(e):t.d2r(e)}});var s$=W((jIr,c3e)=>{"use strict";var o$=it(),Kw=ni();c3e.exports=function(t,r,i,n){n("opacity");var a=n("bgcolor"),o=n("bordercolor"),s=Kw.opacity(o);n("borderpad");var l=n("borderwidth"),u=n("showarrow");n("text",u?" ":i._dfltTitle.annotation),n("textangle"),o$.coerceFont(n,"font",i.font),n("width"),n("align");var c=n("height");if(c&&n("valign"),u){var f=n("arrowside"),h,d;f.indexOf("end")!==-1&&(h=n("arrowhead"),d=n("arrowsize")),f.indexOf("start")!==-1&&(n("startarrowhead",h),n("startarrowsize",d)),n("arrowcolor",s?r.bordercolor:Kw.defaultLine),n("arrowwidth",(s&&l||1)*2),n("standoff"),n("startstandoff")}var p=n("hovertext"),v=i.hoverlabel||{};if(p){var m=n("hoverlabel.bgcolor",v.bgcolor||(Kw.opacity(a)?Kw.rgb(a):Kw.defaultLine)),g=n("hoverlabel.bordercolor",v.bordercolor||Kw.contrast(m)),w=o$.extendFlat({},v.font);w.color||(w.color=g),o$.coerceFont(n,"hoverlabel.font",w)}n("captureevents",!!p)}});var h3e=W(($Ir,f3e)=>{"use strict";var l$=it(),E_=ji(),NDt=Xc(),UDt=s$(),VDt=qy();f3e.exports=function(t,r){NDt(t,r,{name:"annotations",handleItemDefaults:GDt})};function GDt(e,t,r){function i(b,_){return l$.coerce(e,t,VDt,b,_)}var n=i("visible"),a=i("clicktoshow");if(n||a){UDt(e,t,r,i);for(var o=t.showarrow,s=["x","y"],l=[-10,-30],u={_fullLayout:r},c=0;c<2;c++){var f=s[c],h=E_.coerceRef(e,t,u,f,"","paper");if(h!=="paper"){var d=E_.getFromId(u,h);d._annIndices.push(t._index)}if(E_.coercePosition(t,u,i,h,f,.5),o){var p="a"+f,v=E_.coerceRef(e,t,u,p,"pixel",["pixel","paper"]);v!=="pixel"&&v!==h&&(v=t[p]="pixel");var m=v==="pixel"?l[c]:.4;E_.coercePosition(t,u,i,v,p,m)}i(f+"anchor"),i(f+"shift")}if(l$.noneOrAll(e,t,["x","y"]),o&&l$.noneOrAll(e,t,["ax","ay"]),a){var g=i("xclick"),w=i("yclick");t._xclick=g===void 0?t.x:E_.cleanPosition(g,u,t.xref),t._yclick=w===void 0?t.y:E_.cleanPosition(w,u,t.yref)}}}});var v3e=W((WIr,p3e)=>{"use strict";var u$=it(),k_=ji(),HDt=FF().draw;p3e.exports=function(t){var r=t._fullLayout,i=u$.filterVisible(r.annotations);if(i.length&&t._fullData.length)return u$.syncOrAsync([HDt,jDt],t)};function jDt(e){var t=e._fullLayout;u$.filterVisible(t.annotations).forEach(function(r){var i=k_.getFromId(e,r.xref),n=k_.getFromId(e,r.yref),a=k_.getRefType(r.xref),o=k_.getRefType(r.yref);r._extremes={},a==="range"&&d3e(r,i),o==="range"&&d3e(r,n)})}function d3e(e,t){var r=t._id,i=r.charAt(0),n=e[i],a=e["a"+i],o=e[i+"ref"],s=e["a"+i+"ref"],l=e["_"+i+"padplus"],u=e["_"+i+"padminus"],c={x:1,y:-1}[i]*e[i+"shift"],f=3*e.arrowsize*e.arrowwidth||0,h=f+c,d=f-c,p=3*e.startarrowsize*e.arrowwidth||0,v=p+c,m=p-c,g;if(s===o){var w=k_.findExtremes(t,[t.r2c(n)],{ppadplus:h,ppadminus:d}),b=k_.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(l,v),ppadminus:Math.max(u,m)});g={min:[w.min[0],b.min[0]],max:[w.max[0],b.max[0]]}}else v=a?v+a:v,m=a?m-a:m,g=k_.findExtremes(t,[t.r2c(n)],{ppadplus:Math.max(l,h,v),ppadminus:Math.max(u,d,m)});e._extremes[r]=g}});var m3e=W((YIr,g3e)=>{"use strict";var $Dt=sn(),WDt=cC();g3e.exports=function(t,r,i,n){r=r||{};var a=i==="log"&&r.type==="linear",o=i==="linear"&&r.type==="log";if(!(a||o))return;var s=t._fullLayout.annotations,l=r._id.charAt(0),u,c;function f(d){var p=u[d],v=null;a?v=WDt(p,r.range):v=Math.pow(10,p),$Dt(v)||(v=null),n(c+d,v)}for(var h=0;h<s.length;h++)u=s[h],c="annotations["+h+"].",u[l+"ref"]===r._id&&f(l),u["a"+l+"ref"]===r._id&&f("a"+l)}});var _3e=W((XIr,x3e)=>{"use strict";var c$=FF(),y3e=u3e();x3e.exports={moduleType:"component",name:"annotations",layoutAttributes:qy(),supplyLayoutDefaults:h3e(),includeBasePlot:eM()("annotations"),calcAutorange:v3e(),draw:c$.draw,drawOne:c$.drawOne,drawRaw:c$.drawRaw,hasClickToShow:y3e.hasClickToShow,onClick:y3e.onClick,convertCoords:m3e()}});var LF=W((ZIr,b3e)=>{"use strict";var es=qy(),YDt=ls().overrideAll,XDt=Da().templatedArray;b3e.exports=YDt(XDt("annotation",{visible:es.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:es.xanchor,xshift:es.xshift,yanchor:es.yanchor,yshift:es.yshift,text:es.text,textangle:es.textangle,font:es.font,width:es.width,height:es.height,opacity:es.opacity,align:es.align,valign:es.valign,bgcolor:es.bgcolor,bordercolor:es.bordercolor,borderpad:es.borderpad,borderwidth:es.borderwidth,showarrow:es.showarrow,arrowcolor:es.arrowcolor,arrowhead:es.arrowhead,startarrowhead:es.startarrowhead,arrowside:es.arrowside,arrowsize:es.arrowsize,startarrowsize:es.startarrowsize,arrowwidth:es.arrowwidth,standoff:es.standoff,startstandoff:es.startstandoff,hovertext:es.hovertext,hoverlabel:es.hoverlabel,captureevents:es.captureevents}),"calc","from-root")});var T3e=W((KIr,w3e)=>{"use strict";var f$=it(),ZDt=ji(),KDt=Xc(),JDt=s$(),QDt=LF();w3e.exports=function(t,r,i){KDt(t,r,{name:"annotations",handleItemDefaults:e7t,fullLayout:i.fullLayout})};function e7t(e,t,r,i){function n(s,l){return f$.coerce(e,t,QDt,s,l)}function a(s){var l=s+"axis",u={_fullLayout:{}};return u._fullLayout[l]=r[l],ZDt.coercePosition(t,u,n,s,s,.5)}var o=n("visible");o&&(JDt(e,t,i.fullLayout,n),a("x"),a("y"),a("z"),f$.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",n("xanchor"),n("yanchor"),n("xshift"),n("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",n("ax",-10),n("ay",-30),f$.noneOrAll(e,t,["ax","ay"])))}});var E3e=W((JIr,S3e)=>{"use strict";var A3e=it(),M3e=ji();S3e.exports=function(t){for(var r=t.fullSceneLayout,i=r.annotations,n=0;n<i.length;n++)t7t(i[n],t);t.fullLayout._infolayer.selectAll(".annotation-"+t.id).remove()};function t7t(e,t){var r=t.fullSceneLayout,i=r.domain,n=t.fullLayout._size,a={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};e._xa={},A3e.extendFlat(e._xa,a),M3e.setConvert(e._xa),e._xa._offset=n.l+i.x[0]*n.w,e._xa.l2p=function(){return .5*(1+e._pdata[0]/e._pdata[3])*n.w*(i.x[1]-i.x[0])},e._ya={},A3e.extendFlat(e._ya,a),M3e.setConvert(e._ya),e._ya._offset=n.t+(1-i.y[1])*n.h,e._ya.l2p=function(){return .5*(1-e._pdata[1]/e._pdata[3])*n.h*(i.y[1]-i.y[0])}}});var d$=W((QIr,k3e)=>{"use strict";function h$(e,t){var r=[0,0,0,0],i,n;for(i=0;i<4;++i)for(n=0;n<4;++n)r[n]+=e[4*i+n]*t[i];return r}function r7t(e,t){var r=h$(e.projection,h$(e.view,h$(e.model,[t[0],t[1],t[2],1])));return r}k3e.exports=r7t});var D3e=W((eRr,C3e)=>{"use strict";var i7t=FF().drawRaw,n7t=d$(),a7t=["x","y","z"];C3e.exports=function(t){for(var r=t.fullSceneLayout,i=t.dataScale,n=r.annotations,a=0;a<n.length;a++){for(var o=n[a],s=!1,l=0;l<3;l++){var u=a7t[l],c=o[u],f=r[u+"axis"],h=f.r2fraction(c);if(h<0||h>1){s=!0;break}}s?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+a+'"]').remove():(o._pdata=n7t(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*i[0],r.yaxis.r2l(o.y)*i[1],r.zaxis.r2l(o.z)*i[2]]),i7t(t.graphDiv,o,a,t.id,o._xa,o._ya))}}});var P3e=W((tRr,L3e)=>{"use strict";var o7t=yi(),F3e=it();L3e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:LF()}}},layoutAttributes:LF(),handleDefaults:T3e(),includeBasePlot:s7t,convert:E3e(),draw:D3e()};function s7t(e,t){var r=o7t.subplotsRegistry.gl3d;if(r)for(var i=r.attrRegex,n=Object.keys(e),a=0;a<n.length;a++){var o=n[a];i.test(o)&&(e[o].annotations||[]).length&&(F3e.pushUnique(t._basePlotModules,r),F3e.pushUnique(t._subplots.gl3d,o))}}});var p$=W((nRr,B3e)=>{"use strict";var rRr=Gl(),I3e=Ho(),R3e=Ns().line,l7t=Du().dash,Zp=tn().extendFlat,u7t=Da().templatedArray,iRr=JA(),Jw=Wa(),z3e=qy(),{shapeTexttemplateAttrs:c7t,templatefallbackAttrs:f7t}=Ga(),h7t=GC();B3e.exports=u7t("shape",{visible:Zp({},Jw.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:Zp({},Jw.legend,{editType:"calc+arraydraw"}),legendgroup:Zp({},Jw.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:Zp({},Jw.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:I3e({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:Zp({},Jw.legendrank,{editType:"calc+arraydraw"}),legendwidth:Zp({},Jw.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:Zp({},z3e.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:Zp({},z3e.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:Zp({},R3e.color,{editType:"arraydraw"}),width:Zp({},R3e.width,{editType:"calc+arraydraw"}),dash:Zp({},l7t,{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:c7t({},{keys:Object.keys(h7t)}),texttemplatefallback:f7t({editType:"arraydraw"}),font:I3e({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})});var O3e=W((aRr,q3e)=>{"use strict";var Qw=it(),A0=ji(),d7t=Xc(),p7t=p$(),_M=zy();q3e.exports=function(t,r){d7t(t,r,{name:"shapes",handleItemDefaults:g7t})};function v7t(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function g7t(e,t,r){function i(b,_){return Qw.coerce(e,t,p7t,b,_)}t._isShape=!0;var n=i("visible");if(!n)return;var a=i("showlegend");i("legend"),i("legendgroup"),a&&(i("legendwidth"),i("legendgrouptitle.text"),Qw.coerceFont(i,"legendgrouptitle.font"),i("legendrank"));var o=i("path"),s=o?"path":"rect",l=i("type",s),u=l!=="path";u&&delete t.path,i("editable"),i("layer"),i("opacity"),i("fillcolor"),i("fillrule");var c=i("line.width");c&&(i("line.color"),i("line.dash"));var f=i("xsizemode"),h=i("ysizemode");let d=[.25,.75],p=[0,10];["x","y"].forEach(b=>{var _=b+"anchor",M=b==="x"?f:h,x={_fullLayout:r},T,A,y,E;let S=b+"ref",C=e[S];if(Array.isArray(C)&&C.length>0){let k=_M.countDefiningCoords(l,o,b);E=A0.coerceRefArray(e,t,x,b,void 0,"paper",k),t["_"+b+"refArray"]=!0}else E=A0.coerceRef(e,t,x,b,void 0,"paper");if(Array.isArray(E))E.forEach(function(k){A0.getRefType(k)==="range"&&(T=A0.getFromId(x,k),T&&T._shapeIndices.indexOf(t._index)===-1&&T._shapeIndices.push(t._index))}),u&&[0,1].forEach(function(k){let D=E[k];A0.getRefType(D)==="range"?(T=A0.getFromId(x,D),A=_M.shapePositionToRange(T),y=_M.rangeToShapePosition(T),(T.type==="category"||T.type==="multicategory")&&i(b+k+"shift")):A=y=Qw.identity;let P=b+k,R=e[P];if(e[P]=A(e[P],!0),M==="pixel"?i(P,p[k]):A0.coercePosition(t,x,i,D,P,d[k]),t[P]=y(t[P]),e[P]=R,k===0&&M==="pixel"){let L=e[_];e[_]=A(e[_],!0),A0.coercePosition(t,x,i,D,_,.25),t[_]=y(t[_]),e[_]=L}});else{if(A0.getRefType(E)==="range"?(T=A0.getFromId(x,E),T._shapeIndices.push(t._index),y=_M.rangeToShapePosition(T),A=_M.shapePositionToRange(T),u&&(T.type==="category"||T.type==="multicategory")&&(i(b+"0shift"),i(b+"1shift"))):A=y=Qw.identity,u){let D=b+"0",F=b+"1",P=e[D],R=e[F];e[D]=A(e[D],!0),e[F]=A(e[F],!0),M==="pixel"?(i(D,p[0]),i(F,p[1])):(A0.coercePosition(t,x,i,E,D,d[0]),A0.coercePosition(t,x,i,E,F,d[1])),t[D]=y(t[D]),t[F]=y(t[F]),e[D]=P,e[F]=R}if(M==="pixel"){let D=e[_];e[_]=A(e[_],!0),A0.coercePosition(t,x,i,E,_,.25),t[_]=y(t[_]),e[_]=D}}}),u&&Qw.noneOrAll(e,t,["x0","x1","y0","y1"]);var v=l==="line",m,g;if(u&&(m=i("label.texttemplate"),i("label.texttemplatefallback")),m||(g=i("label.text")),g||m){i("label.textangle");var w=i("label.textposition",v?"middle":"middle center");i("label.xanchor"),i("label.yanchor",v7t(v,w)),i("label.padding"),Qw.coerceFont(i,"label.font",r.font)}}});var V3e=W((oRr,U3e)=>{"use strict";var m7t=ni(),N3e=it();function y7t(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}U3e.exports=function(t,r,i){i("newshape.visible"),i("newshape.name"),i("newshape.showlegend"),i("newshape.legend"),i("newshape.legendwidth"),i("newshape.legendgroup"),i("newshape.legendgrouptitle.text"),N3e.coerceFont(i,"newshape.legendgrouptitle.font"),i("newshape.legendrank"),i("newshape.drawdirection"),i("newshape.layer"),i("newshape.fillcolor"),i("newshape.fillrule"),i("newshape.opacity");var n=i("newshape.line.width");if(n){var a=(t||{}).plot_bgcolor||"#FFF";i("newshape.line.color",m7t.contrast(a)),i("newshape.line.dash")}var o=t.dragmode==="drawline",s=i("newshape.label.text"),l=i("newshape.label.texttemplate");if(i("newshape.label.texttemplatefallback"),s||l){i("newshape.label.textangle");var u=i("newshape.label.textposition",o?"middle":"middle center");i("newshape.label.xanchor"),i("newshape.label.yanchor",y7t(o,u)),i("newshape.label.padding"),N3e.coerceFont(i,"newshape.label.font",r.font)}i("activeshape.fillcolor"),i("activeshape.opacity")}});var X3e=W((sRr,Y3e)=>{"use strict";var v$=it(),Md=ji(),b1=FA(),g$=zy();Y3e.exports=function(t){var r=t._fullLayout,i=v$.filterVisible(r.shapes);if(!(!i.length||!t._fullData.length))for(var n=0;n<i.length;n++){var a=i[n];a._extremes={};var o,s,l=Md.getRefType(a.xref),u=Md.getRefType(a.yref);if(l==="array"){let c=G3e(t,a,"x");Object.entries(c).forEach(([f,h])=>{o=Md.getFromId(t,f),a._extremes[o._id]=Md.findExtremes(o,h,H3e(a))})}else a.xref!=="paper"&&l!=="domain"&&(o=Md.getFromId(t,a.xref),s=$3e(o,a,b1.paramIsX),s&&(a._extremes[o._id]=Md.findExtremes(o,s,H3e(a))));if(u==="array"){let c=G3e(t,a,"y");Object.entries(c).forEach(([f,h])=>{o=Md.getFromId(t,f),a._extremes[o._id]=Md.findExtremes(o,h,j3e(a))})}else a.yref!=="paper"&&u!=="domain"&&(o=Md.getFromId(t,a.yref),s=$3e(o,a,b1.paramIsY),s&&(a._extremes[o._id]=Md.findExtremes(o,s,j3e(a))))}};function G3e(e,t,r){let i=t[r+"ref"],n=r==="x"?b1.paramIsX:b1.paramIsY;function a(f,h){f==="paper"||Md.getRefType(f)==="domain"||(o[f]||(o[f]=[]),o[f].push(h))}let o={};if(t.type==="path"&&t.path){let f=t.path.match(b1.segmentRE)||[];for(var s=0,l=0;l<f.length;l++){let h=f[l],d=h.charAt(0),p=n[d].drawn;if(p===void 0)continue;let v=h.slice(1).match(b1.paramRE);v&&v.length>p&&(a(i[s],v[p]),s++)}}else a(i[0],t[r+"0"]),a(i[1],t[r+"1"]);let u={};for(let f in o){let h=Md.getFromId(e,f);if(h){var c=h.type==="category"||h.type==="multicategory"?h.r2c:h.d2c;h.type==="date"&&(c=g$.decodeDate(c)),u[h._id]=o[f].map(c)}}return u}function H3e(e){return W3e(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function j3e(e){return W3e(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function W3e(e,t,r,i,n,a){var o=e/2,s=a;if(t==="pixel"){var l=n?g$.extractPathCoords(n,a?b1.paramIsY:b1.paramIsX):[r,i],u=v$.aggNums(Math.max,null,l),c=v$.aggNums(Math.min,null,l),f=c<0?Math.abs(c)+o:o,h=u>0?u+o:o;return{ppad:o,ppadplus:s?f:h,ppadminus:s?h:f}}else return{ppad:o}}function $3e(e,t,r){var i=e._id.charAt(0)==="x"?"x":"y",n=e.type==="category"||e.type==="multicategory",a,o,s=0,l=0,u=n?e.r2c:e.d2c,c=t[i+"sizemode"]==="scaled";if(c?(a=t[i+"0"],o=t[i+"1"],n&&(s=t[i+"0shift"],l=t[i+"1shift"])):(a=t[i+"anchor"],o=t[i+"anchor"]),a!==void 0)return[u(a)+s,u(o)+l];if(t.path){var f=1/0,h=-1/0,d=t.path.match(b1.segmentRE),p,v,m,g,w;for(e.type==="date"&&(u=g$.decodeDate(u)),p=0;p<d.length;p++)v=d[p],m=r[v.charAt(0)].drawn,m!==void 0&&(g=d[p].slice(1).match(b1.paramRE),!(!g||g.length<m)&&(w=u(g[m]),w<f&&(f=w),w>h&&(h=w)));if(h>=f)return[f,h]}}});var J3e=W((lRr,K3e)=>{"use strict";var Z3e=b7();K3e.exports={moduleType:"component",name:"shapes",layoutAttributes:p$(),supplyLayoutDefaults:O3e(),supplyDrawNewShapeDefaults:V3e(),includeBasePlot:eM()("shapes"),calcAutorange:X3e(),draw:Z3e.draw,drawOne:Z3e.drawOne}});var m$=W((cRr,ewe)=>{"use strict";var Q3e=Gl(),x7t=Da().templatedArray,uRr=JA();ewe.exports=x7t("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",Q3e.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",Q3e.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var rwe=W((fRr,twe)=>{"use strict";var _7t=it(),y$=ji(),b7t=Xc(),w7t=m$(),T7t="images";twe.exports=function(t,r){var i={name:T7t,handleItemDefaults:A7t};b7t(t,r,i)};function A7t(e,t,r){function i(h,d){return _7t.coerce(e,t,w7t,h,d)}var n=i("source"),a=i("visible",!!n);if(!a)return t;i("layer"),i("xanchor"),i("yanchor"),i("sizex"),i("sizey"),i("sizing"),i("opacity");for(var o={_fullLayout:r},s=["x","y"],l=0;l<2;l++){var u=s[l],c=y$.coerceRef(e,t,o,u,"paper",void 0);if(c!=="paper"){var f=y$.getFromId(o,c);f._imgIndices.push(t._index)}y$.coercePosition(t,o,i,c,u,0)}return t}});var owe=W((hRr,awe)=>{"use strict";var iwe=vi(),M7t=Ji(),e5=ji(),nwe=Cs(),S7t=sd();awe.exports=function(t){var r=t._fullLayout,i=[],n={},a=[],o,s;for(s=0;s<r.images.length;s++){var l=r.images[s];if(l.visible)if(l.layer==="below"&&l.xref!=="paper"&&l.yref!=="paper"){o=nwe.ref2id(l.xref)+nwe.ref2id(l.yref);var u=r._plots[o];if(!u){a.push(l);continue}u.mainplot&&(o=u.mainplot.id),n[o]||(n[o]=[]),n[o].push(l)}else l.layer==="above"?i.push(l):a.push(l)}var c={x:{left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-1/2},right:{sizing:"xMax",offset:-1}},y:{top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-1/2},bottom:{sizing:"YMax",offset:-1}}};function f(_){var M=iwe.select(this);if(this._imgSrc!==_.source)if(M.attr("xmlns",S7t.svg),!t._context.staticPlot||_.source&&_.source.slice(0,5)==="data:")M.attr("xlink:href",_.source),this._imgSrc=_.source;else{var x=new Promise(function(T){var A=new Image;this.img=A,A.setAttribute("crossOrigin","anonymous"),A.onerror=y,A.onload=function(){var E=document.createElement("canvas");E.width=this.width,E.height=this.height;var S=E.getContext("2d",{willReadFrequently:!0});S.drawImage(this,0,0);var C=E.toDataURL("image/png");M.attr("xlink:href",C),T()},M.on("error",y),A.src=_.source,this._imgSrc=_.source;function y(){M.remove(),T()}}.bind(this));t._promises.push(x)}}function h(_){var M=iwe.select(this),x=e5.getFromId(t,_.xref),T=e5.getFromId(t,_.yref),A=e5.getRefType(_.xref)==="domain",y=e5.getRefType(_.yref)==="domain",E=r._size,S,C;x!==void 0?S=typeof _.xref=="string"&&A?x._length*_.sizex:Math.abs(x.l2p(_.sizex)-x.l2p(0)):S=_.sizex*E.w,T!==void 0?C=typeof _.yref=="string"&&y?T._length*_.sizey:Math.abs(T.l2p(_.sizey)-T.l2p(0)):C=_.sizey*E.h;var k=S*c.x[_.xanchor].offset,D=C*c.y[_.yanchor].offset,F=c.x[_.xanchor].sizing+c.y[_.yanchor].sizing,P,R;switch(x!==void 0?P=typeof _.xref=="string"&&A?x._length*_.x+x._offset:x.r2p(_.x)+x._offset:P=_.x*E.w+E.l,P+=k,T!==void 0?R=typeof _.yref=="string"&&y?T._length*(1-_.y)+T._offset:T.r2p(_.y)+T._offset:R=E.h-_.y*E.h+E.t,R+=D,_.sizing){case"fill":F+=" slice";break;case"stretch":F="none";break}M.attr({x:P,y:R,width:S,height:C,preserveAspectRatio:F,opacity:_.opacity});var L=x&&e5.getRefType(_.xref)!=="domain"?x._id:"",I=T&&e5.getRefType(_.yref)!=="domain"?T._id:"",B=L+I;M7t.setClipUrl(M,B?"clip"+r._uid+B:null,t)}function d(_){return[_.xref,_.x,_.sizex,_.yref,_.y,_.sizey].join("_")}function p(_,M){return _._index-M._index}var v=r._imageLowerLayer.selectAll("image").data(a,d),m=r._imageUpperLayer.selectAll("image").data(i,d);v.enter().append("image"),m.enter().append("image"),v.exit().remove(),m.exit().remove(),v.each(function(_){f.bind(this)(_),h.bind(this)(_)}),m.each(function(_){f.bind(this)(_),h.bind(this)(_)}),v.sort(p),m.sort(p);var g=Object.keys(r._plots);for(s=0;s<g.length;s++){o=g[s];var w=r._plots[o];if(w.imagelayer){var b=w.imagelayer.selectAll("image").data(n[o]||[],d);b.enter().append("image"),b.exit().remove(),b.each(function(_){f.bind(this)(_),h.bind(this)(_)}),b.sort(p)}}}});var uwe=W((dRr,lwe)=>{"use strict";var swe=sn(),E7t=cC();lwe.exports=function(t,r,i,n){r=r||{};var a=i==="log"&&r.type==="linear",o=i==="linear"&&r.type==="log";if(a||o){for(var s=t._fullLayout.images,l=r._id.charAt(0),u,c,f=0;f<s.length;f++)if(u=s[f],c="images["+f+"].",u[l+"ref"]===r._id){var h=u[l],d=u["size"+l],p=null,v=null;if(a){p=E7t(h,r.range);var m=d/Math.pow(10,p)/2;v=2*Math.log(m+Math.sqrt(1+m*m))/Math.LN10}else p=Math.pow(10,h),v=p*(Math.pow(10,d/2)-Math.pow(10,-d/2));swe(p)?swe(v)||(v=null):(p=null,v=null),n(c+l,p),n(c+"size"+l,v)}}}});var fwe=W((pRr,cwe)=>{"use strict";cwe.exports={moduleType:"component",name:"images",layoutAttributes:m$(),supplyLayoutDefaults:rwe(),includeBasePlot:eM()("images"),draw:owe(),convertCoords:uwe()}});var PF=W((vRr,hwe)=>{"use strict";hwe.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"\u25C4",right:"\u25BA",up:"\u25B2",down:"\u25BC"}}});var x$=W((gRr,pwe)=>{"use strict";var k7t=Ho(),C7t=Vl(),D7t=tn().extendFlat,F7t=ls().overrideAll,L7t=HC(),dwe=Da().templatedArray,P7t=dwe("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}});pwe.exports=F7t(dwe("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:P7t,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:D7t(L7t({editType:"arraydraw"}),{}),font:k7t({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:C7t.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var ywe=W((mRr,mwe)=>{"use strict";var IF=it(),vwe=Xc(),gwe=x$(),I7t=PF(),R7t=I7t.name,z7t=gwe.buttons;mwe.exports=function(t,r){var i={name:R7t,handleItemDefaults:B7t};vwe(t,r,i)};function B7t(e,t,r){function i(o,s){return IF.coerce(e,t,gwe,o,s)}var n=vwe(e,t,{name:"buttons",handleItemDefaults:q7t}),a=i("visible",n.length>0);a&&(i("active"),i("direction"),i("type"),i("showactive"),i("x"),i("y"),IF.noneOrAll(e,t,["x","y"]),i("xanchor"),i("yanchor"),i("pad.t"),i("pad.r"),i("pad.b"),i("pad.l"),IF.coerceFont(i,"font",r.font),i("bgcolor",r.paper_bgcolor),i("bordercolor"),i("borderwidth"))}function q7t(e,t){function r(n,a){return IF.coerce(e,t,z7t,n,a)}var i=r("visible",e.method==="skip"||Array.isArray(e.args));i&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}});var bwe=W((yRr,_we)=>{"use strict";_we.exports=Us;var Kp=vi(),xwe=ni(),t5=Ji(),RF=it();function Us(e,t,r){this.gd=e,this.container=t,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}Us.barWidth=2;Us.barLength=20;Us.barRadius=2;Us.barPad=1;Us.barColor="#808BA4";Us.prototype.enable=function(t,r,i){var n=this.gd._fullLayout,a=n.width,o=n.height;this.position=t;var s=this.position.l,l=this.position.w,u=this.position.t,c=this.position.h,f=this.position.direction,h=f==="down",d=f==="left",p=f==="right",v=f==="up",m=l,g=c,w,b,_,M;!h&&!d&&!p&&!v&&(this.position.direction="down",h=!0);var x=h||v;x?(w=s,b=w+m,h?(_=u,M=Math.min(_+g,o),g=M-_):(M=u+g,_=Math.max(M-g,0),g=M-_)):(_=u,M=_+g,d?(b=s+m,w=Math.max(b-m,0),m=b-w):(w=s,b=Math.min(w+m,a),m=b-w)),this._box={l:w,t:_,w:m,h:g};var T=l>m,A=Us.barLength+2*Us.barPad,y=Us.barWidth+2*Us.barPad,E=s,S=u+c;S+y>o&&(S=o-y);var C=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(xwe.fill,Us.barColor),T?(this.hbar=C.attr({rx:Us.barRadius,ry:Us.barRadius,x:E,y:S,width:A,height:y}),this._hbarXMin=E+A/2,this._hbarTranslateMax=m-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var k=c>g,D=Us.barWidth+2*Us.barPad,F=Us.barLength+2*Us.barPad,P=s+l,R=u;P+D>a&&(P=a-D);var L=this.container.selectAll("rect.scrollbar-vertical").data(k?[0]:[]);L.exit().on(".drag",null).remove(),L.enter().append("rect").classed("scrollbar-vertical",!0).call(xwe.fill,Us.barColor),k?(this.vbar=L.attr({rx:Us.barRadius,ry:Us.barRadius,x:P,y:R,width:D,height:F}),this._vbarYMin=R+F/2,this._vbarTranslateMax=g-F):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var I=this.id,B=w-.5,O=k?b+D+.5:b+.5,$=_-.5,Y=T?M+y+.5:M+.5,K=n._topdefs.selectAll("#"+I).data(T||k?[0]:[]);if(K.exit().remove(),K.enter().append("clipPath").attr("id",I).append("rect"),T||k?(this._clipRect=K.select("rect").attr({x:Math.floor(B),y:Math.floor($),width:Math.ceil(O)-Math.floor(B),height:Math.ceil(Y)-Math.floor($)}),this.container.call(t5.setClipUrl,I,this.gd),this.bg.attr({x:s,y:u,width:l,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(t5.setClipUrl,null),delete this._clipRect),T||k){var j=Kp.behavior.drag().on("dragstart",function(){Kp.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(j);var q=Kp.behavior.drag().on("dragstart",function(){Kp.event.sourceEvent.preventDefault(),Kp.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(q),k&&this.vbar.on(".drag",null).call(q)}this.setTranslate(r,i)};Us.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(t5.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)};Us.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=Kp.event.dx),this.vbar&&(r-=Kp.event.dy),this.setTranslate(t,r)};Us.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=Kp.event.deltaY),this.vbar&&(r+=Kp.event.deltaY),this.setTranslate(t,r)};Us.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var i=t+this._hbarXMin,n=i+this._hbarTranslateMax,a=RF.constrain(Kp.event.x,i,n),o=(a-i)/(n-i),s=this.position.w-this._box.w;t=o*s}if(this.vbar){var l=r+this._vbarYMin,u=l+this._vbarTranslateMax,c=RF.constrain(Kp.event.y,l,u),f=(c-l)/(u-l),h=this.position.h-this._box.h;r=f*h}this.setTranslate(t,r)};Us.prototype.setTranslate=function(t,r){var i=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=RF.constrain(t||0,0,i),r=RF.constrain(r||0,0,n),this.translateX=t,this.translateY=r,this.container.call(t5.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var a=t/i;this.hbar.call(t5.setTranslate,t+a*this._hbarTranslateMax,r)}if(this.vbar){var o=r/n;this.vbar.call(t5.setTranslate,t,r+o*this._vbarTranslateMax)}}});var Fwe=W((xRr,Dwe)=>{"use strict";var r5=vi(),bM=Ko(),wM=ni(),i5=Ji(),M0=it(),zF=uo(),O7t=Da().arrayEditor,Twe=Hl().LINE_SPACING,Cn=PF(),N7t=bwe();Dwe.exports=function(t){var r=t._fullLayout,i=M0.filterVisible(r[Cn.name]);function n(h){bM.autoMargin(t,kwe(h))}var a=r._menulayer.selectAll("g."+Cn.containerClassName).data(i.length>0?[0]:[]);if(a.enter().append("g").classed(Cn.containerClassName,!0).style("cursor","pointer"),a.exit().each(function(){r5.select(this).selectAll("g."+Cn.headerGroupClassName).each(n)}).remove(),i.length!==0){var o=a.selectAll("g."+Cn.headerGroupClassName).data(i,U7t);o.enter().append("g").classed(Cn.headerGroupClassName,!0);for(var s=M0.ensureSingle(a,"g",Cn.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),l=0;l<i.length;l++){var u=i[l];W7t(t,u)}var c="updatemenus"+r._uid,f=new N7t(t,s,c);o.enter().size()&&(s.node().parentNode.appendChild(s.node()),s.call(b$)),o.exit().each(function(h){s.call(b$),n(h)}).remove(),o.each(function(h){var d=r5.select(this),p=h.type==="dropdown"?s:null;bM.manageCommandObserver(t,h,h.buttons,function(v){_$(t,h,h.buttons[v.index],d,p,f,v.index,!0)}),h.type==="dropdown"?(Mwe(t,d,s,f,h),Awe(s,h)&&TM(t,d,s,f,h)):TM(t,d,null,null,h)})}};function U7t(e){return e._index}function V7t(e){return+e.attr(Cn.menuIndexAttrName)==-1}function Awe(e,t){return+e.attr(Cn.menuIndexAttrName)===t._index}function _$(e,t,r,i,n,a,o,s){t.active=o,O7t(e.layout,Cn.name,t).applyUpdate("active",o),t.type==="buttons"?TM(e,i,null,null,t):t.type==="dropdown"&&(n.attr(Cn.menuIndexAttrName,"-1"),Mwe(e,i,n,a,t),s||TM(e,i,n,a,t))}function Mwe(e,t,r,i,n){var a=M0.ensureSingle(t,"g",Cn.headerClassName,function(h){h.style("pointer-events","all")}),o=n._dims,s=n.active,l=n.buttons[s]||Cn.blankHeaderOpts,u={y:n.pad.t,yPad:0,x:n.pad.l,xPad:0,index:0},c={width:o.headerWidth,height:o.headerHeight};a.call(w$,n,l,e).call(Cwe,n,u,c);var f=M0.ensureSingle(t,"text",Cn.headerArrowClassName,function(h){h.attr("text-anchor","end").call(i5.font,n.font).text(Cn.arrowSymbol[n.direction])});f.attr({x:o.headerWidth-Cn.arrowOffsetX+n.pad.l,y:o.headerHeight/2+Cn.textOffsetY+n.pad.t}),a.on("click",function(){r.call(b$,String(Awe(r,n)?-1:n._index)),TM(e,t,r,i,n)}),a.on("mouseover",function(){a.call(Swe)}),a.on("mouseout",function(){a.call(Ewe,n)}),i5.setTranslate(t,o.lx,o.ly)}function TM(e,t,r,i,n){r||(r=t,r.attr("pointer-events","all"));var a=!V7t(r)||n.type==="buttons"?n.buttons:[],o=n.type==="dropdown"?Cn.dropdownButtonClassName:Cn.buttonClassName,s=r.selectAll("g."+o).data(M0.filterVisible(a)),l=s.enter().append("g").classed(o,!0),u=s.exit();n.type==="dropdown"?(l.attr("opacity","0").transition().attr("opacity","1"),u.transition().attr("opacity","0").remove()):u.remove();var c=0,f=0,h=n._dims,d=["up","down"].indexOf(n.direction)!==-1;n.type==="dropdown"&&(d?f=h.headerHeight+Cn.gapButtonHeader:c=h.headerWidth+Cn.gapButtonHeader),n.type==="dropdown"&&n.direction==="up"&&(f=-Cn.gapButtonHeader+Cn.gapButton-h.openHeight),n.type==="dropdown"&&n.direction==="left"&&(c=-Cn.gapButtonHeader+Cn.gapButton-h.openWidth);var p={x:h.lx+c+n.pad.l,y:h.ly+f+n.pad.t,yPad:Cn.gapButton,xPad:Cn.gapButton,index:0},v={l:p.x+n.borderwidth,t:p.y+n.borderwidth};s.each(function(m,g){var w=r5.select(this);w.call(w$,n,m,e).call(Cwe,n,p),w.on("click",function(){r5.event.defaultPrevented||(m.execute&&(m.args2&&n.active===g?(_$(e,n,m,t,r,i,-1),bM.executeAPICommand(e,m.method,m.args2)):(_$(e,n,m,t,r,i,g),bM.executeAPICommand(e,m.method,m.args))),e.emit("plotly_buttonclicked",{menu:n,button:m,active:n.active}))}),w.on("mouseover",function(){w.call(Swe)}),w.on("mouseout",function(){w.call(Ewe,n),s.call(wwe,n)})}),s.call(wwe,n),d?(v.w=Math.max(h.openWidth,h.headerWidth),v.h=p.y-v.t):(v.w=p.x-v.l,v.h=Math.max(h.openHeight,h.headerHeight)),v.direction=n.direction,i&&(s.size()?G7t(e,t,r,i,n,v):H7t(i))}function G7t(e,t,r,i,n,a){var o=n.direction,s=o==="up"||o==="down",l=n._dims,u=n.active,c,f,h;if(s)for(f=0,h=0;h<u;h++)f+=l.heights[h]+Cn.gapButton;else for(c=0,h=0;h<u;h++)c+=l.widths[h]+Cn.gapButton;i.enable(a,c,f),i.hbar&&i.hbar.attr("opacity","0").transition().attr("opacity","1"),i.vbar&&i.vbar.attr("opacity","0").transition().attr("opacity","1")}function H7t(e){var t=!!e.hbar,r=!!e.vbar;t&&e.hbar.transition().attr("opacity","0").each("end",function(){t=!1,r||e.disable()}),r&&e.vbar.transition().attr("opacity","0").each("end",function(){r=!1,t||e.disable()})}function w$(e,t,r,i){e.call(j7t,t).call($7t,t,r,i)}function j7t(e,t){var r=M0.ensureSingle(e,"rect",Cn.itemRectClassName,function(i){i.attr({rx:Cn.rx,ry:Cn.ry,"shape-rendering":"crispEdges"})});r.call(wM.stroke,t.bordercolor).call(wM.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px")}function $7t(e,t,r,i){var n=M0.ensureSingle(e,"text",Cn.itemTextClassName,function(s){s.attr({"text-anchor":"start","data-notex":1})}),a=r.label,o=i._fullLayout._meta;o&&(a=M0.templateString(a,o)),n.call(i5.font,t.font).text(a).call(zF.convertToTspans,i)}function wwe(e,t){var r=t.active;e.each(function(i,n){var a=r5.select(this);n===r&&t.showactive&&a.select("rect."+Cn.itemRectClassName).call(wM.fill,Cn.activeColor)})}function Swe(e){e.select("rect."+Cn.itemRectClassName).call(wM.fill,Cn.hoverColor)}function Ewe(e,t){e.select("rect."+Cn.itemRectClassName).call(wM.fill,t.bgcolor)}function W7t(e,t){var r=t._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},i=i5.tester.selectAll("g."+Cn.dropdownButtonClassName).data(M0.filterVisible(t.buttons));i.enter().append("g").classed(Cn.dropdownButtonClassName,!0);var n=["up","down"].indexOf(t.direction)!==-1;i.each(function(c,f){var h=r5.select(this);h.call(w$,t,c,e);var d=h.select("."+Cn.itemTextClassName),p=d.node()&&i5.bBox(d.node()).width,v=Math.max(p+Cn.textPadX,Cn.minWidth),m=t.font.size*Twe,g=zF.lineCount(d),w=Math.max(m*g,Cn.minHeight)+Cn.textOffsetY;w=Math.ceil(w),v=Math.ceil(v),r.widths[f]=v,r.heights[f]=w,r.height1=Math.max(r.height1,w),r.width1=Math.max(r.width1,v),n?(r.totalWidth=Math.max(r.totalWidth,v),r.openWidth=r.totalWidth,r.totalHeight+=w+Cn.gapButton,r.openHeight+=w+Cn.gapButton):(r.totalWidth+=v+Cn.gapButton,r.openWidth+=v+Cn.gapButton,r.totalHeight=Math.max(r.totalHeight,w),r.openHeight=r.totalHeight)}),n?r.totalHeight-=Cn.gapButton:r.totalWidth-=Cn.gapButton,r.headerWidth=r.width1+Cn.arrowPadX,r.headerHeight=r.height1,t.type==="dropdown"&&(n?(r.width1+=Cn.arrowPadX,r.totalHeight=r.height1):r.totalWidth=r.width1,r.totalWidth+=Cn.arrowPadX),i.remove();var a=r.totalWidth+t.pad.l+t.pad.r,o=r.totalHeight+t.pad.t+t.pad.b,s=e._fullLayout._size;r.lx=s.l+s.w*t.x,r.ly=s.t+s.h*(1-t.y);var l="left";M0.isRightAnchor(t)&&(r.lx-=a,l="right"),M0.isCenterAnchor(t)&&(r.lx-=a/2,l="center");var u="top";M0.isBottomAnchor(t)&&(r.ly-=o,u="bottom"),M0.isMiddleAnchor(t)&&(r.ly-=o/2,u="middle"),r.totalWidth=Math.ceil(r.totalWidth),r.totalHeight=Math.ceil(r.totalHeight),r.lx=Math.round(r.lx),r.ly=Math.round(r.ly),bM.autoMargin(e,kwe(t),{x:t.x,y:t.y,l:a*({right:1,center:.5}[l]||0),r:a*({left:1,center:.5}[l]||0),b:o*({top:1,middle:.5}[u]||0),t:o*({bottom:1,middle:.5}[u]||0)})}function kwe(e){return Cn.autoMarginIdRoot+e._index}function Cwe(e,t,r,i){i=i||{};var n=e.select("."+Cn.itemRectClassName),a=e.select("."+Cn.itemTextClassName),o=t.borderwidth,s=r.index,l=t._dims;i5.setTranslate(e,o+r.x,o+r.y);var u=["up","down"].indexOf(t.direction)!==-1,c=i.height||(u?l.heights[s]:l.height1);n.attr({x:0,y:0,width:i.width||(u?l.width1:l.widths[s]),height:c});var f=t.font.size*Twe,h=zF.lineCount(a),d=(h-1)*f/2;zF.positionText(a,Cn.textOffsetX,c/2-d+Cn.textOffsetY),u?r.y+=l.heights[s]+r.yPad:r.x+=l.widths[s]+r.xPad,r.index++}function b$(e,t){e.attr(Cn.menuIndexAttrName,t||"-1").selectAll("g."+Cn.dropdownButtonClassName).remove()}});var Pwe=W((_Rr,Lwe)=>{"use strict";var Y7t=PF();Lwe.exports={moduleType:"component",name:Y7t.name,layoutAttributes:x$(),supplyLayoutDefaults:ywe(),draw:Fwe()}});var AM=W((bRr,Iwe)=>{"use strict";Iwe.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}});var T$=W((wRr,Bwe)=>{"use strict";var Rwe=Ho(),X7t=HC(),Z7t=tn().extendDeepAll,K7t=ls().overrideAll,J7t=J6(),zwe=Da().templatedArray,C_=AM(),Q7t=zwe("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}});Bwe.exports=K7t(zwe("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:Q7t,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:Z7t(X7t({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:J7t.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:Rwe({})},font:Rwe({}),activebgcolor:{valType:"color",dflt:C_.gripBgActiveColor},bgcolor:{valType:"color",dflt:C_.railBgColor},bordercolor:{valType:"color",dflt:C_.railBorderColor},borderwidth:{valType:"number",min:0,dflt:C_.railBorderWidth},ticklen:{valType:"number",min:0,dflt:C_.tickLength},tickcolor:{valType:"color",dflt:C_.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:C_.minorTickLength}}),"arraydraw","from-root")});var Uwe=W((TRr,Nwe)=>{"use strict";var n5=it(),qwe=Xc(),Owe=T$(),eFt=AM(),tFt=eFt.name,rFt=Owe.steps;Nwe.exports=function(t,r){qwe(t,r,{name:tFt,handleItemDefaults:iFt})};function iFt(e,t,r){function i(f,h){return n5.coerce(e,t,Owe,f,h)}for(var n=qwe(e,t,{name:"steps",handleItemDefaults:nFt}),a=0,o=0;o<n.length;o++)n[o].visible&&a++;var s;if(a<2?s=t.visible=!1:s=i("visible"),!!s){t._stepCount=a;var l=t._visibleSteps=n5.filterVisible(n),u=i("active");(n[u]||{}).visible||(t.active=l[0]._index),i("x"),i("y"),n5.noneOrAll(e,t,["x","y"]),i("xanchor"),i("yanchor"),i("len"),i("lenmode"),i("pad.t"),i("pad.r"),i("pad.b"),i("pad.l"),n5.coerceFont(i,"font",r.font);var c=i("currentvalue.visible");c&&(i("currentvalue.xanchor"),i("currentvalue.prefix"),i("currentvalue.suffix"),i("currentvalue.offset"),n5.coerceFont(i,"currentvalue.font",t.font)),i("transition.duration"),i("transition.easing"),i("bgcolor"),i("activebgcolor"),i("bordercolor"),i("borderwidth"),i("ticklen"),i("tickwidth"),i("tickcolor"),i("minorticklen")}}function nFt(e,t){function r(a,o){return n5.coerce(e,t,rFt,a,o)}var i;if(e.method!=="skip"&&!Array.isArray(e.args)?i=t.visible=!1:i=r("visible"),i){r("method"),r("args");var n=r("label","step-"+t._index);r("value",n),r("execute")}}});var Kwe=W((ARr,Zwe)=>{"use strict";var Jp=vi(),BF=Ko(),jy=ni(),Qp=Ji(),S0=it(),aFt=S0.strTranslate,MM=uo(),oFt=Da().arrayEditor,Qn=AM(),S$=Hl(),Hwe=S$.LINE_SPACING,A$=S$.FROM_TL,M$=S$.FROM_BR;Zwe.exports=function(t){var r=t._context.staticPlot,i=t._fullLayout,n=sFt(i,t),a=i._infolayer.selectAll("g."+Qn.containerClassName).data(n.length>0?[0]:[]);a.enter().append("g").classed(Qn.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),BF.autoMargin(t,jwe(c))}if(a.exit().each(function(){Jp.select(this).selectAll("g."+Qn.groupClassName).each(o)}).remove(),n.length!==0){var s=a.selectAll("g."+Qn.groupClassName).data(n,lFt);s.enter().append("g").classed(Qn.groupClassName,!0),s.exit().each(o).remove();for(var l=0;l<n.length;l++){var u=n[l];uFt(t,u)}s.each(function(c){var f=Jp.select(this);pFt(c),BF.manageCommandObserver(t,c,c._visibleSteps,function(h){var d=f.data()[0];d.active!==h.index&&(d._dragging||Wwe(t,f,d,h.index,!1,!0))}),cFt(t,Jp.select(this),c)})}};function jwe(e){return Qn.autoMarginIdRoot+e._index}function sFt(e,t){for(var r=e[Qn.name],i=[],n=0;n<r.length;n++){var a=r[n];a.visible&&(a._gd=t,i.push(a))}return i}function lFt(e){return e._index}function uFt(e,t){var r=Qp.tester.selectAll("g."+Qn.labelGroupClass).data(t._visibleSteps);r.enter().append("g").classed(Qn.labelGroupClass,!0);var i=0,n=0;r.each(function(p){var v=Jp.select(this),m=$we(v,{step:p},t),g=m.node();if(g){var w=Qp.bBox(g);n=Math.max(n,w.height),i=Math.max(i,w.width)}}),r.remove();var a=t._dims={};a.inputAreaWidth=Math.max(Qn.railWidth,Qn.gripHeight);var o=e._fullLayout._size;a.lx=o.l+o.w*t.x,a.ly=o.t+o.h*(1-t.y),t.lenmode==="fraction"?a.outerLength=Math.round(o.w*t.len):a.outerLength=t.len,a.inputAreaStart=0,a.inputAreaLength=Math.round(a.outerLength-t.pad.l-t.pad.r);var s=a.inputAreaLength-2*Qn.stepInset,l=s/(t._stepCount-1),u=i+Qn.labelPadding;if(a.labelStride=Math.max(1,Math.ceil(u/l)),a.labelHeight=n,a.currentValueMaxWidth=0,a.currentValueHeight=0,a.currentValueTotalHeight=0,a.currentValueMaxLines=1,t.currentvalue.visible){var c=Qp.tester.append("g");r.each(function(p){var v=qF(c,t,p.label),m=v.node()&&Qp.bBox(v.node())||{width:0,height:0},g=MM.lineCount(v);a.currentValueMaxWidth=Math.max(a.currentValueMaxWidth,Math.ceil(m.width)),a.currentValueHeight=Math.max(a.currentValueHeight,Math.ceil(m.height)),a.currentValueMaxLines=Math.max(a.currentValueMaxLines,g)}),a.currentValueTotalHeight=a.currentValueHeight+t.currentvalue.offset,c.remove()}a.height=a.currentValueTotalHeight+Qn.tickOffset+t.ticklen+Qn.labelOffset+a.labelHeight+t.pad.t+t.pad.b;var f="left";S0.isRightAnchor(t)&&(a.lx-=a.outerLength,f="right"),S0.isCenterAnchor(t)&&(a.lx-=a.outerLength/2,f="center");var h="top";S0.isBottomAnchor(t)&&(a.ly-=a.height,h="bottom"),S0.isMiddleAnchor(t)&&(a.ly-=a.height/2,h="middle"),a.outerLength=Math.ceil(a.outerLength),a.height=Math.ceil(a.height),a.lx=Math.round(a.lx),a.ly=Math.round(a.ly);var d={y:t.y,b:a.height*M$[h],t:a.height*A$[h]};t.lenmode==="fraction"?(d.l=0,d.xl=t.x-t.len*A$[f],d.r=0,d.xr=t.x+t.len*M$[f]):(d.x=t.x,d.l=a.outerLength*A$[f],d.r=a.outerLength*M$[f]),BF.autoMargin(e,jwe(t),d)}function cFt(e,t,r){(r.steps[r.active]||{}).visible||(r.active=r._visibleSteps[0]._index),t.call(qF,r).call(gFt,r).call(hFt,r).call(dFt,r).call(vFt,e,r).call(fFt,e,r);var i=r._dims;Qp.setTranslate(t,i.lx+r.pad.l,i.ly+r.pad.t),t.call(Xwe,r,!1),t.call(qF,r)}function qF(e,t,r){if(t.currentvalue.visible){var i=t._dims,n,a;switch(t.currentvalue.xanchor){case"right":n=i.inputAreaLength-Qn.currentValueInset-i.currentValueMaxWidth,a="left";break;case"center":n=i.inputAreaLength*.5,a="middle";break;default:n=Qn.currentValueInset,a="left"}var o=S0.ensureSingle(e,"text",Qn.labelClass,function(h){h.attr({"text-anchor":a,"data-notex":1})}),s=t.currentvalue.prefix?t.currentvalue.prefix:"";if(typeof r=="string")s+=r;else{var l=t.steps[t.active].label,u=t._gd._fullLayout._meta;u&&(l=S0.templateString(l,u)),s+=l}t.currentvalue.suffix&&(s+=t.currentvalue.suffix),o.call(Qp.font,t.currentvalue.font).text(s).call(MM.convertToTspans,t._gd);var c=MM.lineCount(o),f=(i.currentValueMaxLines+1-c)*t.currentvalue.font.size*Hwe;return MM.positionText(o,n,f),o}}function fFt(e,t,r){var i=S0.ensureSingle(e,"rect",Qn.gripRectClass,function(n){n.call(Ywe,t,e,r).style("pointer-events","all")});i.attr({width:Qn.gripWidth,height:Qn.gripHeight,rx:Qn.gripRadius,ry:Qn.gripRadius}).call(jy.stroke,r.bordercolor).call(jy.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px")}function $we(e,t,r){var i=S0.ensureSingle(e,"text",Qn.labelClass,function(o){o.attr({"text-anchor":"middle","data-notex":1})}),n=t.step.label,a=r._gd._fullLayout._meta;return a&&(n=S0.templateString(n,a)),i.call(Qp.font,r.font).text(n).call(MM.convertToTspans,r._gd),i}function hFt(e,t){var r=S0.ensureSingle(e,"g",Qn.labelsClass),i=t._dims,n=r.selectAll("g."+Qn.labelGroupClass).data(i.labelSteps);n.enter().append("g").classed(Qn.labelGroupClass,!0),n.exit().remove(),n.each(function(a){var o=Jp.select(this);o.call($we,a,t),Qp.setTranslate(o,E$(t,a.fraction),Qn.tickOffset+t.ticklen+t.font.size*Hwe+Qn.labelOffset+i.currentValueTotalHeight)})}function Vwe(e,t,r,i,n){var a=Math.round(i*(r._stepCount-1)),o=r._visibleSteps[a]._index;o!==r.active&&Wwe(e,t,r,o,!0,n)}function Wwe(e,t,r,i,n,a){var o=r.active;r.active=i,oFt(e.layout,Qn.name,r).applyUpdate("active",i);var s=r.steps[r.active];t.call(Xwe,r,a),t.call(qF,r),e.emit("plotly_sliderchange",{slider:r,step:r.steps[r.active],interaction:n,previousActive:o}),s&&s.method&&n&&(t._nextMethod?(t._nextMethod.step=s,t._nextMethod.doCallback=n,t._nextMethod.doTransition=a):(t._nextMethod={step:s,doCallback:n,doTransition:a},t._nextMethodRaf=window.requestAnimationFrame(function(){var l=t._nextMethod.step;l.method&&(l.execute&&BF.executeAPICommand(e,l.method,l.args),t._nextMethod=null,t._nextMethodRaf=null)})))}function Ywe(e,t,r){if(t._context.staticPlot)return;var i=r.node(),n=Jp.select(t);function a(){return r.data()[0]}function o(){var s=a();t.emit("plotly_sliderstart",{slider:s});var l=r.select("."+Qn.gripRectClass);Jp.event.stopPropagation(),Jp.event.preventDefault(),l.call(jy.fill,s.activebgcolor);var u=Gwe(s,Jp.mouse(i)[0]);Vwe(t,r,s,u,!0),s._dragging=!0;function c(){var h=a(),d=Gwe(h,Jp.mouse(i)[0]);Vwe(t,r,h,d,!1)}n.on("mousemove",c),n.on("touchmove",c);function f(){var h=a();h._dragging=!1,l.call(jy.fill,h.bgcolor),n.on("mouseup",null),n.on("mousemove",null),n.on("touchend",null),n.on("touchmove",null),t.emit("plotly_sliderend",{slider:h,step:h.steps[h.active]})}n.on("mouseup",f),n.on("touchend",f)}e.on("mousedown",o),e.on("touchstart",o)}function dFt(e,t){var r=e.selectAll("rect."+Qn.tickRectClass).data(t._visibleSteps),i=t._dims;r.enter().append("rect").classed(Qn.tickRectClass,!0),r.exit().remove(),r.attr({width:t.tickwidth+"px","shape-rendering":"crispEdges"}),r.each(function(n,a){var o=a%i.labelStride===0,s=Jp.select(this);s.attr({height:o?t.ticklen:t.minorticklen}).call(jy.fill,t.tickcolor),Qp.setTranslate(s,E$(t,a/(t._stepCount-1))-.5*t.tickwidth,(o?Qn.tickOffset:Qn.minorTickOffset)+i.currentValueTotalHeight)})}function pFt(e){var t=e._dims;t.labelSteps=[];for(var r=e._stepCount,i=0;i<r;i+=t.labelStride)t.labelSteps.push({fraction:i/(r-1),step:e._visibleSteps[i]})}function Xwe(e,t,r){for(var i=e.select("rect."+Qn.gripRectClass),n=0,a=0;a<t._stepCount;a++)if(t._visibleSteps[a]._index===t.active){n=a;break}var o=E$(t,n/(t._stepCount-1));if(!t._invokingCommand){var s=i;r&&t.transition.duration>0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform",aFt(o-Qn.gripWidth*.5,t._dims.currentValueTotalHeight))}}function E$(e,t){var r=e._dims;return r.inputAreaStart+Qn.stepInset+(r.inputAreaLength-2*Qn.stepInset)*Math.min(1,Math.max(0,t))}function Gwe(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-Qn.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*Qn.stepInset-2*r.inputAreaStart)))}function vFt(e,t,r){var i=r._dims,n=S0.ensureSingle(e,"rect",Qn.railTouchRectClass,function(a){a.call(Ywe,t,e,r).style("pointer-events","all")});n.attr({width:i.inputAreaLength,height:Math.max(i.inputAreaWidth,Qn.tickOffset+r.ticklen+i.labelHeight)}).call(jy.fill,r.bgcolor).attr("opacity",0),Qp.setTranslate(n,0,i.currentValueTotalHeight)}function gFt(e,t){var r=t._dims,i=r.inputAreaLength-Qn.railInset*2,n=S0.ensureSingle(e,"rect",Qn.railRectClass);n.attr({width:i,height:Qn.railWidth,rx:Qn.railRadius,ry:Qn.railRadius,"shape-rendering":"crispEdges"}).call(jy.stroke,t.bordercolor).call(jy.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),Qp.setTranslate(n,Qn.railInset,(r.inputAreaWidth-Qn.railWidth)*.5+r.currentValueTotalHeight)}});var Qwe=W((MRr,Jwe)=>{"use strict";var mFt=AM();Jwe.exports={moduleType:"component",name:mFt.name,layoutAttributes:T$(),supplyLayoutDefaults:Uwe(),draw:Kwe()}});var OF=W((SRr,t5e)=>{"use strict";var e5e=Vl();t5e.exports={bgcolor:{valType:"color",dflt:e5e.background,editType:"plot"},bordercolor:{valType:"color",dflt:e5e.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}});var k$=W((ERr,r5e)=>{"use strict";r5e.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}});var NF=W((kRr,i5e)=>{"use strict";i5e.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}});var o5e=W(VF=>{"use strict";var yFt=Cs(),xFt=uo(),n5e=NF(),_Ft=Hl().LINE_SPACING,UF=n5e.name;function a5e(e){var t=e&&e[UF];return t&&t.visible}VF.isVisible=a5e;VF.makeData=function(e){for(var t=yFt.list({_fullLayout:e},"x",!0),r=e.margin,i=[],n=0;n<t.length;n++){var a=t[n];if(a5e(a)){i.push(a);var o=a[UF];o._id=UF+a._id,o._height=(e.height-r.b-r.t)*o.thickness,o._offsetShift=Math.floor(o.borderwidth/2)}}e._rangeSliderData=i};VF.autoMarginOpts=function(e,t){var r=e._fullLayout,i=t[UF],n=t._id.charAt(0),a=0,o=0;if(t.side==="bottom"&&(a=t._depth,t.title.text!==r._dfltTitle[n])){o=1.5*t.title.font.size+10+i._offsetShift;var s=(t.title.text.match(xFt.BR_TAG_ALL)||[]).length;o+=s*t.title.font.size*_Ft}return{x:0,y:t._counterDomainMin,l:0,r:0,t:0,b:i._height+a+Math.max(r.margin.b,o),pad:n5e.extraPad+i._offsetShift*2}}});var c5e=W((DRr,u5e)=>{"use strict";var GF=it(),s5e=Da(),l5e=Cs(),bFt=OF(),wFt=k$();u5e.exports=function(t,r,i){var n=t[i],a=r[i];if(!(n.rangeslider||r._requestRangeslider[a._id]))return;GF.isPlainObject(n.rangeslider)||(n.rangeslider={});var o=n.rangeslider,s=s5e.newContainer(a,"rangeslider");function l(M,x){return GF.coerce(o,s,bFt,M,x)}var u,c;function f(M,x){return GF.coerce(u,c,wFt,M,x)}var h=l("visible");if(h){l("bgcolor",r.plot_bgcolor),l("bordercolor"),l("borderwidth"),l("thickness"),l("autorange",!a.isValidRange(o.range)),l("range");var d=r._subplots;if(d)for(var p=d.cartesian.filter(function(M){return M.slice(0,Math.max(0,M.indexOf("y")))===l5e.name2id(i)}).map(function(M){return M.slice(M.indexOf("y"),M.length)}),v=GF.simpleMap(p,l5e.id2name),m=0;m<v.length;m++){var g=v[m];u=o[g]||{},c=s5e.newContainer(s,g,"yaxis");var w=r[g],b;u.range&&w.isValidRange(u.range)&&(b="fixed");var _=f("rangemode",b);_!=="match"&&f("range",w.range.slice())}s._input=o}}});var h5e=W((FRr,f5e)=>{"use strict";var TFt=Cs().list,AFt=Op().getAutoRange,MFt=NF();f5e.exports=function(t){for(var r=TFt(t,"x",!0),i=0;i<r.length;i++){var n=r[i],a=n[MFt.name];a&&a.visible&&a.autorange&&(a._input.autorange=!0,a._input.range=a.range=AFt(t,n))}}});var g5e=W((LRr,v5e)=>{"use strict";var HF=vi(),SFt=yi(),EFt=Ko(),pl=it(),jF=pl.strTranslate,p5e=Ji(),$y=ni(),kFt=e_(),CFt=dl(),C$=Cs(),DFt=bf(),FFt=Np(),xa=NF();v5e.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,i=0;i<r.length;i++){var n=r[i][xa.name];n._clipId=n._id+"-"+t._uid}function a(s){return s._name}var o=t._infolayer.selectAll("g."+xa.containerClassName).data(r,a);o.exit().each(function(s){var l=s[xa.name];t._topdefs.select("#"+l._clipId).remove()}).remove(),r.length!==0&&(o.enter().append("g").classed(xa.containerClassName,!0).attr("pointer-events","all"),o.each(function(s){var l=HF.select(this),u=s[xa.name],c=t[C$.id2name(s.anchor)],f=u[C$.id2name(s.anchor)];if(u.range){var h=pl.simpleMap(u.range,s.r2l),d=pl.simpleMap(s.range,s.r2l),p;d[0]<d[1]?p=[Math.min(h[0],d[0]),Math.max(h[1],d[1])]:p=[Math.max(h[0],d[0]),Math.min(h[1],d[1])],u.range=u._input.range=pl.simpleMap(p,s.l2r)}s.cleanRange("rangeslider.range");var v=t._size,m=s.domain;u._width=v.w*(m[1]-m[0]);var g=Math.round(v.l+v.w*m[0]),w=Math.round(v.t+v.h*(1-s._counterDomainMin)+(s.side==="bottom"?s._depth:0)+u._offsetShift+xa.extraPad);l.attr("transform",jF(g,w)),u._rl=pl.simpleMap(u.range,s.r2l);var b=u._rl[0],_=u._rl[1],M=_-b;if(u.p2d=function(F){return F/u._width*M+b},u.d2p=function(F){return(F-b)/M*u._width},s.rangebreaks){var x=s.locateBreaks(b,_);if(x.length){var T,A,y=0;for(T=0;T<x.length;T++)A=x[T],y+=A.max-A.min;var E=u._width/(_-b-y),S=[-E*b];for(T=0;T<x.length;T++)A=x[T],S.push(S[S.length-1]-E*(A.max-A.min));for(u.d2p=function(F){for(var P=S[0],R=0;R<x.length;R++){var L=x[R];if(F>=L.max)P=S[R+1];else if(F<L.min)break}return P+E*F},T=0;T<x.length;T++)A=x[T],A.pmin=u.d2p(A.min),A.pmax=u.d2p(A.max);u.p2d=function(F){for(var P=S[0],R=0;R<x.length;R++){var L=x[R];if(F>=L.pmax)P=S[R+1];else if(F<L.pmin)break}return(F-P)/E}}}if(f.rangemode!=="match"){var C=c.r2l(f.range[0]),k=c.r2l(f.range[1]),D=k-C;u.d2pOppAxis=function(F){return(F-C)/D*u._height}}l.call(RFt,e,s,u).call(zFt,e,s,u).call(BFt,e,s,u).call(OFt,e,s,u,f).call(NFt,e,s,u).call(UFt,e,s,u),LFt(l,e,s,u),IFt(l,e,s,u,c,f),s.side==="bottom"&&kFt.draw(e,s._id+"title",{propContainer:s,propName:s._name+".title.text",placeholder:t._dfltTitle.x,attributes:{x:s._offset+s._length/2,y:w+u._height+u._offsetShift+10+1.5*s.title.font.size,"text-anchor":"middle"}})}))};function d5e(e){return typeof e.clientX=="number"?e.clientX:e.touches&&e.touches.length>0?e.touches[0].clientX:0}function LFt(e,t,r,i){if(t._context.staticPlot)return;var n=e.select("rect."+xa.slideBoxClassName).node(),a=e.select("rect."+xa.grabAreaMinClassName).node(),o=e.select("rect."+xa.grabAreaMaxClassName).node();function s(){var l=HF.event,u=l.target,c=d5e(l),f=c-e.node().getBoundingClientRect().left,h=i.d2p(r._rl[0]),d=i.d2p(r._rl[1]),p=DFt.coverSlip();this.addEventListener("touchmove",v),this.addEventListener("touchend",m),p.addEventListener("mousemove",v),p.addEventListener("mouseup",m);function v(g){var w=d5e(g),b=+w-c,_,M,x;switch(u){case n:if(x="ew-resize",h+b>r._length||d+b<0)return;_=h+b,M=d+b;break;case a:if(x="col-resize",h+b>r._length)return;_=h+b,M=d;break;case o:if(x="col-resize",d+b<0)return;_=h,M=d+b;break;default:x="ew-resize",_=f,M=f+b;break}if(M<_){var T=M;M=_,_=T}i._pixelMin=_,i._pixelMax=M,FFt(HF.select(p),x),PFt(e,t,r,i)}function m(){p.removeEventListener("mousemove",v),p.removeEventListener("mouseup",m),this.removeEventListener("touchmove",v),this.removeEventListener("touchend",m),pl.removeElement(p)}}e.on("mousedown",s),e.on("touchstart",s)}function PFt(e,t,r,i){function n(s){return r.l2r(pl.constrain(s,i._rl[0],i._rl[1]))}var a=n(i.p2d(i._pixelMin)),o=n(i.p2d(i._pixelMax));window.requestAnimationFrame(function(){SFt.call("_guiRelayout",t,r._name+".range",[a,o])})}function IFt(e,t,r,i,n,a){var o=xa.handleWidth/2;function s(g){return pl.constrain(g,0,i._width)}function l(g){return pl.constrain(g,0,i._height)}function u(g){return pl.constrain(g,-o,i._width+o)}var c=s(i.d2p(r._rl[0])),f=s(i.d2p(r._rl[1]));if(e.select("rect."+xa.slideBoxClassName).attr("x",c).attr("width",f-c),e.select("rect."+xa.maskMinClassName).attr("width",c),e.select("rect."+xa.maskMaxClassName).attr("x",f).attr("width",i._width-f),a.rangemode!=="match"){var h=i._height-l(i.d2pOppAxis(n._rl[1])),d=i._height-l(i.d2pOppAxis(n._rl[0]));e.select("rect."+xa.maskMinOppAxisClassName).attr("x",c).attr("height",h).attr("width",f-c),e.select("rect."+xa.maskMaxOppAxisClassName).attr("x",c).attr("y",d).attr("height",i._height-d).attr("width",f-c),e.select("rect."+xa.slideBoxClassName).attr("y",h).attr("height",d-h)}var p=.5,v=Math.round(u(c-o))-p,m=Math.round(u(f-o))+p;e.select("g."+xa.grabberMinClassName).attr("transform",jF(v,p)),e.select("g."+xa.grabberMaxClassName).attr("transform",jF(m,p))}function RFt(e,t,r,i){var n=pl.ensureSingle(e,"rect",xa.bgClassName,function(l){l.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),a=i.borderwidth%2===0?i.borderwidth:i.borderwidth-1,o=-i._offsetShift,s=p5e.crispRound(t,i.borderwidth);n.attr({width:i._width+a,height:i._height+a,transform:jF(o,o),"stroke-width":s}).call($y.stroke,i.bordercolor).call($y.fill,i.bgcolor)}function zFt(e,t,r,i){var n=t._fullLayout,a=pl.ensureSingleById(n._topdefs,"clipPath",i._clipId,function(o){o.append("rect").attr({x:0,y:0})});a.select("rect").attr({width:i._width,height:i._height})}function BFt(e,t,r,i){var n=t.calcdata,a=e.selectAll("g."+xa.rangePlotClassName).data(r._subplotsWith,pl.identity);a.enter().append("g").attr("class",function(s){return xa.rangePlotClassName+" "+s}).call(p5e.setClipUrl,i._clipId,t),a.order(),a.exit().remove();var o;a.each(function(s,l){var u=HF.select(this),c=l===0,f=C$.getFromId(t,s,"y"),h=f._name,d=i[h],p={data:[],layout:{xaxis:{type:r.type,domain:[0,1],range:i.range.slice(),calendar:r.calendar},width:i._width,height:i._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};r.rangebreaks&&(p.layout.xaxis.rangebreaks=r.rangebreaks),p.layout[h]={type:f.type,domain:[0,1],range:d.rangemode!=="match"?d.range.slice():f.range.slice(),calendar:f.calendar},f.rangebreaks&&(p.layout[h].rangebreaks=f.rangebreaks),EFt.supplyDefaults(p);var v=p._fullLayout.xaxis,m=p._fullLayout[h];v.clearCalc(),v.setScale(),m.clearCalc(),m.setScale();var g={id:s,plotgroup:u,xaxis:v,yaxis:m,isRangePlot:!0};c?o=g:(g.mainplot="xy",g.mainplotinfo=o),CFt.rangePlot(t,g,qFt(n,s))})}function qFt(e,t){for(var r=[],i=0;i<e.length;i++){var n=e[i],a=n[0].trace;a.xaxis+a.yaxis===t&&r.push(n)}return r}function OFt(e,t,r,i,n){var a=pl.ensureSingle(e,"rect",xa.maskMinClassName,function(u){u.attr({x:0,y:0,"shape-rendering":"crispEdges"})});a.attr("height",i._height).call($y.fill,xa.maskColor);var o=pl.ensureSingle(e,"rect",xa.maskMaxClassName,function(u){u.attr({y:0,"shape-rendering":"crispEdges"})});if(o.attr("height",i._height).call($y.fill,xa.maskColor),n.rangemode!=="match"){var s=pl.ensureSingle(e,"rect",xa.maskMinOppAxisClassName,function(u){u.attr({y:0,"shape-rendering":"crispEdges"})});s.attr("width",i._width).call($y.fill,xa.maskOppAxisColor);var l=pl.ensureSingle(e,"rect",xa.maskMaxOppAxisClassName,function(u){u.attr({y:0,"shape-rendering":"crispEdges"})});l.attr("width",i._width).style("border-top",xa.maskOppBorder).call($y.fill,xa.maskOppAxisColor)}}function NFt(e,t,r,i){if(!t._context.staticPlot){var n=pl.ensureSingle(e,"rect",xa.slideBoxClassName,function(a){a.attr({y:0,cursor:xa.slideBoxCursor,"shape-rendering":"crispEdges"})});n.attr({height:i._height,fill:xa.slideBoxFill})}}function UFt(e,t,r,i){var n=pl.ensureSingle(e,"g",xa.grabberMinClassName),a=pl.ensureSingle(e,"g",xa.grabberMaxClassName),o={x:0,width:xa.handleWidth,rx:xa.handleRadius,fill:$y.background,stroke:$y.defaultLine,"stroke-width":xa.handleStrokeWidth,"shape-rendering":"crispEdges"},s={y:Math.round(i._height/4),height:Math.round(i._height/2)},l=pl.ensureSingle(n,"rect",xa.handleMinClassName,function(d){d.attr(o)});l.attr(s);var u=pl.ensureSingle(a,"rect",xa.handleMaxClassName,function(d){d.attr(o)});u.attr(s);var c={width:xa.grabAreaWidth,x:0,y:0,fill:xa.grabAreaFill,cursor:t._context.staticPlot?void 0:xa.grabAreaCursor},f=pl.ensureSingle(n,"rect",xa.grabAreaMinClassName,function(d){d.attr(c)});f.attr("height",i._height);var h=pl.ensureSingle(a,"rect",xa.grabAreaMaxClassName,function(d){d.attr(c)});h.attr("height",i._height)}});var y5e=W((PRr,m5e)=>{"use strict";var VFt=it(),GFt=OF(),HFt=k$(),D$=o5e();m5e.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:VFt.extendFlat({},GFt,{yaxis:HFt})}}},layoutAttributes:OF(),handleDefaults:c5e(),calcAutorange:h5e(),draw:g5e(),isVisible:D$.isVisible,makeData:D$.makeData,autoMarginOpts:D$.autoMarginOpts}});var $F=W((IRr,_5e)=>{"use strict";var jFt=Ho(),x5e=Vl(),$Ft=Da().templatedArray,WFt=$Ft("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"});_5e.exports={visible:{valType:"boolean",editType:"plot"},buttons:WFt,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:jFt({editType:"plot"}),bgcolor:{valType:"color",dflt:x5e.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:x5e.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var F$=W((RRr,b5e)=>{"use strict";b5e.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var A5e=W((zRr,T5e)=>{"use strict";var WF=it(),YFt=ni(),XFt=Da(),ZFt=Xc(),w5e=$F(),L$=F$();T5e.exports=function(t,r,i,n,a){var o=t.rangeselector||{},s=XFt.newContainer(r,"rangeselector");function l(d,p){return WF.coerce(o,s,w5e,d,p)}var u=ZFt(o,s,{name:"buttons",handleItemDefaults:KFt,calendar:a}),c=l("visible",u.length>0);if(c){var f=JFt(r,i,n);l("x",f[0]),l("y",f[1]),WF.noneOrAll(t,r,["x","y"]),l("xanchor"),l("yanchor"),WF.coerceFont(l,"font",i.font);var h=l("bgcolor");l("activecolor",YFt.contrast(h,L$.lightAmount,L$.darkAmount)),l("bordercolor"),l("borderwidth")}};function KFt(e,t,r,i){var n=i.calendar;function a(l,u){return WF.coerce(e,t,w5e.buttons,l,u)}var o=a("visible");if(o){var s=a("step");s!=="all"&&(n&&n!=="gregorian"&&(s==="month"||s==="year")?t.stepmode="backward":a("stepmode"),a("count")),a("label")}}function JFt(e,t,r){for(var i=r.filter(function(s){return t[s].anchor===e._id}),n=0,a=0;a<i.length;a++){var o=t[i[a]].domain;o&&(n=Math.max(o[1],n))}return[e.domain[0],n+L$.yPad]}});var S5e=W((BRr,M5e)=>{"use strict";var QFt=vN(),eLt=it().titleCase;M5e.exports=function(t,r){var i=t._name,n={};if(r.step==="all")n[i+".autorange"]=!0;else{var a=tLt(t,r);n[i+".range[0]"]=a[0],n[i+".range[1]"]=a[1]}return n};function tLt(e,t){var r=e.range,i=new Date(e.r2l(r[1])),n=t.step,a=QFt["utc"+eLt(n)],o=t.count,s;switch(t.stepmode){case"backward":s=e.l2r(+a.offset(i,-o));break;case"todate":var l=a.offset(i,-o);s=e.l2r(+a.ceil(l));break}var u=r[1];return[s,u]}});var I5e=W((qRr,P5e)=>{"use strict";var XF=vi(),rLt=yi(),iLt=Ko(),E5e=ni(),L5e=Ji(),Gg=it(),k5e=Gg.strTranslate,YF=uo(),nLt=Cs(),R$=Hl(),C5e=R$.LINE_SPACING,D5e=R$.FROM_TL,F5e=R$.FROM_BR,I$=F$(),aLt=S5e();P5e.exports=function(t){var r=t._fullLayout,i=r._infolayer.selectAll(".rangeselector").data(oLt(t),sLt);i.enter().append("g").classed("rangeselector",!0),i.exit().remove(),i.style({cursor:"pointer","pointer-events":"all"}),i.each(function(n){var a=XF.select(this),o=n,s=o.rangeselector,l=a.selectAll("g.button").data(Gg.filterVisible(s.buttons));l.enter().append("g").classed("button",!0),l.exit().remove(),l.each(function(u){var c=XF.select(this),f=aLt(o,u);u._isActive=lLt(o,u,f),c.call(P$,s,u),c.call(cLt,s,u,t),c.on("click",function(){t._dragged||rLt.call("_guiRelayout",t,f)}),c.on("mouseover",function(){u._isHovered=!0,c.call(P$,s,u)}),c.on("mouseout",function(){u._isHovered=!1,c.call(P$,s,u)})}),hLt(t,l,s,o._name,a)})};function oLt(e){for(var t=nLt.list(e,"x",!0),r=[],i=0;i<t.length;i++){var n=t[i];n.rangeselector&&n.rangeselector.visible&&r.push(n)}return r}function sLt(e){return e._id}function lLt(e,t,r){if(t.step==="all")return e.autorange===!0;var i=Object.keys(r);return e.range[0]===r[i[0]]&&e.range[1]===r[i[1]]}function P$(e,t,r){var i=Gg.ensureSingle(e,"rect","selector-rect",function(n){n.attr("shape-rendering","crispEdges")});i.attr({rx:I$.rx,ry:I$.ry}),i.call(E5e.stroke,t.bordercolor).call(E5e.fill,uLt(t,r)).style("stroke-width",t.borderwidth+"px")}function uLt(e,t){return t._isActive||t._isHovered?e.activecolor:e.bgcolor}function cLt(e,t,r,i){function n(o){YF.convertToTspans(o,i)}var a=Gg.ensureSingle(e,"text","selector-text",function(o){o.attr("text-anchor","middle")});a.call(L5e.font,t.font).text(fLt(r,i._fullLayout._meta)).call(n)}function fLt(e,t){return e.label?t?Gg.templateString(e.label,t):e.label:e.step==="all"?"all":e.count+e.step.charAt(0)}function hLt(e,t,r,i,n){var a=0,o=0,s=r.borderwidth;t.each(function(){var d=XF.select(this),p=d.select(".selector-text"),v=r.font.size*C5e,m=Math.max(v*YF.lineCount(p),16)+3;o=Math.max(o,m)}),t.each(function(){var d=XF.select(this),p=d.select(".selector-rect"),v=d.select(".selector-text"),m=v.node()&&L5e.bBox(v.node()).width,g=r.font.size*C5e,w=YF.lineCount(v),b=Math.max(m+10,I$.minButtonWidth);d.attr("transform",k5e(s+a,s)),p.attr({x:0,y:0,width:b,height:o}),YF.positionText(v,b/2,o/2-(w-1)*g/2+3),a+=b+5});var l=e._fullLayout._size,u=l.l+l.w*r.x,c=l.t+l.h*(1-r.y),f="left";Gg.isRightAnchor(r)&&(u-=a,f="right"),Gg.isCenterAnchor(r)&&(u-=a/2,f="center");var h="top";Gg.isBottomAnchor(r)&&(c-=o,h="bottom"),Gg.isMiddleAnchor(r)&&(c-=o/2,h="middle"),a=Math.ceil(a),o=Math.ceil(o),u=Math.round(u),c=Math.round(c),iLt.autoMargin(e,i+"-range-selector",{x:r.x,y:r.y,l:a*D5e[f],r:a*F5e[f],b:o*F5e[h],t:o*D5e[h]}),n.attr("transform",k5e(u,c))}});var z5e=W((ORr,R5e)=>{"use strict";R5e.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:$F()}}},layoutAttributes:$F(),handleDefaults:A5e(),draw:I5e()}});var us=W(z$=>{"use strict";var B5e=tn().extendFlat;z$.attributes=function(e,t){e=e||{},t=t||{};var r={valType:"info_array",editType:e.editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},i=e.name?e.name+" ":"",n=e.trace?"trace":"subplot",a=t.description?" "+t.description:"",o={x:B5e({},r,{}),y:B5e({},r,{}),editType:e.editType};return e.noGridCell||(o.row={valType:"integer",min:0,dflt:0,editType:e.editType},o.column={valType:"integer",min:0,dflt:0,editType:e.editType}),o};z$.defaults=function(e,t,r,i){var n=i&&i.x||[0,1],a=i&&i.y||[0,1],o=t.grid;if(o){var s=r("domain.column");s!==void 0&&(s<o.columns?n=o._domains.x[s]:delete e.domain.column);var l=r("domain.row");l!==void 0&&(l<o.rows?a=o._domains.y[l]:delete e.domain.row)}var u=r("domain.x",n),c=r("domain.y",a);u[0]<u[1]||(e.domain.x=n.slice()),c[0]<c[1]||(e.domain.y=a.slice())}});var q$=W((URr,U5e)=>{"use strict";var dLt=it(),pLt=(K3(),Go(Z3)).counter,vLt=us().attributes,q5e=Gl().idRegex,gLt=Da(),B$={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:[pLt("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[q5e.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[q5e.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:vLt({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 ZF(e,t,r){var i=t[r+"axes"],n=Object.keys((e._splomAxes||{})[r]||{});if(Array.isArray(i))return i;if(n.length)return n}function mLt(e,t){var r=e.grid||{},i=ZF(t,r,"x"),n=ZF(t,r,"y");if(!e.grid&&!i&&!n)return;var a=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(i),s=Array.isArray(n),l=o&&i!==r.xaxes&&s&&n!==r.yaxes,u,c;a?(u=r.subplots.length,c=r.subplots[0].length):(s&&(u=n.length),o&&(c=i.length));var f=gLt.newContainer(t,"grid");function h(x,T){return dLt.coerce(r,f,B$,x,T)}var d=h("rows",u),p=h("columns",c);if(!(d*p>1)){delete t.grid;return}if(!a&&!o&&!s){var v=h("pattern")==="independent";v&&(a=!0)}f._hasSubplotGrid=a;var m=h("roworder"),g=m==="top to bottom",w=a?.2:.1,b=a?.3:.1,_,M;l&&t._splomGridDflt&&(_=t._splomGridDflt.xside,M=t._splomGridDflt.yside),f._domains={x:O5e("x",h,w,_,p),y:O5e("y",h,b,M,d,g)}}function O5e(e,t,r,i,n,a){var o=t(e+"gap",r),s=t("domain."+e);t(e+"side",i);for(var l=new Array(n),u=s[0],c=(s[1]-u)/(n-o),f=c*(1-o),h=0;h<n;h++){var d=u+c*h;l[a?n-1-h:h]=[d,d+f]}return l}function yLt(e,t){var r=t.grid;if(!(!r||!r._domains)){var i=e.grid||{},n=t._subplots,a=r._hasSubplotGrid,o=r.rows,s=r.columns,l=r.pattern==="independent",u,c,f,h,d,p,v,m=r._axisMap={};if(a){var g=i.subplots||[];p=r.subplots=new Array(o);var w=1;for(u=0;u<o;u++){var b=p[u]=new Array(s),_=g[u]||[];for(c=0;c<s;c++)if(l?(d=w===1?"xy":"x"+w+"y"+w,w++):d=_[c],b[c]="",n.cartesian.indexOf(d)!==-1){if(v=d.indexOf("y"),f=d.slice(0,v),h=d.slice(v),m[f]!==void 0&&m[f]!==c||m[h]!==void 0&&m[h]!==u)continue;b[c]=d,m[f]=c,m[h]=u}}}else{var M=ZF(t,i,"x"),x=ZF(t,i,"y");r.xaxes=N5e(M,n.xaxis,s,m,"x"),r.yaxes=N5e(x,n.yaxis,o,m,"y")}var T=r._anchors={},A=r.roworder==="top to bottom";for(var y in m){var E=y.charAt(0),S=r[E+"side"],C,k,D;if(S.length<8)T[y]="free";else if(E==="x"){if(S.charAt(0)==="t"===A?(C=0,k=1,D=o):(C=o-1,k=-1,D=-1),a){var F=m[y];for(u=C;u!==D;u+=k)if(d=p[u][F],!!d&&(v=d.indexOf("y"),d.slice(0,v)===y)){T[y]=d.slice(v);break}}else for(u=C;u!==D;u+=k)if(h=r.yaxes[u],n.cartesian.indexOf(y+h)!==-1){T[y]=h;break}}else if(S.charAt(0)==="l"?(C=0,k=1,D=s):(C=s-1,k=-1,D=-1),a){var P=m[y];for(u=C;u!==D;u+=k)if(d=p[P][u],!!d&&(v=d.indexOf("y"),d.slice(v)===y)){T[y]=d.slice(0,v);break}}else for(u=C;u!==D;u+=k)if(f=r.xaxes[u],n.cartesian.indexOf(f+y)!==-1){T[y]=f;break}}}}function N5e(e,t,r,i,n){var a=new Array(r),o;function s(l,u){t.indexOf(u)!==-1&&i[u]===void 0?(a[l]=u,i[u]=l):a[l]=""}if(Array.isArray(e))for(o=0;o<r;o++)s(o,e[o]);else for(s(0,n),o=1;o<r;o++)s(o,n+(o+1));return a}U5e.exports={moduleType:"component",name:"grid",schema:{layout:{grid:B$}},layoutAttributes:B$,sizeDefaults:mLt,contentDefaults:yLt}});var O$=W((VRr,V5e)=>{"use strict";V5e.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc"}});var j5e=W((GRr,H5e)=>{"use strict";var G5e=sn(),xLt=yi(),_Lt=it(),bLt=Da(),wLt=O$();H5e.exports=function(e,t,r,i){var n="error_"+i.axis,a=bLt.newContainer(t,n),o=e[n]||{};function s(p,v){return _Lt.coerce(o,a,wLt,p,v)}var l=o.array!==void 0||o.value!==void 0||o.type==="sqrt",u=s("visible",l);if(u!==!1){var c=s("type","array"in o?"data":"percent"),f=!0;c!=="sqrt"&&(f=s("symmetric",!((c==="data"?"arrayminus":"valueminus")in o))),c==="data"?(s("array"),s("traceref"),f||(s("arrayminus"),s("tracerefminus"))):(c==="percent"||c==="constant")&&(s("value"),f||s("valueminus"));var h="copy_"+i.inherit+"style";if(i.inherit){var d=t["error_"+i.inherit];(d||{}).visible&&s(h,!(o.color||G5e(o.thickness)||G5e(o.width)))}(!i.inherit||!a[h])&&(s("color",r),s("thickness"),s("width",xLt.traceIs(t,"gl3d")?0:4))}}});var N$=W((HRr,W5e)=>{"use strict";W5e.exports=function(t){var r=t.type,i=t.symmetric;if(r==="data"){var n=t.array||[];if(i)return function(u,c){var f=+n[c];return[f,f]};var a=t.arrayminus||[];return function(u,c){var f=+n[c],h=+a[c];return!isNaN(f)||!isNaN(h)?[h||0,f||0]:[NaN,NaN]}}else{var o=$5e(r,t.value),s=$5e(r,t.valueminus);return i||t.valueminus===void 0?function(u){var c=o(u);return[c,c]}:function(u){return[s(u),o(u)]}}};function $5e(e,t){if(e==="percent")return function(r){return Math.abs(r*t/100)};if(e==="constant")return function(){return Math.abs(t)};if(e==="sqrt")return function(r){return Math.sqrt(Math.abs(r))}}});var Z5e=W((jRr,X5e)=>{"use strict";var U$=sn(),TLt=yi(),V$=ji(),ALt=it(),MLt=N$();X5e.exports=function(t){for(var r=t.calcdata,i=0;i<r.length;i++){var n=r[i],a=n[0].trace;if(a.visible===!0&&TLt.traceIs(a,"errorBarsOK")){var o=V$.getFromId(t,a.xaxis),s=V$.getFromId(t,a.yaxis);Y5e(n,a,o,"x"),Y5e(n,a,s,"y")}}};function Y5e(e,t,r,i){var n=t["error_"+i]||{},a=n.visible&&["linear","log"].indexOf(r.type)!==-1,o=[];if(a){for(var s=MLt(n),l=0;l<e.length;l++){var u=e[l],c=u.i;if(c===void 0)c=l;else if(c===null)continue;var f=u[i];if(U$(r.c2l(f))){var h=s(f,c);if(U$(h[0])&&U$(h[1])){var d=u[i+"s"]=f-h[0],p=u[i+"h"]=f+h[1];o.push(d,p)}}}var v=r._id,m=t._extremes[v],g=V$.findExtremes(r,o,ALt.extendFlat({tozero:m.opts.tozero},{padded:!0}));m.min=m.min.concat(g.min),m.max=m.max.concat(g.max)}}});var Q5e=W(($Rr,J5e)=>{"use strict";var K5e=vi(),Wy=sn(),SLt=Ji(),ELt=$o();J5e.exports=function(t,r,i,n){var a,o=i.xaxis,s=i.yaxis,l=n&&n.duration>0,u=t._context.staticPlot;r.each(function(c){var f=c[0].trace,h=f.error_x||{},d=f.error_y||{},p;f.ids&&(p=function(w){return w.id});var v=ELt.hasMarkers(f)&&f.marker.maxdisplayed>0;!d.visible&&!h.visible&&(c=[]);var m=K5e.select(this).selectAll("g.errorbar").data(c,p);if(m.exit().remove(),!!c.length){h.visible||m.selectAll("path.xerror").remove(),d.visible||m.selectAll("path.yerror").remove(),m.style("opacity",1);var g=m.enter().append("g").classed("errorbar",!0);l&&g.style("opacity",0).transition().duration(n.duration).style("opacity",1),SLt.setClipUrl(m,i.layerClipId,t),m.each(function(w){var b=K5e.select(this),_=kLt(w,o,s);if(!(v&&!w.vis)){var M,x=b.select("path.yerror");if(d.visible&&Wy(_.x)&&Wy(_.yh)&&Wy(_.ys)){var T=d.width;M="M"+(_.x-T)+","+_.yh+"h"+2*T+"m-"+T+",0V"+_.ys,_.noYS||(M+="m-"+T+",0h"+2*T),a=!x.size(),a?x=b.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):l&&(x=x.transition().duration(n.duration).ease(n.easing)),x.attr("d",M)}else x.remove();var A=b.select("path.xerror");if(h.visible&&Wy(_.y)&&Wy(_.xh)&&Wy(_.xs)){var y=(h.copy_ystyle?d:h).width;M="M"+_.xh+","+(_.y-y)+"v"+2*y+"m0,-"+y+"H"+_.xs,_.noXS||(M+="m0,-"+y+"v"+2*y),a=!A.size(),a?A=b.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):l&&(A=A.transition().duration(n.duration).ease(n.easing)),A.attr("d",M)}else A.remove()}})}})};function kLt(e,t,r){var i={x:t.c2p(e.x),y:r.c2p(e.y)};return e.yh!==void 0&&(i.yh=r.c2p(e.yh),i.ys=r.c2p(e.ys),Wy(i.ys)||(i.noYS=!0,i.ys=r.c2p(e.ys,!0))),e.xh!==void 0&&(i.xh=t.c2p(e.xh),i.xs=t.c2p(e.xs),Wy(i.xs)||(i.noXS=!0,i.xs=t.c2p(e.xs,!0))),i}});var r4e=W((WRr,t4e)=>{"use strict";var CLt=vi(),e4e=ni();t4e.exports=function(t){t.each(function(r){var i=r[0].trace,n=i.error_y||{},a=i.error_x||{},o=CLt.select(this);o.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(e4e.stroke,n.color),a.copy_ystyle&&(a=n),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(e4e.stroke,a.color)})}});var a4e=W((YRr,n4e)=>{"use strict";var SM=it(),i4e=ls().overrideAll,EM=O$(),D_={error_x:SM.extendFlat({},EM),error_y:SM.extendFlat({},EM)};delete D_.error_x.copy_zstyle;delete D_.error_y.copy_zstyle;delete D_.error_y.copy_ystyle;var kM={error_x:SM.extendFlat({},EM),error_y:SM.extendFlat({},EM),error_z:SM.extendFlat({},EM)};delete kM.error_x.copy_ystyle;delete kM.error_y.copy_ystyle;delete kM.error_z.copy_ystyle;delete kM.error_z.copy_zstyle;n4e.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:D_,bar:D_,histogram:D_,scatter3d:i4e(kM,"calc","nested"),scattergl:i4e(D_,"calc","nested")}},supplyDefaults:j5e(),calc:Z5e(),makeComputeError:N$(),plot:Q5e(),style:r4e(),hoverInfo:DLt};function DLt(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}});var s4e=W((XRr,o4e)=>{"use strict";o4e.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}});var v4e=W((ZRr,p4e)=>{"use strict";var Yy=vi(),JF=Ko(),l4e=yi(),Hg=ji(),KF=bf(),Sd=it(),tv=Sd.strTranslate,d4e=tn().extendFlat,G$=Np(),ev=Ji(),a5=ni(),FLt=e_(),LLt=uo(),PLt=bc().flipScale,ILt=mM(),RLt=TF(),zLt=ec(),j$=Hl(),u4e=j$.LINE_SPACING,c4e=j$.FROM_TL,f4e=j$.FROM_BR,Fs=s4e().cn;function BLt(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+Fs.colorbar).data(qLt(e),function(i){return i._id});r.enter().append("g").attr("class",function(i){return i._id}).classed(Fs.colorbar,!0),r.each(function(i){var n=Yy.select(this);Sd.ensureSingle(n,"rect",Fs.cbbg),Sd.ensureSingle(n,"g",Fs.cbfills),Sd.ensureSingle(n,"g",Fs.cblines),Sd.ensureSingle(n,"g",Fs.cbaxis,function(o){o.classed(Fs.crisp,!0)}),Sd.ensureSingle(n,"g",Fs.cbtitleunshift,function(o){o.append("g").classed(Fs.cbtitle,!0)}),Sd.ensureSingle(n,"rect",Fs.cboutline);var a=OLt(n,i,e);a&&a.then&&(e._promises||[]).push(a),e._context.edits.colorbarPosition&&NLt(n,i,e)}),r.exit().each(function(i){JF.autoMargin(e,i._id)}).remove(),r.order()}function qLt(e){var t=e._fullLayout,r=e.calcdata,i=[],n,a,o,s;function l(b){return d4e(b,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){typeof s.calc=="function"?s.calc(e,o,n):(n._fillgradient=a.reversescale?PLt(a.colorscale):a.colorscale,n._zrange=[a[s.min],a[s.max]])}for(var c=0;c<r.length;c++){var f=r[c];if(o=f[0].trace,!!o._module){var h=o._module.colorbar;if(o.visible===!0&&h)for(var d=Array.isArray(h),p=d?h:[h],v=0;v<p.length;v++){s=p[v];var m=s.container;a=m?o[m]:o,a&&a.showscale&&(n=l(a.colorbar),n._id="cb"+o.uid+(d&&m?"-"+m:""),n._traceIndex=o.index,n._propPrefix=(m?m+".":"")+"colorbar.",n._meta=o._meta,u(),i.push(n))}}}for(var g in t._colorAxes)if(a=t[g],a.showscale){var w=t._colorAxes[g];n=l(a.colorbar),n._id="cb"+g,n._propPrefix=g+".colorbar.",n._meta=t._meta,s={min:"cmin",max:"cmax"},w[0]!=="heatmap"&&(o=w[1],s.calc=o._module.colorbar.calc),u(),i.push(n)}return i}var H$=(e,t)=>[Math.min(e[0]+t,e[1]),e[1]],h4e=(e,t)=>[e[0],Math.max(e[1]-t,e[0])];function OLt(e,t,r){var i=t.orientation==="v",n=t.len,a=t.lenmode,o=t.thickness,s=t.thicknessmode,l=t.outlinewidth,u=t.borderwidth,c=t.bgcolor,f=t.xanchor,h=t.yanchor,d=t.xpad,p=t.ypad,v=t.x,m=i?t.y:1-t.y,g=t.yref==="paper",w=t.xref==="paper",b=r._fullLayout,_=b._size,M=t._fillcolor,x=t._line,T=t.title,A=T.side,y=t._zrange||Yy.extent((typeof M=="function"?M:x.color).domain()),E=typeof x.color=="function"?x.color:function(){return x.color},S=typeof M=="function"?M:function(){return M},C=t._levels,k=ULt(r,t,y),D=k.fill,F=k.line,P=Math.round(o*(s==="fraction"?i?_.w:_.h:1)),R=P/(i?_.w:_.h),L=Math.round(n*(a==="fraction"?i?_.h:_.w:1)),I=L/(i?_.h:_.w),B=w?_.w:r._fullLayout.width,O=g?_.h:r._fullLayout.height,$=Math.round(i?v*B+d:m*O+p),Y={center:.5,right:1}[f]||0,K={top:1,middle:.5}[h]||0,j=i?v-Y*R:m-K*R,q=i?m-K*I:v-Y*I,J=Math.round(i?O*(1-q):B*q);t._lenFrac=I,t._thickFrac=R,t._uFrac=j,t._vFrac=q;var U=t._axis=VLt(r,t,y);U.position=R+(i?v+d/_.w:m+p/_.h);var V=["top","bottom"].indexOf(A)!==-1;if(i&&V&&(U.title.side=A,U.titlex=v+d/_.w,U.titley=q+(T.side==="top"?I-p/_.h:p/_.h)),!i&&!V&&(U.title.side=A,U.titley=m+p/_.h,U.titlex=q+d/_.w),x.color&&t.tickmode==="auto"){U.tickmode="linear",U.tick0=C.start;var X=C.size,H=Sd.constrain(L/50,4,15)+1,G=(y[1]-y[0])/((t.nticks||H)*X);if(G>1){var Q=Math.pow(10,Math.floor(Math.log(G)/Math.LN10));X*=Q*Sd.roundUp(G/Q,[2,5,10]),(Math.abs(C.start)/C.size+1e-6)%1<2e-6&&(U.tick0=0)}U.dtick=X}var te=i?p/_.h:d/_.w;U.domain=h4e(H$([q,q+I],te),te),U.setScale(),e.attr("transform",tv(Math.round(_.l),Math.round(_.t)));var ce=e.select("."+Fs.cbtitleunshift).attr("transform",tv(-Math.round(_.l),-Math.round(_.t))),ge=U.ticklabelposition,Ce=U.title.font.size,be=e.select("."+Fs.cbaxis),he,oe=0,Ee=0;function ye(re,pe){var we={propContainer:U,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:b._dfltTitle.colorbar,containerGroup:e.select("."+Fs.cbtitle)},Fe=re.charAt(0)==="h"?re.slice(1):"h"+re;e.selectAll("."+Fe+",."+Fe+"-math-group").remove(),FLt.draw(r,re,d4e(we,pe||{}))}function ue(){if(i&&V||!i&&!V){var re,pe;A==="top"&&(re=d+_.l+B*v,pe=p+_.t+O*(1-q-I)+3+Ce*.75),A==="bottom"&&(re=d+_.l+B*v,pe=p+_.t+O*(1-q)-3-Ce*.25),A==="right"&&(pe=p+_.t+O*m+3+Ce*.75,re=d+_.l+B*q),ye(U._id+"title",{attributes:{x:re,y:pe,"text-anchor":i?"start":"middle"}})}}function ee(){if(i&&!V||!i&&V){var re=U.position||0,pe=U._offset+U._length/2,we,Fe;if(A==="right")Fe=pe,we=_.l+B*re+10+Ce*(U.showticklabels?1:.5);else if(we=pe,A==="bottom"&&(Fe=_.t+O*re+10+(ge.indexOf("inside")===-1?U.tickfont.size:0)+(U.ticks!=="inside"&&t.ticklen||0)),A==="top"){var Se=T.text.split("<br>").length;Fe=_.t+O*re+10-P-u4e*Ce*Se}ye((i?"h":"v")+U._id+"title",{avoid:{selection:Yy.select(r).selectAll("g."+U._id+"tick"),side:A,offsetTop:i?0:_.t,offsetLeft:i?_.l:0,maxShift:i?b.width:b.height},attributes:{x:we,y:Fe,"text-anchor":"middle"},transform:{rotate:i?-90:0,offset:0}})}}function ae(){if(!i&&!V||i&&V){var re=e.select("."+Fs.cbtitle),pe=re.select("text"),we=[-l/2,l/2],Fe=re.select(".h"+U._id+"title-math-group").node(),Se=15.6;pe.node()&&(Se=parseInt(pe.node().style.fontSize,10)*u4e);var ke;if(Fe?(ke=ev.bBox(Fe),Ee=ke.width,oe=ke.height,oe>Se&&(we[1]-=(oe-Se)/2)):pe.node()&&!pe.classed(Fs.jsPlaceholder)&&(ke=ev.bBox(pe.node()),Ee=ke.width,oe=ke.height),i){if(oe){if(oe+=5,A==="top")U.domain=h4e(U.domain,oe/_.h),we[1]*=-1;else{U.domain=H$(U.domain,oe/_.h);var _e=LLt.lineCount(pe);we[1]+=(1-_e)*Se}re.attr("transform",tv(we[0],we[1])),U.setScale()}}else Ee&&(A==="right"&&(U.domain=H$(U.domain,(Ee+Ce/2)/_.w)),re.attr("transform",tv(we[0],we[1])),U.setScale())}e.selectAll("."+Fs.cbfills+",."+Fs.cblines).attr("transform",i?tv(0,Math.round(_.h*(1-U.domain[1]))):tv(Math.round(_.w*U.domain[0]),0)),be.attr("transform",i?tv(0,Math.round(-_.t)):tv(Math.round(-_.l),0));var Ie=e.select("."+Fs.cbfills).selectAll("rect."+Fs.cbfill).attr("style","").data(D);Ie.enter().append("rect").classed(Fs.cbfill,!0).attr("style",""),Ie.exit().remove();var Oe=y.map(U.c2p).map(Math.round).sort(function(vt,Xe){return vt-Xe});Ie.each(function(vt,Xe){var mt=[Xe===0?y[0]:(D[Xe]+D[Xe-1])/2,Xe===D.length-1?y[1]:(D[Xe]+D[Xe+1])/2].map(U.c2p).map(Math.round);i&&(mt[1]=Sd.constrain(mt[1]+(mt[1]>mt[0])?1:-1,Oe[0],Oe[1]));var bt=Yy.select(this).attr(i?"x":"y",$).attr(i?"y":"x",Yy.min(mt)).attr(i?"width":"height",Math.max(P,2)).attr(i?"height":"width",Math.max(Yy.max(mt)-Yy.min(mt),2));if(t._fillgradient)ev.gradient(bt,r,t._id,i?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var Ne=S(vt).replace("e-","");bt.attr("fill",a5.hexString(Ne))}});var Qe=e.select("."+Fs.cblines).selectAll("path."+Fs.cbline).data(x.color&&x.width?F:[]);Qe.enter().append("path").classed(Fs.cbline,!0),Qe.exit().remove(),Qe.each(function(vt){var Xe=$,mt=Math.round(U.c2p(vt))+x.width/2%1;Yy.select(this).attr("d","M"+(i?Xe+","+mt:mt+","+Xe)+(i?"h":"v")+P).call(ev.lineGroupStyle,x.width,E(vt),x.dash)}),be.selectAll("g."+U._id+"tick,path").remove();var et=$+P+(l||0)/2-(t.ticks==="outside"?1:0),_t=Hg.calcTicks(U),ut=Hg.getTickSigns(U)[2];return Hg.drawTicks(r,U,{vals:U.ticks==="inside"?Hg.clipEnds(U,_t):_t,layer:be,path:Hg.makeTickPath(U,et,ut),transFn:Hg.makeTransTickFn(U)}),Hg.drawLabels(r,U,{vals:_t,layer:be,transFn:Hg.makeTransTickLabelFn(U),labelFns:Hg.makeLabelFns(U,et)})}function xe(){var re,pe=P+l/2;ge.indexOf("inside")===-1&&(re=ev.bBox(be.node()),pe+=i?re.width:re.height),he=ce.select("text");var we=0,Fe=i&&A==="top",Se=!i&&A==="right",ke=0;if(he.node()&&!he.classed(Fs.jsPlaceholder)){var _e,Ie=ce.select(".h"+U._id+"title-math-group").node();Ie&&(i&&V||!i&&!V)?(re=ev.bBox(Ie),we=re.width,_e=re.height):(re=ev.bBox(ce.node()),we=re.right-_.l-(i?$:J),_e=re.bottom-_.t-(i?J:$),!i&&A==="top"&&(pe+=re.height,ke=re.height)),Se&&(he.attr("transform",tv(we/2+Ce/2,0)),we*=2),pe=Math.max(pe,i?we:_e)}var Oe=(i?d:p)*2+pe+u+l/2,Qe=0;!i&&T.text&&h==="bottom"&&m<=0&&(Qe=Oe/2,Oe+=Qe,ke+=Qe),b._hColorbarMoveTitle=Qe,b._hColorbarMoveCBTitle=ke;var et=u+l,_t=(i?$:J)-et/2-(i?d:0),ut=(i?J:$)-(i?L:p+ke-Qe);e.select("."+Fs.cbbg).attr("x",_t).attr("y",ut).attr(i?"width":"height",Math.max(Oe-Qe,2)).attr(i?"height":"width",Math.max(L+et,2)).call(a5.fill,c).call(a5.stroke,t.bordercolor).style("stroke-width",u);var vt=Se?Math.max(we-10,0):0;e.selectAll("."+Fs.cboutline).attr("x",(i?$:J+d)+vt).attr("y",(i?J+p-L:$)+(Fe?oe:0)).attr(i?"width":"height",Math.max(P,2)).attr(i?"height":"width",Math.max(L-(i?2*p+oe:2*d+vt),2)).call(a5.stroke,t.outlinecolor).style({fill:"none","stroke-width":l});var Xe=i?Y*Oe:0,mt=i?0:(1-K)*Oe-ke;if(Xe=w?_.l-Xe:-Xe,mt=g?_.t-mt:-mt,e.attr("transform",tv(Xe,mt)),!i&&(u||a5.opacity(c)&&!a5.equals(b.paper_bgcolor,c))){var bt=be.selectAll("text"),Ne=bt[0].length,Ue=e.select("."+Fs.cbbg).node(),Ge=ev.bBox(Ue),je=ev.getTranslate(e),Re=2;bt.each(function(kr,$e){var tt=0,st=Ne-1;if($e===tt||$e===st){var xt=ev.bBox(this),Je=ev.getTranslate(this),Ct;if($e===st){var ir=xt.right+Je.x,hr=Ge.right+je.x+J-u-Re+v;Ct=hr-ir,Ct>0&&(Ct=0)}else if($e===tt){var Ur=xt.left+Je.x,si=Ge.left+je.x+J+u+Re;Ct=si-Ur,Ct<0&&(Ct=0)}Ct&&(Ne<3?this.setAttribute("transform","translate("+Ct+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Ve={},ct=c4e[f],Tt=f4e[f],Xt=c4e[h],Vt=f4e[h],lr=Oe-P;i?(a==="pixels"?(Ve.y=m,Ve.t=L*Xt,Ve.b=L*Vt):(Ve.t=Ve.b=0,Ve.yt=m+n*Xt,Ve.yb=m-n*Vt),s==="pixels"?(Ve.x=v,Ve.l=Oe*ct,Ve.r=Oe*Tt):(Ve.l=lr*ct,Ve.r=lr*Tt,Ve.xl=v-o*ct,Ve.xr=v+o*Tt)):(a==="pixels"?(Ve.x=v,Ve.l=L*ct,Ve.r=L*Tt):(Ve.l=Ve.r=0,Ve.xl=v+n*ct,Ve.xr=v-n*Tt),s==="pixels"?(Ve.y=1-m,Ve.t=Oe*Xt,Ve.b=Oe*Vt):(Ve.t=lr*Xt,Ve.b=lr*Vt,Ve.yt=m-o*Xt,Ve.yb=m+o*Vt));var ur=t.y<.5?"b":"t",Bt=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var Zt={r:b.width-_t-Xe,l:_t+Ve.r,b:b.height-ut-mt,t:ut+Ve.b};w&&g?JF.autoMargin(r,t._id,Ve):w?r._fullLayout._reservedMargin[t._id][ur]=Zt[ur]:g||i?r._fullLayout._reservedMargin[t._id][Bt]=Zt[Bt]:r._fullLayout._reservedMargin[t._id][ur]=Zt[ur]}return Sd.syncOrAsync([JF.previousPromises,ue,ae,ee,JF.previousPromises,xe],r)}function NLt(e,t,r){var i=t.orientation==="v",n=r._fullLayout,a=n._size,o,s,l;KF.init({element:e.node(),gd:r,prepFn:function(){o=e.attr("transform"),G$(e)},moveFn:function(u,c){e.attr("transform",o+tv(u,c)),s=KF.align((i?t._uFrac:t._vFrac)+u/a.w,i?t._thickFrac:t._lenFrac,0,1,t.xanchor),l=KF.align((i?t._vFrac:1-t._uFrac)-c/a.h,i?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=KF.getCursor(s,l,t.xanchor,t.yanchor);G$(e,f)},doneFn:function(){if(G$(e),s!==void 0&&l!==void 0){var u={};u[t._propPrefix+"x"]=s,u[t._propPrefix+"y"]=l,t._traceIndex!==void 0?l4e.call("_guiRestyle",r,u,t._traceIndex):l4e.call("_guiRelayout",r,u)}}})}function ULt(e,t,r){var i=t._levels,n=[],a=[],o,s,l=i.end+i.size/100,u=i.size,c=1.001*r[0]-.001*r[1],f=1.001*r[1]-.001*r[0];for(s=0;s<1e5&&(o=i.start+s*u,!(u>0?o>=l:o<=l));s++)o>c&&o<f&&n.push(o);if(t._fillgradient)a=[0];else if(typeof t._fillcolor=="function"){var h=t._filllevels;if(h)for(l=h.end+h.size/100,u=h.size,s=0;s<1e5&&(o=h.start+s*u,!(u>0?o>=l:o<=l));s++)o>r[0]&&o<r[1]&&a.push(o);else a=n.map(function(d){return d-i.size/2}),a.push(a[a.length-1]+i.size)}else t._fillcolor&&typeof t._fillcolor=="string"&&(a=[0]);return i.size<0&&(n.reverse(),a.reverse()),{line:n,fill:a}}function VLt(e,t,r){var i=e._fullLayout,n=t.orientation==="v",a={type:"linear",range:r,tickmode:t.tickmode,nticks:t.nticks,tick0:t.tick0,dtick:t.dtick,tickvals:t.tickvals,ticktext:t.ticktext,ticks:t.ticks,ticklen:t.ticklen,tickwidth:t.tickwidth,tickcolor:t.tickcolor,showticklabels:t.showticklabels,labelalias:t.labelalias,ticklabelposition:t.ticklabelposition,ticklabeloverflow:t.ticklabeloverflow,ticklabelstep:t.ticklabelstep,tickfont:t.tickfont,tickangle:t.tickangle,tickformat:t.tickformat,exponentformat:t.exponentformat,minexponent:t.minexponent,separatethousands:t.separatethousands,showexponent:t.showexponent,showtickprefix:t.showtickprefix,tickprefix:t.tickprefix,showticksuffix:t.showticksuffix,ticksuffix:t.ticksuffix,title:t.title,showline:!0,anchor:"free",side:n?"right":"bottom",position:1},o=n?"y":"x",s={type:"linear",_id:o+t._id},l={letter:o,font:i.font,noAutotickangles:o==="y",noHover:!0,noTickson:!0,noTicklabelmode:!0,noInsideRange:!0,calendar:i.calendar};function u(c,f){return Sd.coerce(a,s,zLt,c,f)}return ILt(a,s,u,l,i),RLt(a,s,u,l),s}p4e.exports={draw:BLt}});var m4e=W((KRr,g4e)=>{"use strict";g4e.exports={moduleType:"component",name:"colorbar",attributes:yD(),supplyDefaults:JV(),draw:v4e().draw,hasColorbar:jV()}});var x4e=W((JRr,y4e)=>{"use strict";y4e.exports={moduleType:"component",name:"legend",layoutAttributes:$G(),supplyLayoutDefaults:YG(),draw:lH(),style:nH()}});var b4e=W((QRr,_4e)=>{"use strict";_4e.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}});var T4e=W((ezr,w4e)=>{"use strict";w4e.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var W$=W((tzr,E4e)=>{"use strict";var GLt=yi(),S4e=it(),$$=S4e.extendFlat,A4e=S4e.extendDeep;function M4e(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}function HLt(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}E4e.exports=function(t,r){var i,n=t.data,a=t.layout,o=A4e([],n),s=A4e({},a,M4e(r.tileClass)),l=t._context||{};if(r.width&&(s.width=r.width),r.height&&(s.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){s.annotations=[];var u=Object.keys(s);for(i=0;i<u.length;i++)HLt(u[i])&&(s[u[i]].title={text:""});for(i=0;i<o.length;i++){var c=o[i];c.showscale=!1,c.marker&&(c.marker.showscale=!1),GLt.traceIs(c,"pie-like")&&(c.textposition="none")}}if(Array.isArray(r.annotations))for(i=0;i<r.annotations.length;i++)s.annotations.push(r.annotations[i]);var f=Object.keys(s).filter(function(m){return m.match(/^scene\d*$/)});if(f.length){var h={};for(r.tileClass==="thumbnail"&&(h={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),i=0;i<f.length;i++){var d=s[f[i]];d.xaxis||(d.xaxis={}),d.yaxis||(d.yaxis={}),d.zaxis||(d.zaxis={}),$$(d.xaxis,h),$$(d.yaxis,h),$$(d.zaxis,h),d._scene=null}}var p=document.createElement("div");r.tileClass&&(p.className=r.tileClass);var v={gd:p,td:p,layout:s,data:o,config:{staticPlot:r.staticPlot===void 0?!0:r.staticPlot,plotGlPixelRatio:r.plotGlPixelRatio===void 0?2:r.plotGlPixelRatio,displaylogo:r.displaylogo||!1,showTips:r.showTips||!1}};return r.setBackground!=="transparent"&&(v.config.setBackground=r.setBackground||"opaque"),v.gd.defaultLayout=M4e(r.tileClass),v}});var D4e=W((rzr,C4e)=>{"use strict";var jLt=Vx().EventEmitter,$Lt=yi(),WLt=it(),k4e=Ng(),YLt=W$(),XLt=iF(),ZLt=nF();function KLt(e,t){var r=new jLt,i=YLt(e,{format:"png"}),n=i.gd;n.style.position="absolute",n.style.left="-5000px",document.body.appendChild(n);function a(){var s=k4e.getDelay(n._fullLayout);setTimeout(function(){var l=XLt(n),u=document.createElement("canvas");u.id=WLt.randstr(),r=ZLt({format:t.format,width:n._fullLayout.width,height:n._fullLayout.height,canvas:u,emitter:r,svg:l}),r.clean=function(){n&&document.body.removeChild(n)}},s)}var o=k4e.getRedrawFunc(n);return $Lt.call("_doPlot",n,i.data,i.layout,i.config).then(o).then(a).catch(function(s){r.emit("error",s)}),r}C4e.exports=KLt});var P4e=W((izr,L4e)=>{"use strict";var F4e=Ng(),JLt={getDelay:F4e.getDelay,getRedrawFunc:F4e.getRedrawFunc,clone:W$(),toSVG:iF(),svgToImg:nF(),toImage:D4e(),downloadImage:Ej()};L4e.exports=JLt});var R4e=W(jg=>{"use strict";jg.version=E6().version;Yse();z0e();var QLt=yi(),CM=jg.register=QLt.register,X$=e_e(),I4e=Object.keys(X$);for(QF=0;QF<I4e.length;QF++)o5=I4e[QF],o5.charAt(0)!=="_"&&(jg[o5]=X$[o5]),CM({moduleType:"apiMethod",name:o5,fn:X$[o5]});var o5,QF;CM(Xbe());CM([_3e(),P3e(),cu(),J3e(),fwe(),Pwe(),Qwe(),y5e(),z5e(),q$(),a4e(),Jo(),m4e(),x4e(),Ds(),IH()]);CM([b4e(),T4e()]);window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(CM(window.PlotlyLocales),delete window.PlotlyLocales);jg.Icons=o7();var eL=Ds(),Y$=Ko();jg.Plots={resize:Y$.resize,graphJson:Y$.graphJson,sendDataToCloud:Y$.sendDataToCloud};jg.Fx={hover:eL.hover,unhover:eL.unhover,loneHover:eL.loneHover,loneUnhover:eL.loneUnhover};jg.Snapshot=P4e();jg.PlotSchema=fw()});var B4e=W((azr,z4e)=>{"use strict";z4e.exports=R4e()});var w1=W((ozr,V4e)=>{"use strict";var il=Ns(),q4e=_s().axisHoverFormat,{hovertemplateAttrs:e9t,texttemplateAttrs:t9t,templatefallbackAttrs:O4e}=Ga(),U4e=Eo(),r9t=Ho(),N4e=Uy(),i9t=Du().pattern,F_=tn().extendFlat,Z$=r9t({editType:"calc",arrayOk:!0,colorEditType:"style"}),n9t=il.marker,a9t=n9t.line,o9t=F_({},a9t.width,{dflt:0}),s9t=F_({width:o9t,editType:"calc"},U4e("marker.line")),l9t=F_({line:s9t,editType:"calc"},U4e("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:i9t,cornerradius:{valType:"any",editType:"calc"}});V4e.exports={x:il.x,x0:il.x0,dx:il.dx,y:il.y,y0:il.y0,dy:il.dy,xperiod:il.xperiod,yperiod:il.yperiod,xperiod0:il.xperiod0,yperiod0:il.yperiod0,xperiodalignment:il.xperiodalignment,yperiodalignment:il.yperiodalignment,xhoverformat:q4e("x"),yhoverformat:q4e("y"),text:il.text,texttemplate:t9t({editType:"plot"},{keys:N4e.eventDataKeys}),texttemplatefallback:O4e({editType:"plot"}),hovertext:il.hovertext,hovertemplate:e9t({},{keys:N4e.eventDataKeys}),hovertemplatefallback:O4e(),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:F_({},Z$,{}),insidetextfont:F_({},Z$,{}),outsidetextfont:F_({},Z$,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:F_({},il.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:l9t,offsetgroup:il.offsetgroup,alignmentgroup:il.alignmentgroup,selected:{marker:{opacity:il.selected.marker.opacity,color:il.selected.marker.color,editType:"style"},textfont:il.selected.textfont,editType:"style"},unselected:{marker:{opacity:il.unselected.marker.opacity,color:il.unselected.marker.color,editType:"style"},textfont:il.unselected.textfont,editType:"style"},zorder:il.zorder}});var tL=W((szr,G4e)=>{"use strict";G4e.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}});var rL=W((lzr,$4e)=>{"use strict";var u9t=ni(),H4e=bc().hasColorscale,j4e=Fu(),c9t=it().coercePattern;$4e.exports=function(t,r,i,n,a){var o=i("marker.color",n),s=H4e(t,"marker");s&&j4e(t,r,a,i,{prefix:"marker.",cLetter:"c"}),i("marker.line.color",u9t.defaultLine),H4e(t,"marker.line")&&j4e(t,r,a,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width"),i("marker.opacity"),c9t(i,"marker.pattern",o,s),i("selected.marker.color"),i("unselected.marker.color")}});var E0=W((uzr,J4e)=>{"use strict";var W4e=sn(),s5=it(),Y4e=ni(),f9t=yi(),h9t=x_(),d9t=Hp(),p9t=rL(),v9t=__(),X4e=w1(),iL=s5.coerceFont;function g9t(e,t,r,i){function n(u,c){return s5.coerce(e,t,X4e,u,c)}var a=h9t(e,t,i,n);if(!a){t.visible=!1;return}d9t(e,t,i,n),n("xhoverformat"),n("yhoverformat"),n("zorder"),n("orientation",t.x&&!t.y?"h":"v"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback");var o=n("textposition");K4e(e,t,i,n,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),p9t(e,t,n,r,i);var s=(t.marker.line||{}).color,l=f9t.getComponentMethod("errorbars","supplyDefaults");l(e,t,s||Y4e.defaultLine,{axis:"y"}),l(e,t,s||Y4e.defaultLine,{axis:"x",inherit:"y"}),s5.coerceSelectionMarkerOpacity(t,n)}function m9t(e,t){var r,i;function n(s,l){return s5.coerce(i._input,i,X4e,s,l)}for(var a=0;a<e.length;a++)if(i=e[a],i.type==="bar"){r=i._input;var o=n("marker.cornerradius",t.barcornerradius);i.marker&&(i.marker.cornerradius=Z4e(o)),v9t(r,i,t,n,t.barmode)}}function Z4e(e){if(W4e(e)){if(e=+e,e>=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&W4e(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function K4e(e,t,r,i,n,a){a=a||{};var o=a.moduleHasSelected!==!1,s=a.moduleHasUnselected!==!1,l=a.moduleHasConstrain!==!1,u=a.moduleHasCliponaxis!==!1,c=a.moduleHasTextangle!==!1,f=a.moduleHasInsideanchor!==!1,h=!!a.hasPathbar,d=Array.isArray(n)||n==="auto",p=d||n==="inside",v=d||n==="outside";if(p||v){var m=iL(i,"textfont",r.font),g=s5.extendFlat({},m),w=e.textfont&&e.textfont.color,b=!w;if(b&&delete g.color,iL(i,"insidetextfont",g),h){var _=s5.extendFlat({},m);b&&delete _.color,iL(i,"pathbar.textfont",_)}v&&iL(i,"outsidetextfont",m),o&&i("selected.textfont.color"),s&&i("unselected.textfont.color"),l&&i("constraintext"),u&&i("cliponaxis"),c&&i("textangle"),i("texttemplate"),i("texttemplatefallback")}p&&f&&i("insidetextanchor")}J4e.exports={supplyDefaults:g9t,crossTraceDefaults:m9t,handleText:K4e,validateCornerradius:Z4e}});var K$=W((czr,Q4e)=>{"use strict";var y9t=yi(),x9t=ji(),_9t=it(),b9t=tL(),w9t=E0().validateCornerradius;Q4e.exports=function(e,t,r){function i(v,m){return _9t.coerce(e,t,b9t,v,m)}for(var n=!1,a=!1,o=!1,s={},l=i("barmode"),u=l==="group",c=0;c<r.length;c++){var f=r[c];if(y9t.traceIs(f,"bar")&&f.visible)n=!0;else continue;var h=f.xaxis+f.yaxis;if(u?(s[h]&&(o=!0),s[h]=!0):(h+=f._input.offsetgroup,s.length>0&&!s[h]&&(o=!0),s[h]=!0),f.visible&&f.type==="histogram"){var d=x9t.getFromId({_fullLayout:t},f[f.orientation==="v"?"xaxis":"yaxis"]);d.type!=="category"&&(a=!0)}}if(!n){delete t.barmode;return}l!=="overlay"&&i("barnorm"),i("bargap",a&&!o?0:.2),i("bargroupgap");var p=i("barcornerradius");t.barcornerradius=w9t(p)}});var DM=W((fzr,eTe)=>{"use strict";var l5=it();eTe.exports=function(t,r){for(var i=0;i<t.length;i++)t[i].i=i;l5.mergeArray(r.text,t,"tx"),l5.mergeArray(r.hovertext,t,"htx");var n=r.marker;if(n){l5.mergeArray(n.opacity,t,"mo",!0),l5.mergeArray(n.color,t,"mc");var a=n.line;a&&(l5.mergeArray(a.color,t,"mlc"),l5.mergeArrayCastPositive(a.width,t,"mlw"))}}});var oTe=W((hzr,aTe)=>{"use strict";var tTe=ji(),rTe=Wp(),iTe=bc().hasColorscale,nTe=Zc(),T9t=DM(),A9t=w0();aTe.exports=function(t,r){var i=tTe.getFromId(t,r.xaxis||"x"),n=tTe.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c,f={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(a=i.makeCalcdata(r,"x",f),s=n.makeCalcdata(r,"y"),l=rTe(r,n,"y",s),u=!!r.yperiodalignment,c="y"):(a=n.makeCalcdata(r,"y",f),s=i.makeCalcdata(r,"x"),l=rTe(r,i,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var h=Math.min(o.length,a.length),d=new Array(h),p=0;p<h;p++)d[p]={p:o[p],s:a[p]},u&&(d[p].orig_p=s[p],d[p][c+"End"]=l.ends[p],d[p][c+"Start"]=l.starts[p]),r.ids&&(d[p].id=String(r.ids[p]));return iTe(r,"marker")&&nTe(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),iTe(r,"marker.line")&&nTe(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}),T9t(d,r),A9t(d,r),d}});var Qc=W((dzr,lTe)=>{"use strict";var M9t=vi(),S9t=it();function E9t(e,t,r){var i=e._fullLayout,n=i["_"+r+"Text_minsize"];if(n){var a=i.uniformtext.mode==="hide",o;switch(r){case"funnelarea":case"pie":case"sunburst":o="g.slice";break;case"treemap":case"icicle":o="g.slice, g.pathbar";break;default:o="g.points > g.point"}t.selectAll(o).each(function(s){var l=s.transform;if(l){l.scale=a&&l.hide?0:n/l.fontSize;var u=M9t.select(this).select("text");S9t.setTransormAndDisplay(u,l)}})}}function k9t(e,t,r){if(r.uniformtext.mode){var i=sTe(e),n=r.uniformtext.minsize,a=t.scale*t.fontSize;t.hide=a<n,r[i]=r[i]||1/0,t.hide||(r[i]=Math.min(r[i],Math.max(a,n)))}}function C9t(e,t){var r=sTe(e);t[r]=void 0}function sTe(e){return"_"+e+"Text_minsize"}lTe.exports={recordMinTextSize:k9t,clearMinTextSize:C9t,resizeText:E9t}});var nL=W(L_=>{"use strict";var D9t=ni(),F9t=sn(),uTe=it().isArrayOrTypedArray;L_.coerceString=function(e,t,r){if(typeof t=="string"){if(t||!e.noBlank)return t}else if((typeof t=="number"||t===!0)&&!e.strict)return String(t);return r!==void 0?r:e.dflt};L_.coerceNumber=function(e,t,r){if(F9t(t)){t=+t;var i=e.min,n=e.max,a=i!==void 0&&t<i||n!==void 0&&t>n;if(!a)return t}return r!==void 0?r:e.dflt};L_.coerceColor=function(e,t,r){return D9t.isValid(t)?t:r!==void 0?r:e.dflt};L_.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};L_.getValue=function(e,t){var r;return uTe(e)?t<e.length&&(r=e[t]):r=e,r};L_.getLineWidth=function(e,t){var r=0<t.mlw?t.mlw:uTe(e.marker.line.width)?0:e.marker.line.width;return r}});var Ed=W((vzr,_Te)=>{"use strict";var FM=vi(),L9t=ni(),LM=Ji(),cTe=it(),fTe=yi(),hTe=Qc().resizeText,J$=w1(),P9t=J$.textfont,I9t=J$.insidetextfont,R9t=J$.outsidetextfont,Mc=nL();function z9t(e){var t=FM.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");hTe(e,t,"bar");var r=t.size(),i=e._fullLayout;t.style("opacity",function(n){return n[0].trace.opacity}).each(function(n){(i.barmode==="stack"&&r>1||i.bargap===0&&i.bargroupgap===0&&!n[0].trace.marker.line.width)&&FM.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(n){var a=FM.select(this),o=n[0].trace;dTe(a,o,e)}),fTe.getComponentMethod("errorbars","style")(t)}function dTe(e,t,r){LM.pointStyle(e.selectAll("path"),t,r),pTe(e,t,r)}function pTe(e,t,r){e.selectAll("text").each(function(i){var n=FM.select(this),a=cTe.ensureUniformFontSize(r,vTe(n,i,t,r));LM.font(n,a)})}function B9t(e,t,r){var i=t[0].trace;i.selectedpoints?q9t(r,i,e):(dTe(r,i,e),fTe.getComponentMethod("errorbars","style")(r))}function q9t(e,t,r){LM.selectedPointStyle(e.selectAll("path"),t),O9t(e.selectAll("text"),t,r)}function O9t(e,t,r){e.each(function(i){var n=FM.select(this),a;if(i.selected){a=cTe.ensureUniformFontSize(r,vTe(n,i,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(a.color=o),LM.font(n,a)}else LM.selectedTextStyle(n,t)})}function vTe(e,t,r,i){var n=i._fullLayout.font,a=r.textfont;if(e.classed("bartext-inside")){var o=xTe(t,r);a=mTe(r,t.i,n,o)}else e.classed("bartext-outside")&&(a=yTe(r,t.i,n));return a}function gTe(e,t,r){return Q$(P9t,e.textfont,t,r)}function mTe(e,t,r,i){var n=gTe(e,t,r),a=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[t]===void 0;return a&&(n={color:L9t.contrast(i),family:n.family,size:n.size,weight:n.weight,style:n.style,variant:n.variant,textcase:n.textcase,lineposition:n.lineposition,shadow:n.shadow}),Q$(I9t,e.insidetextfont,t,n)}function yTe(e,t,r){var i=gTe(e,t,r);return Q$(R9t,e.outsidetextfont,t,i)}function Q$(e,t,r,i){t=t||{};var n=Mc.getValue(t.family,r),a=Mc.getValue(t.size,r),o=Mc.getValue(t.color,r),s=Mc.getValue(t.weight,r),l=Mc.getValue(t.style,r),u=Mc.getValue(t.variant,r),c=Mc.getValue(t.textcase,r),f=Mc.getValue(t.lineposition,r),h=Mc.getValue(t.shadow,r);return{family:Mc.coerceString(e.family,n,i.family),size:Mc.coerceNumber(e.size,a,i.size),color:Mc.coerceColor(e.color,o,i.color),weight:Mc.coerceString(e.weight,s,i.weight),style:Mc.coerceString(e.style,l,i.style),variant:Mc.coerceString(e.variant,u,i.variant),textcase:Mc.coerceString(e.variant,c,i.textcase),lineposition:Mc.coerceString(e.variant,f,i.lineposition),shadow:Mc.coerceString(e.variant,h,i.shadow)}}function xTe(e,t){return t.type==="waterfall"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}_Te.exports={style:z9t,styleTextPoints:pTe,styleOnSelect:B9t,getInsideTextFont:mTe,getOutsideTextFont:yTe,getBarColor:xTe,resizeText:hTe}});var I_=W((gzr,kTe)=>{"use strict";var aL=vi(),oL=sn(),rc=it(),N9t=uo(),U9t=ni(),Xy=Ji(),V9t=yi(),sL=ji().tickText,bTe=Qc(),G9t=bTe.recordMinTextSize,H9t=bTe.clearMinTextSize,eW=Ed(),u5=nL(),j9t=Uy(),wTe=w1(),$9t=wTe.text,W9t=wTe.textposition,Y9t=Kf().appendArrayPointValue,Ef=j9t.TEXTPAD;function X9t(e){return e.id}function Z9t(e){if(e.ids)return X9t}function tW(e){return(e>0)-(e<0)}function rv(e,t){return e<t?1:-1}function K9t(e,t,r,i){var n=[],a=[],o=i?t:r,s=i?r:t;return n[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),n[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),i?[n,a]:[a,n]}function TTe(e,t,r,i){if(!t.uniformtext.mode&&ATe(r)){var n;return i&&(n=i()),e.transition().duration(r.duration).ease(r.easing).each("end",function(){n&&n()}).each("interrupt",function(){n&&n()})}else return e}function ATe(e){return e&&e.duration>0}function J9t(e,t,r,i,n,a){var o=t.xaxis,s=t.yaxis,l=e._fullLayout,u=e._context.staticPlot;n||(n={mode:l.barmode,norm:l.barmode,gap:l.bargap,groupgap:l.bargroupgap},H9t("bar",l));var c=rc.makeTraceGroups(i,r,"trace bars").each(function(f){var h=aL.select(this),d=f[0].trace,p=f[0].t,v=d.type==="waterfall",m=d.type==="funnel",g=d.type==="histogram",w=d.type==="bar",b=w||m,_=0;v&&d.connector.visible&&d.connector.mode==="between"&&(_=d.connector.line.width/2);var M=d.orientation==="h",x=ATe(n),T=rc.ensureSingle(h,"g","points"),A=Z9t(d),y=T.selectAll("g.point").data(rc.identity,A);y.enter().append("g").classed("point",!0),y.exit().remove(),y.each(function(S,C){var k=aL.select(this),D=K9t(S,o,s,M),F=D[0][0],P=D[0][1],R=D[1][0],L=D[1][1],I=(M?P-F:L-R)===0;I&&b&&u5.getLineWidth(d,S)&&(I=!1),I||(I=!oL(F)||!oL(P)||!oL(R)||!oL(L)),S.isBlank=I,I&&(M?P=F:L=R),_&&!I&&(M?(F-=rv(F,P)*_,P+=rv(F,P)*_):(R-=rv(R,L)*_,L+=rv(R,L)*_));var B,O;if(d.type==="waterfall"){if(!I){var $=d[S.dir].marker;B=$.line.width,O=$.color}}else B=u5.getLineWidth(d,S),O=S.mc||d.marker.color;function Y(re){var pe=aL.round(B/2%1,2);return n.gap===0&&n.groupgap===0?aL.round(Math.round(re)-pe,2):re}function K(re,pe,we){return we&&re===pe?re:Math.abs(re-pe)>=2?Y(re):re>pe?Math.ceil(re):Math.floor(re)}var j=U9t.opacity(O),q=j<1||B>.01?Y:K;e._context.staticPlot||(F=q(F,P,M),P=q(P,F,M),R=q(R,L,!M),L=q(L,R,!M));var J=M?o.c2p:s.c2p,U;S.s0>0?U=S._sMax:S.s0<0?U=S._sMin:U=S.s1>0?S._sMax:S._sMin;function V(re,pe){if(!re)return 0;var we=Math.abs(M?L-R:P-F),Fe=Math.abs(M?P-F:L-R),Se=q(Math.abs(J(U,!0)-J(0,!0))),ke=S.hasB?Math.min(we/2,Fe/2):Math.min(we/2,Se),_e;if(pe==="%"){var Ie=Math.min(50,re);_e=we*(Ie/100)}else _e=re;return q(Math.max(Math.min(_e,ke),0))}var X=w||g?V(p.cornerradiusvalue,p.cornerradiusform):0,H,G,Q="M"+F+","+R+"V"+L+"H"+P+"V"+R+"Z",te=0;if(X&&S.s){var ce=tW(S.s0)===0||tW(S.s)===tW(S.s0)?S.s1:S.s0;if(te=q(S.hasB?0:Math.abs(J(U,!0)-J(ce,!0))),te<X){var ge=rv(F,P),Ce=rv(R,L),be=ge===-Ce?1:0;if(M)if(S.hasB)H="M"+(F+X*ge)+","+R+"A "+X+","+X+" 0 0 "+be+" "+F+","+(R+X*Ce)+"V"+(L-X*Ce)+"A "+X+","+X+" 0 0 "+be+" "+(F+X*ge)+","+L+"H"+(P-X*ge)+"A "+X+","+X+" 0 0 "+be+" "+P+","+(L-X*Ce)+"V"+(R+X*Ce)+"A "+X+","+X+" 0 0 "+be+" "+(P-X*ge)+","+R+"Z";else{G=Math.abs(P-F)+te;var he=G<X?X-Math.sqrt(G*(2*X-G)):0,oe=te>0?Math.sqrt(te*(2*X-te)):0,Ee=ge>0?Math.max:Math.min;H="M"+F+","+R+"V"+(L-he*Ce)+"H"+Ee(P-(X-te)*ge,F)+"A "+X+","+X+" 0 0 "+be+" "+P+","+(L-X*Ce-oe)+"V"+(R+X*Ce+oe)+"A "+X+","+X+" 0 0 "+be+" "+Ee(P-(X-te)*ge,F)+","+(R+he*Ce)+"Z"}else if(S.hasB)H="M"+(F+X*ge)+","+R+"A "+X+","+X+" 0 0 "+be+" "+F+","+(R+X*Ce)+"V"+(L-X*Ce)+"A "+X+","+X+" 0 0 "+be+" "+(F+X*ge)+","+L+"H"+(P-X*ge)+"A "+X+","+X+" 0 0 "+be+" "+P+","+(L-X*Ce)+"V"+(R+X*Ce)+"A "+X+","+X+" 0 0 "+be+" "+(P-X*ge)+","+R+"Z";else{G=Math.abs(L-R)+te;var ye=G<X?X-Math.sqrt(G*(2*X-G)):0,ue=te>0?Math.sqrt(te*(2*X-te)):0,ee=Ce>0?Math.max:Math.min;H="M"+(F+ye*ge)+","+R+"V"+ee(L-(X-te)*Ce,R)+"A "+X+","+X+" 0 0 "+be+" "+(F+X*ge-ue)+","+L+"H"+(P-X*ge+ue)+"A "+X+","+X+" 0 0 "+be+" "+(P-ye*ge)+","+ee(L-(X-te)*Ce,R)+"V"+R+"Z"}}else H=Q}else H=Q;var ae=TTe(rc.ensureSingle(k,"path"),l,n,a);if(ae.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((P-F)*(L-R))||I&&e._context.staticPlot?"M0,0Z":H).call(Xy.setClipUrl,t.layerClipId,e),!l.uniformtext.mode&&x){var xe=Xy.makePointStyleFns(d);Xy.singlePointStyle(S,ae,d,xe,e)}Q9t(e,t,k,f,C,F,P,R,L,X,te,n,a),t.layerClipId&&Xy.hideOutsideRangePoint(S,k.select("text"),o,s,d.xcalendar,d.ycalendar)});var E=d.cliponaxis===!1;Xy.setClipUrl(h,E?null:t.layerClipId,e)});V9t.getComponentMethod("errorbars","plot")(e,c,t,n)}function Q9t(e,t,r,i,n,a,o,s,l,u,c,f,h){var d=t.xaxis,p=t.yaxis,v=e._fullLayout,m;function g(Q,te,ce){var ge=rc.ensureSingle(Q,"text").text(te).attr({class:"bartext bartext-"+m,"text-anchor":"middle","data-notex":1}).call(Xy.font,ce).call(N9t.convertToTspans,e);return ge}var w=i[0].trace,b=w.orientation==="h",_=nPt(i,b,d,p),M=rPt(v,i,n,d,p);m=iPt(w,n);var x=f.mode==="stack"||f.mode==="relative",T=i[n],A=!x||T._outmost,y=T.hasB,E=u&&u-c>Ef;if(!M||m==="none"||(T.isBlank||a===o||s===l)&&(m==="auto"||m==="inside")){r.select("text").remove();return}var S=v.font,C=eW.getBarColor(i[n],w),k=eW.getInsideTextFont(w,n,S,C),D=eW.getOutsideTextFont(w,n,S),F=w.insidetextanchor||"end",P=r.datum();b?d.type==="log"&&P.s0<=0&&(d.range[0]<d.range[1]?a=0:a=d._length):p.type==="log"&&P.s0<=0&&(p.range[0]<p.range[1]?s=p._length:s=0);var R=Math.abs(o-a),L=Math.abs(l-s),I=R-2*Ef,B=L-2*Ef,O,$,Y,K,j;if(m==="outside"&&!A&&!T.hasB&&(m="inside"),m==="auto")if(A){m="inside",j=rc.ensureUniformFontSize(e,k),O=g(r,M,j),$=Xy.bBox(O.node()),Y=$.width,K=$.height;var q=Y>0&&K>0,J;E?y?J=P_(I-2*u,B,Y,K,b)||P_(I,B-2*u,Y,K,b):b?J=P_(I-(u-c),B,Y,K,b)||P_(I,B-2*(u-c),Y,K,b):J=P_(I,B-(u-c),Y,K,b)||P_(I-2*(u-c),B,Y,K,b):J=P_(I,B,Y,K,b),q&&J?m="inside":(m="outside",O.remove(),O=null)}else m="inside";if(!O){j=rc.ensureUniformFontSize(e,m==="outside"?D:k),O=g(r,M,j);var U=O.attr("transform");if(O.attr("transform",""),$=Xy.bBox(O.node()),Y=$.width,K=$.height,O.attr("transform",U),Y<=0||K<=0){O.remove();return}}var V=w.textangle,X,H;m==="outside"?(H=w.constraintext==="both"||w.constraintext==="outside",X=tPt(a,o,s,l,$,{isHorizontal:b,constrained:H,angle:V,zeroBarDir:_})):(H=w.constraintext==="both"||w.constraintext==="inside",X=ETe(a,o,s,l,$,{isHorizontal:b,constrained:H,angle:V,anchor:F,hasB:y,r:u,overhead:c})),X.fontSize=j.size,G9t(w.type==="histogram"?"bar":w.type,X,v),T.transform=X;var G=TTe(O,v,f,h);rc.setTransormAndDisplay(G,X)}function P_(e,t,r,i,n){if(e<0||t<0)return!1;var a=r<=e&&i<=t,o=r<=t&&i<=e,s=n?e>=r*(t/i):t>=i*(e/r);return a||o||s}function MTe(e){return e==="auto"?0:e}function STe(e,t){var r=Math.PI/180*t,i=Math.abs(Math.sin(r)),n=Math.abs(Math.cos(r));return{x:e.width*n+e.height*i,y:e.width*i+e.height*n}}function ETe(e,t,r,i,n,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=a.anchor,c=u==="end",f=u==="start",h=a.leftToRight||0,d=(h+1)/2,p=1-d,v=a.hasB,m=a.r,g=a.overhead,w=n.width,b=n.height,_=Math.abs(t-e),M=Math.abs(i-r),x=_>2*Ef&&M>2*Ef?Ef:0;_-=2*x,M-=2*x;var T=MTe(l);l==="auto"&&!(w<=_&&b<=M)&&(w>_||b>M)&&(!(w>M||b>_)||w<b!=_<M)&&(T+=90);var A=STe(n,T),y,E;if(m&&m-g>Ef){var S=ePt(e,t,r,i,A,m,g,o,v);y=S.scale,E=S.pad}else y=1,s&&(y=Math.min(1,_/A.x,M/A.y)),E=0;var C=n.left*p+n.right*d,k=(n.top+n.bottom)/2,D=(e+Ef)*p+(t-Ef)*d,F=(r+i)/2,P=0,R=0;if(f||c){var L=(o?A.x:A.y)/2;m&&(c||v)&&(x+=E);var I=o?rv(e,t):rv(r,i);o?f?(D=e+I*x,P=-I*L):(D=t-I*x,P=I*L):f?(F=r+I*x,R=-I*L):(F=i-I*x,R=I*L)}return{textX:C,textY:k,targetX:D,targetY:F,anchorX:P,anchorY:R,scale:y,rotate:T}}function ePt(e,t,r,i,n,a,o,s,l){var u=Math.max(0,Math.abs(t-e)-2*Ef),c=Math.max(0,Math.abs(i-r)-2*Ef),f=a-Ef,h=o?f-Math.sqrt(f*f-(f-o)*(f-o)):f,d=l?f*2:s?f-o:2*h,p=l?f*2:s?2*h:f-o,v,m,g,w,b;return n.y/n.x>=c/(u-d)?w=c/n.y:n.y/n.x<=(c-p)/u?w=u/n.x:!l&&s?(v=n.x*n.x+n.y*n.y/4,m=-2*n.x*(u-f)-n.y*(c/2-f),g=(u-f)*(u-f)+(c/2-f)*(c/2-f)-f*f,w=(-m+Math.sqrt(m*m-4*v*g))/(2*v)):l?(v=(n.x*n.x+n.y*n.y)/4,m=-n.x*(u/2-f)-n.y*(c/2-f),g=(u/2-f)*(u/2-f)+(c/2-f)*(c/2-f)-f*f,w=(-m+Math.sqrt(m*m-4*v*g))/(2*v)):(v=n.x*n.x/4+n.y*n.y,m=-n.x*(u/2-f)-2*n.y*(c-f),g=(u/2-f)*(u/2-f)+(c-f)*(c-f)-f*f,w=(-m+Math.sqrt(m*m-4*v*g))/(2*v)),w=Math.min(1,w),s?b=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(c-n.y*w)/2)*(f-(c-n.y*w)/2)))-o):b=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(u-n.x*w)/2)*(f-(u-n.x*w)/2)))-o),{scale:w,pad:b}}function tPt(e,t,r,i,n,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=n.width,c=n.height,f=Math.abs(t-e),h=Math.abs(i-r),d;o?d=h>2*Ef?Ef:0:d=f>2*Ef?Ef:0;var p=1;s&&(p=o?Math.min(1,h/c):Math.min(1,f/u));var v=MTe(l),m=STe(n,v),g=(o?m.x:m.y)/2,w=(n.left+n.right)/2,b=(n.top+n.bottom)/2,_=(e+t)/2,M=(r+i)/2,x=0,T=0,A;return(o?e===t:r===i)&&a.zeroBarDir?A=a.zeroBarDir:A=o?rv(t,e):rv(r,i),o?(_=t-A*d,x=A*g):(M=i+A*d,T=-A*g),{textX:w,textY:b,targetX:_,targetY:M,anchorX:x,anchorY:T,scale:p,rotate:v}}function rPt(e,t,r,i,n){var a=t[0].trace,o=a.texttemplate,s;return o?s=aPt(e,t,r,i,n):a.textinfo?s=oPt(t,r,i,n):s=u5.getValue(a.text,r),u5.coerceString($9t,s)}function iPt(e,t){var r=u5.getValue(e.textposition,t);return u5.coerceEnumerated(W9t,r)}function nPt(e,t,r,i){for(var n=!1,a=!1,o=0;o<e.length;o++){var s=e[o].s;if(s>0?n=!0:s<0&&(a=!0),n&&a)return 0}var l=t?r:i,u=-rv(l.range[0],l.range[1]);return a?n?0:-u:u}function aPt(e,t,r,i,n){var a=t[0].trace,o=rc.castOption(a,r,"texttemplate");if(!o)return"";var s=a.type==="histogram",l=a.type==="waterfall",u=a.type==="funnel",c=a.orientation==="h",f,h,d,p;c?(f="y",h=n,d="x",p=i):(f="x",h=i,d="y",p=n);function v(x){return sL(h,h.c2l(x),!0).text}function m(x){return sL(p,p.c2l(x),!0).text}var g=t[r],w={};w.label=g.p,w.labelLabel=w[f+"Label"]=v(g.p);var b=rc.castOption(a,g.i,"text");(b===0||b)&&(w.text=b),w.value=g.s,w.valueLabel=w[d+"Label"]=m(g.s);var _={};Y9t(_,a,g.i),(s||_.x===void 0)&&(_.x=c?w.value:w.label),(s||_.y===void 0)&&(_.y=c?w.label:w.value),(s||_.xLabel===void 0)&&(_.xLabel=c?w.valueLabel:w.labelLabel),(s||_.yLabel===void 0)&&(_.yLabel=c?w.labelLabel:w.valueLabel),l&&(w.delta=+g.rawS||g.s,w.deltaLabel=m(w.delta),w.final=g.v,w.finalLabel=m(w.final),w.initial=w.final-w.delta,w.initialLabel=m(w.initial)),u&&(w.value=g.s,w.valueLabel=m(w.value),w.percentInitial=g.begR,w.percentInitialLabel=rc.formatPercent(g.begR),w.percentPrevious=g.difR,w.percentPreviousLabel=rc.formatPercent(g.difR),w.percentTotal=g.sumR,w.percenTotalLabel=rc.formatPercent(g.sumR));var M=rc.castOption(a,g.i,"customdata");return M&&(w.customdata=M),rc.texttemplateString({data:[_,w,a._meta],fallback:a.texttemplatefallback,labels:w,locale:e._d3locale,template:o})}function oPt(e,t,r,i){var n=e[0].trace,a=n.orientation==="h",o=n.type==="waterfall",s=n.type==="funnel";function l(M){var x=a?i:r;return sL(x,M,!0).text}function u(M){var x=a?r:i;return sL(x,+M,!0).text}var c=n.textinfo,f=e[t],h=c.split("+"),d=[],p,v=function(M){return h.indexOf(M)!==-1};if(v("label")&&d.push(l(e[t].p)),v("text")&&(p=rc.castOption(n,f.i,"text"),(p===0||p)&&d.push(p)),o){var m=+f.rawS||f.s,g=f.v,w=g-m;v("initial")&&d.push(u(w)),v("delta")&&d.push(u(m)),v("final")&&d.push(u(g))}if(s){v("value")&&d.push(u(f.s));var b=0;v("percent initial")&&b++,v("percent previous")&&b++,v("percent total")&&b++;var _=b>1;v("percent initial")&&(p=rc.formatPercent(f.begR),_&&(p+=" of initial"),d.push(p)),v("percent previous")&&(p=rc.formatPercent(f.difR),_&&(p+=" of previous"),d.push(p)),v("percent total")&&(p=rc.formatPercent(f.sumR),_&&(p+=" of total"),d.push(p))}return d.join("<br>")}kTe.exports={plot:J9t,toMoveInsideBar:ETe}});var c5=W((mzr,LTe)=>{"use strict";var PM=Ds(),sPt=yi(),CTe=ni(),lPt=it().fillText,uPt=nL().getLineWidth,rW=ji().hoverLabelText,cPt=Kn().BADNUM;function fPt(e,t,r,i,n){var a=DTe(e,t,r,i,n);if(a){var o=a.cd,s=o[0].trace,l=o[a.index];return a.color=FTe(s,l),sPt.getComponentMethod("errorbars","hoverInfo")(l,s,a),[a]}}function DTe(e,t,r,i,n){var a=e.cd,o=a[0].trace,s=a[0].t,l=i==="closest",u=o.type==="waterfall",c=e.maxHoverDistance,f=e.maxSpikeDistance,h,d,p,v,m,g,w;o.orientation==="h"?(h=r,d=t,p="y",v="x",m=F,g=C):(h=t,d=r,p="x",v="y",g=F,m=C);var b=o[p+"period"],_=l||b;function M(q){return T(q,-1)}function x(q){return T(q,1)}function T(q,J){var U=q.w;return q[p]+J*U/2}function A(q){return q[p+"End"]-q[p+"Start"]}var y=l?M:b?function(q){return q.p-A(q)/2}:function(q){return Math.min(M(q),q.p-s.bardelta/2)},E=l?x:b?function(q){return q.p+A(q)/2}:function(q){return Math.max(x(q),q.p+s.bardelta/2)};function S(q,J,U){return n.finiteRange&&(U=0),PM.inbox(q-h,J-h,U+Math.min(1,Math.abs(J-q)/w)-1)}function C(q){return S(y(q),E(q),c)}function k(q){return S(M(q),x(q),f)}function D(q){var J=q[v];if(u){var U=Math.abs(q.rawS)||0;d>0?J+=U:d<0&&(J-=U)}return J}function F(q){var J=d,U=q.b,V=D(q);return PM.inbox(U-J,V-J,c+(V-J)/(V-U)-1)}function P(q){var J=d,U=q.b,V=D(q);return PM.inbox(U-J,V-J,f+(V-J)/(V-U)-1)}var R=e[p+"a"],L=e[v+"a"];w=Math.abs(R.r2c(R.range[1])-R.r2c(R.range[0]));function I(q){return(m(q)+g(q))/2}var B=PM.getDistanceFunction(i,m,g,I);if(PM.getClosest(a,B,e),e.index!==!1&&a[e.index].p!==cPt){_||(y=function(q){return Math.min(M(q),q.p-s.bargroupwidth/2)},E=function(q){return Math.max(x(q),q.p+s.bargroupwidth/2)});var O=e.index,$=a[O],Y=o.base?$.b+$.s:$.s;e[v+"0"]=e[v+"1"]=L.c2p($[v],!0),e[v+"LabelVal"]=Y;var K=s.extents[s.extents.round($.p)];e[p+"0"]=R.c2p(l?y($):K[0],!0),e[p+"1"]=R.c2p(l?E($):K[1],!0);var j=$.orig_p!==void 0;return e[p+"LabelVal"]=j?$.orig_p:$.p,e.labelLabel=rW(R,e[p+"LabelVal"],o[p+"hoverformat"]),e.valueLabel=rW(L,e[v+"LabelVal"],o[v+"hoverformat"]),e.baseLabel=rW(L,$.b,o[v+"hoverformat"]),e.spikeDistance=(P($)+k($))/2,e[p+"Spike"]=R.c2p($.p,!0),lPt($,o,e),e.hovertemplate=o.hovertemplate,e}}function FTe(e,t){var r=t.mcc||e.marker.color,i=t.mlcc||e.marker.line.color,n=uPt(e,t);if(CTe.opacity(r))return r;if(CTe.opacity(i)&&n)return i}LTe.exports={hoverPoints:fPt,hoverOnBars:DTe,getTraceColor:FTe}});var ITe=W((yzr,PTe)=>{"use strict";PTe.exports=function(t,r,i){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),i.orientation==="h"?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}});var f5=W((xzr,RTe)=>{"use strict";RTe.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=i[0].trace,s=o.type==="funnel",l=o.orientation==="h",u=[],c;if(r===!1)for(c=0;c<i.length;c++)i[c].selected=0;else for(c=0;c<i.length;c++){var f=i[c],h="ct"in f?f.ct:hPt(f,n,a,l,s);r.contains(h,!1,c,t)?(u.push({pointNumber:c,x:n.c2d(f.x),y:a.c2d(f.y)}),f.selected=1):f.selected=0}return u};function hPt(e,t,r,i,n){var a=t.c2p(i?e.s0:e.p0,!0),o=t.c2p(i?e.s1:e.p1,!0),s=r.c2p(i?e.p0:e.s0,!0),l=r.c2p(i?e.p1:e.s1,!0);return n?[(a+o)/2,(s+l)/2]:i?[o,(s+l)/2]:[(a+o)/2,l]}});var BTe=W((_zr,zTe)=>{"use strict";zTe.exports={attributes:w1(),layoutAttributes:tL(),supplyDefaults:E0().supplyDefaults,crossTraceDefaults:E0().crossTraceDefaults,supplyLayoutDefaults:K$(),calc:oTe(),crossTraceCalc:b_().crossTraceCalc,colorbar:Ac(),arraysToCalcdata:DM(),plot:I_().plot,style:Ed().style,styleOnSelect:Ed().styleOnSelect,hoverPoints:c5().hoverPoints,eventData:ITe(),selectPoints:f5(),moduleType:"trace",name:"bar",basePlotModule:dl(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var OTe=W((bzr,qTe)=>{"use strict";qTe.exports=BTe()});var IM=W((wzr,GTe)=>{"use strict";var dPt=g1(),kd=Ns(),NTe=w1(),pPt=Vl(),UTe=_s().axisHoverFormat,{hovertemplateAttrs:vPt,templatefallbackAttrs:gPt}=Ga(),$g=tn().extendFlat,h5=kd.marker,VTe=h5.line;GTe.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:kd.xperiod,yperiod:kd.yperiod,xperiod0:kd.xperiod0,yperiod0:kd.yperiod0,xperiodalignment:kd.xperiodalignment,yperiodalignment:kd.yperiodalignment,xhoverformat:UTe("x"),yhoverformat:UTe("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:$g({},h5.symbol,{arrayOk:!1,editType:"plot"}),opacity:$g({},h5.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:$g({},h5.angle,{arrayOk:!1,editType:"calc"}),size:$g({},h5.size,{arrayOk:!1,editType:"calc"}),color:$g({},h5.color,{arrayOk:!1,editType:"style"}),line:{color:$g({},VTe.color,{arrayOk:!1,dflt:pPt.defaultLine,editType:"style"}),width:$g({},VTe.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:dPt(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:NTe.offsetgroup,alignmentgroup:NTe.alignmentgroup,selected:{marker:kd.selected.marker,editType:"style"},unselected:{marker:kd.unselected.marker,editType:"style"},text:$g({},kd.text,{}),hovertext:$g({},kd.hovertext,{}),hovertemplate:vPt({}),hovertemplatefallback:gPt(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:kd.zorder}});var RM=W((Tzr,HTe)=>{"use strict";HTe.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}});var BM=W((Azr,YTe)=>{"use strict";var Cd=it(),mPt=yi(),yPt=ni(),xPt=Hp(),_Pt=__(),jTe=bw(),zM=IM();function bPt(e,t,r,i){function n(p,v){return Cd.coerce(e,t,zM,p,v)}if($Te(e,t,n,i),t.visible!==!1){xPt(e,t,i,n),n("xhoverformat"),n("yhoverformat");var a=t._hasPreCompStats;a&&(n("lowerfence"),n("upperfence")),n("line.color",(e.marker||{}).color||r),n("line.width"),n("fillcolor",yPt.addOpacity(t.line.color,.5));var o=!1;if(a){var s=n("mean"),l=n("sd");s&&s.length&&(o=!0,l&&l.length&&(o="sd"))}n("whiskerwidth");var u=n("sizemode"),c;u==="quartiles"&&(c=n("boxmean",o)),n("showwhiskers",u==="quartiles"),(u==="sd"||c==="sd")&&n("sdmultiple"),n("width"),n("quartilemethod");var f=!1;if(a){var h=n("notchspan");h&&h.length&&(f=!0)}else Cd.validate(e.notchwidth,zM.notchwidth)&&(f=!0);var d=n("notched",f);d&&n("notchwidth"),WTe(e,t,n,{prefix:"box"}),n("zorder")}}function $Te(e,t,r,i){function n(E){var S=0;return E&&E.length&&(S+=1,Cd.isArrayOrTypedArray(E[0])&&E[0].length&&(S+=1)),S}function a(E){return Cd.validate(e[E],zM[E])}var o=r("y"),s=r("x"),l;if(t.type==="box"){var u=r("q1"),c=r("median"),f=r("q3");t._hasPreCompStats=u&&u.length&&c&&c.length&&f&&f.length,l=Math.min(Cd.minRowLength(u),Cd.minRowLength(c),Cd.minRowLength(f))}else t._hasPreCompStats=!1;var h=n(o),d=n(s),p=h&&Cd.minRowLength(o),v=d&&Cd.minRowLength(s),m=i.calendar,g={autotypenumbers:i.autotypenumbers},w,b;if(t._hasPreCompStats)switch(String(d)+String(h)){case"00":var _=a("x0")||a("dx"),M=a("y0")||a("dy");M&&!_?w="h":w="v",b=l;break;case"10":w="v",b=Math.min(l,v);break;case"20":w="h",b=Math.min(l,s.length);break;case"01":w="h",b=Math.min(l,p);break;case"02":w="v",b=Math.min(l,o.length);break;case"12":w="v",b=Math.min(l,v,o.length);break;case"21":w="h",b=Math.min(l,s.length,p);break;case"11":b=0;break;case"22":var x=!1,T;for(T=0;T<s.length;T++)if(jTe(s[T],m,g)==="category"){x=!0;break}if(x)w="v",b=Math.min(l,v,o.length);else{for(T=0;T<o.length;T++)if(jTe(o[T],m,g)==="category"){x=!0;break}x?(w="h",b=Math.min(l,s.length,p)):(w="v",b=Math.min(l,v,o.length))}break}else h>0?(w="v",d>0?b=Math.min(v,p):b=Math.min(p)):d>0?(w="h",b=Math.min(v)):b=0;if(!b){t.visible=!1;return}t._length=b;var A=r("orientation",w);t._hasPreCompStats?A==="v"&&d===0?(r("x0",0),r("dx",1)):A==="h"&&h===0&&(r("y0",0),r("dy",1)):A==="v"&&d===0?r("x0"):A==="h"&&h===0&&r("y0");var y=mPt.getComponentMethod("calendars","handleTraceDefaults");y(e,t,["x","y"],i)}function WTe(e,t,r,i){var n=i.prefix,a=Cd.coerce2(e,t,zM,"marker.outliercolor"),o=r("marker.line.outliercolor"),s="outliers";t._hasPreCompStats?s="all":(a||o)&&(s="suspectedoutliers");var l=r(n+"points",s);l?(r("jitter",l==="all"?.3:0),r("pointpos",l==="all"?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",t.line.color),r("marker.line.color"),r("marker.line.width"),l==="suspectedoutliers"&&(r("marker.line.outliercolor",t.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete t.marker;var u=r("hoveron");(u==="all"||u.indexOf("points")!==-1)&&(r("hovertemplate"),r("hovertemplatefallback")),Cd.coerceSelectionMarkerOpacity(t,r)}function wPt(e,t){var r,i;function n(l){return Cd.coerce(i._input,i,zM,l)}for(var a=0;a<e.length;a++){i=e[a];var o=i.type;if(o==="box"||o==="violin"){r=i._input;var s=t[o+"mode"];s==="group"&&_Pt(r,i,t,n,s)}}}YTe.exports={supplyDefaults:bPt,crossTraceDefaults:wPt,handleSampleDefaults:$Te,handlePointsDefaults:WTe}});var lL=W((Mzr,ZTe)=>{"use strict";var TPt=yi(),APt=it(),MPt=RM();function XTe(e,t,r,i,n){for(var a=n+"Layout",o=!1,s=0;s<r.length;s++){var l=r[s];if(TPt.traceIs(l,a)){o=!0;break}}o&&(i(n+"mode"),i(n+"gap"),i(n+"groupgap"))}function SPt(e,t,r){function i(n,a){return APt.coerce(e,t,MPt,n,a)}XTe(e,t,r,i,"box")}ZTe.exports={supplyLayoutDefaults:SPt,_supply:XTe}});var aW=W((Szr,a6e)=>{"use strict";var nW=sn(),uL=ji(),EPt=Wp(),Ll=it(),k0=Kn().BADNUM,Wg=Ll._;a6e.exports=function(t,r){var i=t._fullLayout,n=uL.getFromId(t,r.xaxis||"x"),a=uL.getFromId(t,r.yaxis||"y"),o=[],s=r.type==="violin"?"_numViolins":"_numBoxes",l,u,c,f,h,d,p;r.orientation==="h"?(c=n,f="x",h=a,d="y",p=!!r.yperiodalignment):(c=a,f="y",h=n,d="x",p=!!r.xperiodalignment);var v=kPt(r,d,h,i[s]),m=v[0],g=v[1],w=Ll.distinctVals(m,h),b=w.vals,_=w.minDiff/2,M,x,T,A,y,E,S=(r.boxpoints||r.points)==="all"?Ll.identity:function(be){return be.v<M.lf||be.v>M.uf};if(r._hasPreCompStats){var C=r[f],k=function(be){return c.d2c((r[be]||[])[l])},D=1/0,F=-1/0;for(l=0;l<r._length;l++){var P=m[l];if(nW(P)){if(M={},M.pos=M[d]=P,p&&g&&(M.orig_p=g[l]),M.q1=k("q1"),M.med=k("median"),M.q3=k("q3"),x=[],C&&Ll.isArrayOrTypedArray(C[l]))for(u=0;u<C[l].length;u++)E=c.d2c(C[l][u]),E!==k0&&(y={v:E,i:[l,u]},KTe(y,r,[l,u]),x.push(y));if(M.pts=x.sort(JTe),T=M[f]=x.map(QTe),A=T.length,M.med!==k0&&M.q1!==k0&&M.q3!==k0&&M.med>=M.q1&&M.q3>=M.med){var R=k("lowerfence");M.lf=R!==k0&&R<=M.q1?R:e6e(M,T,A);var L=k("upperfence");M.uf=L!==k0&&L>=M.q3?L:t6e(M,T,A);var I=k("mean");M.mean=I!==k0?I:A?Ll.mean(T,A):(M.q1+M.q3)/2;var B=k("sd");M.sd=I!==k0&&B>=0?B:A?Ll.stdev(T,A,M.mean):M.q3-M.q1,M.lo=r6e(M),M.uo=i6e(M);var O=k("notchspan");O=O!==k0&&O>0?O:n6e(M,A),M.ln=M.med-O,M.un=M.med+O;var $=M.lf,Y=M.uf;r.boxpoints&&T.length&&($=Math.min($,T[0]),Y=Math.max(Y,T[A-1])),r.notched&&($=Math.min($,M.ln),Y=Math.max(Y,M.un)),M.min=$,M.max=Y}else{Ll.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+M.q1,"median = "+M.med,"q3 = "+M.q3].join(`
`));var K;M.med!==k0?K=M.med:M.q1!==k0?M.q3!==k0?K=(M.q1+M.q3)/2:K=M.q1:M.q3!==k0?K=M.q3:K=0,M.med=K,M.q1=M.q3=K,M.lf=M.uf=K,M.mean=M.sd=K,M.ln=M.un=K,M.min=M.max=K}D=Math.min(D,M.min),F=Math.max(F,M.max),M.pts2=x.filter(S),o.push(M)}}r._extremes[c._id]=uL.findExtremes(c,[D,F],{padded:!0})}else{var j=c.makeCalcdata(r,f),q=CPt(b,_),J=b.length,U=DPt(J);for(l=0;l<r._length;l++)if(E=j[l],!!nW(E)){var V=Ll.findBin(m[l],q);V>=0&&V<J&&(y={v:E,i:l},KTe(y,r,l),U[V].push(y))}var X=1/0,H=-1/0,G=r.quartilemethod,Q=G==="exclusive",te=G==="inclusive";for(l=0;l<J;l++)if(U[l].length>0){if(M={},M.pos=M[d]=b[l],x=M.pts=U[l].sort(JTe),T=M[f]=x.map(QTe),A=T.length,M.min=T[0],M.max=T[A-1],M.mean=Ll.mean(T,A),M.sd=Ll.stdev(T,A,M.mean)*r.sdmultiple,M.med=Ll.interp(T,.5),A%2&&(Q||te)){var ce,ge;Q?(ce=T.slice(0,A/2),ge=T.slice(A/2+1)):te&&(ce=T.slice(0,A/2+1),ge=T.slice(A/2)),M.q1=Ll.interp(ce,.5),M.q3=Ll.interp(ge,.5)}else M.q1=Ll.interp(T,.25),M.q3=Ll.interp(T,.75);M.lf=e6e(M,T,A),M.uf=t6e(M,T,A),M.lo=r6e(M),M.uo=i6e(M);var Ce=n6e(M,A);M.ln=M.med-Ce,M.un=M.med+Ce,X=Math.min(X,M.ln),H=Math.max(H,M.un),M.pts2=x.filter(S),o.push(M)}r.notched&&Ll.isTypedArray(j)&&(j=Array.from(j)),r._extremes[c._id]=uL.findExtremes(c,r.notched?j.concat([X,H]):j,{padded:!0})}return FPt(o,r),o.length>0?(o[0].t={num:i[s],dPos:_,posLetter:d,valLetter:f,labels:{med:Wg(t,"median:"),min:Wg(t,"min:"),q1:Wg(t,"q1:"),q3:Wg(t,"q3:"),max:Wg(t,"max:"),mean:r.boxmean==="sd"||r.sizemode==="sd"?Wg(t,"mean \xB1 \u03C3:").replace("\u03C3",r.sdmultiple===1?"\u03C3":r.sdmultiple+"\u03C3"):Wg(t,"mean:"),lf:Wg(t,"lower fence:"),uf:Wg(t,"upper fence:")}},i[s]++,o):[{t:{empty:!0}}]};function kPt(e,t,r,i){var n=t in e,a=t+"0"in e,o="d"+t in e;if(n||a&&o){var s=r.makeCalcdata(e,t),l=EPt(e,r,t,s).vals;return[l,s]}var u;a?u=e[t+"0"]:"name"in e&&(r.type==="category"||nW(e.name)&&["linear","log"].indexOf(r.type)!==-1||Ll.isDateTime(e.name)&&r.type==="date")?u=e.name:u=i;for(var c=r.type==="multicategory"?r.r2c_just_indices(u):r.d2c(u,0,e[t+"calendar"]),f=e._length,h=new Array(f),d=0;d<f;d++)h[d]=c;return[h]}function CPt(e,t){for(var r=e.length,i=new Array(r+1),n=0;n<r;n++)i[n]=e[n]-t;return i[r]=e[r-1]+t,i}function DPt(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=[];return t}var iW={text:"tx",hovertext:"htx"};function KTe(e,t,r){for(var i in iW)Ll.isArrayOrTypedArray(t[i])&&(Array.isArray(r)?Ll.isArrayOrTypedArray(t[i][r[0]])&&(e[iW[i]]=t[i][r[0]][r[1]]):e[iW[i]]=t[i][r])}function FPt(e,t){if(Ll.isArrayOrTypedArray(t.selectedpoints))for(var r=0;r<e.length;r++){for(var i=e[r].pts||[],n={},a=0;a<i.length;a++)n[i[a].i]=a;Ll.tagSelected(i,t,n)}}function JTe(e,t){return e.v-t.v}function QTe(e){return e.v}function e6e(e,t,r){return r===0?e.q1:Math.min(e.q1,t[Math.min(Ll.findBin(2.5*e.q1-1.5*e.q3,t,!0)+1,r-1)])}function t6e(e,t,r){return r===0?e.q3:Math.max(e.q3,t[Math.max(Ll.findBin(2.5*e.q3-1.5*e.q1,t),0)])}function r6e(e){return 4*e.q1-3*e.q3}function i6e(e){return 4*e.q3-3*e.q1}function n6e(e,t){return t===0?0:1.57*(e.q3-e.q1)/Math.sqrt(t)}});var cL=W((Ezr,u6e)=>{"use strict";var o6e=ji(),LPt=it(),PPt=v_().getAxisGroup,s6e=["v","h"];function IPt(e,t){for(var r=e.calcdata,i=t.xaxis,n=t.yaxis,a=0;a<s6e.length;a++){for(var o=s6e[a],s=o==="h"?n:i,l=[],u=0;u<r.length;u++){var c=r[u],f=c[0].t,h=c[0].trace;h.visible===!0&&(h.type==="box"||h.type==="candlestick")&&!f.empty&&(h.orientation||"v")===o&&h.xaxis===i._id&&h.yaxis===n._id&&l.push(u)}l6e("box",e,l,s)}}function l6e(e,t,r,i){var n=t.calcdata,a=t._fullLayout,o=i._id,s=o.charAt(0),l,u,c,f=[],h=0;for(l=0;l<r.length;l++)for(c=n[r[l]],u=0;u<c.length;u++)f.push(i.c2l(c[u].pos,!0)),h+=(c[u].pts2||[]).length;if(f.length){var d=LPt.distinctVals(f);(i.type==="category"||i.type==="multicategory")&&(d.minDiff=1);var p=d.minDiff/2;o6e.minDtick(i,d.minDiff,d.vals[0],!0);var v=e==="violin"?"_numViolins":"_numBoxes",m=a[v],g=a[e+"mode"]==="group"&&m>1,w=1-a[e+"gap"],b=1-a[e+"groupgap"];for(l=0;l<r.length;l++){c=n[r[l]];var _=c[0].trace,M=c[0].t,x=_.width,T=_.side,A,y,E,S;if(x)A=y=S=x/2,E=0;else if(A=p,g){var C=PPt(a,i._id)+_.orientation,k=a._alignmentOpts[C]||{},D=k[_.alignmentgroup]||{},F=Object.keys(D.offsetGroups||{}).length,P=F||m,R=F?_._offsetIndex:M.num;y=A*w*b/P,E=2*A*(-.5+(R+.5)/P)*w,S=A*w/P}else y=A*w*b,E=0,S=A;M.dPos=A,M.bPos=E,M.bdPos=y,M.wHover=S;var L,I,B=E+y,O,$,Y,K,j,q,J=!!x,U=(_.boxpoints||_.points)&&h>0;if(T==="positive"?(L=A*(x?1:.5),O=B,I=O=E):T==="negative"?(L=O=E,I=A*(x?1:.5),$=B):(L=I=A,O=$=B),U){var V=_.pointpos,X=_.jitter,H=_.marker.size/2,G=0;V+X>=0&&(G=B*(V+X),G>L?(J=!0,j=H,Y=G):G>O&&(j=H,Y=L)),G<=L&&(Y=L);var Q=0;V-X<=0&&(Q=-B*(V-X),Q>I?(J=!0,q=H,K=Q):Q>$&&(q=H,K=I)),Q<=I&&(K=I)}else Y=L,K=I;var te=new Array(c.length);for(u=0;u<c.length;u++)te[u]=c[u].pos;_._extremes[o]=o6e.findExtremes(i,te,{padded:J,vpadminus:K,vpadplus:Y,vpadLinearized:!0,ppadminus:{x:q,y:j}[s],ppadplus:{x:j,y:q}[s]})}}}u6e.exports={crossTraceCalc:IPt,setPositionOffset:l6e}});var fL=W((kzr,p6e)=>{"use strict";var d5=vi(),R_=it(),RPt=Ji(),c6e=5,zPt=.01;function BPt(e,t,r,i){var n=e._context.staticPlot,a=t.xaxis,o=t.yaxis;R_.makeTraceGroups(i,r,"trace boxes").each(function(s){var l=d5.select(this),u=s[0],c=u.t,f=u.trace;if(c.wdPos=c.bdPos*f.whiskerwidth,f.visible!==!0||c.empty){l.remove();return}var h,d;f.orientation==="h"?(h=o,d=a):(h=a,d=o),f6e(l,{pos:h,val:d},f,c,n),h6e(l,{x:a,y:o},f,c),d6e(l,{pos:h,val:d},f,c)})}function f6e(e,t,r,i,n){var a=r.orientation==="h",o=t.val,s=t.pos,l=!!s.rangebreaks,u=i.bPos,c=i.wdPos||0,f=i.bPosPxOffset||0,h=r.whiskerwidth||0,d=r.showwhiskers!==!1,p=r.notched||!1,v=p?1-2*r.notchwidth:1,m,g;Array.isArray(i.bdPos)?(m=i.bdPos[0],g=i.bdPos[1]):(m=i.bdPos,g=i.bdPos);var w=e.selectAll("path.box").data(r.type!=="violin"||r.box.visible?R_.identity:[]);w.enter().append("path").style("vector-effect",n?"none":"non-scaling-stroke").attr("class","box"),w.exit().remove(),w.each(function(b){if(b.empty)return d5.select(this).attr("d","M0,0Z");var _=s.c2l(b.pos+u,!0),M=s.l2p(_-m)+f,x=s.l2p(_+g)+f,T=l?(M+x)/2:s.l2p(_)+f,A=r.whiskerwidth,y=l?M*A+(1-A)*T:s.l2p(_-c)+f,E=l?x*A+(1-A)*T:s.l2p(_+c)+f,S=s.l2p(_-m*v)+f,C=s.l2p(_+g*v)+f,k=r.sizemode==="sd",D=o.c2p(k?b.mean-b.sd:b.q1,!0),F=k?o.c2p(b.mean+b.sd,!0):o.c2p(b.q3,!0),P=R_.constrain(k?o.c2p(b.mean,!0):o.c2p(b.med,!0),Math.min(D,F)+1,Math.max(D,F)-1),R=b.lf===void 0||r.boxpoints===!1||k,L=o.c2p(R?b.min:b.lf,!0),I=o.c2p(R?b.max:b.uf,!0),B=o.c2p(b.ln,!0),O=o.c2p(b.un,!0);a?d5.select(this).attr("d","M"+P+","+S+"V"+C+"M"+D+","+M+"V"+x+(p?"H"+B+"L"+P+","+C+"L"+O+","+x:"")+"H"+F+"V"+M+(p?"H"+O+"L"+P+","+S+"L"+B+","+M:"")+"Z"+(d?"M"+D+","+T+"H"+L+"M"+F+","+T+"H"+I+(h===0?"":"M"+L+","+y+"V"+E+"M"+I+","+y+"V"+E):"")):d5.select(this).attr("d","M"+S+","+P+"H"+C+"M"+M+","+D+"H"+x+(p?"V"+B+"L"+C+","+P+"L"+x+","+O:"")+"V"+F+"H"+M+(p?"V"+O+"L"+S+","+P+"L"+M+","+B:"")+"Z"+(d?"M"+T+","+D+"V"+L+"M"+T+","+F+"V"+I+(h===0?"":"M"+y+","+L+"H"+E+"M"+y+","+I+"H"+E):""))})}function h6e(e,t,r,i){var n=t.x,a=t.y,o=i.bdPos,s=i.bPos,l=r.boxpoints||r.points;R_.seedPseudoRandom();var u=function(h){return h.forEach(function(d){d.t=i,d.trace=r}),h},c=e.selectAll("g.points").data(l?u:[]);c.enter().append("g").attr("class","points"),c.exit().remove();var f=c.selectAll("path").data(function(h){var d,p=h.pts2,v=Math.max((h.max-h.min)/10,h.q3-h.q1),m=v*1e-9,g=v*zPt,w=[],b=0,_;if(r.jitter){if(v===0)for(b=1,w=new Array(p.length),d=0;d<p.length;d++)w[d]=1;else for(d=0;d<p.length;d++){var M=Math.max(0,d-c6e),x=p[M].v,T=Math.min(p.length-1,d+c6e),A=p[T].v;l!=="all"&&(p[d].v<h.lf?A=Math.min(A,h.lf):x=Math.max(x,h.uf));var y=Math.sqrt(g*(T-M)/(A-x+m))||0;y=R_.constrain(Math.abs(y),0,1),w.push(y),b=Math.max(y,b)}_=r.jitter*2/(b||1)}for(d=0;d<p.length;d++){var E=p[d],S=E.v,C=r.jitter?_*w[d]*(R_.pseudoRandom()-.5):0,k=h.pos+s+o*(r.pointpos+C);r.orientation==="h"?(E.y=k,E.x=S):(E.x=k,E.y=S),l==="suspectedoutliers"&&S<h.uo&&S>h.lo&&(E.so=!0)}return p});f.enter().append("path").classed("point",!0),f.exit().remove(),f.call(RPt.translatePoints,n,a)}function d6e(e,t,r,i){var n=t.val,a=t.pos,o=!!a.rangebreaks,s=i.bPos,l=i.bPosPxOffset||0,u=r.boxmean||(r.meanline||{}).visible,c,f;Array.isArray(i.bdPos)?(c=i.bdPos[0],f=i.bdPos[1]):(c=i.bdPos,f=i.bdPos);var h=e.selectAll("path.mean").data(r.type==="box"&&r.boxmean||r.type==="violin"&&r.box.visible&&r.meanline.visible?R_.identity:[]);h.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),h.exit().remove(),h.each(function(d){var p=a.c2l(d.pos+s,!0),v=a.l2p(p-c)+l,m=a.l2p(p+f)+l,g=o?(v+m)/2:a.l2p(p)+l,w=n.c2p(d.mean,!0),b=n.c2p(d.mean-d.sd,!0),_=n.c2p(d.mean+d.sd,!0);r.orientation==="h"?d5.select(this).attr("d","M"+w+","+v+"V"+m+(u==="sd"?"m0,0L"+b+","+g+"L"+w+","+v+"L"+_+","+g+"Z":"")):d5.select(this).attr("d","M"+v+","+w+"H"+m+(u==="sd"?"m0,0L"+g+","+b+"L"+v+","+w+"L"+g+","+_+"Z":""))})}p6e.exports={plot:BPt,plotBoxAndWhiskers:f6e,plotPoints:h6e,plotBoxMean:d6e}});var hL=W((Czr,v6e)=>{"use strict";var oW=vi(),sW=ni(),lW=Ji();function qPt(e,t,r){var i=r||oW.select(e).selectAll("g.trace.boxes");i.style("opacity",function(n){return n[0].trace.opacity}),i.each(function(n){var a=oW.select(this),o=n[0].trace,s=o.line.width;function l(f,h,d,p){f.style("stroke-width",h+"px").call(sW.stroke,d).call(sW.fill,p)}var u=a.selectAll("path.box");if(o.type==="candlestick")u.each(function(f){if(!f.empty){var h=oW.select(this),d=o[f.dir];l(h,d.line.width,d.line.color,d.fillcolor),h.style("opacity",o.selectedpoints&&!f.selected?.3:1)}});else{l(u,s,o.line.color,o.fillcolor),a.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(sW.stroke,o.line.color);var c=a.selectAll("path.point");lW.pointStyle(c,o,e)}})}function OPt(e,t,r){var i=t[0].trace,n=r.selectAll("path.point");i.selectedpoints?lW.selectedPointStyle(n,i):lW.pointStyle(n,i,e)}v6e.exports={style:qPt,styleOnSelect:OPt}});var cW=W((Dzr,x6e)=>{"use strict";var NPt=ji(),uW=it(),Zy=Ds(),g6e=ni(),UPt=uW.fillText;function VPt(e,t,r,i){var n=e.cd,a=n[0].trace,o=a.hoveron,s=[],l;return o.indexOf("boxes")!==-1&&(s=s.concat(m6e(e,t,r,i))),o.indexOf("points")!==-1&&(l=y6e(e,t,r)),i==="closest"?l?[l]:s:(l&&s.push(l),s)}function m6e(e,t,r,i){var n=e.cd,a=e.xa,o=e.ya,s=n[0].trace,l=n[0].t,u=s.type==="violin",c,f,h,d,p,v,m,g,w,b,_,M=l.bdPos,x,T,A=l.wHover,y=function(H){return h.c2l(H.pos)+l.bPos-h.c2l(v)};u&&s.side!=="both"?(s.side==="positive"&&(w=function(H){var G=y(H);return Zy.inbox(G,G+A,b)},x=M,T=0),s.side==="negative"&&(w=function(H){var G=y(H);return Zy.inbox(G-A,G,b)},x=0,T=M)):(w=function(H){var G=y(H);return Zy.inbox(G-A,G+A,b)},x=T=M);var E;u?E=function(H){return Zy.inbox(H.span[0]-p,H.span[1]-p,b)}:E=function(H){return Zy.inbox(H.min-p,H.max-p,b)},s.orientation==="h"?(p=t,v=r,m=E,g=w,c="y",h=o,f="x",d=a):(p=r,v=t,m=w,g=E,c="x",h=a,f="y",d=o);var S=Math.min(1,M/Math.abs(h.r2c(h.range[1])-h.r2c(h.range[0])));b=e.maxHoverDistance-S,_=e.maxSpikeDistance-S;function C(H){return(m(H)+g(H))/2}var k=Zy.getDistanceFunction(i,m,g,C);if(Zy.getClosest(n,k,e),e.index===!1)return[];var D=n[e.index],F=s.line.color,P=(s.marker||{}).color;g6e.opacity(F)&&s.line.width?e.color=F:g6e.opacity(P)&&s.boxpoints?e.color=P:e.color=s.fillcolor,e[c+"0"]=h.c2p(D.pos+l.bPos-T,!0),e[c+"1"]=h.c2p(D.pos+l.bPos+x,!0),e[c+"LabelVal"]=D.orig_p!==void 0?D.orig_p:D.pos;var R=c+"Spike";e.spikeDistance=C(D)*_/b,e[R]=h.c2p(D.pos,!0);var L=s.boxmean||s.sizemode==="sd"||(s.meanline||{}).visible,I=s.boxpoints||s.points,B=I&&L?["max","uf","q3","med","mean","q1","lf","min"]:I&&!L?["max","uf","q3","med","q1","lf","min"]:!I&&L?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],O=d.range[1]<d.range[0];s.orientation===(O?"v":"h")&&B.reverse();for(var $=e.spikeDistance,Y=e[R],K=[],j=0;j<B.length;j++){var q=B[j];if(q in D){var J=D[q],U=d.c2p(J,!0),V=uW.extendFlat({},e);V.attr=q,V[f+"0"]=V[f+"1"]=U,V[f+"LabelVal"]=J,V[f+"Label"]=(l.labels?l.labels[q]+" ":"")+NPt.hoverLabelText(d,J,s[f+"hoverformat"]),V.hoverOnBox=!0,q==="mean"&&"sd"in D&&(s.boxmean==="sd"||s.sizemode==="sd")&&(V[f+"err"]=D.sd),V.hovertemplate=!1,K.push(V)}}e.name="",e.spikeDistance=void 0,e[R]=void 0;for(var X=0;X<K.length;X++)K[X].attr!=="med"?(K[X].name="",K[X].spikeDistance=void 0,K[X][R]=void 0):(K[X].spikeDistance=$,K[X][R]=Y);return K}function y6e(e,t,r){for(var i=e.cd,n=e.xa,a=e.ya,o=i[0].trace,s=n.c2p(t),l=a.c2p(r),u,c=function(E){var S=Math.max(3,E.mrc||0);return Math.max(Math.abs(n.c2p(E.x)-s)-S,1-3/S)},f=function(E){var S=Math.max(3,E.mrc||0);return Math.max(Math.abs(a.c2p(E.y)-l)-S,1-3/S)},h=Zy.quadrature(c,f),d=!1,p,v,m=0;m<i.length;m++){p=i[m];for(var g=0;g<(p.pts||[]).length;g++){v=p.pts[g];var w=h(v);w<=e.distance&&(e.distance=w,d=[m,g])}}if(!d)return!1;p=i[d[0]],v=p.pts[d[1]];var b=n.c2p(v.x,!0),_=a.c2p(v.y,!0),M=v.mrc||1;u=uW.extendFlat({},e,{index:v.i,color:(o.marker||{}).color,name:o.name,x0:b-M,x1:b+M,y0:_-M,y1:_+M,spikeDistance:e.distance,hovertemplate:o.hovertemplate});var x=p.orig_p,T=x!==void 0?x:p.pos,A;o.orientation==="h"?(A=a,u.xLabelVal=v.x,u.yLabelVal=T):(A=n,u.xLabelVal=T,u.yLabelVal=v.y);var y=A._id.charAt(0);return u[y+"Spike"]=A.c2p(p.pos,!0),UPt(v,o,u),u}x6e.exports={hoverPoints:VPt,hoverOnBoxes:m6e,hoverOnPoints:y6e}});var b6e=W((Fzr,_6e)=>{"use strict";_6e.exports=function(t,r){return r.hoverOnBox&&(t.hoverOnBox=r.hoverOnBox),"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var fW=W((Lzr,w6e)=>{"use strict";w6e.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=[],s,l;if(r===!1)for(s=0;s<i.length;s++)for(l=0;l<(i[s].pts||[]).length;l++)i[s].pts[l].selected=0;else for(s=0;s<i.length;s++)for(l=0;l<(i[s].pts||[]).length;l++){var u=i[s].pts[l],c=n.c2p(u.x),f=a.c2p(u.y);r.contains([c,f],null,u.i,t)?(o.push({pointNumber:u.i,x:n.c2d(u.x),y:a.c2d(u.y)}),u.selected=1):u.selected=0}return o}});var A6e=W((Pzr,T6e)=>{"use strict";T6e.exports={attributes:IM(),layoutAttributes:RM(),supplyDefaults:BM().supplyDefaults,crossTraceDefaults:BM().crossTraceDefaults,supplyLayoutDefaults:lL().supplyLayoutDefaults,calc:aW(),crossTraceCalc:cL().crossTraceCalc,plot:fL().plot,style:hL().style,styleOnSelect:hL().styleOnSelect,hoverPoints:cW().hoverPoints,eventData:b6e(),selectPoints:fW(),moduleType:"trace",name:"box",basePlotModule:dl(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var S6e=W((Izr,M6e)=>{"use strict";M6e.exports=A6e()});var p5=W((Rzr,k6e)=>{"use strict";var GPt=Eo(),{extendFlat:Uh}=tn(),HPt=Wa(),{axisHoverFormat:hW}=_s(),jPt=Ho(),{hovertemplateAttrs:$Pt,templatefallbackAttrs:E6e,texttemplateAttrs:WPt}=Ga(),C0=Ns();k6e.exports=Uh({z:{valType:"data_array",editType:"calc"},x:Uh({},C0.x,{impliedEdits:{xtype:"array"}}),x0:Uh({},C0.x0,{impliedEdits:{xtype:"scaled"}}),dx:Uh({},C0.dx,{impliedEdits:{xtype:"scaled"}}),y:Uh({},C0.y,{impliedEdits:{ytype:"array"}}),y0:Uh({},C0.y0,{impliedEdits:{ytype:"scaled"}}),dy:Uh({},C0.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:Uh({},C0.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:Uh({},C0.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:Uh({},C0.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:Uh({},C0.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:Uh({},C0.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:Uh({},C0.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:hW("x"),yhoverformat:hW("y"),zhoverformat:hW("z",1),hovertemplate:$Pt(),hovertemplatefallback:E6e(),texttemplate:WPt({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:E6e({editType:"plot"}),textfont:jPt({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:Uh({},HPt.showlegend,{dflt:!1}),zorder:C0.zorder},GPt("",{cLetter:"z",autoColorDflt:!1}))});var pL=W((zzr,D6e)=>{"use strict";var YPt=sn(),dL=it(),XPt=yi();D6e.exports=function(t,r,i,n,a,o){var s=i("z");a=a||"x",o=o||"y";var l,u;if(s===void 0||!s.length)return 0;if(dL.isArray1D(s)){l=i(a),u=i(o);var c=dL.minRowLength(l),f=dL.minRowLength(u);if(c===0||f===0)return 0;r._length=Math.min(c,f,s.length)}else{if(l=C6e(a,i),u=C6e(o,i),!ZPt(s))return 0;i("transpose"),r._length=null}var h=XPt.getComponentMethod("calendars","handleTraceDefaults");return h(t,r,[a,o],n),!0};function C6e(e,t){var r=t(e),i=r?t(e+"type","array"):"scaled";return i==="scaled"&&(t(e+"0"),t("d"+e)),r}function ZPt(e){for(var t=!0,r=!1,i=!1,n,a=0;a<e.length;a++){if(n=e[a],!dL.isArrayOrTypedArray(n)){t=!1;break}n.length>0&&(r=!0);for(var o=0;o<n.length;o++)if(YPt(n[o])){i=!0;break}}return t&&r&&i}});var qM=W((Bzr,L6e)=>{"use strict";var F6e=it();L6e.exports=function(t,r){t("texttemplate"),t("texttemplatefallback");var i=F6e.extendFlat({},r.font,{color:"auto",size:"auto"});F6e.coerceFont(t,"textfont",i)}});var dW=W((qzr,P6e)=>{"use strict";P6e.exports=function(t,r,i){var n=i("zsmooth");n===!1&&(i("xgap"),i("ygap")),i("zhoverformat")}});var z6e=W((Ozr,R6e)=>{"use strict";var I6e=it(),KPt=pL(),JPt=qM(),QPt=Hp(),eIt=dW(),tIt=Fu(),rIt=p5();R6e.exports=function(t,r,i,n){function a(s,l){return I6e.coerce(t,r,rIt,s,l)}var o=KPt(t,r,a,n);if(!o){r.visible=!1;return}QPt(t,r,n,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),JPt(a,n),eIt(t,r,a,n),a("hoverongaps"),a("connectgaps",I6e.isArray1D(r.z)&&r.zsmooth!==!1),tIt(t,r,n,a,{prefix:"",cLetter:"z"}),a("zorder")}});var pW=W((Nzr,B6e)=>{"use strict";var v5=sn();B6e.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,i){var n=i[t];return v5(n)?(n=Number(n),r[e]+=n,n):0},avg:function(e,t,r,i,n){var a=i[t];return v5(a)&&(a=Number(a),r[e]+=a,n[e]++),0},min:function(e,t,r,i){var n=i[t];if(v5(n))if(n=Number(n),v5(r[e])){if(r[e]>n){var a=n-r[e];return r[e]=n,a}}else return r[e]=n,n;return 0},max:function(e,t,r,i){var n=i[t];if(v5(n))if(n=Number(n),v5(r[e])){if(r[e]<n){var a=n-r[e];return r[e]=n,a}}else return r[e]=n,n;return 0}}});var vW=W((Uzr,q6e)=>{"use strict";q6e.exports={percent:function(e,t){for(var r=e.length,i=100/t,n=0;n<r;n++)e[n]*=i},probability:function(e,t){for(var r=e.length,i=0;i<r;i++)e[i]/=t},density:function(e,t,r,i){var n=e.length;i=i||1;for(var a=0;a<n;a++)e[a]*=r[a]*i},"probability density":function(e,t,r,i){var n=e.length;i&&(t/=i);for(var a=0;a<n;a++)e[a]*=r[a]/t}}});var gW=W((Vzr,O6e)=>{"use strict";O6e.exports=function(t,r){for(var i=t.length,n=0,a=0;a<i;a++)r[a]?(t[a]/=r[a],n+=t[a]):t[a]=null;return n}});var mW=W((Gzr,W6e)=>{"use strict";var g5=Kn(),z_=g5.ONEAVGYEAR,N6e=g5.ONEAVGMONTH,gL=g5.ONEDAY,U6e=g5.ONEHOUR,V6e=g5.ONEMIN,G6e=g5.ONESEC,H6e=ji().tickIncrement;W6e.exports=function(t,r,i,n,a){var o=-1.1*r,s=-.1*r,l=t-s,u=i[0],c=i[1],f=Math.min(vL(u+s,u+l,n,a),vL(c+s,c+l,n,a)),h=Math.min(vL(u+o,u+s,n,a),vL(c+o,c+s,n,a)),d,p;if(f>h&&h<Math.abs(c-u)/4e3?(d=f,p=!1):(d=Math.min(f,h),p=!0),n.type==="date"&&d>gL){var v=d===z_?1:6,m=d===z_?"M12":"M1";return function(g,w){var b=n.c2d(g,z_,a),_=b.indexOf("-",v);_>0&&(b=b.slice(0,_));var M=n.d2c(b,0,a);if(M<g){var x=H6e(M,m,!1,a);(M+x)/2<g+t&&(M=x)}return w&&p?H6e(M,m,!0,a):M}}return function(g,w){var b=d*Math.round(g/d);return b+d/10<g&&b+d*.9<g+t&&(b+=d),w&&p&&(b-=d),b}};function vL(e,t,r,i){if(e*t<=0)return 1/0;for(var n=Math.abs(t-e),a=r.type==="date",o=j6e(n,a),s=0;s<10;s++){var l=j6e(o*80,a);if(o===l)break;if(iIt(l,e,t,a,r,i))o=l;else break}return o}function j6e(e,t){return t&&e>G6e?e>gL?e>z_*1.1?z_:e>N6e*1.1?N6e:gL:e>U6e?U6e:e>V6e?V6e:G6e:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function iIt(e,t,r,i,n,a){if(i&&e>gL){var o=$6e(t,n,a),s=$6e(r,n,a),l=e===z_?0:1;return o[l]!==s[l]}return Math.floor(r/e)-Math.floor(t/e)>.1}function $6e(e,t,r){var i=t.c2d(e,z_,r).split("-");return i[0]===""&&(i.unshift(),i[0]="-"+i[0]),i}});var _W=W((Hzr,J6e)=>{"use strict";var yW=sn(),kf=it(),Y6e=yi(),Dd=ji(),{hasColorscale:X6e}=bc(),Z6e=Zc(),nIt=DM(),K6e=pW(),aIt=vW(),oIt=gW(),sIt=mW();function lIt(e,t){var r=[],i=[],n=t.orientation==="h",a=Dd.getFromId(e,n?t.yaxis:t.xaxis),o=n?"y":"x",s={x:"y",y:"x"}[o],l=t[o+"calendar"],u=t.cumulative,c,f=xW(e,t,a,o),h=f[0],d=f[1],p=typeof h.size=="string",v=[],m=p?v:h,g=[],w=[],b=[],_=0,M=t.histnorm,x=t.histfunc,T=M.indexOf("density")!==-1,A,y,E;u.enabled&&T&&(M=M.replace(/ ?density$/,""),T=!1);var S=x==="max"||x==="min",C=S?null:0,k=K6e.count,D=aIt[M],F=!1,P=function(G){return a.r2c(G,0,l)},R;for(kf.isArrayOrTypedArray(t[s])&&x!=="count"&&(R=t[s],F=x==="avg",k=K6e[x]),c=P(h.start),y=P(h.end)+(c-Dd.tickIncrement(c,h.size,!1,l))/1e6;c<y&&r.length<1e6&&(A=Dd.tickIncrement(c,h.size,!1,l),r.push((c+A)/2),i.push(C),b.push([]),v.push(c),T&&g.push(1/(A-c)),F&&w.push(0),!(A<=c));)c=A;v.push(c),!p&&a.type==="date"&&(m={start:P(m.start),end:P(m.end),size:m.size}),e._fullLayout._roundFnOpts||(e._fullLayout._roundFnOpts={});var L=t["_"+o+"bingroup"],I={leftGap:1/0,rightGap:1/0};L&&(e._fullLayout._roundFnOpts[L]||(e._fullLayout._roundFnOpts[L]=I),I=e._fullLayout._roundFnOpts[L]);var B=i.length,O=!0,$=I.leftGap,Y=I.rightGap,K={};for(c=0;c<d.length;c++){var j=d[c];E=kf.findBin(j,m),E>=0&&E<B&&(_+=k(E,c,i,R,w),O&&b[E].length&&j!==d[b[E][0]]&&(O=!1),b[E].push(c),K[c]=E,$=Math.min($,j-v[E]),Y=Math.min(Y,v[E+1]-j))}I.leftGap=$,I.rightGap=Y;var q;O||(q=function(G,Q){return function(){var te=e._fullLayout._roundFnOpts[L];return sIt(te.leftGap,te.rightGap,v,a,l)(G,Q)}}),F&&(_=oIt(i,w)),D&&D(i,_,g),u.enabled&&fIt(i,u.direction,u.currentbin);var J=Math.min(r.length,i.length),U=[],V=0,X=J-1;for(c=0;c<J;c++)if(i[c]){V=c;break}for(c=J-1;c>=V;c--)if(i[c]){X=c;break}for(c=V;c<=X;c++)if(yW(r[c])&&yW(i[c])){var H={p:r[c],s:i[c],b:0};u.enabled||(H.pts=b[c],O?H.ph0=H.ph1=b[c].length?d[b[c][0]]:r[c]:(t._computePh=!0,H.ph0=q(v[c]),H.ph1=q(v[c+1],!0))),U.push(H)}return U.length===1&&(U[0].width1=Dd.tickIncrement(U[0].p,h.size,!1,l)-U[0].p),X6e(t,"marker")&&Z6e(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),X6e(t,"marker.line")&&Z6e(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),nIt(U,t),kf.isArrayOrTypedArray(t.selectedpoints)&&kf.tagSelected(U,t,K),U}function xW(e,t,r,i,n){var j;var a=i+"bins",o=e._fullLayout,s=t["_"+i+"bingroup"],l=o._histogramBinOpts[s],u=o.barmode==="overlay",c,f,h,d,p,v,m,g=function(q){return r.r2c(q,0,d)},w=function(q){return r.c2r(q,0,d)},b=r.type==="date"?function(q){return q||q===0?kf.cleanDate(q,null,d):null}:function(q){return yW(q)?Number(q):null};function _(q,J,U){J[q+"Found"]?(J[q]=b(J[q]),J[q]===null&&(J[q]=U[q])):(v[q]=J[q]=U[q],kf.nestedProperty(f[0],a+"."+q).set(U[q]))}if(t["_"+i+"autoBinFinished"])delete t["_"+i+"autoBinFinished"];else{f=l.traces;var M=[],x=!0,T=!1,A=!1;for(c=0;c<f.length;c++)if(h=f[c],h.visible){var y=l.dirs[c];p=h["_"+y+"pos0"]=r.makeCalcdata(h,y),M=kf.concat(M,p),delete h["_"+i+"autoBinFinished"],t.visible===!0&&(x?x=!1:(delete h._autoBin,h["_"+i+"autoBinFinished"]=1),Y6e.traceIs(h,"2dMap")&&(T=!0),h.type==="histogram2dcontour"&&(A=!0))}d=f[0][i+"calendar"];var E=Dd.autoBin(M,r,l.nbins,T,d,l.sizeFound&&l.size),S=f[0]._autoBin={};if(v=S[l.dirs[0]]={},A&&(l.size||(E.start=w(Dd.tickIncrement(g(E.start),E.size,!0,d))),l.end===void 0&&(E.end=w(Dd.tickIncrement(g(E.end),E.size,!1,d)))),u&&!Y6e.traceIs(t,"2dMap")&&E._dataSpan===0&&r.type!=="category"&&r.type!=="multicategory"&&t.bingroup===""&&!((j=t._input[a])!=null&&j.size)){if(n)return[E,p,!0];E=uIt(e,t,r,i,a)}m=h.cumulative||{},m.enabled&&m.currentbin!=="include"&&(m.direction==="decreasing"?E.start=w(Dd.tickIncrement(g(E.start),E.size,!0,d)):E.end=w(Dd.tickIncrement(g(E.end),E.size,!1,d))),l.size=E.size,l.sizeFound||(v.size=E.size,kf.nestedProperty(f[0],a+".size").set(E.size)),_("start",l,E),_("end",l,E)}p=t["_"+i+"pos0"],delete t["_"+i+"pos0"];var C=t._input[a]||{},k=kf.extendFlat({},l),D=l.start,F=r.r2l(C.start),P=F!==void 0;if((l.startFound||P)&&F!==r.r2l(D)){var R=P?F:kf.aggNums(Math.min,null,p),L={type:r.type==="category"||r.type==="multicategory"?"linear":r.type,r2l:r.r2l,dtick:l.size,tick0:D,calendar:d,range:[R,Dd.tickIncrement(R,l.size,!1,d)].map(r.l2r)},I=Dd.tickFirst(L);I>r.r2l(R)&&(I=Dd.tickIncrement(I,l.size,!0,d)),k.start=r.l2r(I),P||kf.nestedProperty(t,a+".start").set(k.start)}var B=l.end,O=r.r2l(C.end),$=O!==void 0;if((l.endFound||$)&&O!==r.r2l(B)){var Y=$?O:kf.aggNums(Math.max,null,p);k.end=r.l2r(Y),$||kf.nestedProperty(t,a+".start").set(k.end)}var K="autobin"+i;return t._input[K]===!1&&(t._input[a]=kf.extendFlat({},t[a]||{}),delete t._input[K],delete t[K]),[k,p]}function uIt(e,t,r,i,n){var a=e._fullLayout,o=cIt(e,t),s=!1,l=1/0,u=[t],c,f,h;for(c=0;c<o.length;c++)if(f=o[c],f===t)s=!0;else if(!s)h=a._histogramBinOpts[f["_"+i+"bingroup"]],l=Math.min(l,h.size||f[n].size);else{var d=xW(e,f,r,i,!0),p=d[0],v=d[2];f["_"+i+"autoBinFinished"]=1,f["_"+i+"pos0"]=d[1],v?u.push(f):l=Math.min(l,p.size)}var m=new Array(u.length);for(c=0;c<u.length;c++)for(var g=u[c]["_"+i+"pos0"],w=0;w<g.length;w++)if(g[w]!==void 0){m[c]=g[w];break}for(isFinite(l)||(l=kf.distinctVals(m).minDiff),c=0;c<u.length;c++){f=u[c];var b=f[i+"calendar"],_={start:r.c2r(m[c]-l/2,0,b),end:r.c2r(m[c]+l/2,0,b),size:l};f._input[n]=f[n]=_,h=a._histogramBinOpts[f["_"+i+"bingroup"]],h&&kf.extendFlat(h,_)}return t[n]}function cIt(e,t){for(var r=t.xaxis,i=t.yaxis,n=t.orientation,a=[],o=e._fullData,s=0;s<o.length;s++){var l=o[s];l.type==="histogram"&&l.visible===!0&&l.orientation===n&&l.xaxis===r&&l.yaxis===i&&a.push(l)}return a}function fIt(e,t,r){var i,n,a;function o(l){a=e[l],e[l]/=2}function s(l){n=e[l],e[l]=a+n/2,a+=n}if(r==="half")if(t==="increasing")for(o(0),i=1;i<e.length;i++)s(i);else for(o(e.length-1),i=e.length-2;i>=0;i--)s(i);else if(t==="increasing"){for(i=1;i<e.length;i++)e[i]+=e[i-1];r==="exclude"&&(e.unshift(0),e.pop())}else{for(i=e.length-2;i>=0;i--)e[i]+=e[i+1];r==="exclude"&&(e.push(0),e.shift())}}J6e.exports={calc:lIt,calcAllAutoBins:xW}});var oAe=W((jzr,aAe)=>{"use strict";var Q6e=it(),m5=ji(),eAe=pW(),hIt=vW(),dIt=gW(),pIt=mW(),tAe=_W().calcAllAutoBins;aAe.exports=function(t,r){var i=m5.getFromId(t,r.xaxis),n=m5.getFromId(t,r.yaxis),a=r.xcalendar,o=r.ycalendar,s=function(ke){return i.r2c(ke,0,a)},l=function(ke){return n.r2c(ke,0,o)},u=function(ke){return i.c2r(ke,0,a)},c=function(ke){return n.c2r(ke,0,o)},f,h,d,p,v=tAe(t,r,i,"x"),m=v[0],g=v[1],w=tAe(t,r,n,"y"),b=w[0],_=w[1],M=r._length;g.length>M&&g.splice(M,g.length-M),_.length>M&&_.splice(M,_.length-M);var x=[],T=[],A=[],y=typeof m.size=="string",E=typeof b.size=="string",S=[],C=[],k=y?S:m,D=E?C:b,F=0,P=[],R=[],L=r.histnorm,I=r.histfunc,B=L.indexOf("density")!==-1,O=I==="max"||I==="min",$=O?null:0,Y=eAe.count,K=hIt[L],j=!1,q=[],J=[],U="z"in r?r.z:"marker"in r&&Array.isArray(r.marker.color)?r.marker.color:"";U&&I!=="count"&&(j=I==="avg",Y=eAe[I]);var V=m.size,X=s(m.start),H=s(m.end)+(X-m5.tickIncrement(X,V,!1,a))/1e6;for(f=X;f<H;f=m5.tickIncrement(f,V,!1,a))T.push($),S.push(f),j&&A.push(0);S.push(f);var G=T.length,Q=(f-X)/G,te=u(X+Q/2),ce=b.size,ge=l(b.start),Ce=l(b.end)+(ge-m5.tickIncrement(ge,ce,!1,o))/1e6;for(f=ge;f<Ce;f=m5.tickIncrement(f,ce,!1,o)){x.push(T.slice()),C.push(f);var be=new Array(G);for(h=0;h<G;h++)be[h]=[];R.push(be),j&&P.push(A.slice())}C.push(f);var he=x.length,oe=(f-ge)/he,Ee=c(ge+oe/2);B&&(q=rAe(T.length,k,Q,y),J=rAe(x.length,D,oe,E)),!y&&i.type==="date"&&(k=iAe(s,k)),!E&&n.type==="date"&&(D=iAe(l,D));var ye=!0,ue=!0,ee=new Array(G),ae=new Array(he),xe=1/0,re=1/0,pe=1/0,we=1/0;for(f=0;f<M;f++){var Fe=g[f],Se=_[f];d=Q6e.findBin(Fe,k),p=Q6e.findBin(Se,D),d>=0&&d<G&&p>=0&&p<he&&(F+=Y(d,f,x[p],U,P[p]),R[p][d].push(f),ye&&(ee[d]===void 0?ee[d]=Fe:ee[d]!==Fe&&(ye=!1)),ue&&(ae[p]===void 0?ae[p]=Se:ae[p]!==Se&&(ue=!1)),xe=Math.min(xe,Fe-S[d]),re=Math.min(re,S[d+1]-Fe),pe=Math.min(pe,Se-C[p]),we=Math.min(we,C[p+1]-Se))}if(j)for(p=0;p<he;p++)F+=dIt(x[p],P[p]);if(K)for(p=0;p<he;p++)K(x[p],F,q,J[p]);return{x:g,xRanges:nAe(S,ye&&ee,xe,re,i,a),x0:te,dx:Q,y:_,yRanges:nAe(C,ue&&ae,pe,we,n,o),y0:Ee,dy:oe,z:x,pts:R}};function rAe(e,t,r,i){var n=new Array(e),a;if(i)for(a=0;a<e;a++)n[a]=1/(t[a+1]-t[a]);else{var o=1/r;for(a=0;a<e;a++)n[a]=o}return n}function iAe(e,t){return{start:e(t.start),end:e(t.end),size:t.size}}function nAe(e,t,r,i,n,a){var o,s=e.length-1,l=new Array(s),u=pIt(r,i,e,n,a);for(o=0;o<s;o++){var c=(t||[])[o];l[o]=c===void 0?[u(e[o]),u(e[o+1],!0)]:[c,c]}return l}});var mL=W(($zr,uAe)=>{"use strict";var T1=it(),sAe=Kn().BADNUM,lAe=Wp();uAe.exports=function(t,r,i,n,a,o){var s=t._length,l=r.makeCalcdata(t,n),u=i.makeCalcdata(t,a);l=lAe(t,r,n,l).vals,u=lAe(t,i,a,u).vals;var c=t.text,f=c!==void 0&&T1.isArray1D(c),h=t.hovertext,d=h!==void 0&&T1.isArray1D(h),p,v,m=T1.distinctVals(l),g=m.vals,w=T1.distinctVals(u),b=w.vals,_=[],M,x,T=b.length,A=g.length;for(p=0;p<o.length;p++)_[p]=T1.init2dArray(T,A);f&&(M=T1.init2dArray(T,A)),d&&(x=T1.init2dArray(T,A));var y=T1.init2dArray(T,A);for(p=0;p<s;p++)if(l[p]!==sAe&&u[p]!==sAe){var E=T1.findBin(l[p]+m.minDiff/2,g),S=T1.findBin(u[p]+w.minDiff/2,b);for(v=0;v<o.length;v++){var C=o[v],k=t[C],D=_[v];D[S][E]=k[p],y[S][E]=p}f&&(M[S][E]=c[p]),d&&(x[S][E]=h[p])}for(t["_"+n]=g,t["_"+a]=b,v=0;v<o.length;v++)t["_"+o[v]]=_[v];f&&(t._text=M),d&&(t._hovertext=x),r&&r.type==="category"&&(t["_"+n+"CategoryMap"]=g.map(function(F){return r._categories[F]})),i&&i.type==="category"&&(t["_"+a+"CategoryMap"]=b.map(function(F){return i._categories[F]})),t._after2before=y}});var xL=W((Wzr,cAe)=>{"use strict";var vIt=sn(),gIt=it(),yL=Kn().BADNUM;cAe.exports=function(t,r,i,n){var a,o,s,l,u,c;function f(g){if(vIt(g))return+g}if(r&&r.transpose){for(a=0,u=0;u<t.length;u++)a=Math.max(a,t[u].length);if(a===0)return!1;s=function(g){return g.length},l=function(g,w,b){return(g[b]||[])[w]}}else a=t.length,s=function(g,w){return g[w].length},l=function(g,w,b){return(g[w]||[])[b]};var h=function(g,w,b){return w===yL||b===yL?yL:l(g,w,b)};function d(g){if(r&&r.type!=="carpet"&&r.type!=="contourcarpet"&&g&&g.type==="category"&&r["_"+g._id.charAt(0)].length){var w=g._id.charAt(0),b={},_=r["_"+w+"CategoryMap"]||r[w];for(u=0;u<_.length;u++)b[_[u]]=u;return function(M){var x=b[g._categories[M]];return x+1?x:yL}}else return gIt.identity}var p=d(i),v=d(n);n&&n.type==="category"&&(a=n._categories.length);var m=new Array(a);for(u=0;u<a;u++)for(i&&i.type==="category"?o=i._categories.length:o=s(t,u),m[u]=new Array(o),c=0;c<o;c++)m[u][c]=f(h(t,v(u),p(c)));return m}});var _L=W((Yzr,dAe)=>{"use strict";var mIt=it(),fAe=.01,yIt=[[-1,0],[1,0],[0,-1],[0,1]];function xIt(e){return .5-.25*Math.min(1,e*.5)}dAe.exports=function(t,r){var i=1,n;for(hAe(t,r),n=0;n<r.length&&!(r[n][2]<4);n++);for(r=r.slice(n),n=0;n<100&&i>fAe;n++)i=hAe(t,r,xIt(i));return i>fAe&&mIt.log("interp2d didn't converge quickly",i),t};function hAe(e,t,r){var i=0,n,a,o,s,l,u,c,f,h,d,p,v,m;for(s=0;s<t.length;s++){for(n=t[s],a=n[0],o=n[1],p=e[a][o],d=0,h=0,l=0;l<4;l++)u=yIt[l],c=e[a+u[0]],c&&(f=c[o+u[1]],f!==void 0&&(d===0?v=m=f:(v=Math.min(v,f),m=Math.max(m,f)),h++,d+=f));if(h===0)throw"iterateInterp2d order is wrong: no defined neighbors";e[a][o]=d/h,p===void 0?h<4&&(i=1):(e[a][o]=(1+r)*e[a][o]-r*p,m>v&&(i=Math.max(i,Math.abs(e[a][o]-p)/(m-v))))}return i}});var bL=W((Xzr,pAe)=>{"use strict";var _It=it().maxRowLength;pAe.exports=function(t){var r=[],i={},n=[],a=t[0],o=[],s=[0,0,0],l=_It(t),u,c,f,h,d,p,v,m;for(c=0;c<t.length;c++)for(u=o,o=a,a=t[c+1]||[],f=0;f<l;f++)o[f]===void 0&&(p=(o[f-1]!==void 0?1:0)+(o[f+1]!==void 0?1:0)+(u[f]!==void 0?1:0)+(a[f]!==void 0?1:0),p?(c===0&&p++,f===0&&p++,c===t.length-1&&p++,f===o.length-1&&p++,p<4&&(i[[c,f]]=[c,f,p]),r.push([c,f,p])):n.push([c,f]));for(;n.length;){for(v={},m=!1,d=n.length-1;d>=0;d--)h=n[d],c=h[0],f=h[1],p=((i[[c-1,f]]||s)[2]+(i[[c+1,f]]||s)[2]+(i[[c,f-1]]||s)[2]+(i[[c,f+1]]||s)[2])/20,p&&(v[h]=[c,f,p],n.splice(d,1),m=!0);if(!m)throw"findEmpties iterated with no new neighbors";for(h in v)i[h]=v[h],r.push(v[h])}return r.sort(function(g,w){return w[2]-g[2]})}});var bW=W((Zzr,mAe)=>{"use strict";var vAe=yi(),gAe=it().isArrayOrTypedArray;mAe.exports=function(t,r,i,n,a,o){var s=[],l=vAe.traceIs(t,"contour"),u=vAe.traceIs(t,"histogram"),c,f,h,d=gAe(r)&&r.length>1;if(d&&!u&&o.type!=="category"){var p=r.length;if(p<=a){if(l)s=Array.from(r).slice(0,a);else if(a===1)o.type==="log"?s=[.5*r[0],2*r[0]]:s=[r[0]-.5,r[0]+.5];else if(o.type==="log"){for(s=[Math.pow(r[0],1.5)/Math.pow(r[1],.5)],h=1;h<p;h++)s.push(Math.sqrt(r[h-1]*r[h]));s.push(Math.pow(r[p-1],1.5)/Math.pow(r[p-2],.5))}else{for(s=[1.5*r[0]-.5*r[1]],h=1;h<p;h++)s.push((r[h-1]+r[h])*.5);s.push(1.5*r[p-1]-.5*r[p-2])}if(p<a){var v=s[s.length-1],m;if(o.type==="log")for(m=v/s[s.length-2],h=p;h<a;h++)v*=m,s.push(v);else for(m=v-s[s.length-2],h=p;h<a;h++)v+=m,s.push(v)}}else return l?r.slice(0,a):r.slice(0,a+1)}else{var g=t[o._id.charAt(0)+"calendar"];if(u)c=o.r2c(i,0,g);else if(gAe(r)&&r.length===1)c=r[0];else if(i===void 0)c=0;else{var w=o.type==="log"?o.d2c:o.r2c;c=w(i,0,g)}for(f=n||1,h=l?0:-.5;h<a;h++)s.push(c+f*h)}return s}});var AL=W((Kzr,bAe)=>{"use strict";var yAe=yi(),wW=it(),wL=ji(),xAe=Wp(),bIt=oAe(),wIt=Zc(),TIt=mL(),AIt=xL(),MIt=_L(),SIt=bL(),TL=bW(),TW=Kn().BADNUM;bAe.exports=function(t,r){var i=wL.getFromId(t,r.xaxis||"x"),n=wL.getFromId(t,r.yaxis||"y"),a=yAe.traceIs(r,"contour"),o=yAe.traceIs(r,"histogram"),s=a?"best":r.zsmooth,l,u,c,f,h,d,p,v,m,g,w;if(i._minDtick=0,n._minDtick=0,o)w=bIt(t,r),f=w.orig_x,l=w.x,u=w.x0,c=w.dx,v=w.orig_y,h=w.y,d=w.y0,p=w.dy,m=w.z;else{var b=r.z;wW.isArray1D(b)?(TIt(r,i,n,"x","y",["z"]),l=r._x,h=r._y,b=r._z):(f=r.x?i.makeCalcdata(r,"x"):[],v=r.y?n.makeCalcdata(r,"y"):[],l=xAe(r,i,"x",f).vals,h=xAe(r,n,"y",v).vals,r._x=l,r._y=h),u=r.x0,c=r.dx,d=r.y0,p=r.dy,m=AIt(b,r,i,n)}(i.rangebreaks||n.rangebreaks)&&(m=EIt(l,h,m),o||(l=_Ae(l),h=_Ae(h),r._x=l,r._y=h)),!o&&(a||r.connectgaps)&&(r._emptypoints=SIt(m),MIt(m,r._emptypoints));function _(k){s=r._input.zsmooth=r.zsmooth=!1,wW.warn('cannot use zsmooth: "fast": '+k)}function M(k){if(k.length>1){var D=(k[k.length-1]-k[0])/(k.length-1),F=Math.abs(D/100);for(g=0;g<k.length-1;g++)if(Math.abs(k[g+1]-k[g]-D)>F)return!1}return!0}r._islinear=!1,i.type==="log"||n.type==="log"?s==="fast"&&_("log axis found"):M(l)?M(h)?r._islinear=!0:s==="fast"&&_("y scale is not linear"):s==="fast"&&_("x scale is not linear");var x=wW.maxRowLength(m),T=r.xtype==="scaled"?"":l,A=TL(r,T,u,c,x,i),y=r.ytype==="scaled"?"":h,E=TL(r,y,d,p,m.length,n);r._extremes[i._id]=wL.findExtremes(i,A),r._extremes[n._id]=wL.findExtremes(n,E);var S={x:A,y:E,z:m,text:r._text||r.text,hovertext:r._hovertext||r.hovertext};if(r.xperiodalignment&&f&&(S.orig_x=f),r.yperiodalignment&&v&&(S.orig_y=v),T&&T.length===A.length-1&&(S.xCenter=T),y&&y.length===E.length-1&&(S.yCenter=y),o&&(S.xRanges=w.xRanges,S.yRanges=w.yRanges,S.pts=w.pts),a||wIt(t,r,{vals:m,cLetter:"z"}),a&&r.contours&&r.contours.coloring==="heatmap"){var C={type:r.type==="contour"?"heatmap":"histogram2d",xcalendar:r.xcalendar,ycalendar:r.ycalendar};S.xfill=TL(C,T,u,c,x,i),S.yfill=TL(C,y,d,p,m.length,n)}return[S]};function _Ae(e){for(var t=[],r=e.length,i=0;i<r;i++){var n=e[i];n!==TW&&t.push(n)}return t}function EIt(e,t,r){for(var i=[],n=-1,a=0;a<r.length;a++)if(t[a]!==TW){n++,i[n]=[];for(var o=0;o<r[a].length;o++)e[o]!==TW&&i[n].push(r[a][o])}return i}});var SL=W(ML=>{"use strict";ML.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"]];ML.STYLE=ML.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")});var MW=W((Qzr,TAe)=>{"use strict";var wAe=SL(),kIt=Ji(),AW=it(),y5=null;function CIt(){if(y5!==null)return y5;y5=!1;var e=AW.isSafari()||AW.isMacWKWebView()||AW.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(wAe.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")y5=t.some(function(o){return r.apply(null,o)});else{var i=kIt.tester.append("image").attr("style",wAe.STYLE),n=window.getComputedStyle(i.node()),a=n.imageRendering;y5=t.some(function(o){var s=o[1];return a===s||a===s.toLowerCase()}),i.remove()}}return y5}TAe.exports=CIt});var EL=W((eBr,PAe)=>{"use strict";var AAe=vi(),DIt=yi(),FIt=Ji(),LIt=ji(),Fd=it(),MAe=uo(),PIt=mF(),SAe=ni(),IIt=Jo().extractOpts,RIt=Jo().makeColorScaleFuncFromTrace,zIt=sd(),BIt=Hl(),SW=BIt.LINE_SPACING,qIt=MW(),OIt=SL().STYLE,FAe="heatmap-label";function LAe(e){return e.selectAll("g."+FAe)}function EAe(e){LAe(e).remove()}PAe.exports=function(e,t,r,i){var n=t.xaxis,a=t.yaxis;Fd.makeTraceGroups(i,r,"hm").each(function(o){var s=AAe.select(this),l=o[0],u=l.trace,c=u.xgap||0,f=u.ygap||0,h=l.z,d=l.x,p=l.y,v=l.xCenter,m=l.yCenter,g=DIt.traceIs(u,"contour"),w=g?"best":u.zsmooth,b=h.length,_=Fd.maxRowLength(h),M=!1,x=!1,T,A,y,E,S,C,k,D;for(C=0;T===void 0&&C<d.length-1;)T=n.c2p(d[C]),C++;for(C=d.length-1;A===void 0&&C>0;)A=n.c2p(d[C]),C--;for(A<T&&(y=A,A=T,T=y,M=!0),C=0;E===void 0&&C<p.length-1;)E=a.c2p(p[C]),C++;for(C=p.length-1;S===void 0&&C>0;)S=a.c2p(p[C]),C--;S<E&&(y=E,E=S,S=y,x=!0),g&&(v=d,m=p,d=l.xfill,p=l.yfill);var F="default";if(w?F=w==="best"?"smooth":"fast":u._islinear&&c===0&&f===0&&qIt()&&(F="fast"),F!=="fast"){var P=w==="best"?0:.5;T=Math.max(-P*n._length,T),A=Math.min((1+P)*n._length,A),E=Math.max(-P*a._length,E),S=Math.min((1+P)*a._length,S)}var R=Math.round(A-T),L=Math.round(S-E),I=T>=n._length||A<=0||E>=a._length||S<=0;if(I){var B=s.selectAll("image").data([]);B.exit().remove(),EAe(s);return}var O,$;F==="fast"?(O=_,$=b):(O=R,$=L);var Y=document.createElement("canvas");Y.width=O,Y.height=$;var K=Y.getContext("2d",{willReadFrequently:!0}),j=RIt(u,{noNumericCheck:!0,returnArray:!0}),q,J;F==="fast"?(q=M?function(dn){return _-1-dn}:Fd.identity,J=x?function(dn){return b-1-dn}:Fd.identity):(q=function(dn){return Fd.constrain(Math.round(n.c2p(d[dn])-T),0,R)},J=function(dn){return Fd.constrain(Math.round(a.c2p(p[dn])-E),0,L)});var U=J(0),V=[U,U],X=M?0:1,H=x?0:1,G=0,Q=0,te=0,ce=0,ge,Ce,be,he,oe;function Ee(dn,Vn=0){if(dn===void 0)return[0,0,0,0];var ra=j(dn);return ra[0]=Math.round(ra[0]),ra[1]=Math.round(ra[1]),ra[2]=Math.round(ra[2]),G+=Vn,Q+=ra[0]*Vn,te+=ra[1]*Vn,ce+=ra[2]*Vn,ra}function ye(dn,Vn,ra,ds){var mo=dn[ra.bin0];if(mo===void 0)return Ee(void 0,1);var Rs=dn[ra.bin1],ho=Vn[ra.bin0],ka=Vn[ra.bin1],ao=Rs-mo||0,zs=ho-mo||0,_a;return Rs===void 0?ka===void 0?_a=0:ho===void 0?_a=2*(ka-mo):_a=(2*ka-ho-mo)*2/3:ka===void 0?ho===void 0?_a=0:_a=(2*mo-Rs-ho)*2/3:ho===void 0?_a=(2*ka-Rs-mo)*2/3:_a=ka+mo-Rs-ho,Ee(mo+ra.frac*ao+ds.frac*(zs+ra.frac*_a))}if(F!=="default"){var ue=0,ee;try{ee=new Uint8Array(O*$*4)}catch(dn){ee=new Array(O*$*4)}if(F==="smooth"){var ae=v||d,xe=m||p,re=new Array(ae.length),pe=new Array(xe.length),we=new Array(R),Fe=v?CAe:kAe,Se=m?CAe:kAe,ke,_e,Ie;for(C=0;C<ae.length;C++)re[C]=Math.round(n.c2p(ae[C])-T);for(C=0;C<xe.length;C++)pe[C]=Math.round(a.c2p(xe[C])-E);for(C=0;C<R;C++)we[C]=Fe(C,re);for(k=0;k<L;k++)for(ke=Se(k,pe),_e=h[ke.bin0],Ie=h[ke.bin1],C=0;C<R;C++,ue+=4)oe=ye(_e,Ie,we[C],ke),DAe(ee,ue,oe)}else for(k=0;k<b;k++)for(he=h[k],V=J(k),C=0;C<_;C++)oe=Ee(he[C],1),ue=(V*_+q(C))*4,DAe(ee,ue,oe);var Oe=K.createImageData(O,$);try{Oe.data.set(ee)}catch(dn){var Qe=Oe.data,et=Qe.length;for(k=0;k<et;k++)Qe[k]=ee[k]}K.putImageData(Oe,0,0)}else{var _t=Math.floor(c/2),ut=Math.floor(f/2);for(k=0;k<b;k++)if(he=h[k],V.reverse(),V[H]=J(k+1),!(V[0]===V[1]||V[0]===void 0||V[1]===void 0))for(Ce=q(0),ge=[Ce,Ce],C=0;C<_;C++)ge.reverse(),ge[X]=q(C+1),!(ge[0]===ge[1]||ge[0]===void 0||ge[1]===void 0)&&(be=he[C],oe=Ee(be,(ge[1]-ge[0])*(V[1]-V[0])),K.fillStyle="rgba("+oe.join(",")+")",K.fillRect(ge[0]+_t,V[0]+ut,ge[1]-ge[0]-c,V[1]-V[0]-f))}if(G){Q=Math.round(Q/G),te=Math.round(te/G),ce=Math.round(ce/G);let dn=`rgb(${Q}, ${te}, ${ce})`;e._hmpixcount=(e._hmpixcount||0)+G,e._hmlumcount=(e._hmlumcount||0)+G*SAe.luminosity(dn)}var vt=s.selectAll("image").data(o);vt.enter().append("svg:image").attr({xmlns:zIt.svg,preserveAspectRatio:"none"}),vt.attr({height:L,width:R,x:T,y:E,"xlink:href":Y.toDataURL("image/png")}),F==="fast"&&!w&&vt.attr("style",OIt),EAe(s);var Xe=u.texttemplate;if(Xe){var mt=IIt(u),bt={type:"linear",range:[mt.min,mt.max],_separators:n._separators,_numFormat:n._numFormat},Ne=u.type==="histogram2dcontour",Ue=u.type==="contour",Ge=Ue?1:0,je=Ue?b-1:b,Re=Ue?1:0,Ve=Ue?_-1:_,ct=[];for(C=Ge;C<je;C++){var Tt;if(Ue)Tt=l.y[C];else if(Ne){if(C===0||C===b-1)continue;Tt=l.y[C]}else if(l.yCenter)Tt=l.yCenter[C];else{if(C+1===b&&l.y[C+1]===void 0)continue;Tt=(l.y[C]+l.y[C+1])/2}var Xt=Math.round(a.c2p(Tt));if(!(0>Xt||Xt>a._length))for(k=Re;k<Ve;k++){var Vt;if(Ue)Vt=l.x[k];else if(Ne){if(k===0||k===_-1)continue;Vt=l.x[k]}else if(l.xCenter)Vt=l.xCenter[k];else{if(k+1===_&&l.x[k+1]===void 0)continue;Vt=(l.x[k]+l.x[k+1])/2}var lr=Math.round(n.c2p(Vt));if(!(0>lr||lr>n._length)){var ur=PIt({x:Vt,y:Tt},u,e._fullLayout);ur.x=Vt,ur.y=Tt;var Bt=l.z[C][k];Bt===void 0?(ur.z="",ur.zLabel=""):(ur.z=Bt,ur.zLabel=LIt.tickText(bt,Bt,"hover").text);var Zt=l.text&&l.text[C]&&l.text[C][k];(Zt===void 0||Zt===!1)&&(Zt=""),ur.text=Zt;var kr=Fd.texttemplateString({data:[ur,u._meta],fallback:u.texttemplatefallback,labels:ur,locale:e._fullLayout._d3locale,template:Xe});if(kr){var $e=kr.split("<br>"),tt=$e.length,st=0;for(D=0;D<tt;D++)st=Math.max(st,$e[D].length);ct.push({l:tt,c:st,t:kr,x:lr,y:Xt,z:Bt})}}}}var xt=u.textfont,Je=xt.size,Ct=e._fullLayout.font.size;if(!Je||Je==="auto"){var ir=1/0,hr=1/0,Ur=0,si=0;for(D=0;D<ct.length;D++){var ei=ct[D];if(Ur=Math.max(Ur,ei.l),si=Math.max(si,ei.c),D<ct.length-1){var Lr=ct[D+1],$i=Math.abs(Lr.x-ei.x),Tn=Math.abs(Lr.y-ei.y);$i&&(ir=Math.min(ir,$i)),Tn&&(hr=Math.min(hr,Tn))}}!isFinite(ir)||!isFinite(hr)?Je=Ct:(ir-=c,hr-=f,ir/=si,hr/=Ur,ir/=SW/2,hr/=SW,Je=Math.min(Math.floor(ir),Math.floor(hr),Ct))}if(Je<=0||!isFinite(Je))return;var hn=function(dn){return dn.x},ta=function(dn){return dn.y-Je*(dn.l*SW/2-1)},ca=LAe(s).data(ct);ca.enter().append("g").classed(FAe,1).append("text").attr("text-anchor","middle").each(function(dn){var Vn=AAe.select(this),ra=xt.color;(!ra||ra==="auto")&&(ra=SAe.contrast(dn.z===void 0?e._fullLayout.plot_bgcolor:`rgba(${j(dn.z).map(Math.round).join()})`)),Vn.attr("data-notex",1).call(MAe.positionText,hn(dn),ta(dn)).call(FIt.font,{family:xt.family,size:Je,color:ra,weight:xt.weight,style:xt.style,variant:xt.variant,textcase:xt.textcase,lineposition:xt.lineposition,shadow:xt.shadow}).text(dn.t).call(MAe.convertToTspans,e)})}})};function kAe(e,t){var r=t.length-2,i=Fd.constrain(Fd.findBin(e,t),0,r),n=t[i],a=t[i+1],o=Fd.constrain(i+(e-n)/(a-n)-.5,0,r),s=Math.round(o),l=Math.abs(o-s);return!o||o===r||!l?{bin0:s,bin1:s,frac:0}:{bin0:s,frac:l,bin1:Math.round(s+l/(o-s))}}function CAe(e,t){var r=t.length-1,i=Fd.constrain(Fd.findBin(e,t),0,r),n=t[i],a=t[i+1],o=(e-n)/(a-n)||0;return o<=0?{bin0:i,bin1:i,frac:0}:o<.5?{bin0:i,bin1:i+1,frac:o}:{bin0:i+1,bin1:i,frac:1-o}}function DAe(e,t,r){e[t]=r[0],e[t+1]=r[1],e[t+2]=r[2],e[t+3]=Math.round(r[3]*255)}});var x5=W((tBr,IAe)=>{"use strict";IAe.exports={min:"zmin",max:"zmax"}});var kL=W((rBr,RAe)=>{"use strict";var NIt=vi();RAe.exports=function(t){NIt.select(t).selectAll(".hm image").style("opacity",function(r){return r.trace.opacity})}});var DL=W((iBr,BAe)=>{"use strict";var zAe=Ds(),OM=it(),CL=OM.isArrayOrTypedArray,UIt=ji(),VIt=Jo().extractOpts;BAe.exports=function(t,r,i,n,a){a||(a={});var o=a.isContour,s=t.cd[0],l=s.trace,u=t.xa,c=t.ya,f=s.x,h=s.y,d=s.z,p=s.xCenter,v=s.yCenter,m=s.zmask,g=l.zhoverformat,w=f,b=h,_,M,x,T;if(t.index!==!1){try{x=Math.round(t.index[1]),T=Math.round(t.index[0])}catch(B){OM.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index);return}if(x<0||x>=d[0].length||T<0||T>d.length)return}else{if(zAe.inbox(r-f[0],r-f[f.length-1],0)>0||zAe.inbox(i-h[0],i-h[h.length-1],0)>0)return;if(o){var A;for(w=[2*f[0]-f[1]],A=1;A<f.length;A++)w.push((f[A]+f[A-1])/2);for(w.push([2*f[f.length-1]-f[f.length-2]]),b=[2*h[0]-h[1]],A=1;A<h.length;A++)b.push((h[A]+h[A-1])/2);b.push([2*h[h.length-1]-h[h.length-2]])}x=Math.max(0,Math.min(w.length-2,OM.findBin(r,w))),T=Math.max(0,Math.min(b.length-2,OM.findBin(i,b)))}var y=u.c2p(f[x]),E=u.c2p(f[x+1]),S=c.c2p(h[T]),C=c.c2p(h[T+1]),k,D;o?(k=s.orig_x||f,D=s.orig_y||h,E=y,_=k[x],C=S,M=D[T]):(k=s.orig_x||p||f,D=s.orig_y||v||h,_=p?k[x]:(k[x]+k[x+1])/2,M=v?D[T]:(D[T]+D[T+1])/2,u&&u.type==="category"&&(_=f[x]),c&&c.type==="category"&&(M=h[T]),l.zsmooth&&(y=E=u.c2p(_),S=C=c.c2p(M)));var F=d[T][x];if(m&&!m[T][x]&&(F=void 0),!(F===void 0&&!l.hoverongaps)){var P;CL(s.hovertext)&&CL(s.hovertext[T])?P=s.hovertext[T][x]:CL(s.text)&&CL(s.text[T])&&(P=s.text[T][x]);var R=VIt(l),L={type:"linear",range:[R.min,R.max],hoverformat:g,_separators:u._separators,_numFormat:u._numFormat},I=UIt.tickText(L,F,"hover").text;return[OM.extendFlat(t,{index:l._after2before?l._after2before[T][x]:[T,x],distance:t.maxHoverDistance,spikeDistance:t.maxSpikeDistance,x0:y,x1:E,y0:S,y1:C,xLabelVal:_,yLabelVal:M,zLabelVal:F,zLabel:I,text:P})]}}});var OAe=W((nBr,qAe)=>{"use strict";qAe.exports={attributes:p5(),supplyDefaults:z6e(),calc:AL(),plot:EL(),colorbar:x5(),style:kL(),hoverPoints:DL(),moduleType:"trace",name:"heatmap",basePlotModule:dl(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var UAe=W((aBr,NAe)=>{"use strict";NAe.exports=OAe()});var EW=W((oBr,VAe)=>{"use strict";VAe.exports=function(t,r){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var HAe=W((sBr,GAe)=>{"use strict";GAe.exports={eventDataKeys:["binNumber"]}});var FL=W((lBr,YAe)=>{"use strict";var Vh=w1(),jAe=_s().axisHoverFormat,{hovertemplateAttrs:GIt,texttemplateAttrs:HIt,templatefallbackAttrs:$Ae}=Ga(),kW=Ho(),WAe=EW(),jIt=HAe(),CW=tn().extendFlat;YAe.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:jAe("x"),yhoverformat:jAe("y"),text:CW({},Vh.text,{}),hovertext:CW({},Vh.hovertext,{}),orientation:Vh.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:WAe("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:WAe("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:GIt({},{keys:jIt.eventDataKeys}),hovertemplatefallback:$Ae(),texttemplate:HIt({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:$Ae({editType:"plot"}),textposition:CW({},Vh.textposition,{arrayOk:!1}),textfont:kW({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:kW({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:kW({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:Vh.insidetextanchor,textangle:Vh.textangle,cliponaxis:Vh.cliponaxis,constraintext:Vh.constraintext,marker:Vh.marker,offsetgroup:Vh.offsetgroup,alignmentgroup:Vh.alignmentgroup,selected:Vh.selected,unselected:Vh.unselected,zorder:Vh.zorder}});var JAe=W((uBr,KAe)=>{"use strict";var XAe=yi(),NM=it(),ZAe=ni(),$It=E0().handleText,WIt=rL(),YIt=FL();KAe.exports=function(t,r,i,n){function a(w,b){return NM.coerce(t,r,YIt,w,b)}var o=a("x"),s=a("y"),l=a("cumulative.enabled");l&&(a("cumulative.direction"),a("cumulative.currentbin")),a("text");var u=a("textposition");$It(t,r,n,a,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat");var c=a("orientation",s&&!o?"h":"v"),f=c==="v"?"x":"y",h=c==="v"?"y":"x",d=o&&s?Math.min(NM.minRowLength(o)&&NM.minRowLength(s)):NM.minRowLength(r[f]||[]);if(!d){r.visible=!1;return}r._length=d;var p=XAe.getComponentMethod("calendars","handleTraceDefaults");p(t,r,["x","y"],n);var v=r[h];v&&a("histfunc"),a("histnorm"),a("autobin"+f),WIt(t,r,a,i,n),NM.coerceSelectionMarkerOpacity(r,a);var m=(r.marker.line||{}).color,g=XAe.getComponentMethod("errorbars","supplyDefaults");g(t,r,m||ZAe.defaultLine,{axis:"y"}),g(t,r,m||ZAe.defaultLine,{axis:"x",inherit:"y"}),a("zorder")}});var PL=W((cBr,tMe)=>{"use strict";var UM=it(),XIt=Cs(),LL=yi().traceIs,ZIt=__(),KIt=E0().validateCornerradius,QAe=UM.nestedProperty,DW=v_().getAxisGroup,eMe=[{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"}],JIt=["x","y"];tMe.exports=function(t,r){var i=r._histogramBinOpts={},n=[],a={},o=[],s,l,u,c,f,h,d;function p(F,P){return UM.coerce(s._input,s,s._module.attributes,F,P)}function v(F){return F.orientation==="v"?"x":"y"}function m(F,P){var R=XIt.getFromTrace({_fullLayout:r},F,P);return R.type}function g(F,P,R){var L=F.uid+"__"+R;P||(P=L);var I=m(F,R),B=F[R+"calendar"]||"",O=i[P],$=!0;O&&(I===O.axType&&B===O.calendar?($=!1,O.traces.push(F),O.dirs.push(R)):(P=L,I!==O.axType&&UM.warn(["Attempted to group the bins of trace",F.index,"set on a","type:"+I,"axis","with bins on","type:"+O.axType,"axis."].join(" ")),B!==O.calendar&&UM.warn(["Attempted to group the bins of trace",F.index,"set with a",B,"calendar","with bins",O.calendar?"on a "+O.calendar+" calendar":"w/o a set calendar"].join(" ")))),$&&(i[P]={traces:[F],dirs:[R],axType:I,calendar:F[R+"calendar"]||""}),F["_"+R+"bingroup"]=P}for(f=0;f<t.length;f++)if(s=t[f],LL(s,"histogram")){if(n.push(s),delete s._xautoBinFinished,delete s._yautoBinFinished,s.type==="histogram"){var w=p("marker.cornerradius",r.barcornerradius);s.marker&&(s.marker.cornerradius=KIt(w))}LL(s,"2dMap")||ZIt(s._input,s,r,p,r.barmode)}var b=r._alignmentOpts||{};for(f=0;f<n.length;f++){if(s=n[f],u="",!LL(s,"2dMap")){if(c=v(s),r.barmode==="group"&&s.alignmentgroup){var _=s[c+"axis"],M=DW(r,_)+s.orientation;(b[M]||{})[s.alignmentgroup]&&(u=M)}!u&&r.barmode!=="overlay"&&(u=DW(r,s.xaxis)+DW(r,s.yaxis)+v(s))}u?(a[u]||(a[u]=[]),a[u].push(s)):o.push(s)}for(u in a){if(l=a[u],l.length===1){o.push(l[0]);continue}var x=!1;for(l.length&&(s=l[0],x=p("bingroup")),u=x||u,f=0;f<l.length;f++){s=l[f];var T=s._input.bingroup;T&&T!==u&&UM.warn(["Trace",s.index,"must match","within bingroup",u+".","Ignoring its bingroup:",T,"setting."].join(" ")),s.bingroup=u,g(s,u,v(s))}}for(f=0;f<o.length;f++){s=o[f];var A=p("bingroup");if(LL(s,"2dMap"))for(d=0;d<2;d++){c=JIt[d];var y=p(c+"bingroup",A?A+"__"+c:null);g(s,y,c)}else g(s,A,v(s))}for(u in i){var E=i[u];for(l=E.traces,h=0;h<eMe.length;h++){var S=eMe[h],C=S.name,k,D;if(!(C==="nbins"&&E.sizeFound)){for(f=0;f<l.length;f++){if(s=l[f],c=E.dirs[f],k=S.aStr[c],QAe(s._input,k).get()!==void 0){E[C]=p(k),E[C+"Found"]=!0;break}D=(s._autoBin||{})[c]||{},D[C]&&QAe(s,k).set(D[C])}if(C==="start"||C==="end")for(;f<l.length;f++)s=l[f],s["_"+c+"bingroup"]&&(D=(s._autoBin||{})[c]||{},p(k,D[C]));C==="nbins"&&!E.sizeFound&&!E.nbinsFound&&(s=l[0],E[C]=p(k))}}}}});var iMe=W((fBr,rMe)=>{"use strict";var QIt=c5().hoverPoints,eRt=ji().hoverLabelText;rMe.exports=function(t,r,i,n,a){var o=QIt(t,r,i,n,a);if(o){t=o[0];var s=t.cd[t.index],l=t.cd[0].trace;if(!l.cumulative.enabled){var u=l.orientation==="h"?"y":"x";t[u+"Label"]=eRt(t[u+"a"],[s.ph0,s.ph1],l[u+"hoverformat"])}return o}}});var FW=W((hBr,nMe)=>{"use strict";nMe.exports=function(t,r,i,n,a){if(t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"zLabelVal"in r&&(t.z=r.zLabelVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),!(i.cumulative||{}).enabled){var o=Array.isArray(a)?n[0].pts[a[0]][a[1]]:n[a].pts;t.pointNumbers=o,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex,t.pointIndices=o}return t}});var oMe=W((dBr,aMe)=>{"use strict";aMe.exports={attributes:FL(),layoutAttributes:tL(),supplyDefaults:JAe(),crossTraceDefaults:PL(),supplyLayoutDefaults:K$(),calc:_W().calc,crossTraceCalc:b_().crossTraceCalc,plot:I_().plot,layerName:"barlayer",style:Ed().style,styleOnSelect:Ed().styleOnSelect,colorbar:Ac(),hoverPoints:iMe(),selectPoints:f5(),eventData:FW(),moduleType:"trace",name:"histogram",basePlotModule:dl(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var lMe=W((pBr,sMe)=>{"use strict";sMe.exports=oMe()});var RL=W((vBr,fMe)=>{"use strict";var iv=FL(),uMe=EW(),IL=p5(),tRt=Wa(),LW=_s().axisHoverFormat,{hovertemplateAttrs:rRt,texttemplateAttrs:iRt,templatefallbackAttrs:cMe}=Ga(),nRt=Eo(),VM=tn().extendFlat;fMe.exports=VM({x:iv.x,y:iv.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:iv.histnorm,histfunc:iv.histfunc,nbinsx:iv.nbinsx,xbins:uMe("x"),nbinsy:iv.nbinsy,ybins:uMe("y"),autobinx:iv.autobinx,autobiny:iv.autobiny,bingroup:VM({},iv.bingroup,{}),xbingroup:VM({},iv.bingroup,{}),ybingroup:VM({},iv.bingroup,{}),xgap:IL.xgap,ygap:IL.ygap,zsmooth:IL.zsmooth,xhoverformat:LW("x"),yhoverformat:LW("y"),zhoverformat:LW("z",1),hovertemplate:rRt({},{keys:["z"]}),hovertemplatefallback:cMe(),texttemplate:iRt({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:cMe({editType:"plot"}),textfont:IL.textfont,showlegend:VM({},tRt.showlegend,{dflt:!1})},nRt("",{cLetter:"z",autoColorDflt:!1}))});var PW=W((gBr,dMe)=>{"use strict";var aRt=yi(),hMe=it();dMe.exports=function(t,r,i,n){var a=i("x"),o=i("y"),s=hMe.minRowLength(a),l=hMe.minRowLength(o);if(!s||!l){r.visible=!1;return}r._length=Math.min(s,l);var u=aRt.getComponentMethod("calendars","handleTraceDefaults");u(t,r,["x","y"],n);var c=i("z")||i("marker.color");c&&i("histfunc"),i("histnorm"),i("autobinx"),i("autobiny")}});var vMe=W((mBr,pMe)=>{"use strict";var oRt=it(),sRt=PW(),lRt=dW(),uRt=Fu(),cRt=qM(),fRt=RL();pMe.exports=function(t,r,i,n){function a(o,s){return oRt.coerce(t,r,fRt,o,s)}sRt(t,r,a,n),r.visible!==!1&&(lRt(t,r,a,n),uRt(t,r,n,a,{prefix:"",cLetter:"z"}),a("hovertemplate"),a("hovertemplatefallback"),cRt(a,n),a("xhoverformat"),a("yhoverformat"))}});var yMe=W((yBr,mMe)=>{"use strict";var hRt=DL(),gMe=ji().hoverLabelText;mMe.exports=function(t,r,i,n,a){var o=hRt(t,r,i,n,a);if(o){t=o[0];var s=t.index,l=s[0],u=s[1],c=t.cd[0],f=c.trace,h=c.xRanges[u],d=c.yRanges[l];return t.xLabel=gMe(t.xa,[h[0],h[1]],f.xhoverformat),t.yLabel=gMe(t.ya,[d[0],d[1]],f.yhoverformat),o}}});var _Me=W((xBr,xMe)=>{"use strict";xMe.exports={attributes:RL(),supplyDefaults:vMe(),crossTraceDefaults:PL(),calc:AL(),plot:EL(),layerName:"heatmaplayer",colorbar:x5(),style:kL(),hoverPoints:yMe(),eventData:FW(),moduleType:"trace",name:"histogram2d",basePlotModule:dl(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var wMe=W((_Br,bMe)=>{"use strict";bMe.exports=_Me()});var zL=W((bBr,TMe)=>{"use strict";TMe.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}});var GM=W((wBr,EMe)=>{"use strict";var Pl=p5(),BL=Ns(),MMe=_s(),IW=MMe.axisHoverFormat,dRt=MMe.descriptionOnlyNumbers,pRt=Eo(),vRt=Du().dash,gRt=Ho(),_5=tn().extendFlat,SMe=zL(),mRt=SMe.COMPARISON_OPS2,yRt=SMe.INTERVAL_OPS,AMe=BL.line;EMe.exports=_5({z:Pl.z,x:Pl.x,x0:Pl.x0,dx:Pl.dx,y:Pl.y,y0:Pl.y0,dy:Pl.dy,xperiod:Pl.xperiod,yperiod:Pl.yperiod,xperiod0:BL.xperiod0,yperiod0:BL.yperiod0,xperiodalignment:Pl.xperiodalignment,yperiodalignment:Pl.yperiodalignment,text:Pl.text,hovertext:Pl.hovertext,transpose:Pl.transpose,xtype:Pl.xtype,ytype:Pl.ytype,xhoverformat:IW("x"),yhoverformat:IW("y"),zhoverformat:IW("z",1),hovertemplate:Pl.hovertemplate,hovertemplatefallback:Pl.hovertemplatefallback,texttemplate:_5({},Pl.texttemplate,{}),texttemplatefallback:Pl.texttemplatefallback,textfont:_5({},Pl.textfont,{}),hoverongaps:Pl.hoverongaps,connectgaps:_5({},Pl.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:gRt({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:dRt("contour label")},operation:{valType:"enumerated",values:[].concat(mRt).concat(yRt),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:_5({},AMe.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:vRt,smoothing:_5({},AMe.smoothing,{}),editType:"plot"},zorder:BL.zorder},pRt("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var zW=W((TBr,CMe)=>{"use strict";var ef=RL(),A1=GM(),xRt=Eo(),RW=_s().axisHoverFormat,kMe=tn().extendFlat;CMe.exports=kMe({x:ef.x,y:ef.y,z:ef.z,marker:ef.marker,histnorm:ef.histnorm,histfunc:ef.histfunc,nbinsx:ef.nbinsx,xbins:ef.xbins,nbinsy:ef.nbinsy,ybins:ef.ybins,autobinx:ef.autobinx,autobiny:ef.autobiny,bingroup:ef.bingroup,xbingroup:ef.xbingroup,ybingroup:ef.ybingroup,autocontour:A1.autocontour,ncontours:A1.ncontours,contours:A1.contours,line:{color:A1.line.color,width:kMe({},A1.line.width,{dflt:.5}),dash:A1.line.dash,smoothing:A1.line.smoothing,editType:"plot"},xhoverformat:RW("x"),yhoverformat:RW("y"),zhoverformat:RW("z",1),hovertemplate:ef.hovertemplate,hovertemplatefallback:ef.hovertemplatefallback,texttemplate:A1.texttemplate,texttemplatefallback:A1.texttemplatefallback,textfont:A1.textfont},xRt("",{cLetter:"z",editTypeOverride:"calc"}))});var qL=W((ABr,DMe)=>{"use strict";DMe.exports=function(t,r,i,n){var a=n("contours.start"),o=n("contours.end"),s=a===!1||o===!1,l=i("contours.size"),u;s?u=r.autocontour=!0:u=i("autocontour",!1),(u||!l)&&i("ncontours")}});var BW=W((MBr,FMe)=>{"use strict";var _Rt=it();FMe.exports=function(t,r,i,n){n||(n={});var a=t("contours.showlabels");if(a){var o=r.font;_Rt.coerceFont(t,"contours.labelfont",o,{overrideDflt:{color:i}}),t("contours.labelformat")}n.hasHover!==!1&&t("zhoverformat")}});var OL=W((SBr,LMe)=>{"use strict";var bRt=Fu(),wRt=BW();LMe.exports=function(t,r,i,n,a){var o=i("contours.coloring"),s,l="";o==="fill"&&(s=i("contours.showlines")),s!==!1&&(o!=="lines"&&(l=i("line.color","#000")),i("line.width",.5),i("line.dash")),o!=="none"&&(t.showlegend!==!0&&(r.showlegend=!1),r._dfltShowLegend=!1,bRt(t,r,n,i,{prefix:"",cLetter:"z"})),i("line.smoothing"),wRt(i,n,l,a)}});var zMe=W((EBr,RMe)=>{"use strict";var PMe=it(),TRt=PW(),ARt=qL(),MRt=OL(),SRt=qM(),IMe=zW();RMe.exports=function(t,r,i,n){function a(s,l){return PMe.coerce(t,r,IMe,s,l)}function o(s){return PMe.coerce2(t,r,IMe,s)}TRt(t,r,a,n),r.visible!==!1&&(ARt(t,r,a,o),MRt(t,r,a,n),a("xhoverformat"),a("yhoverformat"),a("hovertemplate"),a("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&SRt(a,n))}});var NW=W((kBr,qMe)=>{"use strict";var OW=ji(),qW=it();qMe.exports=function(t,r){var i=t.contours;if(t.autocontour){var n=t.zmin,a=t.zmax;(t.zauto||n===void 0)&&(n=qW.aggNums(Math.min,null,r)),(t.zauto||a===void 0)&&(a=qW.aggNums(Math.max,null,r));var o=BMe(n,a,t.ncontours);i.size=o.dtick,i.start=OW.tickFirst(o),o.range.reverse(),i.end=OW.tickFirst(o),i.start===n&&(i.start+=i.size),i.end===a&&(i.end-=i.size),i.start>i.end&&(i.start=i.end=(i.start+i.end)/2),t._input.contours||(t._input.contours={}),qW.extendFlat(t._input.contours,{start:i.start,end:i.end,size:i.size}),t._input.autocontour=!0}else if(i.type!=="constraint"){var s=i.start,l=i.end,u=t._input.contours;if(s>l&&(i.start=u.start=l,l=i.end=u.end=s,s=i.start),!(i.size>0)){var c;s===l?c=1:c=BMe(s,l,t.ncontours).dtick,u.size=i.size=c}}};function BMe(e,t,r){var i={type:"linear",range:[e,t]};return OW.autoTicks(i,(t-e)/(r||15)),i}});var HM=W((CBr,OMe)=>{"use strict";OMe.exports=function(t){return t.end+t.size/1e6}});var UW=W((DBr,UMe)=>{"use strict";var NMe=Jo(),ERt=AL(),kRt=NW(),CRt=HM();UMe.exports=function(t,r){var i=ERt(t,r),n=i[0].z;kRt(r,n);var a=r.contours,o=NMe.extractOpts(r),s;if(a.coloring==="heatmap"&&o.auto&&r.autocontour===!1){var l=a.start,u=CRt(a),c=a.size||1,f=Math.floor((u-l)/c)+1;isFinite(c)||(c=1,f=1);var h=l-c/2,d=h+f*c;s=[h,d]}else s=n;return NMe.calc(t,r,{vals:s,cLetter:"z"}),i}});var jM=W((FBr,VMe)=>{"use strict";VMe.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}});var VW=W((LBr,GMe)=>{"use strict";var NL=jM();GMe.exports=function(t){var r=t[0].z,i=r.length,n=r[0].length,a=i===2||n===2,o,s,l,u,c,f,h,d,p;for(s=0;s<i-1;s++)for(u=[],s===0&&(u=u.concat(NL.BOTTOMSTART)),s===i-2&&(u=u.concat(NL.TOPSTART)),o=0;o<n-1;o++)for(l=u.slice(),o===0&&(l=l.concat(NL.LEFTSTART)),o===n-2&&(l=l.concat(NL.RIGHTSTART)),c=o+","+s,f=[[r[s][o],r[s][o+1]],[r[s+1][o],r[s+1][o+1]]],p=0;p<t.length;p++)d=t[p],h=DRt(d.level,f),h&&(d.crossings[c]=h,l.indexOf(h)!==-1&&(d.starts.push([o,s]),a&&l.indexOf(h,l.indexOf(h)+1)!==-1&&d.starts.push([o,s])))};function DRt(e,t){var r=(t[0][0]>e?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);if(r===5||r===10){var i=(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4;return e>i?r===5?713:1114:r===5?104:208}return r===15?0:r}});var GW=W((PBr,$Me)=>{"use strict";var UL=it(),b5=jM();$Me.exports=function(t,r,i){var n,a,o,s,l;for(r=r||.01,i=i||.01,o=0;o<t.length;o++){for(s=t[o],l=0;l<s.starts.length;l++)a=s.starts[l],HMe(s,a,"edge",r,i);for(n=0;Object.keys(s.crossings).length&&n<1e4;)n++,a=Object.keys(s.crossings)[0].split(",").map(Number),HMe(s,a,void 0,r,i);n===1e4&&UL.log("Infinite loop in contour?")}};function $M(e,t,r,i){return Math.abs(e[0]-t[0])<r&&Math.abs(e[1]-t[1])<i}function FRt(e,t){var r=e[2]-t[2],i=e[3]-t[3];return Math.sqrt(r*r+i*i)}function HMe(e,t,r,i,n){var a=t.join(","),o=e.crossings[a],s=LRt(o,r,t),l=[jMe(e,t,[-s[0],-s[1]])],u=e.z.length,c=e.z[0].length,f=t.slice(),h=s.slice(),d;for(d=0;d<1e4;d++){if(o>20?(o=b5.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[a]=b5.SADDLEREMAINDER[o]):delete e.crossings[a],s=b5.NEWDELTA[o],!s){UL.log("Found bad marching index:",o,t,e.level);break}l.push(jMe(e,t,s)),t[0]+=s[0],t[1]+=s[1],a=t.join(","),$M(l[l.length-1],l[l.length-2],i,n)&&l.pop();var p=s[0]&&(t[0]<0||t[0]>c-2)||s[1]&&(t[1]<0||t[1]>u-2),v=t[0]===f[0]&&t[1]===f[1]&&s[0]===h[0]&&s[1]===h[1];if(v||r&&p)break;o=e.crossings[a]}d===1e4&&UL.log("Infinite loop in contour?");var m=$M(l[0],l[l.length-1],i,n),g=0,w=.2*e.smoothing,b=[],_=0,M,x,T,A,y,E,S,C,k,D,F;for(d=1;d<l.length;d++)S=FRt(l[d],l[d-1]),g+=S,b.push(S);var P=g/b.length*w;function R(B){return l[B%l.length]}for(d=l.length-2;d>=_;d--)if(M=b[d],M<P){for(T=0,x=d-1;x>=_&&M+b[x]<P;x--)M+=b[x];if(m&&d===l.length-2)for(T=0;T<x&&M+b[T]<P;T++)M+=b[T];y=d-x+T+1,E=Math.floor((d+x+T+2)/2),!m&&d===l.length-2?A=l[l.length-1]:!m&&x===-1?A=l[0]:y%2?A=R(E):A=[(R(E)[0]+R(E+1)[0])/2,(R(E)[1]+R(E+1)[1])/2],l.splice(x+1,d-x+1,A),d=x+1,T&&(_=T),m&&(d===l.length-2?l[T]=l[l.length-1]:d===0&&(l[l.length-1]=l[0]))}for(l.splice(0,_),d=0;d<l.length;d++)l[d].length=2;if(!(l.length<2))if(m)l.pop(),e.paths.push(l);else{r||UL.log("Unclosed interior contour?",e.level,f.join(","),l.join("L"));var L=!1;for(C=0;C<e.edgepaths.length;C++)if(D=e.edgepaths[C],!L&&$M(D[0],l[l.length-1],i,n)){l.pop(),L=!0;var I=!1;for(k=0;k<e.edgepaths.length;k++)if(F=e.edgepaths[k],$M(F[F.length-1],l[0],i,n)){I=!0,l.shift(),e.edgepaths.splice(C,1),k===C?e.paths.push(l.concat(F)):(k>C&&k--,e.edgepaths[k]=F.concat(l,D));break}I||(e.edgepaths[C]=l.concat(D))}for(C=0;C<e.edgepaths.length&&!L;C++)D=e.edgepaths[C],$M(D[D.length-1],l[0],i,n)&&(l.shift(),e.edgepaths[C]=D.concat(l),L=!0);L||e.edgepaths.push(l)}}function LRt(e,t,r){var i=0,n=0;return e>20&&t?e===208||e===1114?i=r[0]===0?1:-1:n=r[1]===0?1:-1:b5.BOTTOMSTART.indexOf(e)!==-1?n=1:b5.LEFTSTART.indexOf(e)!==-1?i=1:b5.TOPSTART.indexOf(e)!==-1?n=-1:i=-1,[i,n]}function jMe(e,t,r){var i=t[0]+Math.max(r[0],0),n=t[1]+Math.max(r[1],0),a=e.z[n][i],o=e.xaxis,s=e.yaxis;if(r[1]){var l=(e.level-a)/(e.z[n][i+1]-a),u=(l!==1?(1-l)*o.c2l(e.x[i]):0)+(l!==0?l*o.c2l(e.x[i+1]):0);return[o.c2p(o.l2c(u),!0),s.c2p(e.y[n],!0),i+l,n]}else{var c=(e.level-a)/(e.z[n+1][i]-a),f=(c!==1?(1-c)*s.c2l(e.y[n]):0)+(c!==0?c*s.c2l(e.y[n+1]):0);return[o.c2p(e.x[i],!0),s.c2p(s.l2c(f),!0),i,n+c]}}});var ZMe=W((IBr,XMe)=>{"use strict";var HW=zL(),PRt=sn();XMe.exports={"[]":WMe("[]"),"][":WMe("]["),">":jW(">"),"<":jW("<"),"=":jW("=")};function YMe(e,t){var r=Array.isArray(t),i;function n(a){return PRt(a)?+a:null}return HW.COMPARISON_OPS2.indexOf(e)!==-1?i=n(r?t[0]:t):HW.INTERVAL_OPS.indexOf(e)!==-1?i=r?[n(t[0]),n(t[1])]:[n(t),n(t)]:HW.SET_OPS.indexOf(e)!==-1&&(i=r?t.map(n):[n(t)]),i}function WMe(e){return function(t){t=YMe(e,t);var r=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return{start:r,end:i,size:i-r}}}function jW(e){return function(t){return t=YMe(e,t),{start:t,end:1/0,size:1/0}}}});var $W=W((RBr,JMe)=>{"use strict";var KMe=it(),IRt=ZMe(),RRt=HM();JMe.exports=function(t,r,i){for(var n=t.type==="constraint"?IRt[t._operation](t.value):t,a=n.size,o=[],s=RRt(n),l=i.trace._carpetTrace,u=l?{xaxis:l.aaxis,yaxis:l.baxis,x:i.a,y:i.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:i.x,y:i.y},c=n.start;c<s;c+=a)if(o.push(KMe.extendFlat({level:c,crossings:{},starts:[],edgepaths:[],paths:[],z:i.z,smoothing:i.trace.line.smoothing},u)),o.length>1e3){KMe.warn("Too many contours, clipping at 1000",t);break}return o}});var WW=W((zBr,eSe)=>{"use strict";var w5=it();eSe.exports=function(e,t){var r,i,n,a=function(l){return l.reverse()},o=function(l){return l};switch(t){case"=":case"<":return e;case">":for(e.length!==1&&w5.warn("Contour data invalid for the specified inequality operation."),i=e[0],r=0;r<i.edgepaths.length;r++)i.edgepaths[r]=a(i.edgepaths[r]);for(r=0;r<i.paths.length;r++)i.paths[r]=a(i.paths[r]);for(r=0;r<i.starts.length;r++)i.starts[r]=a(i.starts[r]);return e;case"][":var s=a;a=o,o=s;case"[]":for(e.length!==2&&w5.warn("Contour data invalid for the specified inequality range operation."),i=QMe(e[0]),n=QMe(e[1]),r=0;r<i.edgepaths.length;r++)i.edgepaths[r]=a(i.edgepaths[r]);for(r=0;r<i.paths.length;r++)i.paths[r]=a(i.paths[r]);for(r=0;r<i.starts.length;r++)i.starts[r]=a(i.starts[r]);for(;n.edgepaths.length;)i.edgepaths.push(o(n.edgepaths.shift()));for(;n.paths.length;)i.paths.push(o(n.paths.shift()));for(;n.starts.length;)i.starts.push(o(n.starts.shift()));return[i]}};function QMe(e){return w5.extendFlat({},e,{edgepaths:w5.extendDeep([],e.edgepaths),paths:w5.extendDeep([],e.paths),starts:w5.extendDeep([],e.starts)})}});var YW=W((BBr,tSe)=>{"use strict";tSe.exports=function(e,t){var r=e[0],i=r.z,n;switch(t.type){case"levels":var a=Math.min(i[0][0],i[0][1]);for(n=0;n<e.length;n++){var o=e[n];o.prefixBoundary=!o.edgepaths.length&&(a>o.level||o.starts.length&&a===o.level)}break;case"constraint":if(r.prefixBoundary=!1,r.edgepaths.length)return;var s=r.x.length,l=r.y.length,u=-1/0,c=1/0;for(n=0;n<l;n++)c=Math.min(c,i[n][0]),c=Math.min(c,i[n][s-1]),u=Math.max(u,i[n][0]),u=Math.max(u,i[n][s-1]);for(n=1;n<s-1;n++)c=Math.min(c,i[0][n]),c=Math.min(c,i[l-1][n]),u=Math.max(u,i[0][n]),u=Math.max(u,i[l-1][n]);var f=t.value,h,d;switch(t._operation){case">":f>u&&(r.prefixBoundary=!0);break;case"<":(f<c||r.starts.length&&f===c)&&(r.prefixBoundary=!0);break;case"[]":h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1]),(d<c||h>u||r.starts.length&&d===c)&&(r.prefixBoundary=!0);break;case"][":h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1]),h<c&&d>u&&(r.prefixBoundary=!0);break}break}}});var VL=W(Cf=>{"use strict";var YM=vi(),ic=it(),Yg=Ji(),zRt=Jo(),nSe=uo(),rSe=ji(),iSe=i1(),BRt=EL(),aSe=VW(),oSe=GW(),qRt=$W(),ORt=WW(),sSe=YW(),WM=jM(),M1=WM.LABELOPTIMIZER;Cf.plot=function(t,r,i,n){var a=r.xaxis,o=r.yaxis;ic.makeTraceGroups(n,i,"contour").each(function(s){var l=YM.select(this),u=s[0],c=u.trace,f=u.x,h=u.y,d=c.contours,p=qRt(d,r,u),v=ic.ensureSingle(l,"g","heatmapcoloring"),m=[];d.coloring==="heatmap"&&(m=[s]),BRt(t,r,m,v),aSe(p),oSe(p);var g=a.c2p(f[0],!0),w=a.c2p(f[f.length-1],!0),b=o.c2p(h[0],!0),_=o.c2p(h[h.length-1],!0),M=[[g,_],[w,_],[w,b],[g,b]],x=p;d.type==="constraint"&&(x=ORt(p,d._operation)),NRt(l,M,d),URt(l,x,M,d),VRt(l,p,t,u,d),HRt(l,r,t,u,M)})};function NRt(e,t,r){var i=ic.ensureSingle(e,"g","contourbg"),n=i.selectAll("path").data(r.coloring==="fill"?[0]:[]);n.enter().append("path"),n.exit().remove(),n.attr("d","M"+t.join("L")+"Z").style("stroke","none")}function URt(e,t,r,i){var n=i.coloring==="fill"||i.type==="constraint"&&i._operation!=="=",a="M"+r.join("L")+"Z";n&&sSe(t,i);var o=ic.ensureSingle(e,"g","contourfill"),s=o.selectAll("path").data(n?t:[]);s.enter().append("path"),s.exit().remove(),s.each(function(l){var u=(l.prefixBoundary?a:"")+lSe(l,r);u?YM.select(this).attr("d",u).style("stroke","none"):YM.select(this).remove()})}function lSe(e,t){var r="",i=0,n=e.edgepaths.map(function(g,w){return w}),a=!0,o,s,l,u,c,f;function h(g){return Math.abs(g[1]-t[0][1])<.01}function d(g){return Math.abs(g[1]-t[2][1])<.01}function p(g){return Math.abs(g[0]-t[0][0])<.01}function v(g){return Math.abs(g[0]-t[2][0])<.01}for(;n.length;){for(f=Yg.smoothopen(e.edgepaths[i],e.smoothing),r+=a?f:f.replace(/^M/,"L"),n.splice(n.indexOf(i),1),o=e.edgepaths[i][e.edgepaths[i].length-1],u=-1,l=0;l<4;l++){if(!o){ic.log("Missing end?",i,e);break}for(h(o)&&!v(o)?s=t[1]:p(o)?s=t[0]:d(o)?s=t[3]:v(o)&&(s=t[2]),c=0;c<e.edgepaths.length;c++){var m=e.edgepaths[c][0];Math.abs(o[0]-s[0])<.01?Math.abs(o[0]-m[0])<.01&&(m[1]-o[1])*(s[1]-m[1])>=0&&(s=m,u=c):Math.abs(o[1]-s[1])<.01?Math.abs(o[1]-m[1])<.01&&(m[0]-o[0])*(s[0]-m[0])>=0&&(s=m,u=c):ic.log("endpt to newendpt is not vert. or horz.",o,s,m)}if(o=s,u>=0)break;r+="L"+s}if(u===e.edgepaths.length){ic.log("unclosed perimeter path");break}i=u,a=n.indexOf(i)===-1,a&&(i=n[0],r+="Z")}for(i=0;i<e.paths.length;i++)r+=Yg.smoothclosed(e.paths[i],e.smoothing);return r}function VRt(e,t,r,i,n){var a=r._context.staticPlot,o=ic.ensureSingle(e,"g","contourlines"),s=n.showlines!==!1,l=n.showlabels,u=s&&l,c=Cf.createLines(o,s||l,t,a),f=Cf.createLineClip(o,u,r,i.trace.uid),h=e.selectAll("g.contourlabels").data(l?[0]:[]);if(h.exit().remove(),h.enter().append("g").classed("contourlabels",!0),l){var d=[],p=[];ic.clearLocationCache();var v=Cf.labelFormatter(r,i),m=Yg.tester.append("text").attr("data-notex",1).call(Yg.font,n.labelfont),g=t[0].xaxis,w=t[0].yaxis,b=g._length,_=w._length,M=g.range,x=w.range,T=ic.aggNums(Math.min,null,i.x),A=ic.aggNums(Math.max,null,i.x),y=ic.aggNums(Math.min,null,i.y),E=ic.aggNums(Math.max,null,i.y),S=Math.max(g.c2p(T,!0),0),C=Math.min(g.c2p(A,!0),b),k=Math.max(w.c2p(E,!0),0),D=Math.min(w.c2p(y,!0),_),F={};M[0]<M[1]?(F.left=S,F.right=C):(F.left=C,F.right=S),x[0]<x[1]?(F.top=k,F.bottom=D):(F.top=D,F.bottom=k),F.middle=(F.top+F.bottom)/2,F.center=(F.left+F.right)/2,d.push([[F.left,F.top],[F.right,F.top],[F.right,F.bottom],[F.left,F.bottom]]);var P=Math.sqrt(b*b+_*_),R=WM.LABELDISTANCE*P/Math.max(1,t.length/WM.LABELINCREASE);c.each(function(L){var I=Cf.calcTextOpts(L.level,v,m,r);YM.select(this).selectAll("path").each(function(){var B=this,O=ic.getVisibleSegment(B,F,I.height/2);if(O&&!(O.len<(I.width+I.height)*WM.LABELMIN))for(var $=Math.min(Math.ceil(O.len/R),WM.LABELMAX),Y=0;Y<$;Y++){var K=Cf.findBestTextLocation(B,O,I,p,F);if(!K)break;Cf.addLabelData(K,I,p,d)}})}),m.remove(),Cf.drawLabels(h,p,r,f,u?d:null)}l&&!s&&c.remove()}Cf.createLines=function(e,t,r,i){var n=r[0].smoothing,a=e.selectAll("g.contourlevel").data(t?r:[]);if(a.exit().remove(),a.enter().append("g").classed("contourlevel",!0),t){var o=a.selectAll("path.openline").data(function(l){return l.pedgepaths||l.edgepaths});o.exit().remove(),o.enter().append("path").classed("openline",!0),o.attr("d",function(l){return Yg.smoothopen(l,n)}).style("stroke-miterlimit",1).style("vector-effect",i?"none":"non-scaling-stroke");var s=a.selectAll("path.closedline").data(function(l){return l.ppaths||l.paths});s.exit().remove(),s.enter().append("path").classed("closedline",!0),s.attr("d",function(l){return Yg.smoothclosed(l,n)}).style("stroke-miterlimit",1).style("vector-effect",i?"none":"non-scaling-stroke")}return a};Cf.createLineClip=function(e,t,r,i){var n=r._fullLayout._clips,a=t?"clipline"+i:null,o=n.selectAll("#"+a).data(t?[0]:[]);return o.exit().remove(),o.enter().append("clipPath").classed("contourlineclip",!0).attr("id",a),Yg.setClipUrl(e,a,r),o};Cf.labelFormatter=function(e,t){var r=e._fullLayout,i=t.trace,n=i.contours,a={type:"linear",_id:"ycontour",showexponent:"all",exponentformat:"B"};if(n.labelformat)a.tickformat=n.labelformat,iSe(a,r);else{var o=zRt.extractOpts(i);if(o&&o.colorbar&&o.colorbar._axis)a=o.colorbar._axis;else{if(n.type==="constraint"){var s=n.value;ic.isArrayOrTypedArray(s)?a.range=[s[0],s[s.length-1]]:a.range=[s,s]}else a.range=[n.start,n.end],a.nticks=(n.end-n.start)/n.size;a.range[0]===a.range[1]&&(a.range[1]+=a.range[0]||1),a.nticks||(a.nticks=1e3),iSe(a,r),rSe.prepTicks(a),a._tmin=null,a._tmax=null}}return function(l){return rSe.tickText(a,l).text}};Cf.calcTextOpts=function(e,t,r,i){var n=t(e);r.text(n).call(nSe.convertToTspans,i);var a=r.node(),o=Yg.bBox(a,!0);return{text:n,width:o.width,height:o.height,fontSize:+a.style["font-size"].replace("px",""),level:e,dy:(o.top+o.bottom)/2}};Cf.findBestTextLocation=function(e,t,r,i,n){var a=r.width,o,s,l,u,c;t.isClosed?(s=t.len/M1.INITIALSEARCHPOINTS,o=t.min+s/2,l=t.max):(s=(t.len-a)/(M1.INITIALSEARCHPOINTS+1),o=t.min+s+a/2,l=t.max-(s+a)/2);for(var f=1/0,h=0;h<M1.ITERATIONS;h++){for(var d=o;d<l;d+=s){var p=ic.getTextLocation(e,t.total,d,a),v=GRt(p,r,i,n);v<f&&(f=v,c=p,u=d)}if(f>M1.MAXCOST*2)break;h&&(s/=2),o=u-s/2,l=o+s*1.5}if(f<=M1.MAXCOST)return c};function GRt(e,t,r,i){var n=t.width/2,a=t.height/2,o=e.x,s=e.y,l=e.theta,u=Math.cos(l)*n,c=Math.sin(l)*n,f=(o>i.center?i.right-o:o-i.left)/(u+Math.abs(Math.sin(l)*a)),h=(s>i.middle?i.bottom-s:s-i.top)/(Math.abs(c)+Math.cos(l)*a);if(f<1||h<1)return 1/0;var d=M1.EDGECOST*(1/(f-1)+1/(h-1));d+=M1.ANGLECOST*l*l;for(var p=o-u,v=s-c,m=o+u,g=s+c,w=0;w<r.length;w++){var b=r[w],_=Math.cos(b.theta)*b.width/2,M=Math.sin(b.theta)*b.width/2,x=ic.segmentDistance(p,v,m,g,b.x-_,b.y-M,b.x+_,b.y+M)*2/(t.height+b.height),T=b.level===t.level,A=T?M1.SAMELEVELDISTANCE:1;if(x<=A)return 1/0;var y=M1.NEIGHBORCOST*(T?M1.SAMELEVELFACTOR:1);d+=y/(x-A)}return d}Cf.addLabelData=function(e,t,r,i){var n=t.fontSize,a=t.width+n/3,o=Math.max(0,t.height-n/3),s=e.x,l=e.y,u=e.theta,c=Math.sin(u),f=Math.cos(u),h=function(p,v){return[s+p*f-v*c,l+p*c+v*f]},d=[h(-a/2,-o/2),h(-a/2,o/2),h(a/2,o/2),h(a/2,-o/2)];r.push({text:t.text,x:s,y:l,dy:t.dy,theta:u,level:t.level,width:a,height:o}),i.push(d)};Cf.drawLabels=function(e,t,r,i,n){var a=e.selectAll("text").data(t,function(u){return u.text+","+u.x+","+u.y+","+u.theta});if(a.exit().remove(),a.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(u){var c=u.x+Math.sin(u.theta)*u.dy,f=u.y-Math.cos(u.theta)*u.dy;YM.select(this).text(u.text).attr({x:c,y:f,transform:"rotate("+180*u.theta/Math.PI+" "+c+" "+f+")"}).call(nSe.convertToTspans,r)}),n){for(var o="",s=0;s<n.length;s++)o+="M"+n[s].join("L")+"Z";var l=ic.ensureSingle(i,"path","");l.attr("d",o)}};function HRt(e,t,r,i,n){var a=i.trace,o=r._fullLayout._clips,s="clip"+a.uid,l=o.selectAll("#"+s).data(a.connectgaps?[]:[0]);if(l.enter().append("clipPath").classed("contourclip",!0).attr("id",s),l.exit().remove(),a.connectgaps===!1){var u={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:t.xaxis,yaxis:t.yaxis,x:i.x,y:i.y,z:jRt(i),smoothing:0};aSe([u]),oSe([u]),sSe([u],{type:"levels"});var c=ic.ensureSingle(l,"path","");c.attr("d",(u.prefixBoundary?"M"+n.join("L")+"Z":"")+lSe(u,n))}else s=null;Yg.setClipUrl(e,s,r)}function jRt(e){var t=e.trace._emptypoints,r=[],i=e.z.length,n=e.z[0].length,a,o=[],s;for(a=0;a<n;a++)o.push(1);for(a=0;a<i;a++)r.push(o.slice());for(a=0;a<t.length;a++)s=t[a],r[s[0]][s[1]]=0;return e.zmask=r,r}});var ZW=W((OBr,uSe)=>{"use strict";var $Rt=vi(),XW=Jo(),WRt=HM();uSe.exports=function(t){var r=t.contours,i=r.start,n=WRt(r),a=r.size||1,o=Math.floor((n-i)/a)+1,s=r.coloring==="lines"?0:1,l=XW.extractOpts(t);isFinite(a)||(a=1,o=1);var u=l.reversescale?XW.flipScale(l.colorscale):l.colorscale,c=u.length,f=new Array(c),h=new Array(c),d,p,v=l.min,m=l.max;if(r.coloring==="heatmap"){for(p=0;p<c;p++)d=u[p],f[p]=d[0]*(m-v)+v,h[p]=d[1];var g=$Rt.extent([v,m,r.start,r.start+a*(o-1)]),w=g[v<m?0:1],b=g[v<m?1:0];w!==v&&(f.splice(0,0,w),h.splice(0,0,h[0])),b!==m&&(f.push(b),h.push(h[h.length-1]))}else{var _=t._input&&typeof t._input.zmin=="number"&&typeof t._input.zmax=="number";for(_&&(i<=v||n>=m)&&(i<=v&&(i=v),n>=m&&(n=m),o=Math.floor((n-i)/a)+1,s=0),p=0;p<c;p++)d=u[p],f[p]=(d[0]*(o+s-1)-s/2)*a+i,h[p]=d[1];(_||t.autocontour)&&(f[0]>v&&(f.unshift(v),h.unshift(h[0])),f[f.length-1]<m&&(f.push(m),h.push(h[h.length-1])))}return XW.makeColorScaleFunc({domain:f,range:h},{noNumericCheck:!0})}});var HL=W((NBr,fSe)=>{"use strict";var GL=vi(),cSe=Ji(),YRt=kL(),XRt=ZW();fSe.exports=function(t){var r=GL.select(t).selectAll("g.contour");r.style("opacity",function(i){return i[0].trace.opacity}),r.each(function(i){var n=GL.select(this),a=i[0].trace,o=a.contours,s=a.line,l=o.size||1,u=o.start,c=o.type==="constraint",f=!c&&o.coloring==="lines",h=!c&&o.coloring==="fill",d=f||h?XRt(a):null;n.selectAll("g.contourlevel").each(function(m){GL.select(this).selectAll("path").call(cSe.lineGroupStyle,s.width,f?d(m.level):s.color,s.dash)});var p=o.labelfont;if(n.selectAll("g.contourlabels text").each(function(m){cSe.font(GL.select(this),{weight:p.weight,style:p.style,variant:p.variant,textcase:p.textcase,lineposition:p.lineposition,shadow:p.shadow,family:p.family,size:p.size,color:p.color||(f?d(m.level):s.color)})}),c)n.selectAll("g.contourfill path").style("fill",a.fillcolor);else if(h){var v;n.selectAll("g.contourfill path").style("fill",function(m){return v===void 0&&(v=m.level),d(m.level+.5*l)}),v===void 0&&(v=u),n.selectAll("g.contourbg path").style("fill",d(v-.5*l))}}),YRt(t)}});var jL=W((UBr,dSe)=>{"use strict";var hSe=Jo(),ZRt=ZW(),KRt=HM();function JRt(e,t,r){var i=t.contours,n=t.line,a=i.size||1,o=i.coloring,s=ZRt(t,{isColorbar:!0});if(o==="heatmap"){var l=hSe.extractOpts(t);r._fillgradient=l.reversescale?hSe.flipScale(l.colorscale):l.colorscale,r._zrange=[l.min,l.max]}else o==="fill"&&(r._fillcolor=s);r._line={color:o==="lines"?s:n.color,width:i.showlines!==!1?n.width:0,dash:n.dash},r._levels={start:i.start,end:KRt(i),size:a}}dSe.exports={min:"zmin",max:"zmax",calc:JRt}});var KW=W((VBr,pSe)=>{"use strict";var $L=ni(),QRt=DL();pSe.exports=function(t,r,i,n,a){a||(a={}),a.isContour=!0;var o=QRt(t,r,i,n,a);return o&&o.forEach(function(s){var l=s.trace;l.contours.type==="constraint"&&(l.fillcolor&&$L.opacity(l.fillcolor)?s.color=$L.addOpacity(l.fillcolor,1):l.contours.showlines&&$L.opacity(l.line.color)&&(s.color=$L.addOpacity(l.line.color,1)))}),o}});var gSe=W((GBr,vSe)=>{"use strict";vSe.exports={attributes:zW(),supplyDefaults:zMe(),crossTraceDefaults:PL(),calc:UW(),plot:VL().plot,layerName:"contourlayer",style:HL(),colorbar:jL(),hoverPoints:KW(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:dl(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var ySe=W((HBr,mSe)=>{"use strict";mSe.exports=gSe()});var JW=W((jBr,ASe)=>{"use strict";var xSe=sn(),ezt=BW(),wSe=ni(),_Se=wSe.addOpacity,tzt=wSe.opacity,TSe=zL(),bSe=it().isArrayOrTypedArray,rzt=TSe.CONSTRAINT_REDUCTION,izt=TSe.COMPARISON_OPS2;ASe.exports=function(t,r,i,n,a,o){var s=r.contours,l,u,c,f=i("contours.operation");if(s._operation=rzt[f],nzt(i,s),f==="="?l=s.showlines=!0:(l=i("contours.showlines"),c=i("fillcolor",_Se((t.line||{}).color||a,.5))),l){var h=c&&tzt(c)?_Se(r.fillcolor,1):a;u=i("line.color",h),i("line.width",2),i("line.dash")}i("line.smoothing"),ezt(i,n,u,o)};function nzt(e,t){var r;izt.indexOf(t.operation)===-1?(e("contours.value",[0,1]),bSe(t.value)?t.value.length>2?t.value=t.value.slice(2):t.length===0?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:xSe(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),xSe(t.value)||(bSe(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var ESe=W(($Br,SSe)=>{"use strict";var QW=it(),azt=pL(),ozt=Hp(),szt=JW(),lzt=qL(),uzt=OL(),czt=qM(),MSe=GM();SSe.exports=function(t,r,i,n){function a(u,c){return QW.coerce(t,r,MSe,u,c)}function o(u){return QW.coerce2(t,r,MSe,u)}var s=azt(t,r,a,n);if(!s){r.visible=!1;return}ozt(t,r,n,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hoverongaps"),a("hovertemplate"),a("hovertemplatefallback");var l=a("contours.type")==="constraint";a("connectgaps",QW.isArray1D(r.z)),l?szt(t,r,a,n,i):(lzt(t,r,a,o),uzt(t,r,a,n)),r.contours&&r.contours.coloring==="heatmap"&&czt(a,n),a("zorder")}});var CSe=W((WBr,kSe)=>{"use strict";kSe.exports={attributes:GM(),supplyDefaults:ESe(),calc:UW(),plot:VL().plot,style:HL(),colorbar:jL(),hoverPoints:KW(),moduleType:"trace",name:"contour",basePlotModule:dl(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var FSe=W((YBr,DSe)=>{"use strict";DSe.exports=CSe()});var eY=W((XBr,RSe)=>{"use strict";var{hovertemplateAttrs:fzt,texttemplateAttrs:hzt,templatefallbackAttrs:LSe}=Ga(),dzt=g1(),D0=Ns(),pzt=Wa(),PSe=Eo(),vzt=Du().dash,Ky=tn().extendFlat,Ld=D0.marker,XM=D0.line,ISe=Ld.line;RSe.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:Ky({},D0.mode,{dflt:"markers"}),text:Ky({},D0.text,{}),texttemplate:hzt({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:LSe({editType:"plot"}),hovertext:Ky({},D0.hovertext,{}),line:{color:XM.color,width:XM.width,dash:vzt,backoff:XM.backoff,shape:Ky({},XM.shape,{values:["linear","spline"]}),smoothing:XM.smoothing,editType:"calc"},connectgaps:D0.connectgaps,cliponaxis:D0.cliponaxis,fill:Ky({},D0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:dzt(),marker:Ky({symbol:Ld.symbol,opacity:Ld.opacity,angle:Ld.angle,angleref:Ld.angleref,standoff:Ld.standoff,maxdisplayed:Ld.maxdisplayed,size:Ld.size,sizeref:Ld.sizeref,sizemin:Ld.sizemin,sizemode:Ld.sizemode,line:Ky({width:ISe.width,dash:ISe.dash,editType:"calc"},PSe("marker.line")),gradient:Ld.gradient,editType:"calc"},PSe("marker")),textfont:D0.textfont,textposition:D0.textposition,selected:D0.selected,unselected:D0.unselected,hoverinfo:Ky({},pzt.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:D0.hoveron,hovertemplate:fzt(),hovertemplatefallback:LSe()}});var OSe=W((ZBr,qSe)=>{"use strict";var zSe=it(),gzt=v1(),T5=$o(),mzt=bd(),yzt=jp(),BSe=Nw(),xzt=$p(),_zt=y1(),bzt=eY();qSe.exports=function(t,r,i,n){function a(h,d){return zSe.coerce(t,r,bzt,h,d)}var o=a("a"),s=a("b"),l=a("c"),u;if(o?(u=o.length,s?(u=Math.min(u,s.length),l&&(u=Math.min(u,l.length))):l?u=Math.min(u,l.length):u=0):s&&l&&(u=Math.min(s.length,l.length)),!u){r.visible=!1;return}r._length=u,a("sum"),a("text"),a("hovertext"),r.hoveron!=="fills"&&(a("hovertemplate"),a("hovertemplatefallback"));var c=u<gzt.PTS_LINESONLY?"lines+markers":"lines";a("mode",c),T5.hasMarkers(r)&&mzt(t,r,i,n,a,{gradient:!0}),T5.hasLines(r)&&(yzt(t,r,i,n,a,{backoff:!0}),BSe(t,r,a),a("connectgaps")),T5.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),xzt(t,r,n,a));var f=[];(T5.hasMarkers(r)||T5.hasText(r))&&(a("cliponaxis"),a("marker.maxdisplayed"),f.push("points")),a("fill"),r.fill!=="none"&&(_zt(t,r,i,a),T5.hasLines(r)||BSe(t,r,a)),(r.fill==="tonext"||r.fill==="toself")&&f.push("fills"),a("hoveron",f.join("+")||"points"),zSe.coerceSelectionMarkerOpacity(r,a)}});var USe=W((KBr,NSe)=>{"use strict";var tY=ji();NSe.exports=function(t,r,i){var n={},a=i[r.subplot]._subplot;return n.aLabel=tY.tickText(a.aaxis,t.a,!0).text,n.bLabel=tY.tickText(a.baxis,t.b,!0).text,n.cLabel=tY.tickText(a.caxis,t.c,!0).text,n}});var jSe=W((JBr,HSe)=>{"use strict";var rY=sn(),wzt=wd(),Tzt=x1(),Azt=w0(),Mzt=Td().calcMarkerSize,VSe=["a","b","c"],GSe={a:["b","c"],b:["a","c"],c:["a","b"]};HSe.exports=function(t,r){var i=t._fullLayout[r.subplot],n=i.sum,a=r.sum||n,o={a:r.a,b:r.b,c:r.c},s=r.ids,l,u,c,f,h,d;for(l=0;l<VSe.length;l++)if(c=VSe[l],!o[c]){for(h=o[GSe[c][0]],d=o[GSe[c][1]],f=new Array(h.length),u=0;u<h.length;u++)f[u]=a-h[u]-d[u];o[c]=f}var p=r._length,v=new Array(p),m,g,w,b,_,M;for(l=0;l<p;l++)m=o.a[l],g=o.b[l],w=o.c[l],rY(m)&&rY(g)&&rY(w)?(m=+m,g=+g,w=+w,b=n/(m+g+w),b!==1&&(m*=b,g*=b,w*=b),M=m,_=w-g,v[l]={x:_,y:M,a:m,b:g,c:w},s&&(v[l].id=s[l])):v[l]={x:!1,y:!1};return Mzt(r,p),wzt(t,r),Tzt(v,r),Azt(v,r),v}});var WSe=W((QBr,$Se)=>{"use strict";var Szt=$w();$Se.exports=function(t,r,i){var n=r.plotContainer;n.select(".scatterlayer").selectAll("*").remove();for(var a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:n,layerClipId:r._hasClipOnAxisFalse?r.clipIdRelative:null},l=r.layers.frontplot.select("g.scatterlayer"),u=0;u<i.length;u++){var c=i[u];c.length&&(c[0].trace._xA=a,c[0].trace._yA=o)}Szt(t,s,i,l)}});var XSe=W((eqr,YSe)=>{"use strict";var Ezt=Zw();YSe.exports=function(t,r,i,n){var a=Ezt(t,r,i,n);if(!a||a[0].index===!1)return;var o=a[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),a}var f=o.cd[o.index],h=o.trace,d=o.subplot;o.a=f.a,o.b=f.b,o.c=f.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var p={};p[h.subplot]={_subplot:d};var v=h._module.formatLabels(f,h,p);o.aLabel=v.aLabel,o.bLabel=v.bLabel,o.cLabel=v.cLabel;var m=f.hi||h.hoverinfo,g=[];function w(_,M){g.push(_._hovertitle+": "+M)}if(!h.hovertemplate){var b=m.split("+");b.indexOf("all")!==-1&&(b=["a","b","c"]),b.indexOf("a")!==-1&&w(d.aaxis,o.aLabel),b.indexOf("b")!==-1&&w(d.baxis,o.bLabel),b.indexOf("c")!==-1&&w(d.caxis,o.cLabel)}return o.extraText=g.join("<br>"),o.hovertemplate=h.hovertemplate,a}});var KSe=W((tqr,ZSe)=>{"use strict";ZSe.exports=function(t,r,i,n,a){if(r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),n[a]){var o=n[a];t.a=o.a,t.b=o.b,t.c=o.c}else t.a=r.a,t.b=r.b,t.c=r.c;return t}});var lEe=W((rqr,sEe)=>{"use strict";var iEe=vi(),iY=yi(),Xg=it(),S1=Xg.strTranslate,WL=Xg._,B_=ni(),YL=Ji(),ZM=i1(),nY=tn().extendFlat,kzt=Ko(),Jy=ji(),JSe=bf(),QSe=Ds(),nEe=u1(),eEe=nEe.freeMode,Czt=nEe.rectMode,aY=e_(),Dzt=cu().prepSelect,Fzt=cu().selectOnClick,Lzt=cu().clearOutline,Pzt=cu().clearSelectionsCache,aEe=Gl();function oEe(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}sEe.exports=oEe;var E1=oEe.prototype;E1.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};E1.plot=function(e,t){var r=this,i=t[r.id],n=t._size;r._hasClipOnAxisFalse=!1;for(var a=0;a<e.length;a++){var o=e[a][0].trace;if(o.cliponaxis===!1){r._hasClipOnAxisFalse=!0;break}}r.updateLayers(i),r.adjustLayout(i,n),kzt.generalUpdatePerTraceModule(r.graphDiv,r,e,i),r.layers.plotbg.select("path").call(B_.fill,i.bgcolor)};E1.makeFramework=function(e){var t=this,r=t.graphDiv,i=e[t.id],n=t.clipId="clip"+t.layoutId+t.id,a=t.clipIdRelative="clip-relative"+t.layoutId+t.id;t.clipDef=Xg.ensureSingleById(e._clips,"clipPath",n,function(o){o.append("path").attr("d","M0,0Z")}),t.clipDefRelative=Xg.ensureSingleById(e._clips,"clipPath",a,function(o){o.append("path").attr("d","M0,0Z")}),t.plotContainer=Xg.ensureSingle(t.container,"g",t.id),t.updateLayers(i),YL.setClipUrl(t.layers.backplot,n,r),YL.setClipUrl(t.layers.grids,n,r)};E1.updateFx=function(e){e._ternarylayer.selectAll("g.toplevel").style("cursor",e.dragmode==="pan"?"move":"crosshair")};E1.updateLayers=function(e){var t=this,r=t.layers,i=["draglayer","plotbg","backplot","grids"];e.aaxis.layer==="below traces"&&i.push("aaxis","aline"),e.baxis.layer==="below traces"&&i.push("baxis","bline"),e.caxis.layer==="below traces"&&i.push("caxis","cline"),i.push("frontplot"),e.aaxis.layer==="above traces"&&i.push("aaxis","aline"),e.baxis.layer==="above traces"&&i.push("baxis","bline"),e.caxis.layer==="above traces"&&i.push("caxis","cline");var n=t.plotContainer.selectAll("g.toplevel").data(i,String),a=["agrid","bgrid","cgrid"];n.enter().append("g").attr("class",function(o){return"toplevel "+o}).each(function(o){var s=iEe.select(this);r[o]=s,o==="frontplot"?s.append("g").classed("scatterlayer",!0):o==="backplot"?s.append("g").classed("maplayer",!0):o==="plotbg"?s.append("path").attr("d","M0,0Z"):o==="aline"||o==="bline"||o==="cline"?s.append("path"):o==="grids"&&a.forEach(function(l){r[l]=s.append("g").classed("grid "+l,!0)})}),n.order()};var A5=Math.sqrt(4/3);E1.adjustLayout=function(e,t){var r=this,i=e.domain,n=(i.x[0]+i.x[1])/2,a=(i.y[0]+i.y[1])/2,o=i.x[1]-i.x[0],s=i.y[1]-i.y[0],l=o*t.w,u=s*t.h,c=e.sum,f=e.aaxis.min,h=e.baxis.min,d=e.caxis.min,p,v,m,g,w,b;l>A5*u?(g=u,m=g*A5):(m=l,g=m/A5),w=o*m/l,b=s*g/u,p=t.l+t.w*n-m/2,v=t.t+t.h*(1-a)-g/2,r.x0=p,r.y0=v,r.w=m,r.h=g,r.sum=c,r.xaxis={type:"linear",range:[f+2*d-c,c-f-2*h],domain:[n-w/2,n+w/2],_id:"x"},ZM(r.xaxis,r.graphDiv._fullLayout),r.xaxis.setScale(),r.xaxis.isPtWithinRange=function(D){return D.a>=r.aaxis.range[0]&&D.a<=r.aaxis.range[1]&&D.b>=r.baxis.range[1]&&D.b<=r.baxis.range[0]&&D.c>=r.caxis.range[1]&&D.c<=r.caxis.range[0]},r.yaxis={type:"linear",range:[f,c-h-d],domain:[a-b/2,a+b/2],_id:"y"},ZM(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var _=r.yaxis.domain[0],M=r.aaxis=nY({},e.aaxis,{range:[f,c-h-d],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[_,_+b*A5],anchor:"free",position:0,_id:"y",_length:m});ZM(M,r.graphDiv._fullLayout),M.setScale();var x=r.baxis=nY({},e.baxis,{range:[c-f-d,h],side:"bottom",domain:r.xaxis.domain,anchor:"free",position:0,_id:"x",_length:m});ZM(x,r.graphDiv._fullLayout),x.setScale();var T=r.caxis=nY({},e.caxis,{range:[c-f-h,d],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[_,_+b*A5],anchor:"free",position:0,_id:"y",_length:m});ZM(T,r.graphDiv._fullLayout),T.setScale();var A="M"+p+","+(v+g)+"h"+m+"l-"+m/2+",-"+g+"Z";r.clipDef.select("path").attr("d",A),r.layers.plotbg.select("path").attr("d",A);var y="M0,"+g+"h"+m+"l-"+m/2+",-"+g+"Z";r.clipDefRelative.select("path").attr("d",y);var E=S1(p,v);r.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",E),r.clipDefRelative.select("path").attr("transform",null);var S=S1(p-x._offset,v+g);r.layers.baxis.attr("transform",S),r.layers.bgrid.attr("transform",S);var C=S1(p+m/2,v)+"rotate(30)"+S1(0,-M._offset);r.layers.aaxis.attr("transform",C),r.layers.agrid.attr("transform",C);var k=S1(p+m/2,v)+"rotate(-30)"+S1(0,-T._offset);r.layers.caxis.attr("transform",k),r.layers.cgrid.attr("transform",k),r.drawAxes(!0),r.layers.aline.select("path").attr("d",M.showline?"M"+p+","+(v+g)+"l"+m/2+",-"+g:"M0,0").call(B_.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),r.layers.bline.select("path").attr("d",x.showline?"M"+p+","+(v+g)+"h"+m:"M0,0").call(B_.stroke,x.linecolor||"#000").style("stroke-width",(x.linewidth||0)+"px"),r.layers.cline.select("path").attr("d",T.showline?"M"+(p+m/2)+","+v+"l"+m/2+","+g:"M0,0").call(B_.stroke,T.linecolor||"#000").style("stroke-width",(T.linewidth||0)+"px"),r.graphDiv._context.staticPlot||r.initInteractions(),YL.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};E1.drawAxes=function(e){var t=this,r=t.graphDiv,i=t.id.slice(7)+"title",n=t.layers,a=t.aaxis,o=t.baxis,s=t.caxis;if(t.drawAx(a),t.drawAx(o),t.drawAx(s),e){var l=Math.max(a.showticklabels?a.tickfont.size/2:0,(s.showticklabels?s.tickfont.size*.75:0)+(s.ticks==="outside"?s.ticklen*.87:0)),u=(o.showticklabels?o.tickfont.size:0)+(o.ticks==="outside"?o.ticklen:0)+3;n["a-title"]=aY.draw(r,"a"+i,{propContainer:a,propName:t.id+".aaxis.title.text",placeholder:WL(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-a.title.font.size/3-l,"text-anchor":"middle"}}),n["b-title"]=aY.draw(r,"b"+i,{propContainer:o,propName:t.id+".baxis.title.text",placeholder:WL(r,"Click to enter Component B title"),attributes:{x:t.x0-u,y:t.y0+t.h+o.title.font.size*.83+u,"text-anchor":"middle"}}),n["c-title"]=aY.draw(r,"c"+i,{propContainer:s,propName:t.id+".caxis.title.text",placeholder:WL(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+s.title.font.size*.83+u,"text-anchor":"middle"}})}};E1.drawAx=function(e){var t=this,r=t.graphDiv,i=e._name,n=i.charAt(0),a=e._id,o=t.layers[i],s=30,l=n+"tickLayout",u=Izt(e);t[l]!==u&&(o.selectAll("."+a+"tick").remove(),t[l]=u),e.setScale();var c=Jy.calcTicks(e),f=Jy.clipEnds(e,c),h=Jy.makeTransTickFn(e),d=Jy.getTickSigns(e)[2],p=Xg.deg2rad(s),v=d*(e.linewidth||1)/2,m=d*e.ticklen,g=t.w,w=t.h,b=n==="b"?"M0,"+v+"l"+Math.sin(p)*m+","+Math.cos(p)*m:"M"+v+",0l"+Math.cos(p)*m+","+-Math.sin(p)*m,_={a:"M0,0l"+w+",-"+g/2,b:"M0,0l-"+g/2+",-"+w,c:"M0,0l-"+w+","+g/2}[n];Jy.drawTicks(r,e,{vals:e.ticks==="inside"?f:c,layer:o,path:b,transFn:h,crisp:!1}),Jy.drawGrid(r,e,{vals:f,layer:t.layers[n+"grid"],path:_,transFn:h,crisp:!1}),Jy.drawLabels(r,e,{vals:c,layer:o,transFn:h,labelFns:Jy.makeLabelFns(e,0,s)})};function Izt(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var zu=aEe.MINZOOM/2+.87,Rzt="m-0.87,.5h"+zu+"v3h-"+(zu+5.2)+"l"+(zu/2+2.6)+",-"+(zu*.87+4.5)+"l2.6,1.5l-"+zu/2+","+zu*.87+"Z",zzt="m0.87,.5h-"+zu+"v3h"+(zu+5.2)+"l-"+(zu/2+2.6)+",-"+(zu*.87+4.5)+"l-2.6,1.5l"+zu/2+","+zu*.87+"Z",Bzt="m0,1l"+zu/2+","+zu*.87+"l2.6,-1.5l-"+(zu/2+2.6)+",-"+(zu*.87+4.5)+"l-"+(zu/2+2.6)+","+(zu*.87+4.5)+"l2.6,1.5l"+zu/2+",-"+zu*.87+"Z",qzt="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",tEe=!0;E1.clearOutline=function(){Pzt(this.dragOptions),Lzt(this.dragOptions.gd)};E1.initInteractions=function(){var e=this,t=e.layers.plotbg.select("path").node(),r=e.graphDiv,i=r._fullLayout._zoomlayer,n,a;this.dragOptions={element:t,gd:r,plotinfo:{id:e.id,domain:r._fullLayout[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis},subplot:e.id,prepFn:function(S,C,k){e.dragOptions.xaxes=[e.xaxis],e.dragOptions.yaxes=[e.yaxis],n=r._fullLayout._invScaleX,a=r._fullLayout._invScaleY;var D=e.dragOptions.dragmode=r._fullLayout.dragmode;eEe(D)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,D==="zoom"?(e.dragOptions.moveFn=x,e.dragOptions.clickFn=g,e.dragOptions.doneFn=T,w(S,C,k)):D==="pan"?(e.dragOptions.moveFn=y,e.dragOptions.clickFn=g,e.dragOptions.doneFn=E,A(),e.clearOutline(r)):(Czt(D)||eEe(D))&&Dzt(S,C,k,e.dragOptions,D)}};var o,s,l,u,c,f,h,d,p,v;function m(S){var C={};return C[e.id+".aaxis.min"]=S.a,C[e.id+".baxis.min"]=S.b,C[e.id+".caxis.min"]=S.c,C}function g(S,C){var k=r._fullLayout.clickmode;rEe(r),S===2&&(r.emit("plotly_doubleclick",null),iY.call("_guiRelayout",r,m({a:0,b:0,c:0}))),k.indexOf("select")>-1&&S===1&&Fzt(C,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),k.indexOf("event")>-1&&QSe.click(r,C,e.id)}function w(S,C,k){var D=t.getBoundingClientRect();o=C-D.left,s=k-D.top,r._fullLayout._calcInverseTransform(r);var F=r._fullLayout._invTransform,P=Xg.apply3DTransform(F)(o,s);o=P[0],s=P[1],l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l,u=e.aaxis.range[1]-l.a,f=B_.luminosity(e.graphDiv._fullLayout[e.id].bgcolor),h="M0,"+e.h+"L"+e.w/2+", 0L"+e.w+","+e.h+"Z",d=!1,p=i.append("path").attr("class","zoombox").attr("transform",S1(e.x0,e.y0)).style({fill:f>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",h),v=i.append("path").attr("class","zoombox-corners").attr("transform",S1(e.x0,e.y0)).style({fill:B_.background,stroke:B_.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(r)}function b(S,C){return 1-C/e.h}function _(S,C){return 1-(S+(e.h-C)/Math.sqrt(3))/e.w}function M(S,C){return(S-(e.h-C)/Math.sqrt(3))/e.w}function x(S,C){var k=o+S*n,D=s+C*a,F=Math.max(0,Math.min(1,b(o,s),b(k,D))),P=Math.max(0,Math.min(1,_(o,s),_(k,D))),R=Math.max(0,Math.min(1,M(o,s),M(k,D))),L=(F/2+R)*e.w,I=(1-F/2-P)*e.w,B=(L+I)/2,O=I-L,$=(1-F)*e.h,Y=$-O/A5;O<aEe.MINZOOM?(c=l,p.attr("d",h),v.attr("d","M0,0Z")):(c={a:l.a+F*u,b:l.b+P*u,c:l.c+R*u},p.attr("d",h+"M"+L+","+$+"H"+I+"L"+B+","+Y+"L"+L+","+$+"Z"),v.attr("d","M"+o+","+s+qzt+"M"+L+","+$+Rzt+"M"+I+","+$+zzt+"M"+B+","+Y+Bzt)),d||(p.transition().style("fill",f>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),v.transition().style("opacity",1).duration(200),d=!0),r.emit("plotly_relayouting",m(c))}function T(){rEe(r),c!==l&&(iY.call("_guiRelayout",r,m(c)),tEe&&r.data&&r._context.showTips&&(Xg.notifier(WL(r,"Double-click to zoom back out"),"long",r),tEe=!1))}function A(){l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l}function y(S,C){var k=S/e.xaxis._m,D=C/e.yaxis._m;c={a:l.a-D,b:l.b+(k+D)/2,c:l.c-(k-D)/2};var F=[c.a,c.b,c.c].sort(Xg.sorterAsc),P={a:F.indexOf(c.a),b:F.indexOf(c.b),c:F.indexOf(c.c)};F[0]<0&&(F[1]+F[0]/2<0?(F[2]+=F[0]+F[1],F[0]=F[1]=0):(F[2]+=F[0]/2,F[1]+=F[0]/2,F[0]=0),c={a:F[P.a],b:F[P.b],c:F[P.c]},C=(l.a-c.a)*e.yaxis._m,S=(l.c-c.c-l.b+c.b)*e.xaxis._m);var R=S1(e.x0+S,e.y0+C);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",R);var L=S1(-S,-C);e.clipDefRelative.select("path").attr("transform",L),e.aaxis.range=[c.a,e.sum-c.b-c.c],e.baxis.range=[e.sum-c.a-c.c,c.b],e.caxis.range=[e.sum-c.a-c.b,c.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(".scatterlayer").selectAll(".trace").call(YL.hideOutsideRangePoints,e),r.emit("plotly_relayouting",m(c))}function E(){iY.call("_guiRelayout",r,m(c))}t.onmousemove=function(S){QSe.hover(r,S,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(S){r._dragging||JSe.unhover(r,S)},JSe.init(this.dragOptions)};function rEe(e){iEe.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var lY=W((iqr,uEe)=>{"use strict";var Ozt=Vl(),Nzt=us().attributes,eo=ec(),Uzt=ls().overrideAll,oY=tn().extendFlat,sY={title:{text:eo.title.text,font:eo.title.font},color:eo.color,tickmode:eo.minor.tickmode,nticks:oY({},eo.nticks,{dflt:6,min:1}),tick0:eo.tick0,dtick:eo.dtick,tickvals:eo.tickvals,ticktext:eo.ticktext,ticks:eo.ticks,ticklen:eo.ticklen,tickwidth:eo.tickwidth,tickcolor:eo.tickcolor,ticklabelstep:eo.ticklabelstep,showticklabels:eo.showticklabels,labelalias:eo.labelalias,showtickprefix:eo.showtickprefix,tickprefix:eo.tickprefix,showticksuffix:eo.showticksuffix,ticksuffix:eo.ticksuffix,showexponent:eo.showexponent,exponentformat:eo.exponentformat,minexponent:eo.minexponent,separatethousands:eo.separatethousands,tickfont:eo.tickfont,tickangle:eo.tickangle,tickformat:eo.tickformat,tickformatstops:eo.tickformatstops,hoverformat:eo.hoverformat,showline:oY({},eo.showline,{dflt:!0}),linecolor:eo.linecolor,linewidth:eo.linewidth,showgrid:oY({},eo.showgrid,{dflt:!0}),gridcolor:eo.gridcolor,gridwidth:eo.gridwidth,griddash:eo.griddash,layer:eo.layer,min:{valType:"number",dflt:0,min:0}},XL=uEe.exports=Uzt({domain:Nzt({name:"ternary"}),bgcolor:{valType:"color",dflt:Ozt.background},sum:{valType:"number",dflt:1,min:0},aaxis:sY,baxis:sY,caxis:sY},"plot","from-root");XL.uirevision={valType:"any",editType:"none"};XL.aaxis.uirevision=XL.baxis.uirevision=XL.caxis.uirevision={valType:"any",editType:"none"}});var q_=W((nqr,cEe)=>{"use strict";var Vzt=it(),Gzt=Da(),Hzt=us().defaults;cEe.exports=function(t,r,i,n){var a=n.type,o=n.attributes,s=n.handleDefaults,l=n.partition||"x",u=r._subplots[a],c=u.length,f=c&&u[0].replace(/\d+$/,""),h,d;function p(w,b){return Vzt.coerce(h,d,o,w,b)}for(var v=0;v<c;v++){var m=u[v];t[m]?h=t[m]:h=t[m]={},d=Gzt.newContainer(r,m,f),n.noUirevision||p("uirevision",r.uirevision);var g={};g[l]=[v/c,(v+1)/c],Hzt(d,r,p,g),n.id=m,s(h,d,p,n)}}});var pEe=W((aqr,dEe)=>{"use strict";var jzt=ni(),$zt=Da(),ZL=it(),Wzt=q_(),Yzt=wy(),Xzt=Ty(),Zzt=vw(),Kzt=Xx(),Jzt=vM(),hEe=lY(),fEe=["aaxis","baxis","caxis"];dEe.exports=function(t,r,i){Wzt(t,r,i,{type:"ternary",attributes:hEe,handleDefaults:Qzt,font:r.font,paper_bgcolor:r.paper_bgcolor})};function Qzt(e,t,r,i){var n=r("bgcolor"),a=r("sum");i.bgColor=jzt.combine(n,i.paper_bgcolor);for(var o,s,l,u=0;u<fEe.length;u++)o=fEe[u],s=e[o]||{},l=$zt.newContainer(t,o),l._name=o,eBt(s,l,i,t);var c=t.aaxis,f=t.baxis,h=t.caxis;c.min+f.min+h.min>=a&&(c.min=0,f.min=0,h.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function eBt(e,t,r,i){var n=hEe[t._name];function a(d,p){return ZL.coerce(e,t,n,d,p)}a("uirevision",i.uirevision),t.type="linear";var o=a("color"),s=o!==n.color.dflt?o:r.font.color,l=t._name,u=l.charAt(0).toUpperCase(),c="Component "+u,f=a("title.text",c);t._hovertitle=f===c?f:u,ZL.coerceFont(a,"title.font",r.font,{overrideDflt:{size:ZL.bigFont(r.font.size),color:s}}),a("min"),Kzt(e,t,a,"linear"),Xzt(e,t,a,"linear"),Yzt(e,t,a,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),Zzt(e,t,a,{outerTicks:!0});var h=a("showticklabels");h&&(ZL.coerceFont(a,"tickfont",r.font,{overrideDflt:{color:s}}),a("tickangle"),a("tickformat")),Jzt(e,t,a,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:n}),a("hoverformat"),a("layer")}});var vEe=W(Pd=>{"use strict";var tBt=lEe(),rBt=_c().getSubplotCalcData,iBt=it().counterRegex,M5="ternary";Pd.name=M5;var nBt=Pd.attr="subplot";Pd.idRoot=M5;Pd.idRegex=Pd.attrRegex=iBt(M5);var aBt=Pd.attributes={};aBt[nBt]={valType:"subplotid",dflt:"ternary",editType:"calc"};Pd.layoutAttributes=lY();Pd.supplyLayoutDefaults=pEe();Pd.plot=function(t){for(var r=t._fullLayout,i=t.calcdata,n=r._subplots[M5],a=0;a<n.length;a++){var o=n[a],s=rBt(i,M5,o),l=r[o]._subplot;l||(l=new tBt({id:o,graphDiv:t,container:r._ternarylayer.node()},r),r[o]._subplot=l),l.plot(s,r,t._promises)}};Pd.clean=function(e,t,r,i){for(var n=i._subplots[M5]||[],a=0;a<n.length;a++){var o=n[a],s=i[o]._subplot;!t[o]&&s&&(s.plotContainer.remove(),s.clipDef.remove(),s.clipDefRelative.remove(),s.layers["a-title"].remove(),s.layers["b-title"].remove(),s.layers["c-title"].remove())}};Pd.updateFx=function(e){var t=e._fullLayout;t._ternarylayer.selectAll("g.toplevel").style("cursor",t.dragmode==="pan"?"move":"crosshair")}});var mEe=W((sqr,gEe)=>{"use strict";gEe.exports={attributes:eY(),supplyDefaults:OSe(),colorbar:Ac(),formatLabels:USe(),calc:jSe(),plot:WSe(),style:th().style,styleOnSelect:th().styleOnSelect,hoverPoints:XSe(),selectPoints:w_(),eventData:KSe(),moduleType:"trace",name:"scatterternary",basePlotModule:vEe(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var xEe=W((lqr,yEe)=>{"use strict";yEe.exports=mEe()});var uY=W((uqr,bEe)=>{"use strict";var Wl=IM(),S5=tn().extendFlat,_Ee=_s().axisHoverFormat;bEe.exports={y:Wl.y,x:Wl.x,x0:Wl.x0,y0:Wl.y0,xhoverformat:_Ee("x"),yhoverformat:_Ee("y"),name:S5({},Wl.name,{}),orientation:S5({},Wl.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:Wl.fillcolor,points:S5({},Wl.boxpoints,{}),jitter:S5({},Wl.jitter,{}),pointpos:S5({},Wl.pointpos,{}),width:S5({},Wl.width,{}),marker:Wl.marker,text:Wl.text,hovertext:Wl.hovertext,hovertemplate:Wl.hovertemplate,hovertemplatefallback:Wl.hovertemplatefallback,quartilemethod:Wl.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:Wl.offsetgroup,alignmentgroup:Wl.alignmentgroup,selected:Wl.selected,unselected:Wl.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:Wl.zorder}});var hY=W((cqr,wEe)=>{"use strict";var cY=RM(),fY=it().extendFlat;wEe.exports={violinmode:fY({},cY.boxmode,{}),violingap:fY({},cY.boxgap,{}),violingroupgap:fY({},cY.boxgroupgap,{})}});var EEe=W((fqr,SEe)=>{"use strict";var TEe=it(),oBt=ni(),AEe=BM(),MEe=uY();SEe.exports=function(t,r,i,n){function a(M,x){return TEe.coerce(t,r,MEe,M,x)}function o(M,x){return TEe.coerce2(t,r,MEe,M,x)}if(AEe.handleSampleDefaults(t,r,a,n),r.visible!==!1){a("bandwidth"),a("side");var s=a("width");s||(a("scalegroup",r.name),a("scalemode"));var l=a("span"),u;Array.isArray(l)&&(u="manual"),a("spanmode",u);var c=a("line.color",(t.marker||{}).color||i),f=a("line.width"),h=a("fillcolor",oBt.addOpacity(r.line.color,.5));AEe.handlePointsDefaults(t,r,a,{prefix:""});var d=o("box.width"),p=o("box.fillcolor",h),v=o("box.line.color",c),m=o("box.line.width",f),g=a("box.visible",!!(d||p||v||m));g||(r.box={visible:!1});var w=o("meanline.color",c),b=o("meanline.width",f),_=a("meanline.visible",!!(w||b));_||(r.meanline={visible:!1}),a("quartilemethod"),a("zorder")}}});var CEe=W((hqr,kEe)=>{"use strict";var sBt=it(),lBt=hY(),uBt=lL();kEe.exports=function(t,r,i){function n(a,o){return sBt.coerce(t,r,lBt,a,o)}uBt._supply(t,r,i,n,"violin")}});var KL=W(O_=>{"use strict";var cBt=it(),fBt={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};O_.makeKDE=function(e,t,r){var i=r.length,n=fBt.gaussian,a=e.bandwidth,o=1/(i*a);return function(s){for(var l=0,u=0;u<i;u++)l+=n((s-r[u])/a);return o*l}};O_.getPositionOnKdePath=function(e,t,r){var i,n;t.orientation==="h"?(i="y",n="x"):(i="x",n="y");var a=cBt.findPointOnPath(e.path,r,n,{pathLength:e.pathLength}),o=e.posCenterPx,s=a[i],l=t.side==="both"?2*o-s:o;return[s,l]};O_.getKdeValue=function(e,t,r){var i=e.pts.map(O_.extractVal),n=O_.makeKDE(e,t,i);return n(r)/e.posDensityScale};O_.extractVal=function(e){return e.v}});var LEe=W((pqr,FEe)=>{"use strict";var dY=it(),pY=ji(),hBt=aW(),DEe=KL(),dBt=Kn().BADNUM;FEe.exports=function(t,r){var i=hBt(t,r);if(i[0].t.empty)return i;for(var n=t._fullLayout,a=pY.getFromId(t,r[r.orientation==="h"?"xaxis":"yaxis"]),o=1/0,s=-1/0,l=0,u=0,c=0;c<i.length;c++){var f=i[c],h=f.pts.map(DEe.extractVal),d=f.bandwidth=vBt(r,f,h),p=f.span=gBt(r,f,a,d);if(f.min===f.max&&d===0)p=f.span=[f.min,f.max],f.density=[{v:1,t:p[0]}],f.bandwidth=d,l=Math.max(l,1);else{var v=p[1]-p[0],m=Math.ceil(v/(d/3)),g=v/m;if(!isFinite(g)||!isFinite(m))return dY.error("Something went wrong with computing the violin span"),i[0].t.empty=!0,i;var w=DEe.makeKDE(f,r,h);f.density=new Array(m+1);for(var b=0;b<f.density.length;b++){var _=p[0]+b*g,M=w(_);f.density[b]={v:M,t:_},l=Math.max(l,M)}}u=Math.max(u,h.length),o=Math.min(o,p[0]),s=Math.max(s,p[1])}var x=pY.findExtremes(a,[o,s],{padded:!0});if(r._extremes[a._id]=x,r.width)i[0].t.maxKDE=l;else{var T=n._violinScaleGroupStats,A=r.scalegroup,y=T[A];y?(y.maxKDE=Math.max(y.maxKDE,l),y.maxCount=Math.max(y.maxCount,u)):T[A]={maxKDE:l,maxCount:u}}return i[0].t.labels.kde=dY._(t,"kde:"),i};function pBt(e,t,r){var i=Math.min(t,r/1.349);return 1.059*i*Math.pow(e,-.2)}function vBt(e,t,r){var i=t.max-t.min;if(!i)return e.bandwidth?e.bandwidth:0;if(e.bandwidth)return Math.max(e.bandwidth,i/1e4);var n=r.length,a=dY.stdev(r,n-1,t.mean);return Math.max(pBt(n,a,t.q3-t.q1),i/100)}function gBt(e,t,r,i){var n=e.spanmode,a=e.span||[],o=[t.min,t.max],s=[t.min-2*i,t.max+2*i],l;function u(f){var h=a[f],d=r.type==="multicategory"?r.r2c(h):r.d2c(h,0,e[t.valLetter+"calendar"]);return d===dBt?s[f]:d}n==="soft"?l=s:n==="hard"?l=o:l=[u(0),u(1)];var c={type:"linear",range:l};return pY.setConvert(c),c.cleanRange(),l}});var REe=W((vqr,IEe)=>{"use strict";var mBt=cL().setPositionOffset,PEe=["v","h"];IEe.exports=function(t,r){for(var i=t.calcdata,n=r.xaxis,a=r.yaxis,o=0;o<PEe.length;o++){for(var s=PEe[o],l=s==="h"?a:n,u=[],c=0;c<i.length;c++){var f=i[c],h=f[0].t,d=f[0].trace;d.visible===!0&&d.type==="violin"&&!h.empty&&d.orientation===s&&d.xaxis===n._id&&d.yaxis===a._id&&u.push(c)}mBt("violin",t,u,l)}}});var BEe=W((gqr,zEe)=>{"use strict";var vY=vi(),gY=it(),yBt=Ji(),mY=fL(),xBt=Hj(),_Bt=KL();zEe.exports=function(t,r,i,n){var a=t._context.staticPlot,o=t._fullLayout,s=r.xaxis,l=r.yaxis;function u(c,f){var h=xBt(c,{xaxis:s,yaxis:l,trace:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return yBt.smoothopen(h[0],1)}gY.makeTraceGroups(n,i,"trace violins").each(function(c){var f=vY.select(this),h=c[0],d=h.t,p=h.trace;if(p.visible!==!0||d.empty){f.remove();return}var v=d.bPos,m=d.bdPos,g=r[d.valLetter+"axis"],w=r[d.posLetter+"axis"],b=p.side==="both",_=b||p.side==="positive",M=b||p.side==="negative",x=f.selectAll("path.violin").data(gY.identity);x.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","violin"),x.exit().remove(),x.each(function(D){var F=vY.select(this),P=D.density,R=P.length,L=w.c2l(D.pos+v,!0),I=w.l2p(L),B;if(p.width)B=d.maxKDE/m;else{var O=o._violinScaleGroupStats[p.scalegroup];B=p.scalemode==="count"?O.maxKDE/m*(O.maxCount/D.pts.length):O.maxKDE/m}var $,Y,K,j,q,J,U;if(_){for(J=new Array(R),j=0;j<R;j++)U=J[j]={},U[d.posLetter]=L+P[j].v/B,U[d.valLetter]=g.c2l(P[j].t,!0);$=u(J,p)}if(M){for(J=new Array(R),q=0,j=R-1;q<R;q++,j--)U=J[q]={},U[d.posLetter]=L-P[j].v/B,U[d.valLetter]=g.c2l(P[j].t,!0);Y=u(J,p)}if(b)K=$+"L"+Y.slice(1)+"Z";else{var V=[I,g.c2p(P[0].t)],X=[I,g.c2p(P[R-1].t)];p.orientation==="h"&&(V.reverse(),X.reverse()),_?K="M"+V+"L"+$.slice(1)+"L"+X:K="M"+X+"L"+Y.slice(1)+"L"+V}F.attr("d",K),D.posCenterPx=I,D.posDensityScale=B*m,D.path=F.node(),D.pathLength=D.path.getTotalLength()/(b?2:1)});var T=p.box,A=T.width,y=(T.line||{}).width,E,S;b?(E=m*A,S=0):_?(E=[0,m*A/2],S=y*{x:1,y:-1}[d.posLetter]):(E=[m*A/2,0],S=y*{x:-1,y:1}[d.posLetter]),mY.plotBoxAndWhiskers(f,{pos:w,val:g},p,{bPos:v,bdPos:E,bPosPxOffset:S}),mY.plotBoxMean(f,{pos:w,val:g},p,{bPos:v,bdPos:E,bPosPxOffset:S});var C;!p.box.visible&&p.meanline.visible&&(C=gY.identity);var k=f.selectAll("path.meanline").data(C||[]);k.enter().append("path").attr("class","meanline").style("fill","none").style("vector-effect",a?"none":"non-scaling-stroke"),k.exit().remove(),k.each(function(D){var F=g.c2p(D.mean,!0),P=_Bt.getPositionOnKdePath(D,p,F);vY.select(this).attr("d",p.orientation==="h"?"M"+F+","+P[0]+"V"+P[1]:"M"+P[0]+","+F+"H"+P[1])}),mY.plotPoints(f,{x:s,y:l},p,d)})}});var NEe=W((mqr,OEe)=>{"use strict";var qEe=vi(),E5=ni(),bBt=th().stylePoints;OEe.exports=function(t){var r=qEe.select(t).selectAll("g.trace.violins");r.style("opacity",function(i){return i[0].trace.opacity}),r.each(function(i){var n=i[0].trace,a=qEe.select(this),o=n.box||{},s=o.line||{},l=n.meanline||{},u=l.width;a.selectAll("path.violin").style("stroke-width",n.line.width+"px").call(E5.stroke,n.line.color).call(E5.fill,n.fillcolor),a.selectAll("path.box").style("stroke-width",s.width+"px").call(E5.stroke,s.color).call(E5.fill,o.fillcolor);var c={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};a.selectAll("path.mean").style(c).call(E5.stroke,l.color),a.selectAll("path.meanline").style(c).call(E5.stroke,l.color),bBt(a,n,t)})}});var HEe=W((yqr,GEe)=>{"use strict";var wBt=ni(),yY=it(),TBt=ji(),UEe=cW(),VEe=KL();GEe.exports=function(t,r,i,n,a){a||(a={});var o=a.hoverLayer,s=t.cd,l=s[0].trace,u=l.hoveron,c=u.indexOf("violins")!==-1,f=u.indexOf("kde")!==-1,h=[],d,p;if(c||f){var v=UEe.hoverOnBoxes(t,r,i,n);if(f&&v.length>0){var m=t.xa,g=t.ya,w,b,_,M,x;l.orientation==="h"?(x=r,w="y",_=g,b="x",M=m):(x=i,w="x",_=m,b="y",M=g);var T=s[t.index];if(x>=T.span[0]&&x<=T.span[1]){var A=yY.extendFlat({},t),y=M.c2p(x,!0),E=VEe.getKdeValue(T,l,x),S=VEe.getPositionOnKdePath(T,l,y),C=_._offset,k=_._length;A[w+"0"]=S[0],A[w+"1"]=S[1],A[b+"0"]=A[b+"1"]=y,A[b+"Label"]=b+": "+TBt.hoverLabelText(M,x,l[b+"hoverformat"])+", "+s[0].t.labels.kde+" "+E.toFixed(3);for(var D=0,F=0;F<v.length;F++)if(v[F].attr==="med"){D=F;break}A.spikeDistance=v[D].spikeDistance;var P=w+"Spike";A[P]=v[D][P],v[D].spikeDistance=void 0,v[D][P]=void 0,A.hovertemplate=!1,h.push(A),p={},p[w+"1"]=yY.constrain(C+S[0],C,C+k),p[w+"2"]=yY.constrain(C+S[1],C,C+k),p[b+"1"]=p[b+"2"]=M._offset+y}}c&&(h=h.concat(v))}u.indexOf("points")!==-1&&(d=UEe.hoverOnPoints(t,r,i));var R=o.selectAll(".violinline-"+l.uid).data(p?[0]:[]);return R.enter().append("line").classed("violinline-"+l.uid,!0).attr("stroke-width",1.5),R.exit().remove(),R.attr(p).call(wBt.stroke,t.color),n==="closest"?d?[d]:h:(d&&h.push(d),h)}});var $Ee=W((xqr,jEe)=>{"use strict";jEe.exports={attributes:uY(),layoutAttributes:hY(),supplyDefaults:EEe(),crossTraceDefaults:BM().crossTraceDefaults,supplyLayoutDefaults:CEe(),calc:LEe(),crossTraceCalc:REe(),plot:BEe(),style:NEe(),styleOnSelect:th().styleOnSelect,hoverPoints:HEe(),selectPoints:fW(),moduleType:"trace",name:"violin",basePlotModule:dl(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var YEe=W((_qr,WEe)=>{"use strict";WEe.exports=$Ee()});var ZEe=W((bqr,XEe)=>{"use strict";XEe.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}});var _Y=W((wqr,eke)=>{"use strict";var cs=w1(),xY=Ns().line,ABt=Wa(),KEe=_s().axisHoverFormat,{hovertemplateAttrs:MBt,texttemplateAttrs:SBt,templatefallbackAttrs:JEe}=Ga(),QEe=ZEe(),Zg=tn().extendFlat,EBt=ni();eke.exports={x:cs.x,x0:cs.x0,dx:cs.dx,y:cs.y,y0:cs.y0,dy:cs.dy,xperiod:cs.xperiod,yperiod:cs.yperiod,xperiod0:cs.xperiod0,yperiod0:cs.yperiod0,xperiodalignment:cs.xperiodalignment,yperiodalignment:cs.yperiodalignment,xhoverformat:KEe("x"),yhoverformat:KEe("y"),hovertext:cs.hovertext,hovertemplate:MBt({},{keys:QEe.eventDataKeys}),hovertemplatefallback:JEe(),hoverinfo:Zg({},ABt.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:SBt({editType:"plot"},{keys:QEe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:JEe({editType:"plot"}),text:cs.text,textposition:cs.textposition,insidetextanchor:Zg({},cs.insidetextanchor,{dflt:"middle"}),textangle:Zg({},cs.textangle,{dflt:0}),textfont:cs.textfont,insidetextfont:cs.insidetextfont,outsidetextfont:cs.outsidetextfont,constraintext:cs.constraintext,cliponaxis:cs.cliponaxis,orientation:Zg({},cs.orientation,{}),offset:Zg({},cs.offset,{arrayOk:!1}),width:Zg({},cs.width,{arrayOk:!1}),marker:kBt(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:Zg({},xY.color,{dflt:EBt.defaultLine}),width:Zg({},xY.width,{dflt:0,editType:"plot"}),dash:xY.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:cs.offsetgroup,alignmentgroup:cs.alignmentgroup,zorder:cs.zorder};function kBt(){var e=Zg({},cs.marker);return delete e.pattern,delete e.cornerradius,e}});var bY=W((Tqr,tke)=>{"use strict";tke.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}});var TY=W((Aqr,ike)=>{"use strict";var JL=it(),CBt=__(),DBt=E0().handleText,FBt=x_(),LBt=Hp(),rke=_Y(),wY=ni();function PBt(e,t,r,i){function n(f,h){return JL.coerce(e,t,rke,f,h)}var a=FBt(e,t,i,n);if(!a){t.visible=!1;return}LBt(e,t,i,n),n("xhoverformat"),n("yhoverformat"),n("orientation",t.y&&!t.x?"v":"h"),n("offset"),n("width");var o=n("text");n("hovertext"),n("hovertemplate"),n("hovertemplatefallback");var s=n("textposition");DBt(e,t,i,n,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&!t.texttemplate&&n("textinfo",JL.isArrayOrTypedArray(o)?"text+value":"value");var l=n("marker.color",r);n("marker.line.color",wY.defaultLine),n("marker.line.width");var u=n("connector.visible");if(u){n("connector.fillcolor",IBt(l));var c=n("connector.line.width");c&&(n("connector.line.color"),n("connector.line.dash"))}n("zorder")}function IBt(e){var t=JL.isArrayOrTypedArray(e)?"#000":e;return wY.addOpacity(t,.5*wY.opacity(t))}function RBt(e,t){var r,i;function n(o){return JL.coerce(i._input,i,rke,o)}for(var a=0;a<e.length;a++)i=e[a],i.type==="funnel"&&(r=i._input,CBt(r,i,t,n,t.funnelmode))}ike.exports={supplyDefaults:PBt,crossTraceDefaults:RBt}});var ake=W((Mqr,nke)=>{"use strict";var zBt=it(),BBt=bY();nke.exports=function(e,t,r){var i=!1;function n(s,l){return zBt.coerce(e,t,BBt,s,l)}for(var a=0;a<r.length;a++){var o=r[a];if(o.visible&&o.type==="funnel"){i=!0;break}}i&&(n("funnelmode"),n("funnelgap",.2),n("funnelgroupgap"))}});var ske=W((Sqr,oke)=>{"use strict";var k5=it();oke.exports=function(t,r){for(var i=0;i<t.length;i++)t[i].i=i;k5.mergeArray(r.text,t,"tx"),k5.mergeArray(r.hovertext,t,"htx");var n=r.marker;if(n){k5.mergeArray(n.opacity,t,"mo"),k5.mergeArray(n.color,t,"mc");var a=n.line;a&&(k5.mergeArray(a.color,t,"mlc"),k5.mergeArrayCastPositive(a.width,t,"mlw"))}}});var fke=W((Eqr,cke)=>{"use strict";var lke=ji(),uke=Wp(),qBt=ske(),OBt=w0(),KM=Kn().BADNUM;cke.exports=function(t,r){var i=lke.getFromId(t,r.xaxis||"x"),n=lke.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c,f,h;r.orientation==="h"?(a=i.makeCalcdata(r,"x"),s=n.makeCalcdata(r,"y"),l=uke(r,n,"y",s),u=!!r.yperiodalignment,c="y"):(a=n.makeCalcdata(r,"y"),s=i.makeCalcdata(r,"x"),l=uke(r,i,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;var d=Math.min(o.length,a.length),p=new Array(d);for(r._base=[],f=0;f<d;f++){a[f]<0&&(a[f]=KM);var v=!1;a[f]!==KM&&f+1<d&&a[f+1]!==KM&&(v=!0),h=p[f]={p:o[f],s:a[f],cNext:v},r._base[f]=-.5*h.s,u&&(p[f].orig_p=s[f],p[f][c+"End"]=l.ends[f],p[f][c+"Start"]=l.starts[f]),r.ids&&(h.id=String(r.ids[f])),f===0&&(p[0].vTotal=0),p[0].vTotal+=AY(h.s),h.begR=AY(h.s)/AY(p[0].s)}var m;for(f=0;f<d;f++)h=p[f],h.s!==KM&&(h.sumR=h.s/p[0].vTotal,h.difR=m!==void 0?h.s/m:1,m=h.s);return qBt(p,r),OBt(p,r),p};function AY(e){return e===KM?0:e}});var pke=W((kqr,dke)=>{"use strict";var hke=b_().setGroupPositions;dke.exports=function(t,r){var i=t._fullLayout,n=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h<n.length;h++){var d=n[h],p=d.orientation==="h";d.visible===!0&&d.xaxis===o._id&&d.yaxis===s._id&&d.type==="funnel"&&(f=a[h],p?c.push(f):u.push(f),l.push(f))}var v={mode:i.funnelmode,norm:i.funnelnorm,gap:i.funnelgap,groupgap:i.funnelgroupgap};for(hke(t,o,s,u,v),hke(t,s,o,c,v),h=0;h<l.length;h++){f=l[h];for(var m=0;m<f.length;m++)m+1<f.length&&(f[m].nextP0=f[m+1].p0,f[m].nextS0=f[m+1].s0,f[m].nextP1=f[m+1].p1,f[m].nextS1=f[m+1].s1)}}});var yke=W((Cqr,mke)=>{"use strict";var QL=vi(),e2=it(),vke=Ji(),Qy=Kn().BADNUM,NBt=I_(),UBt=Qc().clearMinTextSize;mke.exports=function(t,r,i,n){var a=t._fullLayout;UBt("funnel",a),VBt(t,r,i,n),GBt(t,r,i,n),NBt.plot(t,r,i,n,{mode:a.funnelmode,norm:a.funnelmode,gap:a.funnelgap,groupgap:a.funnelgroupgap})};function VBt(e,t,r,i){var n=t.xaxis,a=t.yaxis;e2.makeTraceGroups(i,r,"trace bars").each(function(o){var s=QL.select(this),l=o[0].trace,u=e2.ensureSingle(s,"g","regions");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.region").data(e2.identity);f.enter().append("g").classed("region",!0),f.exit().remove();var h=f.size();f.each(function(d,p){if(!(p!==h-1&&!d.cNext)){var v=gke(d,n,a,c),m=v[0],g=v[1],w="";m[0]!==Qy&&g[0]!==Qy&&m[1]!==Qy&&g[1]!==Qy&&m[2]!==Qy&&g[2]!==Qy&&m[3]!==Qy&&g[3]!==Qy&&(c?w+="M"+m[0]+","+g[1]+"L"+m[2]+","+g[2]+"H"+m[3]+"L"+m[1]+","+g[1]+"Z":w+="M"+m[1]+","+g[1]+"L"+m[2]+","+g[3]+"V"+g[2]+"L"+m[1]+","+g[0]+"Z"),w===""&&(w="M0,0Z"),e2.ensureSingle(QL.select(this),"path").attr("d",w).call(vke.setClipUrl,t.layerClipId,e)}})})}function GBt(e,t,r,i){var n=t.xaxis,a=t.yaxis;e2.makeTraceGroups(i,r,"trace bars").each(function(o){var s=QL.select(this),l=o[0].trace,u=e2.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible||!l.connector.line.width){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.line").data(e2.identity);f.enter().append("g").classed("line",!0),f.exit().remove();var h=f.size();f.each(function(d,p){if(!(p!==h-1&&!d.cNext)){var v=gke(d,n,a,c),m=v[0],g=v[1],w="";m[3]!==void 0&&g[3]!==void 0&&(c?(w+="M"+m[0]+","+g[1]+"L"+m[2]+","+g[2],w+="M"+m[1]+","+g[1]+"L"+m[3]+","+g[2]):(w+="M"+m[1]+","+g[1]+"L"+m[2]+","+g[3],w+="M"+m[1]+","+g[0]+"L"+m[2]+","+g[2])),w===""&&(w="M0,0Z"),e2.ensureSingle(QL.select(this),"path").attr("d",w).call(vke.setClipUrl,t.layerClipId,e)}})})}function gke(e,t,r,i){var n=[],a=[],o=i?t:r,s=i?r:t;return n[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),n[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),n[2]=o.c2p(e.nextS0,!0),a[2]=s.c2p(e.nextP0,!0),n[3]=o.c2p(e.nextS1,!0),a[3]=s.c2p(e.nextP1,!0),i?[n,a]:[a,n]}});var bke=W((Dqr,_ke)=>{"use strict";var JM=vi(),xke=Ji(),MY=ni(),HBt=kg().DESELECTDIM,jBt=Ed(),$Bt=Qc().resizeText,WBt=jBt.styleTextPoints;function YBt(e,t,r){var i=r||JM.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");$Bt(e,i,"funnel"),i.style("opacity",function(n){return n[0].trace.opacity}),i.each(function(n){var a=JM.select(this),o=n[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o.marker;JM.select(this).call(MY.fill,s.mc||l.color).call(MY.stroke,s.mlc||l.line.color).call(xke.dashLine,l.line.dash,s.mlw||l.line.width).style("opacity",o.selectedpoints&&!s.selected?HBt:1)}}),WBt(a,o,e),a.selectAll(".regions").each(function(){JM.select(this).selectAll("path").style("stroke-width",0).call(MY.fill,o.connector.fillcolor)}),a.selectAll(".lines").each(function(){var s=o.connector.line;xke.lineGroupStyle(JM.select(this).selectAll("path"),s.width,s.color,s.dash)})})}_ke.exports={style:YBt}});var Ake=W((Fqr,Tke)=>{"use strict";var wke=ni().opacity,XBt=c5().hoverOnBars,SY=it().formatPercent;Tke.exports=function(t,r,i,n,a){var o=XBt(t,r,i,n,a);if(o){var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=o.index,f=s[c],h=u?"x":"y";o[h+"LabelVal"]=f.s,o.percentInitial=f.begR,o.percentInitialLabel=SY(f.begR,1),o.percentPrevious=f.difR,o.percentPreviousLabel=SY(f.difR,1),o.percentTotal=f.sumR,o.percentTotalLabel=SY(f.sumR,1);var d=f.hi||l.hoverinfo,p=[];if(d&&d!=="none"&&d!=="skip"){var v=d==="all",m=d.split("+"),g=function(w){return v||m.indexOf(w)!==-1};g("percent initial")&&p.push(o.percentInitialLabel+" of initial"),g("percent previous")&&p.push(o.percentPreviousLabel+" of previous"),g("percent total")&&p.push(o.percentTotalLabel+" of total")}return o.extraText=p.join("<br>"),o.color=ZBt(l,f),[o]}};function ZBt(e,t){var r=e.marker,i=t.mc||r.color,n=t.mlc||r.line.color,a=t.mlw||r.line.width;if(wke(i))return i;if(wke(n)&&a)return n}});var Ske=W((Lqr,Mke)=>{"use strict";Mke.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"percentInitial"in r&&(t.percentInitial=r.percentInitial),"percentPrevious"in r&&(t.percentPrevious=r.percentPrevious),"percentTotal"in r&&(t.percentTotal=r.percentTotal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var kke=W((Pqr,Eke)=>{"use strict";Eke.exports={attributes:_Y(),layoutAttributes:bY(),supplyDefaults:TY().supplyDefaults,crossTraceDefaults:TY().crossTraceDefaults,supplyLayoutDefaults:ake(),calc:fke(),crossTraceCalc:pke(),plot:yke(),style:bke().style,hoverPoints:Ake(),eventData:Ske(),selectPoints:f5(),moduleType:"trace",name:"funnel",basePlotModule:dl(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var Dke=W((Iqr,Cke)=>{"use strict";Cke.exports=kke()});var Lke=W((Rqr,Fke)=>{"use strict";Fke.exports={eventDataKeys:["initial","delta","final"]}});var CY=W((zqr,zke)=>{"use strict";var Yo=w1(),EY=Ns().line,KBt=Wa(),Pke=_s().axisHoverFormat,{hovertemplateAttrs:JBt,texttemplateAttrs:QBt,templatefallbackAttrs:Ike}=Ga(),Rke=Lke(),C5=tn().extendFlat,eqt=ni();function kY(e){return{marker:{color:C5({},Yo.marker.color,{arrayOk:!1,editType:"style"}),line:{color:C5({},Yo.marker.line.color,{arrayOk:!1,editType:"style"}),width:C5({},Yo.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}zke.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:Yo.x,x0:Yo.x0,dx:Yo.dx,y:Yo.y,y0:Yo.y0,dy:Yo.dy,xperiod:Yo.xperiod,yperiod:Yo.yperiod,xperiod0:Yo.xperiod0,yperiod0:Yo.yperiod0,xperiodalignment:Yo.xperiodalignment,yperiodalignment:Yo.yperiodalignment,xhoverformat:Pke("x"),yhoverformat:Pke("y"),hovertext:Yo.hovertext,hovertemplate:JBt({},{keys:Rke.eventDataKeys}),hovertemplatefallback:Ike(),hoverinfo:C5({},KBt.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:QBt({editType:"plot"},{keys:Rke.eventDataKeys.concat(["label"])}),texttemplatefallback:Ike({editType:"plot"}),text:Yo.text,textposition:Yo.textposition,insidetextanchor:Yo.insidetextanchor,textangle:Yo.textangle,textfont:Yo.textfont,insidetextfont:Yo.insidetextfont,outsidetextfont:Yo.outsidetextfont,constraintext:Yo.constraintext,cliponaxis:Yo.cliponaxis,orientation:Yo.orientation,offset:Yo.offset,width:Yo.width,increasing:kY("increasing"),decreasing:kY("decreasing"),totals:kY("intermediate sums and total"),connector:{line:{color:C5({},EY.color,{dflt:eqt.defaultLine}),width:C5({},EY.width,{editType:"plot"}),dash:EY.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:Yo.offsetgroup,alignmentgroup:Yo.alignmentgroup,zorder:Yo.zorder}});var DY=W((Bqr,Bke)=>{"use strict";Bke.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}});var D5=W((qqr,qke)=>{"use strict";qke.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}});var LY=W((Oqr,Vke)=>{"use strict";var Oke=it(),tqt=__(),rqt=E0().handleText,iqt=x_(),nqt=Hp(),Nke=CY(),aqt=ni(),Uke=D5(),oqt=Uke.INCREASING.COLOR,sqt=Uke.DECREASING.COLOR,lqt="#4499FF";function FY(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",aqt.defaultLine),e(t+".marker.line.width")}function uqt(e,t,r,i){function n(u,c){return Oke.coerce(e,t,Nke,u,c)}var a=iqt(e,t,i,n);if(!a){t.visible=!1;return}nqt(e,t,i,n),n("xhoverformat"),n("yhoverformat"),n("measure"),n("orientation",t.x&&!t.y?"h":"v"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback");var o=n("textposition");rqt(e,t,i,n,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&(n("texttemplate"),n("texttemplatefallback"),t.texttemplate||n("textinfo")),FY(n,"increasing",oqt),FY(n,"decreasing",sqt),FY(n,"totals",lqt);var s=n("connector.visible");if(s){n("connector.mode");var l=n("connector.line.width");l&&(n("connector.line.color"),n("connector.line.dash"))}n("zorder")}function cqt(e,t){var r,i;function n(o){return Oke.coerce(i._input,i,Nke,o)}if(t.waterfallmode==="group")for(var a=0;a<e.length;a++)i=e[a],r=i._input,tqt(r,i,t,n,t.waterfallmode)}Vke.exports={supplyDefaults:uqt,crossTraceDefaults:cqt}});var Hke=W((Nqr,Gke)=>{"use strict";var fqt=it(),hqt=DY();Gke.exports=function(e,t,r){var i=!1;function n(s,l){return fqt.coerce(e,t,hqt,s,l)}for(var a=0;a<r.length;a++){var o=r[a];if(o.visible&&o.type==="waterfall"){i=!0;break}}i&&(n("waterfallmode"),n("waterfallgap",.2),n("waterfallgroupgap"))}});var Zke=W((Uqr,Xke)=>{"use strict";var jke=ji(),$ke=Wp(),Wke=it().mergeArray,dqt=w0(),Yke=Kn().BADNUM;function PY(e){return e==="a"||e==="absolute"}function IY(e){return e==="t"||e==="total"}Xke.exports=function(t,r){var i=jke.getFromId(t,r.xaxis||"x"),n=jke.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c;r.orientation==="h"?(a=i.makeCalcdata(r,"x"),s=n.makeCalcdata(r,"y"),l=$ke(r,n,"y",s),u=!!r.yperiodalignment,c="y"):(a=n.makeCalcdata(r,"y"),s=i.makeCalcdata(r,"x"),l=$ke(r,i,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var f=Math.min(o.length,a.length),h=new Array(f),d=0,p,v=!1,m=0;m<f;m++){var g=a[m]||0,w=!1;(a[m]!==Yke||IY(r.measure[m])||PY(r.measure[m]))&&m+1<f&&(a[m+1]!==Yke||IY(r.measure[m+1])||PY(r.measure[m+1]))&&(w=!0);var b=h[m]={i:m,p:o[m],s:g,rawS:g,cNext:w};PY(r.measure[m])?(d=b.s,b.isSum=!0,b.dir="totals",b.s=d):IY(r.measure[m])?(b.isSum=!0,b.dir="totals",b.s=d):(b.isSum=!1,b.dir=b.rawS<0?"decreasing":"increasing",p=b.s,b.s=d+p,d+=p),b.dir==="totals"&&(v=!0),u&&(h[m].orig_p=s[m],h[m][c+"End"]=l.ends[m],h[m][c+"Start"]=l.starts[m]),r.ids&&(b.id=String(r.ids[m])),b.v=(r.base||0)+d}return h.length&&(h[0].hasTotals=v),Wke(r.text,h,"tx"),Wke(r.hovertext,h,"htx"),dqt(h,r),h}});var Qke=W((Vqr,Jke)=>{"use strict";var Kke=b_().setGroupPositions;Jke.exports=function(t,r){var i=t._fullLayout,n=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h<n.length;h++){var d=n[h];d.visible===!0&&d.xaxis===o._id&&d.yaxis===s._id&&d.type==="waterfall"&&(f=a[h],d.orientation==="h"?c.push(f):u.push(f),l.push(f))}var p={mode:i.waterfallmode,norm:i.waterfallnorm,gap:i.waterfallgap,groupgap:i.waterfallgroupgap};for(Kke(t,o,s,u,p),Kke(t,s,o,c,p),h=0;h<l.length;h++){f=l[h];for(var v=0;v<f.length;v++){var m=f[v];m.isSum===!1&&(m.s0+=v===0?0:f[v-1].s),v+1<f.length&&(f[v].nextP0=f[v+1].p0,f[v].nextS0=f[v+1].s0)}}}});var r8e=W((Gqr,t8e)=>{"use strict";var e8e=vi(),e9=it(),pqt=Ji(),F5=Kn().BADNUM,vqt=I_(),gqt=Qc().clearMinTextSize;t8e.exports=function(t,r,i,n){var a=t._fullLayout;gqt("waterfall",a),vqt.plot(t,r,i,n,{mode:a.waterfallmode,norm:a.waterfallmode,gap:a.waterfallgap,groupgap:a.waterfallgroupgap}),mqt(t,r,i,n)};function mqt(e,t,r,i){var n=t.xaxis,a=t.yaxis;e9.makeTraceGroups(i,r,"trace bars").each(function(o){var s=e8e.select(this),l=o[0].trace,u=e9.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=l.connector.mode,h=u.selectAll("g.line").data(e9.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var d=h.size();h.each(function(p,v){if(!(v!==d-1&&!p.cNext)){var m=yqt(p,n,a,c),g=m[0],w=m[1],b="";g[0]!==F5&&w[0]!==F5&&g[1]!==F5&&w[1]!==F5&&(f==="spanning"&&!p.isSum&&v>0&&(c?b+="M"+g[0]+","+w[1]+"V"+w[0]:b+="M"+g[1]+","+w[0]+"H"+g[0]),f!=="between"&&(p.isSum||v<d-1)&&(c?b+="M"+g[1]+","+w[0]+"V"+w[1]:b+="M"+g[0]+","+w[1]+"H"+g[1]),g[2]!==F5&&w[2]!==F5&&(c?b+="M"+g[1]+","+w[1]+"V"+w[2]:b+="M"+g[1]+","+w[1]+"H"+g[2])),b===""&&(b="M0,0Z"),e9.ensureSingle(e8e.select(this),"path").attr("d",b).call(pqt.setClipUrl,t.layerClipId,e)}})})}function yqt(e,t,r,i){var n=[],a=[],o=i?t:r,s=i?r:t;return n[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),n[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),n[2]=o.c2p(e.nextS0,!0),a[2]=s.c2p(e.nextP0,!0),i?[n,a]:[a,n]}});var o8e=W((Hqr,a8e)=>{"use strict";var t9=vi(),i8e=Ji(),n8e=ni(),xqt=kg().DESELECTDIM,_qt=Ed(),bqt=Qc().resizeText,wqt=_qt.styleTextPoints;function Tqt(e,t,r){var i=r||t9.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");bqt(e,i,"waterfall"),i.style("opacity",function(n){return n[0].trace.opacity}),i.each(function(n){var a=t9.select(this),o=n[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o[s.dir].marker;t9.select(this).call(n8e.fill,l.color).call(n8e.stroke,l.line.color).call(i8e.dashLine,l.line.dash,l.line.width).style("opacity",o.selectedpoints&&!s.selected?xqt:1)}}),wqt(a,o,e),a.selectAll(".lines").each(function(){var s=o.connector.line;i8e.lineGroupStyle(t9.select(this).selectAll("path"),s.width,s.color,s.dash)})})}a8e.exports={style:Tqt}});var f8e=W((jqr,c8e)=>{"use strict";var Aqt=ji().hoverLabelText,s8e=ni().opacity,Mqt=c5().hoverOnBars,l8e=D5(),u8e={increasing:l8e.INCREASING.SYMBOL,decreasing:l8e.DECREASING.SYMBOL};c8e.exports=function(t,r,i,n,a){var o=Mqt(t,r,i,n,a);if(!o)return;var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=u?"x":"y",f=u?t.xa:t.ya;function h(x){return Aqt(f,x,l[c+"hoverformat"])}var d=o.index,p=s[d],v=p.isSum?p.b+p.s:p.rawS;o.initial=p.b+p.s-v,o.delta=v,o.final=o.initial+o.delta;var m=h(Math.abs(o.delta));o.deltaLabel=v<0?"("+m+")":m,o.finalLabel=h(o.final),o.initialLabel=h(o.initial);var g=p.hi||l.hoverinfo,w=[];if(g&&g!=="none"&&g!=="skip"){var b=g==="all",_=g.split("+"),M=function(x){return b||_.indexOf(x)!==-1};p.isSum||(M("final")&&(u?!M("x"):!M("y"))&&w.push(o.finalLabel),M("delta")&&(v<0?w.push(o.deltaLabel+" "+u8e.decreasing):w.push(o.deltaLabel+" "+u8e.increasing)),M("initial")&&w.push("Initial: "+o.initialLabel))}return w.length&&(o.extraText=w.join("<br>")),o.color=Sqt(l,p),[o]};function Sqt(e,t){var r=e[t.dir].marker,i=r.color,n=r.line.color,a=r.line.width;if(s8e(i))return i;if(s8e(n)&&a)return n}});var d8e=W(($qr,h8e)=>{"use strict";h8e.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"initial"in r&&(t.initial=r.initial),"delta"in r&&(t.delta=r.delta),"final"in r&&(t.final=r.final),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var v8e=W((Wqr,p8e)=>{"use strict";p8e.exports={attributes:CY(),layoutAttributes:DY(),supplyDefaults:LY().supplyDefaults,crossTraceDefaults:LY().crossTraceDefaults,supplyLayoutDefaults:Hke(),calc:Zke(),crossTraceCalc:Qke(),plot:r8e(),style:o8e().style,hoverPoints:f8e(),eventData:d8e(),selectPoints:f5(),moduleType:"trace",name:"waterfall",basePlotModule:dl(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var m8e=W((Yqr,g8e)=>{"use strict";g8e.exports=v8e()});var L5=W((Xqr,y8e)=>{"use strict";y8e.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%",""]}}}});var RY={};Fp(RY,{default:()=>kqt});var x8e,_8e,r9,b8e,w8e,T8e,A8e,M8e,Eqt,kqt,zY=Ea(()=>{"use strict";x8e=nd(tn()),_8e=nd(Wa()),r9=nd(Ga()),b8e=nd(Ns()),w8e=nd(L5()),T8e=["rgb","rgba","rgba256","hsl","hsla"],A8e=[],M8e=[];for(let e of T8e){let t=w8e.colormodel[e];A8e.push(`For the \`${e}\` colormodel, it is [${(t.zminDflt||t.min).join(", ")}].`),M8e.push(`For the \`${e}\` colormodel, it is [${(t.zmaxDflt||t.max).join(", ")}].`)}Eqt={source:{valType:"string",editType:"calc",description:["Specifies the data URI of the image to be visualized.",'The URI consists of "data:image/[<media subtype\\\\>][;base64\\\\],<data\\\\>"'].join(" ")},z:{valType:"data_array",editType:"calc",description:["A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."].join(" ")},colormodel:{valType:"enumerated",values:T8e,editType:"calc",description:["Color model used to map the numerical color components described in `z` into colors.","If `source` is specified, this attribute will be set to `rgba256`","otherwise it defaults to `rgb`."].join(" ")},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:["Picks a smoothing algorithm used to smooth `z` data.","This only applies for image traces that use the `source` attribute."].join(" ")},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component.","Note that the default value will depend on the colormodel.",A8e.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component.","Note that the default value will depend on the colormodel.",M8e.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's x position. The left edge of the image","(or the right edge if the x axis is reversed or dx is negative)","will be found at xmin=x0-dx/2"].join(" ")},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's y position. The top edge of the image","(or the bottom edge if the y axis is NOT reversed or if dy is negative)","will be found at ymin=y0-dy/2. By default when an image trace is","included, the y axis will be reversed so that the image is right-side-up,","but you can disable this by setting yaxis.autorange=true or by providing","an explicit y axis range."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:(0,x8e.extendFlat)({},_8e.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,r9.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,r9.templatefallbackAttrs)(),zorder:b8e.zorder},kqt=Eqt});var k8e=W((Zqr,E8e)=>{"use strict";var Cqt=it(),Dqt=(zY(),Go(RY)).default,S8e=L5(),Fqt=Ng().IMAGE_URL_PREFIX;E8e.exports=function(t,r){function i(o,s){return Cqt.coerce(t,r,Dqt,o,s)}i("source"),r.source&&!r.source.match(Fqt)&&delete r.source,r._hasSource=!!r.source;var n=i("z");if(r._hasZ=!(n===void 0||!n.length||!n[0]||!n[0].length),!r._hasZ&&!r._hasSource){r.visible=!1;return}i("x0"),i("y0"),i("dx"),i("dy");var a;r._hasZ?(i("colormodel","rgb"),a=S8e.colormodel[r.colormodel],i("zmin",a.zminDflt||a.min),i("zmax",a.zmaxDflt||a.max)):r._hasSource&&(r.colormodel="rgba256",a=S8e.colormodel[r.colormodel],r.zmin=a.zminDflt,r.zmax=a.zmaxDflt),i("zsmooth"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),r._length=null,i("zorder")}});var Kg=W((Kqr,BY)=>{typeof Object.create=="function"?BY.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:BY.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}}});var qY=W((Jqr,C8e)=>{C8e.exports=Vx().EventEmitter});var L8e=W(i9=>{"use strict";i9.byteLength=Pqt;i9.toByteArray=Rqt;i9.fromByteArray=qqt;var k1=[],Id=[],Lqt=typeof Uint8Array!="undefined"?Uint8Array:Array,OY="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(N_=0,D8e=OY.length;N_<D8e;++N_)k1[N_]=OY[N_],Id[OY.charCodeAt(N_)]=N_;var N_,D8e;Id[45]=62;Id[95]=63;function F8e(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var i=r===t?0:4-r%4;return[r,i]}function Pqt(e){var t=F8e(e),r=t[0],i=t[1];return(r+i)*3/4-i}function Iqt(e,t,r){return(t+r)*3/4-r}function Rqt(e){var t,r=F8e(e),i=r[0],n=r[1],a=new Lqt(Iqt(e,i,n)),o=0,s=n>0?i-4:i,l;for(l=0;l<s;l+=4)t=Id[e.charCodeAt(l)]<<18|Id[e.charCodeAt(l+1)]<<12|Id[e.charCodeAt(l+2)]<<6|Id[e.charCodeAt(l+3)],a[o++]=t>>16&255,a[o++]=t>>8&255,a[o++]=t&255;return n===2&&(t=Id[e.charCodeAt(l)]<<2|Id[e.charCodeAt(l+1)]>>4,a[o++]=t&255),n===1&&(t=Id[e.charCodeAt(l)]<<10|Id[e.charCodeAt(l+1)]<<4|Id[e.charCodeAt(l+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function zqt(e){return k1[e>>18&63]+k1[e>>12&63]+k1[e>>6&63]+k1[e&63]}function Bqt(e,t,r){for(var i,n=[],a=t;a<r;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),n.push(zqt(i));return n.join("")}function qqt(e){for(var t,r=e.length,i=r%3,n=[],a=16383,o=0,s=r-i;o<s;o+=a)n.push(Bqt(e,o,o+a>s?s:o+a));return i===1?(t=e[r-1],n.push(k1[t>>2]+k1[t<<4&63]+"==")):i===2&&(t=(e[r-2]<<8)+e[r-1],n.push(k1[t>>10]+k1[t>>4&63]+k1[t<<2&63]+"=")),n.join("")}});var P8e=W(NY=>{NY.read=function(e,t,r,i,n){var a,o,s=n*8-i-1,l=(1<<s)-1,u=l>>1,c=-7,f=r?n-1:0,h=r?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=a*256+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=i;c>0;o=o*256+e[t+f],f+=h,c-=8);if(a===0)a=1-u;else{if(a===l)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,i),a=a-u}return(d?-1:1)*o*Math.pow(2,a-i)};NY.write=function(e,t,r,i,n,a){var o,s,l,u=a*8-n-1,c=(1<<u)-1,f=c>>1,h=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:a-1,p=i?1:-1,v=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=h/l:t+=h*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,n),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,n),o=0));n>=8;e[r+d]=s&255,d+=p,s/=256,n-=8);for(o=o<<n|s,u+=n;u>0;e[r+d]=o&255,d+=p,o/=256,u-=8);e[r+d-p]|=v*128}});var V_=W(z5=>{"use strict";var UY=L8e(),I5=P8e(),I8e=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;z5.Buffer=Or;z5.SlowBuffer=Hqt;z5.INSPECT_MAX_BYTES=50;var n9=2147483647;z5.kMaxLength=n9;Or.TYPED_ARRAY_SUPPORT=Oqt();!Or.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Oqt(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(Or.prototype,"parent",{enumerable:!0,get:function(){if(Or.isBuffer(this))return this.buffer}});Object.defineProperty(Or.prototype,"offset",{enumerable:!0,get:function(){if(Or.isBuffer(this))return this.byteOffset}});function Jg(e){if(e>n9)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,Or.prototype),t}function Or(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return jY(e)}return q8e(e,t,r)}Or.poolSize=8192;function q8e(e,t,r){if(typeof e=="string")return Uqt(e,t);if(ArrayBuffer.isView(e))return Vqt(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(C1(e,ArrayBuffer)||e&&C1(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(C1(e,SharedArrayBuffer)||e&&C1(e.buffer,SharedArrayBuffer)))return GY(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let i=e.valueOf&&e.valueOf();if(i!=null&&i!==e)return Or.from(i,t,r);let n=Gqt(e);if(n)return n;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return Or.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}Or.from=function(e,t,r){return q8e(e,t,r)};Object.setPrototypeOf(Or.prototype,Uint8Array.prototype);Object.setPrototypeOf(Or,Uint8Array);function O8e(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Nqt(e,t,r){return O8e(e),e<=0?Jg(e):t!==void 0?typeof r=="string"?Jg(e).fill(t,r):Jg(e).fill(t):Jg(e)}Or.alloc=function(e,t,r){return Nqt(e,t,r)};function jY(e){return O8e(e),Jg(e<0?0:$Y(e)|0)}Or.allocUnsafe=function(e){return jY(e)};Or.allocUnsafeSlow=function(e){return jY(e)};function Uqt(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Or.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=N8e(e,t)|0,i=Jg(r),n=i.write(e,t);return n!==r&&(i=i.slice(0,n)),i}function VY(e){let t=e.length<0?0:$Y(e.length)|0,r=Jg(t);for(let i=0;i<t;i+=1)r[i]=e[i]&255;return r}function Vqt(e){if(C1(e,Uint8Array)){let t=new Uint8Array(e);return GY(t.buffer,t.byteOffset,t.byteLength)}return VY(e)}function GY(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let i;return t===void 0&&r===void 0?i=new Uint8Array(e):r===void 0?i=new Uint8Array(e,t):i=new Uint8Array(e,t,r),Object.setPrototypeOf(i,Or.prototype),i}function Gqt(e){if(Or.isBuffer(e)){let t=$Y(e.length)|0,r=Jg(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||YY(e.length)?Jg(0):VY(e);if(e.type==="Buffer"&&Array.isArray(e.data))return VY(e.data)}function $Y(e){if(e>=n9)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n9.toString(16)+" bytes");return e|0}function Hqt(e){return+e!=e&&(e=0),Or.alloc(+e)}Or.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==Or.prototype};Or.compare=function(t,r){if(C1(t,Uint8Array)&&(t=Or.from(t,t.offset,t.byteLength)),C1(r,Uint8Array)&&(r=Or.from(r,r.offset,r.byteLength)),!Or.isBuffer(t)||!Or.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let i=t.length,n=r.length;for(let a=0,o=Math.min(i,n);a<o;++a)if(t[a]!==r[a]){i=t[a],n=r[a];break}return i<n?-1:n<i?1:0};Or.isEncoding=function(t){switch(String(t).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}};Or.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return Or.alloc(0);let i;if(r===void 0)for(r=0,i=0;i<t.length;++i)r+=t[i].length;let n=Or.allocUnsafe(r),a=0;for(i=0;i<t.length;++i){let o=t[i];if(C1(o,Uint8Array))a+o.length>n.length?(Or.isBuffer(o)||(o=Or.from(o)),o.copy(n,a)):Uint8Array.prototype.set.call(n,o,a);else if(Or.isBuffer(o))o.copy(n,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=o.length}return n};function N8e(e,t){if(Or.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||C1(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&r===0)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return HY(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return X8e(e).length;default:if(n)return i?-1:HY(e).length;t=(""+t).toLowerCase(),n=!0}}Or.byteLength=N8e;function jqt(e,t,r){let i=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return tOt(this,t,r);case"utf8":case"utf-8":return V8e(this,t,r);case"ascii":return Qqt(this,t,r);case"latin1":case"binary":return eOt(this,t,r);case"base64":return Kqt(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rOt(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}Or.prototype._isBuffer=!0;function U_(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}Or.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<t;r+=2)U_(this,r,r+1);return this};Or.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<t;r+=4)U_(this,r,r+3),U_(this,r+1,r+2);return this};Or.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<t;r+=8)U_(this,r,r+7),U_(this,r+1,r+6),U_(this,r+2,r+5),U_(this,r+3,r+4);return this};Or.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?V8e(this,0,t):jqt.apply(this,arguments)};Or.prototype.toLocaleString=Or.prototype.toString;Or.prototype.equals=function(t){if(!Or.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:Or.compare(this,t)===0};Or.prototype.inspect=function(){let t="",r=z5.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};I8e&&(Or.prototype[I8e]=Or.prototype.inspect);Or.prototype.compare=function(t,r,i,n,a){if(C1(t,Uint8Array)&&(t=Or.from(t,t.offset,t.byteLength)),!Or.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),i===void 0&&(i=t?t.length:0),n===void 0&&(n=0),a===void 0&&(a=this.length),r<0||i>t.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&r>=i)return 0;if(n>=a)return-1;if(r>=i)return 1;if(r>>>=0,i>>>=0,n>>>=0,a>>>=0,this===t)return 0;let o=a-n,s=i-r,l=Math.min(o,s),u=this.slice(n,a),c=t.slice(r,i);for(let f=0;f<l;++f)if(u[f]!==c[f]){o=u[f],s=c[f];break}return o<s?-1:s<o?1:0};function U8e(e,t,r,i,n){if(e.length===0)return-1;if(typeof r=="string"?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,YY(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0)if(n)r=0;else return-1;if(typeof t=="string"&&(t=Or.from(t,i)),Or.isBuffer(t))return t.length===0?-1:R8e(e,t,r,i,n);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):R8e(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function R8e(e,t,r,i,n){let a=1,o=e.length,s=t.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,r/=2}function l(c,f){return a===1?c[f]:c.readUInt16BE(f*a)}let u;if(n){let c=-1;for(u=r;u<o;u++)if(l(e,u)===l(t,c===-1?0:u-c)){if(c===-1&&(c=u),u-c+1===s)return c*a}else c!==-1&&(u-=u-c),c=-1}else for(r+s>o&&(r=o-s),u=r;u>=0;u--){let c=!0;for(let f=0;f<s;f++)if(l(e,u+f)!==l(t,f)){c=!1;break}if(c)return u}return-1}Or.prototype.includes=function(t,r,i){return this.indexOf(t,r,i)!==-1};Or.prototype.indexOf=function(t,r,i){return U8e(this,t,r,i,!0)};Or.prototype.lastIndexOf=function(t,r,i){return U8e(this,t,r,i,!1)};function $qt(e,t,r,i){r=Number(r)||0;let n=e.length-r;i?(i=Number(i),i>n&&(i=n)):i=n;let a=t.length;i>a/2&&(i=a/2);let o;for(o=0;o<i;++o){let s=parseInt(t.substr(o*2,2),16);if(YY(s))return o;e[r+o]=s}return o}function Wqt(e,t,r,i){return a9(HY(t,e.length-r),e,r,i)}function Yqt(e,t,r,i){return a9(oOt(t),e,r,i)}function Xqt(e,t,r,i){return a9(X8e(t),e,r,i)}function Zqt(e,t,r,i){return a9(sOt(t,e.length-r),e,r,i)}Or.prototype.write=function(t,r,i,n){if(r===void 0)n="utf8",i=this.length,r=0;else if(i===void 0&&typeof r=="string")n=r,i=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(i)?(i=i>>>0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-r;if((i===void 0||i>a)&&(i=a),t.length>0&&(i<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return $qt(this,t,r,i);case"utf8":case"utf-8":return Wqt(this,t,r,i);case"ascii":case"latin1":case"binary":return Yqt(this,t,r,i);case"base64":return Xqt(this,t,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Zqt(this,t,r,i);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};Or.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Kqt(e,t,r){return t===0&&r===e.length?UY.fromByteArray(e):UY.fromByteArray(e.slice(t,r))}function V8e(e,t,r){r=Math.min(e.length,r);let i=[],n=t;for(;n<r;){let a=e[n],o=null,s=a>239?4:a>223?3:a>191?2:1;if(n+s<=r){let l,u,c,f;switch(s){case 1:a<128&&(o=a);break;case 2:l=e[n+1],(l&192)===128&&(f=(a&31)<<6|l&63,f>127&&(o=f));break;case 3:l=e[n+1],u=e[n+2],(l&192)===128&&(u&192)===128&&(f=(a&15)<<12|(l&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:l=e[n+1],u=e[n+2],c=e[n+3],(l&192)===128&&(u&192)===128&&(c&192)===128&&(f=(a&15)<<18|(l&63)<<12|(u&63)<<6|c&63,f>65535&&f<1114112&&(o=f))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|o&1023),i.push(o),n+=s}return Jqt(i)}var z8e=4096;function Jqt(e){let t=e.length;if(t<=z8e)return String.fromCharCode.apply(String,e);let r="",i=0;for(;i<t;)r+=String.fromCharCode.apply(String,e.slice(i,i+=z8e));return r}function Qqt(e,t,r){let i="";r=Math.min(e.length,r);for(let n=t;n<r;++n)i+=String.fromCharCode(e[n]&127);return i}function eOt(e,t,r){let i="";r=Math.min(e.length,r);for(let n=t;n<r;++n)i+=String.fromCharCode(e[n]);return i}function tOt(e,t,r){let i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);let n="";for(let a=t;a<r;++a)n+=lOt[e[a]];return n}function rOt(e,t,r){let i=e.slice(t,r),n="";for(let a=0;a<i.length-1;a+=2)n+=String.fromCharCode(i[a]+i[a+1]*256);return n}Or.prototype.slice=function(t,r){let i=this.length;t=~~t,r=r===void 0?i:~~r,t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),r<t&&(r=t);let n=this.subarray(t,r);return Object.setPrototypeOf(n,Or.prototype),n};function Sc(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}Or.prototype.readUintLE=Or.prototype.readUIntLE=function(t,r,i){t=t>>>0,r=r>>>0,i||Sc(t,r,this.length);let n=this[t],a=1,o=0;for(;++o<r&&(a*=256);)n+=this[t+o]*a;return n};Or.prototype.readUintBE=Or.prototype.readUIntBE=function(t,r,i){t=t>>>0,r=r>>>0,i||Sc(t,r,this.length);let n=this[t+--r],a=1;for(;r>0&&(a*=256);)n+=this[t+--r]*a;return n};Or.prototype.readUint8=Or.prototype.readUInt8=function(t,r){return t=t>>>0,r||Sc(t,1,this.length),this[t]};Or.prototype.readUint16LE=Or.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||Sc(t,2,this.length),this[t]|this[t+1]<<8};Or.prototype.readUint16BE=Or.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||Sc(t,2,this.length),this[t]<<8|this[t+1]};Or.prototype.readUint32LE=Or.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||Sc(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};Or.prototype.readUint32BE=Or.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||Sc(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};Or.prototype.readBigUInt64LE=t2(function(t){t=t>>>0,R5(t,"offset");let r=this[t],i=this[t+7];(r===void 0||i===void 0)&&QM(t,this.length-8);let n=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,a=this[++t]+this[++t]*2**8+this[++t]*2**16+i*2**24;return BigInt(n)+(BigInt(a)<<BigInt(32))});Or.prototype.readBigUInt64BE=t2(function(t){t=t>>>0,R5(t,"offset");let r=this[t],i=this[t+7];(r===void 0||i===void 0)&&QM(t,this.length-8);let n=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],a=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+i;return(BigInt(n)<<BigInt(32))+BigInt(a)});Or.prototype.readIntLE=function(t,r,i){t=t>>>0,r=r>>>0,i||Sc(t,r,this.length);let n=this[t],a=1,o=0;for(;++o<r&&(a*=256);)n+=this[t+o]*a;return a*=128,n>=a&&(n-=Math.pow(2,8*r)),n};Or.prototype.readIntBE=function(t,r,i){t=t>>>0,r=r>>>0,i||Sc(t,r,this.length);let n=r,a=1,o=this[t+--n];for(;n>0&&(a*=256);)o+=this[t+--n]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*r)),o};Or.prototype.readInt8=function(t,r){return t=t>>>0,r||Sc(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};Or.prototype.readInt16LE=function(t,r){t=t>>>0,r||Sc(t,2,this.length);let i=this[t]|this[t+1]<<8;return i&32768?i|4294901760:i};Or.prototype.readInt16BE=function(t,r){t=t>>>0,r||Sc(t,2,this.length);let i=this[t+1]|this[t]<<8;return i&32768?i|4294901760:i};Or.prototype.readInt32LE=function(t,r){return t=t>>>0,r||Sc(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};Or.prototype.readInt32BE=function(t,r){return t=t>>>0,r||Sc(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};Or.prototype.readBigInt64LE=t2(function(t){t=t>>>0,R5(t,"offset");let r=this[t],i=this[t+7];(r===void 0||i===void 0)&&QM(t,this.length-8);let n=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(i<<24);return(BigInt(n)<<BigInt(32))+BigInt(r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});Or.prototype.readBigInt64BE=t2(function(t){t=t>>>0,R5(t,"offset");let r=this[t],i=this[t+7];(r===void 0||i===void 0)&&QM(t,this.length-8);let n=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+i)});Or.prototype.readFloatLE=function(t,r){return t=t>>>0,r||Sc(t,4,this.length),I5.read(this,t,!0,23,4)};Or.prototype.readFloatBE=function(t,r){return t=t>>>0,r||Sc(t,4,this.length),I5.read(this,t,!1,23,4)};Or.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||Sc(t,8,this.length),I5.read(this,t,!0,52,8)};Or.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||Sc(t,8,this.length),I5.read(this,t,!1,52,8)};function Gh(e,t,r,i,n,a){if(!Or.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<a)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}Or.prototype.writeUintLE=Or.prototype.writeUIntLE=function(t,r,i,n){if(t=+t,r=r>>>0,i=i>>>0,!n){let s=Math.pow(2,8*i)-1;Gh(this,t,r,i,s,0)}let a=1,o=0;for(this[r]=t&255;++o<i&&(a*=256);)this[r+o]=t/a&255;return r+i};Or.prototype.writeUintBE=Or.prototype.writeUIntBE=function(t,r,i,n){if(t=+t,r=r>>>0,i=i>>>0,!n){let s=Math.pow(2,8*i)-1;Gh(this,t,r,i,s,0)}let a=i-1,o=1;for(this[r+a]=t&255;--a>=0&&(o*=256);)this[r+a]=t/o&255;return r+i};Or.prototype.writeUint8=Or.prototype.writeUInt8=function(t,r,i){return t=+t,r=r>>>0,i||Gh(this,t,r,1,255,0),this[r]=t&255,r+1};Or.prototype.writeUint16LE=Or.prototype.writeUInt16LE=function(t,r,i){return t=+t,r=r>>>0,i||Gh(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};Or.prototype.writeUint16BE=Or.prototype.writeUInt16BE=function(t,r,i){return t=+t,r=r>>>0,i||Gh(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};Or.prototype.writeUint32LE=Or.prototype.writeUInt32LE=function(t,r,i){return t=+t,r=r>>>0,i||Gh(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};Or.prototype.writeUint32BE=Or.prototype.writeUInt32BE=function(t,r,i){return t=+t,r=r>>>0,i||Gh(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function G8e(e,t,r,i,n){Y8e(t,i,n,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,r}function H8e(e,t,r,i,n){Y8e(t,i,n,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a=a>>8,e[r+6]=a,a=a>>8,e[r+5]=a,a=a>>8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o=o>>8,e[r+2]=o,o=o>>8,e[r+1]=o,o=o>>8,e[r]=o,r+8}Or.prototype.writeBigUInt64LE=t2(function(t,r=0){return G8e(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Or.prototype.writeBigUInt64BE=t2(function(t,r=0){return H8e(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Or.prototype.writeIntLE=function(t,r,i,n){if(t=+t,r=r>>>0,!n){let l=Math.pow(2,8*i-1);Gh(this,t,r,i,l-1,-l)}let a=0,o=1,s=0;for(this[r]=t&255;++a<i&&(o*=256);)t<0&&s===0&&this[r+a-1]!==0&&(s=1),this[r+a]=(t/o>>0)-s&255;return r+i};Or.prototype.writeIntBE=function(t,r,i,n){if(t=+t,r=r>>>0,!n){let l=Math.pow(2,8*i-1);Gh(this,t,r,i,l-1,-l)}let a=i-1,o=1,s=0;for(this[r+a]=t&255;--a>=0&&(o*=256);)t<0&&s===0&&this[r+a+1]!==0&&(s=1),this[r+a]=(t/o>>0)-s&255;return r+i};Or.prototype.writeInt8=function(t,r,i){return t=+t,r=r>>>0,i||Gh(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};Or.prototype.writeInt16LE=function(t,r,i){return t=+t,r=r>>>0,i||Gh(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};Or.prototype.writeInt16BE=function(t,r,i){return t=+t,r=r>>>0,i||Gh(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};Or.prototype.writeInt32LE=function(t,r,i){return t=+t,r=r>>>0,i||Gh(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};Or.prototype.writeInt32BE=function(t,r,i){return t=+t,r=r>>>0,i||Gh(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};Or.prototype.writeBigInt64LE=t2(function(t,r=0){return G8e(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Or.prototype.writeBigInt64BE=t2(function(t,r=0){return H8e(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function j8e(e,t,r,i,n,a){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function $8e(e,t,r,i,n){return t=+t,r=r>>>0,n||j8e(e,t,r,4,34028234663852886e22,-34028234663852886e22),I5.write(e,t,r,i,23,4),r+4}Or.prototype.writeFloatLE=function(t,r,i){return $8e(this,t,r,!0,i)};Or.prototype.writeFloatBE=function(t,r,i){return $8e(this,t,r,!1,i)};function W8e(e,t,r,i,n){return t=+t,r=r>>>0,n||j8e(e,t,r,8,17976931348623157e292,-17976931348623157e292),I5.write(e,t,r,i,52,8),r+8}Or.prototype.writeDoubleLE=function(t,r,i){return W8e(this,t,r,!0,i)};Or.prototype.writeDoubleBE=function(t,r,i){return W8e(this,t,r,!1,i)};Or.prototype.copy=function(t,r,i,n){if(!Or.isBuffer(t))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<i&&(n=i),n===i||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-i&&(n=t.length-r+i);let a=n-i;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,i,n):Uint8Array.prototype.set.call(t,this.subarray(i,n),r),a};Or.prototype.fill=function(t,r,i,n){if(typeof t=="string"){if(typeof r=="string"?(n=r,r=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!Or.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(t.length===1){let o=t.charCodeAt(0);(n==="utf8"&&o<128||n==="latin1")&&(t=o)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(r<0||this.length<r||this.length<i)throw new RangeError("Out of range index");if(i<=r)return this;r=r>>>0,i=i===void 0?this.length:i>>>0,t||(t=0);let a;if(typeof t=="number")for(a=r;a<i;++a)this[a]=t;else{let o=Or.isBuffer(t)?t:Or.from(t,n),s=o.length;if(s===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(a=0;a<i-r;++a)this[a+r]=o[a%s]}return this};var P5={};function WY(e,t,r){P5[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(n){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:n,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}WY("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);WY("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);WY("ERR_OUT_OF_RANGE",function(e,t,r){let i=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=B8e(String(r)):typeof r=="bigint"&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=B8e(n)),n+="n"),i+=` It must be ${t}. Received ${n}`,i},RangeError);function B8e(e){let t="",r=e.length,i=e[0]==="-"?1:0;for(;r>=i+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function iOt(e,t,r){R5(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&QM(t,e.length-(r+1))}function Y8e(e,t,r,i,n,a){if(e>r||e<t){let o=typeof t=="bigint"?"n":"",s;throw a>3?t===0||t===BigInt(0)?s=`>= 0${o} and < 2${o} ** ${(a+1)*8}${o}`:s=`>= -(2${o} ** ${(a+1)*8-1}${o}) and < 2 ** ${(a+1)*8-1}${o}`:s=`>= ${t}${o} and <= ${r}${o}`,new P5.ERR_OUT_OF_RANGE("value",s,e)}iOt(i,n,a)}function R5(e,t){if(typeof e!="number")throw new P5.ERR_INVALID_ARG_TYPE(t,"number",e)}function QM(e,t,r){throw Math.floor(e)!==e?(R5(e,r),new P5.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new P5.ERR_BUFFER_OUT_OF_BOUNDS:new P5.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var nOt=/[^+/0-9A-Za-z-_]/g;function aOt(e){if(e=e.split("=")[0],e=e.trim().replace(nOt,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function HY(e,t){t=t||1/0;let r,i=e.length,n=null,a=[];for(let o=0;o<i;++o){if(r=e.charCodeAt(o),r>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===i){(t-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function oOt(e){let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function sOt(e,t){let r,i,n,a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),i=r>>8,n=r%256,a.push(n),a.push(i);return a}function X8e(e){return UY.toByteArray(aOt(e))}function a9(e,t,r,i){let n;for(n=0;n<i&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function C1(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function YY(e){return e!==e}var lOt=(function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let i=r*16;for(let n=0;n<16;++n)t[i+n]=e[r]+e[n]}return t})();function t2(e){return typeof BigInt=="undefined"?uOt:e}function uOt(){throw new Error("BigInt not supported")}});var o9=W((iOr,Z8e)=>{"use strict";Z8e.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;t[r]=n;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==n||s.enumerable!==!0)return!1}return!0}});var eS=W((nOr,K8e)=>{"use strict";var cOt=o9();K8e.exports=function(){return cOt()&&!!Symbol.toStringTag}});var s9=W((aOr,J8e)=>{"use strict";J8e.exports=Object});var eCe=W((oOr,Q8e)=>{"use strict";Q8e.exports=Error});var rCe=W((sOr,tCe)=>{"use strict";tCe.exports=EvalError});var nCe=W((lOr,iCe)=>{"use strict";iCe.exports=RangeError});var oCe=W((uOr,aCe)=>{"use strict";aCe.exports=ReferenceError});var XY=W((cOr,sCe)=>{"use strict";sCe.exports=SyntaxError});var B5=W((fOr,lCe)=>{"use strict";lCe.exports=TypeError});var cCe=W((hOr,uCe)=>{"use strict";uCe.exports=URIError});var hCe=W((dOr,fCe)=>{"use strict";fCe.exports=Math.abs});var pCe=W((pOr,dCe)=>{"use strict";dCe.exports=Math.floor});var gCe=W((vOr,vCe)=>{"use strict";vCe.exports=Math.max});var yCe=W((gOr,mCe)=>{"use strict";mCe.exports=Math.min});var _Ce=W((mOr,xCe)=>{"use strict";xCe.exports=Math.pow});var wCe=W((yOr,bCe)=>{"use strict";bCe.exports=Math.round});var ACe=W((xOr,TCe)=>{"use strict";TCe.exports=Number.isNaN||function(t){return t!==t}});var SCe=W((_Or,MCe)=>{"use strict";var fOt=ACe();MCe.exports=function(t){return fOt(t)||t===0?t:t<0?-1:1}});var kCe=W((bOr,ECe)=>{"use strict";ECe.exports=Object.getOwnPropertyDescriptor});var G_=W((wOr,CCe)=>{"use strict";var l9=kCe();if(l9)try{l9([],"length")}catch(e){l9=null}CCe.exports=l9});var tS=W((TOr,DCe)=>{"use strict";var u9=Object.defineProperty||!1;if(u9)try{u9({},"a",{value:1})}catch(e){u9=!1}DCe.exports=u9});var PCe=W((AOr,LCe)=>{"use strict";var FCe=typeof Symbol!="undefined"&&Symbol,hOt=o9();LCe.exports=function(){return typeof FCe!="function"||typeof Symbol!="function"||typeof FCe("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:hOt()}});var ZY=W((MOr,ICe)=>{"use strict";ICe.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var KY=W((SOr,RCe)=>{"use strict";var dOt=s9();RCe.exports=dOt.getPrototypeOf||null});var qCe=W((EOr,BCe)=>{"use strict";var pOt="Function.prototype.bind called on incompatible ",vOt=Object.prototype.toString,gOt=Math.max,mOt="[object Function]",zCe=function(t,r){for(var i=[],n=0;n<t.length;n+=1)i[n]=t[n];for(var a=0;a<r.length;a+=1)i[a+t.length]=r[a];return i},yOt=function(t,r){for(var i=[],n=r||0,a=0;n<t.length;n+=1,a+=1)i[a]=t[n];return i},xOt=function(e,t){for(var r="",i=0;i<e.length;i+=1)r+=e[i],i+1<e.length&&(r+=t);return r};BCe.exports=function(t){var r=this;if(typeof r!="function"||vOt.apply(r)!==mOt)throw new TypeError(pOt+r);for(var i=yOt(arguments,1),n,a=function(){if(this instanceof n){var c=r.apply(this,zCe(i,arguments));return Object(c)===c?c:this}return r.apply(t,zCe(i,arguments))},o=gOt(0,r.length-i.length),s=[],l=0;l<o;l++)s[l]="$"+l;if(n=Function("binder","return function ("+xOt(s,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var u=function(){};u.prototype=r.prototype,n.prototype=new u,u.prototype=null}return n}});var q5=W((kOr,OCe)=>{"use strict";var _Ot=qCe();OCe.exports=Function.prototype.bind||_Ot});var c9=W((COr,NCe)=>{"use strict";NCe.exports=Function.prototype.call});var f9=W((DOr,UCe)=>{"use strict";UCe.exports=Function.prototype.apply});var GCe=W((FOr,VCe)=>{"use strict";VCe.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var JY=W((LOr,HCe)=>{"use strict";var bOt=q5(),wOt=f9(),TOt=c9(),AOt=GCe();HCe.exports=AOt||bOt.call(TOt,wOt)});var h9=W((POr,jCe)=>{"use strict";var MOt=q5(),SOt=B5(),EOt=c9(),kOt=JY();jCe.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new SOt("a function is required");return kOt(MOt,EOt,t)}});var KCe=W((IOr,ZCe)=>{"use strict";var COt=h9(),$Ce=G_(),YCe;try{YCe=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var QY=!!YCe&&$Ce&&$Ce(Object.prototype,"__proto__"),XCe=Object,WCe=XCe.getPrototypeOf;ZCe.exports=QY&&typeof QY.get=="function"?COt([QY.get]):typeof WCe=="function"?function(t){return WCe(t==null?t:XCe(t))}:!1});var d9=W((ROr,tDe)=>{"use strict";var JCe=ZY(),QCe=KY(),eDe=KCe();tDe.exports=JCe?function(t){return JCe(t)}:QCe?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return QCe(t)}:eDe?function(t){return eDe(t)}:null});var eX=W((zOr,rDe)=>{"use strict";var DOt=Function.prototype.call,FOt=Object.prototype.hasOwnProperty,LOt=q5();rDe.exports=LOt.call(DOt,FOt)});var g9=W((BOr,lDe)=>{"use strict";var to,POt=s9(),IOt=eCe(),ROt=rCe(),zOt=nCe(),BOt=oCe(),V5=XY(),U5=B5(),qOt=cCe(),OOt=hCe(),NOt=pCe(),UOt=gCe(),VOt=yCe(),GOt=_Ce(),HOt=wCe(),jOt=SCe(),oDe=Function,tX=function(e){try{return oDe('"use strict"; return ('+e+").constructor;")()}catch(t){}},rS=G_(),$Ot=tS(),rX=function(){throw new U5},WOt=rS?(function(){try{return arguments.callee,rX}catch(e){try{return rS(arguments,"callee").get}catch(t){return rX}}})():rX,O5=PCe()(),Ec=d9(),YOt=KY(),XOt=ZY(),sDe=f9(),iS=c9(),N5={},ZOt=typeof Uint8Array=="undefined"||!Ec?to:Ec(Uint8Array),H_={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?to:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?to:ArrayBuffer,"%ArrayIteratorPrototype%":O5&&Ec?Ec([][Symbol.iterator]()):to,"%AsyncFromSyncIteratorPrototype%":to,"%AsyncFunction%":N5,"%AsyncGenerator%":N5,"%AsyncGeneratorFunction%":N5,"%AsyncIteratorPrototype%":N5,"%Atomics%":typeof Atomics=="undefined"?to:Atomics,"%BigInt%":typeof BigInt=="undefined"?to:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?to:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?to:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?to:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":IOt,"%eval%":eval,"%EvalError%":ROt,"%Float16Array%":typeof Float16Array=="undefined"?to:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?to:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?to:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?to:FinalizationRegistry,"%Function%":oDe,"%GeneratorFunction%":N5,"%Int8Array%":typeof Int8Array=="undefined"?to:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?to:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?to:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":O5&&Ec?Ec(Ec([][Symbol.iterator]())):to,"%JSON%":typeof JSON=="object"?JSON:to,"%Map%":typeof Map=="undefined"?to:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!O5||!Ec?to:Ec(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":POt,"%Object.getOwnPropertyDescriptor%":rS,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?to:Promise,"%Proxy%":typeof Proxy=="undefined"?to:Proxy,"%RangeError%":zOt,"%ReferenceError%":BOt,"%Reflect%":typeof Reflect=="undefined"?to:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?to:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!O5||!Ec?to:Ec(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?to:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":O5&&Ec?Ec(""[Symbol.iterator]()):to,"%Symbol%":O5?Symbol:to,"%SyntaxError%":V5,"%ThrowTypeError%":WOt,"%TypedArray%":ZOt,"%TypeError%":U5,"%Uint8Array%":typeof Uint8Array=="undefined"?to:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?to:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?to:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?to:Uint32Array,"%URIError%":qOt,"%WeakMap%":typeof WeakMap=="undefined"?to:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?to:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?to:WeakSet,"%Function.prototype.call%":iS,"%Function.prototype.apply%":sDe,"%Object.defineProperty%":$Ot,"%Object.getPrototypeOf%":YOt,"%Math.abs%":OOt,"%Math.floor%":NOt,"%Math.max%":UOt,"%Math.min%":VOt,"%Math.pow%":GOt,"%Math.round%":HOt,"%Math.sign%":jOt,"%Reflect.getPrototypeOf%":XOt};if(Ec)try{null.error}catch(e){iDe=Ec(Ec(e)),H_["%Error.prototype%"]=iDe}var iDe,KOt=function e(t){var r;if(t==="%AsyncFunction%")r=tX("async function () {}");else if(t==="%GeneratorFunction%")r=tX("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=tX("async function* () {}");else if(t==="%AsyncGenerator%"){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(t==="%AsyncIteratorPrototype%"){var n=e("%AsyncGenerator%");n&&Ec&&(r=Ec(n.prototype))}return H_[t]=r,r},nDe={__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"]},nS=q5(),p9=eX(),JOt=nS.call(iS,Array.prototype.concat),QOt=nS.call(sDe,Array.prototype.splice),aDe=nS.call(iS,String.prototype.replace),v9=nS.call(iS,String.prototype.slice),eNt=nS.call(iS,RegExp.prototype.exec),tNt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,rNt=/\\(\\)?/g,iNt=function(t){var r=v9(t,0,1),i=v9(t,-1);if(r==="%"&&i!=="%")throw new V5("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new V5("invalid intrinsic syntax, expected opening `%`");var n=[];return aDe(t,tNt,function(a,o,s,l){n[n.length]=s?aDe(l,rNt,"$1"):o||a}),n},nNt=function(t,r){var i=t,n;if(p9(nDe,i)&&(n=nDe[i],i="%"+n[0]+"%"),p9(H_,i)){var a=H_[i];if(a===N5&&(a=KOt(i)),typeof a=="undefined"&&!r)throw new U5("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:a}}throw new V5("intrinsic "+t+" does not exist!")};lDe.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new U5("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new U5('"allowMissing" argument must be a boolean');if(eNt(/^%?[^%]*%?$/,t)===null)throw new V5("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=iNt(t),n=i.length>0?i[0]:"",a=nNt("%"+n+"%",r),o=a.name,s=a.value,l=!1,u=a.alias;u&&(n=u[0],QOt(i,JOt([0,1],u)));for(var c=1,f=!0;c<i.length;c+=1){var h=i[c],d=v9(h,0,1),p=v9(h,-1);if((d==='"'||d==="'"||d==="`"||p==='"'||p==="'"||p==="`")&&d!==p)throw new V5("property names with quotes must have matching quotes");if((h==="constructor"||!f)&&(l=!0),n+="."+h,o="%"+n+"%",p9(H_,o))s=H_[o];else if(s!=null){if(!(h in s)){if(!r)throw new U5("base intrinsic for "+t+" exists, but the property is not available.");return}if(rS&&c+1>=i.length){var v=rS(s,h);f=!!v,f&&"get"in v&&!("originalValue"in v.get)?s=v.get:s=s[h]}else f=p9(s,h),s=s[h];f&&!l&&(H_[o]=s)}}return s}});var j_=W((qOr,fDe)=>{"use strict";var uDe=g9(),cDe=h9(),aNt=cDe([uDe("%String.prototype.indexOf%")]);fDe.exports=function(t,r){var i=uDe(t,!!r);return typeof i=="function"&&aNt(t,".prototype.")>-1?cDe([i]):i}});var pDe=W((OOr,dDe)=>{"use strict";var oNt=eS()(),sNt=j_(),iX=sNt("Object.prototype.toString"),m9=function(t){return oNt&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:iX(t)==="[object Arguments]"},hDe=function(t){return m9(t)?!0:t!==null&&typeof t=="object"&&"length"in t&&typeof t.length=="number"&&t.length>=0&&iX(t)!=="[object Array]"&&"callee"in t&&iX(t.callee)==="[object Function]"},lNt=(function(){return m9(arguments)})();m9.isLegacyArguments=hDe;dDe.exports=lNt?m9:hDe});var _De=W((NOr,xDe)=>{"use strict";var vDe=j_(),uNt=eS()(),cNt=eX(),fNt=G_(),oX;uNt?(gDe=vDe("RegExp.prototype.exec"),nX={},y9=function(){throw nX},aX={toString:y9,valueOf:y9},typeof Symbol.toPrimitive=="symbol"&&(aX[Symbol.toPrimitive]=y9),oX=function(t){if(!t||typeof t!="object")return!1;var r=fNt(t,"lastIndex"),i=r&&cNt(r,"value");if(!i)return!1;try{gDe(t,aX)}catch(n){return n===nX}}):(mDe=vDe("Object.prototype.toString"),yDe="[object RegExp]",oX=function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:mDe(t)===yDe});var gDe,nX,y9,aX,mDe,yDe;xDe.exports=oX});var wDe=W((UOr,bDe)=>{"use strict";var hNt=j_(),dNt=_De(),pNt=hNt("RegExp.prototype.exec"),vNt=B5();bDe.exports=function(t){if(!dNt(t))throw new vNt("`regex` must be a RegExp");return function(i){return pNt(t,i)!==null}}});var ADe=W((VOr,TDe)=>{"use strict";var gNt=function*(){}.constructor;TDe.exports=()=>gNt});var kDe=W((GOr,EDe)=>{"use strict";var SDe=j_(),mNt=wDe(),yNt=mNt(/^\s*(?:function)?\*/),xNt=eS()(),MDe=d9(),_Nt=SDe("Object.prototype.toString"),bNt=SDe("Function.prototype.toString"),wNt=ADe();EDe.exports=function(t){if(typeof t!="function")return!1;if(yNt(bNt(t)))return!0;if(!xNt){var r=_Nt(t);return r==="[object GeneratorFunction]"}if(!MDe)return!1;var i=wNt();return i&&MDe(t)===i.prototype}});var LDe=W((HOr,FDe)=>{"use strict";var DDe=Function.prototype.toString,G5=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,lX,x9;if(typeof G5=="function"&&typeof Object.defineProperty=="function")try{lX=Object.defineProperty({},"length",{get:function(){throw x9}}),x9={},G5(function(){throw 42},null,lX)}catch(e){e!==x9&&(G5=null)}else G5=null;var TNt=/^\s*class\b/,uX=function(t){try{var r=DDe.call(t);return TNt.test(r)}catch(i){return!1}},sX=function(t){try{return uX(t)?!1:(DDe.call(t),!0)}catch(r){return!1}},_9=Object.prototype.toString,ANt="[object Object]",MNt="[object Function]",SNt="[object GeneratorFunction]",ENt="[object HTMLAllCollection]",kNt="[object HTML document.all class]",CNt="[object HTMLCollection]",DNt=typeof Symbol=="function"&&!!Symbol.toStringTag,FNt=!(0 in[,]),cX=function(){return!1};typeof document=="object"&&(CDe=document.all,_9.call(CDe)===_9.call(document.all)&&(cX=function(t){if((FNt||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=_9.call(t);return(r===ENt||r===kNt||r===CNt||r===ANt)&&t("")==null}catch(i){}return!1}));var CDe;FDe.exports=G5?function(t){if(cX(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{G5(t,null,lX)}catch(r){if(r!==x9)return!1}return!uX(t)&&sX(t)}:function(t){if(cX(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(DNt)return sX(t);if(uX(t))return!1;var r=_9.call(t);return r!==MNt&&r!==SNt&&!/^\[object HTML/.test(r)?!1:sX(t)}});var RDe=W((jOr,IDe)=>{"use strict";var LNt=LDe(),PNt=Object.prototype.toString,PDe=Object.prototype.hasOwnProperty,INt=function(t,r,i){for(var n=0,a=t.length;n<a;n++)PDe.call(t,n)&&(i==null?r(t[n],n,t):r.call(i,t[n],n,t))},RNt=function(t,r,i){for(var n=0,a=t.length;n<a;n++)i==null?r(t.charAt(n),n,t):r.call(i,t.charAt(n),n,t)},zNt=function(t,r,i){for(var n in t)PDe.call(t,n)&&(i==null?r(t[n],n,t):r.call(i,t[n],n,t))};function BNt(e){return PNt.call(e)==="[object Array]"}IDe.exports=function(t,r,i){if(!LNt(r))throw new TypeError("iterator must be a function");var n;arguments.length>=3&&(n=i),BNt(t)?INt(t,r,n):typeof t=="string"?RNt(t,r,n):zNt(t,r,n)}});var BDe=W(($Or,zDe)=>{"use strict";zDe.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var ODe=W((WOr,qDe)=>{"use strict";var fX=BDe(),qNt=typeof globalThis=="undefined"?window:globalThis;qDe.exports=function(){for(var t=[],r=0;r<fX.length;r++)typeof qNt[fX[r]]=="function"&&(t[t.length]=fX[r]);return t}});var hX=W((YOr,VDe)=>{"use strict";var NDe=tS(),ONt=XY(),H5=B5(),UDe=G_();VDe.exports=function(t,r,i){if(!t||typeof t!="object"&&typeof t!="function")throw new H5("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new H5("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new H5("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new H5("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new H5("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new H5("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!UDe&&UDe(t,r);if(NDe)NDe(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:n===null&&l?l.enumerable:!n,value:i,writable:a===null&&l?l.writable:!a});else if(s||!n&&!a&&!o)t[r]=i;else throw new ONt("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var pX=W((XOr,HDe)=>{"use strict";var dX=tS(),GDe=function(){return!!dX};GDe.hasArrayLengthDefineBug=function(){if(!dX)return null;try{return dX([],"length",{value:1}).length!==1}catch(t){return!0}};HDe.exports=GDe});var XDe=W((ZOr,YDe)=>{"use strict";var NNt=g9(),jDe=hX(),UNt=pX()(),$De=G_(),WDe=B5(),VNt=NNt("%Math.floor%");YDe.exports=function(t,r){if(typeof t!="function")throw new WDe("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||VNt(r)!==r)throw new WDe("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,a=!0;if("length"in t&&$De){var o=$De(t,"length");o&&!o.configurable&&(n=!1),o&&!o.writable&&(a=!1)}return(n||a||!i)&&(UNt?jDe(t,"length",r,!0,!0):jDe(t,"length",r)),t}});var KDe=W((KOr,ZDe)=>{"use strict";var GNt=q5(),HNt=f9(),jNt=JY();ZDe.exports=function(){return jNt(GNt,HNt,arguments)}});var aS=W((JOr,b9)=>{"use strict";var $Nt=XDe(),JDe=tS(),WNt=h9(),QDe=KDe();b9.exports=function(t){var r=WNt(arguments),i=1+t.length-(arguments.length-1);return $Nt(r,i>0?i:0,!0)};JDe?JDe(b9.exports,"apply",{value:QDe}):b9.exports.apply=QDe});var yX=W((QOr,i7e)=>{"use strict";var A9=RDe(),YNt=ODe(),e7e=aS(),gX=j_(),T9=G_(),w9=d9(),XNt=gX("Object.prototype.toString"),r7e=eS()(),t7e=typeof globalThis=="undefined"?window:globalThis,vX=YNt(),mX=gX("String.prototype.slice"),ZNt=gX("Array.prototype.indexOf",!0)||function(t,r){for(var i=0;i<t.length;i+=1)if(t[i]===r)return i;return-1},M9={__proto__:null};r7e&&T9&&w9?A9(vX,function(e){var t=new t7e[e];if(Symbol.toStringTag in t&&w9){var r=w9(t),i=T9(r,Symbol.toStringTag);if(!i&&r){var n=w9(r);i=T9(n,Symbol.toStringTag)}if(i&&i.get){var a=e7e(i.get);M9["$"+e]=a}}}):A9(vX,function(e){var t=new t7e[e],r=t.slice||t.set;if(r){var i=e7e(r);M9["$"+e]=i}});function KNt(e){var t=!1;return A9(M9,function(r,i){if(!t)try{"$"+r(e)===i&&(t=mX(i,1))}catch(n){}}),t}function JNt(e){var t=!1;return A9(M9,function(r,i){if(!t)try{r(e),t=mX(i,1)}catch(n){}}),t}function QNt(e){return ZNt(vX,e)>-1}i7e.exports=function(t){if(!t||typeof t!="object")return!1;if(!r7e){var r=mX(XNt(t),8,-1);return QNt(r)?r:r!=="Object"?!1:JNt(t)}return T9?KNt(t):null}});var a7e=W((eNr,n7e)=>{"use strict";var eUt=yX();n7e.exports=function(t){return!!eUt(t)}});var bX=W(ro=>{"use strict";var tUt=pDe(),rUt=kDe(),nv=yX(),o7e=a7e();function j5(e){return e.call.bind(e)}var s7e=typeof BigInt!="undefined",l7e=typeof Symbol!="undefined",Rd=j5(Object.prototype.toString),iUt=j5(Number.prototype.valueOf),nUt=j5(String.prototype.valueOf),aUt=j5(Boolean.prototype.valueOf);s7e&&(u7e=j5(BigInt.prototype.valueOf));var u7e;l7e&&(c7e=j5(Symbol.prototype.valueOf));var c7e;function sS(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch(r){return!1}}ro.isArgumentsObject=tUt;ro.isGeneratorFunction=rUt;ro.isTypedArray=o7e;function oUt(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}ro.isPromise=oUt;function sUt(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):o7e(e)||h7e(e)}ro.isArrayBufferView=sUt;function lUt(e){return nv(e)==="Uint8Array"}ro.isUint8Array=lUt;function uUt(e){return nv(e)==="Uint8ClampedArray"}ro.isUint8ClampedArray=uUt;function cUt(e){return nv(e)==="Uint16Array"}ro.isUint16Array=cUt;function fUt(e){return nv(e)==="Uint32Array"}ro.isUint32Array=fUt;function hUt(e){return nv(e)==="Int8Array"}ro.isInt8Array=hUt;function dUt(e){return nv(e)==="Int16Array"}ro.isInt16Array=dUt;function pUt(e){return nv(e)==="Int32Array"}ro.isInt32Array=pUt;function vUt(e){return nv(e)==="Float32Array"}ro.isFloat32Array=vUt;function gUt(e){return nv(e)==="Float64Array"}ro.isFloat64Array=gUt;function mUt(e){return nv(e)==="BigInt64Array"}ro.isBigInt64Array=mUt;function yUt(e){return nv(e)==="BigUint64Array"}ro.isBigUint64Array=yUt;function S9(e){return Rd(e)==="[object Map]"}S9.working=typeof Map!="undefined"&&S9(new Map);function xUt(e){return typeof Map=="undefined"?!1:S9.working?S9(e):e instanceof Map}ro.isMap=xUt;function E9(e){return Rd(e)==="[object Set]"}E9.working=typeof Set!="undefined"&&E9(new Set);function _Ut(e){return typeof Set=="undefined"?!1:E9.working?E9(e):e instanceof Set}ro.isSet=_Ut;function k9(e){return Rd(e)==="[object WeakMap]"}k9.working=typeof WeakMap!="undefined"&&k9(new WeakMap);function bUt(e){return typeof WeakMap=="undefined"?!1:k9.working?k9(e):e instanceof WeakMap}ro.isWeakMap=bUt;function _X(e){return Rd(e)==="[object WeakSet]"}_X.working=typeof WeakSet!="undefined"&&_X(new WeakSet);function wUt(e){return _X(e)}ro.isWeakSet=wUt;function C9(e){return Rd(e)==="[object ArrayBuffer]"}C9.working=typeof ArrayBuffer!="undefined"&&C9(new ArrayBuffer);function f7e(e){return typeof ArrayBuffer=="undefined"?!1:C9.working?C9(e):e instanceof ArrayBuffer}ro.isArrayBuffer=f7e;function D9(e){return Rd(e)==="[object DataView]"}D9.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&D9(new DataView(new ArrayBuffer(1),0,1));function h7e(e){return typeof DataView=="undefined"?!1:D9.working?D9(e):e instanceof DataView}ro.isDataView=h7e;var xX=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function oS(e){return Rd(e)==="[object SharedArrayBuffer]"}function d7e(e){return typeof xX=="undefined"?!1:(typeof oS.working=="undefined"&&(oS.working=oS(new xX)),oS.working?oS(e):e instanceof xX)}ro.isSharedArrayBuffer=d7e;function TUt(e){return Rd(e)==="[object AsyncFunction]"}ro.isAsyncFunction=TUt;function AUt(e){return Rd(e)==="[object Map Iterator]"}ro.isMapIterator=AUt;function MUt(e){return Rd(e)==="[object Set Iterator]"}ro.isSetIterator=MUt;function SUt(e){return Rd(e)==="[object Generator]"}ro.isGeneratorObject=SUt;function EUt(e){return Rd(e)==="[object WebAssembly.Module]"}ro.isWebAssemblyCompiledModule=EUt;function p7e(e){return sS(e,iUt)}ro.isNumberObject=p7e;function v7e(e){return sS(e,nUt)}ro.isStringObject=v7e;function g7e(e){return sS(e,aUt)}ro.isBooleanObject=g7e;function m7e(e){return s7e&&sS(e,u7e)}ro.isBigIntObject=m7e;function y7e(e){return l7e&&sS(e,c7e)}ro.isSymbolObject=y7e;function kUt(e){return p7e(e)||v7e(e)||g7e(e)||m7e(e)||y7e(e)}ro.isBoxedPrimitive=kUt;function CUt(e){return typeof Uint8Array!="undefined"&&(f7e(e)||d7e(e))}ro.isAnyArrayBuffer=CUt;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(ro,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var wX=W((rNr,x7e)=>{x7e.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var kX=W(io=>{var _7e=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),i={},n=0;n<r.length;n++)i[r[n]]=Object.getOwnPropertyDescriptor(t,r[n]);return i},DUt=/%[sdj%]/g;io.format=function(e){if(!B9(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(r2(arguments[r]));return t.join(" ")}for(var r=1,i=arguments,n=i.length,a=String(e).replace(DUt,function(s){if(s==="%%")return"%";if(r>=n)return s;switch(s){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(l){return"[Circular]"}default:return s}}),o=i[r];r<n;o=i[++r])z9(o)||!$5(o)?a+=" "+o:a+=" "+r2(o);return a};io.deprecate=function(e,t){if(typeof process!="undefined"&&process.noDeprecation===!0)return e;if(typeof process=="undefined")return function(){return io.deprecate(e,t).apply(this,arguments)};var r=!1;function i(){if(!r){if(process.throwDeprecation)throw new Error(t);process.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}return i};var F9={},b7e=/^$/;L9="false",L9=L9.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),b7e=new RegExp("^"+L9+"$","i");var L9;io.debuglog=function(e){if(e=e.toUpperCase(),!F9[e])if(b7e.test(e)){var t=process.pid;F9[e]=function(){var r=io.format.apply(io,arguments);console.error("%s %d: %s",e,t,r)}}else F9[e]=function(){};return F9[e]};function r2(e,t){var r={seen:[],stylize:LUt};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),SX(t)?r.showHidden=t:t&&io._extend(r,t),W_(r.showHidden)&&(r.showHidden=!1),W_(r.depth)&&(r.depth=2),W_(r.colors)&&(r.colors=!1),W_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=FUt),I9(r,e,r.depth)}io.inspect=r2;r2.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]};r2.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function FUt(e,t){var r=r2.styles[t];return r?"\x1B["+r2.colors[r][0]+"m"+e+"\x1B["+r2.colors[r][1]+"m":e}function LUt(e,t){return e}function PUt(e){var t={};return e.forEach(function(r,i){t[r]=!0}),t}function I9(e,t,r){if(e.customInspect&&t&&P9(t.inspect)&&t.inspect!==io.inspect&&!(t.constructor&&t.constructor.prototype===t)){var i=t.inspect(r,e);return B9(i)||(i=I9(e,i,r)),i}var n=IUt(e,t);if(n)return n;var a=Object.keys(t),o=PUt(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),uS(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return TX(t);if(a.length===0){if(P9(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(lS(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(R9(t))return e.stylize(Date.prototype.toString.call(t),"date");if(uS(t))return TX(t)}var l="",u=!1,c=["{","}"];if(w7e(t)&&(u=!0,c=["[","]"]),P9(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(lS(t)&&(l=" "+RegExp.prototype.toString.call(t)),R9(t)&&(l=" "+Date.prototype.toUTCString.call(t)),uS(t)&&(l=" "+TX(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return lS(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=RUt(e,t,r,o,a):h=a.map(function(d){return MX(e,t,r,o,d,u)}),e.seen.pop(),zUt(h,l,c)}function IUt(e,t){if(W_(t))return e.stylize("undefined","undefined");if(B9(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(T7e(t))return e.stylize(""+t,"number");if(SX(t))return e.stylize(""+t,"boolean");if(z9(t))return e.stylize("null","null")}function TX(e){return"["+Error.prototype.toString.call(e)+"]"}function RUt(e,t,r,i,n){for(var a=[],o=0,s=t.length;o<s;++o)A7e(t,String(o))?a.push(MX(e,t,r,i,String(o),!0)):a.push("");return n.forEach(function(l){l.match(/^\d+$/)||a.push(MX(e,t,r,i,l,!0))}),a}function MX(e,t,r,i,n,a){var o,s,l;if(l=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]},l.get?l.set?s=e.stylize("[Getter/Setter]","special"):s=e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),A7e(i,n)||(o="["+n+"]"),s||(e.seen.indexOf(l.value)<0?(z9(r)?s=I9(e,l.value,null):s=I9(e,l.value,r-1),s.indexOf(`
`)>-1&&(a?s=s.split(`
`).map(function(u){return" "+u}).join(`
`).slice(2):s=`
`+s.split(`
`).map(function(u){return" "+u}).join(`
`))):s=e.stylize("[Circular]","special")),W_(o)){if(a&&n.match(/^\d+$/))return s;o=JSON.stringify(""+n),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function zUt(e,t,r){var i=0,n=e.reduce(function(a,o){return i++,o.indexOf(`
`)>=0&&i++,a+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(t===""?"":t+`
`)+" "+e.join(`,
`)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}io.types=bX();function w7e(e){return Array.isArray(e)}io.isArray=w7e;function SX(e){return typeof e=="boolean"}io.isBoolean=SX;function z9(e){return e===null}io.isNull=z9;function BUt(e){return e==null}io.isNullOrUndefined=BUt;function T7e(e){return typeof e=="number"}io.isNumber=T7e;function B9(e){return typeof e=="string"}io.isString=B9;function qUt(e){return typeof e=="symbol"}io.isSymbol=qUt;function W_(e){return e===void 0}io.isUndefined=W_;function lS(e){return $5(e)&&EX(e)==="[object RegExp]"}io.isRegExp=lS;io.types.isRegExp=lS;function $5(e){return typeof e=="object"&&e!==null}io.isObject=$5;function R9(e){return $5(e)&&EX(e)==="[object Date]"}io.isDate=R9;io.types.isDate=R9;function uS(e){return $5(e)&&(EX(e)==="[object Error]"||e instanceof Error)}io.isError=uS;io.types.isNativeError=uS;function P9(e){return typeof e=="function"}io.isFunction=P9;function OUt(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}io.isPrimitive=OUt;io.isBuffer=wX();function EX(e){return Object.prototype.toString.call(e)}function AX(e){return e<10?"0"+e.toString(10):e.toString(10)}var NUt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function UUt(){var e=new Date,t=[AX(e.getHours()),AX(e.getMinutes()),AX(e.getSeconds())].join(":");return[e.getDate(),NUt[e.getMonth()],t].join(" ")}io.log=function(){console.log("%s - %s",UUt(),io.format.apply(io,arguments))};io.inherits=Kg();io._extend=function(e,t){if(!t||!$5(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e};function A7e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var $_=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;io.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if($_&&t[$_]){var r=t[$_];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,$_,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var i,n,a=new Promise(function(l,u){i=l,n=u}),o=[],s=0;s<arguments.length;s++)o.push(arguments[s]);o.push(function(l,u){l?n(l):i(u)});try{t.apply(this,o)}catch(l){n(l)}return a}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),$_&&Object.defineProperty(r,$_,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,_7e(t))};io.promisify.custom=$_;function VUt(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}function GUt(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');function t(){for(var r=[],i=0;i<arguments.length;i++)r.push(arguments[i]);var n=r.pop();if(typeof n!="function")throw new TypeError("The last argument must be of type Function");var a=this,o=function(){return n.apply(a,arguments)};e.apply(this,r).then(function(s){process.nextTick(o.bind(null,null,s))},function(s){process.nextTick(VUt.bind(null,s,o))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,_7e(e)),t}io.callbackify=GUt});var D7e=W((nNr,C7e)=>{"use strict";function M7e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function S7e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?M7e(Object(r),!0).forEach(function(i){HUt(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M7e(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function HUt(e,t,r){return t=k7e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jUt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E7e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,k7e(i.key),i)}}function $Ut(e,t,r){return t&&E7e(e.prototype,t),r&&E7e(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function k7e(e){var t=WUt(e,"string");return typeof t=="symbol"?t:String(t)}function WUt(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var YUt=V_(),q9=YUt.Buffer,XUt=kX(),CX=XUt.inspect,ZUt=CX&&CX.custom||"inspect";function KUt(e,t,r){q9.prototype.copy.call(e,t,r)}C7e.exports=(function(){function e(){jUt(this,e),this.head=null,this.tail=null,this.length=0}return $Ut(e,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return q9.alloc(0);for(var i=q9.allocUnsafe(r>>>0),n=this.head,a=0;n;)KUt(n.data,i,a),a+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,a=i.data;for(r-=a.length;i=i.next;){var o=i.data,s=r>o.length?o.length:r;if(s===o.length?a+=o:a+=o.slice(0,r),r-=s,r===0){s===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(s));break}++n}return this.length-=n,a}},{key:"_getBuffer",value:function(r){var i=q9.allocUnsafe(r),n=this.head,a=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var o=n.data,s=r>o.length?o.length:r;if(o.copy(i,i.length-r,0,s),r-=s,r===0){s===o.length?(++a,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++a}return this.length-=a,i}},{key:ZUt,value:function(r,i){return CX(this,S7e(S7e({},i),{},{depth:0,customInspect:!1}))}}]),e})()});var FX=W((aNr,L7e)=>{"use strict";function JUt(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(DX,this,e)):process.nextTick(DX,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted?process.nextTick(O9,r):(r._writableState.errorEmitted=!0,process.nextTick(F7e,r,a)):process.nextTick(F7e,r,a):t?(process.nextTick(O9,r),t(a)):process.nextTick(O9,r)}),this)}function F7e(e,t){DX(e,t),O9(e)}function O9(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function QUt(){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 DX(e,t){e.emit("error",t)}function eVt(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}L7e.exports={destroy:JUt,undestroy:QUt,errorOrDestroy:eVt}});var Y_=W((oNr,R7e)=>{"use strict";function tVt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var I7e={};function zd(e,t,r){r||(r=Error);function i(a,o,s){return typeof t=="string"?t:t(a,o,s)}var n=(function(a){tVt(o,a);function o(s,l,u){return a.call(this,i(s,l,u))||this}return o})(r);n.prototype.name=r.name,n.prototype.code=e,I7e[e]=n}function P7e(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(i){return String(i)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function rVt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function iVt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function nVt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}zd("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);zd("ERR_INVALID_ARG_TYPE",function(e,t,r){var i;typeof t=="string"&&rVt(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";var n;if(iVt(e," argument"))n="The ".concat(e," ").concat(i," ").concat(P7e(t,"type"));else{var a=nVt(e,".")?"property":"argument";n='The "'.concat(e,'" ').concat(a," ").concat(i," ").concat(P7e(t,"type"))}return n+=". Received type ".concat(typeof r),n},TypeError);zd("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");zd("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});zd("ERR_STREAM_PREMATURE_CLOSE","Premature close");zd("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});zd("ERR_MULTIPLE_CALLBACK","Callback called multiple times");zd("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");zd("ERR_STREAM_WRITE_AFTER_END","write after end");zd("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);zd("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);zd("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");R7e.exports.codes=I7e});var LX=W((sNr,z7e)=>{"use strict";var aVt=Y_().codes.ERR_INVALID_OPT_VALUE;function oVt(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function sVt(e,t,r,i){var n=oVt(t,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var a=i?r:"highWaterMark";throw new aVt(a,n)}return Math.floor(n)}return e.objectMode?16:16*1024}z7e.exports={getHighWaterMark:sVt}});var q7e=W((lNr,B7e)=>{B7e.exports=lVt;function lVt(e,t){if(PX("noDeprecation"))return e;var r=!1;function i(){if(!r){if(PX("throwDeprecation"))throw new Error(t);PX("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return i}function PX(e){try{if(!window.localStorage)return!1}catch(r){return!1}var t=window.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}});var zX=W((uNr,H7e)=>{"use strict";H7e.exports=Yl;function N7e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){RVt(t,e)}}var W5;Yl.WritableState=fS;var uVt={deprecate:q7e()},U7e=qY(),U9=V_().Buffer,cVt=(typeof window!="undefined"||typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function fVt(e){return U9.from(e)}function hVt(e){return U9.isBuffer(e)||e instanceof cVt}var RX=FX(),dVt=LX(),pVt=dVt.getHighWaterMark,i2=Y_().codes,vVt=i2.ERR_INVALID_ARG_TYPE,gVt=i2.ERR_METHOD_NOT_IMPLEMENTED,mVt=i2.ERR_MULTIPLE_CALLBACK,yVt=i2.ERR_STREAM_CANNOT_PIPE,xVt=i2.ERR_STREAM_DESTROYED,_Vt=i2.ERR_STREAM_NULL_VALUES,bVt=i2.ERR_STREAM_WRITE_AFTER_END,wVt=i2.ERR_UNKNOWN_ENCODING,Y5=RX.errorOrDestroy;Kg()(Yl,U7e);function TVt(){}function fS(e,t,r){W5=W5||X_(),e=e||{},typeof r!="boolean"&&(r=t instanceof W5),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=pVt(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){DVt(t,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new N7e(this)}fS.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(fS.prototype,"buffer",{get:uVt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var N9;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(N9=Function.prototype[Symbol.hasInstance],Object.defineProperty(Yl,Symbol.hasInstance,{value:function(t){return N9.call(this,t)?!0:this!==Yl?!1:t&&t._writableState instanceof fS}})):N9=function(t){return t instanceof this};function Yl(e){W5=W5||X_();var t=this instanceof W5;if(!t&&!N9.call(Yl,this))return new Yl(e);this._writableState=new fS(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),U7e.call(this)}Yl.prototype.pipe=function(){Y5(this,new yVt)};function AVt(e,t){var r=new bVt;Y5(e,r),process.nextTick(t,r)}function MVt(e,t,r,i){var n;return r===null?n=new _Vt:typeof r!="string"&&!t.objectMode&&(n=new vVt("chunk",["string","Buffer"],r)),n?(Y5(e,n),process.nextTick(i,n),!1):!0}Yl.prototype.write=function(e,t,r){var i=this._writableState,n=!1,a=!i.objectMode&&hVt(e);return a&&!U9.isBuffer(e)&&(e=fVt(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=TVt),i.ending?AVt(this,r):(a||MVt(this,i,e,r))&&(i.pendingcb++,n=EVt(this,i,a,e,t,r)),n};Yl.prototype.cork=function(){this._writableState.corked++};Yl.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&V7e(this,e))};Yl.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new wVt(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(Yl.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function SVt(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=U9.from(t,r)),t}Object.defineProperty(Yl.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function EVt(e,t,r,i,n,a){if(!r){var o=SVt(t,i,n);i!==o&&(r=!0,n="buffer",i=o)}var s=t.objectMode?1:i.length;t.length+=s;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else IX(e,t,!1,s,i,n,a);return l}function IX(e,t,r,i,n,a,o){t.writelen=i,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new xVt("write")):r?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1}function kVt(e,t,r,i,n){--t.pendingcb,r?(process.nextTick(n,i),process.nextTick(cS,e,t),e._writableState.errorEmitted=!0,Y5(e,i)):(n(i),e._writableState.errorEmitted=!0,Y5(e,i),cS(e,t))}function CVt(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function DVt(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new mVt;if(CVt(r),t)kVt(e,r,i,t,n);else{var a=G7e(r)||e.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&V7e(e,r),i?process.nextTick(O7e,e,r,a,n):O7e(e,r,a,n)}}function O7e(e,t,r,i){r||FVt(e,t),t.pendingcb--,i(),cS(e,t)}function FVt(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function V7e(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),a=t.corkedRequestsFree;a.entry=r;for(var o=0,s=!0;r;)n[o]=r,r.isBuf||(s=!1),r=r.next,o+=1;n.allBuffers=s,IX(e,t,!0,t.length,n,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new N7e(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,f=t.objectMode?1:l.length;if(IX(e,t,!1,f,l,u,c),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}Yl.prototype._write=function(e,t,r){r(new gVt("_write()"))};Yl.prototype._writev=null;Yl.prototype.end=function(e,t,r){var i=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||IVt(this,i,r),this};Object.defineProperty(Yl.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function G7e(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function LVt(e,t){e._final(function(r){t.pendingcb--,r&&Y5(e,r),t.prefinished=!0,e.emit("prefinish"),cS(e,t)})}function PVt(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick(LVt,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function cS(e,t){var r=G7e(t);if(r&&(PVt(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}function IVt(e,t,r){t.ending=!0,cS(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function RVt(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(Yl.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});Yl.prototype.destroy=RX.destroy;Yl.prototype._undestroy=RX.undestroy;Yl.prototype._destroy=function(e,t){t(e)}});var X_=W((cNr,$7e)=>{"use strict";var zVt=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};$7e.exports=D1;var j7e=OX(),qX=zX();Kg()(D1,j7e);for(BX=zVt(qX.prototype),V9=0;V9<BX.length;V9++)G9=BX[V9],D1.prototype[G9]||(D1.prototype[G9]=qX.prototype[G9]);var BX,G9,V9;function D1(e){if(!(this instanceof D1))return new D1(e);j7e.call(this,e),qX.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",BVt)))}Object.defineProperty(D1.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(D1.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(D1.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function BVt(){this._writableState.ended||process.nextTick(qVt,this)}function qVt(e){e.end()}Object.defineProperty(D1.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}})});var X7e=W((NX,Y7e)=>{var H9=V_(),F1=H9.Buffer;function W7e(e,t){for(var r in e)t[r]=e[r]}F1.from&&F1.alloc&&F1.allocUnsafe&&F1.allocUnsafeSlow?Y7e.exports=H9:(W7e(H9,NX),NX.Buffer=Z_);function Z_(e,t,r){return F1(e,t,r)}Z_.prototype=Object.create(F1.prototype);W7e(F1,Z_);Z_.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return F1(e,t,r)};Z_.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=F1(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};Z_.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return F1(e)};Z_.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return H9.SlowBuffer(e)}});var GX=W(K7e=>{"use strict";var VX=X7e().Buffer,Z7e=VX.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function OVt(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function NVt(e){var t=OVt(e);if(typeof t!="string"&&(VX.isEncoding===Z7e||!Z7e(e)))throw new Error("Unknown encoding: "+e);return t||e}K7e.StringDecoder=hS;function hS(e){this.encoding=NVt(e);var t;switch(this.encoding){case"utf16le":this.text=$Vt,this.end=WVt,t=4;break;case"utf8":this.fillLast=GVt,t=4;break;case"base64":this.text=YVt,this.end=XVt,t=3;break;default:this.write=ZVt,this.end=KVt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=VX.allocUnsafe(t)}hS.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};hS.prototype.end=jVt;hS.prototype.text=HVt;hS.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function UX(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function UVt(e,t,r){var i=t.length-1;if(i<r)return 0;var n=UX(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=UX(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=UX(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function VVt(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function GVt(e){var t=this.lastTotal-this.lastNeed,r=VVt(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function HVt(e,t){var r=UVt(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function jVt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function $Vt(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function WVt(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function YVt(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function XVt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function ZVt(e){return e.toString(this.encoding)}function KVt(e){return e&&e.length?this.write(e):""}});var j9=W((hNr,eFe)=>{"use strict";var J7e=Y_().codes.ERR_STREAM_PREMATURE_CLOSE;function JVt(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];e.apply(this,i)}}}function QVt(){}function eGt(e){return e.setHeader&&typeof e.abort=="function"}function Q7e(e,t,r){if(typeof t=="function")return Q7e(e,null,t);t||(t={}),r=JVt(r||QVt);var i=t.readable||t.readable!==!1&&e.readable,n=t.writable||t.writable!==!1&&e.writable,a=function(){e.writable||s()},o=e._writableState&&e._writableState.finished,s=function(){n=!1,o=!0,i||r.call(e)},l=e._readableState&&e._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(e)},c=function(p){r.call(e,p)},f=function(){var p;if(i&&!l)return(!e._readableState||!e._readableState.ended)&&(p=new J7e),r.call(e,p);if(n&&!o)return(!e._writableState||!e._writableState.ended)&&(p=new J7e),r.call(e,p)},h=function(){e.req.on("finish",s)};return eGt(e)?(e.on("complete",s),e.on("abort",f),e.req?h():e.on("request",h)):n&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",u),e.on("finish",s),t.error!==!1&&e.on("error",c),e.on("close",f),function(){e.removeListener("complete",s),e.removeListener("abort",f),e.removeListener("request",h),e.req&&e.req.removeListener("finish",s),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",s),e.removeListener("end",u),e.removeListener("error",c),e.removeListener("close",f)}}eFe.exports=Q7e});var rFe=W((dNr,tFe)=>{"use strict";var $9;function n2(e,t,r){return t=tGt(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tGt(e){var t=rGt(e,"string");return typeof t=="symbol"?t:String(t)}function rGt(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iGt=j9(),a2=Symbol("lastResolve"),K_=Symbol("lastReject"),dS=Symbol("error"),W9=Symbol("ended"),J_=Symbol("lastPromise"),HX=Symbol("handlePromise"),Q_=Symbol("stream");function o2(e,t){return{value:e,done:t}}function nGt(e){var t=e[a2];if(t!==null){var r=e[Q_].read();r!==null&&(e[J_]=null,e[a2]=null,e[K_]=null,t(o2(r,!1)))}}function aGt(e){process.nextTick(nGt,e)}function oGt(e,t){return function(r,i){e.then(function(){if(t[W9]){r(o2(void 0,!0));return}t[HX](r,i)},i)}}var sGt=Object.getPrototypeOf(function(){}),lGt=Object.setPrototypeOf(($9={get stream(){return this[Q_]},next:function(){var t=this,r=this[dS];if(r!==null)return Promise.reject(r);if(this[W9])return Promise.resolve(o2(void 0,!0));if(this[Q_].destroyed)return new Promise(function(o,s){process.nextTick(function(){t[dS]?s(t[dS]):o(o2(void 0,!0))})});var i=this[J_],n;if(i)n=new Promise(oGt(i,this));else{var a=this[Q_].read();if(a!==null)return Promise.resolve(o2(a,!1));n=new Promise(this[HX])}return this[J_]=n,n}},n2($9,Symbol.asyncIterator,function(){return this}),n2($9,"return",function(){var t=this;return new Promise(function(r,i){t[Q_].destroy(null,function(n){if(n){i(n);return}r(o2(void 0,!0))})})}),$9),sGt),uGt=function(t){var r,i=Object.create(lGt,(r={},n2(r,Q_,{value:t,writable:!0}),n2(r,a2,{value:null,writable:!0}),n2(r,K_,{value:null,writable:!0}),n2(r,dS,{value:null,writable:!0}),n2(r,W9,{value:t._readableState.endEmitted,writable:!0}),n2(r,HX,{value:function(a,o){var s=i[Q_].read();s?(i[J_]=null,i[a2]=null,i[K_]=null,a(o2(s,!1))):(i[a2]=a,i[K_]=o)},writable:!0}),r));return i[J_]=null,iGt(t,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=i[K_];a!==null&&(i[J_]=null,i[a2]=null,i[K_]=null,a(n)),i[dS]=n;return}var o=i[a2];o!==null&&(i[J_]=null,i[a2]=null,i[K_]=null,o(o2(void 0,!0))),i[W9]=!0}),t.on("readable",aGt.bind(null,i)),i};tFe.exports=uGt});var nFe=W((pNr,iFe)=>{iFe.exports=function(){throw new Error("Readable.from is not available in the browser")}});var OX=W((gNr,pFe)=>{"use strict";pFe.exports=ko;var X5;ko.ReadableState=lFe;var vNr=Vx().EventEmitter,sFe=function(t,r){return t.listeners(r).length},vS=qY(),Y9=V_().Buffer,cGt=(typeof window!="undefined"||typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function fGt(e){return Y9.from(e)}function hGt(e){return Y9.isBuffer(e)||e instanceof cGt}var jX=kX(),Ka;jX&&jX.debuglog?Ka=jX.debuglog("stream"):Ka=function(){};var dGt=D7e(),JX=FX(),pGt=LX(),vGt=pGt.getHighWaterMark,X9=Y_().codes,gGt=X9.ERR_INVALID_ARG_TYPE,mGt=X9.ERR_STREAM_PUSH_AFTER_EOF,yGt=X9.ERR_METHOD_NOT_IMPLEMENTED,xGt=X9.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Z5,$X,WX;Kg()(ko,vS);var pS=JX.errorOrDestroy,YX=["error","close","destroy","pause","resume"];function _Gt(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function lFe(e,t,r){X5=X5||X_(),e=e||{},typeof r!="boolean"&&(r=t instanceof X5),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=vGt(this,e,"readableHighWaterMark",r),this.buffer=new dGt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(Z5||(Z5=GX().StringDecoder),this.decoder=new Z5(e.encoding),this.encoding=e.encoding)}function ko(e){if(X5=X5||X_(),!(this instanceof ko))return new ko(e);var t=this instanceof X5;this._readableState=new lFe(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),vS.call(this)}Object.defineProperty(ko.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});ko.prototype.destroy=JX.destroy;ko.prototype._undestroy=JX.undestroy;ko.prototype._destroy=function(e,t){t(e)};ko.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Y9.from(e,t),t=""),i=!0),uFe(this,e,t,!1,i)};ko.prototype.unshift=function(e){return uFe(this,e,null,!0,!1)};function uFe(e,t,r,i,n){Ka("readableAddChunk",t);var a=e._readableState;if(t===null)a.reading=!1,TGt(e,a);else{var o;if(n||(o=bGt(a,t)),o)pS(e,o);else if(a.objectMode||t&&t.length>0)if(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==Y9.prototype&&(t=fGt(t)),i)a.endEmitted?pS(e,new xGt):XX(e,a,t,!0);else if(a.ended)pS(e,new mGt);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?XX(e,a,t,!1):KX(e,a)):XX(e,a,t,!1)}else i||(a.reading=!1,KX(e,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function XX(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Z9(e)),KX(e,t)}function bGt(e,t){var r;return!hGt(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new gGt("chunk",["string","Buffer","Uint8Array"],t)),r}ko.prototype.isPaused=function(){return this._readableState.flowing===!1};ko.prototype.setEncoding=function(e){Z5||(Z5=GX().StringDecoder);var t=new Z5(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var aFe=1073741824;function wGt(e){return e>=aFe?e=aFe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function oFe(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=wGt(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}ko.prototype.read=function(e){Ka("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return Ka("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?ZX(this):Z9(this),null;if(e=oFe(e,t),e===0&&t.ended)return t.length===0&&ZX(this),null;var i=t.needReadable;Ka("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,Ka("length less than watermark",i)),t.ended||t.reading?(i=!1,Ka("reading or ended",i)):i&&(Ka("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=oFe(r,t)));var n;return e>0?n=hFe(e,t):n=null,n===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&ZX(this)),n!==null&&this.emit("data",n),n};function TGt(e,t){if(Ka("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?Z9(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,cFe(e)))}}function Z9(e){var t=e._readableState;Ka("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(Ka("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(cFe,e))}function cFe(e){var t=e._readableState;Ka("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,QX(e)}function KX(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(AGt,e,t))}function AGt(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(Ka("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}ko.prototype._read=function(e){pS(this,new yGt("_read()"))};ko.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,Ka("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=n?s:v;i.endEmitted?process.nextTick(a):r.once("end",a),e.on("unpipe",o);function o(m,g){Ka("onunpipe"),m===r&&g&&g.hasUnpiped===!1&&(g.hasUnpiped=!0,c())}function s(){Ka("onend"),e.end()}var l=MGt(r);e.on("drain",l);var u=!1;function c(){Ka("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",o),r.removeListener("end",s),r.removeListener("end",v),r.removeListener("data",f),u=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l()}r.on("data",f);function f(m){Ka("ondata");var g=e.write(m);Ka("dest.write",g),g===!1&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&dFe(i.pipes,e)!==-1)&&!u&&(Ka("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(m){Ka("onerror",m),v(),e.removeListener("error",h),sFe(e,"error")===0&&pS(e,m)}_Gt(e,"error",h);function d(){e.removeListener("finish",p),v()}e.once("close",d);function p(){Ka("onfinish"),e.removeListener("close",d),v()}e.once("finish",p);function v(){Ka("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(Ka("pipe resume"),r.resume()),e};function MGt(e){return function(){var r=e._readableState;Ka("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&sFe(e,"data")&&(r.flowing=!0,QX(e))}}ko.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=dFe(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};ko.prototype.on=function(e,t){var r=vS.prototype.on.call(this,e,t),i=this._readableState;return e==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):e==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,Ka("on readable",i.length,i.reading),i.length?Z9(this):i.reading||process.nextTick(SGt,this)),r};ko.prototype.addListener=ko.prototype.on;ko.prototype.removeListener=function(e,t){var r=vS.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(fFe,this),r};ko.prototype.removeAllListeners=function(e){var t=vS.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(fFe,this),t};function fFe(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function SGt(e){Ka("readable nexttick read 0"),e.read(0)}ko.prototype.resume=function(){var e=this._readableState;return e.flowing||(Ka("resume"),e.flowing=!e.readableListening,EGt(this,e)),e.paused=!1,this};function EGt(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(kGt,e,t))}function kGt(e,t){Ka("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),QX(e),t.flowing&&!t.reading&&e.read(0)}ko.prototype.pause=function(){return Ka("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ka("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function QX(e){var t=e._readableState;for(Ka("flow",t.flowing);t.flowing&&e.read()!==null;);}ko.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(Ka("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(Ka("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=(function(s){return function(){return e[s].apply(e,arguments)}})(n));for(var a=0;a<YX.length;a++)e.on(YX[a],this.emit.bind(this,YX[a]));return this._read=function(o){Ka("wrapped _read",o),i&&(i=!1,e.resume())},this};typeof Symbol=="function"&&(ko.prototype[Symbol.asyncIterator]=function(){return $X===void 0&&($X=rFe()),$X(this)});Object.defineProperty(ko.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(ko.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(ko.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}});ko._fromList=hFe;Object.defineProperty(ko.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function hFe(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function ZX(e){var t=e._readableState;Ka("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(CGt,t,e))}function CGt(e,t){if(Ka("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(ko.from=function(e,t){return WX===void 0&&(WX=nFe()),WX(ko,e,t)});function dFe(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var eZ=W((mNr,gFe)=>{"use strict";gFe.exports=Qg;var K9=Y_().codes,DGt=K9.ERR_METHOD_NOT_IMPLEMENTED,FGt=K9.ERR_MULTIPLE_CALLBACK,LGt=K9.ERR_TRANSFORM_ALREADY_TRANSFORMING,PGt=K9.ERR_TRANSFORM_WITH_LENGTH_0,J9=X_();Kg()(Qg,J9);function IGt(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new FGt);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function Qg(e){if(!(this instanceof Qg))return new Qg(e);J9.call(this,e),this._transformState={afterTransform:IGt.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",RGt)}function RGt(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){vFe(e,t,r)}):vFe(this,null,null)}Qg.prototype.push=function(e,t){return this._transformState.needTransform=!1,J9.prototype.push.call(this,e,t)};Qg.prototype._transform=function(e,t,r){r(new DGt("_transform()"))};Qg.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};Qg.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};Qg.prototype._destroy=function(e,t){J9.prototype._destroy.call(this,e,function(r){t(r)})};function vFe(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new PGt;if(e._transformState.transforming)throw new LGt;return e.push(null)}});var xFe=W((yNr,yFe)=>{"use strict";yFe.exports=gS;var mFe=eZ();Kg()(gS,mFe);function gS(e){if(!(this instanceof gS))return new gS(e);mFe.call(this,e)}gS.prototype._transform=function(e,t,r){r(null,e)}});var AFe=W((xNr,TFe)=>{"use strict";var tZ;function zGt(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var wFe=Y_().codes,BGt=wFe.ERR_MISSING_ARGS,qGt=wFe.ERR_STREAM_DESTROYED;function _Fe(e){if(e)throw e}function OGt(e){return e.setHeader&&typeof e.abort=="function"}function NGt(e,t,r,i){i=zGt(i);var n=!1;e.on("close",function(){n=!0}),tZ===void 0&&(tZ=j9()),tZ(e,{readable:t,writable:r},function(o){if(o)return i(o);n=!0,i()});var a=!1;return function(o){if(!n&&!a){if(a=!0,OGt(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();i(o||new qGt("pipe"))}}}function bFe(e){e()}function UGt(e,t){return e.pipe(t)}function VGt(e){return!e.length||typeof e[e.length-1]!="function"?_Fe:e.pop()}function GGt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=VGt(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new BGt("streams");var n,a=t.map(function(o,s){var l=s<t.length-1,u=s>0;return NGt(o,l,u,function(c){n||(n=c),c&&a.forEach(bFe),!l&&(a.forEach(bFe),i(n))})});return t.reduce(UGt)}TFe.exports=GGt});var SFe=W((_Nr,MFe)=>{MFe.exports=Bd;var rZ=Vx().EventEmitter,HGt=Kg();HGt(Bd,rZ);Bd.Readable=OX();Bd.Writable=zX();Bd.Duplex=X_();Bd.Transform=eZ();Bd.PassThrough=xFe();Bd.finished=j9();Bd.pipeline=AFe();Bd.Stream=Bd;function Bd(){rZ.call(this)}Bd.prototype.pipe=function(e,t){var r=this;function i(c){e.writable&&e.write(c)===!1&&r.pause&&r.pause()}r.on("data",i);function n(){r.readable&&r.resume&&r.resume()}e.on("drain",n),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",o),r.on("close",s));var a=!1;function o(){a||(a=!0,e.end())}function s(){a||(a=!0,typeof e.destroy=="function"&&e.destroy())}function l(c){if(u(),rZ.listenerCount(this,"error")===0)throw c}r.on("error",l),e.on("error",l);function u(){r.removeListener("data",i),e.removeListener("drain",n),r.removeListener("end",o),r.removeListener("close",s),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e}});var J5=W(no=>{var EFe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),i={},n=0;n<r.length;n++)i[r[n]]=Object.getOwnPropertyDescriptor(t,r[n]);return i},jGt=/%[sdj%]/g;no.format=function(e){if(!aP(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(s2(arguments[r]));return t.join(" ")}for(var r=1,i=arguments,n=i.length,a=String(e).replace(jGt,function(s){if(s==="%%")return"%";if(r>=n)return s;switch(s){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(l){return"[Circular]"}default:return s}}),o=i[r];r<n;o=i[++r])nP(o)||!K5(o)?a+=" "+o:a+=" "+s2(o);return a};no.deprecate=function(e,t){if(typeof process!="undefined"&&process.noDeprecation===!0)return e;if(typeof process=="undefined")return function(){return no.deprecate(e,t).apply(this,arguments)};var r=!1;function i(){if(!r){if(process.throwDeprecation)throw new Error(t);process.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}return i};var Q9={},kFe=/^$/;eP="false",eP=eP.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),kFe=new RegExp("^"+eP+"$","i");var eP;no.debuglog=function(e){if(e=e.toUpperCase(),!Q9[e])if(kFe.test(e)){var t=process.pid;Q9[e]=function(){var r=no.format.apply(no,arguments);console.error("%s %d: %s",e,t,r)}}else Q9[e]=function(){};return Q9[e]};function s2(e,t){var r={seen:[],stylize:WGt};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),oZ(t)?r.showHidden=t:t&&no._extend(r,t),tb(r.showHidden)&&(r.showHidden=!1),tb(r.depth)&&(r.depth=2),tb(r.colors)&&(r.colors=!1),tb(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=$Gt),rP(r,e,r.depth)}no.inspect=s2;s2.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]};s2.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function $Gt(e,t){var r=s2.styles[t];return r?"\x1B["+s2.colors[r][0]+"m"+e+"\x1B["+s2.colors[r][1]+"m":e}function WGt(e,t){return e}function YGt(e){var t={};return e.forEach(function(r,i){t[r]=!0}),t}function rP(e,t,r){if(e.customInspect&&t&&tP(t.inspect)&&t.inspect!==no.inspect&&!(t.constructor&&t.constructor.prototype===t)){var i=t.inspect(r,e);return aP(i)||(i=rP(e,i,r)),i}var n=XGt(e,t);if(n)return n;var a=Object.keys(t),o=YGt(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),yS(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return iZ(t);if(a.length===0){if(tP(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(mS(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(iP(t))return e.stylize(Date.prototype.toString.call(t),"date");if(yS(t))return iZ(t)}var l="",u=!1,c=["{","}"];if(CFe(t)&&(u=!0,c=["[","]"]),tP(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(mS(t)&&(l=" "+RegExp.prototype.toString.call(t)),iP(t)&&(l=" "+Date.prototype.toUTCString.call(t)),yS(t)&&(l=" "+iZ(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return mS(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=ZGt(e,t,r,o,a):h=a.map(function(d){return aZ(e,t,r,o,d,u)}),e.seen.pop(),KGt(h,l,c)}function XGt(e,t){if(tb(t))return e.stylize("undefined","undefined");if(aP(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(DFe(t))return e.stylize(""+t,"number");if(oZ(t))return e.stylize(""+t,"boolean");if(nP(t))return e.stylize("null","null")}function iZ(e){return"["+Error.prototype.toString.call(e)+"]"}function ZGt(e,t,r,i,n){for(var a=[],o=0,s=t.length;o<s;++o)FFe(t,String(o))?a.push(aZ(e,t,r,i,String(o),!0)):a.push("");return n.forEach(function(l){l.match(/^\d+$/)||a.push(aZ(e,t,r,i,l,!0))}),a}function aZ(e,t,r,i,n,a){var o,s,l;if(l=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]},l.get?l.set?s=e.stylize("[Getter/Setter]","special"):s=e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),FFe(i,n)||(o="["+n+"]"),s||(e.seen.indexOf(l.value)<0?(nP(r)?s=rP(e,l.value,null):s=rP(e,l.value,r-1),s.indexOf(`
`)>-1&&(a?s=s.split(`
`).map(function(u){return" "+u}).join(`
`).slice(2):s=`
`+s.split(`
`).map(function(u){return" "+u}).join(`
`))):s=e.stylize("[Circular]","special")),tb(o)){if(a&&n.match(/^\d+$/))return s;o=JSON.stringify(""+n),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function KGt(e,t,r){var i=0,n=e.reduce(function(a,o){return i++,o.indexOf(`
`)>=0&&i++,a+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(t===""?"":t+`
`)+" "+e.join(`,
`)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}no.types=bX();function CFe(e){return Array.isArray(e)}no.isArray=CFe;function oZ(e){return typeof e=="boolean"}no.isBoolean=oZ;function nP(e){return e===null}no.isNull=nP;function JGt(e){return e==null}no.isNullOrUndefined=JGt;function DFe(e){return typeof e=="number"}no.isNumber=DFe;function aP(e){return typeof e=="string"}no.isString=aP;function QGt(e){return typeof e=="symbol"}no.isSymbol=QGt;function tb(e){return e===void 0}no.isUndefined=tb;function mS(e){return K5(e)&&sZ(e)==="[object RegExp]"}no.isRegExp=mS;no.types.isRegExp=mS;function K5(e){return typeof e=="object"&&e!==null}no.isObject=K5;function iP(e){return K5(e)&&sZ(e)==="[object Date]"}no.isDate=iP;no.types.isDate=iP;function yS(e){return K5(e)&&(sZ(e)==="[object Error]"||e instanceof Error)}no.isError=yS;no.types.isNativeError=yS;function tP(e){return typeof e=="function"}no.isFunction=tP;function eHt(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}no.isPrimitive=eHt;no.isBuffer=wX();function sZ(e){return Object.prototype.toString.call(e)}function nZ(e){return e<10?"0"+e.toString(10):e.toString(10)}var tHt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function rHt(){var e=new Date,t=[nZ(e.getHours()),nZ(e.getMinutes()),nZ(e.getSeconds())].join(":");return[e.getDate(),tHt[e.getMonth()],t].join(" ")}no.log=function(){console.log("%s - %s",rHt(),no.format.apply(no,arguments))};no.inherits=Kg();no._extend=function(e,t){if(!t||!K5(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e};function FFe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var eb=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;no.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(eb&&t[eb]){var r=t[eb];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,eb,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var i,n,a=new Promise(function(l,u){i=l,n=u}),o=[],s=0;s<arguments.length;s++)o.push(arguments[s]);o.push(function(l,u){l?n(l):i(u)});try{t.apply(this,o)}catch(l){n(l)}return a}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),eb&&Object.defineProperty(r,eb,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,EFe(t))};no.promisify.custom=eb;function iHt(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}function nHt(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');function t(){for(var r=[],i=0;i<arguments.length;i++)r.push(arguments[i]);var n=r.pop();if(typeof n!="function")throw new TypeError("The last argument must be of type Function");var a=this,o=function(){return n.apply(a,arguments)};e.apply(this,r).then(function(s){process.nextTick(o.bind(null,null,s))},function(s){process.nextTick(iHt.bind(null,s,o))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,EFe(e)),t}no.callbackify=nHt});var cZ=W((wNr,RFe)=>{"use strict";function l2(e){"@babel/helpers - typeof";return l2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l2(e)}function LFe(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,oHt(i.key),i)}}function aHt(e,t,r){return t&&LFe(e.prototype,t),r&&LFe(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function oHt(e){var t=sHt(e,"string");return l2(t)==="symbol"?t:String(t)}function sHt(e,t){if(l2(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(l2(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lHt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uHt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uZ(e,t)}function uZ(e,t){return uZ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},uZ(e,t)}function cHt(e){var t=dHt();return function(){var i=oP(e),n;if(t){var a=oP(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return fHt(this,n)}}function fHt(e,t){if(t&&(l2(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hHt(e)}function hHt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dHt(){if(typeof Reflect=="undefined"||!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(e){return!1}}function oP(e){return oP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},oP(e)}var IFe={},Q5,lZ;function xS(e,t,r){r||(r=Error);function i(a,o,s){return typeof t=="string"?t:t(a,o,s)}var n=(function(a){uHt(s,a);var o=cHt(s);function s(l,u,c){var f;return lHt(this,s),f=o.call(this,i(l,u,c)),f.code=e,f}return aHt(s)})(r);IFe[e]=n}function PFe(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(i){return String(i)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function pHt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function vHt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function gHt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}xS("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);xS("ERR_INVALID_ARG_TYPE",function(e,t,r){Q5===void 0&&(Q5=sP()),Q5(typeof e=="string","'name' must be a string");var i;typeof t=="string"&&pHt(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be";var n;if(vHt(e," argument"))n="The ".concat(e," ").concat(i," ").concat(PFe(t,"type"));else{var a=gHt(e,".")?"property":"argument";n='The "'.concat(e,'" ').concat(a," ").concat(i," ").concat(PFe(t,"type"))}return n+=". Received type ".concat(l2(r)),n},TypeError);xS("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";lZ===void 0&&(lZ=J5());var i=lZ.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(i)},TypeError,RangeError);xS("ERR_INVALID_RETURN_VALUE",function(e,t,r){var i;return r&&r.constructor&&r.constructor.name?i="instance of ".concat(r.constructor.name):i="type ".concat(l2(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")},TypeError);xS("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];Q5===void 0&&(Q5=sP()),Q5(t.length>0,"At least one arg needs to be specified");var i="The ",n=t.length;switch(t=t.map(function(a){return'"'.concat(a,'"')}),n){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,n-1).join(", "),i+=", and ".concat(t[n-1]," arguments");break}return"".concat(i," must be specified")},TypeError);RFe.exports.codes=IFe});var jFe=W((TNr,HFe)=>{"use strict";function zFe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function BFe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zFe(Object(r),!0).forEach(function(i){mHt(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zFe(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function mHt(e,t,r){return t=UFe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yHt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qFe(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,UFe(i.key),i)}}function xHt(e,t,r){return t&&qFe(e.prototype,t),r&&qFe(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function UFe(e){var t=_Ht(e,"string");return Hh(t)==="symbol"?t:String(t)}function _Ht(e,t){if(Hh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(Hh(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bHt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&TS(e,t)}function wHt(e){var t=GFe();return function(){var i=AS(e),n;if(t){var a=AS(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return VFe(this,n)}}function VFe(e,t){if(t&&(Hh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fZ(e)}function fZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hZ(e){var t=typeof Map=="function"?new Map:void 0;return hZ=function(i){if(i===null||!THt(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(i))return t.get(i);t.set(i,n)}function n(){return lP(i,arguments,AS(this).constructor)}return n.prototype=Object.create(i.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),TS(n,i)},hZ(e)}function lP(e,t,r){return GFe()?lP=Reflect.construct.bind():lP=function(n,a,o){var s=[null];s.push.apply(s,a);var l=Function.bind.apply(n,s),u=new l;return o&&TS(u,o.prototype),u},lP.apply(null,arguments)}function GFe(){if(typeof Reflect=="undefined"||!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(e){return!1}}function THt(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function TS(e,t){return TS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},TS(e,t)}function AS(e){return AS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},AS(e)}function Hh(e){"@babel/helpers - typeof";return Hh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hh(e)}var AHt=J5(),dZ=AHt.inspect,MHt=cZ(),SHt=MHt.codes.ERR_INVALID_ARG_TYPE;function OFe(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function EHt(e,t){if(t=Math.floor(t),e.length==0||t==0)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+=e.substring(0,r-e.length),e}var av="",_S="",bS="",tf="",rb={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:"},kHt=10;function NFe(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(i){r[i]=e[i]}),Object.defineProperty(r,"message",{value:e.message}),r}function wS(e){return dZ(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function CHt(e,t,r){var i="",n="",a=0,o="",s=!1,l=wS(e),u=l.split(`
`),c=wS(t).split(`
`),f=0,h="";if(r==="strictEqual"&&Hh(e)==="object"&&Hh(t)==="object"&&e!==null&&t!==null&&(r="strictEqualObject"),u.length===1&&c.length===1&&u[0]!==c[0]){var d=u[0].length+c[0].length;if(d<=kHt){if((Hh(e)!=="object"||e===null)&&(Hh(t)!=="object"||t===null)&&(e!==0||t!==0))return"".concat(rb[r],`
`)+"".concat(u[0]," !== ").concat(c[0],`
`)}else if(r!=="strictEqualObject"){var p=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(d<p){for(;u[0][f]===c[0][f];)f++;f>2&&(h=`
`.concat(EHt(" ",f),"^"),f=0)}}}for(var v=u[u.length-1],m=c[c.length-1];v===m&&(f++<2?o=`
`.concat(v).concat(o):i=v,u.pop(),c.pop(),!(u.length===0||c.length===0));)v=u[u.length-1],m=c[c.length-1];var g=Math.max(u.length,c.length);if(g===0){var w=l.split(`
`);if(w.length>30)for(w[26]="".concat(av,"...").concat(tf);w.length>27;)w.pop();return"".concat(rb.notIdentical,`
`).concat(w.join(`
`),`
`)}f>3&&(o=`
`.concat(av,"...").concat(tf).concat(o),s=!0),i!==""&&(o=`
`.concat(i).concat(o),i="");var b=0,_=rb[r]+`
`.concat(_S,"+ actual").concat(tf," ").concat(bS,"- expected").concat(tf),M=" ".concat(av,"...").concat(tf," Lines skipped");for(f=0;f<g;f++){var x=f-a;if(u.length<f+1)x>1&&f>2&&(x>4?(n+=`
`.concat(av,"...").concat(tf),s=!0):x>3&&(n+=`
`.concat(c[f-2]),b++),n+=`
`.concat(c[f-1]),b++),a=f,i+=`
`.concat(bS,"-").concat(tf," ").concat(c[f]),b++;else if(c.length<f+1)x>1&&f>2&&(x>4?(n+=`
`.concat(av,"...").concat(tf),s=!0):x>3&&(n+=`
`.concat(u[f-2]),b++),n+=`
`.concat(u[f-1]),b++),a=f,n+=`
`.concat(_S,"+").concat(tf," ").concat(u[f]),b++;else{var T=c[f],A=u[f],y=A!==T&&(!OFe(A,",")||A.slice(0,-1)!==T);y&&OFe(T,",")&&T.slice(0,-1)===A&&(y=!1,A+=","),y?(x>1&&f>2&&(x>4?(n+=`
`.concat(av,"...").concat(tf),s=!0):x>3&&(n+=`
`.concat(u[f-2]),b++),n+=`
`.concat(u[f-1]),b++),a=f,n+=`
`.concat(_S,"+").concat(tf," ").concat(A),i+=`
`.concat(bS,"-").concat(tf," ").concat(T),b+=2):(n+=i,i="",(x===1||f===0)&&(n+=`
`.concat(A),b++))}if(b>20&&f<g-2)return"".concat(_).concat(M,`
`).concat(n,`
`).concat(av,"...").concat(tf).concat(i,`
`)+"".concat(av,"...").concat(tf)}return"".concat(_).concat(s?M:"",`
`).concat(n).concat(i).concat(o).concat(h)}var DHt=(function(e,t){bHt(i,e);var r=wHt(i);function i(n){var a;if(yHt(this,i),Hh(n)!=="object"||n===null)throw new SHt("options","Object",n);var o=n.message,s=n.operator,l=n.stackStartFn,u=n.actual,c=n.expected,f=Error.stackTraceLimit;if(Error.stackTraceLimit=0,o!=null)a=r.call(this,String(o));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?(av="\x1B[34m",_S="\x1B[32m",tf="\x1B[39m",bS="\x1B[31m"):(av="",_S="",tf="",bS="")),Hh(u)==="object"&&u!==null&&Hh(c)==="object"&&c!==null&&"stack"in u&&u instanceof Error&&"stack"in c&&c instanceof Error&&(u=NFe(u),c=NFe(c)),s==="deepStrictEqual"||s==="strictEqual")a=r.call(this,CHt(u,c,s));else if(s==="notDeepStrictEqual"||s==="notStrictEqual"){var h=rb[s],d=wS(u).split(`
`);if(s==="notStrictEqual"&&Hh(u)==="object"&&u!==null&&(h=rb.notStrictEqualObject),d.length>30)for(d[26]="".concat(av,"...").concat(tf);d.length>27;)d.pop();d.length===1?a=r.call(this,"".concat(h," ").concat(d[0])):a=r.call(this,"".concat(h,`
`).concat(d.join(`
`),`
`))}else{var p=wS(u),v="",m=rb[s];s==="notDeepEqual"||s==="notEqual"?(p="".concat(rb[s],`
`).concat(p),p.length>1024&&(p="".concat(p.slice(0,1021),"..."))):(v="".concat(wS(c)),p.length>512&&(p="".concat(p.slice(0,509),"...")),v.length>512&&(v="".concat(v.slice(0,509),"...")),s==="deepEqual"||s==="equal"?p="".concat(m,`
`).concat(p,`
should equal
`):v=" ".concat(s," ").concat(v)),a=r.call(this,"".concat(p).concat(v))}return Error.stackTraceLimit=f,a.generatedMessage=!o,Object.defineProperty(fZ(a),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),a.code="ERR_ASSERTION",a.actual=u,a.expected=c,a.operator=s,Error.captureStackTrace&&Error.captureStackTrace(fZ(a),l),a.stack,a.name="AssertionError",VFe(a)}return xHt(i,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(a,o){return dZ(this,BFe(BFe({},o),{},{customInspect:!1,depth:0}))}}]),i})(hZ(Error),dZ.custom);HFe.exports=DHt});var pZ=W((ANr,WFe)=>{"use strict";var $Fe=Object.prototype.toString;WFe.exports=function(t){var r=$Fe.call(t),i=r==="[object Arguments]";return i||(i=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&$Fe.call(t.callee)==="[object Function]"),i}});var rLe=W((MNr,tLe)=>{"use strict";var eLe;Object.keys||(MS=Object.prototype.hasOwnProperty,vZ=Object.prototype.toString,YFe=pZ(),gZ=Object.prototype.propertyIsEnumerable,XFe=!gZ.call({toString:null},"toString"),ZFe=gZ.call(function(){},"prototype"),SS=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],uP=function(e){var t=e.constructor;return t&&t.prototype===e},KFe={$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},JFe=(function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!KFe["$"+e]&&MS.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{uP(window[e])}catch(t){return!0}}catch(t){return!0}return!1})(),QFe=function(e){if(typeof window=="undefined"||!JFe)return uP(e);try{return uP(e)}catch(t){return!1}},eLe=function(t){var r=t!==null&&typeof t=="object",i=vZ.call(t)==="[object Function]",n=YFe(t),a=r&&vZ.call(t)==="[object String]",o=[];if(!r&&!i&&!n)throw new TypeError("Object.keys called on a non-object");var s=ZFe&&i;if(a&&t.length>0&&!MS.call(t,0))for(var l=0;l<t.length;++l)o.push(String(l));if(n&&t.length>0)for(var u=0;u<t.length;++u)o.push(String(u));else for(var c in t)!(s&&c==="prototype")&&MS.call(t,c)&&o.push(String(c));if(XFe)for(var f=QFe(t),h=0;h<SS.length;++h)!(f&&SS[h]==="constructor")&&MS.call(t,SS[h])&&o.push(SS[h]);return o});var MS,vZ,YFe,gZ,XFe,ZFe,SS,uP,KFe,JFe,QFe;tLe.exports=eLe});var mZ=W((SNr,aLe)=>{"use strict";var FHt=Array.prototype.slice,LHt=pZ(),iLe=Object.keys,cP=iLe?function(t){return iLe(t)}:rLe(),nLe=Object.keys;cP.shim=function(){if(Object.keys){var t=(function(){var r=Object.keys(arguments);return r&&r.length===arguments.length})(1,2);t||(Object.keys=function(i){return LHt(i)?nLe(FHt.call(i)):nLe(i)})}else Object.keys=cP;return Object.keys||cP};aLe.exports=cP});var cLe=W((ENr,uLe)=>{"use strict";var PHt=mZ(),sLe=o9()(),lLe=j_(),fP=s9(),IHt=lLe("Array.prototype.push"),oLe=lLe("Object.prototype.propertyIsEnumerable"),RHt=sLe?fP.getOwnPropertySymbols:null;uLe.exports=function(t,r){if(t==null)throw new TypeError("target must be an object");var i=fP(t);if(arguments.length===1)return i;for(var n=1;n<arguments.length;++n){var a=fP(arguments[n]),o=PHt(a),s=sLe&&(fP.getOwnPropertySymbols||RHt);if(s)for(var l=s(a),u=0;u<l.length;++u){var c=l[u];oLe(a,c)&&IHt(o,c)}for(var f=0;f<o.length;++f){var h=o[f];if(oLe(a,h)){var d=a[h];i[h]=d}}}return i}});var hLe=W((kNr,fLe)=>{"use strict";var yZ=cLe(),zHt=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},i=0;i<t.length;++i)r[t[i]]=t[i];var n=Object.assign({},r),a="";for(var o in n)a+=o;return e!==a},BHt=function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch(t){return e[1]==="y"}return!1};fLe.exports=function(){return!Object.assign||zHt()||BHt()?yZ:Object.assign}});var xZ=W((CNr,pLe)=>{"use strict";var dLe=function(e){return e!==e};pLe.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||dLe(t)&&dLe(r))}});var hP=W((DNr,vLe)=>{"use strict";var qHt=xZ();vLe.exports=function(){return typeof Object.is=="function"?Object.is:qHt}});var xLe=W((FNr,yLe)=>{"use strict";var gLe=g9(),mLe=aS(),OHt=mLe(gLe("String.prototype.indexOf"));yLe.exports=function(t,r){var i=gLe(t,!!r);return typeof i=="function"&&OHt(t,".prototype.")>-1?mLe(i):i}});var ES=W((LNr,TLe)=>{"use strict";var NHt=mZ(),UHt=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",VHt=Object.prototype.toString,GHt=Array.prototype.concat,_Le=hX(),HHt=function(e){return typeof e=="function"&&VHt.call(e)==="[object Function]"},bLe=pX()(),jHt=function(e,t,r,i){if(t in e){if(i===!0){if(e[t]===r)return}else if(!HHt(i)||!i())return}bLe?_Le(e,t,r,!0):_Le(e,t,r)},wLe=function(e,t){var r=arguments.length>2?arguments[2]:{},i=NHt(t);UHt&&(i=GHt.call(i,Object.getOwnPropertySymbols(t)));for(var n=0;n<i.length;n+=1)jHt(e,i[n],t[i[n]],r[i[n]])};wLe.supportsDescriptors=!!bLe;TLe.exports=wLe});var MLe=W((PNr,ALe)=>{"use strict";var $Ht=hP(),WHt=ES();ALe.exports=function(){var t=$Ht();return WHt(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var CLe=W((INr,kLe)=>{"use strict";var YHt=ES(),XHt=aS(),ZHt=xZ(),SLe=hP(),KHt=MLe(),ELe=XHt(SLe(),Object);YHt(ELe,{getPolyfill:SLe,implementation:ZHt,shim:KHt});kLe.exports=ELe});var _Z=W((RNr,DLe)=>{"use strict";DLe.exports=function(t){return t!==t}});var bZ=W((zNr,FLe)=>{"use strict";var JHt=_Z();FLe.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:JHt}});var PLe=W((BNr,LLe)=>{"use strict";var QHt=ES(),ejt=bZ();LLe.exports=function(){var t=ejt();return QHt(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}});var BLe=W((qNr,zLe)=>{"use strict";var tjt=aS(),rjt=ES(),ijt=_Z(),ILe=bZ(),njt=PLe(),RLe=tjt(ILe(),Number);rjt(RLe,{getPolyfill:ILe,implementation:ijt,shim:njt});zLe.exports=RLe});var i9e=W((ONr,r9e)=>{"use strict";function qLe(e,t){return ljt(e)||sjt(e,t)||ojt(e,t)||ajt()}function ajt(){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 ojt(e,t){if(e){if(typeof e=="string")return OLe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return OLe(e,t)}}function OLe(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function sjt(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,n,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=a.call(r)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(c){u=!0,n=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw n}}return s}}function ljt(e){if(Array.isArray(e))return e}function qd(e){"@babel/helpers - typeof";return qd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qd(e)}var ujt=/a/g.flags!==void 0,xP=function(t){var r=[];return t.forEach(function(i){return r.push(i)}),r},NLe=function(t){var r=[];return t.forEach(function(i,n){return r.push([n,i])}),r},KLe=Object.is?Object.is:CLe(),mP=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},wZ=Number.isNaN?Number.isNaN:BLe();function AZ(e){return e.call.bind(e)}var CS=AZ(Object.prototype.hasOwnProperty),yP=AZ(Object.prototype.propertyIsEnumerable),ULe=AZ(Object.prototype.toString),rh=J5().types,cjt=rh.isAnyArrayBuffer,fjt=rh.isArrayBufferView,VLe=rh.isDate,dP=rh.isMap,GLe=rh.isRegExp,pP=rh.isSet,hjt=rh.isNativeError,djt=rh.isBoxedPrimitive,HLe=rh.isNumberObject,jLe=rh.isStringObject,$Le=rh.isBooleanObject,WLe=rh.isBigIntObject,pjt=rh.isSymbolObject,vjt=rh.isFloat32Array,gjt=rh.isFloat64Array;function mjt(e){if(e.length===0||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return e.length===10&&e>=Math.pow(2,32)}function vP(e){return Object.keys(e).filter(mjt).concat(mP(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function JLe(e,t){if(e===t)return 0;for(var r=e.length,i=t.length,n=0,a=Math.min(r,i);n<a;++n)if(e[n]!==t[n]){r=e[n],i=t[n];break}return r<i?-1:i<r?1:0}var gP=void 0,yjt=!0,xjt=!1,TZ=0,MZ=1,QLe=2,e9e=3;function _jt(e,t){return ujt?e.source===t.source&&e.flags===t.flags:RegExp.prototype.toString.call(e)===RegExp.prototype.toString.call(t)}function bjt(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}function wjt(e,t){return e.byteLength!==t.byteLength?!1:JLe(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))===0}function Tjt(e,t){return e.byteLength===t.byteLength&&JLe(new Uint8Array(e),new Uint8Array(t))===0}function Ajt(e,t){return HLe(e)?HLe(t)&&KLe(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):jLe(e)?jLe(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):$Le(e)?$Le(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):WLe(e)?WLe(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):pjt(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}function Od(e,t,r,i){if(e===t)return e!==0?!0:r?KLe(e,t):!0;if(r){if(qd(e)!=="object")return typeof e=="number"&&wZ(e)&&wZ(t);if(qd(t)!=="object"||e===null||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(e===null||qd(e)!=="object")return t===null||qd(t)!=="object"?e==t:!1;if(t===null||qd(t)!=="object")return!1}var n=ULe(e),a=ULe(t);if(n!==a)return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var o=vP(e,gP),s=vP(t,gP);return o.length!==s.length?!1:kS(e,t,r,i,MZ,o)}if(n==="[object Object]"&&(!dP(e)&&dP(t)||!pP(e)&&pP(t)))return!1;if(VLe(e)){if(!VLe(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(GLe(e)){if(!GLe(t)||!_jt(e,t))return!1}else if(hjt(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else if(fjt(e)){if(!r&&(vjt(e)||gjt(e))){if(!bjt(e,t))return!1}else if(!wjt(e,t))return!1;var l=vP(e,gP),u=vP(t,gP);return l.length!==u.length?!1:kS(e,t,r,i,TZ,l)}else{if(pP(e))return!pP(t)||e.size!==t.size?!1:kS(e,t,r,i,QLe);if(dP(e))return!dP(t)||e.size!==t.size?!1:kS(e,t,r,i,e9e);if(cjt(e)){if(!Tjt(e,t))return!1}else if(djt(e)&&!Ajt(e,t))return!1}return kS(e,t,r,i,TZ)}function YLe(e,t){return t.filter(function(r){return yP(e,r)})}function kS(e,t,r,i,n,a){if(arguments.length===5){a=Object.keys(e);var o=Object.keys(t);if(a.length!==o.length)return!1}for(var s=0;s<a.length;s++)if(!CS(t,a[s]))return!1;if(r&&arguments.length===5){var l=mP(e);if(l.length!==0){var u=0;for(s=0;s<l.length;s++){var c=l[s];if(yP(e,c)){if(!yP(t,c))return!1;a.push(c),u++}else if(yP(t,c))return!1}var f=mP(t);if(l.length!==f.length&&YLe(t,f).length!==u)return!1}else{var h=mP(t);if(h.length!==0&&YLe(t,h).length!==0)return!1}}if(a.length===0&&(n===TZ||n===MZ&&e.length===0||e.size===0))return!0;if(i===void 0)i={val1:new Map,val2:new Map,position:0};else{var d=i.val1.get(e);if(d!==void 0){var p=i.val2.get(t);if(p!==void 0)return d===p}i.position++}i.val1.set(e,i.position),i.val2.set(t,i.position);var v=Cjt(e,t,r,a,i,n);return i.val1.delete(e),i.val2.delete(t),v}function XLe(e,t,r,i){for(var n=xP(e),a=0;a<n.length;a++){var o=n[a];if(Od(t,o,r,i))return e.delete(o),!0}return!1}function t9e(e){switch(qd(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e=+e;case"number":if(wZ(e))return!1}return!0}function Mjt(e,t,r){var i=t9e(r);return i!=null?i:t.has(i)&&!e.has(i)}function Sjt(e,t,r,i,n){var a=t9e(r);if(a!=null)return a;var o=t.get(a);return o===void 0&&!t.has(a)||!Od(i,o,!1,n)?!1:!e.has(a)&&Od(i,o,!1,n)}function Ejt(e,t,r,i){for(var n=null,a=xP(e),o=0;o<a.length;o++){var s=a[o];if(qd(s)==="object"&&s!==null)n===null&&(n=new Set),n.add(s);else if(!t.has(s)){if(r||!Mjt(e,t,s))return!1;n===null&&(n=new Set),n.add(s)}}if(n!==null){for(var l=xP(t),u=0;u<l.length;u++){var c=l[u];if(qd(c)==="object"&&c!==null){if(!XLe(n,c,r,i))return!1}else if(!r&&!e.has(c)&&!XLe(n,c,r,i))return!1}return n.size===0}return!0}function ZLe(e,t,r,i,n,a){for(var o=xP(e),s=0;s<o.length;s++){var l=o[s];if(Od(r,l,n,a)&&Od(i,t.get(l),n,a))return e.delete(l),!0}return!1}function kjt(e,t,r,i){for(var n=null,a=NLe(e),o=0;o<a.length;o++){var s=qLe(a[o],2),l=s[0],u=s[1];if(qd(l)==="object"&&l!==null)n===null&&(n=new Set),n.add(l);else{var c=t.get(l);if(c===void 0&&!t.has(l)||!Od(u,c,r,i)){if(r||!Sjt(e,t,l,u,i))return!1;n===null&&(n=new Set),n.add(l)}}}if(n!==null){for(var f=NLe(t),h=0;h<f.length;h++){var d=qLe(f[h],2),p=d[0],v=d[1];if(qd(p)==="object"&&p!==null){if(!ZLe(n,e,p,v,r,i))return!1}else if(!r&&(!e.has(p)||!Od(e.get(p),v,!1,i))&&!ZLe(n,e,p,v,!1,i))return!1}return n.size===0}return!0}function Cjt(e,t,r,i,n,a){var o=0;if(a===QLe){if(!Ejt(e,t,r,n))return!1}else if(a===e9e){if(!kjt(e,t,r,n))return!1}else if(a===MZ)for(;o<e.length;o++)if(CS(e,o)){if(!CS(t,o)||!Od(e[o],t[o],r,n))return!1}else{if(CS(t,o))return!1;for(var s=Object.keys(e);o<s.length;o++){var l=s[o];if(!CS(t,l)||!Od(e[l],t[l],r,n))return!1}return s.length===Object.keys(t).length}for(o=0;o<i.length;o++){var u=i[o];if(!Od(e[u],t[u],r,n))return!1}return!0}function Djt(e,t){return Od(e,t,xjt)}function Fjt(e,t){return Od(e,t,yjt)}r9e.exports={isDeepEqual:Djt,isDeepStrictEqual:Fjt}});var sP=W((NNr,b9e)=>{"use strict";function ov(e){"@babel/helpers - typeof";return ov=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ov(e)}function n9e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Pjt(i.key),i)}}function Ljt(e,t,r){return t&&n9e(e.prototype,t),r&&n9e(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pjt(e){var t=Ijt(e,"string");return ov(t)==="symbol"?t:String(t)}function Ijt(e,t){if(ov(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(ov(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rjt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var zjt=cZ(),DS=zjt.codes,a9e=DS.ERR_AMBIGUOUS_ARGUMENT,e4=DS.ERR_INVALID_ARG_TYPE,Bjt=DS.ERR_INVALID_ARG_VALUE,qjt=DS.ERR_INVALID_RETURN_VALUE,c2=DS.ERR_MISSING_ARGS,f2=jFe(),Ojt=J5(),_P=Ojt.inspect,u9e=J5().types,Njt=u9e.isPromise,bP=u9e.isRegExp,Ujt=hLe()(),c9e=hP()(),wP=xLe()("RegExp.prototype.test"),u2,TP;function FS(){var e=i9e();u2=e.isDeepEqual,TP=e.isDeepStrictEqual}var o9e=!1,Vs=b9e.exports=SZ,AP={};function sv(e){throw e.message instanceof Error?e.message:new f2(e)}function f9e(e,t,r,i,n){var a=arguments.length,o;if(a===0)o="Failed";else if(a===1)r=e,e=void 0;else{if(o9e===!1){o9e=!0;var s=process.emitWarning?process.emitWarning:console.warn.bind(console);s("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}a===2&&(i="!=")}if(r instanceof Error)throw r;var l={actual:e,expected:t,operator:i===void 0?"fail":i,stackStartFn:n||f9e};r!==void 0&&(l.message=r);var u=new f2(l);throw o&&(u.message=o,u.generatedMessage=!0),u}Vs.fail=f9e;Vs.AssertionError=f2;function h9e(e,t,r,i){if(!r){var n=!1;if(t===0)n=!0,i="No value argument passed to `assert.ok()`";else if(i instanceof Error)throw i;var a=new f2({actual:r,expected:!0,message:i,operator:"==",stackStartFn:e});throw a.generatedMessage=n,a}}function SZ(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];h9e.apply(void 0,[SZ,t.length].concat(t))}Vs.ok=SZ;Vs.equal=function e(t,r,i){if(arguments.length<2)throw new c2("actual","expected");t!=r&&sv({actual:t,expected:r,message:i,operator:"==",stackStartFn:e})};Vs.notEqual=function e(t,r,i){if(arguments.length<2)throw new c2("actual","expected");t==r&&sv({actual:t,expected:r,message:i,operator:"!=",stackStartFn:e})};Vs.deepEqual=function e(t,r,i){if(arguments.length<2)throw new c2("actual","expected");u2===void 0&&FS(),u2(t,r)||sv({actual:t,expected:r,message:i,operator:"deepEqual",stackStartFn:e})};Vs.notDeepEqual=function e(t,r,i){if(arguments.length<2)throw new c2("actual","expected");u2===void 0&&FS(),u2(t,r)&&sv({actual:t,expected:r,message:i,operator:"notDeepEqual",stackStartFn:e})};Vs.deepStrictEqual=function e(t,r,i){if(arguments.length<2)throw new c2("actual","expected");u2===void 0&&FS(),TP(t,r)||sv({actual:t,expected:r,message:i,operator:"deepStrictEqual",stackStartFn:e})};Vs.notDeepStrictEqual=d9e;function d9e(e,t,r){if(arguments.length<2)throw new c2("actual","expected");u2===void 0&&FS(),TP(e,t)&&sv({actual:e,expected:t,message:r,operator:"notDeepStrictEqual",stackStartFn:d9e})}Vs.strictEqual=function e(t,r,i){if(arguments.length<2)throw new c2("actual","expected");c9e(t,r)||sv({actual:t,expected:r,message:i,operator:"strictEqual",stackStartFn:e})};Vs.notStrictEqual=function e(t,r,i){if(arguments.length<2)throw new c2("actual","expected");c9e(t,r)&&sv({actual:t,expected:r,message:i,operator:"notStrictEqual",stackStartFn:e})};var s9e=Ljt(function e(t,r,i){var n=this;Rjt(this,e),r.forEach(function(a){a in t&&(i!==void 0&&typeof i[a]=="string"&&bP(t[a])&&wP(t[a],i[a])?n[a]=i[a]:n[a]=t[a])})});function Vjt(e,t,r,i,n,a){if(!(r in e)||!TP(e[r],t[r])){if(!i){var o=new s9e(e,n),s=new s9e(t,n,e),l=new f2({actual:o,expected:s,operator:"deepStrictEqual",stackStartFn:a});throw l.actual=e,l.expected=t,l.operator=a.name,l}sv({actual:e,expected:t,message:i,operator:a.name,stackStartFn:a})}}function p9e(e,t,r,i){if(typeof t!="function"){if(bP(t))return wP(t,e);if(arguments.length===2)throw new e4("expected",["Function","RegExp"],t);if(ov(e)!=="object"||e===null){var n=new f2({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:i});throw n.operator=i.name,n}var a=Object.keys(t);if(t instanceof Error)a.push("name","message");else if(a.length===0)throw new Bjt("error",t,"may not be an empty object");return u2===void 0&&FS(),a.forEach(function(o){typeof e[o]=="string"&&bP(t[o])&&wP(t[o],e[o])||Vjt(e,t,o,r,a,i)}),!0}return t.prototype!==void 0&&e instanceof t?!0:Error.isPrototypeOf(t)?!1:t.call({},e)===!0}function v9e(e){if(typeof e!="function")throw new e4("fn","Function",e);try{e()}catch(t){return t}return AP}function l9e(e){return Njt(e)||e!==null&&ov(e)==="object"&&typeof e.then=="function"&&typeof e.catch=="function"}function g9e(e){return Promise.resolve().then(function(){var t;if(typeof e=="function"){if(t=e(),!l9e(t))throw new qjt("instance of Promise","promiseFn",t)}else if(l9e(e))t=e;else throw new e4("promiseFn",["Function","Promise"],e);return Promise.resolve().then(function(){return t}).then(function(){return AP}).catch(function(r){return r})})}function m9e(e,t,r,i){if(typeof r=="string"){if(arguments.length===4)throw new e4("error",["Object","Error","Function","RegExp"],r);if(ov(t)==="object"&&t!==null){if(t.message===r)throw new a9e("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new a9e("error/message",'The error "'.concat(t,'" is identical to the message.'));i=r,r=void 0}else if(r!=null&&ov(r)!=="object"&&typeof r!="function")throw new e4("error",["Object","Error","Function","RegExp"],r);if(t===AP){var n="";r&&r.name&&(n+=" (".concat(r.name,")")),n+=i?": ".concat(i):".";var a=e.name==="rejects"?"rejection":"exception";sv({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(a).concat(n),stackStartFn:e})}if(r&&!p9e(t,r,i,e))throw t}function y9e(e,t,r,i){if(t!==AP){if(typeof r=="string"&&(i=r,r=void 0),!r||p9e(t,r)){var n=i?": ".concat(i):".",a=e.name==="doesNotReject"?"rejection":"exception";sv({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(a).concat(n,`
`)+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}Vs.throws=function e(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];m9e.apply(void 0,[e,v9e(t)].concat(i))};Vs.rejects=function e(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return g9e(t).then(function(a){return m9e.apply(void 0,[e,a].concat(i))})};Vs.doesNotThrow=function e(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];y9e.apply(void 0,[e,v9e(t)].concat(i))};Vs.doesNotReject=function e(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return g9e(t).then(function(a){return y9e.apply(void 0,[e,a].concat(i))})};Vs.ifError=function e(t){if(t!=null){var r="ifError got unwanted exception: ";ov(t)==="object"&&typeof t.message=="string"?t.message.length===0&&t.constructor?r+=t.constructor.name:r+=t.message:r+=_P(t);var i=new f2({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),n=t.stack;if(typeof n=="string"){var a=n.split(`
`);a.shift();for(var o=i.stack.split(`
`),s=0;s<a.length;s++){var l=o.indexOf(a[s]);if(l!==-1){o=o.slice(0,l);break}}i.stack="".concat(o.join(`
`),`
`).concat(a.join(`
`))}throw i}};function x9e(e,t,r,i,n){if(!bP(t))throw new e4("regexp","RegExp",t);var a=n==="match";if(typeof e!="string"||wP(t,e)!==a){if(r instanceof Error)throw r;var o=!r;r=r||(typeof e!="string"?'The "string" argument must be of type string. Received type '+"".concat(ov(e)," (").concat(_P(e),")"):(a?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(_P(t),`. Input:
`).concat(_P(e),`
`));var s=new f2({actual:e,expected:t,message:r,operator:n,stackStartFn:i});throw s.generatedMessage=o,s}}Vs.match=function e(t,r,i){x9e(t,r,i,e,"match")};Vs.doesNotMatch=function e(t,r,i){x9e(t,r,i,e,"doesNotMatch")};function _9e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];h9e.apply(void 0,[_9e,t.length].concat(t))}Vs.strict=Ujt(_9e,Vs,{equal:Vs.strictEqual,deepEqual:Vs.deepStrictEqual,notEqual:Vs.notStrictEqual,notDeepEqual:Vs.notDeepStrictEqual});Vs.strict.strict=Vs.strict});var T9e=W((UNr,w9e)=>{var LS=1e3,PS=LS*60,IS=PS*60,RS=IS*24,Gjt=RS*365.25;w9e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return Hjt(e);if(r==="number"&&isNaN(e)===!1)return t.long?$jt(e):jjt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Hjt(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),i=(t[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*Gjt;case"days":case"day":case"d":return r*RS;case"hours":case"hour":case"hrs":case"hr":case"h":return r*IS;case"minutes":case"minute":case"mins":case"min":case"m":return r*PS;case"seconds":case"second":case"secs":case"sec":case"s":return r*LS;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function jjt(e){return e>=RS?Math.round(e/RS)+"d":e>=IS?Math.round(e/IS)+"h":e>=PS?Math.round(e/PS)+"m":e>=LS?Math.round(e/LS)+"s":e+"ms"}function $jt(e){return MP(e,RS,"day")||MP(e,IS,"hour")||MP(e,PS,"minute")||MP(e,LS,"second")||e+" ms"}function MP(e,t,r){if(!(e<t))return e<t*1.5?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}});var M9e=W((ts,A9e)=>{ts=A9e.exports=kZ.debug=kZ.default=kZ;ts.coerce=Kjt;ts.disable=Xjt;ts.enable=Yjt;ts.enabled=Zjt;ts.humanize=T9e();ts.names=[];ts.skips=[];ts.formatters={};var EZ;function Wjt(e){var t=0,r;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return ts.colors[Math.abs(t)%ts.colors.length]}function kZ(e){function t(){if(t.enabled){var r=t,i=+new Date,n=i-(EZ||i);r.diff=n,r.prev=EZ,r.curr=i,EZ=i;for(var a=new Array(arguments.length),o=0;o<a.length;o++)a[o]=arguments[o];a[0]=ts.coerce(a[0]),typeof a[0]!="string"&&a.unshift("%O");var s=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(u,c){if(u==="%%")return u;s++;var f=ts.formatters[c];if(typeof f=="function"){var h=a[s];u=f.call(r,h),a.splice(s,1),s--}return u}),ts.formatArgs.call(r,a);var l=t.log||ts.log||console.log.bind(console);l.apply(r,a)}}return t.namespace=e,t.enabled=ts.enabled(e),t.useColors=ts.useColors(),t.color=Wjt(e),typeof ts.init=="function"&&ts.init(t),t}function Yjt(e){ts.save(e),ts.names=[],ts.skips=[];for(var t=(typeof e=="string"?e:"").split(/[\s,]+/),r=t.length,i=0;i<r;i++)t[i]&&(e=t[i].replace(/\*/g,".*?"),e[0]==="-"?ts.skips.push(new RegExp("^"+e.substr(1)+"$")):ts.names.push(new RegExp("^"+e+"$")))}function Xjt(){ts.enable("")}function Zjt(e){var t,r;for(t=0,r=ts.skips.length;t<r;t++)if(ts.skips[t].test(e))return!1;for(t=0,r=ts.names.length;t<r;t++)if(ts.names[t].test(e))return!0;return!1}function Kjt(e){return e instanceof Error?e.stack||e.message:e}});var k9e=W((ih,E9e)=>{ih=E9e.exports=M9e();ih.log=e$t;ih.formatArgs=Qjt;ih.save=t$t;ih.load=S9e;ih.useColors=Jjt;ih.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:r$t();ih.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function Jjt(){return typeof window!="undefined"&&window.process&&window.process.type==="renderer"?!0:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}ih.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function Qjt(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+ih.humanize(this.diff),!!t){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,n=0;e[0].replace(/%[a-zA-Z%]/g,function(a){a!=="%%"&&(i++,a==="%c"&&(n=i))}),e.splice(n,0,r)}}function e$t(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function t$t(e){try{e==null?ih.storage.removeItem("debug"):ih.storage.debug=e}catch(t){}}function S9e(){var e;try{e=ih.storage.debug}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}ih.enable(S9e());function r$t(){try{return window.localStorage}catch(e){}}});var z9e=W((VNr,R9e)=>{var t4=sP(),h2=k9e()("stream-parser");R9e.exports=n$t;var D9e=-1,SP=0,i$t=1,F9e=2;function n$t(e){var t=e&&typeof e._transform=="function",r=e&&typeof e._write=="function";if(!t&&!r)throw new Error("must pass a Writable or Transform stream in");h2("extending Parser into stream"),e._bytes=a$t,e._skipBytes=o$t,t&&(e._passthrough=s$t),t?e._transform=u$t:e._write=l$t}function zS(e){h2("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=D9e,e._parserCallback=null,typeof e.push=="function"&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function a$t(e,t){t4(!this._parserCallback,'there is already a "callback" set!'),t4(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||zS(this),h2("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=SP}function o$t(e,t){t4(!this._parserCallback,'there is already a "callback" set!'),t4(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||zS(this),h2("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=i$t}function s$t(e,t){t4(!this._parserCallback,'There is already a "callback" set!'),t4(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||zS(this),h2("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=F9e}function l$t(e,t,r){this._parserInit||zS(this),h2("write(%o bytes)",e.length),typeof t=="function"&&(r=t),P9e(this,e,null,r)}function u$t(e,t,r){this._parserInit||zS(this),h2("transform(%o bytes)",e.length),typeof t!="function"&&(t=this._parserOutput),P9e(this,e,t,r)}function L9e(e,t,r,i){return e._parserBytesLeft<=0?i(new Error("got data but not currently parsing anything")):t.length<=e._parserBytesLeft?function(){return C9e(e,t,r,i)}:function(){var n=t.slice(0,e._parserBytesLeft);return C9e(e,n,r,function(a){if(a)return i(a);if(t.length>n.length)return function(){return L9e(e,t.slice(n.length),r,i)}})}}function C9e(e,t,r,i){if(e._parserBytesLeft-=t.length,h2("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===SP?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===F9e&&r(t),e._parserBytesLeft===0){var n=e._parserCallback;if(n&&e._parserState===SP&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==SP&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=D9e,e._parserBuffers.splice(0),n){var a=[];t&&a.push(t),r&&a.push(r);var o=n.length>a.length;o&&a.push(I9e(i));var s=n.apply(e,a);if(!o||i===s)return i}}else return i}var P9e=I9e(L9e);function I9e(e){return function(){for(var t=e.apply(this,arguments);typeof t=="function";)t=t();return t}}});var bo=W(rf=>{"use strict";var B9e=SFe().Transform,c$t=z9e();function BS(){B9e.call(this,{readableObjectMode:!0})}BS.prototype=Object.create(B9e.prototype);BS.prototype.constructor=BS;c$t(BS.prototype);rf.ParserStream=BS;rf.sliceEq=function(e,t,r){for(var i=t,n=0;n<r.length;)if(e[i++]!==r[n++])return!1;return!0};rf.str2arr=function(e,t){var r=[],i=0;if(t&&t==="hex")for(;i<e.length;)r.push(parseInt(e.slice(i,i+2),16)),i+=2;else for(;i<e.length;i++)r.push(e.charCodeAt(i)&255);return r};rf.readUInt16LE=function(e,t){return e[t]|e[t+1]<<8};rf.readUInt16BE=function(e,t){return e[t]<<8|e[t+1]};rf.readInt16LE=function(e,t){return rf.readUInt16LE(e,t)<<16>>16};rf.readInt16BE=function(e,t){return rf.readUInt16BE(e,t)<<16>>16};rf.readUInt32LE=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+e[t+3]*16777216};rf.readUInt32BE=function(e,t){return e[t]*16777216+(e[t+1]<<16|e[t+2]<<8|e[t+3])};rf.readInt32LE=function(e,t){return rf.readUInt32LE(e,t)|0};rf.readInt32BE=function(e,t){return rf.readUInt32BE(e,t)|0};function EP(e,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=e,t&&(this.code=t),r&&(this.statusCode=r)}EP.prototype=Object.create(Error.prototype);EP.prototype.constructor=EP;rf.ProbeError=EP});var q9e=W((HNr,kP)=>{"use strict";var r4=bo().readUInt16BE,DZ=bo().readUInt32BE;function qS(e,t){if(e.length<4+t)return null;var r=DZ(e,t);return e.length<r+t||r<8?null:{boxtype:String.fromCharCode.apply(null,e.slice(t+4,t+8)),data:e.slice(t+8,t+r),end:t+r}}kP.exports.unbox=qS;function f$t(e,t){for(var r=0;;){var i=qS(e,r);if(!i)break;switch(i.boxtype){case"ispe":t.sizes.push({width:DZ(i.data,4),height:DZ(i.data,8)});break;case"irot":t.transforms.push({type:"irot",value:i.data[0]&3});break;case"imir":t.transforms.push({type:"imir",value:i.data[0]&1});break}r=i.end}}function CZ(e,t,r){for(var i=0,n=0;n<r;n++)i=i*256+(e[t+n]||0);return i}function h$t(e,t){for(var r=e[4]>>4&15,i=e[4]&15,n=e[5]>>4&15,a=r4(e,6),o=8,s=0;s<a;s++){var l=r4(e,o);o+=2;var u=r4(e,o);o+=2;var c=CZ(e,o,n);o+=n;var f=r4(e,o);if(o+=2,u===0&&f===1){var h=CZ(e,o,r),d=CZ(e,o+r,i);t.item_loc[l]={length:d,offset:h+c}}o+=f*(r+i)}}function d$t(e,t){for(var r=r4(e,4),i=6,n=0;n<r;n++){var a=qS(e,i);if(!a)break;if(a.boxtype==="infe"){for(var o=r4(a.data,4),s="",l=8;l<a.data.length&&a.data[l];l++)s+=String.fromCharCode(a.data[l]);t.item_inf[s]=o}i=a.end}}function p$t(e,t){for(var r=0;;){var i=qS(e,r);if(!i)break;i.boxtype==="ipco"&&f$t(i.data,t),r=i.end}}function v$t(e,t){for(var r=4;;){var i=qS(e,r);if(!i)break;i.boxtype==="iprp"&&p$t(i.data,t),i.boxtype==="iloc"&&h$t(i.data,t),i.boxtype==="iinf"&&d$t(i.data,t),r=i.end}}function g$t(e){var t=e.reduce(function(n,a){return n.width>a.width||n.width===a.width&&n.height>a.height?n:a}),r=e.reduce(function(n,a){return n.height>a.height||n.height===a.height&&n.width>a.width?n:a}),i;return t.width>r.height||t.width===r.height&&t.height>r.width?i=t:i=r,i}kP.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(v$t(e,t),!!t.sizes.length){var r=g$t(t.sizes),i=1;t.transforms.forEach(function(a){var o={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},s={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(a.type==="imir"&&(a.value===0?i=s[i]:(i=s[i],i=o[i],i=o[i])),a.type==="irot")for(var l=0;l<a.value;l++)i=o[i]});var n=null;return t.item_inf.Exif&&(n=t.item_loc[t.item_inf.Exif]),{width:r.width,height:r.height,orientation:t.transforms.length?i:null,variants:t.sizes,exif_location:n}}};kP.exports.getMimeType=function(e){var t=String.fromCharCode.apply(null,e.slice(0,4)),r={};r[t]=!0;for(var i=8;i<e.length;i+=4)r[String.fromCharCode.apply(null,e.slice(i,i+4))]=!0;if(!(!r.mif1&&!r.msf1&&!r.miaf))return t==="avif"||t==="avis"||t==="avio"?{type:"avif",mime:"image/avif"}:t==="heic"||t==="heix"?{type:"heic",mime:"image/heic"}:t==="hevc"||t==="hevx"?{type:"heic",mime:"image/heic-sequence"}:r.avif||r.avis?{type:"avif",mime:"image/avif"}:r.heic||r.heix||r.hevc||r.hevx||r.heis?r.msf1?{type:"heif",mime:"image/heif-sequence"}:{type:"heif",mime:"image/heif"}:{type:"avif",mime:"image/avif"}}});var DP=W((jNr,FZ)=>{"use strict";function CP(e,t){var r=new Error(e);return r.code=t,r}function m$t(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function em(e,t,r){this.input=e.subarray(t,r),this.start=t;var i=String.fromCharCode.apply(null,this.input.subarray(0,4));if(i!=="II*\0"&&i!=="MM\0*")throw CP("invalid TIFF signature","EBADDATA");this.big_endian=i[0]==="M"}em.prototype.each=function(e){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}};em.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw CP("unexpected EOF","EBADDATA");return this.big_endian?t[e]*256+t[e+1]:t[e]+t[e+1]*256};em.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw CP("unexpected EOF","EBADDATA");return this.big_endian?t[e]*16777216+t[e+1]*65536+t[e+2]*256+t[e+3]:t[e]+t[e+1]*256+t[e+2]*65536+t[e+3]*16777216};em.prototype.is_subifd_link=function(e,t){return e===0&&t===34665||e===0&&t===34853||e===34665&&t===40965};em.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}};em.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return r=this.input[t],r;case 6:return r=this.input[t],r|(r&128)*33554430;case 3:return r=this.read_uint16(t),r;case 8:return r=this.read_uint16(t),r|(r&32768)*131070;case 4:return r=this.read_uint32(t),r;case 9:return r=this.read_uint32(t),r|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}};em.prototype.scan_ifd=function(e,t,r){var i=this.read_uint16(t);t+=2;for(var n=0;n<i;n++){var a=this.read_uint16(t),o=this.read_uint16(t+2),s=this.read_uint32(t+4),l=this.exif_format_length(o),u=s*l,c=u<=4?t+8:this.read_uint32(t+8),f=!1;if(c+u>this.input.length)throw CP("unexpected EOF","EBADDATA");for(var h=[],d=c,p=0;p<s;p++,d+=l){var v=this.exif_format_read(o,d);if(v===null){h=null;break}h.push(v)}Array.isArray(h)&&o===2&&(h=m$t(String.fromCharCode.apply(null,h)),h&&h[h.length-1]==="\0"&&(h=h.slice(0,-1))),this.is_subifd_link(e,a)&&Array.isArray(h)&&Number.isInteger(h[0])&&h[0]>0&&(this.ifds_to_read.push({id:a,offset:h[0]}),f=!0);var m={is_big_endian:this.big_endian,ifd:e,tag:a,format:o,count:s,entry_offset:t+this.start,data_length:u,data_offset:c+this.start,value:h,is_subifd_link:f};if(r(m)===!1){this.aborted=!0;return}t+=12}e===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})};FZ.exports.ExifParser=em;FZ.exports.get_orientation=function(e){var t=0;try{return new em(e,0,e.length).each(function(r){if(r.ifd===0&&r.tag===274&&Array.isArray(r.value))return t=r.value[0],!1}),t}catch(r){return-1}}});var N9e=W(($Nr,O9e)=>{"use strict";var y$t=bo().str2arr,x$t=bo().sliceEq,_$t=bo().readUInt32BE,FP=q9e(),b$t=DP(),w$t=y$t("ftyp");O9e.exports=function(e){if(x$t(e,4,w$t)){var t=FP.unbox(e,0);if(t){var r=FP.getMimeType(t.data);if(r){for(var i,n=t.end;;){var a=FP.unbox(e,n);if(!a)break;if(n=a.end,a.boxtype==="mdat")return;if(a.boxtype==="meta"){i=a.data;break}}if(i){var o=FP.readSizeFromMeta(i);if(o){var s={width:o.width,height:o.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(o.variants.length>1&&(s.variants=o.variants),o.orientation&&(s.orientation=o.orientation),o.exif_location&&o.exif_location.offset+o.exif_location.length<=e.length){var l=_$t(e,o.exif_location.offset),u=e.slice(o.exif_location.offset+l+4,o.exif_location.offset+o.exif_location.length),c=b$t.get_orientation(u);c>0&&(s.orientation=c)}return s}}}}}}});var H9e=W((WNr,G9e)=>{"use strict";var T$t=bo().str2arr,A$t=bo().sliceEq,U9e=bo().readInt16LE,V9e=bo().readInt32LE,M$t=bo().readUInt32LE,S$t=T$t("BM");G9e.exports=function(e){if(!(e.length<26)&&A$t(e,0,S$t)){var t,r,i=M$t(e,14);if(i===12)r=U9e(e,18),t=U9e(e,20);else if(i>12)r=V9e(e,18),t=V9e(e,22);else return;return{width:r,height:Math.abs(t),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}});var X9e=W((YNr,Y9e)=>{"use strict";var W9e=bo().str2arr,j9e=bo().sliceEq,$9e=bo().readUInt16LE,E$t=W9e("GIF87a"),k$t=W9e("GIF89a");Y9e.exports=function(e){if(!(e.length<10)&&!(!j9e(e,0,E$t)&&!j9e(e,0,k$t)))return{width:$9e(e,6),height:$9e(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}});var K9e=W((XNr,Z9e)=>{"use strict";var LZ=bo().readUInt16LE,C$t=0,D$t=1,PZ=16;Z9e.exports=function(e){var t=LZ(e,0),r=LZ(e,2),i=LZ(e,4);if(!(t!==C$t||r!==D$t||!i)&&!(e.length<6+i*PZ)){for(var n=[],a={width:0,height:0},o=0;o<i;o++){var s=e[6+PZ*o]||256,l=e[6+PZ*o+1]||256,u={width:s,height:l};n.push(u),(s>a.width||l>a.height)&&(a=u)}return{width:a.width,height:a.height,variants:n,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}});var Q9e=W((ZNr,J9e)=>{"use strict";var IZ=bo().readUInt16BE,F$t=bo().str2arr,L$t=bo().sliceEq,P$t=DP(),I$t=F$t("Exif\0\0");J9e.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var r=e[t++],i;r===255;)r=e[t++];if(r>=208&&r<=217||r===1)i=0;else if(r>=192&&r<=254){if(e.length-t<2)return;i=IZ(e,t)-2,t+=2}else return;if(r===217||r===218)return;var n;if(r===225&&i>=10&&L$t(e,t,I$t)&&(n=P$t.get_orientation(e.slice(t+6,t+i))),i>=5&&r>=192&&r<=207&&r!==196&&r!==200&&r!==204){if(e.length-t<i)return;var a={width:IZ(e,t+3),height:IZ(e,t+1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};return n>0&&(a.orientation=n),a}t+=i}}});var nPe=W((KNr,iPe)=>{"use strict";var rPe=bo().str2arr,ePe=bo().sliceEq,tPe=bo().readUInt32BE,R$t=rPe(`\x89PNG\r

`),z$t=rPe("IHDR");iPe.exports=function(e){if(!(e.length<24)&&ePe(e,0,R$t)&&ePe(e,12,z$t))return{width:tPe(e,16),height:tPe(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}});var sPe=W((JNr,oPe)=>{"use strict";var B$t=bo().str2arr,q$t=bo().sliceEq,aPe=bo().readUInt32BE,O$t=B$t("8BPS\0");oPe.exports=function(e){if(!(e.length<22)&&q$t(e,0,O$t))return{width:aPe(e,18),height:aPe(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var cPe=W((QNr,uPe)=>{"use strict";function N$t(e){return e===32||e===9||e===13||e===10}function i4(e){return typeof e=="number"&&isFinite(e)&&e>0}function U$t(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t<r&&N$t(e[t]);)t++;return t===r?!1:e[t]===60}var V$t=/<[-_.:a-zA-Z0-9][^>]*>/,G$t=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,H$t=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,j$t=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,$$t=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,lPe=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function W$t(e){var t=e.match(H$t),r=e.match(j$t),i=e.match($$t);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:i&&(i[1]||i[2])}}function L1(e){return lPe.test(e)?e.match(lPe)[0]:"px"}uPe.exports=function(e){if(U$t(e)){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);var i=(t.match(V$t)||[""])[0];if(G$t.test(i)){var n=W$t(i),a=parseFloat(n.width),o=parseFloat(n.height);if(n.width&&n.height)return!i4(a)||!i4(o)?void 0:{width:a,height:o,type:"svg",mime:"image/svg+xml",wUnits:L1(n.width),hUnits:L1(n.height)};var s=(n.viewbox||"").split(" "),l={width:s[2],height:s[3]},u=parseFloat(l.width),c=parseFloat(l.height);if(!(!i4(u)||!i4(c))&&L1(l.width)===L1(l.height)){var f=u/c;return n.width?i4(a)?{width:a,height:a/f,type:"svg",mime:"image/svg+xml",wUnits:L1(n.width),hUnits:L1(n.width)}:void 0:n.height?i4(o)?{width:o*f,height:o,type:"svg",mime:"image/svg+xml",wUnits:L1(n.height),hUnits:L1(n.height)}:void 0:{width:u,height:c,type:"svg",mime:"image/svg+xml",wUnits:L1(l.width),hUnits:L1(l.height)}}}}}});var vPe=W((eUr,pPe)=>{"use strict";var dPe=bo().str2arr,fPe=bo().sliceEq,Y$t=bo().readUInt16LE,X$t=bo().readUInt16BE,Z$t=bo().readUInt32LE,K$t=bo().readUInt32BE,J$t=dPe("II*\0"),Q$t=dPe("MM\0*");function LP(e,t,r){return r?X$t(e,t):Y$t(e,t)}function RZ(e,t,r){return r?K$t(e,t):Z$t(e,t)}function hPe(e,t,r){var i=LP(e,t+2,r),n=RZ(e,t+4,r);return n!==1||i!==3&&i!==4?null:i===3?LP(e,t+8,r):RZ(e,t+8,r)}pPe.exports=function(e){if(!(e.length<8)&&!(!fPe(e,0,J$t)&&!fPe(e,0,Q$t))){var t=e[0]===77,r=RZ(e,4,t)-8;if(!(r<0)){var i=r+8;if(!(e.length-i<2)){var n=LP(e,i+0,t)*12;if(!(n<=0)&&(i+=2,!(e.length-i<n))){var a,o,s,l;for(a=0;a<n;a+=12)l=LP(e,i+a,t),l===256?o=hPe(e,i+a,t):l===257&&(s=hPe(e,i+a,t));if(o&&s)return{width:o,height:s,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"}}}}}}});var _Pe=W((tUr,xPe)=>{"use strict";var yPe=bo().str2arr,gPe=bo().sliceEq,mPe=bo().readUInt16LE,zZ=bo().readUInt32LE,eWt=DP(),tWt=yPe("RIFF"),rWt=yPe("WEBP");function iWt(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:mPe(e,t+6)&16383,height:mPe(e,t+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function nWt(e,t){if(e[t]===47){var r=zZ(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function aWt(e,t){return{width:(e[t+6]<<16|e[t+5]<<8|e[t+4])+1,height:(e[t+9]<<16|e[t+8]<<8|e[t+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}xPe.exports=function(e){if(!(e.length<16)&&!(!gPe(e,0,tWt)||!gPe(e,8,rWt))){var t=12,r=null,i=0,n=zZ(e,4)+8;if(!(n>e.length)){for(;t+8<n;){if(e[t]===0){t++;continue}var a=String.fromCharCode.apply(null,e.slice(t,t+4)),o=zZ(e,t+4);a==="VP8 "&&o>=10?r=r||iWt(e,t+8):a==="VP8L"&&o>=5?r=r||nWt(e,t+8):a==="VP8X"&&o>=10?r=r||aWt(e,t+8):a==="EXIF"&&(i=eWt.get_orientation(e.slice(t+8,t+8+o)),t=1/0),t+=8+o}if(r)return i>0&&(r.orientation=i),r}}}});var wPe=W((rUr,bPe)=>{"use strict";bPe.exports={avif:N9e(),bmp:H9e(),gif:X9e(),ico:K9e(),jpeg:Q9e(),png:nPe(),psd:sPe(),svg:cPe(),tiff:vPe(),webp:_Pe()}});var TPe=W((iUr,qZ)=>{"use strict";var BZ=wPe();function oWt(e){for(var t=Object.keys(BZ),r=0;r<t.length;r++){var i=BZ[t[r]](e);if(i)return i.width>0&&i.height>0?i:null}return null}qZ.exports=function(t){return oWt(t)};qZ.exports.parsers=BZ});var MPe=W(APe=>{"use strict";var sWt=TPe(),lWt=Ng().IMAGE_URL_PREFIX,uWt=V_().Buffer;APe.getImageSize=function(e){var t=e.replace(lWt,""),r=new uWt(t,"base64");return sWt(r)}});var kPe=W((aUr,EPe)=>{"use strict";var SPe=it(),cWt=L5(),fWt=sn(),PP=ji(),hWt=it().maxRowLength,dWt=MPe().getImageSize;EPe.exports=function(t,r){var i,n;if(r._hasZ)i=r.z.length,n=hWt(r.z);else if(r._hasSource){var a=dWt(r.source);i=a.height,n=a.width}var o=PP.getFromId(t,r.xaxis||"x"),s=PP.getFromId(t,r.yaxis||"y"),l=o.d2c(r.x0)-r.dx/2,u=s.d2c(r.y0)-r.dy/2,c,f=[l,l+n*r.dx],h=[u,u+i*r.dy];if(o&&o.type==="log")for(c=0;c<n;c++)f.push(l+c*r.dx);if(s&&s.type==="log")for(c=0;c<i;c++)h.push(u+c*r.dy);r._extremes[o._id]=PP.findExtremes(o,f),r._extremes[s._id]=PP.findExtremes(s,h),r._scaler=gWt(r);var d={x0:l,y0:u,z:r.z,w:n,h:i};return[d]};function pWt(e,t,r,i){return function(n){return SPe.constrain((n-e)*t,r,i)}}function vWt(e,t){return function(r){return SPe.constrain(r,e,t)}}function gWt(e){var t=cWt.colormodel[e.colormodel],r=t.colormodel||e.colormodel,i=r.length;e._sArray=[];for(var n=0;n<i;n++)t.min[n]!==e.zmin[n]||t.max[n]!==e.zmax[n]?e._sArray.push(pWt(e.zmin[n],(t.max[n]-t.min[n])/(e.zmax[n]-e.zmin[n]),t.min[n],t.max[n])):e._sArray.push(vWt(t.min[n],t.max[n]));return function(a){for(var o=a.slice(0,i),s=0;s<i;s++){var l=o[s];if(!fWt(l))return!1;o[s]=e._sArray[s](l)}return o}}});var FPe=W((oUr,DPe)=>{"use strict";var mWt=vi(),ib=it(),CPe=ib.strTranslate,yWt=sd(),xWt=L5(),_Wt=MW(),bWt=SL().STYLE;DPe.exports=function(t,r,i,n){var a=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&_Wt();ib.makeTraceGroups(n,i,"im").each(function(l){var u=mWt.select(this),c=l[0],f=c.trace,h=(f.zsmooth==="fast"||f.zsmooth===!1&&s)&&!f._hasZ&&f._hasSource&&a.type==="linear"&&o.type==="linear";f._realImage=h;var d=c.z,p=c.x0,v=c.y0,m=c.w,g=c.h,w=f.dx,b=f.dy,_,M,x,T,A,y;for(y=0;_===void 0&&y<m;)_=a.c2p(p+y*w),y++;for(y=m;M===void 0&&y>0;)M=a.c2p(p+y*w),y--;for(y=0;T===void 0&&y<g;)T=o.c2p(v+y*b),y++;for(y=g;A===void 0&&y>0;)A=o.c2p(v+y*b),y--;if(M<_&&(x=M,M=_,_=x),A<T&&(x=T,T=A,A=x),!h){var E=.5;_=Math.max(-E*a._length,_),M=Math.min((1+E)*a._length,M),T=Math.max(-E*o._length,T),A=Math.min((1+E)*o._length,A)}var S=Math.round(M-_),C=Math.round(A-T),k=S<=0||C<=0;if(k){var D=u.selectAll("image").data([]);D.exit().remove();return}function F(j){var q=document.createElement("canvas");q.width=S,q.height=C;var J=q.getContext("2d",{willReadFrequently:!0}),U=function(he){return ib.constrain(Math.round(a.c2p(p+he*w)-_),0,S)},V=function(he){return ib.constrain(Math.round(o.c2p(v+he*b)-T),0,C)},X=xWt.colormodel[f.colormodel],H=X.colormodel||f.colormodel,G=X.fmt,Q;for(y=0;y<c.w;y++){var te=U(y),ce=U(y+1);if(!(ce===te||isNaN(ce)||isNaN(te)))for(var ge=0;ge<c.h;ge++){var Ce=V(ge),be=V(ge+1);be===Ce||isNaN(be)||isNaN(Ce)||!j(y,ge)||(Q=f._scaler(j(y,ge)),Q?J.fillStyle=H+"("+G(Q).join(",")+")":J.fillStyle="rgba(0,0,0,0)",J.fillRect(te,Ce,ce-te,be-Ce))}}return q}var P=u.selectAll("image").data([l]);P.enter().append("svg:image").attr({xmlns:yWt.svg,preserveAspectRatio:"none"}),P.exit().remove();var R=f.zsmooth===!1?bWt:"";if(h){var L=ib.simpleMap(a.range,a.r2l),I=ib.simpleMap(o.range,o.r2l),B=L[1]<L[0],O=I[1]>I[0];if(B||O){var $=_+S/2,Y=T+C/2;R+="transform:"+CPe($+"px",Y+"px")+"scale("+(B?-1:1)+","+(O?-1:1)+")"+CPe(-$+"px",-Y+"px")+";"}}P.attr("style",R);var K=new Promise(function(j){if(f._hasZ)j();else if(f._hasSource)if(f._canvas&&f._canvas.el.width===m&&f._canvas.el.height===g&&f._canvas.source===f.source)j();else{var q=document.createElement("canvas");q.width=m,q.height=g;var J=q.getContext("2d",{willReadFrequently:!0});f._image=f._image||new Image;var U=f._image;U.onload=function(){J.drawImage(U,0,0),f._canvas={el:q,source:f.source},j()},U.setAttribute("src",f.source)}}).then(function(){var j,q;if(f._hasZ)q=F(function(V,X){var H=d[X][V];return ib.isTypedArray(H)&&(H=Array.from(H)),H}),j=q.toDataURL("image/png");else if(f._hasSource)if(h)j=f.source;else{var J=f._canvas.el.getContext("2d",{willReadFrequently:!0}),U=J.getImageData(0,0,m,g).data;q=F(function(V,X){var H=4*(X*m+V);return[U[H],U[H+1],U[H+2],U[H+3]]}),j=q.toDataURL("image/png")}P.attr({"xlink:href":j,height:C,width:S,x:_,y:T})});t._promises.push(K)})}});var PPe=W((sUr,LPe)=>{"use strict";var wWt=vi();LPe.exports=function(t){wWt.select(t).selectAll(".im image").style("opacity",function(r){return r[0].trace.opacity})}});var BPe=W((lUr,zPe)=>{"use strict";var IPe=Ds(),RPe=it(),IP=RPe.isArrayOrTypedArray,TWt=L5();zPe.exports=function(t,r,i){var n=t.cd[0],a=n.trace,o=t.xa,s=t.ya;if(!(IPe.inbox(r-n.x0,r-(n.x0+n.w*a.dx),0)>0||IPe.inbox(i-n.y0,i-(n.y0+n.h*a.dy),0)>0)){var l=Math.floor((r-n.x0)/a.dx),u=Math.floor(Math.abs(i-n.y0)/a.dy),c;if(a._hasZ?c=n.z[u][l]:a._hasSource&&(c=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(l,u,1,1).data),!!c){var f=n.hi||a.hoverinfo,h;if(f){var d=f.split("+");d.indexOf("all")!==-1&&(d=["color"]),d.indexOf("color")!==-1&&(h=!0)}var p=TWt.colormodel[a.colormodel],v=p.colormodel||a.colormodel,m=v.length,g=a._scaler(c),w=p.suffix,b=[];(a.hovertemplate||h)&&(b.push("["+[g[0]+w[0],g[1]+w[1],g[2]+w[2]].join(", ")),m===4&&b.push(", "+g[3]+w[3]),b.push("]"),b=b.join(""),t.extraText=v.toUpperCase()+": "+b);var _;IP(a.hovertext)&&IP(a.hovertext[u])?_=a.hovertext[u][l]:IP(a.text)&&IP(a.text[u])&&(_=a.text[u][l]);var M=s.c2p(n.y0+(u+.5)*a.dy),x=n.x0+(l+.5)*a.dx,T=n.y0+(u+.5)*a.dy,A="["+c.slice(0,a.colormodel.length).join(", ")+"]";return[RPe.extendFlat(t,{index:[u,l],x0:o.c2p(n.x0+l*a.dx),x1:o.c2p(n.x0+(l+1)*a.dx),y0:M,y1:M,color:g,xVal:x,xLabelVal:x,yVal:T,yLabelVal:T,zLabelVal:A,text:_,hovertemplateLabels:{zLabel:A,colorLabel:b,"color[0]Label":g[0]+w[0],"color[1]Label":g[1]+w[1],"color[2]Label":g[2]+w[2],"color[3]Label":g[3]+w[3]}})]}}}});var OPe=W((uUr,qPe)=>{"use strict";qPe.exports=function(t,r){return"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t.color=r.color,t.colormodel=r.trace.colormodel,t.z||(t.z=r.color),t}});var UPe=W((cUr,NPe)=>{"use strict";NPe.exports={attributes:(zY(),Go(RY)).default,supplyDefaults:k8e(),calc:kPe(),plot:FPe(),style:PPe(),hoverPoints:BPe(),eventData:OPe(),moduleType:"trace",name:"image",basePlotModule:dl(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var GPe=W((fUr,VPe)=>{"use strict";VPe.exports=UPe()});var nb=W((hUr,jPe)=>{"use strict";var RP=Wa(),AWt=us().attributes,MWt=Ho(),SWt=Vl(),{hovertemplateAttrs:EWt,texttemplateAttrs:kWt,templatefallbackAttrs:HPe}=Ga(),d2=tn().extendFlat,CWt=Du().pattern,zP=MWt({editType:"plot",arrayOk:!0,colorEditType:"plot"});jPe.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:SWt.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:CWt,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:d2({},RP.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:EWt({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:HPe(),texttemplate:kWt({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:HPe({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:d2({},zP,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:d2({},zP,{}),outsidetextfont:d2({},zP,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:d2({},RP.showlegend,{arrayOk:!0}),legend:d2({},RP.legend,{arrayOk:!0}),legendrank:d2({},RP.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:d2({},zP,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:AWt({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}});var ab=W((dUr,YPe)=>{"use strict";var DWt=sn(),OS=it(),FWt=nb(),LWt=us().defaults,PWt=E0().handleText,IWt=it().coercePattern;function $Pe(e,t){var r=OS.isArrayOrTypedArray(e),i=OS.isArrayOrTypedArray(t),n=Math.min(r?e.length:1/0,i?t.length:1/0);if(isFinite(n)||(n=0),n&&i){for(var a,o=0;o<n;o++){var s=t[o];if(DWt(s)&&s>0){a=!0;break}}a||(n=0)}return{hasLabels:r,hasValues:i,len:n}}function WPe(e,t,r,i,n){var a=i("marker.line.width");a&&i("marker.line.color",n?void 0:r.paper_bgcolor);var o=i("marker.colors");IWt(i,"marker.pattern",o),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}function RWt(e,t,r,i){function n(w,b){return OS.coerce(e,t,FWt,w,b)}var a=n("labels"),o=n("values"),s=$Pe(a,o),l=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(n("label0"),n("dlabel")),!l){t.visible=!1;return}t._length=l,WPe(e,t,i,n,!0),n("scalegroup");var u=n("text"),c=n("texttemplate");n("texttemplatefallback");var f;if(c||(f=n("textinfo",OS.isArrayOrTypedArray(u)?"text+percent":"percent")),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),c||f&&f!=="none"){var h=n("textposition");PWt(e,t,i,n,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(h)||h==="auto",p=d||h==="outside";p&&n("automargin"),(h==="inside"||h==="auto"||Array.isArray(h))&&n("insidetextorientation")}else f==="none"&&n("textposition","none");LWt(t,i,n);var v=n("hole"),m=n("title.text");if(m){var g=n("title.position",v?"middle center":"top center");!v&&g==="middle center"&&(t.title.position="top center"),OS.coerceFont(n,"title.font",i.font)}n("sort"),n("direction"),n("rotation"),n("pull")}YPe.exports={handleLabelsAndValues:$Pe,handleMarkerDefaults:WPe,supplyDefaults:RWt}});var BP=W((pUr,XPe)=>{"use strict";XPe.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var KPe=W((vUr,ZPe)=>{"use strict";var zWt=it(),BWt=BP();ZPe.exports=function(t,r){function i(n,a){return zWt.coerce(t,r,BWt,n,a)}i("hiddenlabels"),i("piecolorway",r.colorway),i("extendpiecolors")}});var a4=W((gUr,eIe)=>{"use strict";var qWt=sn(),n4=ni(),OWt={};function NWt(e,t){var r=[],i=e._fullLayout,n=i.hiddenlabels||[],a=t.labels,o=t.marker.colors||[],s=t.values,l=t._length,u=t._hasValues&&l,c,f;if(t.dlabel)for(a=new Array(l),c=0;c<l;c++)a[c]=String(t.label0+c*t.dlabel);var h={},d=JPe(i["_"+t.type+"colormap"]),p=0,v=!1;for(c=0;c<l;c++){var m,g,w;if(u){if(m=s[c],!qWt(m))continue;m=+m}else m=1;g=a[c],(g===void 0||g==="")&&(g=c),g=String(g);var b=h[g];b===void 0?(h[g]=r.length,w=n.indexOf(g)!==-1,w||(p+=m),r.push({v:m,label:g,color:d(o[c],g),i:c,pts:[c],hidden:w})):(v=!0,f=r[b],f.v+=m,f.pts.push(c),f.hidden||(p+=m),f.color===!1&&o[c]&&(f.color=d(o[c],g)))}r=r.filter(function(M){return M.v>=0});var _=t.type==="funnelarea"?v:t.sort;return _&&r.sort(function(M,x){return x.v-M.v}),r[0]&&(r[0].vTotal=p),r}function JPe(e){return function(r,i){if(!r||!n4.isValid(r))return!1;let n=n4.rgbaString(r);return e[i]||(e[i]=n),n}}function UWt(e,t){var r=(t||{}).type;r||(r="pie");var i=e._fullLayout,n=e.calcdata,a=i[r+"colorway"],o=i["_"+r+"colormap"];i["extend"+r+"colors"]&&(a=QPe(a,OWt));for(var s=0,l=0;l<n.length;l++){var u=n[l],c=u[0].trace.type;if(c===r)for(var f=0;f<u.length;f++){var h=u[f];h.color===!1&&(o[h.label]?h.color=o[h.label]:(o[h.label]=h.color=a[s%a.length],s++))}}}function QPe(e,t){var r,i=JSON.stringify(e),n=t[i];if(!n){for(n=e.slice(),r=0;r<e.length;r++)n.push(n4.hexString(n4.adjustLightness(e[r],20)));for(r=0;r<e.length;r++)n.push(n4.hexString(n4.adjustLightness(e[r],-20)));t[i]=n}return n}eIe.exports={calc:NWt,crossTraceCalc:UWt,makePullColorFn:JPe,generateExtendedColors:QPe}});var rIe=W((mUr,tIe)=>{"use strict";var VWt=Kf().appendArrayMultiPointValues;tIe.exports=function(t,r){var i={curveNumber:r.index,pointNumbers:t.pts,data:r._input,fullData:r,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return t.pts.length===1&&(i.pointNumber=i.i=t.pts[0]),VWt(i,r,t.pts),r.type==="funnelarea"&&(delete i.v,delete i.i),i}});var UP=W((yUr,TIe)=>{"use strict";var jh=vi(),GWt=Ko(),qP=Ds(),lIe=ni(),tm=Ji(),kc=it(),HWt=kc.strScale,iIe=kc.strTranslate,OZ=uo(),uIe=Qc(),jWt=uIe.recordMinTextSize,$Wt=uIe.clearMinTextSize,cIe=Uy().TEXTPAD,Ln=Ly(),OP=rIe(),nIe=it().isValidTextValue;function WWt(e,t){var r=e._context.staticPlot,i=e._fullLayout,n=i._size;$Wt("pie",i),dIe(t,e),_Ie(t,n);var a=kc.makeTraceGroups(i._pielayer,t,"trace").each(function(o){var s=jh.select(this),l=o[0],u=l.trace;rYt(o),s.attr("stroke-linejoin","round"),s.each(function(){var c=jh.select(this).selectAll("g.slice").data(o);c.enter().append("g").classed("slice",!0),c.exit().remove();var f=[[[],[]],[[],[]]],h=!1;c.each(function(_,M){if(_.hidden){jh.select(this).selectAll("path,g").remove();return}_.pointNumber=_.i,_.curveNumber=u.index,f[_.pxmid[1]<0?0:1][_.pxmid[0]<0?0:1].push(_);var x=l.cx,T=l.cy,A=jh.select(this),y=A.selectAll("path.surface").data([_]);if(y.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),A.call(fIe,e,o),u.pull){var E=+Ln.castOption(u.pull,_.pts)||0;E>0&&(x+=E*_.pxmid[0],T+=E*_.pxmid[1])}_.cxFinal=x,_.cyFinal=T;function S(L,I,B,O){var $=O*(I[0]-L[0]),Y=O*(I[1]-L[1]);return"a"+O*l.r+","+O*l.r+" 0 "+_.largeArc+(B?" 1 ":" 0 ")+$+","+Y}var C=u.hole;if(_.v===l.vTotal){var k="M"+(x+_.px0[0])+","+(T+_.px0[1])+S(_.px0,_.pxmid,!0,1)+S(_.pxmid,_.px0,!0,1)+"Z";C?y.attr("d","M"+(x+C*_.px0[0])+","+(T+C*_.px0[1])+S(_.px0,_.pxmid,!1,C)+S(_.pxmid,_.px0,!1,C)+"Z"+k):y.attr("d",k)}else{var D=S(_.px0,_.px1,!0,1);if(C){var F=1-C;y.attr("d","M"+(x+C*_.px1[0])+","+(T+C*_.px1[1])+S(_.px1,_.px0,!1,C)+"l"+F*_.px0[0]+","+F*_.px0[1]+D+"Z")}else y.attr("d","M"+x+","+T+"l"+_.px0[0]+","+_.px0[1]+D+"Z")}bIe(e,_,l);var P=Ln.castOption(u.textposition,_.pts),R=A.selectAll("g.slicetext").data(_.text&&P!=="none"?[0]:[]);R.enter().append("g").classed("slicetext",!0),R.exit().remove(),R.each(function(){var L=kc.ensureSingle(jh.select(this),"text","",function(q){q.attr("data-notex",1)}),I=kc.ensureUniformFontSize(e,P==="outside"?XWt(u,_,i.font):hIe(u,_,i.font));L.text(_.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(tm.font,I).call(OZ.convertToTspans,e);var B=tm.bBox(L.node()),O;if(P==="outside")O=sIe(B,_);else if(O=pIe(B,_,l),P==="auto"&&O.scale<1){var $=kc.ensureUniformFontSize(e,u.outsidetextfont);L.call(tm.font,$),B=tm.bBox(L.node()),O=sIe(B,_)}var Y=O.textPosAngle,K=Y===void 0?_.pxmid:NP(l.r,Y);if(O.targetX=x+K[0]*O.rCenter+(O.x||0),O.targetY=T+K[1]*O.rCenter+(O.y||0),wIe(O,B),O.outside){var j=O.targetY;_.yLabelMin=j-B.height/2,_.yLabelMid=j,_.yLabelMax=j+B.height/2,_.labelExtraX=0,_.labelExtraY=0,h=!0}O.fontSize=I.size,jWt(u.type,O,i),o[M].transform=O,kc.setTransormAndDisplay(L,O)})});var d=jh.select(this).selectAll("g.titletext").data(u.title.text?[0]:[]);if(d.enter().append("g").classed("titletext",!0),d.exit().remove(),d.each(function(){var _=kc.ensureSingle(jh.select(this),"text","",function(T){T.attr("data-notex",1)}),M=u.title.text;u._meta&&(M=kc.templateString(M,u._meta)),_.text(M).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(tm.font,u.title.font).call(OZ.convertToTspans,e);var x;u.title.position==="middle center"?x=JWt(l):x=yIe(l,n),_.attr("transform",iIe(x.x,x.y)+HWt(Math.min(1,x.scale))+iIe(x.tx,x.ty))}),h&&eYt(f,u),YWt(c,u),h&&u.automargin){var p=tm.bBox(s.node()),v=u.domain,m=n.w*(v.x[1]-v.x[0]),g=n.h*(v.y[1]-v.y[0]),w=(.5*m-l.r)/n.w,b=(.5*g-l.r)/n.h;GWt.autoMargin(e,"pie."+u.uid+".automargin",{xl:v.x[0]-w,xr:v.x[1]+w,yb:v.y[0]-b,yt:v.y[1]+b,l:Math.max(l.cx-l.r-p.left,0),r:Math.max(p.right-(l.cx+l.r),0),b:Math.max(p.bottom-(l.cy+l.r),0),t:Math.max(l.cy-l.r-p.top,0),pad:5})}})});setTimeout(function(){a.selectAll("tspan").each(function(){var o=jh.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function YWt(e,t){e.each(function(r){var i=jh.select(this);if(!r.labelExtraX&&!r.labelExtraY){i.select("path.textline").remove();return}var n=i.select("g.slicetext text");r.transform.targetX+=r.labelExtraX,r.transform.targetY+=r.labelExtraY,kc.setTransormAndDisplay(n,r.transform);var a=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],s="M"+a+","+o,l=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var u=r.labelExtraX*r.pxmid[1]/r.pxmid[0],c=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(u)>Math.abs(c)?s+="l"+c*r.pxmid[0]/r.pxmid[1]+","+c+"H"+(a+r.labelExtraX+l):s+="l"+r.labelExtraX+","+u+"v"+(c-u)+"h"+l}else s+="V"+(r.yLabelMid+r.labelExtraY)+"h"+l;kc.ensureSingle(i,"path","textline").call(lIe.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})})}function fIe(e,t,r){var i=r[0],n=i.cx,a=i.cy,o=i.trace,s=o.type==="funnelarea";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),e.on("mouseover",function(l){var u=t._fullLayout,c=t._fullData[o.index];if(!(t._dragging||u.hovermode===!1)){var f=c.hoverinfo;if(Array.isArray(f)&&(f=qP.castHoverinfo({hoverinfo:[Ln.castOption(f,l.pts)],_module:o._module},u,0)),f==="all"&&(f="label+text+value+percent+name"),c.hovertemplate||f!=="none"&&f!=="skip"&&f){var h=l.rInscribed||0,d=n+l.pxmid[0]*(1-h),p=a+l.pxmid[1]*(1-h),v=u.separators,m=[];if(f&&f.indexOf("label")!==-1&&m.push(l.label),l.text=Ln.castOption(c.hovertext||c.text,l.pts),f&&f.indexOf("text")!==-1){var g=l.text;kc.isValidTextValue(g)&&m.push(g)}l.value=l.v,l.valueLabel=Ln.formatPieValue(l.v,v),f&&f.indexOf("value")!==-1&&m.push(l.valueLabel),l.percent=l.v/i.vTotal,l.percentLabel=Ln.formatPiePercent(l.percent,v),f&&f.indexOf("percent")!==-1&&m.push(l.percentLabel);var w=c.hoverlabel,b=w.font,_=[];qP.loneHover({trace:o,x0:d-h*i.r,x1:d+h*i.r,y:p,_x0:s?n+l.TL[0]:d-h*i.r,_x1:s?n+l.TR[0]:d+h*i.r,_y0:s?a+l.TL[1]:p-h*i.r,_y1:s?a+l.BL[1]:p+h*i.r,text:m.join("<br>"),name:c.hovertemplate||f.indexOf("name")!==-1?c.name:void 0,idealAlign:l.pxmid[0]<0?"left":"right",color:Ln.castOption(w.bgcolor,l.pts)||l.color,borderColor:Ln.castOption(w.bordercolor,l.pts),fontFamily:Ln.castOption(b.family,l.pts),fontSize:Ln.castOption(b.size,l.pts),fontColor:Ln.castOption(b.color,l.pts),nameLength:Ln.castOption(w.namelength,l.pts),textAlign:Ln.castOption(w.align,l.pts),hovertemplate:Ln.castOption(c.hovertemplate,l.pts),hovertemplateLabels:l,eventData:[OP(l,c)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:t,inOut_bbox:_}),l.bbox=_[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit("plotly_hover",{points:[OP(l,c)],event:jh.event})}}),e.on("mouseout",function(l){var u=t._fullLayout,c=t._fullData[o.index],f=jh.select(this).datum();o._hasHoverEvent&&(l.originalEvent=jh.event,t.emit("plotly_unhover",{points:[OP(f,c)],event:jh.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(qP.loneUnhover(u._hoverlayer.node()),o._hasHoverLabel=!1)}),e.on("click",function(l){var u=t._fullLayout,c=t._fullData[o.index];t._dragging||u.hovermode===!1||(t._hoverdata=[OP(l,c)],qP.click(t,jh.event))})}function XWt(e,t,r){var i=Ln.castOption(e.outsidetextfont.color,t.pts)||Ln.castOption(e.textfont.color,t.pts)||r.color,n=Ln.castOption(e.outsidetextfont.family,t.pts)||Ln.castOption(e.textfont.family,t.pts)||r.family,a=Ln.castOption(e.outsidetextfont.size,t.pts)||Ln.castOption(e.textfont.size,t.pts)||r.size,o=Ln.castOption(e.outsidetextfont.weight,t.pts)||Ln.castOption(e.textfont.weight,t.pts)||r.weight,s=Ln.castOption(e.outsidetextfont.style,t.pts)||Ln.castOption(e.textfont.style,t.pts)||r.style,l=Ln.castOption(e.outsidetextfont.variant,t.pts)||Ln.castOption(e.textfont.variant,t.pts)||r.variant,u=Ln.castOption(e.outsidetextfont.textcase,t.pts)||Ln.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Ln.castOption(e.outsidetextfont.lineposition,t.pts)||Ln.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Ln.castOption(e.outsidetextfont.shadow,t.pts)||Ln.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:i,family:n,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function hIe(e,t,r){var i=Ln.castOption(e.insidetextfont.color,t.pts);!i&&e._input.textfont&&(i=Ln.castOption(e._input.textfont.color,t.pts));var n=Ln.castOption(e.insidetextfont.family,t.pts)||Ln.castOption(e.textfont.family,t.pts)||r.family,a=Ln.castOption(e.insidetextfont.size,t.pts)||Ln.castOption(e.textfont.size,t.pts)||r.size,o=Ln.castOption(e.insidetextfont.weight,t.pts)||Ln.castOption(e.textfont.weight,t.pts)||r.weight,s=Ln.castOption(e.insidetextfont.style,t.pts)||Ln.castOption(e.textfont.style,t.pts)||r.style,l=Ln.castOption(e.insidetextfont.variant,t.pts)||Ln.castOption(e.textfont.variant,t.pts)||r.variant,u=Ln.castOption(e.insidetextfont.textcase,t.pts)||Ln.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Ln.castOption(e.insidetextfont.lineposition,t.pts)||Ln.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Ln.castOption(e.insidetextfont.shadow,t.pts)||Ln.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:i||lIe.contrast(t.color),family:n,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function dIe(e,t){for(var r,i,n=0;n<e.length;n++)if(r=e[n][0],i=r.trace,i.title.text){var a=i.title.text;i._meta&&(a=kc.templateString(a,i._meta));var o=tm.tester.append("text").attr("data-notex",1).text(a).call(tm.font,i.title.font).call(OZ.convertToTspans,t),s=tm.bBox(o.node(),!0);r.titleBox={width:s.width,height:s.height},o.remove()}}function pIe(e,t,r){var i=r.r||t.rpx1,n=t.rInscribed,a=t.startangle===t.stopangle;if(a)return{rCenter:1-n,scale:0,rotate:0,textPosAngle:0};var o=t.ring,s=o===1&&Math.abs(t.startangle-t.stopangle)===Math.PI*2,l=t.halfangle,u=t.midangle,c=r.trace.insidetextorientation,f=c==="horizontal",h=c==="tangential",d=c==="radial",p=c==="auto",v=[],m;if(!p){var g=function(A,y){if(ZWt(t,A)){var E=Math.abs(A-t.startangle),S=Math.abs(A-t.stopangle),C=E<S?E:S;y==="tan"?m=oIe(e,i,o,C,0):m=aIe(e,i,o,C,Math.PI/2),m.textPosAngle=A,v.push(m)}},w;if(f||h){for(w=4;w>=-4;w-=2)g(Math.PI*w,"tan");for(w=4;w>=-4;w-=2)g(Math.PI*(w+1),"tan")}if(f||d){for(w=4;w>=-4;w-=2)g(Math.PI*(w+1.5),"rad");for(w=4;w>=-4;w-=2)g(Math.PI*(w+.5),"rad")}}if(s||p||f){var b=Math.sqrt(e.width*e.width+e.height*e.height);if(m={scale:n*i*2/b,rCenter:1-n,rotate:0},m.textPosAngle=(t.startangle+t.stopangle)/2,m.scale>=1)return m;v.push(m)}(p||d)&&(m=aIe(e,i,o,l,u),m.textPosAngle=(t.startangle+t.stopangle)/2,v.push(m)),(p||h)&&(m=oIe(e,i,o,l,u),m.textPosAngle=(t.startangle+t.stopangle)/2,v.push(m));for(var _=0,M=0,x=0;x<v.length;x++){var T=v[x].scale;if(M<T&&(M=T,_=x),!p&&M>=1)break}return v[_]}function ZWt(e,t){var r=e.startangle,i=e.stopangle;return r>t&&t>i||r<t&&t<i}function aIe(e,t,r,i,n){t=Math.max(0,t-2*cIe);var a=e.width/e.height,o=mIe(a,i,t,r);return{scale:o*2/e.height,rCenter:vIe(a,o/t),rotate:gIe(n)}}function oIe(e,t,r,i,n){t=Math.max(0,t-2*cIe);var a=e.height/e.width,o=mIe(a,i,t,r);return{scale:o*2/e.width,rCenter:vIe(a,o/t),rotate:gIe(n+Math.PI/2)}}function vIe(e,t){return Math.cos(t)-e*t}function gIe(e){return(180/Math.PI*e+720)%180-90}function mIe(e,t,r,i){var n=e+1/(2*Math.tan(t));return r*Math.min(1/(Math.sqrt(n*n+.5)+n),i/(Math.sqrt(e*e+i/2)+e))}function KWt(e,t){return e.v===t.vTotal&&!t.trace.hole?1:Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2)}function sIe(e,t){var r=t.pxmid[0],i=t.pxmid[1],n=e.width/2,a=e.height/2;return r<0&&(n*=-1),i<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:n+Math.abs(a)*(n>0?1:-1)/2,y:a/(1+r*r/(i*i)),outside:!0}}function JWt(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function yIe(e,t){var r=1,i=1,n,a=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,n=xIe(a),a.title.position.indexOf("top")!==-1?(o.y-=(1+n)*e.r,s.ty-=e.titleBox.height):a.title.position.indexOf("bottom")!==-1&&(o.y+=(1+n)*e.r);var l=QWt(e.r,e.trace.aspectratio),u=t.w*(a.domain.x[1]-a.domain.x[0])/2;return a.title.position.indexOf("left")!==-1?(u=u+l,o.x-=(1+n)*l,s.tx+=e.titleBox.width/2):a.title.position.indexOf("center")!==-1?u*=2:a.title.position.indexOf("right")!==-1&&(u=u+l,o.x+=(1+n)*l,s.tx-=e.titleBox.width/2),r=u/e.titleBox.width,i=NZ(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,i),tx:s.tx,ty:s.ty}}function QWt(e,t){return e/(t===void 0?1:t)}function NZ(e,t){var r=e.trace,i=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,i/2)}function xIe(e){var t=e.pull;if(!t)return 0;var r;if(kc.isArrayOrTypedArray(t))for(t=0,r=0;r<e.pull.length;r++)e.pull[r]>t&&(t=e.pull[r]);return t}function eYt(e,t){var r,i,n,a,o,s,l,u,c,f,h,d,p;function v(b,_){return b.pxmid[1]-_.pxmid[1]}function m(b,_){return _.pxmid[1]-b.pxmid[1]}function g(b,_){_||(_={});var M=_.labelExtraY+(i?_.yLabelMax:_.yLabelMin),x=i?b.yLabelMin:b.yLabelMax,T=i?b.yLabelMax:b.yLabelMin,A=b.cyFinal+o(b.px0[1],b.px1[1]),y=M-x,E,S,C,k,D,F;if(y*l>0&&(b.labelExtraY=y),!!kc.isArrayOrTypedArray(t.pull))for(S=0;S<f.length;S++)C=f[S],!(C===b||(Ln.castOption(t.pull,b.pts)||0)>=(Ln.castOption(t.pull,C.pts)||0))&&((b.pxmid[1]-C.pxmid[1])*l>0?(k=C.cyFinal+o(C.px0[1],C.px1[1]),y=k-x-b.labelExtraY,y*l>0&&(b.labelExtraY+=y)):(T+b.labelExtraY-A)*l>0&&(E=3*s*Math.abs(S-f.indexOf(b)),D=C.cxFinal+a(C.px0[0],C.px1[0]),F=D+E-(b.cxFinal+b.pxmid[0])-b.labelExtraX,F*s>0&&(b.labelExtraX+=F)))}for(i=0;i<2;i++)for(n=i?v:m,o=i?Math.max:Math.min,l=i?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,u=e[i][r],u.sort(n),c=e[1-i][r],f=c.concat(u),d=[],h=0;h<u.length;h++)u[h].yLabelMid!==void 0&&d.push(u[h]);for(p=!1,h=0;i&&h<c.length;h++)if(c[h].yLabelMid!==void 0){p=c[h];break}for(h=0;h<d.length;h++){var w=h&&d[h-1];p&&!h&&(w=p),g(d[h],w)}}}function _Ie(e,t){for(var r=[],i=0;i<e.length;i++){var n=e[i][0],a=n.trace,o=a.domain,s=t.w*(o.x[1]-o.x[0]),l=t.h*(o.y[1]-o.y[0]);a.title.text&&a.title.position!=="middle center"&&(l-=NZ(n,t));var u=s/2,c=l/2;a.type==="funnelarea"&&!a.scalegroup&&(c/=a.aspectratio),n.r=Math.min(u,c)/(1+xIe(a)),n.cx=t.l+t.w*(a.domain.x[1]+a.domain.x[0])/2,n.cy=t.t+t.h*(1-a.domain.y[0])-l/2,a.title.text&&a.title.position.indexOf("bottom")!==-1&&(n.cy-=NZ(n,t)),a.scalegroup&&r.indexOf(a.scalegroup)===-1&&r.push(a.scalegroup)}tYt(e,r)}function tYt(e,t){for(var r,i,n,a=0;a<t.length;a++){var o=1/0,s=t[a];for(i=0;i<e.length;i++)if(r=e[i][0],n=r.trace,n.scalegroup===s){var l;if(n.type==="pie")l=r.r*r.r;else if(n.type==="funnelarea"){var u,c;n.aspectratio>1?(u=r.r,c=u/n.aspectratio):(c=r.r,u=c*n.aspectratio),u*=(1+n.baseratio)/2,l=u*c}o=Math.min(o,l/r.vTotal)}for(i=0;i<e.length;i++)if(r=e[i][0],n=r.trace,n.scalegroup===s){var f=o*r.vTotal;n.type==="funnelarea"&&(f/=(1+n.baseratio)/2,f/=n.aspectratio),r.r=Math.sqrt(f)}}}function rYt(e){var t=e[0],r=t.r,i=t.trace,n=Ln.getRotationAngle(i.rotation),a=2*Math.PI/t.vTotal,o="px0",s="px1",l,u,c;if(i.direction==="counterclockwise"){for(l=0;l<e.length&&e[l].hidden;l++);if(l===e.length)return;n+=a*e[l].v,a*=-1,o="px1",s="px0"}for(c=NP(r,n),l=0;l<e.length;l++)u=e[l],!u.hidden&&(u[o]=c,u.startangle=n,n+=a*u.v/2,u.pxmid=NP(r,n),u.midangle=n,n+=a*u.v/2,c=NP(r,n),u.stopangle=n,u[s]=c,u.largeArc=u.v>t.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/t.vTotal,.5),u.ring=1-i.hole,u.rInscribed=KWt(u,t))}function NP(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function bIe(e,t,r){var i=e._fullLayout,n=r.trace,a=n.texttemplate,o=n.textinfo;if(!a&&o&&o!=="none"){var s=o.split("+"),l=function(_){return s.indexOf(_)!==-1},u=l("label"),c=l("text"),f=l("value"),h=l("percent"),d=i.separators,p;if(p=u?[t.label]:[],c){var v=Ln.getFirstFilled(n.text,t.pts);nIe(v)&&p.push(v)}f&&p.push(Ln.formatPieValue(t.v,d)),h&&p.push(Ln.formatPiePercent(t.v/r.vTotal,d)),t.text=p.join("<br>")}function m(_){return{label:_.label,value:_.v,valueLabel:Ln.formatPieValue(_.v,i.separators),percent:_.v/r.vTotal,percentLabel:Ln.formatPiePercent(_.v/r.vTotal,i.separators),color:_.color,text:_.text,customdata:kc.castOption(n,_.i,"customdata")}}if(a){var g=kc.castOption(n,t.i,"texttemplate");if(!g)t.text="";else{var w=m(t),b=Ln.getFirstFilled(n.text,t.pts);(nIe(b)||b==="")&&(w.text=b),t.text=kc.texttemplateString({data:[w,n._meta],fallback:n.texttemplatefallback,labels:w,locale:e._fullLayout._d3locale,template:g})}}}function wIe(e,t){var r=e.rotate*Math.PI/180,i=Math.cos(r),n=Math.sin(r),a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=a*i-o*n,e.textY=a*n+o*i,e.noCenter=!0}TIe.exports={plot:WWt,formatSliceLabel:bIe,transformInsideText:pIe,determineInsideTextFont:hIe,positionTitleOutside:yIe,prerenderTitles:dIe,layoutAreas:_Ie,attachFxHandlers:fIe,computeTransform:wIe}});var SIe=W((xUr,MIe)=>{"use strict";var AIe=vi(),iYt=Sw(),nYt=Qc().resizeText;MIe.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");nYt(t,r,"pie"),r.each(function(i){var n=i[0],a=n.trace,o=AIe.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){AIe.select(this).call(iYt,s,a,t)})})}});var kIe=W(o4=>{"use strict";var EIe=Ko();o4.name="pie";o4.plot=function(e,t,r,i){EIe.plotBasePlot(o4.name,e,t,r,i)};o4.clean=function(e,t,r,i){EIe.cleanBasePlot(o4.name,e,t,r,i)}});var DIe=W((bUr,CIe)=>{"use strict";CIe.exports={attributes:nb(),supplyDefaults:ab().supplyDefaults,supplyLayoutDefaults:KPe(),layoutAttributes:BP(),calc:a4().calc,crossTraceCalc:a4().crossTraceCalc,plot:UP().plot,style:SIe(),styleOne:Sw(),moduleType:"trace",name:"pie",basePlotModule:kIe(),categories:["pie-like","pie","showLegend"],meta:{}}});var LIe=W((wUr,FIe)=>{"use strict";FIe.exports=DIe()});var IIe=W(s4=>{"use strict";var PIe=Ko();s4.name="sunburst";s4.plot=function(e,t,r,i){PIe.plotBasePlot(s4.name,e,t,r,i)};s4.clean=function(e,t,r,i){PIe.cleanBasePlot(s4.name,e,t,r,i)}});var UZ=W((AUr,RIe)=>{"use strict";RIe.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}});var US=W((MUr,qIe)=>{"use strict";var aYt=Wa(),{hovertemplateAttrs:oYt,texttemplateAttrs:sYt,templatefallbackAttrs:zIe}=Ga(),lYt=Eo(),uYt=us().attributes,rm=nb(),BIe=UZ(),NS=tn().extendFlat,cYt=Du().pattern;qIe.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:NS({colors:{valType:"data_array",editType:"calc"},line:{color:NS({},rm.marker.line.color,{dflt:null}),width:NS({},rm.marker.line.width,{dflt:1}),editType:"calc"},pattern:cYt,editType:"calc"},lYt("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:rm.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:sYt({editType:"plot"},{keys:BIe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:zIe({editType:"plot"}),hovertext:rm.hovertext,hoverinfo:NS({},aYt.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:oYt({},{keys:BIe.eventDataKeys}),hovertemplatefallback:zIe(),textfont:rm.textfont,insidetextorientation:rm.insidetextorientation,insidetextfont:rm.insidetextfont,outsidetextfont:NS({},rm.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:rm.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:uYt({name:"sunburst",trace:!0,editType:"calc"})}});var VZ=W((SUr,OIe)=>{"use strict";OIe.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var GIe=W((EUr,VIe)=>{"use strict";var NIe=it(),fYt=US(),hYt=us().defaults,dYt=E0().handleText,pYt=ab().handleMarkerDefaults,UIe=Jo(),vYt=UIe.hasColorscale,gYt=UIe.handleDefaults;VIe.exports=function(t,r,i,n){function a(h,d){return NIe.coerce(t,r,fYt,h,d)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),pYt(t,r,n,a);var u=r._hasColorscale=vYt(t,"marker","colors")||(t.marker||{}).coloraxis;u&&gYt(t,r,n,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",u?1:.7);var c=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",NIe.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f="auto";dYt(t,r,n,a,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("insidetextorientation"),a("sort"),a("rotation"),a("root.color"),hYt(r,n,a),r._length=null}});var jIe=W((kUr,HIe)=>{"use strict";var mYt=it(),yYt=VZ();HIe.exports=function(t,r){function i(n,a){return mYt.coerce(t,r,yYt,n,a)}i("sunburstcolorway",r.colorway),i("extendsunburstcolors")}});var VS=W((VP,$Ie)=>{(function(e,t){typeof VP=="object"&&typeof $Ie!="undefined"?t(VP):(e=e||self,t(e.d3=e.d3||{}))})(VP,function(e){"use strict";function t(Ne,Ue){return Ne.parent===Ue.parent?1:2}function r(Ne){return Ne.reduce(i,0)/Ne.length}function i(Ne,Ue){return Ne+Ue.x}function n(Ne){return 1+Ne.reduce(a,0)}function a(Ne,Ue){return Math.max(Ne,Ue.y)}function o(Ne){for(var Ue;Ue=Ne.children;)Ne=Ue[0];return Ne}function s(Ne){for(var Ue;Ue=Ne.children;)Ne=Ue[Ue.length-1];return Ne}function l(){var Ne=t,Ue=1,Ge=1,je=!1;function Re(Ve){var ct,Tt=0;Ve.eachAfter(function(Bt){var Zt=Bt.children;Zt?(Bt.x=r(Zt),Bt.y=n(Zt)):(Bt.x=ct?Tt+=Ne(Bt,ct):0,Bt.y=0,ct=Bt)});var Xt=o(Ve),Vt=s(Ve),lr=Xt.x-Ne(Xt,Vt)/2,ur=Vt.x+Ne(Vt,Xt)/2;return Ve.eachAfter(je?function(Bt){Bt.x=(Bt.x-Ve.x)*Ue,Bt.y=(Ve.y-Bt.y)*Ge}:function(Bt){Bt.x=(Bt.x-lr)/(ur-lr)*Ue,Bt.y=(1-(Ve.y?Bt.y/Ve.y:1))*Ge})}return Re.separation=function(Ve){return arguments.length?(Ne=Ve,Re):Ne},Re.size=function(Ve){return arguments.length?(je=!1,Ue=+Ve[0],Ge=+Ve[1],Re):je?null:[Ue,Ge]},Re.nodeSize=function(Ve){return arguments.length?(je=!0,Ue=+Ve[0],Ge=+Ve[1],Re):je?[Ue,Ge]:null},Re}function u(Ne){var Ue=0,Ge=Ne.children,je=Ge&&Ge.length;if(!je)Ue=1;else for(;--je>=0;)Ue+=Ge[je].value;Ne.value=Ue}function c(){return this.eachAfter(u)}function f(Ne){var Ue=this,Ge,je=[Ue],Re,Ve,ct;do for(Ge=je.reverse(),je=[];Ue=Ge.pop();)if(Ne(Ue),Re=Ue.children,Re)for(Ve=0,ct=Re.length;Ve<ct;++Ve)je.push(Re[Ve]);while(je.length);return this}function h(Ne){for(var Ue=this,Ge=[Ue],je,Re;Ue=Ge.pop();)if(Ne(Ue),je=Ue.children,je)for(Re=je.length-1;Re>=0;--Re)Ge.push(je[Re]);return this}function d(Ne){for(var Ue=this,Ge=[Ue],je=[],Re,Ve,ct;Ue=Ge.pop();)if(je.push(Ue),Re=Ue.children,Re)for(Ve=0,ct=Re.length;Ve<ct;++Ve)Ge.push(Re[Ve]);for(;Ue=je.pop();)Ne(Ue);return this}function p(Ne){return this.eachAfter(function(Ue){for(var Ge=+Ne(Ue.data)||0,je=Ue.children,Re=je&&je.length;--Re>=0;)Ge+=je[Re].value;Ue.value=Ge})}function v(Ne){return this.eachBefore(function(Ue){Ue.children&&Ue.children.sort(Ne)})}function m(Ne){for(var Ue=this,Ge=g(Ue,Ne),je=[Ue];Ue!==Ge;)Ue=Ue.parent,je.push(Ue);for(var Re=je.length;Ne!==Ge;)je.splice(Re,0,Ne),Ne=Ne.parent;return je}function g(Ne,Ue){if(Ne===Ue)return Ne;var Ge=Ne.ancestors(),je=Ue.ancestors(),Re=null;for(Ne=Ge.pop(),Ue=je.pop();Ne===Ue;)Re=Ne,Ne=Ge.pop(),Ue=je.pop();return Re}function w(){for(var Ne=this,Ue=[Ne];Ne=Ne.parent;)Ue.push(Ne);return Ue}function b(){var Ne=[];return this.each(function(Ue){Ne.push(Ue)}),Ne}function _(){var Ne=[];return this.eachBefore(function(Ue){Ue.children||Ne.push(Ue)}),Ne}function M(){var Ne=this,Ue=[];return Ne.each(function(Ge){Ge!==Ne&&Ue.push({source:Ge.parent,target:Ge})}),Ue}function x(Ne,Ue){var Ge=new S(Ne),je=+Ne.value&&(Ge.value=Ne.value),Re,Ve=[Ge],ct,Tt,Xt,Vt;for(Ue==null&&(Ue=A);Re=Ve.pop();)if(je&&(Re.value=+Re.data.value),(Tt=Ue(Re.data))&&(Vt=Tt.length))for(Re.children=new Array(Vt),Xt=Vt-1;Xt>=0;--Xt)Ve.push(ct=Re.children[Xt]=new S(Tt[Xt])),ct.parent=Re,ct.depth=Re.depth+1;return Ge.eachBefore(E)}function T(){return x(this).eachBefore(y)}function A(Ne){return Ne.children}function y(Ne){Ne.data=Ne.data.data}function E(Ne){var Ue=0;do Ne.height=Ue;while((Ne=Ne.parent)&&Ne.height<++Ue)}function S(Ne){this.data=Ne,this.depth=this.height=0,this.parent=null}S.prototype=x.prototype={constructor:S,count:c,each:f,eachAfter:d,eachBefore:h,sum:p,sort:v,path:m,ancestors:w,descendants:b,leaves:_,links:M,copy:T};var C=Array.prototype.slice;function k(Ne){for(var Ue=Ne.length,Ge,je;Ue;)je=Math.random()*Ue--|0,Ge=Ne[Ue],Ne[Ue]=Ne[je],Ne[je]=Ge;return Ne}function D(Ne){for(var Ue=0,Ge=(Ne=k(C.call(Ne))).length,je=[],Re,Ve;Ue<Ge;)Re=Ne[Ue],Ve&&R(Ve,Re)?++Ue:(Ve=I(je=F(je,Re)),Ue=0);return Ve}function F(Ne,Ue){var Ge,je;if(L(Ue,Ne))return[Ue];for(Ge=0;Ge<Ne.length;++Ge)if(P(Ue,Ne[Ge])&&L(O(Ne[Ge],Ue),Ne))return[Ne[Ge],Ue];for(Ge=0;Ge<Ne.length-1;++Ge)for(je=Ge+1;je<Ne.length;++je)if(P(O(Ne[Ge],Ne[je]),Ue)&&P(O(Ne[Ge],Ue),Ne[je])&&P(O(Ne[je],Ue),Ne[Ge])&&L($(Ne[Ge],Ne[je],Ue),Ne))return[Ne[Ge],Ne[je],Ue];throw new Error}function P(Ne,Ue){var Ge=Ne.r-Ue.r,je=Ue.x-Ne.x,Re=Ue.y-Ne.y;return Ge<0||Ge*Ge<je*je+Re*Re}function R(Ne,Ue){var Ge=Ne.r-Ue.r+1e-6,je=Ue.x-Ne.x,Re=Ue.y-Ne.y;return Ge>0&&Ge*Ge>je*je+Re*Re}function L(Ne,Ue){for(var Ge=0;Ge<Ue.length;++Ge)if(!R(Ne,Ue[Ge]))return!1;return!0}function I(Ne){switch(Ne.length){case 1:return B(Ne[0]);case 2:return O(Ne[0],Ne[1]);case 3:return $(Ne[0],Ne[1],Ne[2])}}function B(Ne){return{x:Ne.x,y:Ne.y,r:Ne.r}}function O(Ne,Ue){var Ge=Ne.x,je=Ne.y,Re=Ne.r,Ve=Ue.x,ct=Ue.y,Tt=Ue.r,Xt=Ve-Ge,Vt=ct-je,lr=Tt-Re,ur=Math.sqrt(Xt*Xt+Vt*Vt);return{x:(Ge+Ve+Xt/ur*lr)/2,y:(je+ct+Vt/ur*lr)/2,r:(ur+Re+Tt)/2}}function $(Ne,Ue,Ge){var je=Ne.x,Re=Ne.y,Ve=Ne.r,ct=Ue.x,Tt=Ue.y,Xt=Ue.r,Vt=Ge.x,lr=Ge.y,ur=Ge.r,Bt=je-ct,Zt=je-Vt,kr=Re-Tt,$e=Re-lr,tt=Xt-Ve,st=ur-Ve,xt=je*je+Re*Re-Ve*Ve,Je=xt-ct*ct-Tt*Tt+Xt*Xt,Ct=xt-Vt*Vt-lr*lr+ur*ur,ir=Zt*kr-Bt*$e,hr=(kr*Ct-$e*Je)/(ir*2)-je,Ur=($e*tt-kr*st)/ir,si=(Zt*Je-Bt*Ct)/(ir*2)-Re,ei=(Bt*st-Zt*tt)/ir,Lr=Ur*Ur+ei*ei-1,$i=2*(Ve+hr*Ur+si*ei),Tn=hr*hr+si*si-Ve*Ve,hn=-(Lr?($i+Math.sqrt($i*$i-4*Lr*Tn))/(2*Lr):Tn/$i);return{x:je+hr+Ur*hn,y:Re+si+ei*hn,r:hn}}function Y(Ne,Ue,Ge){var je=Ne.x-Ue.x,Re,Ve,ct=Ne.y-Ue.y,Tt,Xt,Vt=je*je+ct*ct;Vt?(Ve=Ue.r+Ge.r,Ve*=Ve,Xt=Ne.r+Ge.r,Xt*=Xt,Ve>Xt?(Re=(Vt+Xt-Ve)/(2*Vt),Tt=Math.sqrt(Math.max(0,Xt/Vt-Re*Re)),Ge.x=Ne.x-Re*je-Tt*ct,Ge.y=Ne.y-Re*ct+Tt*je):(Re=(Vt+Ve-Xt)/(2*Vt),Tt=Math.sqrt(Math.max(0,Ve/Vt-Re*Re)),Ge.x=Ue.x+Re*je-Tt*ct,Ge.y=Ue.y+Re*ct+Tt*je)):(Ge.x=Ue.x+Ge.r,Ge.y=Ue.y)}function K(Ne,Ue){var Ge=Ne.r+Ue.r-1e-6,je=Ue.x-Ne.x,Re=Ue.y-Ne.y;return Ge>0&&Ge*Ge>je*je+Re*Re}function j(Ne){var Ue=Ne._,Ge=Ne.next._,je=Ue.r+Ge.r,Re=(Ue.x*Ge.r+Ge.x*Ue.r)/je,Ve=(Ue.y*Ge.r+Ge.y*Ue.r)/je;return Re*Re+Ve*Ve}function q(Ne){this._=Ne,this.next=null,this.previous=null}function J(Ne){if(!(Re=Ne.length))return 0;var Ue,Ge,je,Re,Ve,ct,Tt,Xt,Vt,lr,ur;if(Ue=Ne[0],Ue.x=0,Ue.y=0,!(Re>1))return Ue.r;if(Ge=Ne[1],Ue.x=-Ge.r,Ge.x=Ue.r,Ge.y=0,!(Re>2))return Ue.r+Ge.r;Y(Ge,Ue,je=Ne[2]),Ue=new q(Ue),Ge=new q(Ge),je=new q(je),Ue.next=je.previous=Ge,Ge.next=Ue.previous=je,je.next=Ge.previous=Ue;e:for(Tt=3;Tt<Re;++Tt){Y(Ue._,Ge._,je=Ne[Tt]),je=new q(je),Xt=Ge.next,Vt=Ue.previous,lr=Ge._.r,ur=Ue._.r;do if(lr<=ur){if(K(Xt._,je._)){Ge=Xt,Ue.next=Ge,Ge.previous=Ue,--Tt;continue e}lr+=Xt._.r,Xt=Xt.next}else{if(K(Vt._,je._)){Ue=Vt,Ue.next=Ge,Ge.previous=Ue,--Tt;continue e}ur+=Vt._.r,Vt=Vt.previous}while(Xt!==Vt.next);for(je.previous=Ue,je.next=Ge,Ue.next=Ge.previous=Ge=je,Ve=j(Ue);(je=je.next)!==Ge;)(ct=j(je))<Ve&&(Ue=je,Ve=ct);Ge=Ue.next}for(Ue=[Ge._],je=Ge;(je=je.next)!==Ge;)Ue.push(je._);for(je=D(Ue),Tt=0;Tt<Re;++Tt)Ue=Ne[Tt],Ue.x-=je.x,Ue.y-=je.y;return je.r}function U(Ne){return J(Ne),Ne}function V(Ne){return Ne==null?null:X(Ne)}function X(Ne){if(typeof Ne!="function")throw new Error;return Ne}function H(){return 0}function G(Ne){return function(){return Ne}}function Q(Ne){return Math.sqrt(Ne.value)}function te(){var Ne=null,Ue=1,Ge=1,je=H;function Re(Ve){return Ve.x=Ue/2,Ve.y=Ge/2,Ne?Ve.eachBefore(ce(Ne)).eachAfter(ge(je,.5)).eachBefore(Ce(1)):Ve.eachBefore(ce(Q)).eachAfter(ge(H,1)).eachAfter(ge(je,Ve.r/Math.min(Ue,Ge))).eachBefore(Ce(Math.min(Ue,Ge)/(2*Ve.r))),Ve}return Re.radius=function(Ve){return arguments.length?(Ne=V(Ve),Re):Ne},Re.size=function(Ve){return arguments.length?(Ue=+Ve[0],Ge=+Ve[1],Re):[Ue,Ge]},Re.padding=function(Ve){return arguments.length?(je=typeof Ve=="function"?Ve:G(+Ve),Re):je},Re}function ce(Ne){return function(Ue){Ue.children||(Ue.r=Math.max(0,+Ne(Ue)||0))}}function ge(Ne,Ue){return function(Ge){if(je=Ge.children){var je,Re,Ve=je.length,ct=Ne(Ge)*Ue||0,Tt;if(ct)for(Re=0;Re<Ve;++Re)je[Re].r+=ct;if(Tt=J(je),ct)for(Re=0;Re<Ve;++Re)je[Re].r-=ct;Ge.r=Tt+ct}}}function Ce(Ne){return function(Ue){var Ge=Ue.parent;Ue.r*=Ne,Ge&&(Ue.x=Ge.x+Ne*Ue.x,Ue.y=Ge.y+Ne*Ue.y)}}function be(Ne){Ne.x0=Math.round(Ne.x0),Ne.y0=Math.round(Ne.y0),Ne.x1=Math.round(Ne.x1),Ne.y1=Math.round(Ne.y1)}function he(Ne,Ue,Ge,je,Re){for(var Ve=Ne.children,ct,Tt=-1,Xt=Ve.length,Vt=Ne.value&&(je-Ue)/Ne.value;++Tt<Xt;)ct=Ve[Tt],ct.y0=Ge,ct.y1=Re,ct.x0=Ue,ct.x1=Ue+=ct.value*Vt}function oe(){var Ne=1,Ue=1,Ge=0,je=!1;function Re(ct){var Tt=ct.height+1;return ct.x0=ct.y0=Ge,ct.x1=Ne,ct.y1=Ue/Tt,ct.eachBefore(Ve(Ue,Tt)),je&&ct.eachBefore(be),ct}function Ve(ct,Tt){return function(Xt){Xt.children&&he(Xt,Xt.x0,ct*(Xt.depth+1)/Tt,Xt.x1,ct*(Xt.depth+2)/Tt);var Vt=Xt.x0,lr=Xt.y0,ur=Xt.x1-Ge,Bt=Xt.y1-Ge;ur<Vt&&(Vt=ur=(Vt+ur)/2),Bt<lr&&(lr=Bt=(lr+Bt)/2),Xt.x0=Vt,Xt.y0=lr,Xt.x1=ur,Xt.y1=Bt}}return Re.round=function(ct){return arguments.length?(je=!!ct,Re):je},Re.size=function(ct){return arguments.length?(Ne=+ct[0],Ue=+ct[1],Re):[Ne,Ue]},Re.padding=function(ct){return arguments.length?(Ge=+ct,Re):Ge},Re}var Ee="$",ye={depth:-1},ue={};function ee(Ne){return Ne.id}function ae(Ne){return Ne.parentId}function xe(){var Ne=ee,Ue=ae;function Ge(je){var Re,Ve,ct=je.length,Tt,Xt,Vt,lr=new Array(ct),ur,Bt,Zt={};for(Ve=0;Ve<ct;++Ve)Re=je[Ve],Vt=lr[Ve]=new S(Re),(ur=Ne(Re,Ve,je))!=null&&(ur+="")&&(Bt=Ee+(Vt.id=ur),Zt[Bt]=Bt in Zt?ue:Vt);for(Ve=0;Ve<ct;++Ve)if(Vt=lr[Ve],ur=Ue(je[Ve],Ve,je),ur==null||!(ur+="")){if(Tt)throw new Error("multiple roots");Tt=Vt}else{if(Xt=Zt[Ee+ur],!Xt)throw new Error("missing: "+ur);if(Xt===ue)throw new Error("ambiguous: "+ur);Xt.children?Xt.children.push(Vt):Xt.children=[Vt],Vt.parent=Xt}if(!Tt)throw new Error("no root");if(Tt.parent=ye,Tt.eachBefore(function(kr){kr.depth=kr.parent.depth+1,--ct}).eachBefore(E),Tt.parent=null,ct>0)throw new Error("cycle");return Tt}return Ge.id=function(je){return arguments.length?(Ne=X(je),Ge):Ne},Ge.parentId=function(je){return arguments.length?(Ue=X(je),Ge):Ue},Ge}function re(Ne,Ue){return Ne.parent===Ue.parent?1:2}function pe(Ne){var Ue=Ne.children;return Ue?Ue[0]:Ne.t}function we(Ne){var Ue=Ne.children;return Ue?Ue[Ue.length-1]:Ne.t}function Fe(Ne,Ue,Ge){var je=Ge/(Ue.i-Ne.i);Ue.c-=je,Ue.s+=Ge,Ne.c+=je,Ue.z+=Ge,Ue.m+=Ge}function Se(Ne){for(var Ue=0,Ge=0,je=Ne.children,Re=je.length,Ve;--Re>=0;)Ve=je[Re],Ve.z+=Ue,Ve.m+=Ue,Ue+=Ve.s+(Ge+=Ve.c)}function ke(Ne,Ue,Ge){return Ne.a.parent===Ue.parent?Ne.a:Ge}function _e(Ne,Ue){this._=Ne,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=Ue}_e.prototype=Object.create(S.prototype);function Ie(Ne){for(var Ue=new _e(Ne,0),Ge,je=[Ue],Re,Ve,ct,Tt;Ge=je.pop();)if(Ve=Ge._.children)for(Ge.children=new Array(Tt=Ve.length),ct=Tt-1;ct>=0;--ct)je.push(Re=Ge.children[ct]=new _e(Ve[ct],ct)),Re.parent=Ge;return(Ue.parent=new _e(null,0)).children=[Ue],Ue}function Oe(){var Ne=re,Ue=1,Ge=1,je=null;function Re(Vt){var lr=Ie(Vt);if(lr.eachAfter(Ve),lr.parent.m=-lr.z,lr.eachBefore(ct),je)Vt.eachBefore(Xt);else{var ur=Vt,Bt=Vt,Zt=Vt;Vt.eachBefore(function(xt){xt.x<ur.x&&(ur=xt),xt.x>Bt.x&&(Bt=xt),xt.depth>Zt.depth&&(Zt=xt)});var kr=ur===Bt?1:Ne(ur,Bt)/2,$e=kr-ur.x,tt=Ue/(Bt.x+kr+$e),st=Ge/(Zt.depth||1);Vt.eachBefore(function(xt){xt.x=(xt.x+$e)*tt,xt.y=xt.depth*st})}return Vt}function Ve(Vt){var lr=Vt.children,ur=Vt.parent.children,Bt=Vt.i?ur[Vt.i-1]:null;if(lr){Se(Vt);var Zt=(lr[0].z+lr[lr.length-1].z)/2;Bt?(Vt.z=Bt.z+Ne(Vt._,Bt._),Vt.m=Vt.z-Zt):Vt.z=Zt}else Bt&&(Vt.z=Bt.z+Ne(Vt._,Bt._));Vt.parent.A=Tt(Vt,Bt,Vt.parent.A||ur[0])}function ct(Vt){Vt._.x=Vt.z+Vt.parent.m,Vt.m+=Vt.parent.m}function Tt(Vt,lr,ur){if(lr){for(var Bt=Vt,Zt=Vt,kr=lr,$e=Bt.parent.children[0],tt=Bt.m,st=Zt.m,xt=kr.m,Je=$e.m,Ct;kr=we(kr),Bt=pe(Bt),kr&&Bt;)$e=pe($e),Zt=we(Zt),Zt.a=Vt,Ct=kr.z+xt-Bt.z-tt+Ne(kr._,Bt._),Ct>0&&(Fe(ke(kr,Vt,ur),Vt,Ct),tt+=Ct,st+=Ct),xt+=kr.m,tt+=Bt.m,Je+=$e.m,st+=Zt.m;kr&&!we(Zt)&&(Zt.t=kr,Zt.m+=xt-st),Bt&&!pe($e)&&($e.t=Bt,$e.m+=tt-Je,ur=Vt)}return ur}function Xt(Vt){Vt.x*=Ue,Vt.y=Vt.depth*Ge}return Re.separation=function(Vt){return arguments.length?(Ne=Vt,Re):Ne},Re.size=function(Vt){return arguments.length?(je=!1,Ue=+Vt[0],Ge=+Vt[1],Re):je?null:[Ue,Ge]},Re.nodeSize=function(Vt){return arguments.length?(je=!0,Ue=+Vt[0],Ge=+Vt[1],Re):je?[Ue,Ge]:null},Re}function Qe(Ne,Ue,Ge,je,Re){for(var Ve=Ne.children,ct,Tt=-1,Xt=Ve.length,Vt=Ne.value&&(Re-Ge)/Ne.value;++Tt<Xt;)ct=Ve[Tt],ct.x0=Ue,ct.x1=je,ct.y0=Ge,ct.y1=Ge+=ct.value*Vt}var et=(1+Math.sqrt(5))/2;function _t(Ne,Ue,Ge,je,Re,Ve){for(var ct=[],Tt=Ue.children,Xt,Vt,lr=0,ur=0,Bt=Tt.length,Zt,kr,$e=Ue.value,tt,st,xt,Je,Ct,ir,hr;lr<Bt;){Zt=Re-Ge,kr=Ve-je;do tt=Tt[ur++].value;while(!tt&&ur<Bt);for(st=xt=tt,ir=Math.max(kr/Zt,Zt/kr)/($e*Ne),hr=tt*tt*ir,Ct=Math.max(xt/hr,hr/st);ur<Bt;++ur){if(tt+=Vt=Tt[ur].value,Vt<st&&(st=Vt),Vt>xt&&(xt=Vt),hr=tt*tt*ir,Je=Math.max(xt/hr,hr/st),Je>Ct){tt-=Vt;break}Ct=Je}ct.push(Xt={value:tt,dice:Zt<kr,children:Tt.slice(lr,ur)}),Xt.dice?he(Xt,Ge,je,Re,$e?je+=kr*tt/$e:Ve):Qe(Xt,Ge,je,$e?Ge+=Zt*tt/$e:Re,Ve),$e-=tt,lr=ur}return ct}var ut=(function Ne(Ue){function Ge(je,Re,Ve,ct,Tt){_t(Ue,je,Re,Ve,ct,Tt)}return Ge.ratio=function(je){return Ne((je=+je)>1?je:1)},Ge})(et);function vt(){var Ne=ut,Ue=!1,Ge=1,je=1,Re=[0],Ve=H,ct=H,Tt=H,Xt=H,Vt=H;function lr(Bt){return Bt.x0=Bt.y0=0,Bt.x1=Ge,Bt.y1=je,Bt.eachBefore(ur),Re=[0],Ue&&Bt.eachBefore(be),Bt}function ur(Bt){var Zt=Re[Bt.depth],kr=Bt.x0+Zt,$e=Bt.y0+Zt,tt=Bt.x1-Zt,st=Bt.y1-Zt;tt<kr&&(kr=tt=(kr+tt)/2),st<$e&&($e=st=($e+st)/2),Bt.x0=kr,Bt.y0=$e,Bt.x1=tt,Bt.y1=st,Bt.children&&(Zt=Re[Bt.depth+1]=Ve(Bt)/2,kr+=Vt(Bt)-Zt,$e+=ct(Bt)-Zt,tt-=Tt(Bt)-Zt,st-=Xt(Bt)-Zt,tt<kr&&(kr=tt=(kr+tt)/2),st<$e&&($e=st=($e+st)/2),Ne(Bt,kr,$e,tt,st))}return lr.round=function(Bt){return arguments.length?(Ue=!!Bt,lr):Ue},lr.size=function(Bt){return arguments.length?(Ge=+Bt[0],je=+Bt[1],lr):[Ge,je]},lr.tile=function(Bt){return arguments.length?(Ne=X(Bt),lr):Ne},lr.padding=function(Bt){return arguments.length?lr.paddingInner(Bt).paddingOuter(Bt):lr.paddingInner()},lr.paddingInner=function(Bt){return arguments.length?(Ve=typeof Bt=="function"?Bt:G(+Bt),lr):Ve},lr.paddingOuter=function(Bt){return arguments.length?lr.paddingTop(Bt).paddingRight(Bt).paddingBottom(Bt).paddingLeft(Bt):lr.paddingTop()},lr.paddingTop=function(Bt){return arguments.length?(ct=typeof Bt=="function"?Bt:G(+Bt),lr):ct},lr.paddingRight=function(Bt){return arguments.length?(Tt=typeof Bt=="function"?Bt:G(+Bt),lr):Tt},lr.paddingBottom=function(Bt){return arguments.length?(Xt=typeof Bt=="function"?Bt:G(+Bt),lr):Xt},lr.paddingLeft=function(Bt){return arguments.length?(Vt=typeof Bt=="function"?Bt:G(+Bt),lr):Vt},lr}function Xe(Ne,Ue,Ge,je,Re){var Ve=Ne.children,ct,Tt=Ve.length,Xt,Vt=new Array(Tt+1);for(Vt[0]=Xt=ct=0;ct<Tt;++ct)Vt[ct+1]=Xt+=Ve[ct].value;lr(0,Tt,Ne.value,Ue,Ge,je,Re);function lr(ur,Bt,Zt,kr,$e,tt,st){if(ur>=Bt-1){var xt=Ve[ur];xt.x0=kr,xt.y0=$e,xt.x1=tt,xt.y1=st;return}for(var Je=Vt[ur],Ct=Zt/2+Je,ir=ur+1,hr=Bt-1;ir<hr;){var Ur=ir+hr>>>1;Vt[Ur]<Ct?ir=Ur+1:hr=Ur}Ct-Vt[ir-1]<Vt[ir]-Ct&&ur+1<ir&&--ir;var si=Vt[ir]-Je,ei=Zt-si;if(tt-kr>st-$e){var Lr=(kr*ei+tt*si)/Zt;lr(ur,ir,si,kr,$e,Lr,st),lr(ir,Bt,ei,Lr,$e,tt,st)}else{var $i=($e*ei+st*si)/Zt;lr(ur,ir,si,kr,$e,tt,$i),lr(ir,Bt,ei,kr,$i,tt,st)}}}function mt(Ne,Ue,Ge,je,Re){(Ne.depth&1?Qe:he)(Ne,Ue,Ge,je,Re)}var bt=(function Ne(Ue){function Ge(je,Re,Ve,ct,Tt){if((Xt=je._squarify)&&Xt.ratio===Ue)for(var Xt,Vt,lr,ur,Bt=-1,Zt,kr=Xt.length,$e=je.value;++Bt<kr;){for(Vt=Xt[Bt],lr=Vt.children,ur=Vt.value=0,Zt=lr.length;ur<Zt;++ur)Vt.value+=lr[ur].value;Vt.dice?he(Vt,Re,Ve,ct,Ve+=(Tt-Ve)*Vt.value/$e):Qe(Vt,Re,Ve,Re+=(ct-Re)*Vt.value/$e,Tt),$e-=Vt.value}else je._squarify=Xt=_t(Ue,je,Re,Ve,ct,Tt),Xt.ratio=Ue}return Ge.ratio=function(je){return Ne((je=+je)>1?je:1)},Ge})(et);e.cluster=l,e.hierarchy=x,e.pack=te,e.packEnclose=D,e.packSiblings=U,e.partition=oe,e.stratify=xe,e.tree=Oe,e.treemap=vt,e.treemapBinary=Xe,e.treemapDice=he,e.treemapResquarify=bt,e.treemapSlice=Qe,e.treemapSliceDice=mt,e.treemapSquarify=ut,Object.defineProperty(e,"__esModule",{value:!0})})});var HS=W(GS=>{"use strict";var WIe=VS(),xYt=sn(),l4=it(),_Yt=Jo().makeColorScaleFuncFromTrace,bYt=a4().makePullColorFn,wYt=a4().generateExtendedColors,TYt=Jo().calc,AYt=Kn().ALMOST_EQUAL,MYt={},SYt={},EYt={};GS.calc=function(e,t){var r=e._fullLayout,i=t.ids,n=l4.isArrayOrTypedArray(i),a=t.labels,o=t.parents,s=t.values,l=l4.isArrayOrTypedArray(s),u=[],c={},f={},h=function(R,L){c[R]?c[R].push(L):c[R]=[L],f[L]=1},d=function(R){return R||typeof R=="number"},p=function(R){return!l||xYt(s[R])&&s[R]>=0},v,m,g;n?(v=Math.min(i.length,o.length),m=function(R){return d(i[R])&&p(R)},g=function(R){return String(i[R])}):(v=Math.min(a.length,o.length),m=function(R){return d(a[R])&&p(R)},g=function(R){return String(a[R])}),l&&(v=Math.min(v,s.length));for(var w=0;w<v;w++)if(m(w)){var b=g(w),_=d(o[w])?String(o[w]):"",M={i:w,id:b,pid:_,label:d(a[w])?String(a[w]):""};l&&(M.v=+s[w]),u.push(M),h(_,b)}if(c[""]){if(c[""].length>1){for(var A=l4.randstr(),y=0;y<u.length;y++)u[y].pid===""&&(u[y].pid=A);u.unshift({hasMultipleRoots:!0,id:A,pid:"",label:""})}}else{var x=[],T;for(T in c)f[T]||x.push(T);if(x.length===1)T=x[0],u.unshift({hasImpliedRoot:!0,id:T,pid:"",label:T});else return l4.warn(["Multiple implied roots, cannot build",t.type,"hierarchy of",t.name+".","These roots include:",x.join(", ")].join(" "))}var E;try{E=WIe.stratify().id(function(R){return R.id}).parentId(function(R){return R.pid})(u)}catch(R){return l4.warn(["Failed to build",t.type,"hierarchy of",t.name+".","Error:",R.message].join(" "))}var S=WIe.hierarchy(E),C=!1;if(l)switch(t.branchvalues){case"remainder":S.sum(function(R){return R.data.v});break;case"total":S.each(function(R){var L=R.data.data,I=L.v;if(R.children){var B=R.children.reduce(function(O,$){return O+$.data.data.v},0);if((L.hasImpliedRoot||L.hasMultipleRoots)&&(I=B),I<B*AYt)return C=!0,l4.warn(["Total value for node",R.data.data.id,"of",t.name,"is smaller than the sum of its children.",`
parent value =`,I,`
children sum =`,B].join(" "))}R.value=I});break}else YIe(S,t,{branches:t.count.indexOf("branches")!==-1,leaves:t.count.indexOf("leaves")!==-1});if(!C){t.sort&&S.sort(function(R,L){return L.value-R.value});var k,D,F=t.marker.colors||[],P=!!F.length;return t._hasColorscale?(P||(F=l?t.values:t._values),TYt(e,t,{vals:F,containerStr:"marker",cLetter:"c"}),D=_Yt(t.marker)):k=bYt(r["_"+t.type+"colormap"]),S.each(function(R){var L=R.data.data;L.color=t._hasColorscale?D(F[L.i]):k(F[L.i],L.id)}),u[0].hierarchy=S,u}};GS._runCrossTraceCalc=function(e,t){var r=t._fullLayout,i=t.calcdata,n=r[e+"colorway"],a=r["_"+e+"colormap"];r["extend"+e+"colors"]&&(n=wYt(n,e==="icicle"?EYt:e==="treemap"?SYt:MYt));var o=0,s;function l(h){var d=h.data.data,p=d.id;d.color===!1&&(a[p]?d.color=a[p]:h.parent?h.parent.parent?d.color=h.parent.data.data.color:(a[p]=d.color=n[o%n.length],o++):d.color=s)}for(var u=0;u<i.length;u++){var c=i[u],f=c[0];f.trace.type===e&&f.hierarchy&&(s=f.trace.root.color,f.hierarchy.each(l))}};GS.crossTraceCalc=function(e){return GS._runCrossTraceCalc("sunburst",e)};function YIe(e,t,r){var i=0,n=e.children;if(n){for(var a=n.length,o=0;o<a;o++)i+=YIe(n[o],t,r);r.branches&&i++}else r.leaves&&i++;return e.value=e.data.data.value=i,t._values||(t._values=[]),t._values[e.data.data.i]=i,i}});function im(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function p2(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}var GP=Ea(()=>{});function I1(){}function ZIe(){return this.rgb().formatHex()}function RYt(){return this.rgb().formatHex8()}function zYt(){return iRe(this).formatHsl()}function KIe(){return this.rgb().formatRgb()}function g2(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=kYt.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?JIe(t):r===3?new Bu(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?HP(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?HP(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=CYt.exec(e))?new Bu(t[1],t[2],t[3],1):(t=DYt.exec(e))?new Bu(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=FYt.exec(e))?HP(t[1],t[2],t[3],t[4]):(t=LYt.exec(e))?HP(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=PYt.exec(e))?tRe(t[1],t[2]/100,t[3]/100,1):(t=IYt.exec(e))?tRe(t[1],t[2]/100,t[3]/100,t[4]):XIe.hasOwnProperty(e)?JIe(XIe[e]):e==="transparent"?new Bu(NaN,NaN,NaN,0):null}function JIe(e){return new Bu(e>>16&255,e>>8&255,e&255,1)}function HP(e,t,r,i){return i<=0&&(e=t=r=NaN),new Bu(e,t,r,i)}function $S(e){return e instanceof I1||(e=g2(e)),e?(e=e.rgb(),new Bu(e.r,e.g,e.b,e.opacity)):new Bu}function c4(e,t,r,i){return arguments.length===1?$S(e):new Bu(e,t,r,i==null?1:i)}function Bu(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}function QIe(){return`#${ob(this.r)}${ob(this.g)}${ob(this.b)}`}function BYt(){return`#${ob(this.r)}${ob(this.g)}${ob(this.b)}${ob((isNaN(this.opacity)?1:this.opacity)*255)}`}function eRe(){let e=$P(this.opacity);return`${e===1?"rgb(":"rgba("}${sb(this.r)}, ${sb(this.g)}, ${sb(this.b)}${e===1?")":`, ${e})`}`}function $P(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function sb(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ob(e){return e=sb(e),(e<16?"0":"")+e.toString(16)}function tRe(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new lv(e,t,r,i)}function iRe(e){if(e instanceof lv)return new lv(e.h,e.s,e.l,e.opacity);if(e instanceof I1||(e=g2(e)),!e)return new lv;if(e instanceof lv)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,s=a-n,l=(a+n)/2;return s?(t===a?o=(r-i)/s+(r<i)*6:r===a?o=(i-t)/s+2:o=(t-r)/s+4,s/=l<.5?a+n:2-a-n,o*=60):s=l>0&&l<1?0:o,new lv(o,s,l,e.opacity)}function WS(e,t,r,i){return arguments.length===1?iRe(e):new lv(e,t,r,i==null?1:i)}function lv(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}function rRe(e){return e=(e||0)%360,e<0?e+360:e}function jP(e){return Math.max(0,Math.min(1,e||0))}function GZ(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var v2,lb,u4,jS,P1,kYt,CYt,DYt,FYt,LYt,PYt,IYt,XIe,WP=Ea(()=>{GP();v2=.7,lb=1/v2,u4="\\s*([+-]?\\d+)\\s*",jS="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",P1="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kYt=/^#([0-9a-f]{3,8})$/,CYt=new RegExp(`^rgb\\(${u4},${u4},${u4}\\)$`),DYt=new RegExp(`^rgb\\(${P1},${P1},${P1}\\)$`),FYt=new RegExp(`^rgba\\(${u4},${u4},${u4},${jS}\\)$`),LYt=new RegExp(`^rgba\\(${P1},${P1},${P1},${jS}\\)$`),PYt=new RegExp(`^hsl\\(${jS},${P1},${P1}\\)$`),IYt=new RegExp(`^hsla\\(${jS},${P1},${P1},${jS}\\)$`),XIe={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};im(I1,g2,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ZIe,formatHex:ZIe,formatHex8:RYt,formatHsl:zYt,formatRgb:KIe,toString:KIe});im(Bu,c4,p2(I1,{brighter(e){return e=e==null?lb:Math.pow(lb,e),new Bu(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?v2:Math.pow(v2,e),new Bu(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Bu(sb(this.r),sb(this.g),sb(this.b),$P(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:QIe,formatHex:QIe,formatHex8:BYt,formatRgb:eRe,toString:eRe}));im(lv,WS,p2(I1,{brighter(e){return e=e==null?lb:Math.pow(lb,e),new lv(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?v2:Math.pow(v2,e),new lv(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Bu(GZ(e>=240?e-240:e+120,n,i),GZ(e,n,i),GZ(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new lv(rRe(this.h),jP(this.s),jP(this.l),$P(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=$P(this.opacity);return`${e===1?"hsl(":"hsla("}${rRe(this.h)}, ${jP(this.s)*100}%, ${jP(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var YP,XP,HZ=Ea(()=>{YP=Math.PI/180,XP=180/Math.PI});function uRe(e){if(e instanceof R1)return new R1(e.l,e.a,e.b,e.opacity);if(e instanceof nm)return cRe(e);e instanceof Bu||(e=$S(e));var t=YZ(e.r),r=YZ(e.g),i=YZ(e.b),n=jZ((.2225045*t+.7168786*r+.0606169*i)/aRe),a,o;return t===r&&r===i?a=o=n:(a=jZ((.4360747*t+.3850649*r+.1430804*i)/nRe),o=jZ((.0139322*t+.0971045*r+.7141733*i)/oRe)),new R1(116*n-16,500*(a-n),200*(n-o),e.opacity)}function h4(e,t,r,i){return arguments.length===1?uRe(e):new R1(e,t,r,i==null?1:i)}function R1(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}function jZ(e){return e>qYt?Math.pow(e,1/3):e/lRe+sRe}function $Z(e){return e>f4?e*e*e:lRe*(e-sRe)}function WZ(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function YZ(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function OYt(e){if(e instanceof nm)return new nm(e.h,e.c,e.l,e.opacity);if(e instanceof R1||(e=uRe(e)),e.a===0&&e.b===0)return new nm(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*XP;return new nm(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function YS(e,t,r,i){return arguments.length===1?OYt(e):new nm(e,t,r,i==null?1:i)}function nm(e,t,r,i){this.h=+e,this.c=+t,this.l=+r,this.opacity=+i}function cRe(e){if(isNaN(e.h))return new R1(e.l,0,0,e.opacity);var t=e.h*YP;return new R1(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}var ZP,nRe,aRe,oRe,sRe,f4,lRe,qYt,fRe=Ea(()=>{GP();WP();HZ();ZP=18,nRe=.96422,aRe=1,oRe=.82521,sRe=4/29,f4=6/29,lRe=3*f4*f4,qYt=f4*f4*f4;im(R1,h4,p2(I1,{brighter(e){return new R1(this.l+ZP*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new R1(this.l-ZP*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=nRe*$Z(t),e=aRe*$Z(e),r=oRe*$Z(r),new Bu(WZ(3.1338561*t-1.6168667*e-.4906146*r),WZ(-.9787684*t+1.9161415*e+.033454*r),WZ(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));im(nm,YS,p2(I1,{brighter(e){return new nm(this.h,this.c,this.l+ZP*(e==null?1:e),this.opacity)},darker(e){return new nm(this.h,this.c,this.l-ZP*(e==null?1:e),this.opacity)},rgb(){return cRe(this).rgb()}}))});function NYt(e){if(e instanceof ub)return new ub(e.h,e.s,e.l,e.opacity);e instanceof Bu||(e=$S(e));var t=e.r/255,r=e.g/255,i=e.b/255,n=(pRe*i+hRe*t-dRe*r)/(pRe+hRe-dRe),a=i-n,o=(XS*(r-n)-ZZ*a)/KP,s=Math.sqrt(o*o+a*a)/(XS*n*(1-n)),l=s?Math.atan2(o,a)*XP-120:NaN;return new ub(l<0?l+360:l,s,n,e.opacity)}function d4(e,t,r,i){return arguments.length===1?NYt(e):new ub(e,t,r,i==null?1:i)}function ub(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}var vRe,XZ,ZZ,KP,XS,hRe,dRe,pRe,gRe=Ea(()=>{GP();WP();HZ();vRe=-.14861,XZ=1.78277,ZZ=-.29227,KP=-.90649,XS=1.97294,hRe=XS*KP,dRe=XS*XZ,pRe=XZ*ZZ-KP*vRe;im(ub,d4,p2(I1,{brighter(e){return e=e==null?lb:Math.pow(lb,e),new ub(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?v2:Math.pow(v2,e),new ub(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*YP,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),i=Math.cos(e),n=Math.sin(e);return new Bu(255*(t+r*(vRe*i+XZ*n)),255*(t+r*(ZZ*i+KP*n)),255*(t+r*(XS*i)),this.opacity)}}))});var cb=Ea(()=>{WP();fRe();gRe()});function KZ(e,t,r,i,n){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*r+(1+3*e+3*a-3*o)*i+o*n)/6}function JP(e){var t=e.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),n=e[i],a=e[i+1],o=i>0?e[i-1]:2*n-a,s=i<t-1?e[i+2]:2*a-n;return KZ((r-i/t)*t,o,n,a,s)}}var QP=Ea(()=>{});function eI(e){var t=e.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*t),n=e[(i+t-1)%t],a=e[i%t],o=e[(i+1)%t],s=e[(i+2)%t];return KZ((r-i/t)*t,n,a,o,s)}}var JZ=Ea(()=>{QP()});var p4,QZ=Ea(()=>{p4=e=>()=>e});function mRe(e,t){return function(r){return e+r*t}}function UYt(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function m2(e,t){var r=t-e;return r?mRe(e,r>180||r<-180?r-360*Math.round(r/360):r):p4(isNaN(e)?t:e)}function yRe(e){return(e=+e)==1?vl:function(t,r){return r-t?UYt(t,r,e):p4(isNaN(t)?r:t)}}function vl(e,t){var r=t-e;return r?mRe(e,r):p4(isNaN(e)?t:e)}var fb=Ea(()=>{QZ()});function xRe(e){return function(t){var r=t.length,i=new Array(r),n=new Array(r),a=new Array(r),o,s;for(o=0;o<r;++o)s=c4(t[o]),i[o]=s.r||0,n[o]=s.g||0,a[o]=s.b||0;return i=e(i),n=e(n),a=e(a),s.opacity=1,function(l){return s.r=i(l),s.g=n(l),s.b=a(l),s+""}}}var ZS,_Re,bRe,eK=Ea(()=>{cb();QP();JZ();fb();ZS=(function e(t){var r=yRe(t);function i(n,a){var o=r((n=c4(n)).r,(a=c4(a)).r),s=r(n.g,a.g),l=r(n.b,a.b),u=vl(n.opacity,a.opacity);return function(c){return n.r=o(c),n.g=s(c),n.b=l(c),n.opacity=u(c),n+""}}return i.gamma=e,i})(1);_Re=xRe(JP),bRe=xRe(eI)});function v4(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,i=t.slice(),n;return function(a){for(n=0;n<r;++n)i[n]=e[n]*(1-a)+t[n]*a;return i}}function tI(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var rI=Ea(()=>{});function wRe(e,t){return(tI(t)?v4:tK)(e,t)}function tK(e,t){var r=t?t.length:0,i=e?Math.min(r,e.length):0,n=new Array(i),a=new Array(r),o;for(o=0;o<i;++o)n[o]=y2(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(s){for(o=0;o<i;++o)a[o]=n[o](s);return a}}var rK=Ea(()=>{KS();rI()});function iI(e,t){var r=new Date;return e=+e,t=+t,function(i){return r.setTime(e*(1-i)+t*i),r}}var iK=Ea(()=>{});function $h(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var JS=Ea(()=>{});function nI(e,t){var r={},i={},n;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(n in t)n in e?r[n]=y2(e[n],t[n]):i[n]=t[n];return function(a){for(n in r)i[n]=r[n](a);return i}}var nK=Ea(()=>{KS()});function VYt(e){return function(){return e}}function GYt(e){return function(t){return e(t)+""}}function aI(e,t){var r=oK.lastIndex=aK.lastIndex=0,i,n,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(i=oK.exec(e))&&(n=aK.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(i=i[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:$h(i,n)})),r=aK.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?GYt(l[0].x):VYt(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)s[(f=l[c]).i]=f.x(u);return s.join("")})}var oK,aK,sK=Ea(()=>{JS();oK=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,aK=new RegExp(oK.source,"g")});function y2(e,t){var r=typeof t,i;return t==null||r==="boolean"?p4(t):(r==="number"?$h:r==="string"?(i=g2(t))?(t=i,ZS):aI:t instanceof g2?ZS:t instanceof Date?iI:tI(t)?v4:Array.isArray(t)?tK:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?nI:$h)(e,t)}var KS=Ea(()=>{cb();eK();rK();iK();JS();nK();sK();QZ();rI()});function TRe(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var ARe=Ea(()=>{});function MRe(e,t){var r=m2(+e,+t);return function(i){var n=r(i);return n-360*Math.floor(n/360)}}var SRe=Ea(()=>{fb()});function ERe(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var kRe=Ea(()=>{});function lK(e,t,r,i,n,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),e*i<t*r&&(e=-e,t=-t,l=-l,o=-o),{translateX:n,translateY:a,rotate:Math.atan2(t,e)*CRe,skewX:Math.atan(l)*CRe,scaleX:o,scaleY:s}}var CRe,oI,DRe=Ea(()=>{CRe=180/Math.PI,oI={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function FRe(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?oI:lK(t.a,t.b,t.c,t.d,t.e,t.f)}function LRe(e){return e==null?oI:(sI||(sI=document.createElementNS("http://www.w3.org/2000/svg","g")),sI.setAttribute("transform",e),(e=sI.transform.baseVal.consolidate())?(e=e.matrix,lK(e.a,e.b,e.c,e.d,e.e,e.f)):oI)}var sI,PRe=Ea(()=>{DRe()});function IRe(e,t,r,i){function n(u){return u.length?u.pop()+" ":""}function a(u,c,f,h,d,p){if(u!==f||c!==h){var v=d.push("translate(",null,t,null,r);p.push({i:v-4,x:$h(u,f)},{i:v-2,x:$h(c,h)})}else(f||h)&&d.push("translate("+f+t+h+r)}function o(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(n(f)+"rotate(",null,i)-2,x:$h(u,c)})):c&&f.push(n(f)+"rotate("+c+i)}function s(u,c,f,h){u!==c?h.push({i:f.push(n(f)+"skewX(",null,i)-2,x:$h(u,c)}):c&&f.push(n(f)+"skewX("+c+i)}function l(u,c,f,h,d,p){if(u!==f||c!==h){var v=d.push(n(d)+"scale(",null,",",null,")");p.push({i:v-4,x:$h(u,f)},{i:v-2,x:$h(c,h)})}else(f!==1||h!==1)&&d.push(n(d)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),a(u.translateX,u.translateY,c.translateX,c.translateY,f,h),o(u.rotate,c.rotate,f,h),s(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(d){for(var p=-1,v=h.length,m;++p<v;)f[(m=h[p]).i]=m.x(d);return f.join("")}}}var RRe,zRe,BRe=Ea(()=>{JS();PRe();RRe=IRe(FRe,"px, ","px)","deg)"),zRe=IRe(LRe,", ",")",")")});function qRe(e){return((e=Math.exp(e))+1/e)/2}function jYt(e){return((e=Math.exp(e))-1/e)/2}function $Yt(e){return((e=Math.exp(2*e))-1)/(e+1)}var HYt,ORe,NRe=Ea(()=>{HYt=1e-12;ORe=(function e(t,r,i){function n(a,o){var s=a[0],l=a[1],u=a[2],c=o[0],f=o[1],h=o[2],d=c-s,p=f-l,v=d*d+p*p,m,g;if(v<HYt)g=Math.log(h/u)/t,m=function(T){return[s+T*d,l+T*p,u*Math.exp(t*T*g)]};else{var w=Math.sqrt(v),b=(h*h-u*u+i*v)/(2*u*r*w),_=(h*h-u*u-i*v)/(2*h*r*w),M=Math.log(Math.sqrt(b*b+1)-b),x=Math.log(Math.sqrt(_*_+1)-_);g=(x-M)/t,m=function(T){var A=T*g,y=qRe(M),E=u/(r*w)*(y*$Yt(t*A+M)-jYt(M));return[s+E*d,l+E*p,u*y/qRe(t*A+M)]}}return m.duration=g*1e3*t/Math.SQRT2,m}return n.rho=function(a){var o=Math.max(.001,+a),s=o*o,l=s*s;return e(o,s,l)},n})(Math.SQRT2,2,4)});function URe(e){return function(t,r){var i=e((t=WS(t)).h,(r=WS(r)).h),n=vl(t.s,r.s),a=vl(t.l,r.l),o=vl(t.opacity,r.opacity);return function(s){return t.h=i(s),t.s=n(s),t.l=a(s),t.opacity=o(s),t+""}}}var VRe,GRe,HRe=Ea(()=>{cb();fb();VRe=URe(m2),GRe=URe(vl)});function uK(e,t){var r=vl((e=h4(e)).l,(t=h4(t)).l),i=vl(e.a,t.a),n=vl(e.b,t.b),a=vl(e.opacity,t.opacity);return function(o){return e.l=r(o),e.a=i(o),e.b=n(o),e.opacity=a(o),e+""}}var jRe=Ea(()=>{cb();fb()});function $Re(e){return function(t,r){var i=e((t=YS(t)).h,(r=YS(r)).h),n=vl(t.c,r.c),a=vl(t.l,r.l),o=vl(t.opacity,r.opacity);return function(s){return t.h=i(s),t.c=n(s),t.l=a(s),t.opacity=o(s),t+""}}}var WRe,YRe,XRe=Ea(()=>{cb();fb();WRe=$Re(m2),YRe=$Re(vl)});function ZRe(e){return(function t(r){r=+r;function i(n,a){var o=e((n=d4(n)).h,(a=d4(a)).h),s=vl(n.s,a.s),l=vl(n.l,a.l),u=vl(n.opacity,a.opacity);return function(c){return n.h=o(c),n.s=s(c),n.l=l(Math.pow(c,r)),n.opacity=u(c),n+""}}return i.gamma=t,i})(1)}var KRe,JRe,QRe=Ea(()=>{cb();fb();KRe=ZRe(m2),JRe=ZRe(vl)});function cK(e,t){t===void 0&&(t=e,e=y2);for(var r=0,i=t.length-1,n=t[0],a=new Array(i<0?0:i);r<i;)a[r]=e(n,n=t[++r]);return function(o){var s=Math.max(0,Math.min(i-1,Math.floor(o*=i)));return a[s](o-s)}}var eze=Ea(()=>{KS()});function tze(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e(i/(t-1));return r}var rze=Ea(()=>{});var hb={};Fp(hb,{interpolate:()=>y2,interpolateArray:()=>wRe,interpolateBasis:()=>JP,interpolateBasisClosed:()=>eI,interpolateCubehelix:()=>KRe,interpolateCubehelixLong:()=>JRe,interpolateDate:()=>iI,interpolateDiscrete:()=>TRe,interpolateHcl:()=>WRe,interpolateHclLong:()=>YRe,interpolateHsl:()=>VRe,interpolateHslLong:()=>GRe,interpolateHue:()=>MRe,interpolateLab:()=>uK,interpolateNumber:()=>$h,interpolateNumberArray:()=>v4,interpolateObject:()=>nI,interpolateRgb:()=>ZS,interpolateRgbBasis:()=>_Re,interpolateRgbBasisClosed:()=>bRe,interpolateRound:()=>ERe,interpolateString:()=>aI,interpolateTransformCss:()=>RRe,interpolateTransformSvg:()=>zRe,interpolateZoom:()=>ORe,piecewise:()=>cK,quantize:()=>tze});var db=Ea(()=>{KS();rK();QP();JZ();iK();ARe();SRe();JS();rI();nK();kRe();sK();BRe();NRe();eK();HRe();jRe();XRe();QRe();eze();rze()});var lI=W((yGr,ize)=>{"use strict";var WYt=Ji(),YYt=ni();ize.exports=function(t,r,i,n,a){var o=r.data.data,s=o.i,l=a||o.color;if(s>=0){r.i=o.i;var u=i.marker;u.pattern?(!u.colors||!u.pattern.shape)&&(u.color=l,r.color=l):(u.color=l,r.color=l),WYt.pointStyle(t,i,n,r)}else YYt.fill(t,l)}});var fK=W((xGr,lze)=>{"use strict";var nze=vi(),aze=ni(),oze=it(),XYt=Qc().resizeText,ZYt=lI();function KYt(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");XYt(e,t,"sunburst"),t.each(function(r){var i=nze.select(this),n=r[0],a=n.trace;i.style("opacity",a.opacity),i.selectAll("path.surface").each(function(o){nze.select(this).call(sze,o,a,e)})})}function sze(e,t,r,i){var n=t.data.data,a=!t.children,o=n.i,s=oze.castOption(r,o,"marker.line.color")||aze.defaultLine,l=oze.castOption(r,o,"marker.line.width")||0;e.call(ZYt,t,r,i).style("stroke-width",l).call(aze.stroke,s).style("opacity",a?r.leaf.opacity:null)}lze.exports={style:KYt,styleOne:sze}});var am=W(na=>{"use strict";var pb=it(),JYt=ni(),QYt=Np(),uze=Ly();na.findEntryWithLevel=function(e,t){var r;return t&&e.eachAfter(function(i){if(na.getPtId(i)===t)return r=i.copy()}),r||e};na.findEntryWithChild=function(e,t){var r;return e.eachAfter(function(i){for(var n=i.children||[],a=0;a<n.length;a++){var o=n[a];if(na.getPtId(o)===t)return r=i.copy()}}),r||e};na.isEntry=function(e){return!e.parent};na.isLeaf=function(e){return!e.children};na.getPtId=function(e){return e.data.data.id};na.getPtLabel=function(e){return e.data.data.label};na.getValue=function(e){return e.value};na.isHierarchyRoot=function(e){return cze(e)===""};na.setSliceCursor=function(e,t,r){var i=r.isTransitioning;if(!i){var n=e.datum();i=r.hideOnRoot&&na.isHierarchyRoot(n)||r.hideOnLeaves&&na.isLeaf(n)}QYt(e,i?null:"pointer")};function eXt(e,t,r){return{color:na.getOutsideTextFontKey("color",e,t,r),family:na.getOutsideTextFontKey("family",e,t,r),size:na.getOutsideTextFontKey("size",e,t,r),weight:na.getOutsideTextFontKey("weight",e,t,r),style:na.getOutsideTextFontKey("style",e,t,r),variant:na.getOutsideTextFontKey("variant",e,t,r),textcase:na.getOutsideTextFontKey("textcase",e,t,r),lineposition:na.getOutsideTextFontKey("lineposition",e,t,r),shadow:na.getOutsideTextFontKey("shadow",e,t,r)}}function tXt(e,t,r,i){var n=(i||{}).onPathbar,a=t.data.data,o=a.i,s=pb.castOption(e,o,(n?"pathbar.textfont":"insidetextfont")+".color");return!s&&e._input.textfont&&(s=pb.castOption(e._input,o,"textfont.color")),{color:s||JYt.contrast(a.color),family:na.getInsideTextFontKey("family",e,t,r,i),size:na.getInsideTextFontKey("size",e,t,r,i),weight:na.getInsideTextFontKey("weight",e,t,r,i),style:na.getInsideTextFontKey("style",e,t,r,i),variant:na.getInsideTextFontKey("variant",e,t,r,i),textcase:na.getInsideTextFontKey("textcase",e,t,r,i),lineposition:na.getInsideTextFontKey("lineposition",e,t,r,i),shadow:na.getInsideTextFontKey("shadow",e,t,r,i)}}na.getInsideTextFontKey=function(e,t,r,i,n){var a=(n||{}).onPathbar,o=a?"pathbar.textfont":"insidetextfont",s=r.data.data.i;return pb.castOption(t,s,o+"."+e)||pb.castOption(t,s,"textfont."+e)||i.size};na.getOutsideTextFontKey=function(e,t,r,i){var n=r.data.data.i;return pb.castOption(t,n,"outsidetextfont."+e)||pb.castOption(t,n,"textfont."+e)||i.size};na.isOutsideText=function(e,t){return!e._hasColorscale&&na.isHierarchyRoot(t)};na.determineTextFont=function(e,t,r,i){return na.isOutsideText(e,t)?eXt(e,t,r):tXt(e,t,r,i)};na.hasTransition=function(e){return!!(e&&e.duration>0)};na.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0};na.isHeader=function(e,t){return!(na.isLeaf(e)||e.depth===t._maxDepth-1)};function cze(e){return e.data.data.pid}na.getParent=function(e,t){return na.findEntryWithLevel(e,cze(t))};na.listPath=function(e,t){var r=e.parent;if(!r)return[];var i=t?[r.data[t]]:[r];return na.listPath(r,t).concat(i)};na.getPath=function(e){return na.listPath(e,"label").join("/")+"/"};na.formatValue=uze.formatPieValue;na.formatPercent=function(e,t){var r=pb.formatPercent(e,0);return r==="0%"&&(r=uze.formatPiePercent(e,t)),r}});var tE=W((bGr,dze)=>{"use strict";var g4=vi(),fze=yi(),rXt=Kf().appendArrayPointValue,QS=Ds(),hze=it(),iXt=lw(),hu=am(),nXt=Ly(),aXt=nXt.formatPieValue;dze.exports=function(t,r,i,n,a){var o=n[0],s=o.trace,l=o.hierarchy,u=s.type==="sunburst",c=s.type==="treemap"||s.type==="icicle";"_hasHoverLabel"in s||(s._hasHoverLabel=!1),"_hasHoverEvent"in s||(s._hasHoverEvent=!1);var f=function(p){var v=i._fullLayout;if(!(i._dragging||v.hovermode===!1)){var m=i._fullData[s.index],g=p.data.data,w=g.i,b=hu.isHierarchyRoot(p),_=hu.getParent(l,p),M=hu.getValue(p),x=function(Y){return hze.castOption(m,w,Y)},T=x("hovertemplate"),A=QS.castHoverinfo(m,v,w),y=v.separators,E;if(T||A&&A!=="none"&&A!=="skip"){var S,C;u&&(S=o.cx+p.pxmid[0]*(1-p.rInscribed),C=o.cy+p.pxmid[1]*(1-p.rInscribed)),c&&(S=p._hoverX,C=p._hoverY);var k={},D=[],F=[],P=function(Y){return D.indexOf(Y)!==-1};A&&(D=A==="all"?m._module.attributes.hoverinfo.flags:A.split("+")),k.label=g.label,P("label")&&k.label&&F.push(k.label),g.hasOwnProperty("v")&&(k.value=g.v,k.valueLabel=aXt(k.value,y),P("value")&&F.push(k.valueLabel)),k.currentPath=p.currentPath=hu.getPath(p.data),P("current path")&&!b&&F.push(k.currentPath);var R,L=[],I=function(){L.indexOf(R)===-1&&(F.push(R),L.push(R))};k.percentParent=p.percentParent=M/hu.getValue(_),k.parent=p.parentString=hu.getPtLabel(_),P("percent parent")&&(R=hu.formatPercent(k.percentParent,y)+" of "+k.parent,I()),k.percentEntry=p.percentEntry=M/hu.getValue(r),k.entry=p.entry=hu.getPtLabel(r),P("percent entry")&&!b&&!p.onPathbar&&(R=hu.formatPercent(k.percentEntry,y)+" of "+k.entry,I()),k.percentRoot=p.percentRoot=M/hu.getValue(l),k.root=p.root=hu.getPtLabel(l),P("percent root")&&!b&&(R=hu.formatPercent(k.percentRoot,y)+" of "+k.root,I()),k.text=x("hovertext")||x("text"),P("text")&&(R=k.text,hze.isValidTextValue(R)&&F.push(R)),E=[eE(p,m,a.eventDataKeys)];var B={trace:m,y:C,_x0:p._x0,_x1:p._x1,_y0:p._y0,_y1:p._y1,text:F.join("<br>"),name:T||P("name")?m.name:void 0,color:x("hoverlabel.bgcolor")||g.color,borderColor:x("hoverlabel.bordercolor"),fontFamily:x("hoverlabel.font.family"),fontSize:x("hoverlabel.font.size"),fontColor:x("hoverlabel.font.color"),fontWeight:x("hoverlabel.font.weight"),fontStyle:x("hoverlabel.font.style"),fontVariant:x("hoverlabel.font.variant"),nameLength:x("hoverlabel.namelength"),textAlign:x("hoverlabel.align"),hovertemplate:T,hovertemplateLabels:k,eventData:E};u&&(B.x0=S-p.rInscribed*p.rpx1,B.x1=S+p.rInscribed*p.rpx1,B.idealAlign=p.pxmid[0]<0?"left":"right"),c&&(B.x=S,B.idealAlign=S<0?"left":"right");var O=[];QS.loneHover(B,{container:v._hoverlayer.node(),outerContainer:v._paper.node(),gd:i,inOut_bbox:O}),E[0].bbox=O[0],s._hasHoverLabel=!0}if(c){var $=t.select("path.surface");a.styleOne($,p,m,i,{hovered:!0})}s._hasHoverEvent=!0,i.emit("plotly_hover",{points:E||[eE(p,m,a.eventDataKeys)],event:g4.event})}},h=function(p){var v=i._fullLayout,m=i._fullData[s.index],g=g4.select(this).datum();if(s._hasHoverEvent&&(p.originalEvent=g4.event,i.emit("plotly_unhover",{points:[eE(g,m,a.eventDataKeys)],event:g4.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&(QS.loneUnhover(v._hoverlayer.node()),s._hasHoverLabel=!1),c){var w=t.select("path.surface");a.styleOne(w,g,m,i,{hovered:!1})}},d=function(p){var v=i._fullLayout,m=i._fullData[s.index],g=u&&(hu.isHierarchyRoot(p)||hu.isLeaf(p)),w=hu.getPtId(p),b=hu.isEntry(p)?hu.findEntryWithChild(l,w):hu.findEntryWithLevel(l,w),_=hu.getPtId(b),M={points:[eE(p,m,a.eventDataKeys)],event:g4.event};g||(M.nextLevel=_);var x=iXt.triggerHandler(i,"plotly_"+s.type+"click",M);if(x!==!1&&v.hovermode&&(i._hoverdata=[eE(p,m,a.eventDataKeys)],QS.click(i,g4.event)),!g&&x!==!1&&!i._dragging&&!i._transitioning){fze.call("_storeDirectGUIEdit",m,v._tracePreGUI[m.uid],{level:m.level});var T={data:[{level:_}],traces:[s.index]},A={frame:{redraw:!1,duration:a.transitionTime},transition:{duration:a.transitionTime,easing:a.transitionEasing},mode:"immediate",fromcurrent:!0};QS.loneUnhover(v._hoverlayer.node()),fze.call("animate",i,T,A)}};t.on("mouseover",f),t.on("mouseout",h),t.on("click",d)};function eE(e,t,r){for(var i=e.data.data,n={curveNumber:t.index,pointNumber:i.i,data:t._input,fullData:t},a=0;a<r.length;a++){var o=r[a];o in e&&(n[o]=e[o])}return"parentString"in e&&!hu.isHierarchyRoot(e)&&(n.parent=e.parentString),rXt(n,t,i.i),n}});var cI=W(uI=>{"use strict";var rE=vi(),oXt=VS(),uv=(db(),Go(hb)).interpolate,pze=Ji(),nf=it(),sXt=uo(),yze=Qc(),vze=yze.recordMinTextSize,lXt=yze.clearMinTextSize,xze=UP(),uXt=Ly().getRotationAngle,cXt=xze.computeTransform,fXt=xze.transformInsideText,hXt=fK().styleOne,dXt=Ed().resizeText,pXt=tE(),hK=UZ(),Ia=am();uI.plot=function(e,t,r,i){var n=e._fullLayout,a=n._sunburstlayer,o,s,l=!r,u=!n.uniformtext.mode&&Ia.hasTransition(r);if(lXt("sunburst",n),o=a.selectAll("g.trace.sunburst").data(t,function(f){return f[0].trace.uid}),o.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),o.order(),u){i&&(s=i());var c=rE.transition().duration(r.duration).ease(r.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});c.each(function(){a.selectAll("g.trace").each(function(f){gze(e,f,this,r)})})}else o.each(function(f){gze(e,f,this,r)}),n.uniformtext.mode&&dXt(e,n._sunburstlayer.selectAll(".trace"),"sunburst");l&&o.exit().remove()};function gze(e,t,r,i){var n=e._context.staticPlot,a=e._fullLayout,o=!a.uniformtext.mode&&Ia.hasTransition(i),s=rE.select(r),l=s.selectAll("g.slice"),u=t[0],c=u.trace,f=u.hierarchy,h=Ia.findEntryWithLevel(f,c.level),d=Ia.getMaxDepth(c),p=a._size,v=c.domain,m=p.w*(v.x[1]-v.x[0]),g=p.h*(v.y[1]-v.y[0]),w=.5*Math.min(m,g),b=u.cx=p.l+p.w*(v.x[1]+v.x[0])/2,_=u.cy=p.t+p.h*(1-v.y[0])-g/2;if(!h)return l.remove();var M=null,x={};o&&l.each(function(j){x[Ia.getPtId(j)]={rpx0:j.rpx0,rpx1:j.rpx1,x0:j.x0,x1:j.x1,transform:j.transform},!M&&Ia.isEntry(j)&&(M=j)});var T=vXt(h).descendants(),A=h.height+1,y=0,E=d;u.hasMultipleRoots&&Ia.isHierarchyRoot(h)&&(T=T.slice(1),A-=1,y=1,E+=1),T=T.filter(function(j){return j.y1<=E});var S=uXt(c.rotation);S&&T.forEach(function(j){j.x0+=S,j.x1+=S});var C=Math.min(A,d),k=function(j){return(j-y)/C*w},D=function(j,q){return[j*Math.cos(q),-j*Math.sin(q)]},F=function(j){return nf.pathAnnulus(j.rpx0,j.rpx1,j.x0,j.x1,b,_)},P=function(j){return b+mze(j)[0]*(j.transform.rCenter||0)+(j.transform.x||0)},R=function(j){return _+mze(j)[1]*(j.transform.rCenter||0)+(j.transform.y||0)};l=l.data(T,Ia.getPtId),l.enter().append("g").classed("slice",!0),o?l.exit().transition().each(function(){var j=rE.select(this),q=j.select("path.surface");q.transition().attrTween("d",function(U){var V=O(U);return function(X){return F(V(X))}});var J=j.select("g.slicetext");J.attr("opacity",0)}).remove():l.exit().remove(),l.order();var L=null;if(o&&M){var I=Ia.getPtId(M);l.each(function(j){L===null&&Ia.getPtId(j)===I&&(L=j.x1)})}var B=l;o&&(B=B.transition().each("end",function(){var j=rE.select(this);Ia.setSliceCursor(j,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),B.each(function(j){var q=rE.select(this),J=nf.ensureSingle(q,"path","surface",function(Q){Q.style("pointer-events",n?"none":"all")});j.rpx0=k(j.y0),j.rpx1=k(j.y1),j.xmid=(j.x0+j.x1)/2,j.pxmid=D(j.rpx1,j.xmid),j.midangle=-(j.xmid-Math.PI/2),j.startangle=-(j.x0-Math.PI/2),j.stopangle=-(j.x1-Math.PI/2),j.halfangle=.5*Math.min(nf.angleDelta(j.x0,j.x1)||Math.PI,Math.PI),j.ring=1-j.rpx0/j.rpx1,j.rInscribed=gXt(j,c),o?J.transition().attrTween("d",function(Q){var te=$(Q);return function(ce){return F(te(ce))}}):J.attr("d",F),q.call(pXt,h,e,t,{eventDataKeys:hK.eventDataKeys,transitionTime:hK.CLICK_TRANSITION_TIME,transitionEasing:hK.CLICK_TRANSITION_EASING}).call(Ia.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),J.call(hXt,j,c,e);var U=nf.ensureSingle(q,"g","slicetext"),V=nf.ensureSingle(U,"text","",function(Q){Q.attr("data-notex",1)}),X=nf.ensureUniformFontSize(e,Ia.determineTextFont(c,j,a.font));V.text(uI.formatSliceLabel(j,h,c,t,a)).classed("slicetext",!0).attr("text-anchor","middle").call(pze.font,X).call(sXt.convertToTspans,e);var H=pze.bBox(V.node());j.transform=fXt(H,j,u),j.transform.targetX=P(j),j.transform.targetY=R(j);var G=function(Q,te){var ce=Q.transform;return cXt(ce,te),ce.fontSize=X.size,vze(c.type,ce,a),nf.getTextTransform(ce)};o?V.transition().attrTween("transform",function(Q){var te=Y(Q);return function(ce){return G(te(ce),H)}}):V.attr("transform",G(j,H))});function O(j){var q=Ia.getPtId(j),J=x[q],U=x[Ia.getPtId(h)],V;if(U){var X=(j.x1>U.x1?2*Math.PI:0)+S;V=j.rpx1<U.rpx1?{x0:j.x0,x1:j.x1,rpx0:0,rpx1:0}:{x0:X,x1:X,rpx0:j.rpx0,rpx1:j.rpx1}}else{var H,G=Ia.getPtId(j.parent);l.each(function(Ce){if(Ia.getPtId(Ce)===G)return H=Ce});var Q=H.children,te;Q.forEach(function(Ce,be){if(Ia.getPtId(Ce)===q)return te=be});var ce=Q.length,ge=uv(H.x0,H.x1);V={rpx0:w,rpx1:w,x0:ge(te/ce),x1:ge((te+1)/ce)}}return uv(J,V)}function $(j){var q=x[Ia.getPtId(j)],J,U={x0:j.x0,x1:j.x1,rpx0:j.rpx0,rpx1:j.rpx1};if(q)J=q;else if(M)if(j.parent)if(L){var V=(j.x1>L?2*Math.PI:0)+S;J={x0:V,x1:V}}else J={rpx0:w,rpx1:w},nf.extendFlat(J,K(j));else J={rpx0:0,rpx1:0};else J={x0:S,x1:S};return uv(J,U)}function Y(j){var q=x[Ia.getPtId(j)],J,U=j.transform;if(q)J=q;else if(J={rpx1:j.rpx1,transform:{textPosAngle:U.textPosAngle,scale:0,rotate:U.rotate,rCenter:U.rCenter,x:U.x,y:U.y}},M)if(j.parent)if(L){var V=j.x1>L?2*Math.PI:0;J.x0=J.x1=V}else nf.extendFlat(J,K(j));else J.x0=J.x1=S;else J.x0=J.x1=S;var X=uv(J.transform.textPosAngle,j.transform.textPosAngle),H=uv(J.rpx1,j.rpx1),G=uv(J.x0,j.x0),Q=uv(J.x1,j.x1),te=uv(J.transform.scale,U.scale),ce=uv(J.transform.rotate,U.rotate),ge=U.rCenter===0?3:J.transform.rCenter===0?1/3:1,Ce=uv(J.transform.rCenter,U.rCenter),be=function(he){return Ce(Math.pow(he,ge))};return function(he){var oe=H(he),Ee=G(he),ye=Q(he),ue=be(he),ee=D(oe,(Ee+ye)/2),ae=X(he),xe={pxmid:ee,rpx1:oe,transform:{textPosAngle:ae,rCenter:ue,x:U.x,y:U.y}};return vze(c.type,U,a),{transform:{targetX:P(xe),targetY:R(xe),scale:te(he),rotate:ce(he),rCenter:ue}}}}function K(j){var q=j.parent,J=x[Ia.getPtId(q)],U={};if(J){var V=q.children,X=V.indexOf(j),H=V.length,G=uv(J.x0,J.x1);U.x0=G(X/H),U.x1=G(X/H)}else U.x0=U.x1=0;return U}}function vXt(e){return oXt.partition().size([2*Math.PI,e.height+1])(e)}uI.formatSliceLabel=function(e,t,r,i,n){var a=r.texttemplate,o=r.textinfo;if(!a&&(!o||o==="none"))return"";var s=n.separators,l=i[0],u=e.data.data,c=l.hierarchy,f=Ia.isHierarchyRoot(e),h=Ia.getParent(c,e),d=Ia.getValue(e);if(!a){var p=o.split("+"),v=function(y){return p.indexOf(y)!==-1},m=[],g;if(v("label")&&u.label&&m.push(u.label),u.hasOwnProperty("v")&&v("value")&&m.push(Ia.formatValue(u.v,s)),!f){v("current path")&&m.push(Ia.getPath(e.data));var w=0;v("percent parent")&&w++,v("percent entry")&&w++,v("percent root")&&w++;var b=w>1;if(w){var _,M=function(y){g=Ia.formatPercent(_,s),b&&(g+=" of "+y),m.push(g)};v("percent parent")&&!f&&(_=d/Ia.getValue(h),M("parent")),v("percent entry")&&(_=d/Ia.getValue(t),M("entry")),v("percent root")&&(_=d/Ia.getValue(c),M("root"))}}return v("text")&&(g=nf.castOption(r,u.i,"text"),nf.isValidTextValue(g)&&m.push(g)),m.join("<br>")}var x=nf.castOption(r,u.i,"texttemplate");if(!x)return"";var T={};u.label&&(T.label=u.label),u.hasOwnProperty("v")&&(T.value=u.v,T.valueLabel=Ia.formatValue(u.v,s)),T.currentPath=Ia.getPath(e.data),f||(T.percentParent=d/Ia.getValue(h),T.percentParentLabel=Ia.formatPercent(T.percentParent,s),T.parent=Ia.getPtLabel(h)),T.percentEntry=d/Ia.getValue(t),T.percentEntryLabel=Ia.formatPercent(T.percentEntry,s),T.entry=Ia.getPtLabel(t),T.percentRoot=d/Ia.getValue(c),T.percentRootLabel=Ia.formatPercent(T.percentRoot,s),T.root=Ia.getPtLabel(c),u.hasOwnProperty("color")&&(T.color=u.color);var A=nf.castOption(r,u.i,"text");return(nf.isValidTextValue(A)||A==="")&&(T.text=A),T.customdata=nf.castOption(r,u.i,"customdata"),nf.texttemplateString({data:[T,r._meta],fallback:r.texttemplatefallback,labels:T,locale:n._d3locale,template:x})};function gXt(e){return e.rpx0===0&&nf.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function mze(e){return mXt(e.rpx1,e.transform.textPosAngle)}function mXt(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var bze=W((TGr,_ze)=>{"use strict";_ze.exports={moduleType:"trace",name:"sunburst",basePlotModule:IIe(),categories:[],animatable:!0,attributes:US(),layoutAttributes:VZ(),supplyDefaults:GIe(),supplyLayoutDefaults:jIe(),calc:HS().calc,crossTraceCalc:HS().crossTraceCalc,plot:cI().plot,style:fK().style,colorbar:Ac(),meta:{}}});var Tze=W((AGr,wze)=>{"use strict";wze.exports=bze()});var Mze=W(m4=>{"use strict";var Aze=Ko();m4.name="treemap";m4.plot=function(e,t,r,i){Aze.plotBasePlot(m4.name,e,t,r,i)};m4.clean=function(e,t,r,i){Aze.cleanBasePlot(m4.name,e,t,r,i)}});var vb=W((SGr,Sze)=>{"use strict";Sze.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}});var fI=W((EGr,Cze)=>{"use strict";var{hovertemplateAttrs:yXt,texttemplateAttrs:xXt,templatefallbackAttrs:Eze}=Ga(),_Xt=Eo(),bXt=us().attributes,gb=nb(),Nd=US(),kze=vb(),dK=tn().extendFlat,wXt=Du().pattern;Cze.exports={labels:Nd.labels,parents:Nd.parents,values:Nd.values,branchvalues:Nd.branchvalues,count:Nd.count,level:Nd.level,maxdepth:Nd.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:dK({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:Nd.marker.colors,pattern:wXt,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:Nd.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},_Xt("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:dK({},gb.textfont,{}),editType:"calc"},text:gb.text,textinfo:Nd.textinfo,texttemplate:xXt({editType:"plot"},{keys:kze.eventDataKeys.concat(["label","value"])}),texttemplatefallback:Eze({editType:"plot"}),hovertext:gb.hovertext,hoverinfo:Nd.hoverinfo,hovertemplate:yXt({},{keys:kze.eventDataKeys}),hovertemplatefallback:Eze(),textfont:gb.textfont,insidetextfont:gb.insidetextfont,outsidetextfont:dK({},gb.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:gb.sort,root:Nd.root,domain:bXt({name:"treemap",trace:!0,editType:"calc"})}});var pK=W((kGr,Dze)=>{"use strict";Dze.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var Ize=W((CGr,Pze)=>{"use strict";var Fze=it(),TXt=fI(),AXt=ni(),MXt=us().defaults,SXt=E0().handleText,EXt=Uy().TEXTPAD,kXt=ab().handleMarkerDefaults,Lze=Jo(),CXt=Lze.hasColorscale,DXt=Lze.handleDefaults;Pze.exports=function(t,r,i,n){function a(m,g){return Fze.coerce(t,r,TXt,m,g)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth");var u=a("tiling.packing");u==="squarify"&&a("tiling.squarifyratio"),a("tiling.flip"),a("tiling.pad");var c=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",Fze.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f=a("pathbar.visible"),h="auto";SXt(t,r,n,a,h,{hasPathbar:f,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition");var d=r.textposition.indexOf("bottom")!==-1;kXt(t,r,n,a);var p=r._hasColorscale=CXt(t,"marker","colors")||(t.marker||{}).coloraxis;p?DXt(t,r,n,a,{prefix:"marker.",cLetter:"c"}):a("marker.depthfade",!(r.marker.colors||[]).length);var v=r.textfont.size*2;a("marker.pad.t",d?v/4:v),a("marker.pad.l",v/4),a("marker.pad.r",v/4),a("marker.pad.b",d?v:v/4),a("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:AXt.contrast(n.paper_bgcolor)}}},f&&(a("pathbar.thickness",r.pathbar.textfont.size+2*EXt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),MXt(r,n,a),r._length=null}});var zze=W((DGr,Rze)=>{"use strict";var FXt=it(),LXt=pK();Rze.exports=function(t,r){function i(n,a){return FXt.coerce(t,r,LXt,n,a)}i("treemapcolorway",r.colorway),i("extendtreemapcolors")}});var gK=W(vK=>{"use strict";var Bze=HS();vK.calc=function(e,t){return Bze.calc(e,t)};vK.crossTraceCalc=function(e){return Bze._runCrossTraceCalc("treemap",e)}});var mK=W((LGr,qze)=>{"use strict";qze.exports=function e(t,r,i){var n;i.swapXY&&(n=t.x0,t.x0=t.y0,t.y0=n,n=t.x1,t.x1=t.y1,t.y1=n),i.flipX&&(n=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-n),i.flipY&&(n=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-n);var a=t.children;if(a)for(var o=0;o<a.length;o++)e(a[o],r,i)}});var yK=W((PGr,Oze)=>{"use strict";var y4=VS(),PXt=mK();Oze.exports=function(t,r,i){var n=i.flipX,a=i.flipY,o=i.packing==="dice-slice",s=i.pad[a?"bottom":"top"],l=i.pad[n?"right":"left"],u=i.pad[n?"left":"right"],c=i.pad[a?"top":"bottom"],f;o&&(f=l,l=s,s=f,f=u,u=c,c=f);var h=y4.treemap().tile(IXt(i.packing,i.squarifyratio)).paddingInner(i.pad.inner).paddingLeft(l).paddingRight(u).paddingTop(s).paddingBottom(c).size(o?[r[1],r[0]]:r)(t);return(o||n||a)&&PXt(h,r,{swapXY:o,flipX:n,flipY:a}),h};function IXt(e,t){switch(e){case"squarify":return y4.treemapSquarify.ratio(t);case"binary":return y4.treemapBinary;case"dice":return y4.treemapDice;case"slice":return y4.treemapSlice;default:return y4.treemapSliceDice}}});var hI=W((IGr,Gze)=>{"use strict";var Nze=vi(),x4=ni(),Uze=it(),xK=am(),RXt=Qc().resizeText,zXt=lI();function BXt(e){var t=e._fullLayout._treemaplayer.selectAll(".trace");RXt(e,t,"treemap"),t.each(function(r){var i=Nze.select(this),n=r[0],a=n.trace;i.style("opacity",a.opacity),i.selectAll("path.surface").each(function(o){Nze.select(this).call(Vze,o,a,e,{hovered:!1})})})}function Vze(e,t,r,i,n){var a=(n||{}).hovered,o=t.data.data,s=o.i,l,u,c=o.color,f=xK.isHierarchyRoot(t),h=1;if(a)l=r._hovered.marker.line.color,u=r._hovered.marker.line.width;else if(f&&c===r.root.color)h=100,l="rgba(0,0,0,0)",u=0;else if(l=Uze.castOption(r,s,"marker.line.color")||x4.defaultLine,u=Uze.castOption(r,s,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var d=r.marker.depthfade;if(d){var p=x4.combine(x4.addOpacity(r._backgroundColor,.75),c),v;if(d===!0){var m=xK.getMaxDepth(r);isFinite(m)?xK.isLeaf(t)?v=0:v=r._maxVisibleLayers-(t.data.depth-r._entryDepth):v=t.data.height+1}else v=t.data.depth-r._entryDepth,r._atRootLevel||v++;if(v>0)for(var g=0;g<v;g++){var w=.5*g/v;c=x4.combine(x4.addOpacity(p,w),c)}}}e.call(zXt,t,r,i,c).style("stroke-width",u).call(x4.stroke,l).style("opacity",h)}Gze.exports={style:BXt,styleOne:Vze}});var Yze=W((RGr,Wze)=>{"use strict";var Hze=vi(),dI=it(),jze=Ji(),qXt=uo(),OXt=yK(),$ze=hI().styleOne,_K=vb(),_4=am(),NXt=tE(),bK=!0;Wze.exports=function(t,r,i,n,a){var o=a.barDifY,s=a.width,l=a.height,u=a.viewX,c=a.viewY,f=a.pathSlice,h=a.toMoveInsideSlice,d=a.strTransform,p=a.hasTransition,v=a.handleSlicesExit,m=a.makeUpdateSliceInterpolator,g=a.makeUpdateTextInterpolator,w={},b=t._context.staticPlot,_=t._fullLayout,M=r[0],x=M.trace,T=M.hierarchy,A=s/x._entryDepth,y=_4.listPath(i.data,"id"),E=OXt(T.copy(),[s,l],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();E=E.filter(function(C){var k=y.indexOf(C.data.id);return k===-1?!1:(C.x0=A*k,C.x1=A*(k+1),C.y0=o,C.y1=o+l,C.onPathbar=!0,!0)}),E.reverse(),n=n.data(E,_4.getPtId),n.enter().append("g").classed("pathbar",!0),v(n,bK,w,[s,l],f),n.order();var S=n;p&&(S=S.transition().each("end",function(){var C=Hze.select(this);_4.setSliceCursor(C,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),S.each(function(C){C._x0=u(C.x0),C._x1=u(C.x1),C._y0=c(C.y0),C._y1=c(C.y1),C._hoverX=u(C.x1-Math.min(s,l)/2),C._hoverY=c(C.y1-l/2);var k=Hze.select(this),D=dI.ensureSingle(k,"path","surface",function(L){L.style("pointer-events",b?"none":"all")});p?D.transition().attrTween("d",function(L){var I=m(L,bK,w,[s,l]);return function(B){return f(I(B))}}):D.attr("d",f),k.call(NXt,i,t,r,{styleOne:$ze,eventDataKeys:_K.eventDataKeys,transitionTime:_K.CLICK_TRANSITION_TIME,transitionEasing:_K.CLICK_TRANSITION_EASING}).call(_4.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),D.call($ze,C,x,t,{hovered:!1}),C._text=(_4.getPtLabel(C)||"").split("<br>").join(" ")||"";var F=dI.ensureSingle(k,"g","slicetext"),P=dI.ensureSingle(F,"text","",function(L){L.attr("data-notex",1)}),R=dI.ensureUniformFontSize(t,_4.determineTextFont(x,C,_.font,{onPathbar:!0}));P.text(C._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(jze.font,R).call(qXt.convertToTspans,t),C.textBB=jze.bBox(P.node()),C.transform=h(C,{fontSize:R.size,onPathbar:!0}),C.transform.fontSize=R.size,p?P.transition().attrTween("transform",function(L){var I=g(L,bK,w,[s,l]);return function(B){return d(I(B))}}):P.attr("transform",d(C))})}});var Jze=W((zGr,Kze)=>{"use strict";var Xze=vi(),wK=(db(),Go(hb)).interpolate,x2=am(),iE=it(),Zze=Uy().TEXTPAD,UXt=I_(),VXt=UXt.toMoveInsideBar,GXt=Qc(),TK=GXt.recordMinTextSize,HXt=vb(),jXt=Yze();function mb(e){return x2.isHierarchyRoot(e)?"":x2.getPtId(e)}Kze.exports=function(t,r,i,n,a){var o=t._fullLayout,s=r[0],l=s.trace,u=l.type,c=u==="icicle",f=s.hierarchy,h=x2.findEntryWithLevel(f,l.level),d=Xze.select(i),p=d.selectAll("g.pathbar"),v=d.selectAll("g.slice");if(!h){p.remove(),v.remove();return}var m=x2.isHierarchyRoot(h),g=!o.uniformtext.mode&&x2.hasTransition(n),w=x2.getMaxDepth(l),b=function(re){return re.data.depth-h.data.depth<w},_=o._size,M=l.domain,x=_.w*(M.x[1]-M.x[0]),T=_.h*(M.y[1]-M.y[0]),A=x,y=l.pathbar.thickness,E=l.marker.line.width+HXt.gapWithPathbar,S=l.pathbar.visible?l.pathbar.side.indexOf("bottom")>-1?T+E:-(y+E):0,C={x0:A,x1:A,y0:S,y1:S+y},k=function(re,pe,we){var Fe=l.tiling.pad,Se=function(Oe){return Oe-Fe<=pe.x0},ke=function(Oe){return Oe+Fe>=pe.x1},_e=function(Oe){return Oe-Fe<=pe.y0},Ie=function(Oe){return Oe+Fe>=pe.y1};return re.x0===pe.x0&&re.x1===pe.x1&&re.y0===pe.y0&&re.y1===pe.y1?{x0:re.x0,x1:re.x1,y0:re.y0,y1:re.y1}:{x0:Se(re.x0-Fe)?0:ke(re.x0-Fe)?we[0]:re.x0,x1:Se(re.x1+Fe)?0:ke(re.x1+Fe)?we[0]:re.x1,y0:_e(re.y0-Fe)?0:Ie(re.y0-Fe)?we[1]:re.y0,y1:_e(re.y1+Fe)?0:Ie(re.y1+Fe)?we[1]:re.y1}},D=null,F={},P={},R=null,L=function(re,pe){return pe?F[mb(re)]:P[mb(re)]},I=function(re,pe,we,Fe){if(pe)return F[mb(f)]||C;var Se=P[l.level]||we;return b(re)?k(re,Se,Fe):{}};s.hasMultipleRoots&&m&&w++,l._maxDepth=w,l._backgroundColor=o.paper_bgcolor,l._entryDepth=h.data.depth,l._atRootLevel=m;var B=-x/2+_.l+_.w*(M.x[1]+M.x[0])/2,O=-T/2+_.t+_.h*(1-(M.y[1]+M.y[0])/2),$=function(re){return B+re},Y=function(re){return O+re},K=Y(0),j=$(0),q=function(re){return j+re},J=function(re){return K+re};function U(re,pe){return re+","+pe}var V=q(0),X=function(re){re.x=Math.max(V,re.x)},H=l.pathbar.edgeshape,G=function(re){var pe=q(Math.max(Math.min(re.x0,re.x0),0)),we=q(Math.min(Math.max(re.x1,re.x1),A)),Fe=J(re.y0),Se=J(re.y1),ke=y/2,_e={},Ie={};_e.x=pe,Ie.x=we,_e.y=Ie.y=(Fe+Se)/2;var Oe={x:pe,y:Fe},Qe={x:we,y:Fe},et={x:we,y:Se},_t={x:pe,y:Se};return H===">"?(Oe.x-=ke,Qe.x-=ke,et.x-=ke,_t.x-=ke):H==="/"?(et.x-=ke,_t.x-=ke,_e.x-=ke/2,Ie.x-=ke/2):H==="\\"?(Oe.x-=ke,Qe.x-=ke,_e.x-=ke/2,Ie.x-=ke/2):H==="<"&&(_e.x-=ke,Ie.x-=ke),X(Oe),X(_t),X(_e),X(Qe),X(et),X(Ie),"M"+U(Oe.x,Oe.y)+"L"+U(Qe.x,Qe.y)+"L"+U(Ie.x,Ie.y)+"L"+U(et.x,et.y)+"L"+U(_t.x,_t.y)+"L"+U(_e.x,_e.y)+"Z"},Q=l[c?"tiling":"marker"].pad,te=function(re){return l.textposition.indexOf(re)!==-1},ce=te("top"),ge=te("left"),Ce=te("right"),be=te("bottom"),he=function(re){var pe=$(re.x0),we=$(re.x1),Fe=Y(re.y0),Se=Y(re.y1),ke=we-pe,_e=Se-Fe;if(!ke||!_e)return"";var Ie=l.marker.cornerradius||0,Oe=Math.min(Ie,ke/2,_e/2);Oe&&re.data&&re.data.data&&re.data.data.label&&(ce&&(Oe=Math.min(Oe,Q.t)),ge&&(Oe=Math.min(Oe,Q.l)),Ce&&(Oe=Math.min(Oe,Q.r)),be&&(Oe=Math.min(Oe,Q.b)));var Qe=function(et,_t){return Oe?"a"+U(Oe,Oe)+" 0 0 1 "+U(et,_t):""};return"M"+U(pe,Fe+Oe)+Qe(Oe,-Oe)+"L"+U(we-Oe,Fe)+Qe(Oe,Oe)+"L"+U(we,Se-Oe)+Qe(-Oe,Oe)+"L"+U(pe+Oe,Se)+Qe(-Oe,-Oe)+"Z"},oe=function(re,pe){var we=re.x0,Fe=re.x1,Se=re.y0,ke=re.y1,_e=re.textBB,Ie=ce||pe.isHeader&&!be,Oe=Ie?"start":be?"end":"middle",Qe=te("right"),et=te("left")||pe.onPathbar,_t=et?-1:Qe?1:0;if(pe.isHeader){if(we+=(c?Q:Q.l)-Zze,Fe-=(c?Q:Q.r)-Zze,we>=Fe){var ut=(we+Fe)/2;we=ut,Fe=ut}var vt;be?(vt=ke-(c?Q:Q.b),Se<vt&&vt<ke&&(Se=vt)):(vt=Se+(c?Q:Q.t),Se<vt&&vt<ke&&(ke=vt))}var Xe=VXt(we,Fe,Se,ke,_e,{isHorizontal:!1,constrained:!0,angle:0,anchor:Oe,leftToRight:_t});return Xe.fontSize=pe.fontSize,Xe.targetX=$(Xe.targetX),Xe.targetY=Y(Xe.targetY),isNaN(Xe.targetX)||isNaN(Xe.targetY)?{}:(we!==Fe&&Se!==ke&&TK(l.type,Xe,o),{scale:Xe.scale,rotate:Xe.rotate,textX:Xe.textX,textY:Xe.textY,anchorX:Xe.anchorX,anchorY:Xe.anchorY,targetX:Xe.targetX,targetY:Xe.targetY})},Ee=function(re,pe){for(var we,Fe=0,Se=re;!we&&Fe<w;)Fe++,Se=Se.parent,Se?we=L(Se,pe):Fe=w;return we||{}},ye=function(re,pe,we,Fe){var Se=L(re,pe),ke;if(pe)ke=C;else{var _e=L(h,pe);_e?ke=k(re,_e,Fe):ke={}}return wK(Se,ke)},ue=function(re,pe,we,Fe,Se){var ke=L(re,pe),_e;if(ke)_e=ke;else if(pe)_e=C;else if(D)if(re.parent){var Ie=R||we;Ie&&!pe?_e=k(re,Ie,Fe):(_e={},iE.extendFlat(_e,Ee(re,pe)))}else _e=iE.extendFlat({},re),c&&(Se.orientation==="h"?Se.flipX?_e.x0=re.x1:_e.x1=0:Se.flipY?_e.y0=re.y1:_e.y1=0);else _e={};return wK(_e,{x0:re.x0,x1:re.x1,y0:re.y0,y1:re.y1})},ee=function(re,pe,we,Fe){var Se=L(re,pe),ke={},_e=I(re,pe,we,Fe);iE.extendFlat(ke,{transform:oe({x0:_e.x0,x1:_e.x1,y0:_e.y0,y1:_e.y1,textBB:re.textBB,_text:re._text},{isHeader:x2.isHeader(re,l)})}),Se?ke=Se:re.parent&&iE.extendFlat(ke,Ee(re,pe));var Ie=re.transform;return re.x0!==re.x1&&re.y0!==re.y1&&TK(l.type,Ie,o),wK(ke,{transform:{scale:Ie.scale,rotate:Ie.rotate,textX:Ie.textX,textY:Ie.textY,anchorX:Ie.anchorX,anchorY:Ie.anchorY,targetX:Ie.targetX,targetY:Ie.targetY}})},ae=function(re,pe,we,Fe,Se){var ke=Fe[0],_e=Fe[1];g?re.exit().transition().each(function(){var Ie=Xze.select(this),Oe=Ie.select("path.surface");Oe.transition().attrTween("d",function(et){var _t=ye(et,pe,we,[ke,_e]);return function(ut){return Se(_t(ut))}});var Qe=Ie.select("g.slicetext");Qe.attr("opacity",0)}).remove():re.exit().remove()},xe=function(re){var pe=re.transform;return re.x0!==re.x1&&re.y0!==re.y1&&TK(l.type,pe,o),iE.getTextTransform({textX:pe.textX,textY:pe.textY,anchorX:pe.anchorX,anchorY:pe.anchorY,targetX:pe.targetX,targetY:pe.targetY,scale:pe.scale,rotate:pe.rotate})};g&&(p.each(function(re){F[mb(re)]={x0:re.x0,x1:re.x1,y0:re.y0,y1:re.y1},re.transform&&(F[mb(re)].transform={textX:re.transform.textX,textY:re.transform.textY,anchorX:re.transform.anchorX,anchorY:re.transform.anchorY,targetX:re.transform.targetX,targetY:re.transform.targetY,scale:re.transform.scale,rotate:re.transform.rotate})}),v.each(function(re){P[mb(re)]={x0:re.x0,x1:re.x1,y0:re.y0,y1:re.y1},re.transform&&(P[mb(re)].transform={textX:re.transform.textX,textY:re.transform.textY,anchorX:re.transform.anchorX,anchorY:re.transform.anchorY,targetX:re.transform.targetX,targetY:re.transform.targetY,scale:re.transform.scale,rotate:re.transform.rotate}),!D&&x2.isEntry(re)&&(D=re)})),R=a(t,r,h,v,{width:x,height:T,viewX:$,viewY:Y,pathSlice:he,toMoveInsideSlice:oe,prevEntry:D,makeUpdateSliceInterpolator:ue,makeUpdateTextInterpolator:ee,handleSlicesExit:ae,hasTransition:g,strTransform:xe}),l.pathbar.visible?jXt(t,r,h,p,{barDifY:S,width:A,height:y,viewX:q,viewY:J,pathSlice:G,toMoveInsideSlice:oe,makeUpdateSliceInterpolator:ue,makeUpdateTextInterpolator:ee,handleSlicesExit:ae,hasTransition:g,strTransform:xe}):p.remove()}});var AK=W((BGr,eBe)=>{"use strict";var $Xt=vi(),WXt=am(),YXt=Qc(),XXt=YXt.clearMinTextSize,ZXt=Ed().resizeText,Qze=Jze();eBe.exports=function(t,r,i,n,a){var o=a.type,s=a.drawDescendants,l=t._fullLayout,u=l["_"+o+"layer"],c,f,h=!i;if(XXt(o,l),c=u.selectAll("g.trace."+o).data(r,function(p){return p[0].trace.uid}),c.enter().append("g").classed("trace",!0).classed(o,!0),c.order(),!l.uniformtext.mode&&WXt.hasTransition(i)){n&&(f=n());var d=$Xt.transition().duration(i.duration).ease(i.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()});d.each(function(){u.selectAll("g.trace").each(function(p){Qze(t,p,this,i,s)})})}else c.each(function(p){Qze(t,p,this,i,s)}),l.uniformtext.mode&&ZXt(t,u.selectAll(".trace"),o);h&&c.exit().remove()}});var aBe=W((qGr,nBe)=>{"use strict";var tBe=vi(),pI=it(),rBe=Ji(),KXt=uo(),JXt=yK(),iBe=hI().styleOne,MK=vb(),_2=am(),QXt=tE(),eZt=cI().formatSliceLabel,SK=!1;nBe.exports=function(t,r,i,n,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,p=a.handleSlicesExit,v=a.makeUpdateSliceInterpolator,m=a.makeUpdateTextInterpolator,g=a.prevEntry,w={},b=t._context.staticPlot,_=t._fullLayout,M=r[0],x=M.trace,T=x.textposition.indexOf("left")!==-1,A=x.textposition.indexOf("right")!==-1,y=x.textposition.indexOf("bottom")!==-1,E=!y&&!x.marker.pad.t||y&&!x.marker.pad.b,S=JXt(i,[o,s],{packing:x.tiling.packing,squarifyratio:x.tiling.squarifyratio,flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1,pad:{inner:x.tiling.pad,top:x.marker.pad.t,left:x.marker.pad.l,right:x.marker.pad.r,bottom:x.marker.pad.b}}),C=S.descendants(),k=1/0,D=-1/0;C.forEach(function(I){var B=I.depth;B>=x._maxDepth?(I.x0=I.x1=(I.x0+I.x1)/2,I.y0=I.y1=(I.y0+I.y1)/2):(k=Math.min(k,B),D=Math.max(D,B))}),n=n.data(C,_2.getPtId),x._maxVisibleLayers=isFinite(D)?D-k+1:0,n.enter().append("g").classed("slice",!0),p(n,SK,w,[o,s],c),n.order();var F=null;if(d&&g){var P=_2.getPtId(g);n.each(function(I){F===null&&_2.getPtId(I)===P&&(F={x0:I.x0,x1:I.x1,y0:I.y0,y1:I.y1})})}var R=function(){return F||{x0:0,x1:o,y0:0,y1:s}},L=n;return d&&(L=L.transition().each("end",function(){var I=tBe.select(this);_2.setSliceCursor(I,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),L.each(function(I){var B=_2.isHeader(I,x);I._x0=l(I.x0),I._x1=l(I.x1),I._y0=u(I.y0),I._y1=u(I.y1),I._hoverX=l(I.x1-x.marker.pad.r),I._hoverY=u(y?I.y1-x.marker.pad.b/2:I.y0+x.marker.pad.t/2);var O=tBe.select(this),$=pI.ensureSingle(O,"path","surface",function(U){U.style("pointer-events",b?"none":"all")});d?$.transition().attrTween("d",function(U){var V=v(U,SK,R(),[o,s]);return function(X){return c(V(X))}}):$.attr("d",c),O.call(QXt,i,t,r,{styleOne:iBe,eventDataKeys:MK.eventDataKeys,transitionTime:MK.CLICK_TRANSITION_TIME,transitionEasing:MK.CLICK_TRANSITION_EASING}).call(_2.setSliceCursor,t,{isTransitioning:t._transitioning}),$.call(iBe,I,x,t,{hovered:!1}),I.x0===I.x1||I.y0===I.y1?I._text="":B?I._text=E?"":_2.getPtLabel(I)||"":I._text=eZt(I,i,x,r,_)||"";var Y=pI.ensureSingle(O,"g","slicetext"),K=pI.ensureSingle(Y,"text","",function(U){U.attr("data-notex",1)}),j=pI.ensureUniformFontSize(t,_2.determineTextFont(x,I,_.font)),q=I._text||" ",J=B&&q.indexOf("<br>")===-1;K.text(q).classed("slicetext",!0).attr("text-anchor",A?"end":T||J?"start":"middle").call(rBe.font,j).call(KXt.convertToTspans,t),I.textBB=rBe.bBox(K.node()),I.transform=f(I,{fontSize:j.size,isHeader:B}),I.transform.fontSize=j.size,d?K.transition().attrTween("transform",function(U){var V=m(U,SK,R(),[o,s]);return function(X){return h(V(X))}}):K.attr("transform",h(I))}),F}});var sBe=W((OGr,oBe)=>{"use strict";var tZt=AK(),rZt=aBe();oBe.exports=function(t,r,i,n){return tZt(t,r,i,n,{type:"treemap",drawDescendants:rZt})}});var uBe=W((NGr,lBe)=>{"use strict";lBe.exports={moduleType:"trace",name:"treemap",basePlotModule:Mze(),categories:[],animatable:!0,attributes:fI(),layoutAttributes:pK(),supplyDefaults:Ize(),supplyLayoutDefaults:zze(),calc:gK().calc,crossTraceCalc:gK().crossTraceCalc,plot:sBe(),style:hI().style,colorbar:Ac(),meta:{}}});var fBe=W((UGr,cBe)=>{"use strict";cBe.exports=uBe()});var dBe=W(b4=>{"use strict";var hBe=Ko();b4.name="icicle";b4.plot=function(e,t,r,i){hBe.plotBasePlot(b4.name,e,t,r,i)};b4.clean=function(e,t,r,i){hBe.cleanBasePlot(b4.name,e,t,r,i)}});var EK=W((GGr,gBe)=>{"use strict";var{hovertemplateAttrs:iZt,texttemplateAttrs:nZt,templatefallbackAttrs:pBe}=Ga(),aZt=Eo(),oZt=us().attributes,nE=nb(),F0=US(),vI=fI(),vBe=vb(),sZt=tn().extendFlat,lZt=Du().pattern;gBe.exports={labels:F0.labels,parents:F0.parents,values:F0.values,branchvalues:F0.branchvalues,count:F0.count,level:F0.level,maxdepth:F0.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:vI.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:sZt({colors:F0.marker.colors,line:F0.marker.line,pattern:lZt,editType:"calc"},aZt("marker",{colorAttr:"colors",anim:!1})),leaf:F0.leaf,pathbar:vI.pathbar,text:nE.text,textinfo:F0.textinfo,texttemplate:nZt({editType:"plot"},{keys:vBe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:pBe({editType:"plot"}),hovertext:nE.hovertext,hoverinfo:F0.hoverinfo,hovertemplate:iZt({},{keys:vBe.eventDataKeys}),hovertemplatefallback:pBe(),textfont:nE.textfont,insidetextfont:nE.insidetextfont,outsidetextfont:vI.outsidetextfont,textposition:vI.textposition,sort:nE.sort,root:F0.root,domain:oZt({name:"icicle",trace:!0,editType:"calc"})}});var kK=W((HGr,mBe)=>{"use strict";mBe.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var bBe=W((jGr,_Be)=>{"use strict";var yBe=it(),uZt=EK(),cZt=ni(),fZt=us().defaults,hZt=E0().handleText,dZt=Uy().TEXTPAD,pZt=ab().handleMarkerDefaults,xBe=Jo(),vZt=xBe.hasColorscale,gZt=xBe.handleDefaults;_Be.exports=function(t,r,i,n){function a(d,p){return yBe.coerce(t,r,uZt,d,p)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),a("tiling.orientation"),a("tiling.flip"),a("tiling.pad");var u=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",yBe.isArrayOrTypedArray(u)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var c=a("pathbar.visible"),f="auto";hZt(t,r,n,a,f,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition"),pZt(t,r,n,a);var h=r._hasColorscale=vZt(t,"marker","colors")||(t.marker||{}).coloraxis;h&&gZt(t,r,n,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",h?1:.7),r._hovered={marker:{line:{width:2,color:cZt.contrast(n.paper_bgcolor)}}},c&&(a("pathbar.thickness",r.pathbar.textfont.size+2*dZt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),fZt(r,n,a),r._length=null}});var TBe=W(($Gr,wBe)=>{"use strict";var mZt=it(),yZt=kK();wBe.exports=function(t,r){function i(n,a){return mZt.coerce(t,r,yZt,n,a)}i("iciclecolorway",r.colorway),i("extendiciclecolors")}});var DK=W(CK=>{"use strict";var ABe=HS();CK.calc=function(e,t){return ABe.calc(e,t)};CK.crossTraceCalc=function(e){return ABe._runCrossTraceCalc("icicle",e)}});var SBe=W((YGr,MBe)=>{"use strict";var xZt=VS(),_Zt=mK();MBe.exports=function(t,r,i){var n=i.flipX,a=i.flipY,o=i.orientation==="h",s=i.maxDepth,l=r[0],u=r[1];s&&(l=(t.height+1)*r[0]/Math.min(t.height+1,s),u=(t.height+1)*r[1]/Math.min(t.height+1,s));var c=xZt.partition().padding(i.pad.inner).size(o?[r[1],l]:[r[0],u])(t);return(o||n||a)&&_Zt(c,r,{swapXY:o,flipX:n,flipY:a}),c}});var FK=W((XGr,FBe)=>{"use strict";var EBe=vi(),kBe=ni(),CBe=it(),bZt=Qc().resizeText,wZt=lI();function TZt(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");bZt(e,t,"icicle"),t.each(function(r){var i=EBe.select(this),n=r[0],a=n.trace;i.style("opacity",a.opacity),i.selectAll("path.surface").each(function(o){EBe.select(this).call(DBe,o,a,e)})})}function DBe(e,t,r,i){var n=t.data.data,a=!t.children,o=n.i,s=CBe.castOption(r,o,"marker.line.color")||kBe.defaultLine,l=CBe.castOption(r,o,"marker.line.width")||0;e.call(wZt,t,r,i).style("stroke-width",l).call(kBe.stroke,s).style("opacity",a?r.leaf.opacity:null)}FBe.exports={style:TZt,styleOne:DBe}});var zBe=W((ZGr,RBe)=>{"use strict";var LBe=vi(),gI=it(),PBe=Ji(),AZt=uo(),MZt=SBe(),IBe=FK().styleOne,LK=vb(),w4=am(),SZt=tE(),EZt=cI().formatSliceLabel,PK=!1;RBe.exports=function(t,r,i,n,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,p=a.handleSlicesExit,v=a.makeUpdateSliceInterpolator,m=a.makeUpdateTextInterpolator,g=a.prevEntry,w={},b=t._context.staticPlot,_=t._fullLayout,M=r[0],x=M.trace,T=x.textposition.indexOf("left")!==-1,A=x.textposition.indexOf("right")!==-1,y=x.textposition.indexOf("bottom")!==-1,E=MZt(i,[o,s],{flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1,orientation:x.tiling.orientation,pad:{inner:x.tiling.pad},maxDepth:x._maxDepth}),S=E.descendants(),C=1/0,k=-1/0;S.forEach(function(L){var I=L.depth;I>=x._maxDepth?(L.x0=L.x1=(L.x0+L.x1)/2,L.y0=L.y1=(L.y0+L.y1)/2):(C=Math.min(C,I),k=Math.max(k,I))}),n=n.data(S,w4.getPtId),x._maxVisibleLayers=isFinite(k)?k-C+1:0,n.enter().append("g").classed("slice",!0),p(n,PK,w,[o,s],c),n.order();var D=null;if(d&&g){var F=w4.getPtId(g);n.each(function(L){D===null&&w4.getPtId(L)===F&&(D={x0:L.x0,x1:L.x1,y0:L.y0,y1:L.y1})})}var P=function(){return D||{x0:0,x1:o,y0:0,y1:s}},R=n;return d&&(R=R.transition().each("end",function(){var L=LBe.select(this);w4.setSliceCursor(L,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),R.each(function(L){L._x0=l(L.x0),L._x1=l(L.x1),L._y0=u(L.y0),L._y1=u(L.y1),L._hoverX=l(L.x1-x.tiling.pad),L._hoverY=u(y?L.y1-x.tiling.pad/2:L.y0+x.tiling.pad/2);var I=LBe.select(this),B=gI.ensureSingle(I,"path","surface",function(K){K.style("pointer-events",b?"none":"all")});d?B.transition().attrTween("d",function(K){var j=v(K,PK,P(),[o,s],{orientation:x.tiling.orientation,flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1});return function(q){return c(j(q))}}):B.attr("d",c),I.call(SZt,i,t,r,{styleOne:IBe,eventDataKeys:LK.eventDataKeys,transitionTime:LK.CLICK_TRANSITION_TIME,transitionEasing:LK.CLICK_TRANSITION_EASING}).call(w4.setSliceCursor,t,{isTransitioning:t._transitioning}),B.call(IBe,L,x,t,{hovered:!1}),L.x0===L.x1||L.y0===L.y1?L._text="":L._text=EZt(L,i,x,r,_)||"";var O=gI.ensureSingle(I,"g","slicetext"),$=gI.ensureSingle(O,"text","",function(K){K.attr("data-notex",1)}),Y=gI.ensureUniformFontSize(t,w4.determineTextFont(x,L,_.font));$.text(L._text||" ").classed("slicetext",!0).attr("text-anchor",A?"end":T?"start":"middle").call(PBe.font,Y).call(AZt.convertToTspans,t),L.textBB=PBe.bBox($.node()),L.transform=f(L,{fontSize:Y.size}),L.transform.fontSize=Y.size,d?$.transition().attrTween("transform",function(K){var j=m(K,PK,P(),[o,s]);return function(q){return h(j(q))}}):$.attr("transform",h(L))}),D}});var qBe=W((KGr,BBe)=>{"use strict";var kZt=AK(),CZt=zBe();BBe.exports=function(t,r,i,n){return kZt(t,r,i,n,{type:"icicle",drawDescendants:CZt})}});var NBe=W((JGr,OBe)=>{"use strict";OBe.exports={moduleType:"trace",name:"icicle",basePlotModule:dBe(),categories:[],animatable:!0,attributes:EK(),layoutAttributes:kK(),supplyDefaults:bBe(),supplyLayoutDefaults:TBe(),calc:DK().calc,crossTraceCalc:DK().crossTraceCalc,plot:qBe(),style:FK().style,colorbar:Ac(),meta:{}}});var VBe=W((QGr,UBe)=>{"use strict";UBe.exports=NBe()});var HBe=W(T4=>{"use strict";var GBe=Ko();T4.name="funnelarea";T4.plot=function(e,t,r,i){GBe.plotBasePlot(T4.name,e,t,r,i)};T4.clean=function(e,t,r,i){GBe.cleanBasePlot(T4.name,e,t,r,i)}});var IK=W((tHr,$Be)=>{"use strict";var Cc=nb(),DZt=Wa(),FZt=us().attributes,{hovertemplateAttrs:LZt,texttemplateAttrs:PZt,templatefallbackAttrs:jBe}=Ga(),yb=tn().extendFlat;$Be.exports={labels:Cc.labels,label0:Cc.label0,dlabel:Cc.dlabel,values:Cc.values,marker:{colors:Cc.marker.colors,line:{color:yb({},Cc.marker.line.color,{dflt:null}),width:yb({},Cc.marker.line.width,{dflt:1}),editType:"calc"},pattern:Cc.marker.pattern,editType:"calc"},text:Cc.text,hovertext:Cc.hovertext,scalegroup:yb({},Cc.scalegroup,{}),textinfo:yb({},Cc.textinfo,{flags:["label","text","value","percent"]}),texttemplate:PZt({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:jBe({editType:"plot"}),hoverinfo:yb({},DZt.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:LZt({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:jBe(),textposition:yb({},Cc.textposition,{values:["inside","none"],dflt:"inside"}),textfont:Cc.textfont,insidetextfont:Cc.insidetextfont,title:{text:Cc.title.text,font:Cc.title.font,position:yb({},Cc.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:FZt({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}});var RK=W((rHr,WBe)=>{"use strict";var IZt=BP().hiddenlabels;WBe.exports={hiddenlabels:IZt,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var ZBe=W((iHr,XBe)=>{"use strict";var YBe=it(),RZt=IK(),zZt=us().defaults,BZt=E0().handleText,qZt=ab().handleLabelsAndValues,OZt=ab().handleMarkerDefaults;XBe.exports=function(t,r,i,n){function a(v,m){return YBe.coerce(t,r,RZt,v,m)}var o=a("labels"),s=a("values"),l=qZt(o,s),u=l.len;if(r._hasLabels=l.hasLabels,r._hasValues=l.hasValues,!r._hasLabels&&r._hasValues&&(a("label0"),a("dlabel")),!u){r.visible=!1;return}r._length=u,OZt(t,r,n,a),a("scalegroup");var c=a("text"),f=a("texttemplate");a("texttemplatefallback");var h;if(f||(h=a("textinfo",Array.isArray(c)?"text+percent":"percent")),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),f||h&&h!=="none"){var d=a("textposition");BZt(t,r,n,a,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else h==="none"&&a("textposition","none");zZt(r,n,a);var p=a("title.text");p&&(a("title.position"),YBe.coerceFont(a,"title.font",n.font)),a("aspectratio"),a("baseratio")}});var JBe=W((nHr,KBe)=>{"use strict";var NZt=it(),UZt=RK();KBe.exports=function(t,r){function i(n,a){return NZt.coerce(t,r,UZt,n,a)}i("hiddenlabels"),i("funnelareacolorway",r.colorway),i("extendfunnelareacolors")}});var zK=W((aHr,eqe)=>{"use strict";var QBe=a4();function VZt(e,t){return QBe.calc(e,t)}function GZt(e){QBe.crossTraceCalc(e,{type:"funnelarea"})}eqe.exports={calc:VZt,crossTraceCalc:GZt}});var aqe=W((oHr,nqe)=>{"use strict";var xb=vi(),BK=Ji(),b2=it(),HZt=b2.strScale,tqe=b2.strTranslate,rqe=uo(),jZt=I_(),$Zt=jZt.toMoveInsideBar,iqe=Qc(),WZt=iqe.recordMinTextSize,YZt=iqe.clearMinTextSize,XZt=Ly(),A4=UP(),ZZt=A4.attachFxHandlers,KZt=A4.determineInsideTextFont,JZt=A4.layoutAreas,QZt=A4.prerenderTitles,eKt=A4.positionTitleOutside,tKt=A4.formatSliceLabel;nqe.exports=function(t,r){var i=t._context.staticPlot,n=t._fullLayout;YZt("funnelarea",n),QZt(r,t),JZt(r,n._size),b2.makeTraceGroups(n._funnelarealayer,r,"trace").each(function(a){var o=xb.select(this),s=a[0],l=s.trace;iKt(a),o.each(function(){var u=xb.select(this).selectAll("g.slice").data(a);u.enter().append("g").classed("slice",!0),u.exit().remove(),u.each(function(f,h){if(f.hidden){xb.select(this).selectAll("path,g").remove();return}f.pointNumber=f.i,f.curveNumber=l.index;var d=s.cx,p=s.cy,v=xb.select(this),m=v.selectAll("path.surface").data([f]);m.enter().append("path").classed("surface",!0).style({"pointer-events":i?"none":"all"}),v.call(ZZt,t,a);var g="M"+(d+f.TR[0])+","+(p+f.TR[1])+qK(f.TR,f.BR)+qK(f.BR,f.BL)+qK(f.BL,f.TL)+"Z";m.attr("d",g),tKt(t,f,s);var w=XZt.castOption(l.textposition,f.pts),b=v.selectAll("g.slicetext").data(f.text&&w!=="none"?[0]:[]);b.enter().append("g").classed("slicetext",!0),b.exit().remove(),b.each(function(){var _=b2.ensureSingle(xb.select(this),"text","",function(C){C.attr("data-notex",1)}),M=b2.ensureUniformFontSize(t,KZt(l,f,n.font));_.text(f.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(BK.font,M).call(rqe.convertToTspans,t);var x=BK.bBox(_.node()),T,A,y,E=Math.min(f.BL[1],f.BR[1])+p,S=Math.max(f.TL[1],f.TR[1])+p;A=Math.max(f.TL[0],f.BL[0])+d,y=Math.min(f.TR[0],f.BR[0])+d,T=$Zt(A,y,E,S,x,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),T.fontSize=M.size,WZt(l.type,T,n),a[h].transform=T,b2.setTransormAndDisplay(_,T)})});var c=xb.select(this).selectAll("g.titletext").data(l.title.text?[0]:[]);c.enter().append("g").classed("titletext",!0),c.exit().remove(),c.each(function(){var f=b2.ensureSingle(xb.select(this),"text","",function(p){p.attr("data-notex",1)}),h=l.title.text;l._meta&&(h=b2.templateString(h,l._meta)),f.text(h).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(BK.font,l.title.font).call(rqe.convertToTspans,t);var d=eKt(s,n._size);f.attr("transform",tqe(d.x,d.y)+HZt(Math.min(1,d.scale))+tqe(d.tx,d.ty))})})})};function qK(e,t){var r=t[0]-e[0],i=t[1]-e[1];return"l"+r+","+i}function rKt(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function iKt(e){if(!e.length)return;var t=e[0],r=t.trace,i=r.aspectratio,n=r.baseratio;n>.999&&(n=.999);var a=Math.pow(n,2),o=t.vTotal,s=o*a/(1-a),l=o,u=s/o;function c(){var k=Math.sqrt(u);return{x:k,y:-k}}function f(){var k=c();return[k.x,k.y]}var h,d=[];d.push(f());var p,v;for(p=e.length-1;p>-1;p--)if(v=e[p],!v.hidden){var m=v.v/l;u+=m,d.push(f())}var g=1/0,w=-1/0;for(p=0;p<d.length;p++)h=d[p],g=Math.min(g,h[1]),w=Math.max(w,h[1]);for(p=0;p<d.length;p++)d[p][1]-=(w+g)/2;var b=d[d.length-1][0],_=t.r,M=(w-g)/2,x=_/b,T=_/M*i;for(t.r=T*M,p=0;p<d.length;p++)d[p][0]*=x,d[p][1]*=T;h=d[0];var A=[-h[0],h[1]],y=[h[0],h[1]],E=0;for(p=e.length-1;p>-1;p--)if(v=e[p],!v.hidden){E+=1;var S=d[E][0],C=d[E][1];v.TL=[-S,C],v.TR=[S,C],v.BL=A,v.BR=y,v.pxmid=rKt(v.TR,v.BR),A=v.TL,y=v.TR}}});var lqe=W((sHr,sqe)=>{"use strict";var oqe=vi(),nKt=Sw(),aKt=Qc().resizeText;sqe.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");aKt(t,r,"funnelarea"),r.each(function(i){var n=i[0],a=n.trace,o=oqe.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){oqe.select(this).call(nKt,s,a,t)})})}});var cqe=W((lHr,uqe)=>{"use strict";uqe.exports={moduleType:"trace",name:"funnelarea",basePlotModule:HBe(),categories:["pie-like","funnelarea","showLegend"],attributes:IK(),layoutAttributes:RK(),supplyDefaults:ZBe(),supplyLayoutDefaults:JBe(),calc:zK().calc,crossTraceCalc:zK().crossTraceCalc,plot:aqe(),style:lqe(),styleOne:Sw(),meta:{}}});var hqe=W((uHr,fqe)=>{"use strict";fqe.exports=cqe()});var nc=W((cHr,dqe)=>{"use strict";(()=>{var e={3065(n,a,o){n.exports={alpha_shape:o(3502),convex_hull:o(7352),delaunay_triangulate:o(7642),gl_cone3d:o(6405),gl_error3d:o(9165),gl_line3d:o(5714),gl_mesh3d:o(7201),gl_plot3d:o(4100),gl_scatter3d:o(8418),gl_streamtube3d:o(7815),gl_surface3d:o(9499),ndarray:o(9618),ndarray_linear_interpolate:o(4317)}},6296(n,a,o){"use strict";n.exports=h;var s=o(7261),l=o(9977),u=o(1811);function c(d,p){this._controllerNames=Object.keys(d),this._controllerList=this._controllerNames.map(function(v){return d[v]}),this._mode=p,this._active=d[p],this._active||(this._mode="turntable",this._active=d.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var f=c.prototype;f.flush=function(d){for(var p=this._controllerList,v=0;v<p.length;++v)p[v].flush(d)},f.idle=function(d){for(var p=this._controllerList,v=0;v<p.length;++v)p[v].idle(d)},f.lookAt=function(d,p,v,m){for(var g=this._controllerList,w=0;w<g.length;++w)g[w].lookAt(d,p,v,m)},f.rotate=function(d,p,v,m){for(var g=this._controllerList,w=0;w<g.length;++w)g[w].rotate(d,p,v,m)},f.pan=function(d,p,v,m){for(var g=this._controllerList,w=0;w<g.length;++w)g[w].pan(d,p,v,m)},f.translate=function(d,p,v,m){for(var g=this._controllerList,w=0;w<g.length;++w)g[w].translate(d,p,v,m)},f.setMatrix=function(d,p){for(var v=this._controllerList,m=0;m<v.length;++m)v[m].setMatrix(d,p)},f.setDistanceLimits=function(d,p){for(var v=this._controllerList,m=0;m<v.length;++m)v[m].setDistanceLimits(d,p)},f.setDistance=function(d,p){for(var v=this._controllerList,m=0;m<v.length;++m)v[m].setDistance(d,p)},f.recalcMatrix=function(d){this._active.recalcMatrix(d)},f.getDistance=function(d){return this._active.getDistance(d)},f.getDistanceLimits=function(d){return this._active.getDistanceLimits(d)},f.lastT=function(){return this._active.lastT()},f.setMode=function(d){if(d!==this._mode){var p=this._controllerNames.indexOf(d);if(!(p<0)){var v=this._active,m=this._controllerList[p],g=Math.max(v.lastT(),m.lastT());v.recalcMatrix(g),m.setMatrix(g,v.computedMatrix),this._active=m,this._mode=d,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}}},f.getMode=function(){return this._mode};function h(d){d=d||{};var p=d.eye||[0,0,1],v=d.center||[0,0,0],m=d.up||[0,1,0],g=d.distanceLimits||[0,1/0],w=d.mode||"turntable",b=s(),_=l(),M=u();return b.setDistanceLimits(g[0],g[1]),b.lookAt(0,p,v,m),_.setDistanceLimits(g[0],g[1]),_.lookAt(0,p,v,m),M.setDistanceLimits(g[0],g[1]),M.lookAt(0,p,v,m),new c({turntable:b,orbit:_,matrix:M},w)}},7169(n,a,o){"use strict";var s=typeof WeakMap=="undefined"?o(1538):WeakMap,l=o(2762),u=o(8116),c=new s;function f(h){var d=c.get(h),p=d&&(d._triangleBuffer.handle||d._triangleBuffer.buffer);if(!p||!h.isBuffer(p)){var v=l(h,new Float32Array([-1,-1,-1,4,4,-1]));d=u(h,[{buffer:v,type:h.FLOAT,size:2}]),d._triangleBuffer=v,c.set(h,d)}d.bind(),h.drawArrays(h.TRIANGLES,0,3),d.unbind()}n.exports=f},1085(n,a,o){var s=o(1371);n.exports=l;function l(u,c,f){c=typeof c=="number"?c:1,f=f||": ";var h=u.split(/\r?\n/),d=String(h.length+c-1).length;return h.map(function(p,v){var m=v+c,g=String(m).length,w=s(m,d-g);return w+f+p}).join(`
`)}},3952(n,a,o){"use strict";n.exports=u;var s=o(3250);function l(c,f){for(var h=new Array(f+1),d=0;d<c.length;++d)h[d]=c[d];for(var d=0;d<=c.length;++d){for(var p=c.length;p<=f;++p){for(var v=new Array(f),m=0;m<f;++m)v[m]=Math.pow(p+1-d,m);h[p]=v}var g=s.apply(void 0,h);if(g)return!0}return!1}function u(c){var f=c.length;if(f===0)return[];if(f===1)return[0];for(var h=c[0].length,d=[c[0]],p=[0],v=1;v<f;++v){if(d.push(c[v]),!l(d,h)){d.pop();continue}if(p.push(v),p.length===h+1)return p}return p}},5995(n,a,o){"use strict";n.exports=u;var s=o(7642),l=o(6037);function u(c,f){return s(f).filter(function(h){for(var d=new Array(h.length),p=0;p<h.length;++p)d[p]=f[h[p]];return l(d)*c<1})}},3502(n,a,o){n.exports=u;var s=o(5995),l=o(9127);function u(c,f){return l(s(c,f))}},6468(n){n.exports=function(o){return atob(o)}},2642(n,a,o){"use strict";n.exports=u;var s=o(727);function l(c){for(var f=0,h=0;h<c.length;++h)f+=c[h];return f}function u(c,f){for(var h=f.length,d=new Array(h+1),p=0;p<h;++p){for(var v=new Array(h+1),m=0;m<=h;++m)v[m]=c[m][p];d[p]=v}d[h]=new Array(h+1);for(var p=0;p<=h;++p)d[h][p]=1;for(var g=new Array(h+1),p=0;p<h;++p)g[p]=f[p];g[h]=1;var w=s(d,g),b=l(w[h+1]);b===0&&(b=1);for(var _=new Array(h+1),p=0;p<=h;++p)_[p]=l(w[p])/b;return _}},7507(n,a){"use strict";a.byteLength=d,a.toByteArray=v,a.fromByteArray=w;for(var o=[],s=[],l=typeof Uint8Array!="undefined"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,f=u.length;c<f;++c)o[c]=u[c],s[u.charCodeAt(c)]=c;s[45]=62,s[95]=63;function h(b){var _=b.length;if(_%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var M=b.indexOf("=");M===-1&&(M=_);var x=M===_?0:4-M%4;return[M,x]}function d(b){var _=h(b),M=_[0],x=_[1];return(M+x)*3/4-x}function p(b,_,M){return(_+M)*3/4-M}function v(b){var _,M=h(b),x=M[0],T=M[1],A=new l(p(b,x,T)),y=0,E=T>0?x-4:x,S;for(S=0;S<E;S+=4)_=s[b.charCodeAt(S)]<<18|s[b.charCodeAt(S+1)]<<12|s[b.charCodeAt(S+2)]<<6|s[b.charCodeAt(S+3)],A[y++]=_>>16&255,A[y++]=_>>8&255,A[y++]=_&255;return T===2&&(_=s[b.charCodeAt(S)]<<2|s[b.charCodeAt(S+1)]>>4,A[y++]=_&255),T===1&&(_=s[b.charCodeAt(S)]<<10|s[b.charCodeAt(S+1)]<<4|s[b.charCodeAt(S+2)]>>2,A[y++]=_>>8&255,A[y++]=_&255),A}function m(b){return o[b>>18&63]+o[b>>12&63]+o[b>>6&63]+o[b&63]}function g(b,_,M){for(var x,T=[],A=_;A<M;A+=3)x=(b[A]<<16&16711680)+(b[A+1]<<8&65280)+(b[A+2]&255),T.push(m(x));return T.join("")}function w(b){for(var _,M=b.length,x=M%3,T=[],A=16383,y=0,E=M-x;y<E;y+=A)T.push(g(b,y,y+A>E?E:y+A));return x===1?(_=b[M-1],T.push(o[_>>2]+o[_<<4&63]+"==")):x===2&&(_=(b[M-2]<<8)+b[M-1],T.push(o[_>>10]+o[_>>4&63]+o[_<<2&63]+"=")),T.join("")}},3865(n,a,o){"use strict";var s=o(869);n.exports=l;function l(u,c){return s(u[0].mul(c[1]).add(c[0].mul(u[1])),u[1].mul(c[1]))}},1318(n){"use strict";n.exports=a;function a(o,s){return o[0].mul(s[1]).cmp(s[0].mul(o[1]))}},8697(n,a,o){"use strict";var s=o(869);n.exports=l;function l(u,c){return s(u[0].mul(c[1]),u[1].mul(c[0]))}},7842(n,a,o){"use strict";var s=o(6330),l=o(1533),u=o(2651),c=o(6768),f=o(869),h=o(8697);n.exports=d;function d(p,v){if(s(p))return v?h(p,d(v)):[p[0].clone(),p[1].clone()];var m=0,g,w;if(l(p))g=p.clone();else if(typeof p=="string")g=c(p);else{if(p===0)return[u(0),u(1)];if(p===Math.floor(p))g=u(p);else{for(;p!==Math.floor(p);)p=p*Math.pow(2,256),m-=256;g=u(p)}}if(s(v))g.mul(v[1]),w=v[0].clone();else if(l(v))w=v.clone();else if(typeof v=="string")w=c(v);else if(!v)w=u(1);else if(v===Math.floor(v))w=u(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),m+=256;w=u(v)}return m>0?g=g.ushln(m):m<0&&(w=w.ushln(-m)),f(g,w)}},6330(n,a,o){"use strict";var s=o(1533);n.exports=l;function l(u){return Array.isArray(u)&&u.length===2&&s(u[0])&&s(u[1])}},5716(n,a,o){"use strict";var s=o(6859);n.exports=l;function l(u){return u.cmp(new s(0))}},1369(n,a,o){"use strict";var s=o(5716);n.exports=l;function l(u){var c=u.length,f=u.words,h=0;if(c===1)h=f[0];else if(c===2)h=f[0]+f[1]*67108864;else for(var d=0;d<c;d++){var p=f[d];h+=p*Math.pow(67108864,d)}return s(u)*h}},4025(n,a,o){"use strict";var s=o(2361),l=o(8828).countTrailingZeros;n.exports=u;function u(c){var f=l(s.lo(c));if(f<32)return f;var h=l(s.hi(c));return h>20?52:h+32}},1533(n,a,o){"use strict";var s=o(6859);n.exports=l;function l(u){return u&&typeof u=="object"&&!!u.words}},2651(n,a,o){"use strict";var s=o(6859),l=o(2361);n.exports=u;function u(c){var f=l.exponent(c);return f<52?new s(c):new s(c*Math.pow(2,52-f)).ushln(f-52)}},869(n,a,o){"use strict";var s=o(2651),l=o(5716);n.exports=u;function u(c,f){var h=l(c),d=l(f);if(h===0)return[s(0),s(1)];if(d===0)return[s(0),s(0)];d<0&&(c=c.neg(),f=f.neg());var p=c.gcd(f);return p.cmpn(1)?[c.div(p),f.div(p)]:[c,f]}},6768(n,a,o){"use strict";var s=o(6859);n.exports=l;function l(u){return new s(u)}},6504(n,a,o){"use strict";var s=o(869);n.exports=l;function l(u,c){return s(u[0].mul(c[0]),u[1].mul(c[1]))}},7721(n,a,o){"use strict";var s=o(5716);n.exports=l;function l(u){return s(u[0])*s(u[1])}},5572(n,a,o){"use strict";var s=o(869);n.exports=l;function l(u,c){return s(u[0].mul(c[1]).sub(u[1].mul(c[0])),u[1].mul(c[1]))}},946(n,a,o){"use strict";var s=o(1369),l=o(4025);n.exports=u;function u(c){var f=c[0],h=c[1];if(f.cmpn(0)===0)return 0;var d=f.abs().divmod(h.abs()),p=d.div,v=s(p),m=d.mod,g=f.negative!==h.negative?-1:1;if(m.cmpn(0)===0)return g*v;if(v){var w=l(v)+4,b=s(m.ushln(w).divRound(h));return g*(v+b*Math.pow(2,-w))}else{var _=h.bitLength()-m.bitLength()+53,b=s(m.ushln(_).divRound(h));return _<1023?g*b*Math.pow(2,-_):(b*=Math.pow(2,-1023),g*b*Math.pow(2,1023-_))}}},2478(n){"use strict";function a(f,h,d,p,v){for(var m=v+1;p<=v;){var g=p+v>>>1,w=f[g],b=d!==void 0?d(w,h):w-h;b>=0?(m=g,v=g-1):p=g+1}return m}function o(f,h,d,p,v){for(var m=v+1;p<=v;){var g=p+v>>>1,w=f[g],b=d!==void 0?d(w,h):w-h;b>0?(m=g,v=g-1):p=g+1}return m}function s(f,h,d,p,v){for(var m=p-1;p<=v;){var g=p+v>>>1,w=f[g],b=d!==void 0?d(w,h):w-h;b<0?(m=g,p=g+1):v=g-1}return m}function l(f,h,d,p,v){for(var m=p-1;p<=v;){var g=p+v>>>1,w=f[g],b=d!==void 0?d(w,h):w-h;b<=0?(m=g,p=g+1):v=g-1}return m}function u(f,h,d,p,v){for(;p<=v;){var m=p+v>>>1,g=f[m],w=d!==void 0?d(g,h):g-h;if(w===0)return m;w<=0?p=m+1:v=m-1}return-1}function c(f,h,d,p,v,m){return typeof d=="function"?m(f,h,d,p===void 0?0:p|0,v===void 0?f.length-1:v|0):m(f,h,void 0,d===void 0?0:d|0,p===void 0?f.length-1:p|0)}n.exports={ge:function(f,h,d,p,v){return c(f,h,d,p,v,a)},gt:function(f,h,d,p,v){return c(f,h,d,p,v,o)},lt:function(f,h,d,p,v){return c(f,h,d,p,v,s)},le:function(f,h,d,p,v){return c(f,h,d,p,v,l)},eq:function(f,h,d,p,v){return c(f,h,d,p,v,u)}}},8828(n,a){"use strict";"use restrict";var o=32;a.INT_BITS=o,a.INT_MAX=2147483647,a.INT_MIN=-1<<o-1,a.sign=function(u){return(u>0)-(u<0)},a.abs=function(u){var c=u>>o-1;return(u^c)-c},a.min=function(u,c){return c^(u^c)&-(u<c)},a.max=function(u,c){return u^(u^c)&-(u<c)},a.isPow2=function(u){return!(u&u-1)&&!!u},a.log2=function(u){var c,f;return c=(u>65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},a.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},a.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}a.countTrailingZeros=s,a.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},a.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},a.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,h=c,d=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--d;u[c]=h<<d&255}})(l),a.reverse=function(u){return l[u&255]<<24|l[u>>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},a.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},a.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},a.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},a.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},a.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},6859(n,a,o){n=o.nmd(n),(function(s,l){"use strict";function u(R,L){if(!R)throw new Error(L||"Assertion failed")}function c(R,L){R.super_=L;var I=function(){};I.prototype=L.prototype,R.prototype=new I,R.prototype.constructor=R}function f(R,L,I){if(f.isBN(R))return R;this.negative=0,this.words=null,this.length=0,this.red=null,R!==null&&((L==="le"||L==="be")&&(I=L,L=10),this._init(R||0,L||10,I||"be"))}typeof s=="object"?s.exports=f:l.BN=f,f.BN=f,f.wordSize=26;var h;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?h=window.Buffer:h=o(7790).Buffer}catch(R){}f.isBN=function(L){return L instanceof f?!0:L!==null&&typeof L=="object"&&L.constructor.wordSize===f.wordSize&&Array.isArray(L.words)},f.max=function(L,I){return L.cmp(I)>0?L:I},f.min=function(L,I){return L.cmp(I)<0?L:I},f.prototype._init=function(L,I,B){if(typeof L=="number")return this._initNumber(L,I,B);if(typeof L=="object")return this._initArray(L,I,B);I==="hex"&&(I=16),u(I===(I|0)&&I>=2&&I<=36),L=L.toString().replace(/\s+/g,"");var O=0;L[0]==="-"&&(O++,this.negative=1),O<L.length&&(I===16?this._parseHex(L,O,B):(this._parseBase(L,I,O),B==="le"&&this._initArray(this.toArray(),I,B)))},f.prototype._initNumber=function(L,I,B){L<0&&(this.negative=1,L=-L),L<67108864?(this.words=[L&67108863],this.length=1):L<4503599627370496?(this.words=[L&67108863,L/67108864&67108863],this.length=2):(u(L<9007199254740992),this.words=[L&67108863,L/67108864&67108863,1],this.length=3),B==="le"&&this._initArray(this.toArray(),I,B)},f.prototype._initArray=function(L,I,B){if(u(typeof L.length=="number"),L.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(L.length/3),this.words=new Array(this.length);for(var O=0;O<this.length;O++)this.words[O]=0;var $,Y,K=0;if(B==="be")for(O=L.length-1,$=0;O>=0;O-=3)Y=L[O]|L[O-1]<<8|L[O-2]<<16,this.words[$]|=Y<<K&67108863,this.words[$+1]=Y>>>26-K&67108863,K+=24,K>=26&&(K-=26,$++);else if(B==="le")for(O=0,$=0;O<L.length;O+=3)Y=L[O]|L[O+1]<<8|L[O+2]<<16,this.words[$]|=Y<<K&67108863,this.words[$+1]=Y>>>26-K&67108863,K+=24,K>=26&&(K-=26,$++);return this.strip()};function d(R,L){var I=R.charCodeAt(L);return I>=65&&I<=70?I-55:I>=97&&I<=102?I-87:I-48&15}function p(R,L,I){var B=d(R,I);return I-1>=L&&(B|=d(R,I-1)<<4),B}f.prototype._parseHex=function(L,I,B){this.length=Math.ceil((L.length-I)/6),this.words=new Array(this.length);for(var O=0;O<this.length;O++)this.words[O]=0;var $=0,Y=0,K;if(B==="be")for(O=L.length-1;O>=I;O-=2)K=p(L,I,O)<<$,this.words[Y]|=K&67108863,$>=18?($-=18,Y+=1,this.words[Y]|=K>>>26):$+=8;else{var j=L.length-I;for(O=j%2===0?I+1:I;O<L.length;O+=2)K=p(L,I,O)<<$,this.words[Y]|=K&67108863,$>=18?($-=18,Y+=1,this.words[Y]|=K>>>26):$+=8}this.strip()};function v(R,L,I,B){for(var O=0,$=Math.min(R.length,I),Y=L;Y<$;Y++){var K=R.charCodeAt(Y)-48;O*=B,K>=49?O+=K-49+10:K>=17?O+=K-17+10:O+=K}return O}f.prototype._parseBase=function(L,I,B){this.words=[0],this.length=1;for(var O=0,$=1;$<=67108863;$*=I)O++;O--,$=$/I|0;for(var Y=L.length-B,K=Y%O,j=Math.min(Y,Y-K)+B,q=0,J=B;J<j;J+=O)q=v(L,J,J+O,I),this.imuln($),this.words[0]+q<67108864?this.words[0]+=q:this._iaddn(q);if(K!==0){var U=1;for(q=v(L,J,L.length,I),J=0;J<K;J++)U*=I;this.imuln(U),this.words[0]+q<67108864?this.words[0]+=q:this._iaddn(q)}this.strip()},f.prototype.copy=function(L){L.words=new Array(this.length);for(var I=0;I<this.length;I++)L.words[I]=this.words[I];L.length=this.length,L.negative=this.negative,L.red=this.red},f.prototype.clone=function(){var L=new f(null);return this.copy(L),L},f.prototype._expand=function(L){for(;this.length<L;)this.words[this.length++]=0;return this},f.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var m=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],w=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(L,I){L=L||10,I=I|0||1;var B;if(L===16||L==="hex"){B="";for(var O=0,$=0,Y=0;Y<this.length;Y++){var K=this.words[Y],j=((K<<O|$)&16777215).toString(16);$=K>>>24-O&16777215,O+=2,O>=26&&(O-=26,Y--),$!==0||Y!==this.length-1?B=m[6-j.length]+j+B:B=j+B}for($!==0&&(B=$.toString(16)+B);B.length%I!==0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}if(L===(L|0)&&L>=2&&L<=36){var q=g[L],J=w[L];B="";var U=this.clone();for(U.negative=0;!U.isZero();){var V=U.modn(J).toString(L);U=U.idivn(J),U.isZero()?B=V+B:B=m[q-V.length]+V+B}for(this.isZero()&&(B="0"+B);B.length%I!==0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}u(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var L=this.words[0];return this.length===2?L+=this.words[1]*67108864:this.length===3&&this.words[2]===1?L+=4503599627370496+this.words[1]*67108864:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-L:L},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(L,I){return u(typeof h!="undefined"),this.toArrayLike(h,L,I)},f.prototype.toArray=function(L,I){return this.toArrayLike(Array,L,I)},f.prototype.toArrayLike=function(L,I,B){var O=this.byteLength(),$=B||Math.max(1,O);u(O<=$,"byte array longer than desired length"),u($>0,"Requested array length <= 0"),this.strip();var Y=I==="le",K=new L($),j,q,J=this.clone();if(Y){for(q=0;!J.isZero();q++)j=J.andln(255),J.iushrn(8),K[q]=j;for(;q<$;q++)K[q]=0}else{for(q=0;q<$-O;q++)K[q]=0;for(q=0;!J.isZero();q++)j=J.andln(255),J.iushrn(8),K[$-q-1]=j}return K},Math.clz32?f.prototype._countBits=function(L){return 32-Math.clz32(L)}:f.prototype._countBits=function(L){var I=L,B=0;return I>=4096&&(B+=13,I>>>=13),I>=64&&(B+=7,I>>>=7),I>=8&&(B+=4,I>>>=4),I>=2&&(B+=2,I>>>=2),B+I},f.prototype._zeroBits=function(L){if(L===0)return 26;var I=L,B=0;return(I&8191)===0&&(B+=13,I>>>=13),(I&127)===0&&(B+=7,I>>>=7),(I&15)===0&&(B+=4,I>>>=4),(I&3)===0&&(B+=2,I>>>=2),(I&1)===0&&B++,B},f.prototype.bitLength=function(){var L=this.words[this.length-1],I=this._countBits(L);return(this.length-1)*26+I};function b(R){for(var L=new Array(R.bitLength()),I=0;I<L.length;I++){var B=I/26|0,O=I%26;L[I]=(R.words[B]&1<<O)>>>O}return L}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var L=0,I=0;I<this.length;I++){var B=this._zeroBits(this.words[I]);if(L+=B,B!==26)break}return L},f.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},f.prototype.toTwos=function(L){return this.negative!==0?this.abs().inotn(L).iaddn(1):this.clone()},f.prototype.fromTwos=function(L){return this.testn(L-1)?this.notn(L).iaddn(1).ineg():this.clone()},f.prototype.isNeg=function(){return this.negative!==0},f.prototype.neg=function(){return this.clone().ineg()},f.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},f.prototype.iuor=function(L){for(;this.length<L.length;)this.words[this.length++]=0;for(var I=0;I<L.length;I++)this.words[I]=this.words[I]|L.words[I];return this.strip()},f.prototype.ior=function(L){return u((this.negative|L.negative)===0),this.iuor(L)},f.prototype.or=function(L){return this.length>L.length?this.clone().ior(L):L.clone().ior(this)},f.prototype.uor=function(L){return this.length>L.length?this.clone().iuor(L):L.clone().iuor(this)},f.prototype.iuand=function(L){var I;this.length>L.length?I=L:I=this;for(var B=0;B<I.length;B++)this.words[B]=this.words[B]&L.words[B];return this.length=I.length,this.strip()},f.prototype.iand=function(L){return u((this.negative|L.negative)===0),this.iuand(L)},f.prototype.and=function(L){return this.length>L.length?this.clone().iand(L):L.clone().iand(this)},f.prototype.uand=function(L){return this.length>L.length?this.clone().iuand(L):L.clone().iuand(this)},f.prototype.iuxor=function(L){var I,B;this.length>L.length?(I=this,B=L):(I=L,B=this);for(var O=0;O<B.length;O++)this.words[O]=I.words[O]^B.words[O];if(this!==I)for(;O<I.length;O++)this.words[O]=I.words[O];return this.length=I.length,this.strip()},f.prototype.ixor=function(L){return u((this.negative|L.negative)===0),this.iuxor(L)},f.prototype.xor=function(L){return this.length>L.length?this.clone().ixor(L):L.clone().ixor(this)},f.prototype.uxor=function(L){return this.length>L.length?this.clone().iuxor(L):L.clone().iuxor(this)},f.prototype.inotn=function(L){u(typeof L=="number"&&L>=0);var I=Math.ceil(L/26)|0,B=L%26;this._expand(I),B>0&&I--;for(var O=0;O<I;O++)this.words[O]=~this.words[O]&67108863;for(B>0&&(this.words[O]=~this.words[O]&67108863>>26-B,O++);O<this.length;O++)this.words[O]=0;return this.strip()},f.prototype.notn=function(L){return this.clone().inotn(L)},f.prototype.setn=function(L,I){u(typeof L=="number"&&L>=0);var B=L/26|0,O=L%26;return this._expand(B+1),I?this.words[B]=this.words[B]|1<<O:this.words[B]=this.words[B]&~(1<<O),this.strip()},f.prototype.iadd=function(L){var I;if(this.negative!==0&&L.negative===0)return this.negative=0,I=this.isub(L),this.negative^=1,this._normSign();if(this.negative===0&&L.negative!==0)return L.negative=0,I=this.isub(L),L.negative=1,I._normSign();var B,O;this.length>L.length?(B=this,O=L):(B=L,O=this);for(var $=0,Y=0;Y<O.length;Y++)I=(B.words[Y]|0)+(O.words[Y]|0)+$,this.words[Y]=I&67108863,$=I>>>26;for(;$!==0&&Y<B.length;Y++)I=(B.words[Y]|0)+$,this.words[Y]=I&67108863,$=I>>>26;if(this.length=B.length,$!==0)this.words[this.length]=$,this.length++;else if(B!==this)for(;Y<B.length;Y++)this.words[Y]=B.words[Y];return this},f.prototype.add=function(L){var I;return L.negative!==0&&this.negative===0?(L.negative=0,I=this.sub(L),L.negative^=1,I):L.negative===0&&this.negative!==0?(this.negative=0,I=L.sub(this),this.negative=1,I):this.length>L.length?this.clone().iadd(L):L.clone().iadd(this)},f.prototype.isub=function(L){if(L.negative!==0){L.negative=0;var I=this.iadd(L);return L.negative=1,I._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(L),this.negative=1,this._normSign();var B=this.cmp(L);if(B===0)return this.negative=0,this.length=1,this.words[0]=0,this;var O,$;B>0?(O=this,$=L):(O=L,$=this);for(var Y=0,K=0;K<$.length;K++)I=(O.words[K]|0)-($.words[K]|0)+Y,Y=I>>26,this.words[K]=I&67108863;for(;Y!==0&&K<O.length;K++)I=(O.words[K]|0)+Y,Y=I>>26,this.words[K]=I&67108863;if(Y===0&&K<O.length&&O!==this)for(;K<O.length;K++)this.words[K]=O.words[K];return this.length=Math.max(this.length,K),O!==this&&(this.negative=1),this.strip()},f.prototype.sub=function(L){return this.clone().isub(L)};function _(R,L,I){I.negative=L.negative^R.negative;var B=R.length+L.length|0;I.length=B,B=B-1|0;var O=R.words[0]|0,$=L.words[0]|0,Y=O*$,K=Y&67108863,j=Y/67108864|0;I.words[0]=K;for(var q=1;q<B;q++){for(var J=j>>>26,U=j&67108863,V=Math.min(q,L.length-1),X=Math.max(0,q-R.length+1);X<=V;X++){var H=q-X|0;O=R.words[H]|0,$=L.words[X]|0,Y=O*$+U,J+=Y/67108864|0,U=Y&67108863}I.words[q]=U|0,j=J|0}return j!==0?I.words[q]=j|0:I.length--,I.strip()}var M=function(L,I,B){var O=L.words,$=I.words,Y=B.words,K=0,j,q,J,U=O[0]|0,V=U&8191,X=U>>>13,H=O[1]|0,G=H&8191,Q=H>>>13,te=O[2]|0,ce=te&8191,ge=te>>>13,Ce=O[3]|0,be=Ce&8191,he=Ce>>>13,oe=O[4]|0,Ee=oe&8191,ye=oe>>>13,ue=O[5]|0,ee=ue&8191,ae=ue>>>13,xe=O[6]|0,re=xe&8191,pe=xe>>>13,we=O[7]|0,Fe=we&8191,Se=we>>>13,ke=O[8]|0,_e=ke&8191,Ie=ke>>>13,Oe=O[9]|0,Qe=Oe&8191,et=Oe>>>13,_t=$[0]|0,ut=_t&8191,vt=_t>>>13,Xe=$[1]|0,mt=Xe&8191,bt=Xe>>>13,Ne=$[2]|0,Ue=Ne&8191,Ge=Ne>>>13,je=$[3]|0,Re=je&8191,Ve=je>>>13,ct=$[4]|0,Tt=ct&8191,Xt=ct>>>13,Vt=$[5]|0,lr=Vt&8191,ur=Vt>>>13,Bt=$[6]|0,Zt=Bt&8191,kr=Bt>>>13,$e=$[7]|0,tt=$e&8191,st=$e>>>13,xt=$[8]|0,Je=xt&8191,Ct=xt>>>13,ir=$[9]|0,hr=ir&8191,Ur=ir>>>13;B.negative=L.negative^I.negative,B.length=19,j=Math.imul(V,ut),q=Math.imul(V,vt),q=q+Math.imul(X,ut)|0,J=Math.imul(X,vt);var si=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(si>>>26)|0,si&=67108863,j=Math.imul(G,ut),q=Math.imul(G,vt),q=q+Math.imul(Q,ut)|0,J=Math.imul(Q,vt),j=j+Math.imul(V,mt)|0,q=q+Math.imul(V,bt)|0,q=q+Math.imul(X,mt)|0,J=J+Math.imul(X,bt)|0;var ei=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ei>>>26)|0,ei&=67108863,j=Math.imul(ce,ut),q=Math.imul(ce,vt),q=q+Math.imul(ge,ut)|0,J=Math.imul(ge,vt),j=j+Math.imul(G,mt)|0,q=q+Math.imul(G,bt)|0,q=q+Math.imul(Q,mt)|0,J=J+Math.imul(Q,bt)|0,j=j+Math.imul(V,Ue)|0,q=q+Math.imul(V,Ge)|0,q=q+Math.imul(X,Ue)|0,J=J+Math.imul(X,Ge)|0;var Lr=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(Lr>>>26)|0,Lr&=67108863,j=Math.imul(be,ut),q=Math.imul(be,vt),q=q+Math.imul(he,ut)|0,J=Math.imul(he,vt),j=j+Math.imul(ce,mt)|0,q=q+Math.imul(ce,bt)|0,q=q+Math.imul(ge,mt)|0,J=J+Math.imul(ge,bt)|0,j=j+Math.imul(G,Ue)|0,q=q+Math.imul(G,Ge)|0,q=q+Math.imul(Q,Ue)|0,J=J+Math.imul(Q,Ge)|0,j=j+Math.imul(V,Re)|0,q=q+Math.imul(V,Ve)|0,q=q+Math.imul(X,Re)|0,J=J+Math.imul(X,Ve)|0;var $i=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+($i>>>26)|0,$i&=67108863,j=Math.imul(Ee,ut),q=Math.imul(Ee,vt),q=q+Math.imul(ye,ut)|0,J=Math.imul(ye,vt),j=j+Math.imul(be,mt)|0,q=q+Math.imul(be,bt)|0,q=q+Math.imul(he,mt)|0,J=J+Math.imul(he,bt)|0,j=j+Math.imul(ce,Ue)|0,q=q+Math.imul(ce,Ge)|0,q=q+Math.imul(ge,Ue)|0,J=J+Math.imul(ge,Ge)|0,j=j+Math.imul(G,Re)|0,q=q+Math.imul(G,Ve)|0,q=q+Math.imul(Q,Re)|0,J=J+Math.imul(Q,Ve)|0,j=j+Math.imul(V,Tt)|0,q=q+Math.imul(V,Xt)|0,q=q+Math.imul(X,Tt)|0,J=J+Math.imul(X,Xt)|0;var Tn=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(Tn>>>26)|0,Tn&=67108863,j=Math.imul(ee,ut),q=Math.imul(ee,vt),q=q+Math.imul(ae,ut)|0,J=Math.imul(ae,vt),j=j+Math.imul(Ee,mt)|0,q=q+Math.imul(Ee,bt)|0,q=q+Math.imul(ye,mt)|0,J=J+Math.imul(ye,bt)|0,j=j+Math.imul(be,Ue)|0,q=q+Math.imul(be,Ge)|0,q=q+Math.imul(he,Ue)|0,J=J+Math.imul(he,Ge)|0,j=j+Math.imul(ce,Re)|0,q=q+Math.imul(ce,Ve)|0,q=q+Math.imul(ge,Re)|0,J=J+Math.imul(ge,Ve)|0,j=j+Math.imul(G,Tt)|0,q=q+Math.imul(G,Xt)|0,q=q+Math.imul(Q,Tt)|0,J=J+Math.imul(Q,Xt)|0,j=j+Math.imul(V,lr)|0,q=q+Math.imul(V,ur)|0,q=q+Math.imul(X,lr)|0,J=J+Math.imul(X,ur)|0;var hn=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(hn>>>26)|0,hn&=67108863,j=Math.imul(re,ut),q=Math.imul(re,vt),q=q+Math.imul(pe,ut)|0,J=Math.imul(pe,vt),j=j+Math.imul(ee,mt)|0,q=q+Math.imul(ee,bt)|0,q=q+Math.imul(ae,mt)|0,J=J+Math.imul(ae,bt)|0,j=j+Math.imul(Ee,Ue)|0,q=q+Math.imul(Ee,Ge)|0,q=q+Math.imul(ye,Ue)|0,J=J+Math.imul(ye,Ge)|0,j=j+Math.imul(be,Re)|0,q=q+Math.imul(be,Ve)|0,q=q+Math.imul(he,Re)|0,J=J+Math.imul(he,Ve)|0,j=j+Math.imul(ce,Tt)|0,q=q+Math.imul(ce,Xt)|0,q=q+Math.imul(ge,Tt)|0,J=J+Math.imul(ge,Xt)|0,j=j+Math.imul(G,lr)|0,q=q+Math.imul(G,ur)|0,q=q+Math.imul(Q,lr)|0,J=J+Math.imul(Q,ur)|0,j=j+Math.imul(V,Zt)|0,q=q+Math.imul(V,kr)|0,q=q+Math.imul(X,Zt)|0,J=J+Math.imul(X,kr)|0;var ta=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ta>>>26)|0,ta&=67108863,j=Math.imul(Fe,ut),q=Math.imul(Fe,vt),q=q+Math.imul(Se,ut)|0,J=Math.imul(Se,vt),j=j+Math.imul(re,mt)|0,q=q+Math.imul(re,bt)|0,q=q+Math.imul(pe,mt)|0,J=J+Math.imul(pe,bt)|0,j=j+Math.imul(ee,Ue)|0,q=q+Math.imul(ee,Ge)|0,q=q+Math.imul(ae,Ue)|0,J=J+Math.imul(ae,Ge)|0,j=j+Math.imul(Ee,Re)|0,q=q+Math.imul(Ee,Ve)|0,q=q+Math.imul(ye,Re)|0,J=J+Math.imul(ye,Ve)|0,j=j+Math.imul(be,Tt)|0,q=q+Math.imul(be,Xt)|0,q=q+Math.imul(he,Tt)|0,J=J+Math.imul(he,Xt)|0,j=j+Math.imul(ce,lr)|0,q=q+Math.imul(ce,ur)|0,q=q+Math.imul(ge,lr)|0,J=J+Math.imul(ge,ur)|0,j=j+Math.imul(G,Zt)|0,q=q+Math.imul(G,kr)|0,q=q+Math.imul(Q,Zt)|0,J=J+Math.imul(Q,kr)|0,j=j+Math.imul(V,tt)|0,q=q+Math.imul(V,st)|0,q=q+Math.imul(X,tt)|0,J=J+Math.imul(X,st)|0;var ca=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ca>>>26)|0,ca&=67108863,j=Math.imul(_e,ut),q=Math.imul(_e,vt),q=q+Math.imul(Ie,ut)|0,J=Math.imul(Ie,vt),j=j+Math.imul(Fe,mt)|0,q=q+Math.imul(Fe,bt)|0,q=q+Math.imul(Se,mt)|0,J=J+Math.imul(Se,bt)|0,j=j+Math.imul(re,Ue)|0,q=q+Math.imul(re,Ge)|0,q=q+Math.imul(pe,Ue)|0,J=J+Math.imul(pe,Ge)|0,j=j+Math.imul(ee,Re)|0,q=q+Math.imul(ee,Ve)|0,q=q+Math.imul(ae,Re)|0,J=J+Math.imul(ae,Ve)|0,j=j+Math.imul(Ee,Tt)|0,q=q+Math.imul(Ee,Xt)|0,q=q+Math.imul(ye,Tt)|0,J=J+Math.imul(ye,Xt)|0,j=j+Math.imul(be,lr)|0,q=q+Math.imul(be,ur)|0,q=q+Math.imul(he,lr)|0,J=J+Math.imul(he,ur)|0,j=j+Math.imul(ce,Zt)|0,q=q+Math.imul(ce,kr)|0,q=q+Math.imul(ge,Zt)|0,J=J+Math.imul(ge,kr)|0,j=j+Math.imul(G,tt)|0,q=q+Math.imul(G,st)|0,q=q+Math.imul(Q,tt)|0,J=J+Math.imul(Q,st)|0,j=j+Math.imul(V,Je)|0,q=q+Math.imul(V,Ct)|0,q=q+Math.imul(X,Je)|0,J=J+Math.imul(X,Ct)|0;var dn=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(dn>>>26)|0,dn&=67108863,j=Math.imul(Qe,ut),q=Math.imul(Qe,vt),q=q+Math.imul(et,ut)|0,J=Math.imul(et,vt),j=j+Math.imul(_e,mt)|0,q=q+Math.imul(_e,bt)|0,q=q+Math.imul(Ie,mt)|0,J=J+Math.imul(Ie,bt)|0,j=j+Math.imul(Fe,Ue)|0,q=q+Math.imul(Fe,Ge)|0,q=q+Math.imul(Se,Ue)|0,J=J+Math.imul(Se,Ge)|0,j=j+Math.imul(re,Re)|0,q=q+Math.imul(re,Ve)|0,q=q+Math.imul(pe,Re)|0,J=J+Math.imul(pe,Ve)|0,j=j+Math.imul(ee,Tt)|0,q=q+Math.imul(ee,Xt)|0,q=q+Math.imul(ae,Tt)|0,J=J+Math.imul(ae,Xt)|0,j=j+Math.imul(Ee,lr)|0,q=q+Math.imul(Ee,ur)|0,q=q+Math.imul(ye,lr)|0,J=J+Math.imul(ye,ur)|0,j=j+Math.imul(be,Zt)|0,q=q+Math.imul(be,kr)|0,q=q+Math.imul(he,Zt)|0,J=J+Math.imul(he,kr)|0,j=j+Math.imul(ce,tt)|0,q=q+Math.imul(ce,st)|0,q=q+Math.imul(ge,tt)|0,J=J+Math.imul(ge,st)|0,j=j+Math.imul(G,Je)|0,q=q+Math.imul(G,Ct)|0,q=q+Math.imul(Q,Je)|0,J=J+Math.imul(Q,Ct)|0,j=j+Math.imul(V,hr)|0,q=q+Math.imul(V,Ur)|0,q=q+Math.imul(X,hr)|0,J=J+Math.imul(X,Ur)|0;var Vn=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(Vn>>>26)|0,Vn&=67108863,j=Math.imul(Qe,mt),q=Math.imul(Qe,bt),q=q+Math.imul(et,mt)|0,J=Math.imul(et,bt),j=j+Math.imul(_e,Ue)|0,q=q+Math.imul(_e,Ge)|0,q=q+Math.imul(Ie,Ue)|0,J=J+Math.imul(Ie,Ge)|0,j=j+Math.imul(Fe,Re)|0,q=q+Math.imul(Fe,Ve)|0,q=q+Math.imul(Se,Re)|0,J=J+Math.imul(Se,Ve)|0,j=j+Math.imul(re,Tt)|0,q=q+Math.imul(re,Xt)|0,q=q+Math.imul(pe,Tt)|0,J=J+Math.imul(pe,Xt)|0,j=j+Math.imul(ee,lr)|0,q=q+Math.imul(ee,ur)|0,q=q+Math.imul(ae,lr)|0,J=J+Math.imul(ae,ur)|0,j=j+Math.imul(Ee,Zt)|0,q=q+Math.imul(Ee,kr)|0,q=q+Math.imul(ye,Zt)|0,J=J+Math.imul(ye,kr)|0,j=j+Math.imul(be,tt)|0,q=q+Math.imul(be,st)|0,q=q+Math.imul(he,tt)|0,J=J+Math.imul(he,st)|0,j=j+Math.imul(ce,Je)|0,q=q+Math.imul(ce,Ct)|0,q=q+Math.imul(ge,Je)|0,J=J+Math.imul(ge,Ct)|0,j=j+Math.imul(G,hr)|0,q=q+Math.imul(G,Ur)|0,q=q+Math.imul(Q,hr)|0,J=J+Math.imul(Q,Ur)|0;var ra=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ra>>>26)|0,ra&=67108863,j=Math.imul(Qe,Ue),q=Math.imul(Qe,Ge),q=q+Math.imul(et,Ue)|0,J=Math.imul(et,Ge),j=j+Math.imul(_e,Re)|0,q=q+Math.imul(_e,Ve)|0,q=q+Math.imul(Ie,Re)|0,J=J+Math.imul(Ie,Ve)|0,j=j+Math.imul(Fe,Tt)|0,q=q+Math.imul(Fe,Xt)|0,q=q+Math.imul(Se,Tt)|0,J=J+Math.imul(Se,Xt)|0,j=j+Math.imul(re,lr)|0,q=q+Math.imul(re,ur)|0,q=q+Math.imul(pe,lr)|0,J=J+Math.imul(pe,ur)|0,j=j+Math.imul(ee,Zt)|0,q=q+Math.imul(ee,kr)|0,q=q+Math.imul(ae,Zt)|0,J=J+Math.imul(ae,kr)|0,j=j+Math.imul(Ee,tt)|0,q=q+Math.imul(Ee,st)|0,q=q+Math.imul(ye,tt)|0,J=J+Math.imul(ye,st)|0,j=j+Math.imul(be,Je)|0,q=q+Math.imul(be,Ct)|0,q=q+Math.imul(he,Je)|0,J=J+Math.imul(he,Ct)|0,j=j+Math.imul(ce,hr)|0,q=q+Math.imul(ce,Ur)|0,q=q+Math.imul(ge,hr)|0,J=J+Math.imul(ge,Ur)|0;var ds=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ds>>>26)|0,ds&=67108863,j=Math.imul(Qe,Re),q=Math.imul(Qe,Ve),q=q+Math.imul(et,Re)|0,J=Math.imul(et,Ve),j=j+Math.imul(_e,Tt)|0,q=q+Math.imul(_e,Xt)|0,q=q+Math.imul(Ie,Tt)|0,J=J+Math.imul(Ie,Xt)|0,j=j+Math.imul(Fe,lr)|0,q=q+Math.imul(Fe,ur)|0,q=q+Math.imul(Se,lr)|0,J=J+Math.imul(Se,ur)|0,j=j+Math.imul(re,Zt)|0,q=q+Math.imul(re,kr)|0,q=q+Math.imul(pe,Zt)|0,J=J+Math.imul(pe,kr)|0,j=j+Math.imul(ee,tt)|0,q=q+Math.imul(ee,st)|0,q=q+Math.imul(ae,tt)|0,J=J+Math.imul(ae,st)|0,j=j+Math.imul(Ee,Je)|0,q=q+Math.imul(Ee,Ct)|0,q=q+Math.imul(ye,Je)|0,J=J+Math.imul(ye,Ct)|0,j=j+Math.imul(be,hr)|0,q=q+Math.imul(be,Ur)|0,q=q+Math.imul(he,hr)|0,J=J+Math.imul(he,Ur)|0;var mo=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(mo>>>26)|0,mo&=67108863,j=Math.imul(Qe,Tt),q=Math.imul(Qe,Xt),q=q+Math.imul(et,Tt)|0,J=Math.imul(et,Xt),j=j+Math.imul(_e,lr)|0,q=q+Math.imul(_e,ur)|0,q=q+Math.imul(Ie,lr)|0,J=J+Math.imul(Ie,ur)|0,j=j+Math.imul(Fe,Zt)|0,q=q+Math.imul(Fe,kr)|0,q=q+Math.imul(Se,Zt)|0,J=J+Math.imul(Se,kr)|0,j=j+Math.imul(re,tt)|0,q=q+Math.imul(re,st)|0,q=q+Math.imul(pe,tt)|0,J=J+Math.imul(pe,st)|0,j=j+Math.imul(ee,Je)|0,q=q+Math.imul(ee,Ct)|0,q=q+Math.imul(ae,Je)|0,J=J+Math.imul(ae,Ct)|0,j=j+Math.imul(Ee,hr)|0,q=q+Math.imul(Ee,Ur)|0,q=q+Math.imul(ye,hr)|0,J=J+Math.imul(ye,Ur)|0;var Rs=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(Rs>>>26)|0,Rs&=67108863,j=Math.imul(Qe,lr),q=Math.imul(Qe,ur),q=q+Math.imul(et,lr)|0,J=Math.imul(et,ur),j=j+Math.imul(_e,Zt)|0,q=q+Math.imul(_e,kr)|0,q=q+Math.imul(Ie,Zt)|0,J=J+Math.imul(Ie,kr)|0,j=j+Math.imul(Fe,tt)|0,q=q+Math.imul(Fe,st)|0,q=q+Math.imul(Se,tt)|0,J=J+Math.imul(Se,st)|0,j=j+Math.imul(re,Je)|0,q=q+Math.imul(re,Ct)|0,q=q+Math.imul(pe,Je)|0,J=J+Math.imul(pe,Ct)|0,j=j+Math.imul(ee,hr)|0,q=q+Math.imul(ee,Ur)|0,q=q+Math.imul(ae,hr)|0,J=J+Math.imul(ae,Ur)|0;var ho=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ho>>>26)|0,ho&=67108863,j=Math.imul(Qe,Zt),q=Math.imul(Qe,kr),q=q+Math.imul(et,Zt)|0,J=Math.imul(et,kr),j=j+Math.imul(_e,tt)|0,q=q+Math.imul(_e,st)|0,q=q+Math.imul(Ie,tt)|0,J=J+Math.imul(Ie,st)|0,j=j+Math.imul(Fe,Je)|0,q=q+Math.imul(Fe,Ct)|0,q=q+Math.imul(Se,Je)|0,J=J+Math.imul(Se,Ct)|0,j=j+Math.imul(re,hr)|0,q=q+Math.imul(re,Ur)|0,q=q+Math.imul(pe,hr)|0,J=J+Math.imul(pe,Ur)|0;var ka=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ka>>>26)|0,ka&=67108863,j=Math.imul(Qe,tt),q=Math.imul(Qe,st),q=q+Math.imul(et,tt)|0,J=Math.imul(et,st),j=j+Math.imul(_e,Je)|0,q=q+Math.imul(_e,Ct)|0,q=q+Math.imul(Ie,Je)|0,J=J+Math.imul(Ie,Ct)|0,j=j+Math.imul(Fe,hr)|0,q=q+Math.imul(Fe,Ur)|0,q=q+Math.imul(Se,hr)|0,J=J+Math.imul(Se,Ur)|0;var ao=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(ao>>>26)|0,ao&=67108863,j=Math.imul(Qe,Je),q=Math.imul(Qe,Ct),q=q+Math.imul(et,Je)|0,J=Math.imul(et,Ct),j=j+Math.imul(_e,hr)|0,q=q+Math.imul(_e,Ur)|0,q=q+Math.imul(Ie,hr)|0,J=J+Math.imul(Ie,Ur)|0;var zs=(K+j|0)+((q&8191)<<13)|0;K=(J+(q>>>13)|0)+(zs>>>26)|0,zs&=67108863,j=Math.imul(Qe,hr),q=Math.imul(Qe,Ur),q=q+Math.imul(et,hr)|0,J=Math.imul(et,Ur);var _a=(K+j|0)+((q&8191)<<13)|0;return K=(J+(q>>>13)|0)+(_a>>>26)|0,_a&=67108863,Y[0]=si,Y[1]=ei,Y[2]=Lr,Y[3]=$i,Y[4]=Tn,Y[5]=hn,Y[6]=ta,Y[7]=ca,Y[8]=dn,Y[9]=Vn,Y[10]=ra,Y[11]=ds,Y[12]=mo,Y[13]=Rs,Y[14]=ho,Y[15]=ka,Y[16]=ao,Y[17]=zs,Y[18]=_a,K!==0&&(Y[19]=K,B.length++),B};Math.imul||(M=_);function x(R,L,I){I.negative=L.negative^R.negative,I.length=R.length+L.length;for(var B=0,O=0,$=0;$<I.length-1;$++){var Y=O;O=0;for(var K=B&67108863,j=Math.min($,L.length-1),q=Math.max(0,$-R.length+1);q<=j;q++){var J=$-q,U=R.words[J]|0,V=L.words[q]|0,X=U*V,H=X&67108863;Y=Y+(X/67108864|0)|0,H=H+K|0,K=H&67108863,Y=Y+(H>>>26)|0,O+=Y>>>26,Y&=67108863}I.words[$]=K,B=Y,Y=O}return B!==0?I.words[$]=B:I.length--,I.strip()}function T(R,L,I){var B=new A;return B.mulp(R,L,I)}f.prototype.mulTo=function(L,I){var B,O=this.length+L.length;return this.length===10&&L.length===10?B=M(this,L,I):O<63?B=_(this,L,I):O<1024?B=x(this,L,I):B=T(this,L,I),B};function A(R,L){this.x=R,this.y=L}A.prototype.makeRBT=function(L){for(var I=new Array(L),B=f.prototype._countBits(L)-1,O=0;O<L;O++)I[O]=this.revBin(O,B,L);return I},A.prototype.revBin=function(L,I,B){if(L===0||L===B-1)return L;for(var O=0,$=0;$<I;$++)O|=(L&1)<<I-$-1,L>>=1;return O},A.prototype.permute=function(L,I,B,O,$,Y){for(var K=0;K<Y;K++)O[K]=I[L[K]],$[K]=B[L[K]]},A.prototype.transform=function(L,I,B,O,$,Y){this.permute(Y,L,I,B,O,$);for(var K=1;K<$;K<<=1)for(var j=K<<1,q=Math.cos(2*Math.PI/j),J=Math.sin(2*Math.PI/j),U=0;U<$;U+=j)for(var V=q,X=J,H=0;H<K;H++){var G=B[U+H],Q=O[U+H],te=B[U+H+K],ce=O[U+H+K],ge=V*te-X*ce;ce=V*ce+X*te,te=ge,B[U+H]=G+te,O[U+H]=Q+ce,B[U+H+K]=G-te,O[U+H+K]=Q-ce,H!==j&&(ge=q*V-J*X,X=q*X+J*V,V=ge)}},A.prototype.guessLen13b=function(L,I){var B=Math.max(I,L)|1,O=B&1,$=0;for(B=B/2|0;B;B=B>>>1)$++;return 1<<$+1+O},A.prototype.conjugate=function(L,I,B){if(!(B<=1))for(var O=0;O<B/2;O++){var $=L[O];L[O]=L[B-O-1],L[B-O-1]=$,$=I[O],I[O]=-I[B-O-1],I[B-O-1]=-$}},A.prototype.normalize13b=function(L,I){for(var B=0,O=0;O<I/2;O++){var $=Math.round(L[2*O+1]/I)*8192+Math.round(L[2*O]/I)+B;L[O]=$&67108863,$<67108864?B=0:B=$/67108864|0}return L},A.prototype.convert13b=function(L,I,B,O){for(var $=0,Y=0;Y<I;Y++)$=$+(L[Y]|0),B[2*Y]=$&8191,$=$>>>13,B[2*Y+1]=$&8191,$=$>>>13;for(Y=2*I;Y<O;++Y)B[Y]=0;u($===0),u(($&-8192)===0)},A.prototype.stub=function(L){for(var I=new Array(L),B=0;B<L;B++)I[B]=0;return I},A.prototype.mulp=function(L,I,B){var O=2*this.guessLen13b(L.length,I.length),$=this.makeRBT(O),Y=this.stub(O),K=new Array(O),j=new Array(O),q=new Array(O),J=new Array(O),U=new Array(O),V=new Array(O),X=B.words;X.length=O,this.convert13b(L.words,L.length,K,O),this.convert13b(I.words,I.length,J,O),this.transform(K,Y,j,q,O,$),this.transform(J,Y,U,V,O,$);for(var H=0;H<O;H++){var G=j[H]*U[H]-q[H]*V[H];q[H]=j[H]*V[H]+q[H]*U[H],j[H]=G}return this.conjugate(j,q,O),this.transform(j,q,X,Y,O,$),this.conjugate(X,Y,O),this.normalize13b(X,O),B.negative=L.negative^I.negative,B.length=L.length+I.length,B.strip()},f.prototype.mul=function(L){var I=new f(null);return I.words=new Array(this.length+L.length),this.mulTo(L,I)},f.prototype.mulf=function(L){var I=new f(null);return I.words=new Array(this.length+L.length),T(this,L,I)},f.prototype.imul=function(L){return this.clone().mulTo(L,this)},f.prototype.imuln=function(L){u(typeof L=="number"),u(L<67108864);for(var I=0,B=0;B<this.length;B++){var O=(this.words[B]|0)*L,$=(O&67108863)+(I&67108863);I>>=26,I+=O/67108864|0,I+=$>>>26,this.words[B]=$&67108863}return I!==0&&(this.words[B]=I,this.length++),L===0&&(this.length=1,this._normSign()),this},f.prototype.muln=function(L){return this.clone().imuln(L)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(L){var I=b(L);if(I.length===0)return new f(1);for(var B=this,O=0;O<I.length&&I[O]===0;O++,B=B.sqr());if(++O<I.length)for(var $=B.sqr();O<I.length;O++,$=$.sqr())I[O]!==0&&(B=B.mul($));return B},f.prototype.iushln=function(L){u(typeof L=="number"&&L>=0);var I=L%26,B=(L-I)/26,O=67108863>>>26-I<<26-I,$;if(I!==0){var Y=0;for($=0;$<this.length;$++){var K=this.words[$]&O,j=(this.words[$]|0)-K<<I;this.words[$]=j|Y,Y=K>>>26-I}Y&&(this.words[$]=Y,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()},f.prototype.ishln=function(L){return u(this.negative===0),this.iushln(L)},f.prototype.iushrn=function(L,I,B){u(typeof L=="number"&&L>=0);var O;I?O=(I-I%26)/26:O=0;var $=L%26,Y=Math.min((L-$)/26,this.length),K=67108863^67108863>>>$<<$,j=B;if(O-=Y,O=Math.max(0,O),j){for(var q=0;q<Y;q++)j.words[q]=this.words[q];j.length=Y}if(Y!==0)if(this.length>Y)for(this.length-=Y,q=0;q<this.length;q++)this.words[q]=this.words[q+Y];else this.words[0]=0,this.length=1;var J=0;for(q=this.length-1;q>=0&&(J!==0||q>=O);q--){var U=this.words[q]|0;this.words[q]=J<<26-$|U>>>$,J=U&K}return j&&J!==0&&(j.words[j.length++]=J),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(L,I,B){return u(this.negative===0),this.iushrn(L,I,B)},f.prototype.shln=function(L){return this.clone().ishln(L)},f.prototype.ushln=function(L){return this.clone().iushln(L)},f.prototype.shrn=function(L){return this.clone().ishrn(L)},f.prototype.ushrn=function(L){return this.clone().iushrn(L)},f.prototype.testn=function(L){u(typeof L=="number"&&L>=0);var I=L%26,B=(L-I)/26,O=1<<I;if(this.length<=B)return!1;var $=this.words[B];return!!($&O)},f.prototype.imaskn=function(L){u(typeof L=="number"&&L>=0);var I=L%26,B=(L-I)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=B)return this;if(I!==0&&B++,this.length=Math.min(B,this.length),I!==0){var O=67108863^67108863>>>I<<I;this.words[this.length-1]&=O}return this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.maskn=function(L){return this.clone().imaskn(L)},f.prototype.iaddn=function(L){return u(typeof L=="number"),u(L<67108864),L<0?this.isubn(-L):this.negative!==0?this.length===1&&(this.words[0]|0)<L?(this.words[0]=L-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(L),this.negative=1,this):this._iaddn(L)},f.prototype._iaddn=function(L){this.words[0]+=L;for(var I=0;I<this.length&&this.words[I]>=67108864;I++)this.words[I]-=67108864,I===this.length-1?this.words[I+1]=1:this.words[I+1]++;return this.length=Math.max(this.length,I+1),this},f.prototype.isubn=function(L){if(u(typeof L=="number"),u(L<67108864),L<0)return this.iaddn(-L);if(this.negative!==0)return this.negative=0,this.iaddn(L),this.negative=1,this;if(this.words[0]-=L,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var I=0;I<this.length&&this.words[I]<0;I++)this.words[I]+=67108864,this.words[I+1]-=1;return this.strip()},f.prototype.addn=function(L){return this.clone().iaddn(L)},f.prototype.subn=function(L){return this.clone().isubn(L)},f.prototype.iabs=function(){return this.negative=0,this},f.prototype.abs=function(){return this.clone().iabs()},f.prototype._ishlnsubmul=function(L,I,B){var O=L.length+B,$;this._expand(O);var Y,K=0;for($=0;$<L.length;$++){Y=(this.words[$+B]|0)+K;var j=(L.words[$]|0)*I;Y-=j&67108863,K=(Y>>26)-(j/67108864|0),this.words[$+B]=Y&67108863}for(;$<this.length-B;$++)Y=(this.words[$+B]|0)+K,K=Y>>26,this.words[$+B]=Y&67108863;if(K===0)return this.strip();for(u(K===-1),K=0,$=0;$<this.length;$++)Y=-(this.words[$]|0)+K,K=Y>>26,this.words[$]=Y&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(L,I){var B=this.length-L.length,O=this.clone(),$=L,Y=$.words[$.length-1]|0,K=this._countBits(Y);B=26-K,B!==0&&($=$.ushln(B),O.iushln(B),Y=$.words[$.length-1]|0);var j=O.length-$.length,q;if(I!=="mod"){q=new f(null),q.length=j+1,q.words=new Array(q.length);for(var J=0;J<q.length;J++)q.words[J]=0}var U=O.clone()._ishlnsubmul($,1,j);U.negative===0&&(O=U,q&&(q.words[j]=1));for(var V=j-1;V>=0;V--){var X=(O.words[$.length+V]|0)*67108864+(O.words[$.length+V-1]|0);for(X=Math.min(X/Y|0,67108863),O._ishlnsubmul($,X,V);O.negative!==0;)X--,O.negative=0,O._ishlnsubmul($,1,V),O.isZero()||(O.negative^=1);q&&(q.words[V]=X)}return q&&q.strip(),O.strip(),I!=="div"&&B!==0&&O.iushrn(B),{div:q||null,mod:O}},f.prototype.divmod=function(L,I,B){if(u(!L.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var O,$,Y;return this.negative!==0&&L.negative===0?(Y=this.neg().divmod(L,I),I!=="mod"&&(O=Y.div.neg()),I!=="div"&&($=Y.mod.neg(),B&&$.negative!==0&&$.iadd(L)),{div:O,mod:$}):this.negative===0&&L.negative!==0?(Y=this.divmod(L.neg(),I),I!=="mod"&&(O=Y.div.neg()),{div:O,mod:Y.mod}):(this.negative&L.negative)!==0?(Y=this.neg().divmod(L.neg(),I),I!=="div"&&($=Y.mod.neg(),B&&$.negative!==0&&$.isub(L)),{div:Y.div,mod:$}):L.length>this.length||this.cmp(L)<0?{div:new f(0),mod:this}:L.length===1?I==="div"?{div:this.divn(L.words[0]),mod:null}:I==="mod"?{div:null,mod:new f(this.modn(L.words[0]))}:{div:this.divn(L.words[0]),mod:new f(this.modn(L.words[0]))}:this._wordDiv(L,I)},f.prototype.div=function(L){return this.divmod(L,"div",!1).div},f.prototype.mod=function(L){return this.divmod(L,"mod",!1).mod},f.prototype.umod=function(L){return this.divmod(L,"mod",!0).mod},f.prototype.divRound=function(L){var I=this.divmod(L);if(I.mod.isZero())return I.div;var B=I.mod.abs(),O=L.abs().iushrn(1),$=L.words[0]&1,Y=B.cmp(O);if(Y<0||$===1&&Y===0)return I.div;var K=new f(1);return K.negative=this.negative^L.negative,I.div.iadd(K)},f.prototype.modn=function(L){u(L<=67108863);for(var I=(1<<26)%L,B=0,O=this.length-1;O>=0;O--)B=(I*B+(this.words[O]|0))%L;return B},f.prototype.idivn=function(L){u(L<=67108863);for(var I=0,B=this.length-1;B>=0;B--){var O=(this.words[B]|0)+I*67108864;this.words[B]=O/L|0,I=O%L}return this.strip()},f.prototype.divn=function(L){return this.clone().idivn(L)},f.prototype.egcd=function(L){u(L.negative===0),u(!L.isZero());var I=this,B=L.clone();I.negative!==0?I=I.umod(L):I=I.clone();for(var O=new f(1),$=new f(0),Y=new f(0),K=new f(1),j=0;I.isEven()&&B.isEven();)I.iushrn(1),B.iushrn(1),++j;for(var q=B.clone(),J=I.clone();!I.isZero();){for(var U=0,V=1;(I.words[0]&V)===0&&U<26;++U,V<<=1);if(U>0)for(I.iushrn(U);U-- >0;)(O.isOdd()||$.isOdd())&&(O.iadd(q),$.isub(J)),O.iushrn(1),$.iushrn(1);for(var X=0,H=1;(B.words[0]&H)===0&&X<26;++X,H<<=1);if(X>0)for(B.iushrn(X);X-- >0;)(Y.isOdd()||K.isOdd())&&(Y.iadd(q),K.isub(J)),Y.iushrn(1),K.iushrn(1);I.cmp(B)>=0?(I.isub(B),O.isub(Y),$.isub(K)):(B.isub(I),Y.isub(O),K.isub($))}return{a:Y,b:K,gcd:B.iushln(j)}},f.prototype._invmp=function(L){u(L.negative===0),u(!L.isZero());var I=this,B=L.clone();I.negative!==0?I=I.umod(L):I=I.clone();for(var O=new f(1),$=new f(0),Y=B.clone();I.cmpn(1)>0&&B.cmpn(1)>0;){for(var K=0,j=1;(I.words[0]&j)===0&&K<26;++K,j<<=1);if(K>0)for(I.iushrn(K);K-- >0;)O.isOdd()&&O.iadd(Y),O.iushrn(1);for(var q=0,J=1;(B.words[0]&J)===0&&q<26;++q,J<<=1);if(q>0)for(B.iushrn(q);q-- >0;)$.isOdd()&&$.iadd(Y),$.iushrn(1);I.cmp(B)>=0?(I.isub(B),O.isub($)):(B.isub(I),$.isub(O))}var U;return I.cmpn(1)===0?U=O:U=$,U.cmpn(0)<0&&U.iadd(L),U},f.prototype.gcd=function(L){if(this.isZero())return L.abs();if(L.isZero())return this.abs();var I=this.clone(),B=L.clone();I.negative=0,B.negative=0;for(var O=0;I.isEven()&&B.isEven();O++)I.iushrn(1),B.iushrn(1);do{for(;I.isEven();)I.iushrn(1);for(;B.isEven();)B.iushrn(1);var $=I.cmp(B);if($<0){var Y=I;I=B,B=Y}else if($===0||B.cmpn(1)===0)break;I.isub(B)}while(!0);return B.iushln(O)},f.prototype.invm=function(L){return this.egcd(L).a.umod(L)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(L){return this.words[0]&L},f.prototype.bincn=function(L){u(typeof L=="number");var I=L%26,B=(L-I)/26,O=1<<I;if(this.length<=B)return this._expand(B+1),this.words[B]|=O,this;for(var $=O,Y=B;$!==0&&Y<this.length;Y++){var K=this.words[Y]|0;K+=$,$=K>>>26,K&=67108863,this.words[Y]=K}return $!==0&&(this.words[Y]=$,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(L){var I=L<0;if(this.negative!==0&&!I)return-1;if(this.negative===0&&I)return 1;this.strip();var B;if(this.length>1)B=1;else{I&&(L=-L),u(L<=67108863,"Number is too big");var O=this.words[0]|0;B=O===L?0:O<L?-1:1}return this.negative!==0?-B|0:B},f.prototype.cmp=function(L){if(this.negative!==0&&L.negative===0)return-1;if(this.negative===0&&L.negative!==0)return 1;var I=this.ucmp(L);return this.negative!==0?-I|0:I},f.prototype.ucmp=function(L){if(this.length>L.length)return 1;if(this.length<L.length)return-1;for(var I=0,B=this.length-1;B>=0;B--){var O=this.words[B]|0,$=L.words[B]|0;if(O!==$){O<$?I=-1:O>$&&(I=1);break}}return I},f.prototype.gtn=function(L){return this.cmpn(L)===1},f.prototype.gt=function(L){return this.cmp(L)===1},f.prototype.gten=function(L){return this.cmpn(L)>=0},f.prototype.gte=function(L){return this.cmp(L)>=0},f.prototype.ltn=function(L){return this.cmpn(L)===-1},f.prototype.lt=function(L){return this.cmp(L)===-1},f.prototype.lten=function(L){return this.cmpn(L)<=0},f.prototype.lte=function(L){return this.cmp(L)<=0},f.prototype.eqn=function(L){return this.cmpn(L)===0},f.prototype.eq=function(L){return this.cmp(L)===0},f.red=function(L){return new F(L)},f.prototype.toRed=function(L){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),L.convertTo(this)._forceRed(L)},f.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(L){return this.red=L,this},f.prototype.forceRed=function(L){return u(!this.red,"Already a number in reduction context"),this._forceRed(L)},f.prototype.redAdd=function(L){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,L)},f.prototype.redIAdd=function(L){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,L)},f.prototype.redSub=function(L){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,L)},f.prototype.redISub=function(L){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,L)},f.prototype.redShl=function(L){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,L)},f.prototype.redMul=function(L){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.mul(this,L)},f.prototype.redIMul=function(L){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.imul(this,L)},f.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(L){return u(this.red&&!L.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,L)};var y={k256:null,p224:null,p192:null,p25519:null};function E(R,L){this.name=R,this.p=new f(L,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}E.prototype._tmp=function(){var L=new f(null);return L.words=new Array(Math.ceil(this.n/13)),L},E.prototype.ireduce=function(L){var I=L,B;do this.split(I,this.tmp),I=this.imulK(I),I=I.iadd(this.tmp),B=I.bitLength();while(B>this.n);var O=B<this.n?-1:I.ucmp(this.p);return O===0?(I.words[0]=0,I.length=1):O>0?I.isub(this.p):I.strip!==void 0?I.strip():I._strip(),I},E.prototype.split=function(L,I){L.iushrn(this.n,0,I)},E.prototype.imulK=function(L){return L.imul(this.k)};function S(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}c(S,E),S.prototype.split=function(L,I){for(var B=4194303,O=Math.min(L.length,9),$=0;$<O;$++)I.words[$]=L.words[$];if(I.length=O,L.length<=9){L.words[0]=0,L.length=1;return}var Y=L.words[9];for(I.words[I.length++]=Y&B,$=10;$<L.length;$++){var K=L.words[$]|0;L.words[$-10]=(K&B)<<4|Y>>>22,Y=K}Y>>>=22,L.words[$-10]=Y,Y===0&&L.length>10?L.length-=10:L.length-=9},S.prototype.imulK=function(L){L.words[L.length]=0,L.words[L.length+1]=0,L.length+=2;for(var I=0,B=0;B<L.length;B++){var O=L.words[B]|0;I+=O*977,L.words[B]=I&67108863,I=O*64+(I/67108864|0)}return L.words[L.length-1]===0&&(L.length--,L.words[L.length-1]===0&&L.length--),L};function C(){E.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}c(C,E);function k(){E.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}c(k,E);function D(){E.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}c(D,E),D.prototype.imulK=function(L){for(var I=0,B=0;B<L.length;B++){var O=(L.words[B]|0)*19+I,$=O&67108863;O>>>=26,L.words[B]=$,I=O}return I!==0&&(L.words[L.length++]=I),L},f._prime=function(L){if(y[L])return y[L];var I;if(L==="k256")I=new S;else if(L==="p224")I=new C;else if(L==="p192")I=new k;else if(L==="p25519")I=new D;else throw new Error("Unknown prime "+L);return y[L]=I,I};function F(R){if(typeof R=="string"){var L=f._prime(R);this.m=L.p,this.prime=L}else u(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}F.prototype._verify1=function(L){u(L.negative===0,"red works only with positives"),u(L.red,"red works only with red numbers")},F.prototype._verify2=function(L,I){u((L.negative|I.negative)===0,"red works only with positives"),u(L.red&&L.red===I.red,"red works only with red numbers")},F.prototype.imod=function(L){return this.prime?this.prime.ireduce(L)._forceRed(this):L.umod(this.m)._forceRed(this)},F.prototype.neg=function(L){return L.isZero()?L.clone():this.m.sub(L)._forceRed(this)},F.prototype.add=function(L,I){this._verify2(L,I);var B=L.add(I);return B.cmp(this.m)>=0&&B.isub(this.m),B._forceRed(this)},F.prototype.iadd=function(L,I){this._verify2(L,I);var B=L.iadd(I);return B.cmp(this.m)>=0&&B.isub(this.m),B},F.prototype.sub=function(L,I){this._verify2(L,I);var B=L.sub(I);return B.cmpn(0)<0&&B.iadd(this.m),B._forceRed(this)},F.prototype.isub=function(L,I){this._verify2(L,I);var B=L.isub(I);return B.cmpn(0)<0&&B.iadd(this.m),B},F.prototype.shl=function(L,I){return this._verify1(L),this.imod(L.ushln(I))},F.prototype.imul=function(L,I){return this._verify2(L,I),this.imod(L.imul(I))},F.prototype.mul=function(L,I){return this._verify2(L,I),this.imod(L.mul(I))},F.prototype.isqr=function(L){return this.imul(L,L.clone())},F.prototype.sqr=function(L){return this.mul(L,L)},F.prototype.sqrt=function(L){if(L.isZero())return L.clone();var I=this.m.andln(3);if(u(I%2===1),I===3){var B=this.m.add(new f(1)).iushrn(2);return this.pow(L,B)}for(var O=this.m.subn(1),$=0;!O.isZero()&&O.andln(1)===0;)$++,O.iushrn(1);u(!O.isZero());var Y=new f(1).toRed(this),K=Y.redNeg(),j=this.m.subn(1).iushrn(1),q=this.m.bitLength();for(q=new f(2*q*q).toRed(this);this.pow(q,j).cmp(K)!==0;)q.redIAdd(K);for(var J=this.pow(q,O),U=this.pow(L,O.addn(1).iushrn(1)),V=this.pow(L,O),X=$;V.cmp(Y)!==0;){for(var H=V,G=0;H.cmp(Y)!==0;G++)H=H.redSqr();u(G<X);var Q=this.pow(J,new f(1).iushln(X-G-1));U=U.redMul(Q),J=Q.redSqr(),V=V.redMul(J),X=G}return U},F.prototype.invm=function(L){var I=L._invmp(this.m);return I.negative!==0?(I.negative=0,this.imod(I).redNeg()):this.imod(I)},F.prototype.pow=function(L,I){if(I.isZero())return new f(1).toRed(this);if(I.cmpn(1)===0)return L.clone();var B=4,O=new Array(1<<B);O[0]=new f(1).toRed(this),O[1]=L;for(var $=2;$<O.length;$++)O[$]=this.mul(O[$-1],L);var Y=O[0],K=0,j=0,q=I.bitLength()%26;for(q===0&&(q=26),$=I.length-1;$>=0;$--){for(var J=I.words[$],U=q-1;U>=0;U--){var V=J>>U&1;if(Y!==O[0]&&(Y=this.sqr(Y)),V===0&&K===0){j=0;continue}K<<=1,K|=V,j++,!(j!==B&&($!==0||U!==0))&&(Y=this.mul(Y,O[K]),j=0,K=0)}q=26}return Y},F.prototype.convertTo=function(L){var I=L.umod(this.m);return I===L?I.clone():I},F.prototype.convertFrom=function(L){var I=L.clone();return I.red=null,I},f.mont=function(L){return new P(L)};function P(R){F.call(this,R),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}c(P,F),P.prototype.convertTo=function(L){return this.imod(L.ushln(this.shift))},P.prototype.convertFrom=function(L){var I=this.imod(L.mul(this.rinv));return I.red=null,I},P.prototype.imul=function(L,I){if(L.isZero()||I.isZero())return L.words[0]=0,L.length=1,L;var B=L.imul(I),O=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=B.isub(O).iushrn(this.shift),Y=$;return $.cmp(this.m)>=0?Y=$.isub(this.m):$.cmpn(0)<0&&(Y=$.iadd(this.m)),Y._forceRed(this)},P.prototype.mul=function(L,I){if(L.isZero()||I.isZero())return new f(0)._forceRed(this);var B=L.mul(I),O=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=B.isub(O).iushrn(this.shift),Y=$;return $.cmp(this.m)>=0?Y=$.isub(this.m):$.cmpn(0)<0&&(Y=$.iadd(this.m)),Y._forceRed(this)},P.prototype.invm=function(L){var I=this.imod(L._invmp(this.m).mul(this.r2));return I._forceRed(this)}})(n,this)},6204(n){"use strict";n.exports=a;function a(o){var s,l,u,c=o.length,f=0;for(s=0;s<c;++s)f+=o[s].length;var h=new Array(f),d=0;for(s=0;s<c;++s){var p=o[s],v=p.length;for(l=0;l<v;++l){var m=h[d++]=new Array(v-1),g=0;for(u=0;u<v;++u)u!==l&&(m[g++]=p[u]);if(l&1){var w=m[1];m[1]=m[0],m[0]=w}}}return h}},6867(n,a,o){"use strict";n.exports=g;var s=o(1888),l=o(855),u=o(7150);function c(w,b){for(var _=0;_<w;++_)if(!(b[_]<=b[_+w]))return!0;return!1}function f(w,b,_,M){for(var x=0,T=0,A=0,y=w.length;A<y;++A){var E=w[A];if(!c(b,E)){for(var S=0;S<2*b;++S)_[x++]=E[S];M[T++]=A}}return T}function h(w,b,_,M){var x=w.length,T=b.length;if(!(x<=0||T<=0)){var A=w[0].length>>>1;if(!(A<=0)){var y,E=s.mallocDouble(2*A*x),S=s.mallocInt32(x);if(x=f(w,A,E,S),x>0){if(A===1&&M)l.init(x),y=l.sweepComplete(A,_,0,x,E,S,0,x,E,S);else{var C=s.mallocDouble(2*A*T),k=s.mallocInt32(T);T=f(b,A,C,k),T>0&&(l.init(x+T),A===1?y=l.sweepBipartite(A,_,0,x,E,S,0,T,C,k):y=u(A,_,M,x,E,S,T,C,k),s.free(C),s.free(k))}s.free(E),s.free(S)}return y}}}var d;function p(w,b){d.push([w,b])}function v(w){return d=[],h(w,w,p,!0),d}function m(w,b){return d=[],h(w,b,p,!1),d}function g(w,b,_){switch(arguments.length){case 1:return v(w);case 2:return typeof b=="function"?h(w,w,b,!0):m(w,b);case 3:return h(w,b,_,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455(n,a){"use strict";function o(){function u(h,d,p,v,m,g,w,b,_,M,x){for(var T=2*h,A=v,y=T*v;A<m;++A,y+=T){var E=g[d+y],S=g[d+y+h],C=w[A];e:for(var k=b,D=T*b;k<_;++k,D+=T){var F=M[d+D],P=M[d+D+h],R=x[k];if(!(P<E||S<F)){for(var L=d+1;L<h;++L){var I=g[L+y],B=g[L+h+y],O=M[L+D],$=M[L+h+D];if(B<O||$<I)continue e}var Y=p(C,R);if(Y!==void 0)return Y}}}}function c(h,d,p,v,m,g,w,b,_,M,x){for(var T=2*h,A=b,y=T*b;A<_;++A,y+=T){var E=M[d+y],S=M[d+y+h],C=x[A];e:for(var k=v,D=T*v;k<m;++k,D+=T){var F=g[d+D],P=g[d+D+h],R=w[k];if(!(S<F||P<E)){for(var L=d+1;L<h;++L){var I=g[L+D],B=g[L+h+D],O=M[L+y],$=M[L+h+y];if(B<O||$<I)continue e}var Y=p(R,C);if(Y!==void 0)return Y}}}}function f(h,d,p,v,m,g,w,b,_,M,x){return m-v>_-b?u(h,d,p,v,m,g,w,b,_,M,x):c(h,d,p,v,m,g,w,b,_,M,x)}return f}function s(){function u(p,v,m,g,w,b,_,M,x,T,A){for(var y=2*p,E=g,S=y*g;E<w;++E,S+=y){var C=b[v+S],k=b[v+S+p],D=_[E];e:for(var F=M,P=y*M;F<x;++F,P+=y){var R=T[v+P],L=A[F];if(!(R<=C||k<R)){for(var I=v+1;I<p;++I){var B=b[I+S],O=b[I+p+S],$=T[I+P],Y=T[I+p+P];if(O<$||Y<B)continue e}var K=m(L,D);if(K!==void 0)return K}}}}function c(p,v,m,g,w,b,_,M,x,T,A){for(var y=2*p,E=g,S=y*g;E<w;++E,S+=y){var C=b[v+S],k=b[v+S+p],D=_[E];e:for(var F=M,P=y*M;F<x;++F,P+=y){var R=T[v+P],L=A[F];if(!(R<C||k<R)){for(var I=v+1;I<p;++I){var B=b[I+S],O=b[I+p+S],$=T[I+P],Y=T[I+p+P];if(O<$||Y<B)continue e}var K=m(D,L);if(K!==void 0)return K}}}}function f(p,v,m,g,w,b,_,M,x,T,A){for(var y=2*p,E=M,S=y*M;E<x;++E,S+=y){var C=T[v+S],k=A[E];e:for(var D=g,F=y*g;D<w;++D,F+=y){var P=b[v+F],R=b[v+F+p],L=_[D];if(!(C<=P||R<C)){for(var I=v+1;I<p;++I){var B=b[I+F],O=b[I+p+F],$=T[I+S],Y=T[I+p+S];if(O<$||Y<B)continue e}var K=m(k,L);if(K!==void 0)return K}}}}function h(p,v,m,g,w,b,_,M,x,T,A){for(var y=2*p,E=M,S=y*M;E<x;++E,S+=y){var C=T[v+S],k=A[E];e:for(var D=g,F=y*g;D<w;++D,F+=y){var P=b[v+F],R=b[v+F+p],L=_[D];if(!(C<P||R<C)){for(var I=v+1;I<p;++I){var B=b[I+F],O=b[I+p+F],$=T[I+S],Y=T[I+p+S];if(O<$||Y<B)continue e}var K=m(L,k);if(K!==void 0)return K}}}}function d(p,v,m,g,w,b,_,M,x,T,A,y){return b-w>T-x?g?u(p,v,m,w,b,_,M,x,T,A,y):c(p,v,m,w,b,_,M,x,T,A,y):g?f(p,v,m,w,b,_,M,x,T,A,y):h(p,v,m,w,b,_,M,x,T,A,y)}return d}function l(u){return u?o():s()}a.partial=l(!1),a.full=l(!0)},7150(n,a,o){"use strict";n.exports=R;var s=o(1888),l=o(8828),u=o(2455),c=u.partial,f=u.full,h=o(855),d=o(3545),p=o(8105),v=128,m=1<<22,g=1<<22,w=p("!(lo>=p0)&&!(p1>=hi)"),b=p("lo===p0"),_=p("lo<p0"),M=p("hi<=p0"),x=p("lo<=p0&&p0<=hi"),T=p("lo<p0&&p0<=hi"),A=6,y=2,E=1024,S=s.mallocInt32(E),C=s.mallocDouble(E);function k(L,I){var B=8*l.log2(I+1)*(L+1)|0,O=l.nextPow2(A*B);S.length<O&&(s.free(S),S=s.mallocInt32(O));var $=l.nextPow2(y*B);C.length<$&&(s.free(C),C=s.mallocDouble($))}function D(L,I,B,O,$,Y,K,j,q){var J=A*L;S[J]=I,S[J+1]=B,S[J+2]=O,S[J+3]=$,S[J+4]=Y,S[J+5]=K;var U=y*L;C[U]=j,C[U+1]=q}function F(L,I,B,O,$,Y,K,j,q,J,U){var V=2*L,X=q*V,H=J[X+I];e:for(var G=$,Q=$*V;G<Y;++G,Q+=V){var te=K[Q+I],ce=K[Q+I+L];if(!(H<te||ce<H)&&!(O&&H===te)){for(var ge=j[G],Ce=I+1;Ce<L;++Ce){var te=K[Q+Ce],ce=K[Q+Ce+L],be=J[X+Ce],he=J[X+Ce+L];if(ce<be||he<te)continue e}var oe;if(O?oe=B(U,ge):oe=B(ge,U),oe!==void 0)return oe}}}function P(L,I,B,O,$,Y,K,j,q,J){var U=2*L,V=j*U,X=q[V+I];e:for(var H=O,G=O*U;H<$;++H,G+=U){var Q=K[H];if(Q!==J){var te=Y[G+I],ce=Y[G+I+L];if(!(X<te||ce<X)){for(var ge=I+1;ge<L;++ge){var te=Y[G+ge],ce=Y[G+ge+L],Ce=q[V+ge],be=q[V+ge+L];if(ce<Ce||be<te)continue e}var he=B(Q,J);if(he!==void 0)return he}}}}function R(L,I,B,O,$,Y,K,j,q){k(L,O+K);var J=0,U=2*L,V;for(D(J++,0,0,O,0,K,B?16:0,-1/0,1/0),B||D(J++,0,0,K,0,O,1,-1/0,1/0);J>0;){J-=1;var X=J*A,H=S[X],G=S[X+1],Q=S[X+2],te=S[X+3],ce=S[X+4],ge=S[X+5],Ce=J*y,be=C[Ce],he=C[Ce+1],oe=ge&1,Ee=!!(ge&16),ye=$,ue=Y,ee=j,ae=q;if(oe&&(ye=j,ue=q,ee=$,ae=Y),!(ge&2&&(Q=_(L,H,G,Q,ye,ue,he),G>=Q))&&!(ge&4&&(G=M(L,H,G,Q,ye,ue,be),G>=Q))){var xe=Q-G,re=ce-te;if(Ee){if(L*xe*(xe+re)<g){if(V=h.scanComplete(L,H,I,G,Q,ye,ue,te,ce,ee,ae),V!==void 0)return V;continue}}else if(L*Math.min(xe,re)<v){if(V=c(L,H,I,oe,G,Q,ye,ue,te,ce,ee,ae),V!==void 0)return V;continue}else if(L*xe*re<m){if(V=h.scanBipartite(L,H,I,oe,G,Q,ye,ue,te,ce,ee,ae),V!==void 0)return V;continue}var pe=w(L,H,G,Q,ye,ue,be,he);if(G<pe)if(L*(pe-G)<v){if(V=f(L,H+1,I,G,pe,ye,ue,te,ce,ee,ae),V!==void 0)return V}else if(H===L-2){if(oe?V=h.sweepBipartite(L,I,te,ce,ee,ae,G,pe,ye,ue):V=h.sweepBipartite(L,I,G,pe,ye,ue,te,ce,ee,ae),V!==void 0)return V}else D(J++,H+1,G,pe,te,ce,oe,-1/0,1/0),D(J++,H+1,te,ce,G,pe,oe^1,-1/0,1/0);if(pe<Q){var we=d(L,H,te,ce,ee,ae),Fe=ee[U*we+H],Se=b(L,H,we,ce,ee,ae,Fe);if(Se<ce&&D(J++,H,pe,Q,Se,ce,(oe|4)+(Ee?16:0),Fe,he),te<we&&D(J++,H,pe,Q,te,we,(oe|2)+(Ee?16:0),be,Fe),we+1===Se){if(Ee?V=P(L,H,I,pe,Q,ye,ue,we,ee,ae[we]):V=F(L,H,I,oe,pe,Q,ye,ue,we,ee,ae[we]),V!==void 0)return V}else if(we<Se){var ke;if(Ee){if(ke=x(L,H,pe,Q,ye,ue,Fe),pe<ke){var _e=b(L,H,pe,ke,ye,ue,Fe);if(H===L-2){if(pe<_e&&(V=h.sweepComplete(L,I,pe,_e,ye,ue,we,Se,ee,ae),V!==void 0)||_e<ke&&(V=h.sweepBipartite(L,I,_e,ke,ye,ue,we,Se,ee,ae),V!==void 0))return V}else pe<_e&&D(J++,H+1,pe,_e,we,Se,16,-1/0,1/0),_e<ke&&(D(J++,H+1,_e,ke,we,Se,0,-1/0,1/0),D(J++,H+1,we,Se,_e,ke,1,-1/0,1/0))}}else oe?ke=T(L,H,pe,Q,ye,ue,Fe):ke=x(L,H,pe,Q,ye,ue,Fe),pe<ke&&(H===L-2?oe?V=h.sweepBipartite(L,I,we,Se,ee,ae,pe,ke,ye,ue):V=h.sweepBipartite(L,I,pe,ke,ye,ue,we,Se,ee,ae):(D(J++,H+1,pe,ke,we,Se,oe,-1/0,1/0),D(J++,H+1,we,Se,pe,ke,oe^1,-1/0,1/0)))}}}}}},3545(n,a,o){"use strict";n.exports=f;var s=o(8105),l=s("lo<p0"),u=8;function c(h,d,p,v,m,g){for(var w=2*h,b=w*(p+1)+d,_=p+1;_<v;++_,b+=w)for(var M=m[b],x=_,T=w*(_-1);x>p&&m[T+d]>M;--x,T-=w){for(var A=T,y=T+w,E=0;E<w;++E,++A,++y){var S=m[A];m[A]=m[y],m[y]=S}var C=g[x];g[x]=g[x-1],g[x-1]=C}}function f(h,d,p,v,m,g){if(v<=p+1)return p;for(var w=p,b=v,_=v+p>>>1,M=2*h,x=_,T=m[M*_+d];w<b;){if(b-w<u){c(h,d,w,b,m,g),T=m[M*_+d];break}var A=b-w,y=Math.random()*A+w|0,E=m[M*y+d],S=Math.random()*A+w|0,C=m[M*S+d],k=Math.random()*A+w|0,D=m[M*k+d];E<=C?D>=C?(x=S,T=C):E>=D?(x=y,T=E):(x=k,T=D):C>=D?(x=S,T=C):D>=E?(x=y,T=E):(x=k,T=D);for(var R=M*(b-1),L=M*x,F=0;F<M;++F,++R,++L){var P=m[R];m[R]=m[L],m[L]=P}var I=g[b-1];g[b-1]=g[x],g[x]=I,x=l(h,d,w,b-1,m,g,T);for(var R=M*(b-1),L=M*x,F=0;F<M;++F,++R,++L){var P=m[R];m[R]=m[L],m[L]=P}var I=g[b-1];if(g[b-1]=g[x],g[x]=I,_<x){for(b=x-1;w<b&&m[M*(b-1)+d]===T;)b-=1;b+=1}else if(x<_)for(w=x+1;w<b&&m[M*w+d]===T;)w+=1;else break}return l(h,d,p,_,m,g,m[M*_+d])}},8105(n){"use strict";n.exports=o;var a={"lo===p0":s,"lo<p0":l,"lo<=p0":u,"hi<=p0":c,"lo<p0&&p0<=hi":h,"lo<=p0&&p0<=hi":f,"!(lo>=p0)&&!(p1>=hi)":d};function o(p){return a[p]}function s(p,v,m,g,w,b,_){for(var M=2*p,x=M*m,T=x,A=m,y=v,E=p+v,S=m;g>S;++S,x+=M){var C=w[x+y];if(C===_)if(A===S)A+=1,T+=M;else{for(var k=0;M>k;++k){var D=w[x+k];w[x+k]=w[T],w[T++]=D}var F=b[S];b[S]=b[A],b[A++]=F}}return A}function l(p,v,m,g,w,b,_){for(var M=2*p,x=M*m,T=x,A=m,y=v,E=p+v,S=m;g>S;++S,x+=M){var C=w[x+y];if(C<_)if(A===S)A+=1,T+=M;else{for(var k=0;M>k;++k){var D=w[x+k];w[x+k]=w[T],w[T++]=D}var F=b[S];b[S]=b[A],b[A++]=F}}return A}function u(p,v,m,g,w,b,_){for(var M=2*p,x=M*m,T=x,A=m,y=v,E=p+v,S=m;g>S;++S,x+=M){var C=w[x+E];if(C<=_)if(A===S)A+=1,T+=M;else{for(var k=0;M>k;++k){var D=w[x+k];w[x+k]=w[T],w[T++]=D}var F=b[S];b[S]=b[A],b[A++]=F}}return A}function c(p,v,m,g,w,b,_){for(var M=2*p,x=M*m,T=x,A=m,y=v,E=p+v,S=m;g>S;++S,x+=M){var C=w[x+E];if(C<=_)if(A===S)A+=1,T+=M;else{for(var k=0;M>k;++k){var D=w[x+k];w[x+k]=w[T],w[T++]=D}var F=b[S];b[S]=b[A],b[A++]=F}}return A}function f(p,v,m,g,w,b,_){for(var M=2*p,x=M*m,T=x,A=m,y=v,E=p+v,S=m;g>S;++S,x+=M){var C=w[x+y],k=w[x+E];if(C<=_&&_<=k)if(A===S)A+=1,T+=M;else{for(var D=0;M>D;++D){var F=w[x+D];w[x+D]=w[T],w[T++]=F}var P=b[S];b[S]=b[A],b[A++]=P}}return A}function h(p,v,m,g,w,b,_){for(var M=2*p,x=M*m,T=x,A=m,y=v,E=p+v,S=m;g>S;++S,x+=M){var C=w[x+y],k=w[x+E];if(C<_&&_<=k)if(A===S)A+=1,T+=M;else{for(var D=0;M>D;++D){var F=w[x+D];w[x+D]=w[T],w[T++]=F}var P=b[S];b[S]=b[A],b[A++]=P}}return A}function d(p,v,m,g,w,b,_,M){for(var x=2*p,T=x*m,A=T,y=m,E=v,S=p+v,C=m;g>C;++C,T+=x){var k=w[T+E],D=w[T+S];if(!(k>=_)&&!(M>=D))if(y===C)y+=1,A+=x;else{for(var F=0;x>F;++F){var P=w[T+F];w[T+F]=w[A],w[A++]=P}var R=b[C];b[C]=b[y],b[y++]=R}}return y}},4192(n){"use strict";n.exports=o;var a=32;function o(v,m){m<=4*a?s(0,m-1,v):p(0,m-1,v)}function s(v,m,g){for(var w=2*(v+1),b=v+1;b<=m;++b){for(var _=g[w++],M=g[w++],x=b,T=w-2;x-- >v;){var A=g[T-2],y=g[T-1];if(A<_)break;if(A===_&&y<M)break;g[T]=A,g[T+1]=y,T-=2}g[T]=_,g[T+1]=M}}function l(v,m,g){v*=2,m*=2;var w=g[v],b=g[v+1];g[v]=g[m],g[v+1]=g[m+1],g[m]=w,g[m+1]=b}function u(v,m,g){v*=2,m*=2,g[v]=g[m],g[v+1]=g[m+1]}function c(v,m,g,w){v*=2,m*=2,g*=2;var b=w[v],_=w[v+1];w[v]=w[m],w[v+1]=w[m+1],w[m]=w[g],w[m+1]=w[g+1],w[g]=b,w[g+1]=_}function f(v,m,g,w,b){v*=2,m*=2,b[v]=b[m],b[m]=g,b[v+1]=b[m+1],b[m+1]=w}function h(v,m,g){v*=2,m*=2;var w=g[v],b=g[m];return w<b?!1:w===b?g[v+1]>g[m+1]:!0}function d(v,m,g,w){v*=2;var b=w[v];return b<m?!0:b===m?w[v+1]<g:!1}function p(v,m,g){var w=(m-v+1)/6|0,b=v+w,_=m-w,M=v+m>>1,x=M-w,T=M+w,A=b,y=x,E=M,S=T,C=_,k=v+1,D=m-1,F=0;h(A,y,g)&&(F=A,A=y,y=F),h(S,C,g)&&(F=S,S=C,C=F),h(A,E,g)&&(F=A,A=E,E=F),h(y,E,g)&&(F=y,y=E,E=F),h(A,S,g)&&(F=A,A=S,S=F),h(E,S,g)&&(F=E,E=S,S=F),h(y,C,g)&&(F=y,y=C,C=F),h(y,E,g)&&(F=y,y=E,E=F),h(S,C,g)&&(F=S,S=C,C=F);for(var P=g[2*y],R=g[2*y+1],L=g[2*S],I=g[2*S+1],B=2*A,O=2*E,$=2*C,Y=2*b,K=2*M,j=2*_,q=0;q<2;++q){var J=g[B+q],U=g[O+q],V=g[$+q];g[Y+q]=J,g[K+q]=U,g[j+q]=V}u(x,v,g),u(T,m,g);for(var X=k;X<=D;++X)if(d(X,P,R,g))X!==k&&l(X,k,g),++k;else if(!d(X,L,I,g))for(;;)if(d(D,L,I,g)){d(D,P,R,g)?(c(X,k,D,g),++k,--D):(l(X,D,g),--D);break}else{if(--D<X)break;continue}f(v,k-1,P,R,g),f(m,D+1,L,I,g),k-2-v<=a?s(v,k-2,g):p(v,k-2,g),m-(D+2)<=a?s(D+2,m,g):p(D+2,m,g),D-k<=a?s(k,D,g):p(k,D,g)}},855(n,a,o){"use strict";n.exports={init:b,sweepBipartite:x,sweepComplete:T,scanBipartite:A,scanComplete:y};var s=o(1888),l=o(8828),u=o(4192),c=1<<28,f=1024,h=s.mallocInt32(f),d=s.mallocInt32(f),p=s.mallocInt32(f),v=s.mallocInt32(f),m=s.mallocInt32(f),g=s.mallocInt32(f),w=s.mallocDouble(f*8);function b(E){var S=l.nextPow2(E);h.length<S&&(s.free(h),h=s.mallocInt32(S)),d.length<S&&(s.free(d),d=s.mallocInt32(S)),p.length<S&&(s.free(p),p=s.mallocInt32(S)),v.length<S&&(s.free(v),v=s.mallocInt32(S)),m.length<S&&(s.free(m),m=s.mallocInt32(S)),g.length<S&&(s.free(g),g=s.mallocInt32(S));var C=8*S;w.length<C&&(s.free(w),w=s.mallocDouble(C))}function _(E,S,C,k){var D=S[k],F=E[C-1];E[D]=F,S[F]=D}function M(E,S,C,k){E[C]=k,S[k]=C}function x(E,S,C,k,D,F,P,R,L,I){for(var B=0,O=2*E,$=E-1,Y=O-1,K=C;K<k;++K){var j=F[K],q=O*K;w[B++]=D[q+$],w[B++]=-(j+1),w[B++]=D[q+Y],w[B++]=j}for(var K=P;K<R;++K){var j=I[K]+c,J=O*K;w[B++]=L[J+$],w[B++]=-j,w[B++]=L[J+Y],w[B++]=j}var U=B>>>1;u(w,U);for(var V=0,X=0,K=0;K<U;++K){var H=w[2*K+1]|0;if(H>=c)H=H-c|0,_(p,v,X--,H);else if(H>=0)_(h,d,V--,H);else if(H<=-c){H=-H-c|0;for(var G=0;G<V;++G){var Q=S(h[G],H);if(Q!==void 0)return Q}M(p,v,X++,H)}else{H=-H-1|0;for(var G=0;G<X;++G){var Q=S(H,p[G]);if(Q!==void 0)return Q}M(h,d,V++,H)}}}function T(E,S,C,k,D,F,P,R,L,I){for(var B=0,O=2*E,$=E-1,Y=O-1,K=C;K<k;++K){var j=F[K]+1<<1,q=O*K;w[B++]=D[q+$],w[B++]=-j,w[B++]=D[q+Y],w[B++]=j}for(var K=P;K<R;++K){var j=I[K]+1<<1,J=O*K;w[B++]=L[J+$],w[B++]=-j|1,w[B++]=L[J+Y],w[B++]=j|1}var U=B>>>1;u(w,U);for(var V=0,X=0,H=0,K=0;K<U;++K){var G=w[2*K+1]|0,Q=G&1;if(K<U-1&&G>>1===w[2*K+3]>>1&&(Q=2,K+=1),G<0){for(var te=-(G>>1)-1,ce=0;ce<H;++ce){var ge=S(m[ce],te);if(ge!==void 0)return ge}if(Q!==0)for(var ce=0;ce<V;++ce){var ge=S(h[ce],te);if(ge!==void 0)return ge}if(Q!==1)for(var ce=0;ce<X;++ce){var ge=S(p[ce],te);if(ge!==void 0)return ge}Q===0?M(h,d,V++,te):Q===1?M(p,v,X++,te):Q===2&&M(m,g,H++,te)}else{var te=(G>>1)-1;Q===0?_(h,d,V--,te):Q===1?_(p,v,X--,te):Q===2&&_(m,g,H--,te)}}}function A(E,S,C,k,D,F,P,R,L,I,B,O){var $=0,Y=2*E,K=S,j=S+E,q=1,J=1;k?J=c:q=c;for(var U=D;U<F;++U){var V=U+q,X=Y*U;w[$++]=P[X+K],w[$++]=-V,w[$++]=P[X+j],w[$++]=V}for(var U=L;U<I;++U){var V=U+J,H=Y*U;w[$++]=B[H+K],w[$++]=-V}var G=$>>>1;u(w,G);for(var Q=0,U=0;U<G;++U){var te=w[2*U+1]|0;if(te<0){var V=-te,ce=!1;if(V>=c?(ce=!k,V-=c):(ce=!!k,V-=1),ce)M(h,d,Q++,V);else{var ge=O[V],Ce=Y*V,be=B[Ce+S+1],he=B[Ce+S+1+E];e:for(var oe=0;oe<Q;++oe){var Ee=h[oe],ye=Y*Ee;if(!(he<P[ye+S+1]||P[ye+S+1+E]<be)){for(var ue=S+2;ue<E;++ue)if(B[Ce+ue+E]<P[ye+ue]||P[ye+ue+E]<B[Ce+ue])continue e;var ee=R[Ee],ae;if(k?ae=C(ge,ee):ae=C(ee,ge),ae!==void 0)return ae}}}}else _(h,d,Q--,te-q)}}function y(E,S,C,k,D,F,P,R,L,I,B){for(var O=0,$=2*E,Y=S,K=S+E,j=k;j<D;++j){var q=j+c,J=$*j;w[O++]=F[J+Y],w[O++]=-q,w[O++]=F[J+K],w[O++]=q}for(var j=R;j<L;++j){var q=j+1,U=$*j;w[O++]=I[U+Y],w[O++]=-q}var V=O>>>1;u(w,V);for(var X=0,j=0;j<V;++j){var H=w[2*j+1]|0;if(H<0){var q=-H;if(q>=c)h[X++]=q-c;else{q-=1;var G=B[q],Q=$*q,te=I[Q+S+1],ce=I[Q+S+1+E];e:for(var ge=0;ge<X;++ge){var Ce=h[ge],be=P[Ce];if(be===G)break;var he=$*Ce;if(!(ce<F[he+S+1]||F[he+S+1+E]<te)){for(var oe=S+2;oe<E;++oe)if(I[Q+oe+E]<F[he+oe]||F[he+oe+E]<I[Q+oe])continue e;var Ee=C(be,G);if(Ee!==void 0)return Ee}}}}else{for(var q=H-c,ge=X-1;ge>=0;--ge)if(h[ge]===q){for(var oe=ge+1;oe<X;++oe)h[oe-1]=h[oe];break}--X}}}},5500(n,a,o){"use strict";var s;var l=o(7507),u=o(3778),c=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.hp=p,s=y,a.IS=50;var f=2147483647;s=f,p.TYPED_ARRAY_SUPPORT=h(),!p.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function h(){try{var ue=new Uint8Array(1),ee={foo:function(){return 42}};return Object.setPrototypeOf(ee,Uint8Array.prototype),Object.setPrototypeOf(ue,ee),ue.foo()===42}catch(ae){return!1}}Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}});function d(ue){if(ue>f)throw new RangeError('The value "'+ue+'" is invalid for option "size"');var ee=new Uint8Array(ue);return Object.setPrototypeOf(ee,p.prototype),ee}function p(ue,ee,ae){if(typeof ue=="number"){if(typeof ee=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(ue)}return v(ue,ee,ae)}p.poolSize=8192;function v(ue,ee,ae){if(typeof ue=="string")return b(ue,ee);if(ArrayBuffer.isView(ue))return M(ue);if(ue==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ue);if(oe(ue,ArrayBuffer)||ue&&oe(ue.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(oe(ue,SharedArrayBuffer)||ue&&oe(ue.buffer,SharedArrayBuffer)))return x(ue,ee,ae);if(typeof ue=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var xe=ue.valueOf&&ue.valueOf();if(xe!=null&&xe!==ue)return p.from(xe,ee,ae);var re=T(ue);if(re)return re;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof ue[Symbol.toPrimitive]=="function")return p.from(ue[Symbol.toPrimitive]("string"),ee,ae);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ue)}p.from=function(ue,ee,ae){return v(ue,ee,ae)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array);function m(ue){if(typeof ue!="number")throw new TypeError('"size" argument must be of type number');if(ue<0)throw new RangeError('The value "'+ue+'" is invalid for option "size"')}function g(ue,ee,ae){return m(ue),ue<=0?d(ue):ee!==void 0?typeof ae=="string"?d(ue).fill(ee,ae):d(ue).fill(ee):d(ue)}p.alloc=function(ue,ee,ae){return g(ue,ee,ae)};function w(ue){return m(ue),d(ue<0?0:A(ue)|0)}p.allocUnsafe=function(ue){return w(ue)},p.allocUnsafeSlow=function(ue){return w(ue)};function b(ue,ee){if((typeof ee!="string"||ee==="")&&(ee="utf8"),!p.isEncoding(ee))throw new TypeError("Unknown encoding: "+ee);var ae=E(ue,ee)|0,xe=d(ae),re=xe.write(ue,ee);return re!==ae&&(xe=xe.slice(0,re)),xe}function _(ue){for(var ee=ue.length<0?0:A(ue.length)|0,ae=d(ee),xe=0;xe<ee;xe+=1)ae[xe]=ue[xe]&255;return ae}function M(ue){if(oe(ue,Uint8Array)){var ee=new Uint8Array(ue);return x(ee.buffer,ee.byteOffset,ee.byteLength)}return _(ue)}function x(ue,ee,ae){if(ee<0||ue.byteLength<ee)throw new RangeError('"offset" is outside of buffer bounds');if(ue.byteLength<ee+(ae||0))throw new RangeError('"length" is outside of buffer bounds');var xe;return ee===void 0&&ae===void 0?xe=new Uint8Array(ue):ae===void 0?xe=new Uint8Array(ue,ee):xe=new Uint8Array(ue,ee,ae),Object.setPrototypeOf(xe,p.prototype),xe}function T(ue){if(p.isBuffer(ue)){var ee=A(ue.length)|0,ae=d(ee);return ae.length===0||ue.copy(ae,0,0,ee),ae}if(ue.length!==void 0)return typeof ue.length!="number"||Ee(ue.length)?d(0):_(ue);if(ue.type==="Buffer"&&Array.isArray(ue.data))return _(ue.data)}function A(ue){if(ue>=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return ue|0}function y(ue){return+ue!=ue&&(ue=0),p.alloc(+ue)}p.isBuffer=function(ee){return ee!=null&&ee._isBuffer===!0&&ee!==p.prototype},p.compare=function(ee,ae){if(oe(ee,Uint8Array)&&(ee=p.from(ee,ee.offset,ee.byteLength)),oe(ae,Uint8Array)&&(ae=p.from(ae,ae.offset,ae.byteLength)),!p.isBuffer(ee)||!p.isBuffer(ae))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ee===ae)return 0;for(var xe=ee.length,re=ae.length,pe=0,we=Math.min(xe,re);pe<we;++pe)if(ee[pe]!==ae[pe]){xe=ee[pe],re=ae[pe];break}return xe<re?-1:re<xe?1:0},p.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}},p.concat=function(ee,ae){if(!Array.isArray(ee))throw new TypeError('"list" argument must be an Array of Buffers');if(ee.length===0)return p.alloc(0);var xe;if(ae===void 0)for(ae=0,xe=0;xe<ee.length;++xe)ae+=ee[xe].length;var re=p.allocUnsafe(ae),pe=0;for(xe=0;xe<ee.length;++xe){var we=ee[xe];if(oe(we,Uint8Array))pe+we.length>re.length?p.from(we).copy(re,pe):Uint8Array.prototype.set.call(re,we,pe);else if(p.isBuffer(we))we.copy(re,pe);else throw new TypeError('"list" argument must be an Array of Buffers');pe+=we.length}return re};function E(ue,ee){if(p.isBuffer(ue))return ue.length;if(ArrayBuffer.isView(ue)||oe(ue,ArrayBuffer))return ue.byteLength;if(typeof ue!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ue);var ae=ue.length,xe=arguments.length>2&&arguments[2]===!0;if(!xe&&ae===0)return 0;for(var re=!1;;)switch(ee){case"ascii":case"latin1":case"binary":return ae;case"utf8":case"utf-8":return ce(ue).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae*2;case"hex":return ae>>>1;case"base64":return be(ue).length;default:if(re)return xe?-1:ce(ue).length;ee=(""+ee).toLowerCase(),re=!0}}p.byteLength=E;function S(ue,ee,ae){var xe=!1;if((ee===void 0||ee<0)&&(ee=0),ee>this.length||((ae===void 0||ae>this.length)&&(ae=this.length),ae<=0)||(ae>>>=0,ee>>>=0,ae<=ee))return"";for(ue||(ue="utf8");;)switch(ue){case"hex":return q(this,ee,ae);case"utf8":case"utf-8":return O(this,ee,ae);case"ascii":return K(this,ee,ae);case"latin1":case"binary":return j(this,ee,ae);case"base64":return B(this,ee,ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,ee,ae);default:if(xe)throw new TypeError("Unknown encoding: "+ue);ue=(ue+"").toLowerCase(),xe=!0}}p.prototype._isBuffer=!0;function C(ue,ee,ae){var xe=ue[ee];ue[ee]=ue[ae],ue[ae]=xe}p.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 ae=0;ae<ee;ae+=2)C(this,ae,ae+1);return this},p.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 ae=0;ae<ee;ae+=4)C(this,ae,ae+3),C(this,ae+1,ae+2);return this},p.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 ae=0;ae<ee;ae+=8)C(this,ae,ae+7),C(this,ae+1,ae+6),C(this,ae+2,ae+5),C(this,ae+3,ae+4);return this},p.prototype.toString=function(){var ee=this.length;return ee===0?"":arguments.length===0?O(this,0,ee):S.apply(this,arguments)},p.prototype.toLocaleString=p.prototype.toString,p.prototype.equals=function(ee){if(!p.isBuffer(ee))throw new TypeError("Argument must be a Buffer");return this===ee?!0:p.compare(this,ee)===0},p.prototype.inspect=function(){var ee="",ae=a.IS;return ee=this.toString("hex",0,ae).replace(/(.{2})/g,"$1 ").trim(),this.length>ae&&(ee+=" ... "),"<Buffer "+ee+">"},c&&(p.prototype[c]=p.prototype.inspect),p.prototype.compare=function(ee,ae,xe,re,pe){if(oe(ee,Uint8Array)&&(ee=p.from(ee,ee.offset,ee.byteLength)),!p.isBuffer(ee))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ee);if(ae===void 0&&(ae=0),xe===void 0&&(xe=ee?ee.length:0),re===void 0&&(re=0),pe===void 0&&(pe=this.length),ae<0||xe>ee.length||re<0||pe>this.length)throw new RangeError("out of range index");if(re>=pe&&ae>=xe)return 0;if(re>=pe)return-1;if(ae>=xe)return 1;if(ae>>>=0,xe>>>=0,re>>>=0,pe>>>=0,this===ee)return 0;for(var we=pe-re,Fe=xe-ae,Se=Math.min(we,Fe),ke=this.slice(re,pe),_e=ee.slice(ae,xe),Ie=0;Ie<Se;++Ie)if(ke[Ie]!==_e[Ie]){we=ke[Ie],Fe=_e[Ie];break}return we<Fe?-1:Fe<we?1:0};function k(ue,ee,ae,xe,re){if(ue.length===0)return-1;if(typeof ae=="string"?(xe=ae,ae=0):ae>2147483647?ae=2147483647:ae<-2147483648&&(ae=-2147483648),ae=+ae,Ee(ae)&&(ae=re?0:ue.length-1),ae<0&&(ae=ue.length+ae),ae>=ue.length){if(re)return-1;ae=ue.length-1}else if(ae<0)if(re)ae=0;else return-1;if(typeof ee=="string"&&(ee=p.from(ee,xe)),p.isBuffer(ee))return ee.length===0?-1:D(ue,ee,ae,xe,re);if(typeof ee=="number")return ee=ee&255,typeof Uint8Array.prototype.indexOf=="function"?re?Uint8Array.prototype.indexOf.call(ue,ee,ae):Uint8Array.prototype.lastIndexOf.call(ue,ee,ae):D(ue,[ee],ae,xe,re);throw new TypeError("val must be string, number or Buffer")}function D(ue,ee,ae,xe,re){var pe=1,we=ue.length,Fe=ee.length;if(xe!==void 0&&(xe=String(xe).toLowerCase(),xe==="ucs2"||xe==="ucs-2"||xe==="utf16le"||xe==="utf-16le")){if(ue.length<2||ee.length<2)return-1;pe=2,we/=2,Fe/=2,ae/=2}function Se(Qe,et){return pe===1?Qe[et]:Qe.readUInt16BE(et*pe)}var ke;if(re){var _e=-1;for(ke=ae;ke<we;ke++)if(Se(ue,ke)===Se(ee,_e===-1?0:ke-_e)){if(_e===-1&&(_e=ke),ke-_e+1===Fe)return _e*pe}else _e!==-1&&(ke-=ke-_e),_e=-1}else for(ae+Fe>we&&(ae=we-Fe),ke=ae;ke>=0;ke--){for(var Ie=!0,Oe=0;Oe<Fe;Oe++)if(Se(ue,ke+Oe)!==Se(ee,Oe)){Ie=!1;break}if(Ie)return ke}return-1}p.prototype.includes=function(ee,ae,xe){return this.indexOf(ee,ae,xe)!==-1},p.prototype.indexOf=function(ee,ae,xe){return k(this,ee,ae,xe,!0)},p.prototype.lastIndexOf=function(ee,ae,xe){return k(this,ee,ae,xe,!1)};function F(ue,ee,ae,xe){ae=Number(ae)||0;var re=ue.length-ae;xe?(xe=Number(xe),xe>re&&(xe=re)):xe=re;var pe=ee.length;xe>pe/2&&(xe=pe/2);for(var we=0;we<xe;++we){var Fe=parseInt(ee.substr(we*2,2),16);if(Ee(Fe))return we;ue[ae+we]=Fe}return we}function P(ue,ee,ae,xe){return he(ce(ee,ue.length-ae),ue,ae,xe)}function R(ue,ee,ae,xe){return he(ge(ee),ue,ae,xe)}function L(ue,ee,ae,xe){return he(be(ee),ue,ae,xe)}function I(ue,ee,ae,xe){return he(Ce(ee,ue.length-ae),ue,ae,xe)}p.prototype.write=function(ee,ae,xe,re){if(ae===void 0)re="utf8",xe=this.length,ae=0;else if(xe===void 0&&typeof ae=="string")re=ae,xe=this.length,ae=0;else if(isFinite(ae))ae=ae>>>0,isFinite(xe)?(xe=xe>>>0,re===void 0&&(re="utf8")):(re=xe,xe=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var pe=this.length-ae;if((xe===void 0||xe>pe)&&(xe=pe),ee.length>0&&(xe<0||ae<0)||ae>this.length)throw new RangeError("Attempt to write outside buffer bounds");re||(re="utf8");for(var we=!1;;)switch(re){case"hex":return F(this,ee,ae,xe);case"utf8":case"utf-8":return P(this,ee,ae,xe);case"ascii":case"latin1":case"binary":return R(this,ee,ae,xe);case"base64":return L(this,ee,ae,xe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,ee,ae,xe);default:if(we)throw new TypeError("Unknown encoding: "+re);re=(""+re).toLowerCase(),we=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function B(ue,ee,ae){return ee===0&&ae===ue.length?l.fromByteArray(ue):l.fromByteArray(ue.slice(ee,ae))}function O(ue,ee,ae){ae=Math.min(ue.length,ae);for(var xe=[],re=ee;re<ae;){var pe=ue[re],we=null,Fe=pe>239?4:pe>223?3:pe>191?2:1;if(re+Fe<=ae){var Se,ke,_e,Ie;switch(Fe){case 1:pe<128&&(we=pe);break;case 2:Se=ue[re+1],(Se&192)===128&&(Ie=(pe&31)<<6|Se&63,Ie>127&&(we=Ie));break;case 3:Se=ue[re+1],ke=ue[re+2],(Se&192)===128&&(ke&192)===128&&(Ie=(pe&15)<<12|(Se&63)<<6|ke&63,Ie>2047&&(Ie<55296||Ie>57343)&&(we=Ie));break;case 4:Se=ue[re+1],ke=ue[re+2],_e=ue[re+3],(Se&192)===128&&(ke&192)===128&&(_e&192)===128&&(Ie=(pe&15)<<18|(Se&63)<<12|(ke&63)<<6|_e&63,Ie>65535&&Ie<1114112&&(we=Ie))}}we===null?(we=65533,Fe=1):we>65535&&(we-=65536,xe.push(we>>>10&1023|55296),we=56320|we&1023),xe.push(we),re+=Fe}return Y(xe)}var $=4096;function Y(ue){var ee=ue.length;if(ee<=$)return String.fromCharCode.apply(String,ue);for(var ae="",xe=0;xe<ee;)ae+=String.fromCharCode.apply(String,ue.slice(xe,xe+=$));return ae}function K(ue,ee,ae){var xe="";ae=Math.min(ue.length,ae);for(var re=ee;re<ae;++re)xe+=String.fromCharCode(ue[re]&127);return xe}function j(ue,ee,ae){var xe="";ae=Math.min(ue.length,ae);for(var re=ee;re<ae;++re)xe+=String.fromCharCode(ue[re]);return xe}function q(ue,ee,ae){var xe=ue.length;(!ee||ee<0)&&(ee=0),(!ae||ae<0||ae>xe)&&(ae=xe);for(var re="",pe=ee;pe<ae;++pe)re+=ye[ue[pe]];return re}function J(ue,ee,ae){for(var xe=ue.slice(ee,ae),re="",pe=0;pe<xe.length-1;pe+=2)re+=String.fromCharCode(xe[pe]+xe[pe+1]*256);return re}p.prototype.slice=function(ee,ae){var xe=this.length;ee=~~ee,ae=ae===void 0?xe:~~ae,ee<0?(ee+=xe,ee<0&&(ee=0)):ee>xe&&(ee=xe),ae<0?(ae+=xe,ae<0&&(ae=0)):ae>xe&&(ae=xe),ae<ee&&(ae=ee);var re=this.subarray(ee,ae);return Object.setPrototypeOf(re,p.prototype),re};function U(ue,ee,ae){if(ue%1!==0||ue<0)throw new RangeError("offset is not uint");if(ue+ee>ae)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUintLE=p.prototype.readUIntLE=function(ee,ae,xe){ee=ee>>>0,ae=ae>>>0,xe||U(ee,ae,this.length);for(var re=this[ee],pe=1,we=0;++we<ae&&(pe*=256);)re+=this[ee+we]*pe;return re},p.prototype.readUintBE=p.prototype.readUIntBE=function(ee,ae,xe){ee=ee>>>0,ae=ae>>>0,xe||U(ee,ae,this.length);for(var re=this[ee+--ae],pe=1;ae>0&&(pe*=256);)re+=this[ee+--ae]*pe;return re},p.prototype.readUint8=p.prototype.readUInt8=function(ee,ae){return ee=ee>>>0,ae||U(ee,1,this.length),this[ee]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(ee,ae){return ee=ee>>>0,ae||U(ee,2,this.length),this[ee]|this[ee+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(ee,ae){return ee=ee>>>0,ae||U(ee,2,this.length),this[ee]<<8|this[ee+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(ee,ae){return ee=ee>>>0,ae||U(ee,4,this.length),(this[ee]|this[ee+1]<<8|this[ee+2]<<16)+this[ee+3]*16777216},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(ee,ae){return ee=ee>>>0,ae||U(ee,4,this.length),this[ee]*16777216+(this[ee+1]<<16|this[ee+2]<<8|this[ee+3])},p.prototype.readIntLE=function(ee,ae,xe){ee=ee>>>0,ae=ae>>>0,xe||U(ee,ae,this.length);for(var re=this[ee],pe=1,we=0;++we<ae&&(pe*=256);)re+=this[ee+we]*pe;return pe*=128,re>=pe&&(re-=Math.pow(2,8*ae)),re},p.prototype.readIntBE=function(ee,ae,xe){ee=ee>>>0,ae=ae>>>0,xe||U(ee,ae,this.length);for(var re=ae,pe=1,we=this[ee+--re];re>0&&(pe*=256);)we+=this[ee+--re]*pe;return pe*=128,we>=pe&&(we-=Math.pow(2,8*ae)),we},p.prototype.readInt8=function(ee,ae){return ee=ee>>>0,ae||U(ee,1,this.length),this[ee]&128?(255-this[ee]+1)*-1:this[ee]},p.prototype.readInt16LE=function(ee,ae){ee=ee>>>0,ae||U(ee,2,this.length);var xe=this[ee]|this[ee+1]<<8;return xe&32768?xe|4294901760:xe},p.prototype.readInt16BE=function(ee,ae){ee=ee>>>0,ae||U(ee,2,this.length);var xe=this[ee+1]|this[ee]<<8;return xe&32768?xe|4294901760:xe},p.prototype.readInt32LE=function(ee,ae){return ee=ee>>>0,ae||U(ee,4,this.length),this[ee]|this[ee+1]<<8|this[ee+2]<<16|this[ee+3]<<24},p.prototype.readInt32BE=function(ee,ae){return ee=ee>>>0,ae||U(ee,4,this.length),this[ee]<<24|this[ee+1]<<16|this[ee+2]<<8|this[ee+3]},p.prototype.readFloatLE=function(ee,ae){return ee=ee>>>0,ae||U(ee,4,this.length),u.read(this,ee,!0,23,4)},p.prototype.readFloatBE=function(ee,ae){return ee=ee>>>0,ae||U(ee,4,this.length),u.read(this,ee,!1,23,4)},p.prototype.readDoubleLE=function(ee,ae){return ee=ee>>>0,ae||U(ee,8,this.length),u.read(this,ee,!0,52,8)},p.prototype.readDoubleBE=function(ee,ae){return ee=ee>>>0,ae||U(ee,8,this.length),u.read(this,ee,!1,52,8)};function V(ue,ee,ae,xe,re,pe){if(!p.isBuffer(ue))throw new TypeError('"buffer" argument must be a Buffer instance');if(ee>re||ee<pe)throw new RangeError('"value" argument is out of bounds');if(ae+xe>ue.length)throw new RangeError("Index out of range")}p.prototype.writeUintLE=p.prototype.writeUIntLE=function(ee,ae,xe,re){if(ee=+ee,ae=ae>>>0,xe=xe>>>0,!re){var pe=Math.pow(2,8*xe)-1;V(this,ee,ae,xe,pe,0)}var we=1,Fe=0;for(this[ae]=ee&255;++Fe<xe&&(we*=256);)this[ae+Fe]=ee/we&255;return ae+xe},p.prototype.writeUintBE=p.prototype.writeUIntBE=function(ee,ae,xe,re){if(ee=+ee,ae=ae>>>0,xe=xe>>>0,!re){var pe=Math.pow(2,8*xe)-1;V(this,ee,ae,xe,pe,0)}var we=xe-1,Fe=1;for(this[ae+we]=ee&255;--we>=0&&(Fe*=256);)this[ae+we]=ee/Fe&255;return ae+xe},p.prototype.writeUint8=p.prototype.writeUInt8=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,1,255,0),this[ae]=ee&255,ae+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,2,65535,0),this[ae]=ee&255,this[ae+1]=ee>>>8,ae+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,2,65535,0),this[ae]=ee>>>8,this[ae+1]=ee&255,ae+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,4,4294967295,0),this[ae+3]=ee>>>24,this[ae+2]=ee>>>16,this[ae+1]=ee>>>8,this[ae]=ee&255,ae+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,4,4294967295,0),this[ae]=ee>>>24,this[ae+1]=ee>>>16,this[ae+2]=ee>>>8,this[ae+3]=ee&255,ae+4},p.prototype.writeIntLE=function(ee,ae,xe,re){if(ee=+ee,ae=ae>>>0,!re){var pe=Math.pow(2,8*xe-1);V(this,ee,ae,xe,pe-1,-pe)}var we=0,Fe=1,Se=0;for(this[ae]=ee&255;++we<xe&&(Fe*=256);)ee<0&&Se===0&&this[ae+we-1]!==0&&(Se=1),this[ae+we]=(ee/Fe>>0)-Se&255;return ae+xe},p.prototype.writeIntBE=function(ee,ae,xe,re){if(ee=+ee,ae=ae>>>0,!re){var pe=Math.pow(2,8*xe-1);V(this,ee,ae,xe,pe-1,-pe)}var we=xe-1,Fe=1,Se=0;for(this[ae+we]=ee&255;--we>=0&&(Fe*=256);)ee<0&&Se===0&&this[ae+we+1]!==0&&(Se=1),this[ae+we]=(ee/Fe>>0)-Se&255;return ae+xe},p.prototype.writeInt8=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,1,127,-128),ee<0&&(ee=255+ee+1),this[ae]=ee&255,ae+1},p.prototype.writeInt16LE=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,2,32767,-32768),this[ae]=ee&255,this[ae+1]=ee>>>8,ae+2},p.prototype.writeInt16BE=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,2,32767,-32768),this[ae]=ee>>>8,this[ae+1]=ee&255,ae+2},p.prototype.writeInt32LE=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,4,2147483647,-2147483648),this[ae]=ee&255,this[ae+1]=ee>>>8,this[ae+2]=ee>>>16,this[ae+3]=ee>>>24,ae+4},p.prototype.writeInt32BE=function(ee,ae,xe){return ee=+ee,ae=ae>>>0,xe||V(this,ee,ae,4,2147483647,-2147483648),ee<0&&(ee=4294967295+ee+1),this[ae]=ee>>>24,this[ae+1]=ee>>>16,this[ae+2]=ee>>>8,this[ae+3]=ee&255,ae+4};function X(ue,ee,ae,xe,re,pe){if(ae+xe>ue.length)throw new RangeError("Index out of range");if(ae<0)throw new RangeError("Index out of range")}function H(ue,ee,ae,xe,re){return ee=+ee,ae=ae>>>0,re||X(ue,ee,ae,4,34028234663852886e22,-34028234663852886e22),u.write(ue,ee,ae,xe,23,4),ae+4}p.prototype.writeFloatLE=function(ee,ae,xe){return H(this,ee,ae,!0,xe)},p.prototype.writeFloatBE=function(ee,ae,xe){return H(this,ee,ae,!1,xe)};function G(ue,ee,ae,xe,re){return ee=+ee,ae=ae>>>0,re||X(ue,ee,ae,8,17976931348623157e292,-17976931348623157e292),u.write(ue,ee,ae,xe,52,8),ae+8}p.prototype.writeDoubleLE=function(ee,ae,xe){return G(this,ee,ae,!0,xe)},p.prototype.writeDoubleBE=function(ee,ae,xe){return G(this,ee,ae,!1,xe)},p.prototype.copy=function(ee,ae,xe,re){if(!p.isBuffer(ee))throw new TypeError("argument should be a Buffer");if(xe||(xe=0),!re&&re!==0&&(re=this.length),ae>=ee.length&&(ae=ee.length),ae||(ae=0),re>0&&re<xe&&(re=xe),re===xe||ee.length===0||this.length===0)return 0;if(ae<0)throw new RangeError("targetStart out of bounds");if(xe<0||xe>=this.length)throw new RangeError("Index out of range");if(re<0)throw new RangeError("sourceEnd out of bounds");re>this.length&&(re=this.length),ee.length-ae<re-xe&&(re=ee.length-ae+xe);var pe=re-xe;return this===ee&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(ae,xe,re):Uint8Array.prototype.set.call(ee,this.subarray(xe,re),ae),pe},p.prototype.fill=function(ee,ae,xe,re){if(typeof ee=="string"){if(typeof ae=="string"?(re=ae,ae=0,xe=this.length):typeof xe=="string"&&(re=xe,xe=this.length),re!==void 0&&typeof re!="string")throw new TypeError("encoding must be a string");if(typeof re=="string"&&!p.isEncoding(re))throw new TypeError("Unknown encoding: "+re);if(ee.length===1){var pe=ee.charCodeAt(0);(re==="utf8"&&pe<128||re==="latin1")&&(ee=pe)}}else typeof ee=="number"?ee=ee&255:typeof ee=="boolean"&&(ee=Number(ee));if(ae<0||this.length<ae||this.length<xe)throw new RangeError("Out of range index");if(xe<=ae)return this;ae=ae>>>0,xe=xe===void 0?this.length:xe>>>0,ee||(ee=0);var we;if(typeof ee=="number")for(we=ae;we<xe;++we)this[we]=ee;else{var Fe=p.isBuffer(ee)?ee:p.from(ee,re),Se=Fe.length;if(Se===0)throw new TypeError('The value "'+ee+'" is invalid for argument "value"');for(we=0;we<xe-ae;++we)this[we+ae]=Fe[we%Se]}return this};var Q=/[^+/0-9A-Za-z-_]/g;function te(ue){if(ue=ue.split("=")[0],ue=ue.trim().replace(Q,""),ue.length<2)return"";for(;ue.length%4!==0;)ue=ue+"=";return ue}function ce(ue,ee){ee=ee||1/0;for(var ae,xe=ue.length,re=null,pe=[],we=0;we<xe;++we){if(ae=ue.charCodeAt(we),ae>55295&&ae<57344){if(!re){if(ae>56319){(ee-=3)>-1&&pe.push(239,191,189);continue}else if(we+1===xe){(ee-=3)>-1&&pe.push(239,191,189);continue}re=ae;continue}if(ae<56320){(ee-=3)>-1&&pe.push(239,191,189),re=ae;continue}ae=(re-55296<<10|ae-56320)+65536}else re&&(ee-=3)>-1&&pe.push(239,191,189);if(re=null,ae<128){if((ee-=1)<0)break;pe.push(ae)}else if(ae<2048){if((ee-=2)<0)break;pe.push(ae>>6|192,ae&63|128)}else if(ae<65536){if((ee-=3)<0)break;pe.push(ae>>12|224,ae>>6&63|128,ae&63|128)}else if(ae<1114112){if((ee-=4)<0)break;pe.push(ae>>18|240,ae>>12&63|128,ae>>6&63|128,ae&63|128)}else throw new Error("Invalid code point")}return pe}function ge(ue){for(var ee=[],ae=0;ae<ue.length;++ae)ee.push(ue.charCodeAt(ae)&255);return ee}function Ce(ue,ee){for(var ae,xe,re,pe=[],we=0;we<ue.length&&!((ee-=2)<0);++we)ae=ue.charCodeAt(we),xe=ae>>8,re=ae%256,pe.push(re),pe.push(xe);return pe}function be(ue){return l.toByteArray(te(ue))}function he(ue,ee,ae,xe){for(var re=0;re<xe&&!(re+ae>=ee.length||re>=ue.length);++re)ee[re+ae]=ue[re];return re}function oe(ue,ee){return ue instanceof ee||ue!=null&&ue.constructor!=null&&ue.constructor.name!=null&&ue.constructor.name===ee.name}function Ee(ue){return ue!==ue}var ye=(function(){for(var ue="0123456789abcdef",ee=new Array(256),ae=0;ae<16;++ae)for(var xe=ae*16,re=0;re<16;++re)ee[xe+re]=ue[ae]+ue[re];return ee})()},2538(n,a,o){"use strict";var s=o(8902),l=o(5542),u=o(2272),c=o(5023);n.exports=v;function f(m){return[Math.min(m[0],m[1]),Math.max(m[0],m[1])]}function h(m,g){return m[0]-g[0]||m[1]-g[1]}function d(m){return m.map(f).sort(h)}function p(m,g,w){return g in m?m[g]:w}function v(m,g,w){Array.isArray(g)?(w=w||{},g=g||[]):(w=g||{},g=[]);var b=!!p(w,"delaunay",!0),_=!!p(w,"interior",!0),M=!!p(w,"exterior",!0),x=!!p(w,"infinity",!1);if(!_&&!M||m.length===0)return[];var T=s(m,g);if(b||_!==M||x){for(var A=l(m.length,d(g)),y=0;y<T.length;++y){var E=T[y];A.addTriangle(E[0],E[1],E[2])}return b&&u(m,A),M?_?x?c(A,0,x):A.cells():c(A,1,x):c(A,-1)}else return T}},2272(n,a,o){"use strict";var s=o(2646)[4],l=o(2478);n.exports=c;function u(f,h,d,p,v,m){var g=h.opposite(p,v);if(!(g<0)){if(v<p){var w=p;p=v,v=w,w=m,m=g,g=w}h.isConstraint(p,v)||s(f[p],f[v],f[m],f[g])<0&&d.push(p,v)}}function c(f,h){for(var d=[],p=f.length,v=h.stars,m=0;m<p;++m)for(var g=v[m],w=1;w<g.length;w+=2){var b=g[w];if(!(b<m)&&!h.isConstraint(m,b)){for(var _=g[w-1],M=-1,x=1;x<g.length;x+=2)if(g[x-1]===b){M=g[x];break}M<0||s(f[m],f[b],f[_],f[M])<0&&d.push(m,b)}}for(;d.length>0;){for(var b=d.pop(),m=d.pop(),_=-1,M=-1,g=v[m],T=1;T<g.length;T+=2){var A=g[T-1],y=g[T];A===b?M=y:y===b&&(_=A)}_<0||M<0||s(f[m],f[b],f[_],f[M])>=0||(h.flip(m,b),u(f,h,d,_,m,M),u(f,h,d,m,M,_),u(f,h,d,M,b,_),u(f,h,d,b,_,M))}}},5023(n,a,o){"use strict";var s=o(2478);n.exports=d;function l(p,v,m,g,w,b,_){this.cells=p,this.neighbor=v,this.flags=g,this.constraint=m,this.active=w,this.next=b,this.boundary=_}var u=l.prototype;function c(p,v){return p[0]-v[0]||p[1]-v[1]||p[2]-v[2]}u.locate=(function(){var p=[0,0,0];return function(v,m,g){var w=v,b=m,_=g;return m<g?m<v&&(w=m,b=g,_=v):g<v&&(w=g,b=v,_=m),w<0?-1:(p[0]=w,p[1]=b,p[2]=_,s.eq(this.cells,p,c))}})();function f(p,v){for(var m=p.cells(),g=m.length,w=0;w<g;++w){var b=m[w],_=b[0],M=b[1],x=b[2];M<x?M<_&&(b[0]=M,b[1]=x,b[2]=_):x<_&&(b[0]=x,b[1]=_,b[2]=M)}m.sort(c);for(var T=new Array(g),w=0;w<T.length;++w)T[w]=0;var A=[],y=[],E=new Array(3*g),S=new Array(3*g),C=null;v&&(C=[]);for(var k=new l(m,E,S,T,A,y,C),w=0;w<g;++w)for(var b=m[w],D=0;D<3;++D){var _=b[D],M=b[(D+1)%3],F=E[3*w+D]=k.locate(M,_,p.opposite(M,_)),P=S[3*w+D]=p.isConstraint(_,M);F<0&&(P?y.push(w):(A.push(w),T[w]=1),v&&C.push([M,_,-1]))}return k}function h(p,v,m){for(var g=0,w=0;w<p.length;++w)v[w]===m&&(p[g++]=p[w]);return p.length=g,p}function d(p,v,m){var g=f(p,m);if(v===0)return m?g.cells.concat(g.boundary):g.cells;for(var w=1,b=g.active,_=g.next,M=g.flags,x=g.cells,T=g.constraint,A=g.neighbor;b.length>0||_.length>0;){for(;b.length>0;){var y=b.pop();if(M[y]!==-w){M[y]=w;for(var E=x[y],S=0;S<3;++S){var C=A[3*y+S];C>=0&&M[C]===0&&(T[3*y+S]?_.push(C):(b.push(C),M[C]=w))}}}var k=_;_=b,b=k,_.length=0,w=-w}var D=h(x,M,v);return m?D.concat(g.boundary):D}},8902(n,a,o){"use strict";var s=o(2478),l=o(3250)[3],u=0,c=1,f=2;n.exports=_;function h(M,x,T,A,y){this.a=M,this.b=x,this.idx=T,this.lowerIds=A,this.upperIds=y}function d(M,x,T,A){this.a=M,this.b=x,this.type=T,this.idx=A}function p(M,x){var T=M.a[0]-x.a[0]||M.a[1]-x.a[1]||M.type-x.type;return T||M.type!==u&&(T=l(M.a,M.b,x.b),T)?T:M.idx-x.idx}function v(M,x){return l(M.a,M.b,x)}function m(M,x,T,A,y){for(var E=s.lt(x,A,v),S=s.gt(x,A,v),C=E;C<S;++C){for(var k=x[C],D=k.lowerIds,P=D.length;P>1&&l(T[D[P-2]],T[D[P-1]],A)>0;)M.push([D[P-1],D[P-2],y]),P-=1;D.length=P,D.push(y);for(var F=k.upperIds,P=F.length;P>1&&l(T[F[P-2]],T[F[P-1]],A)<0;)M.push([F[P-2],F[P-1],y]),P-=1;F.length=P,F.push(y)}}function g(M,x){var T;return M.a[0]<x.a[0]?T=l(M.a,M.b,x.a):T=l(x.b,x.a,M.a),T||(x.b[0]<M.b[0]?T=l(M.a,M.b,x.b):T=l(x.b,x.a,M.b),T||M.idx-x.idx)}function w(M,x,T){var A=s.le(M,T,g),y=M[A],E=y.upperIds,S=E[E.length-1];y.upperIds=[S],M.splice(A+1,0,new h(T.a,T.b,T.idx,[S],E))}function b(M,x,T){var A=T.a;T.a=T.b,T.b=A;var y=s.eq(M,T,g),E=M[y],S=M[y-1];S.upperIds=E.upperIds,M.splice(y,1)}function _(M,x){for(var T=M.length,A=x.length,y=[],E=0;E<T;++E)y.push(new d(M[E],null,u,E));for(var E=0;E<A;++E){var S=x[E],C=M[S[0]],k=M[S[1]];C[0]<k[0]?y.push(new d(C,k,f,E),new d(k,C,c,E)):C[0]>k[0]&&y.push(new d(k,C,f,E),new d(C,k,c,E))}y.sort(p);for(var D=y[0].a[0]-(1+Math.abs(y[0].a[0]))*Math.pow(2,-52),F=[new h([D,1],[D,0],-1,[],[],[],[])],P=[],E=0,R=y.length;E<R;++E){var L=y[E],I=L.type;I===u?m(P,F,M,L.a,L.idx):I===f?w(F,M,L):b(F,M,L)}return P}},5542(n,a,o){"use strict";var s=o(2478);n.exports=f;function l(h,d){this.stars=h,this.edges=d}var u=l.prototype;function c(h,d,p){for(var v=1,m=h.length;v<m;v+=2)if(h[v-1]===d&&h[v]===p){h[v-1]=h[m-2],h[v]=h[m-1],h.length=m-2;return}}u.isConstraint=(function(){var h=[0,0];function d(p,v){return p[0]-v[0]||p[1]-v[1]}return function(p,v){return h[0]=Math.min(p,v),h[1]=Math.max(p,v),s.eq(this.edges,h,d)>=0}})(),u.removeTriangle=function(h,d,p){var v=this.stars;c(v[h],d,p),c(v[d],p,h),c(v[p],h,d)},u.addTriangle=function(h,d,p){var v=this.stars;v[h].push(d,p),v[d].push(p,h),v[p].push(h,d)},u.opposite=function(h,d){for(var p=this.stars[d],v=1,m=p.length;v<m;v+=2)if(p[v]===h)return p[v-1];return-1},u.flip=function(h,d){var p=this.opposite(h,d),v=this.opposite(d,h);this.removeTriangle(h,d,p),this.removeTriangle(d,h,v),this.addTriangle(h,v,p),this.addTriangle(d,p,v)},u.edges=function(){for(var h=this.stars,d=[],p=0,v=h.length;p<v;++p)for(var m=h[p],g=0,w=m.length;g<w;g+=2)d.push([m[g],m[g+1]]);return d},u.cells=function(){for(var h=this.stars,d=[],p=0,v=h.length;p<v;++p)for(var m=h[p],g=0,w=m.length;g<w;g+=2){var b=m[g],_=m[g+1];p<Math.min(b,_)&&d.push([p,b,_])}return d};function f(h,d){for(var p=new Array(h),v=0;v<h;++v)p[v]=[];return new l(p,d)}},2419(n){"use strict";n.exports=a;function a(o){for(var s=1,l=1;l<o.length;++l)for(var u=0;u<l;++u)if(o[l]<o[u])s=-s;else if(o[u]===o[l])return 0;return s}},3628(n,a,o){"use strict";var s=o(1338),l=o(727);function u(h,d){for(var p=0,v=h.length,m=0;m<v;++m)p+=h[m]*d[m];return p}function c(h){var d=h.length;if(d===0)return[];var p=h[0].length,v=s([h.length+1,h.length+1],1),m=s([h.length+1],1);v[d][d]=0;for(var g=0;g<d;++g){for(var w=0;w<=g;++w)v[w][g]=v[g][w]=2*u(h[g],h[w]);m[g]=u(h[g],h[g])}for(var b=l(v,m),_=0,M=b[d+1],g=0;g<M.length;++g)_+=M[g];for(var x=new Array(d),g=0;g<d;++g){for(var M=b[g],T=0,w=0;w<M.length;++w)T+=M[w];x[g]=T/_}return x}function f(h){if(h.length===0)return[];for(var d=h[0].length,p=s([d]),v=c(h),m=0;m<h.length;++m)for(var g=0;g<d;++g)p[g]+=h[m][g]*v[m];return p}f.barycenetric=c,n.exports=f},6037(n,a,o){n.exports=l;var s=o(3628);function l(u){for(var c=s(u),f=0,h=0;h<u.length;++h)for(var d=u[h],p=0;p<c.length;++p)f+=Math.pow(d[p]-c[p],2);return Math.sqrt(f/u.length)}},332(n,a,o){"use strict";n.exports=C;var s=o(1755),l=o(6867),u=o(1125),c=o(7842),f=o(1318),h=o(946),d=o(5838),p=o(1278),v=o(3637);function m(k){var D=h(k);return[p(D,-1/0),p(D,1/0)]}function g(k,D){for(var F=new Array(D.length),P=0;P<D.length;++P){var R=D[P],L=k[R[0]],I=k[R[1]];F[P]=[p(Math.min(L[0],I[0]),-1/0),p(Math.min(L[1],I[1]),-1/0),p(Math.max(L[0],I[0]),1/0),p(Math.max(L[1],I[1]),1/0)]}return F}function w(k){for(var D=new Array(k.length),F=0;F<k.length;++F){var P=k[F];D[F]=[p(P[0],-1/0),p(P[1],-1/0),p(P[0],1/0),p(P[1],1/0)]}return D}function b(k,D,F){var P=[];return l(F,function(R,L){var I=D[R],B=D[L];if(!(I[0]===B[0]||I[0]===B[1]||I[1]===B[0]||I[1]===B[1])){var O=k[I[0]],$=k[I[1]],Y=k[B[0]],K=k[B[1]];u(O,$,Y,K)&&P.push([R,L])}}),P}function _(k,D,F,P){var R=[];return l(F,P,function(L,I){var B=D[L];if(!(B[0]===I||B[1]===I)){var O=k[I],$=k[B[0]],Y=k[B[1]];u($,Y,O,O)&&R.push([L,I])}}),R}function M(k,D,F,P,R){var L,I,B=k.map(function(Ce){return[c(Ce[0]),c(Ce[1])]});for(L=0;L<F.length;++L){var O=F[L];I=O[0];var $=O[1],Y=D[I],K=D[$],j=v(d(k[Y[0]]),d(k[Y[1]]),d(k[K[0]]),d(k[K[1]]));if(j){var q=k.length;k.push([h(j[0]),h(j[1])]),B.push(j),P.push([I,q],[$,q])}}for(P.sort(function(Ce,be){if(Ce[0]!==be[0])return Ce[0]-be[0];var he=B[Ce[1]],oe=B[be[1]];return f(he[0],oe[0])||f(he[1],oe[1])}),L=P.length-1;L>=0;--L){var J=P[L];I=J[0];var U=D[I],V=U[0],X=U[1],H=k[V],G=k[X];if((H[0]-G[0]||H[1]-G[1])<0){var Q=V;V=X,X=Q}U[0]=V;var te=U[1]=J[1],ce;for(R&&(ce=U[2]);L>0&&P[L-1][0]===I;){var J=P[--L],ge=J[1];R?D.push([te,ge,ce]):D.push([te,ge]),te=ge}R?D.push([te,X,ce]):D.push([te,X])}return B}function x(k,D,F){for(var P=D.length,R=new s(P),L=[],I=0;I<D.length;++I){var B=D[I],O=m(B[0]),$=m(B[1]);L.push([p(O[0],-1/0),p($[0],-1/0),p(O[1],1/0),p($[1],1/0)])}l(L,function(J,U){R.link(J,U)});for(var Y=!0,K=new Array(P),I=0;I<P;++I){var j=R.find(I);j!==I&&(Y=!1,k[j]=[Math.min(k[I][0],k[j][0]),Math.min(k[I][1],k[j][1])])}if(Y)return null;for(var q=0,I=0;I<P;++I){var j=R.find(I);j===I?(K[I]=q,k[q++]=k[I]):K[I]=-1}k.length=q;for(var I=0;I<P;++I)K[I]<0&&(K[I]=K[R.find(I)]);return K}function T(k,D){return k[0]-D[0]||k[1]-D[1]}function A(k,D){var F=k[0]-D[0]||k[1]-D[1];return F||(k[2]<D[2]?-1:k[2]>D[2]?1:0)}function y(k,D,F){if(k.length!==0){if(D)for(var P=0;P<k.length;++P){var R=k[P],L=D[R[0]],I=D[R[1]];R[0]=Math.min(L,I),R[1]=Math.max(L,I)}else for(var P=0;P<k.length;++P){var R=k[P],L=R[0],I=R[1];R[0]=Math.min(L,I),R[1]=Math.max(L,I)}F?k.sort(A):k.sort(T);for(var B=1,P=1;P<k.length;++P){var O=k[P-1],$=k[P];$[0]===O[0]&&$[1]===O[1]&&(!F||$[2]===O[2])||(k[B++]=$)}k.length=B}}function E(k,D,F){var P=x(k,[],w(k));return y(D,P,F),!!P}function S(k,D,F){var P=g(k,D),R=b(k,D,P),L=w(k),I=_(k,D,P,L),B=M(k,D,R,I,F),O=x(k,B,L);return y(D,O,F),O?!0:R.length>0||I.length>0}function C(k,D,F){var P;if(F){P=D;for(var R=new Array(D.length),L=0;L<D.length;++L){var I=D[L];R[L]=[I[0],I[1],F[L]]}D=R}for(var B=E(k,D,!!F);S(k,D,!!F);)B=!0;if(F&&B){P.length=0,F.length=0;for(var L=0;L<D.length;++L){var I=D[L];P.push([I[0],I[1]]),F.push(I[2])}}return B}},3637(n,a,o){"use strict";n.exports=v;var s=o(6504),l=o(8697),u=o(5572),c=o(7721),f=o(544),h=o(2653),d=o(8987);function p(m,g){return u(s(m[0],g[1]),s(m[1],g[0]))}function v(m,g,w,b){var _=f(g,m),M=f(b,w),x=p(_,M);if(c(x)===0)return null;var T=f(m,w),A=p(M,T),y=l(A,x),E=d(_,y),S=h(m,E);return S}},3642(n){n.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},6729(n,a,o){"use strict";var s=o(3642),l=o(395);n.exports=u;function u(d){var p,v,m,g,w,b,_,M,y,x,T;if(d||(d={}),M=(d.nshades||72)-1,_=d.format||"hex",b=d.colormap,b||(b="jet"),typeof b=="string"){if(b=b.toLowerCase(),!s[b])throw Error(b+" not a supported colorscale");w=s[b]}else if(Array.isArray(b))w=b.slice();else throw Error("unsupported colormap option",b);if(w.length>M+1)throw new Error(b+" map requires nshades to be at least size "+w.length);Array.isArray(d.alpha)?d.alpha.length!==2?x=[1,1]:x=d.alpha.slice():typeof d.alpha=="number"?x=[d.alpha,d.alpha]:x=[1,1],p=w.map(function(C){return Math.round(C.index*M)}),x[0]=Math.min(Math.max(x[0],0),1),x[1]=Math.min(Math.max(x[1],0),1);var A=w.map(function(C,k){var D=w[k].index,F=w[k].rgb.slice();return F.length===4&&F[3]>=0&&F[3]<=1||(F[3]=x[0]+(x[1]-x[0])*D),F}),y=[];for(T=0;T<p.length-1;++T){g=p[T+1]-p[T],v=A[T],m=A[T+1];for(var E=0;E<g;E++){var S=E/g;y.push([Math.round(l(v[0],m[0],S)),Math.round(l(v[1],m[1],S)),Math.round(l(v[2],m[2],S)),l(v[3],m[3],S)])}}return y.push(w[w.length-1].rgb.concat(x[1])),_==="hex"?y=y.map(f):_==="rgbaString"?y=y.map(h):_==="float"&&(y=y.map(c)),y}function c(d){return[d[0]/255,d[1]/255,d[2]/255,d[3]]}function f(d){for(var p,v="#",m=0;m<3;++m)p=d[m],p=p.toString(16),v+=("00"+p).substr(p.length);return v}function h(d){return"rgba("+d.join(",")+")"}},3140(n,a,o){"use strict";n.exports=d;var s=o(3250),l=o(8572),u=o(9362),c=o(5382),f=o(8210);function h(p,v,m){var g=u(p[0],-v[0]),w=u(p[1],-v[1]),b=u(m[0],-v[0]),_=u(m[1],-v[1]),M=f(c(g,b),c(w,_));return M[M.length-1]>=0}function d(p,v,m,g){var w=s(v,m,g);if(w===0){var b=l(s(p,v,m)),_=l(s(p,v,g));if(b===_){if(b===0){var M=h(p,v,m),x=h(p,v,g);return M===x?0:M?1:-1}return 0}else{if(_===0)return b>0||h(p,v,g)?-1:1;if(b===0)return _>0||h(p,v,m)?1:-1}return l(_-b)}var T=s(p,v,m);if(T>0)return w>0&&s(p,v,g)>0?1:-1;if(T<0)return w>0||s(p,v,g)>0?1:-1;var A=s(p,v,g);return A>0||h(p,v,m)?1:-1}},8572(n){"use strict";n.exports=function(o){return o<0?-1:o>0?1:0}},8507(n){n.exports=s;var a=Math.min;function o(l,u){return l-u}function s(l,u){var c=l.length,f=l.length-u.length;if(f)return f;switch(c){case 0:return 0;case 1:return l[0]-u[0];case 2:return l[0]+l[1]-u[0]-u[1]||a(l[0],l[1])-a(u[0],u[1]);case 3:var h=l[0]+l[1],d=u[0]+u[1];if(f=h+l[2]-(d+u[2]),f)return f;var p=a(l[0],l[1]),v=a(u[0],u[1]);return a(p,l[2])-a(v,u[2])||a(p+l[2],h)-a(v+u[2],d);case 4:var m=l[0],g=l[1],w=l[2],b=l[3],_=u[0],M=u[1],x=u[2],T=u[3];return m+g+w+b-(_+M+x+T)||a(m,g,w,b)-a(_,M,x,T,_)||a(m+g,m+w,m+b,g+w,g+b,w+b)-a(_+M,_+x,_+T,M+x,M+T,x+T)||a(m+g+w,m+g+b,m+w+b,g+w+b)-a(_+M+x,_+M+T,_+x+T,M+x+T);default:for(var A=l.slice().sort(o),y=u.slice().sort(o),E=0;E<c;++E)if(f=A[E]-y[E],f)return f;return 0}}},3788(n,a,o){"use strict";var s=o(8507),l=o(2419);n.exports=u;function u(c,f){return s(c,f)||l(c)-l(f)}},7352(n,a,o){"use strict";var s=o(5721),l=o(4750),u=o(2690);n.exports=c;function c(f){var h=f.length;if(h===0)return[];if(h===1)return[[0]];var d=f[0].length;return d===0?[]:d===1?s(f):d===2?l(f):u(f,d)}},5721(n){"use strict";n.exports=a;function a(o){for(var s=0,l=0,u=1;u<o.length;++u)o[u][0]<o[s][0]&&(s=u),o[u][0]>o[l][0]&&(l=u);return s<l?[[s],[l]]:s>l?[[l],[s]]:[[s]]}},4750(n,a,o){"use strict";n.exports=l;var s=o(3090);function l(u){var c=s(u),f=c.length;if(f<=2)return[];for(var h=new Array(f),d=c[f-1],p=0;p<f;++p){var v=c[p];h[p]=[d,v],d=v}return h}},2690(n,a,o){"use strict";n.exports=f;var s=o(8954),l=o(3952);function u(h,d){for(var p=h.length,v=new Array(p),m=0;m<d.length;++m)v[m]=h[d[m]];for(var g=d.length,m=0;m<p;++m)d.indexOf(m)<0&&(v[g++]=h[m]);return v}function c(h,d){for(var p=h.length,v=d.length,m=0;m<p;++m)for(var g=h[m],w=0;w<g.length;++w){var b=g[w];if(b<v)g[w]=d[b];else{b=b-v;for(var _=0;_<v;++_)b>=d[_]&&(b+=1);g[w]=b}}return h}function f(h,d){try{return s(h,!0)}catch(g){var p=l(h);if(p.length<=d)return[];var v=u(h,p),m=s(v,!0);return c(m,p)}}},4769(n){"use strict";function a(s,l,u,c,f,h){var d=6*f*f-6*f,p=3*f*f-4*f+1,v=-6*f*f+6*f,m=3*f*f-2*f;if(s.length){h||(h=new Array(s.length));for(var g=s.length-1;g>=0;--g)h[g]=d*s[g]+p*l[g]+v*u[g]+m*c[g];return h}return d*s+p*l+v*u[g]+m*c}function o(s,l,u,c,f,h){var d=f-1,p=f*f,v=d*d,m=(1+2*f)*v,g=f*v,w=p*(3-2*f),b=p*d;if(s.length){h||(h=new Array(s.length));for(var _=s.length-1;_>=0;--_)h[_]=m*s[_]+g*l[_]+w*u[_]+b*c[_];return h}return m*s+g*l+w*u+b*c}n.exports=o,n.exports.derivative=a},7642(n,a,o){"use strict";var s=o(8954),l=o(1682);n.exports=h;function u(d,p){this.point=d,this.index=p}function c(d,p){for(var v=d.point,m=p.point,g=v.length,w=0;w<g;++w){var b=m[w]-v[w];if(b)return b}return 0}function f(d,p,v){if(d===1)return v?[[-1,0]]:[];var m=p.map(function(M,x){return[M[0],x]});m.sort(function(M,x){return M[0]-x[0]});for(var g=new Array(d-1),w=1;w<d;++w){var b=m[w-1],_=m[w];g[w-1]=[b[1],_[1]]}return v&&g.push([-1,g[0][1]],[g[d-1][1],-1]),g}function h(d,p){var v=d.length;if(v===0)return[];var m=d[0].length;if(m<1)return[];if(m===1)return f(v,d,p);for(var g=new Array(v),w=1,b=0;b<v;++b){for(var _=d[b],M=new Array(m+1),x=0,T=0;T<m;++T){var A=_[T];M[T]=A,x+=A*A}M[m]=x,g[b]=new u(M,b),w=Math.max(x,w)}l(g,c),v=g.length;for(var y=new Array(v+m+1),E=new Array(v+m+1),S=(m+1)*(m+1)*w,C=new Array(m+1),b=0;b<=m;++b)C[b]=0;C[m]=S,y[0]=C.slice(),E[0]=-1;for(var b=0;b<=m;++b){var M=C.slice();M[b]=1,y[b+1]=M,E[b+1]=-1}for(var b=0;b<v;++b){var k=g[b];y[b+m+1]=k.point,E[b+m+1]=k.index}var D=s(y,!1);if(p?D=D.filter(function(F){for(var P=0,R=0;R<=m;++R){var L=E[F[R]];if(L<0&&++P>=2)return!1;F[R]=L}return!0}):D=D.filter(function(F){for(var P=0;P<=m;++P){var R=E[F[P]];if(R<0)return!1;F[P]=R}return!0}),m&1)for(var b=0;b<D.length;++b){var k=D[b],M=k[0];k[0]=k[1],k[1]=M}return D}},2361(n){var a=!1;if(typeof Float64Array!="undefined"){var o=new Float64Array(1),s=new Uint32Array(o.buffer);if(o[0]=1,a=!0,s[1]===1072693248){let w=function(M,x){return s[0]=M,s[1]=x,o[0]},b=function(M){return o[0]=M,s[0]},_=function(M){return o[0]=M,s[1]};var u=w,c=b,f=_;n.exports=function(x){return o[0]=x,[s[0],s[1]]},n.exports.pack=w,n.exports.lo=b,n.exports.hi=_}else if(s[0]===1072693248){let w=function(M,x){return s[1]=M,s[0]=x,o[0]},b=function(M){return o[0]=M,s[1]},_=function(M){return o[0]=M,s[0]};var h=w,d=b,p=_;n.exports=function(x){return o[0]=x,[s[1],s[0]]},n.exports.pack=w,n.exports.lo=b,n.exports.hi=_}else a=!1}if(!a){let w=function(M,x){return l.writeUInt32LE(M,0,!0),l.writeUInt32LE(x,4,!0),l.readDoubleLE(0,!0)},b=function(M){return l.writeDoubleLE(M,0,!0),l.readUInt32LE(0,!0)},_=function(M){return l.writeDoubleLE(M,0,!0),l.readUInt32LE(4,!0)};var v=w,m=b,g=_,l=new Buffer(8);n.exports=function(x){return l.writeDoubleLE(x,0,!0),[l.readUInt32LE(0,!0),l.readUInt32LE(4,!0)]},n.exports.pack=w,n.exports.lo=b,n.exports.hi=_}n.exports.sign=function(w){return n.exports.hi(w)>>>31},n.exports.exponent=function(w){var b=n.exports.hi(w);return(b<<1>>>21)-1023},n.exports.fraction=function(w){var b=n.exports.lo(w),_=n.exports.hi(w),M=_&(1<<20)-1;return _&2146435072&&(M+=1048576),[b,M]},n.exports.denormalized=function(w){var b=n.exports.hi(w);return!(b&2146435072)}},1338(n){"use strict";function a(l,u,c){var f=l[c]|0;if(f<=0)return[];var h=new Array(f),d;if(c===l.length-1)for(d=0;d<f;++d)h[d]=u;else for(d=0;d<f;++d)h[d]=a(l,u,c+1);return h}function o(l,u){var c,f;for(c=new Array(l),f=0;f<l;++f)c[f]=u;return c}function s(l,u){switch(typeof u=="undefined"&&(u=0),typeof l){case"number":if(l>0)return o(l|0,u);break;case"object":if(typeof l.length=="number")return a(l,u,0);break}return[]}n.exports=s},3134(n,a,o){"use strict";n.exports=l;var s=o(1682);function l(u,c){var f=u.length;if(typeof c!="number"){c=0;for(var h=0;h<f;++h){var d=u[h];c=Math.max(c,d[0],d[1])}c=(c|0)+1}c=c|0;for(var p=new Array(c),h=0;h<c;++h)p[h]=[];for(var h=0;h<f;++h){var d=u[h];p[d[0]].push(d[1]),p[d[1]].push(d[0])}for(var v=0;v<c;++v)s(p[v],function(m,g){return m-g});return p}},5033(n){"use strict";n.exports=a;function a(o,s,l){var u=s||0,c=l||1;return[[o[12]+o[0],o[13]+o[1],o[14]+o[2],o[15]+o[3]],[o[12]-o[0],o[13]-o[1],o[14]-o[2],o[15]-o[3]],[o[12]+o[4],o[13]+o[5],o[14]+o[6],o[15]+o[7]],[o[12]-o[4],o[13]-o[5],o[14]-o[6],o[15]-o[7]],[u*o[12]+o[8],u*o[13]+o[9],u*o[14]+o[10],u*o[15]+o[11]],[c*o[12]-o[8],c*o[13]-o[9],c*o[14]-o[10],c*o[15]-o[11]]]}},9215(n,a,o){"use strict";n.exports=d;var s=o(4769),l=o(2478);function u(p,v,m){return Math.min(v,Math.max(p,m))}function c(p,v,m){this.dimension=p.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var g=0;g<this.dimension;++g)this.bounds[0][g]=-1/0,this.bounds[1][g]=1/0;this._state=p.slice().reverse(),this._velocity=v.slice().reverse(),this._time=[m],this._scratch=[p.slice(),p.slice(),p.slice(),p.slice(),p.slice()]}var f=c.prototype;f.flush=function(p){var v=l.gt(this._time,p)-1;v<=0||(this._time.splice(0,v),this._state.splice(0,v*this.dimension),this._velocity.splice(0,v*this.dimension))},f.curve=function(p){var v=this._time,m=v.length,g=l.le(v,p),w=this._scratch[0],b=this._state,_=this._velocity,M=this.dimension,x=this.bounds;if(g<0)for(var T=M-1,A=0;A<M;++A,--T)w[A]=b[T];else if(g>=m-1)for(var T=b.length-1,y=p-v[m-1],A=0;A<M;++A,--T)w[A]=b[T]+y*_[T];else{for(var T=M*(g+1)-1,E=v[g],S=v[g+1],C=S-E||1,k=this._scratch[1],D=this._scratch[2],F=this._scratch[3],P=this._scratch[4],R=!0,A=0;A<M;++A,--T)k[A]=b[T],F[A]=_[T]*C,D[A]=b[T+M],P[A]=_[T+M]*C,R=R&&k[A]===D[A]&&F[A]===P[A]&&F[A]===0;if(R)for(var A=0;A<M;++A)w[A]=k[A];else s(k,F,D,P,(p-E)/C,w)}for(var L=x[0],I=x[1],A=0;A<M;++A)w[A]=u(L[A],I[A],w[A]);return w},f.dcurve=function(p){var v=this._time,m=v.length,g=l.le(v,p),w=this._scratch[0],b=this._state,_=this._velocity,M=this.dimension;if(g>=m-1)for(var x=b.length-1,T=p-v[m-1],A=0;A<M;++A,--x)w[A]=_[x];else{for(var x=M*(g+1)-1,y=v[g],E=v[g+1],S=E-y||1,C=this._scratch[1],k=this._scratch[2],D=this._scratch[3],F=this._scratch[4],P=!0,A=0;A<M;++A,--x)C[A]=b[x],D[A]=_[x]*S,k[A]=b[x+M],F[A]=_[x+M]*S,P=P&&C[A]===k[A]&&D[A]===F[A]&&D[A]===0;if(P)for(var A=0;A<M;++A)w[A]=0;else{s.derivative(C,D,k,F,(p-y)/S,w);for(var A=0;A<M;++A)w[A]/=S}}return w},f.lastT=function(){var p=this._time;return p[p.length-1]},f.stable=function(){for(var p=this._velocity,v=p.length,m=this.dimension-1;m>=0;--m)if(p[--v])return!1;return!0},f.jump=function(p){var v=this.lastT(),m=this.dimension;if(!(p<v||arguments.length!==m+1)){var g=this._state,w=this._velocity,b=g.length-this.dimension,_=this.bounds,M=_[0],x=_[1];this._time.push(v,p);for(var T=0;T<2;++T)for(var A=0;A<m;++A)g.push(g[b++]),w.push(0);this._time.push(p);for(var A=m;A>0;--A)g.push(u(M[A-1],x[A-1],arguments[A])),w.push(0)}},f.push=function(p){var v=this.lastT(),m=this.dimension;if(!(p<v||arguments.length!==m+1)){var g=this._state,w=this._velocity,b=g.length-this.dimension,_=p-v,M=this.bounds,x=M[0],T=M[1],A=_>1e-6?1/_:0;this._time.push(p);for(var y=m;y>0;--y){var E=u(x[y-1],T[y-1],arguments[y]);g.push(E),w.push((E-g[b++])*A)}}},f.set=function(p){var v=this.dimension;if(!(p<this.lastT()||arguments.length!==v+1)){var m=this._state,g=this._velocity,w=this.bounds,b=w[0],_=w[1];this._time.push(p);for(var M=v;M>0;--M)m.push(u(b[M-1],_[M-1],arguments[M])),g.push(0)}},f.move=function(p){var v=this.lastT(),m=this.dimension;if(!(p<=v||arguments.length!==m+1)){var g=this._state,w=this._velocity,b=g.length-this.dimension,_=this.bounds,M=_[0],x=_[1],T=p-v,A=T>1e-6?1/T:0;this._time.push(p);for(var y=m;y>0;--y){var E=arguments[y];g.push(u(M[y-1],x[y-1],g[b++]+E)),w.push(E*A)}}},f.idle=function(p){var v=this.lastT();if(!(p<v)){var m=this.dimension,g=this._state,w=this._velocity,b=g.length-m,_=this.bounds,M=_[0],x=_[1],T=p-v;this._time.push(p);for(var A=m-1;A>=0;--A)g.push(u(M[A],x[A],g[b]+T*w[b])),w.push(0),b+=1}};function h(p){for(var v=new Array(p),m=0;m<p;++m)v[m]=0;return v}function d(p,v,m){switch(arguments.length){case 0:return new c([0],[0],0);case 1:if(typeof p=="number"){var g=h(p);return new c(g,g,0)}else return new c(p,h(p.length),0);case 2:if(typeof v=="number"){var g=h(p.length);return new c(p,g,+v)}else m=0;case 3:if(p.length!==v.length)throw new Error("state and velocity lengths must match");return new c(p,v,m)}}},3840(n){"use strict";n.exports=M;var a=0,o=1;function s(x,T,A,y,E,S){this._color=x,this.key=T,this.value=A,this.left=y,this.right=E,this._count=S}function l(x){return new s(x._color,x.key,x.value,x.left,x.right,x._count)}function u(x,T){return new s(x,T.key,T.value,T.left,T.right,T._count)}function c(x){x._count=1+(x.left?x.left._count:0)+(x.right?x.right._count:0)}function f(x,T){this._compare=x,this.root=T}var h=f.prototype;Object.defineProperty(h,"keys",{get:function(){var x=[];return this.forEach(function(T,A){x.push(T)}),x}}),Object.defineProperty(h,"values",{get:function(){var x=[];return this.forEach(function(T,A){x.push(A)}),x}}),Object.defineProperty(h,"length",{get:function(){return this.root?this.root._count:0}}),h.insert=function(x,T){for(var A=this._compare,y=this.root,E=[],S=[];y;){var C=A(x,y.key);E.push(y),S.push(C),C<=0?y=y.left:y=y.right}E.push(new s(a,x,T,null,null,1));for(var k=E.length-2;k>=0;--k){var y=E[k];S[k]<=0?E[k]=new s(y._color,y.key,y.value,E[k+1],y.right,y._count+1):E[k]=new s(y._color,y.key,y.value,y.left,E[k+1],y._count+1)}for(var k=E.length-1;k>1;--k){var D=E[k-1],y=E[k];if(D._color===o||y._color===o)break;var F=E[k-2];if(F.left===D)if(D.left===y){var P=F.right;if(P&&P._color===a)D._color=o,F.right=u(o,P),F._color=a,k-=1;else{if(F._color=a,F.left=D.right,D._color=o,D.right=F,E[k-2]=D,E[k-1]=y,c(F),c(D),k>=3){var R=E[k-3];R.left===F?R.left=D:R.right=D}break}}else{var P=F.right;if(P&&P._color===a)D._color=o,F.right=u(o,P),F._color=a,k-=1;else{if(D.right=y.left,F._color=a,F.left=y.right,y._color=o,y.left=D,y.right=F,E[k-2]=y,E[k-1]=D,c(F),c(D),c(y),k>=3){var R=E[k-3];R.left===F?R.left=y:R.right=y}break}}else if(D.right===y){var P=F.left;if(P&&P._color===a)D._color=o,F.left=u(o,P),F._color=a,k-=1;else{if(F._color=a,F.right=D.left,D._color=o,D.left=F,E[k-2]=D,E[k-1]=y,c(F),c(D),k>=3){var R=E[k-3];R.right===F?R.right=D:R.left=D}break}}else{var P=F.left;if(P&&P._color===a)D._color=o,F.left=u(o,P),F._color=a,k-=1;else{if(D.left=y.right,F._color=a,F.right=y.left,y._color=o,y.right=D,y.left=F,E[k-2]=y,E[k-1]=D,c(F),c(D),c(y),k>=3){var R=E[k-3];R.right===F?R.right=y:R.left=y}break}}}return E[0]._color=o,new f(A,E[0])};function d(x,T){if(T.left){var A=d(x,T.left);if(A)return A}var A=x(T.key,T.value);if(A)return A;if(T.right)return d(x,T.right)}function p(x,T,A,y){var E=T(x,y.key);if(E<=0){if(y.left){var S=p(x,T,A,y.left);if(S)return S}var S=A(y.key,y.value);if(S)return S}if(y.right)return p(x,T,A,y.right)}function v(x,T,A,y,E){var S=A(x,E.key),C=A(T,E.key),k;if(S<=0&&(E.left&&(k=v(x,T,A,y,E.left),k)||C>0&&(k=y(E.key,E.value),k)))return k;if(C>0&&E.right)return v(x,T,A,y,E.right)}h.forEach=function(T,A,y){if(this.root)switch(arguments.length){case 1:return d(T,this.root);case 2:return p(A,this._compare,T,this.root);case 3:return this._compare(A,y)>=0?void 0:v(A,y,this._compare,T,this.root)}},Object.defineProperty(h,"begin",{get:function(){for(var x=[],T=this.root;T;)x.push(T),T=T.left;return new m(this,x)}}),Object.defineProperty(h,"end",{get:function(){for(var x=[],T=this.root;T;)x.push(T),T=T.right;return new m(this,x)}}),h.at=function(x){if(x<0)return new m(this,[]);for(var T=this.root,A=[];;){if(A.push(T),T.left){if(x<T.left._count){T=T.left;continue}x-=T.left._count}if(!x)return new m(this,A);if(x-=1,T.right){if(x>=T.right._count)break;T=T.right}else break}return new m(this,[])},h.ge=function(x){for(var T=this._compare,A=this.root,y=[],E=0;A;){var S=T(x,A.key);y.push(A),S<=0&&(E=y.length),S<=0?A=A.left:A=A.right}return y.length=E,new m(this,y)},h.gt=function(x){for(var T=this._compare,A=this.root,y=[],E=0;A;){var S=T(x,A.key);y.push(A),S<0&&(E=y.length),S<0?A=A.left:A=A.right}return y.length=E,new m(this,y)},h.lt=function(x){for(var T=this._compare,A=this.root,y=[],E=0;A;){var S=T(x,A.key);y.push(A),S>0&&(E=y.length),S<=0?A=A.left:A=A.right}return y.length=E,new m(this,y)},h.le=function(x){for(var T=this._compare,A=this.root,y=[],E=0;A;){var S=T(x,A.key);y.push(A),S>=0&&(E=y.length),S<0?A=A.left:A=A.right}return y.length=E,new m(this,y)},h.find=function(x){for(var T=this._compare,A=this.root,y=[];A;){var E=T(x,A.key);if(y.push(A),E===0)return new m(this,y);E<=0?A=A.left:A=A.right}return new m(this,[])},h.remove=function(x){var T=this.find(x);return T?T.remove():this},h.get=function(x){for(var T=this._compare,A=this.root;A;){var y=T(x,A.key);if(y===0)return A.value;y<=0?A=A.left:A=A.right}};function m(x,T){this.tree=x,this._stack=T}var g=m.prototype;Object.defineProperty(g,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(g,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),g.clone=function(){return new m(this.tree,this._stack.slice())};function w(x,T){x.key=T.key,x.value=T.value,x.left=T.left,x.right=T.right,x._color=T._color,x._count=T._count}function b(x){for(var T,A,y,E,S=x.length-1;S>=0;--S){if(T=x[S],S===0){T._color=o;return}if(A=x[S-1],A.left===T){if(y=A.right,y.right&&y.right._color===a){if(y=A.right=l(y),E=y.right=l(y.right),A.right=y.left,y.left=A,y.right=E,y._color=A._color,T._color=o,A._color=o,E._color=o,c(A),c(y),S>1){var C=x[S-2];C.left===A?C.left=y:C.right=y}x[S-1]=y;return}else if(y.left&&y.left._color===a){if(y=A.right=l(y),E=y.left=l(y.left),A.right=E.left,y.left=E.right,E.left=A,E.right=y,E._color=A._color,A._color=o,y._color=o,T._color=o,c(A),c(y),c(E),S>1){var C=x[S-2];C.left===A?C.left=E:C.right=E}x[S-1]=E;return}if(y._color===o)if(A._color===a){A._color=o,A.right=u(a,y);return}else{A.right=u(a,y);continue}else{if(y=l(y),A.right=y.left,y.left=A,y._color=A._color,A._color=a,c(A),c(y),S>1){var C=x[S-2];C.left===A?C.left=y:C.right=y}x[S-1]=y,x[S]=A,S+1<x.length?x[S+1]=T:x.push(T),S=S+2}}else{if(y=A.left,y.left&&y.left._color===a){if(y=A.left=l(y),E=y.left=l(y.left),A.left=y.right,y.right=A,y.left=E,y._color=A._color,T._color=o,A._color=o,E._color=o,c(A),c(y),S>1){var C=x[S-2];C.right===A?C.right=y:C.left=y}x[S-1]=y;return}else if(y.right&&y.right._color===a){if(y=A.left=l(y),E=y.right=l(y.right),A.left=E.right,y.right=E.left,E.right=A,E.left=y,E._color=A._color,A._color=o,y._color=o,T._color=o,c(A),c(y),c(E),S>1){var C=x[S-2];C.right===A?C.right=E:C.left=E}x[S-1]=E;return}if(y._color===o)if(A._color===a){A._color=o,A.left=u(a,y);return}else{A.left=u(a,y);continue}else{if(y=l(y),A.left=y.right,y.right=A,y._color=A._color,A._color=a,c(A),c(y),S>1){var C=x[S-2];C.right===A?C.right=y:C.left=y}x[S-1]=y,x[S]=A,S+1<x.length?x[S+1]=T:x.push(T),S=S+2}}}}g.remove=function(){var x=this._stack;if(x.length===0)return this.tree;var T=new Array(x.length),A=x[x.length-1];T[T.length-1]=new s(A._color,A.key,A.value,A.left,A.right,A._count);for(var y=x.length-2;y>=0;--y){var A=x[y];A.left===x[y+1]?T[y]=new s(A._color,A.key,A.value,T[y+1],A.right,A._count):T[y]=new s(A._color,A.key,A.value,A.left,T[y+1],A._count)}if(A=T[T.length-1],A.left&&A.right){var E=T.length;for(A=A.left;A.right;)T.push(A),A=A.right;var S=T[E-1];T.push(new s(A._color,S.key,S.value,A.left,A.right,A._count)),T[E-1].key=A.key,T[E-1].value=A.value;for(var y=T.length-2;y>=E;--y)A=T[y],T[y]=new s(A._color,A.key,A.value,A.left,T[y+1],A._count);T[E-1].left=T[E]}if(A=T[T.length-1],A._color===a){var C=T[T.length-2];C.left===A?C.left=null:C.right===A&&(C.right=null),T.pop();for(var y=0;y<T.length;++y)T[y]._count--;return new f(this.tree._compare,T[0])}else if(A.left||A.right){A.left?w(A,A.left):A.right&&w(A,A.right),A._color=o;for(var y=0;y<T.length-1;++y)T[y]._count--;return new f(this.tree._compare,T[0])}else{if(T.length===1)return new f(this.tree._compare,null);for(var y=0;y<T.length;++y)T[y]._count--;var k=T[T.length-2];b(T),k.left===A?k.left=null:k.right=null}return new f(this.tree._compare,T[0])},Object.defineProperty(g,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(g,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(g,"index",{get:function(){var x=0,T=this._stack;if(T.length===0){var A=this.tree.root;return A?A._count:0}else T[T.length-1].left&&(x=T[T.length-1].left._count);for(var y=T.length-2;y>=0;--y)T[y+1]===T[y].right&&(++x,T[y].left&&(x+=T[y].left._count));return x},enumerable:!0}),g.next=function(){var x=this._stack;if(x.length!==0){var T=x[x.length-1];if(T.right)for(T=T.right;T;)x.push(T),T=T.left;else for(x.pop();x.length>0&&x[x.length-1].right===T;)T=x[x.length-1],x.pop()}},Object.defineProperty(g,"hasNext",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].right)return!0;for(var T=x.length-1;T>0;--T)if(x[T-1].left===x[T])return!0;return!1}}),g.update=function(x){var T=this._stack;if(T.length===0)throw new Error("Can't update empty node!");var A=new Array(T.length),y=T[T.length-1];A[A.length-1]=new s(y._color,y.key,x,y.left,y.right,y._count);for(var E=T.length-2;E>=0;--E)y=T[E],y.left===T[E+1]?A[E]=new s(y._color,y.key,y.value,A[E+1],y.right,y._count):A[E]=new s(y._color,y.key,y.value,y.left,A[E+1],y._count);return new f(this.tree._compare,A[0])},g.prev=function(){var x=this._stack;if(x.length!==0){var T=x[x.length-1];if(T.left)for(T=T.left;T;)x.push(T),T=T.right;else for(x.pop();x.length>0&&x[x.length-1].left===T;)T=x[x.length-1],x.pop()}},Object.defineProperty(g,"hasPrev",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].left)return!0;for(var T=x.length-1;T>0;--T)if(x[T-1].right===x[T])return!0;return!1}});function _(x,T){return x<T?-1:x>T?1:0}function M(x){return new f(x||_,null)}},3837(n,a,o){"use strict";n.exports=k;var s=o(4935),l=o(501),u=o(5304),c=o(6429),f=o(6444),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),d=ArrayBuffer,p=DataView;function v(D){return d.isView(D)&&!(D instanceof p)}function m(D){return Array.isArray(D)||v(D)}function g(D,F){return D[0]=F[0],D[1]=F[1],D[2]=F[2],D}function w(D){this.gl=D,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=u(D)}var b=w.prototype;b.update=function(D){D=D||{};function F(V,X,H){if(H in D){var G=D[H],Q=this[H],te;(V?m(G)&&m(G[0]):m(G))?this[H]=te=[X(G[0]),X(G[1]),X(G[2])]:this[H]=te=[X(G),X(G),X(G)];for(var ce=0;ce<3;++ce)if(te[ce]!==Q[ce])return!0}return!1}var P=F.bind(this,!1,Number),R=F.bind(this,!1,Boolean),L=F.bind(this,!1,String),I=F.bind(this,!0,function(V){if(m(V)){if(V.length===3)return[+V[0],+V[1],+V[2],1];if(V.length===4)return[+V[0],+V[1],+V[2],+V[3]]}return[0,0,0,1]}),B,O=!1,$=!1;if("bounds"in D)for(var Y=D.bounds,K=0;K<2;++K)for(var j=0;j<3;++j)Y[K][j]!==this.bounds[K][j]&&($=!0),this.bounds[K][j]=Y[K][j];if("ticks"in D){B=D.ticks,O=!0,this.autoTicks=!1;for(var K=0;K<3;++K)this.tickSpacing[K]=0}else P("tickSpacing")&&(this.autoTicks=!0,$=!0);if(this._firstInit&&("ticks"in D||"tickSpacing"in D||(this.autoTicks=!0),$=!0,O=!0,this._firstInit=!1),$&&this.autoTicks&&(B=f.create(this.bounds,this.tickSpacing),O=!0),O){for(var K=0;K<3;++K)B[K].sort(function(X,H){return X.x-H.x});f.equal(B,this.ticks)?O=!1:this.ticks=B}R("tickEnable"),L("tickFont")&&(O=!0),L("tickFontStyle")&&(O=!0),L("tickFontWeight")&&(O=!0),L("tickFontVariant")&&(O=!0),P("tickSize"),P("tickAngle"),P("tickPad"),I("tickColor");var q=L("labels");L("labelFont")&&(q=!0),L("labelFontStyle")&&(q=!0),L("labelFontWeight")&&(q=!0),L("labelFontVariant")&&(q=!0),R("labelEnable"),P("labelSize"),P("labelPad"),I("labelColor"),R("lineEnable"),R("lineMirror"),P("lineWidth"),I("lineColor"),R("lineTickEnable"),R("lineTickMirror"),P("lineTickLength"),P("lineTickWidth"),I("lineTickColor"),R("gridEnable"),P("gridWidth"),I("gridColor"),R("zeroEnable"),I("zeroLineColor"),P("zeroLineWidth"),R("backgroundEnable"),I("backgroundColor");var J=[{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]}],U=[{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&&(q||O)&&this._text.update(this.bounds,this.labels,J,this.ticks,U):this._text=s(this.gl,this.bounds,this.labels,J,this.ticks,U),this._lines&&O&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=l(this.gl,this.bounds,this.ticks))};function _(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var M=[new _,new _,new _];function x(D,F,P,R,L){for(var I=D.primalOffset,B=D.primalMinor,O=D.mirrorOffset,$=D.mirrorMinor,Y=R[F],K=0;K<3;++K)if(F!==K){var j=I,q=O,J=B,U=$;Y&1<<K&&(j=O,q=I,J=$,U=B),j[K]=P[0][K],q[K]=P[1][K],L[K]>0?(J[K]=-1,U[K]=0):(J[K]=0,U[K]=1)}}var T=[0,0,0],A={model:h,view:h,projection:h,_ortho:!1};b.isOpaque=function(){return!0},b.isTransparent=function(){return!1},b.drawTransparent=function(D){};var y=0,E=[0,0,0],S=[0,0,0],C=[0,0,0];b.draw=function(D){D=D||A;for(var H=this.gl,F=D.model||h,P=D.view||h,R=D.projection||h,L=this.bounds,I=D._ortho||!1,B=c(F,P,R,L,I),O=B.cubeEdges,$=B.axis,Y=P[12],K=P[13],j=P[14],q=P[15],J=I?2:1,U=J*this.pixelRatio*(R[3]*Y+R[7]*K+R[11]*j+R[15]*q)/H.drawingBufferHeight,V=0;V<3;++V)this.lastCubeProps.cubeEdges[V]=O[V],this.lastCubeProps.axis[V]=$[V];for(var X=M,V=0;V<3;++V)x(M[V],V,this.bounds,O,$);for(var H=this.gl,G=T,V=0;V<3;++V)this.backgroundEnable[V]?G[V]=$[V]:G[V]=0;this._background.draw(F,P,R,L,G,this.backgroundColor),this._lines.bind(F,P,R,this);for(var V=0;V<3;++V){var Q=[0,0,0];$[V]>0?Q[V]=L[1][V]:Q[V]=L[0][V];for(var te=0;te<2;++te){var ce=(V+1+te)%3,ge=(V+1+(te^1))%3;this.gridEnable[ce]&&this._lines.drawGrid(ce,ge,this.bounds,Q,this.gridColor[ce],this.gridWidth[ce]*this.pixelRatio)}for(var te=0;te<2;++te){var ce=(V+1+te)%3,ge=(V+1+(te^1))%3;this.zeroEnable[ge]&&Math.min(L[0][ge],L[1][ge])<=0&&Math.max(L[0][ge],L[1][ge])>=0&&this._lines.drawZero(ce,ge,this.bounds,Q,this.zeroLineColor[ge],this.zeroLineWidth[ge]*this.pixelRatio)}}for(var V=0;V<3;++V){this.lineEnable[V]&&this._lines.drawAxisLine(V,this.bounds,X[V].primalOffset,this.lineColor[V],this.lineWidth[V]*this.pixelRatio),this.lineMirror[V]&&this._lines.drawAxisLine(V,this.bounds,X[V].mirrorOffset,this.lineColor[V],this.lineWidth[V]*this.pixelRatio);for(var Ce=g(E,X[V].primalMinor),be=g(S,X[V].mirrorMinor),he=this.lineTickLength,te=0;te<3;++te){var oe=U/F[5*te];Ce[te]*=he[te]*oe,be[te]*=he[te]*oe}this.lineTickEnable[V]&&this._lines.drawAxisTicks(V,X[V].primalOffset,Ce,this.lineTickColor[V],this.lineTickWidth[V]*this.pixelRatio),this.lineTickMirror[V]&&this._lines.drawAxisTicks(V,X[V].mirrorOffset,be,this.lineTickColor[V],this.lineTickWidth[V]*this.pixelRatio)}this._lines.unbind(),this._text.bind(F,P,R,this.pixelRatio);var Ee,ye=.5,ue,ee;function ae(Se){ee=[0,0,0],ee[Se]=1}function xe(Se,ke,_e){var Ie=(Se+1)%3,Oe=(Se+2)%3,Qe=ke[Ie],et=ke[Oe],_t=_e[Ie],ut=_e[Oe];if(Qe>0&&ut>0){ae(Ie);return}else if(Qe>0&&ut<0){ae(Ie);return}else if(Qe<0&&ut>0){ae(Ie);return}else if(Qe<0&&ut<0){ae(Ie);return}else if(et>0&&_t>0){ae(Oe);return}else if(et>0&&_t<0){ae(Oe);return}else if(et<0&&_t>0){ae(Oe);return}else if(et<0&&_t<0){ae(Oe);return}}for(var V=0;V<3;++V){for(var re=X[V].primalMinor,pe=X[V].mirrorMinor,we=g(C,X[V].primalOffset),te=0;te<3;++te)this.lineTickEnable[V]&&(we[te]+=U*re[te]*Math.max(this.lineTickLength[te],0)/F[5*te]);var Fe=[0,0,0];if(Fe[V]=1,this.tickEnable[V]){this.tickAngle[V]===-3600?(this.tickAngle[V]=0,this.tickAlign[V]="auto"):this.tickAlign[V]=-1,ue=1,Ee=[this.tickAlign[V],ye,ue],Ee[0]==="auto"?Ee[0]=y:Ee[0]=parseInt(""+Ee[0]),ee=[0,0,0],xe(V,re,pe);for(var te=0;te<3;++te)we[te]+=U*re[te]*this.tickPad[te]/F[5*te];this._text.drawTicks(V,this.tickSize[V],this.tickAngle[V],we,this.tickColor[V],Fe,ee,Ee)}if(this.labelEnable[V]){ue=0,ee=[0,0,0],this.labels[V].length>4&&(ae(V),ue=1),Ee=[this.labelAlign[V],ye,ue],Ee[0]==="auto"?Ee[0]=y:Ee[0]=parseInt(""+Ee[0]);for(var te=0;te<3;++te)we[te]+=U*re[te]*this.labelPad[te]/F[5*te];we[V]+=.5*(L[0][V]+L[1][V]),this._text.drawLabel(V,this.labelSize[V],this.labelAngle[V],we,this.labelColor[V],[0,0,0],ee,Ee)}}this._text.unbind()},b.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function k(D,F){var P=new w(D);return P.update(F),P}},5304(n,a,o){"use strict";n.exports=h;var s=o(2762),l=o(8116),u=o(1879).bg;function c(d,p,v,m){this.gl=d,this.buffer=p,this.vao=v,this.shader=m}var f=c.prototype;f.draw=function(d,p,v,m,g,w){for(var b=!1,_=0;_<3;++_)b=b||g[_];if(b){var M=this.gl;M.enable(M.POLYGON_OFFSET_FILL),M.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:d,view:p,projection:v,bounds:m,enable:g,colors:w},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),M.disable(M.POLYGON_OFFSET_FILL)}},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function h(d){for(var p=[],v=[],m=0,g=0;g<3;++g)for(var w=(g+1)%3,b=(g+2)%3,_=[0,0,0],M=[0,0,0],x=-1;x<=1;x+=2){v.push(m,m+2,m+1,m+1,m+2,m+3),_[g]=x,M[g]=x;for(var T=-1;T<=1;T+=2){_[w]=T;for(var A=-1;A<=1;A+=2)_[b]=A,p.push(_[0],_[1],_[2],M[0],M[1],M[2]),m+=1}var y=w;w=b,b=y}var E=s(d,new Float32Array(p)),S=s(d,new Uint16Array(v),d.ELEMENT_ARRAY_BUFFER),C=l(d,[{buffer:E,type:d.FLOAT,size:3,offset:0,stride:24},{buffer:E,type:d.FLOAT,size:3,offset:12,stride:24}],S),k=u(d);return k.attributes.position.location=0,k.attributes.normal.location=1,new c(d,E,C,k)}},6429(n,a,o){"use strict";n.exports=x;var s=o(8828),l=o(6760),u=o(5202),c=o(3250),f=new Array(16),h=new Array(8),d=new Array(8),p=new Array(3),v=[0,0,0];(function(){for(var T=0;T<8;++T)h[T]=[1,1,1,1],d[T]=[1,1,1]})();function m(T,A,y){for(var E=0;E<4;++E){T[E]=y[12+E];for(var S=0;S<3;++S)T[E]+=A[S]*y[4*S+E]}}var g=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function w(T){for(var A=0;A<g.length;++A)if(T=u.positive(T,g[A]),T.length<3)return 0;for(var y=T[0],E=y[0]/y[3],S=y[1]/y[3],C=0,A=1;A+1<T.length;++A){var k=T[A],D=T[A+1],F=k[0]/k[3],P=k[1]/k[3],R=D[0]/D[3],L=D[1]/D[3],I=F-E,B=P-S,O=R-E,$=L-S;C+=Math.abs(I*$-B*O)}return C}var b=[1,1,1],_=[0,0,0],M={cubeEdges:b,axis:_};function x(T,A,y,E,S){l(f,A,T),l(f,y,f);for(var C=0,k=0;k<2;++k){p[2]=E[k][2];for(var D=0;D<2;++D){p[1]=E[D][1];for(var F=0;F<2;++F)p[0]=E[F][0],m(h[C],p,f),C+=1}}for(var P=-1,k=0;k<8;++k){for(var R=h[k][3],L=0;L<3;++L)d[k][L]=h[k][L]/R;S&&(d[k][2]*=-1),R<0&&(P<0||d[k][2]<d[P][2])&&(P=k)}if(P<0){P=0;for(var I=0;I<3;++I){for(var B=(I+2)%3,O=(I+1)%3,$=-1,Y=-1,K=0;K<2;++K){var j=K<<I,q=j+(K<<B)+(1-K<<O),J=j+(1-K<<B)+(K<<O);c(d[j],d[q],d[J],v)<0||(K?$=1:Y=1)}if($<0||Y<0){Y>$&&(P|=1<<I);continue}for(var K=0;K<2;++K){var j=K<<I,q=j+(K<<B)+(1-K<<O),J=j+(1-K<<B)+(K<<O),U=w([h[j],h[q],h[J],h[j+(1<<B)+(1<<O)]]);K?$=U:Y=U}if(Y>$){P|=1<<I;continue}}}for(var V=7^P,X=-1,k=0;k<8;++k)k===P||k===V||(X<0||d[X][1]>d[k][1])&&(X=k);for(var H=-1,k=0;k<3;++k){var G=X^1<<k;if(!(G===P||G===V)){H<0&&(H=G);var O=d[G];O[0]<d[H][0]&&(H=G)}}for(var Q=-1,k=0;k<3;++k){var G=X^1<<k;if(!(G===P||G===V||G===H)){Q<0&&(Q=G);var O=d[G];O[0]>d[Q][0]&&(Q=G)}}var te=b;te[0]=te[1]=te[2]=0,te[s.log2(H^X)]=X&H,te[s.log2(X^Q)]=X&Q;var ce=Q^7;ce===P||ce===V?(ce=H^7,te[s.log2(Q^ce)]=ce&Q):te[s.log2(H^ce)]=ce&H;for(var ge=_,Ce=P,I=0;I<3;++I)Ce&1<<I?ge[I]=-1:ge[I]=1;return M}},501(n,a,o){"use strict";n.exports=b;var s=o(2762),l=o(8116),u=o(1879).n,c=[0,0,0],f=[0,0,0],h=[0,0,0],d=[0,0,0],p=[1,1];function v(_){return _[0]=_[1]=_[2]=0,_}function m(_,M){return _[0]=M[0],_[1]=M[1],_[2]=M[2],_}function g(_,M,x,T,A,y,E,S){this.gl=_,this.vertBuffer=M,this.vao=x,this.shader=T,this.tickCount=A,this.tickOffset=y,this.gridCount=E,this.gridOffset=S}var w=g.prototype;w.bind=function(_,M,x){this.shader.bind(),this.shader.uniforms.model=_,this.shader.uniforms.view=M,this.shader.uniforms.projection=x,p[0]=this.gl.drawingBufferWidth,p[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=p,this.vao.bind()},w.unbind=function(){this.vao.unbind()},w.drawAxisLine=function(_,M,x,T,A){var y=v(f);this.shader.uniforms.majorAxis=f,y[_]=M[1][_]-M[0][_],this.shader.uniforms.minorAxis=y;var E=m(d,x);E[_]+=M[0][_],this.shader.uniforms.offset=E,this.shader.uniforms.lineWidth=A,this.shader.uniforms.color=T;var S=v(h);S[(_+2)%3]=1,this.shader.uniforms.screenAxis=S,this.vao.draw(this.gl.TRIANGLES,6);var S=v(h);S[(_+1)%3]=1,this.shader.uniforms.screenAxis=S,this.vao.draw(this.gl.TRIANGLES,6)},w.drawAxisTicks=function(_,M,x,T,A){if(this.tickCount[_]){var y=v(c);y[_]=1,this.shader.uniforms.majorAxis=y,this.shader.uniforms.offset=M,this.shader.uniforms.minorAxis=x,this.shader.uniforms.color=T,this.shader.uniforms.lineWidth=A;var E=v(h);E[_]=1,this.shader.uniforms.screenAxis=E,this.vao.draw(this.gl.TRIANGLES,this.tickCount[_],this.tickOffset[_])}},w.drawGrid=function(_,M,x,T,A,y){if(this.gridCount[_]){var E=v(f);E[M]=x[1][M]-x[0][M],this.shader.uniforms.minorAxis=E;var S=m(d,T);S[M]+=x[0][M],this.shader.uniforms.offset=S;var C=v(c);C[_]=1,this.shader.uniforms.majorAxis=C;var k=v(h);k[_]=1,this.shader.uniforms.screenAxis=k,this.shader.uniforms.lineWidth=y,this.shader.uniforms.color=A,this.vao.draw(this.gl.TRIANGLES,this.gridCount[_],this.gridOffset[_])}},w.drawZero=function(_,M,x,T,A,y){var E=v(f);this.shader.uniforms.majorAxis=E,E[_]=x[1][_]-x[0][_],this.shader.uniforms.minorAxis=E;var S=m(d,T);S[_]+=x[0][_],this.shader.uniforms.offset=S;var C=v(h);C[M]=1,this.shader.uniforms.screenAxis=C,this.shader.uniforms.lineWidth=y,this.shader.uniforms.color=A,this.vao.draw(this.gl.TRIANGLES,6)},w.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()};function b(_,M,x){var T=[],A=[0,0,0],y=[0,0,0],E=[0,0,0],S=[0,0,0];T.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var C=0;C<3;++C){for(var F=T.length/3|0,k=0;k<x[C].length;++k){var D=+x[C][k].x;T.push(D,0,1,D,1,1,D,0,-1,D,0,-1,D,1,1,D,1,-1)}var R=T.length/3|0;A[C]=F,y[C]=R-F;for(var F=T.length/3|0,P=0;P<x[C].length;++P){var D=+x[C][P].x;T.push(D,0,1,D,1,1,D,0,-1,D,0,-1,D,1,1,D,1,-1)}var R=T.length/3|0;E[C]=F,S[C]=R-F}var L=s(_,new Float32Array(T)),I=l(_,[{buffer:L,type:_.FLOAT,size:3,stride:0,offset:0}]),B=u(_);return B.attributes.position.location=0,new g(_,L,I,B,y,A,S,E)}},1879(n,a,o){"use strict";var s=o(3236),l=o(9405),u=s([`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);
}
`]),c=s([`precision highp float;
#define GLSLIFY 1
uniform vec4 color;
void main() {
gl_FragColor = color;
}`]);a.n=function(v){return l(v,u,c,null,[{name:"position",type:"vec3"}])};var f=s([`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=s([`precision highp float;
#define GLSLIFY 1
uniform vec4 color;
void main() {
gl_FragColor = color;
}`]);a.Q=function(v){return l(v,f,h,null,[{name:"position",type:"vec3"}])};var d=s([`precision highp float;
#define GLSLIFY 1
attribute vec3 position;
attribute vec3 normal;
uniform mat4 model, view, projection;
uniform vec3 enable;
uniform vec3 bounds[2];
varying vec3 colorChannel;
void main() {
vec3 signAxis = sign(bounds[1] - bounds[0]);
vec3 realNormal = signAxis * normal;
if(dot(realNormal, enable) > 0.0) {
vec3 minRange = min(bounds[0], bounds[1]);
vec3 maxRange = max(bounds[0], bounds[1]);
vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));
gl_Position = projection * (view * (model * vec4(nPosition, 1.0)));
} else {
gl_Position = vec4(0,0,0,0);
}
colorChannel = abs(realNormal);
}
`]),p=s([`precision highp float;
#define GLSLIFY 1
uniform vec4 colors[3];
varying vec3 colorChannel;
void main() {
gl_FragColor = colorChannel.x * colors[0] +
colorChannel.y * colors[1] +
colorChannel.z * colors[2];
}`]);a.bg=function(v){return l(v,d,p,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935(n,a,o){"use strict";n.exports=w;var s=o(2762),l=o(8116),u=o(4359),c=o(1879).Q,f=window||process.global||{},h=f.__TEXT_CACHE||{};f.__TEXT_CACHE={};var d=3;function p(b,_,M,x){this.gl=b,this.shader=_,this.buffer=M,this.vao=x,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var v=p.prototype,m=[0,0];v.bind=function(b,_,M,x){this.vao.bind(),this.shader.bind();var T=this.shader.uniforms;T.model=b,T.view=_,T.projection=M,T.pixelScale=x,m[0]=this.gl.drawingBufferWidth,m[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=m},v.unbind=function(){this.vao.unbind()},v.update=function(b,_,M,x,T){var A=[];function y(I,B,O,$,Y,K){var j=[O.style,O.weight,O.variant,O.family].join("_"),q=h[j];q||(q=h[j]={});var J=q[B];J||(J=q[B]=g(B,{triangles:!0,font:O.family,fontStyle:O.style,fontWeight:O.weight,fontVariant:O.variant,textAlign:"center",textBaseline:"middle",lineSpacing:Y,styletags:K}));for(var U=($||12)/12,V=J.positions,X=J.cells,H=0,G=X.length;H<G;++H)for(var Q=X[H],te=2;te>=0;--te){var ce=V[Q[te]];A.push(U*ce[0],-U*ce[1],I)}}for(var E=[0,0,0],S=[0,0,0],C=[0,0,0],k=[0,0,0],D=1.25,F={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},P=0;P<3;++P){C[P]=A.length/d|0,y(.5*(b[0][P]+b[1][P]),_[P],M[P],12,D,F),k[P]=(A.length/d|0)-C[P],E[P]=A.length/d|0;for(var R=0;R<x[P].length;++R)if(x[P][R].text){var L={family:x[P][R].font||T[P].family,style:T[P].fontStyle||T[P].style,weight:T[P].fontWeight||T[P].weight,variant:T[P].fontVariant||T[P].variant};y(x[P][R].x,x[P][R].text,L,x[P][R].fontSize||12,D,F)}S[P]=(A.length/d|0)-E[P]}this.buffer.update(A),this.tickOffset=E,this.tickCount=S,this.labelOffset=C,this.labelCount=k},v.drawTicks=function(b,_,M,x,T,A,y,E){this.tickCount[b]&&(this.shader.uniforms.axis=A,this.shader.uniforms.color=T,this.shader.uniforms.angle=M,this.shader.uniforms.scale=_,this.shader.uniforms.offset=x,this.shader.uniforms.alignDir=y,this.shader.uniforms.alignOpt=E,this.vao.draw(this.gl.TRIANGLES,this.tickCount[b],this.tickOffset[b]))},v.drawLabel=function(b,_,M,x,T,A,y,E){this.labelCount[b]&&(this.shader.uniforms.axis=A,this.shader.uniforms.color=T,this.shader.uniforms.angle=M,this.shader.uniforms.scale=_,this.shader.uniforms.offset=x,this.shader.uniforms.alignDir=y,this.shader.uniforms.alignOpt=E,this.vao.draw(this.gl.TRIANGLES,this.labelCount[b],this.labelOffset[b]))},v.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function g(b,_){try{return u(b,_)}catch(M){return console.warn('error vectorizing text:"'+b+'" error:',M),{cells:[],positions:[]}}}function w(b,_,M,x,T,A){var y=s(b),E=l(b,[{buffer:y,size:3}]),S=c(b);S.attributes.position.location=0;var C=new p(b,S,y,E);return C.update(_,M,x,T,A),C}},6444(n,a){"use strict";a.create=s,a.equal=l;function o(u,c){var f=u+"",h=f.indexOf("."),d=0;h>=0&&(d=f.length-h-1);var p=Math.pow(10,d),v=Math.round(u*c*p),m=v+"";if(m.indexOf("e")>=0)return m;var g=v/p,w=v%p;v<0?(g=-Math.ceil(g)|0,w=-w|0):(g=Math.floor(g)|0,w=w|0);var b=""+g;if(v<0&&(b="-"+b),d){for(var _=""+w;_.length<d;)_="0"+_;return b+"."+_}else return b}function s(u,c){for(var f=[],h=0;h<3;++h){for(var d=[],p=.5*(u[0][h]+u[1][h]),v=0;v*c[h]<=u[1][h];++v)d.push({x:v*c[h],text:o(c[h],v)});for(var v=-1;v*c[h]>=u[0][h];--v)d.push({x:v*c[h],text:o(c[h],v)});f.push(d)}return f}function l(u,c){for(var f=0;f<3;++f){if(u[f].length!==c[f].length)return!1;for(var h=0;h<u[f].length;++h){var d=u[f][h],p=c[f][h];if(d.x!==p.x||d.text!==p.text||d.font!==p.font||d.fontColor!==p.fontColor||d.fontSize!==p.fontSize||d.dx!==p.dx||d.dy!==p.dy)return!1}}return!0}},5445(n,a,o){"use strict";n.exports=M;var s=o(5033),l=o(5202),u=o(6429),c=o(6760),f=o(5665),h=o(5352),d=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),p=new Float32Array(16);function v(x,T,A){this.lo=x,this.hi=T,this.pixelsPerDataUnit=A}var m=[0,0,0,1],g=[0,0,0,1];function w(x,T,A,y,E){for(var S=0;S<3;++S){for(var C=m,k=g,D=0;D<3;++D)k[D]=C[D]=A[D];k[3]=C[3]=1,k[S]+=1,h(k,k,T),k[3]<0&&(x[S]=1/0),C[S]-=1,h(C,C,T),C[3]<0&&(x[S]=1/0);var F=(C[0]/C[3]-k[0]/k[3])*y,P=(C[1]/C[3]-k[1]/k[3])*E;x[S]=.25*Math.sqrt(F*F+P*P)}return x}var b=[new v(1/0,-1/0,1/0),new v(1/0,-1/0,1/0),new v(1/0,-1/0,1/0)],_=[0,0,0];function M(x,T,A,y,P){var S=T.model||d,C=T.view||d,k=T.projection||d,D=T._ortho||!1,F=x.bounds,P=P||u(S,C,k,F,D),R=P.axis;c(p,C,S),c(p,k,p);for(var L=b,I=0;I<3;++I)L[I].lo=1/0,L[I].hi=-1/0,L[I].pixelsPerDataUnit=1/0;var B=s(f(p,p));f(p,p);for(var O=0;O<3;++O){var $=(O+1)%3,Y=(O+2)%3,K=_;e:for(var I=0;I<2;++I){var j=[];if(R[O]<0!=!!I){K[O]=F[I][O];for(var q=0;q<2;++q){K[$]=F[q^I][$];for(var J=0;J<2;++J)K[Y]=F[J^q^I][Y],j.push(K.slice())}for(var U=D?5:4,q=U;q===U;++q){if(j.length===0)continue e;j=l.positive(j,B[q])}for(var q=0;q<j.length;++q)for(var Y=j[q],V=w(_,p,Y,A,y),J=0;J<3;++J)L[J].lo=Math.min(L[J].lo,Y[J]),L[J].hi=Math.max(L[J].hi,Y[J]),J!==O&&(L[J].pixelsPerDataUnit=Math.min(L[J].pixelsPerDataUnit,Math.abs(V[J])))}}}return L}},2762(n,a,o){"use strict";var s=o(1888),l=o(5298),u=o(9618),c=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function f(g,w,b,_,M){this.gl=g,this.type=w,this.handle=b,this.length=_,this.usage=M}var h=f.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 d(g,w,b,_,M,x){var T=M.length*M.BYTES_PER_ELEMENT;if(x<0)return g.bufferData(w,M,_),T;if(T+x>b)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return g.bufferSubData(w,x,M),b}function p(g,w){for(var b=s.malloc(g.length,w),_=g.length,M=0;M<_;++M)b[M]=g[M];return b}function v(g,w){for(var b=1,_=w.length-1;_>=0;--_){if(w[_]!==b)return!1;b*=g[_]}return!0}h.update=function(g,w){if(typeof w!="number"&&(w=-1),this.bind(),typeof g=="object"&&typeof g.shape!="undefined"){var b=g.dtype;if(c.indexOf(b)<0&&(b="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var _=gl.getExtension("OES_element_index_uint");_&&b!=="uint16"?b="uint32":b="uint16"}if(b===g.dtype&&v(g.shape,g.stride))g.offset===0&&g.data.length===g.shape[0]?this.length=d(this.gl,this.type,this.length,this.usage,g.data,w):this.length=d(this.gl,this.type,this.length,this.usage,g.data.subarray(g.offset,g.shape[0]),w);else{var M=s.malloc(g.size,b),x=u(M,g.shape);l.assign(x,g),w<0?this.length=d(this.gl,this.type,this.length,this.usage,M,w):this.length=d(this.gl,this.type,this.length,this.usage,M.subarray(0,g.size),w),s.free(M)}}else if(Array.isArray(g)){var T;this.type===this.gl.ELEMENT_ARRAY_BUFFER?T=p(g,"uint16"):T=p(g,"float32"),w<0?this.length=d(this.gl,this.type,this.length,this.usage,T,w):this.length=d(this.gl,this.type,this.length,this.usage,T.subarray(0,g.length),w),s.free(T)}else if(typeof g=="object"&&typeof g.length=="number")this.length=d(this.gl,this.type,this.length,this.usage,g,w);else if(typeof g=="number"||g===void 0){if(w>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");g=g|0,g<=0&&(g=1),this.gl.bufferData(this.type,g|0,this.usage),this.length=g}else throw new Error("gl-buffer: Invalid data type")};function m(g,w,b,_){if(b=b||g.ARRAY_BUFFER,_=_||g.DYNAMIC_DRAW,b!==g.ARRAY_BUFFER&&b!==g.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(_!==g.DYNAMIC_DRAW&&_!==g.STATIC_DRAW&&_!==g.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=g.createBuffer(),x=new f(g,b,M,0,_);return x.update(w),x}n.exports=m},6405(n,a,o){"use strict";var s=o(2931);n.exports=function(u,c){var f=u.positions,h=u.vectors,d={positions:[],vertexIntensity:[],vertexIntensityBounds:u.vertexIntensityBounds,vectors:[],cells:[],coneOffset:u.coneOffset,colormap:u.colormap};if(u.positions.length===0)return c&&(c[0]=[0,0,0],c[1]=[0,0,0]),d;for(var p=0,v=1/0,m=-1/0,g=1/0,w=-1/0,b=1/0,_=-1/0,M=null,x=null,T=[],A=1/0,y=!1,E=u.coneSizemode==="raw",S=0;S<f.length;S++){var C=f[S];v=Math.min(C[0],v),m=Math.max(C[0],m),g=Math.min(C[1],g),w=Math.max(C[1],w),b=Math.min(C[2],b),_=Math.max(C[2],_);var k=h[S];if(s.length(k)>p&&(p=s.length(k)),S&&!E){var D=2*s.distance(M,C)/(s.length(x)+s.length(k));D?(A=Math.min(A,D),y=!1):y=!0}y||(M=C,x=k),T.push(k)}var F=[v,g,b],P=[m,w,_];c&&(c[0]=F,c[1]=P),p===0&&(p=1);var R=1/p;isFinite(A)||(A=1),d.vectorScale=A;var L=u.coneSize||(E?1:.5);u.absoluteConeSize&&(L=u.absoluteConeSize*R),d.coneScale=L;for(var S=0,I=0;S<f.length;S++)for(var C=f[S],B=C[0],O=C[1],$=C[2],Y=T[S],K=s.length(Y)*R,j=0,q=8;j<q;j++){d.positions.push([B,O,$,I++]),d.positions.push([B,O,$,I++]),d.positions.push([B,O,$,I++]),d.positions.push([B,O,$,I++]),d.positions.push([B,O,$,I++]),d.positions.push([B,O,$,I++]),d.vectors.push(Y),d.vectors.push(Y),d.vectors.push(Y),d.vectors.push(Y),d.vectors.push(Y),d.vectors.push(Y),d.vertexIntensity.push(K,K,K),d.vertexIntensity.push(K,K,K);var J=d.positions.length;d.cells.push([J-6,J-5,J-4],[J-3,J-2,J-1])}return d};var l=o(614);n.exports.createMesh=o(9060),n.exports.createConeMesh=function(u,c){return n.exports.createMesh(u,c,{shaders:l,traceType:"cone"})}},9060(n,a,o){"use strict";var s=o(9405),l=o(2762),u=o(8116),c=o(7766),f=o(6760),h=o(7608),d=o(9618),p=o(6729),v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function m(T,A,y,E,S,C,k,D,F,P,R){this.gl=T,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=A,this.dirty=!0,this.triShader=y,this.pickShader=E,this.trianglePositions=S,this.triangleVectors=C,this.triangleColors=D,this.triangleUVs=F,this.triangleIds=k,this.triangleVAO=P,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=R,this.tubeScale=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=v,this._view=v,this._projection=v,this._resolution=[1,1]}var g=m.prototype;g.isOpaque=function(){return this.opacity>=1},g.isTransparent=function(){return this.opacity<1},g.pickSlots=1,g.setPickBase=function(T){this.pickId=T};function w(T){for(var A=p({colormap:T,nshades:256,format:"rgba"}),y=new Uint8Array(256*4),E=0;E<256;++E){for(var S=A[E],C=0;C<3;++C)y[4*E+C]=S[C];y[4*E+3]=S[3]*255}return d(y,[256,256,4],[4,0,1])}function b(T){for(var A=T.length,y=new Array(A),E=0;E<A;++E)y[E]=T[E][2];return y}g.update=function(T){T=T||{};var A=this.gl;this.dirty=!0,"lightPosition"in T&&(this.lightPosition=T.lightPosition),"opacity"in T&&(this.opacity=T.opacity),"ambient"in T&&(this.ambientLight=T.ambient),"diffuse"in T&&(this.diffuseLight=T.diffuse),"specular"in T&&(this.specularLight=T.specular),"roughness"in T&&(this.roughness=T.roughness),"fresnel"in T&&(this.fresnel=T.fresnel),T.tubeScale!==void 0&&(this.tubeScale=T.tubeScale),T.vectorScale!==void 0&&(this.vectorScale=T.vectorScale),T.coneScale!==void 0&&(this.coneScale=T.coneScale),T.coneOffset!==void 0&&(this.coneOffset=T.coneOffset),T.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=A.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=A.LINEAR,this.texture.setPixels(w(T.colormap)),this.texture.generateMipmap());var y=T.cells,E=T.positions,S=T.vectors;if(!(!E||!y||!S)){var C=[],k=[],D=[],F=[],P=[];this.cells=y,this.positions=E,this.vectors=S;var R=T.meshColor||[1,1,1,1],L=T.vertexIntensity,I=1/0,B=-1/0;if(L)if(T.vertexIntensityBounds)I=+T.vertexIntensityBounds[0],B=+T.vertexIntensityBounds[1];else for(var O=0;O<L.length;++O){var $=L[O];I=Math.min(I,$),B=Math.max(B,$)}else for(var O=0;O<E.length;++O){var $=E[O][2];I=Math.min(I,$),B=Math.max(B,$)}L?this.intensity=L:this.intensity=b(E),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var O=0;O<E.length;++O)for(var Y=E[O],K=0;K<3;++K)isNaN(Y[K])||!isFinite(Y[K])||(this.bounds[0][K]=Math.min(this.bounds[0][K],Y[K]),this.bounds[1][K]=Math.max(this.bounds[1][K],Y[K]));var j=0;e:for(var O=0;O<y.length;++O){var q=y[O];switch(q.length){case 3:for(var K=0;K<3;++K)for(var J=q[K],Y=E[J],U=0;U<3;++U)if(isNaN(Y[U])||!isFinite(Y[U]))continue e;for(var K=0;K<3;++K){var J=q[2-K],Y=E[J];C.push(Y[0],Y[1],Y[2],Y[3]);var V=S[J];k.push(V[0],V[1],V[2],V[3]||0);var X=R;X.length===3?D.push(X[0],X[1],X[2],1):D.push(X[0],X[1],X[2],X[3]);var H;L?H=[(L[J]-I)/(B-I),0]:H=[(Y[2]-I)/(B-I),0],F.push(H[0],H[1]),P.push(O)}j+=1;break;default:break}}this.triangleCount=j,this.trianglePositions.update(C),this.triangleVectors.update(k),this.triangleColors.update(D),this.triangleUVs.update(F),this.triangleIds.update(new Uint32Array(P))}},g.drawTransparent=g.draw=function(T){T=T||{};for(var A=this.gl,y=T.model||v,E=T.view||v,S=T.projection||v,C=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],k=0;k<3;++k)C[0][k]=Math.max(C[0][k],this.clipBounds[0][k]),C[1][k]=Math.min(C[1][k],this.clipBounds[1][k]);var D={model:y,view:E,projection:S,inverseModel:v.slice(),clipBounds:C,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};D.inverseModel=h(D.inverseModel,D.model),A.disable(A.CULL_FACE),this.texture.bind(0);var F=new Array(16);f(F,D.view,D.model),f(F,D.projection,F),h(F,F);for(var k=0;k<3;++k)D.eyePosition[k]=F[12+k]/F[15];for(var P=F[15],k=0;k<3;++k)P+=this.lightPosition[k]*F[4*k+3];for(var k=0;k<3;++k){for(var R=F[12+k],L=0;L<3;++L)R+=F[4*L+k]*this.lightPosition[L];D.lightPosition[k]=R/P}if(this.triangleCount>0){var I=this.triShader;I.bind(),I.uniforms=D,this.triangleVAO.bind(),A.drawArrays(A.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},g.drawPick=function(T){T=T||{};for(var A=this.gl,y=T.model||v,E=T.view||v,S=T.projection||v,C=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],k=0;k<3;++k)C[0][k]=Math.max(C[0][k],this.clipBounds[0][k]),C[1][k]=Math.min(C[1][k],this.clipBounds[1][k]);this._model=[].slice.call(y),this._view=[].slice.call(E),this._projection=[].slice.call(S),this._resolution=[A.drawingBufferWidth,A.drawingBufferHeight];var D={model:y,view:E,projection:S,clipBounds:C,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},F=this.pickShader;F.bind(),F.uniforms=D,this.triangleCount>0&&(this.triangleVAO.bind(),A.drawArrays(A.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},g.pick=function(T){if(!T||T.id!==this.pickId)return null;var A=T.value[0]+256*T.value[1]+65536*T.value[2],y=this.cells[A],E=this.positions[y[1]].slice(0,3),S={position:E,dataCoordinate:E,index:Math.floor(y[1]/48)};return this.traceType==="cone"?S.index=Math.floor(y[1]/48):this.traceType==="streamtube"&&(S.intensity=this.intensity[y[1]],S.velocity=this.vectors[y[1]].slice(0,3),S.divergence=this.vectors[y[1]][3],S.index=A),S},g.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function _(T,A){var y=s(T,A.meshShader.vertex,A.meshShader.fragment,null,A.meshShader.attributes);return y.attributes.position.location=0,y.attributes.color.location=2,y.attributes.uv.location=3,y.attributes.vector.location=4,y}function M(T,A){var y=s(T,A.pickShader.vertex,A.pickShader.fragment,null,A.pickShader.attributes);return y.attributes.position.location=0,y.attributes.id.location=1,y.attributes.vector.location=4,y}function x(T,A,y){var E=y.shaders;arguments.length===1&&(A=T,T=A.gl);var S=_(T,E),C=M(T,E),k=c(T,d(new Uint8Array([255,255,255,255]),[1,1,4]));k.generateMipmap(),k.minFilter=T.LINEAR_MIPMAP_LINEAR,k.magFilter=T.LINEAR;var D=l(T),F=l(T),P=l(T),R=l(T),L=l(T),I=u(T,[{buffer:D,type:T.FLOAT,size:4},{buffer:L,type:T.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:P,type:T.FLOAT,size:4},{buffer:R,type:T.FLOAT,size:2},{buffer:F,type:T.FLOAT,size:4}]),B=new m(T,k,S,C,D,F,L,P,R,I,y.traceType||"cone");return B.update(A),B}n.exports=x},614(n,a,o){var s=o(3236),l=s([`precision highp float;
precision highp float;
#define GLSLIFY 1
vec3 getOrthogonalVector(vec3 v) {
// Return up-vector for only-z vector.
// Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).
// From the above if-statement we have ||a|| > 0 U ||b|| > 0.
// Assign z = 0, x = -b, y = a:
// a*-b + b*a + c*0 = -ba + ba + 0 = 0
if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
return normalize(vec3(-v.y, v.x, 0.0));
} else {
return normalize(vec3(0.0, v.z, -v.y));
}
}
// Calculate the cone vertex and normal at the given index.
//
// The returned vertex is for a cone with its top at origin and height of 1.0,
// pointing in the direction of the vector attribute.
//
// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.
// These vertices are used to make up the triangles of the cone by the following:
// segment + 0 top vertex
// segment + 1 perimeter vertex a+1
// segment + 2 perimeter vertex a
// segment + 3 center base vertex
// segment + 4 perimeter vertex a
// segment + 5 perimeter vertex a+1
// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.
// To go from index to segment, floor(index / 6)
// To go from segment to angle, 2*pi * (segment/segmentCount)
// To go from index to segment index, index - (segment*6)
//
vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {
const float segmentCount = 8.0;
float index = rawIndex - floor(rawIndex /
(segmentCount * 6.0)) *
(segmentCount * 6.0);
float segment = floor(0.001 + index/6.0);
float segmentIndex = index - (segment*6.0);
normal = -normalize(d);
if (segmentIndex > 2.99 && segmentIndex < 3.01) {
return mix(vec3(0.0), -d, coneOffset);
}
float nextAngle = (
(segmentIndex > 0.99 && segmentIndex < 1.01) ||
(segmentIndex > 4.99 && segmentIndex < 5.01)
) ? 1.0 : 0.0;
float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);
vec3 v1 = mix(d, vec3(0.0), coneOffset);
vec3 v2 = v1 - d;
vec3 u = getOrthogonalVector(d);
vec3 v = normalize(cross(u, d));
vec3 x = u * cos(angle) * length(d)*0.25;
vec3 y = v * sin(angle) * length(d)*0.25;
vec3 v3 = v2 + x + y;
if (segmentIndex < 3.0) {
vec3 tx = u * sin(angle);
vec3 ty = v * -cos(angle);
vec3 tangent = tx + ty;
normal = normalize(cross(v3 - v1, tangent));
}
if (segmentIndex == 0.0) {
return mix(d, vec3(0.0), coneOffset);
}
return v3;
}
attribute vec3 vector;
attribute vec4 color, position;
attribute vec2 uv;
uniform float vectorScale, coneScale, coneOffset;
uniform mat4 model, view, projection, inverseModel;
uniform vec3 eyePosition, lightPosition;
varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;
void main() {
// Scale the vector magnitude to stay constant with
// model & view changes.
vec3 normal;
vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);
vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);
//Lighting geometry parameters
vec4 cameraCoordinate = view * conePosition;
cameraCoordinate.xyz /= cameraCoordinate.w;
f_lightDirection = lightPosition - cameraCoordinate.xyz;
f_eyeDirection = eyePosition - cameraCoordinate.xyz;
f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);
// vec4 m_position = model * vec4(conePosition, 1.0);
vec4 t_position = view * conePosition;
gl_Position = projection * t_position;
f_color = color;
f_data = conePosition.xyz;
f_position = position.xyz;
f_uv = uv;
}
`]),u=s([`#extension GL_OES_standard_derivatives : enable
precision highp float;
#define GLSLIFY 1
float beckmannDistribution(float x, float roughness) {
float NdotH = max(x, 0.0001);
float cos2Alpha = NdotH * NdotH;
float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
float roughness2 = roughness * roughness;
float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
return exp(tan2Alpha / roughness2) / denom;
}
float cookTorranceSpecular(
vec3 lightDirection,
vec3 viewDirection,
vec3 surfaceNormal,
float roughness,
float fresnel) {
float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);
float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);
//Half angle vector
vec3 H = normalize(lightDirection + viewDirection);
//Geometric term
float NdotH = max(dot(surfaceNormal, H), 0.0);
float VdotH = max(dot(viewDirection, H), 0.000001);
float LdotH = max(dot(lightDirection, H), 0.000001);
float G1 = (2.0 * NdotH * VdotN) / VdotH;
float G2 = (2.0 * NdotH * LdotN) / LdotH;
float G = min(1.0, min(G1, G2));
//Distribution term
float D = beckmannDistribution(NdotH, roughness);
//Fresnel term
float F = pow(1.0 - VdotN, fresnel);
//Multiply terms and done
return G * F * D / max(3.14159265 * VdotN, 0.000001);
}
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 clipBounds[2];
uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;
uniform sampler2D texture;
varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
vec3 N = normalize(f_normal);
vec3 L = normalize(f_lightDirection);
vec3 V = normalize(f_eyeDirection);
if(gl_FrontFacing) {
N = -N;
}
float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));
float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);
vec4 surfaceColor = f_color * texture2D(texture, f_uv);
vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);
gl_FragColor = litColor * opacity;
}
`]),c=s([`precision highp float;
precision highp float;
#define GLSLIFY 1
vec3 getOrthogonalVector(vec3 v) {
// Return up-vector for only-z vector.
// Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).
// From the above if-statement we have ||a|| > 0 U ||b|| > 0.
// Assign z = 0, x = -b, y = a:
// a*-b + b*a + c*0 = -ba + ba + 0 = 0
if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
return normalize(vec3(-v.y, v.x, 0.0));
} else {
return normalize(vec3(0.0, v.z, -v.y));
}
}
// Calculate the cone vertex and normal at the given index.
//
// The returned vertex is for a cone with its top at origin and height of 1.0,
// pointing in the direction of the vector attribute.
//
// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.
// These vertices are used to make up the triangles of the cone by the following:
// segment + 0 top vertex
// segment + 1 perimeter vertex a+1
// segment + 2 perimeter vertex a
// segment + 3 center base vertex
// segment + 4 perimeter vertex a
// segment + 5 perimeter vertex a+1
// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.
// To go from index to segment, floor(index / 6)
// To go from segment to angle, 2*pi * (segment/segmentCount)
// To go from index to segment index, index - (segment*6)
//
vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {
const float segmentCount = 8.0;
float index = rawIndex - floor(rawIndex /
(segmentCount * 6.0)) *
(segmentCount * 6.0);
float segment = floor(0.001 + index/6.0);
float segmentIndex = index - (segment*6.0);
normal = -normalize(d);
if (segmentIndex > 2.99 && segmentIndex < 3.01) {
return mix(vec3(0.0), -d, coneOffset);
}
float nextAngle = (
(segmentIndex > 0.99 && segmentIndex < 1.01) ||
(segmentIndex > 4.99 && segmentIndex < 5.01)
) ? 1.0 : 0.0;
float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);
vec3 v1 = mix(d, vec3(0.0), coneOffset);
vec3 v2 = v1 - d;
vec3 u = getOrthogonalVector(d);
vec3 v = normalize(cross(u, d));
vec3 x = u * cos(angle) * length(d)*0.25;
vec3 y = v * sin(angle) * length(d)*0.25;
vec3 v3 = v2 + x + y;
if (segmentIndex < 3.0) {
vec3 tx = u * sin(angle);
vec3 ty = v * -cos(angle);
vec3 tangent = tx + ty;
normal = normalize(cross(v3 - v1, tangent));
}
if (segmentIndex == 0.0) {
return mix(d, vec3(0.0), coneOffset);
}
return v3;
}
attribute vec4 vector;
attribute vec4 position;
attribute vec4 id;
uniform mat4 model, view, projection;
uniform float vectorScale, coneScale, coneOffset;
varying vec3 f_position;
varying vec4 f_id;
void main() {
vec3 normal;
vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);
vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);
gl_Position = projection * (view * conePosition);
f_id = id;
f_position = position.xyz;
}
`]),f=s([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 clipBounds[2];
uniform float pickId;
varying vec3 f_position;
varying vec4 f_id;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
gl_FragColor = vec4(pickId, f_id.xyz);
}`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},a.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737(n){n.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171(n,a,o){var s=o(737);n.exports=function(u){return s[u]}},9165(n,a,o){"use strict";n.exports=m;var s=o(2762),l=o(8116),u=o(3436),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(g,w,b,_){this.gl=g,this.shader=_,this.buffer=w,this.vao=b,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=f.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(g){var w=this.gl,b=this.shader.uniforms;this.shader.bind();var _=b.view=g.view||c,M=b.projection=g.projection||c;b.model=g.model||c,b.clipBounds=this.clipBounds,b.opacity=this.opacity;var x=_[12],T=_[13],A=_[14],y=_[15],E=g._ortho||!1,S=E?2:1,C=S*this.pixelRatio*(M[3]*x+M[7]*T+M[11]*A+M[15]*y)/w.drawingBufferHeight;this.vao.bind();for(var k=0;k<3;++k)w.lineWidth(this.lineWidth[k]*this.pixelRatio),b.capSize=this.capSize[k]*C,this.lineCount[k]&&w.drawArrays(w.LINES,this.lineOffset[k],this.lineCount[k]);this.vao.unbind()};function d(g,w){for(var b=0;b<3;++b)g[0][b]=Math.min(g[0][b],w[b]),g[1][b]=Math.max(g[1][b],w[b])}var p=(function(){for(var g=new Array(3),w=0;w<3;++w){for(var b=[],_=1;_<=2;++_)for(var M=-1;M<=1;M+=2){var x=(_+w)%3,T=[0,0,0];T[x]=M,b.push(T)}g[w]=b}return g})();function v(g,w,b,_){for(var M=p[_],x=0;x<M.length;++x){var T=M[x];g.push(w[0],w[1],w[2],b[0],b[1],b[2],b[3],T[0],T[1],T[2])}return M.length}h.update=function(g){g=g||{},"lineWidth"in g&&(this.lineWidth=g.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in g&&(this.capSize=g.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in g&&(this.opacity=+g.opacity,this.opacity<1&&(this.hasAlpha=!0));var w=g.color||[[0,0,0],[0,0,0],[0,0,0]],b=g.position,_=g.error;if(Array.isArray(w[0])||(w=[w,w,w]),b&&_){var M=[],x=b.length,T=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var A=0;A<3;++A){this.lineOffset[A]=T;e:for(var y=0;y<x;++y){for(var E=b[y],S=0;S<3;++S)if(isNaN(E[S])||!isFinite(E[S]))continue e;var C=_[y],k=w[A];if(Array.isArray(k[0])&&(k=w[y]),k.length===3?k=[k[0],k[1],k[2],1]:k.length===4&&(k=[k[0],k[1],k[2],k[3]],!this.hasAlpha&&k[3]<1&&(this.hasAlpha=!0)),!(isNaN(C[0][A])||isNaN(C[1][A]))){if(C[0][A]<0){var D=E.slice();D[A]+=C[0][A],M.push(E[0],E[1],E[2],k[0],k[1],k[2],k[3],0,0,0,D[0],D[1],D[2],k[0],k[1],k[2],k[3],0,0,0),d(this.bounds,D),T+=2+v(M,D,k,A)}if(C[1][A]>0){var D=E.slice();D[A]+=C[1][A],M.push(E[0],E[1],E[2],k[0],k[1],k[2],k[3],0,0,0,D[0],D[1],D[2],k[0],k[1],k[2],k[3],0,0,0),d(this.bounds,D),T+=2+v(M,D,k,A)}}}this.lineCount[A]=T-this.lineOffset[A]}this.buffer.update(M)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function m(g){var w=g.gl,b=s(w),_=l(w,[{buffer:b,type:w.FLOAT,size:3,offset:0,stride:40},{buffer:b,type:w.FLOAT,size:4,offset:12,stride:40},{buffer:b,type:w.FLOAT,size:3,offset:28,stride:40}]),M=u(w);M.attributes.position.location=0,M.attributes.color.location=1,M.attributes.offset.location=2;var x=new f(w,b,_,M);return x.update(g),x}},3436(n,a,o){"use strict";var s=o(3236),l=o(9405),u=s([`precision highp float;
#define GLSLIFY 1
attribute vec3 position, offset;
attribute vec4 color;
uniform mat4 model, view, projection;
uniform float capSize;
varying vec4 fragColor;
varying vec3 fragPosition;
void main() {
vec4 worldPosition = model * vec4(position, 1.0);
worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);
gl_Position = projection * (view * worldPosition);
fragColor = color;
fragPosition = position;
}`]),c=s([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 clipBounds[2];
uniform float opacity;
varying vec3 fragPosition;
varying vec4 fragColor;
void main() {
if (
outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||
fragColor.a * opacity == 0.
) discard;
gl_FragColor = opacity * fragColor;
}`]);n.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260(n,a,o){"use strict";var s=o(7766);n.exports=T;var l=null,u,c,f,h;function d(A){var y=A.getParameter(A.FRAMEBUFFER_BINDING),E=A.getParameter(A.RENDERBUFFER_BINDING),S=A.getParameter(A.TEXTURE_BINDING_2D);return[y,E,S]}function p(A,y){A.bindFramebuffer(A.FRAMEBUFFER,y[0]),A.bindRenderbuffer(A.RENDERBUFFER,y[1]),A.bindTexture(A.TEXTURE_2D,y[2])}function v(A,y){var E=A.getParameter(y.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(E+1);for(var S=0;S<=E;++S){for(var C=new Array(E),k=0;k<S;++k)C[k]=A.COLOR_ATTACHMENT0+k;for(var k=S;k<E;++k)C[k]=A.NONE;l[S]=C}}function m(A){switch(A){case u:throw new Error("gl-fbo: Framebuffer unsupported");case c:throw new Error("gl-fbo: Framebuffer incomplete attachment");case f: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 g(A,y,E,S,C,k){if(!S)return null;var D=s(A,y,E,C,S);return D.magFilter=A.NEAREST,D.minFilter=A.NEAREST,D.mipSamples=1,D.bind(),A.framebufferTexture2D(A.FRAMEBUFFER,k,A.TEXTURE_2D,D.handle,0),D}function w(A,y,E,S,C){var k=A.createRenderbuffer();return A.bindRenderbuffer(A.RENDERBUFFER,k),A.renderbufferStorage(A.RENDERBUFFER,S,y,E),A.framebufferRenderbuffer(A.FRAMEBUFFER,C,A.RENDERBUFFER,k),k}function b(A){var y=d(A.gl),E=A.gl,S=A.handle=E.createFramebuffer(),C=A._shape[0],k=A._shape[1],D=A.color.length,F=A._ext,P=A._useStencil,R=A._useDepth,L=A._colorType;E.bindFramebuffer(E.FRAMEBUFFER,S);for(var I=0;I<D;++I)A.color[I]=g(E,C,k,L,E.RGBA,E.COLOR_ATTACHMENT0+I);D===0?(A._color_rb=w(E,C,k,E.RGBA4,E.COLOR_ATTACHMENT0),F&&F.drawBuffersWEBGL(l[0])):D>1&&F.drawBuffersWEBGL(l[D]);var B=E.getExtension("WEBGL_depth_texture");B?P?A.depth=g(E,C,k,B.UNSIGNED_INT_24_8_WEBGL,E.DEPTH_STENCIL,E.DEPTH_STENCIL_ATTACHMENT):R&&(A.depth=g(E,C,k,E.UNSIGNED_SHORT,E.DEPTH_COMPONENT,E.DEPTH_ATTACHMENT)):R&&P?A._depth_rb=w(E,C,k,E.DEPTH_STENCIL,E.DEPTH_STENCIL_ATTACHMENT):R?A._depth_rb=w(E,C,k,E.DEPTH_COMPONENT16,E.DEPTH_ATTACHMENT):P&&(A._depth_rb=w(E,C,k,E.STENCIL_INDEX,E.STENCIL_ATTACHMENT));var O=E.checkFramebufferStatus(E.FRAMEBUFFER);if(O!==E.FRAMEBUFFER_COMPLETE){A._destroyed=!0,E.bindFramebuffer(E.FRAMEBUFFER,null),E.deleteFramebuffer(A.handle),A.handle=null,A.depth&&(A.depth.dispose(),A.depth=null),A._depth_rb&&(E.deleteRenderbuffer(A._depth_rb),A._depth_rb=null);for(var I=0;I<A.color.length;++I)A.color[I].dispose(),A.color[I]=null;A._color_rb&&(E.deleteRenderbuffer(A._color_rb),A._color_rb=null),p(E,y),m(O)}p(E,y)}function _(A,y,E,S,C,k,D,F){this.gl=A,this._shape=[y|0,E|0],this._destroyed=!1,this._ext=F,this.color=new Array(C);for(var P=0;P<C;++P)this.color[P]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=S,this._useDepth=k,this._useStencil=D;var R=this,L=[y|0,E|0];Object.defineProperties(L,{0:{get:function(){return R._shape[0]},set:function(I){return R.width=I}},1:{get:function(){return R._shape[1]},set:function(I){return R.height=I}}}),this._shapeVector=L,b(this)}var M=_.prototype;function x(A,y,E){if(A._destroyed)throw new Error("gl-fbo: Can't resize destroyed FBO");if(!(A._shape[0]===y&&A._shape[1]===E)){var S=A.gl,C=S.getParameter(S.MAX_RENDERBUFFER_SIZE);if(y<0||y>C||E<0||E>C)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");A._shape[0]=y,A._shape[1]=E;for(var k=d(S),D=0;D<A.color.length;++D)A.color[D].shape=A._shape;A._color_rb&&(S.bindRenderbuffer(S.RENDERBUFFER,A._color_rb),S.renderbufferStorage(S.RENDERBUFFER,S.RGBA4,A._shape[0],A._shape[1])),A.depth&&(A.depth.shape=A._shape),A._depth_rb&&(S.bindRenderbuffer(S.RENDERBUFFER,A._depth_rb),A._useDepth&&A._useStencil?S.renderbufferStorage(S.RENDERBUFFER,S.DEPTH_STENCIL,A._shape[0],A._shape[1]):A._useDepth?S.renderbufferStorage(S.RENDERBUFFER,S.DEPTH_COMPONENT16,A._shape[0],A._shape[1]):A._useStencil&&S.renderbufferStorage(S.RENDERBUFFER,S.STENCIL_INDEX,A._shape[0],A._shape[1])),S.bindFramebuffer(S.FRAMEBUFFER,A.handle);var F=S.checkFramebufferStatus(S.FRAMEBUFFER);F!==S.FRAMEBUFFER_COMPLETE&&(A.dispose(),p(S,k),m(F)),p(S,k)}}Object.defineProperties(M,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(A){if(Array.isArray(A)||(A=[A|0,A|0]),A.length!==2)throw new Error("gl-fbo: Shape vector must be length 2");var y=A[0]|0,E=A[1]|0;return x(this,y,E),[y,E]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(A){return A=A|0,x(this,A,this._shape[1]),A},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(A){return A=A|0,x(this,this._shape[0],A),A},enumerable:!1}}),M.bind=function(){if(!this._destroyed){var A=this.gl;A.bindFramebuffer(A.FRAMEBUFFER,this.handle),A.viewport(0,0,this._shape[0],this._shape[1])}},M.dispose=function(){if(!this._destroyed){this._destroyed=!0;var A=this.gl;A.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(A.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var y=0;y<this.color.length;++y)this.color[y].dispose(),this.color[y]=null;this._color_rb&&(A.deleteRenderbuffer(this._color_rb),this._color_rb=null)}};function T(A,y,E,S){u||(u=A.FRAMEBUFFER_UNSUPPORTED,c=A.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,f=A.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,h=A.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var C=A.getExtension("WEBGL_draw_buffers");if(!l&&C&&v(A,C),Array.isArray(y)&&(S=E,E=y[1]|0,y=y[0]|0),typeof y!="number")throw new Error("gl-fbo: Missing shape parameter");var k=A.getParameter(A.MAX_RENDERBUFFER_SIZE);if(y<0||y>k||E<0||E>k)throw new Error("gl-fbo: Parameters are too large for FBO");S=S||{};var D=1;if("color"in S){if(D=Math.max(S.color|0,0),D<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(D>1)if(C){if(D>A.getParameter(C.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+D+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var F=A.UNSIGNED_BYTE,P=A.getExtension("OES_texture_float");if(S.float&&D>0){if(!P)throw new Error("gl-fbo: Context does not support floating point textures");F=A.FLOAT}else S.preferFloat&&D>0&&P&&(F=A.FLOAT);var R=!0;"depth"in S&&(R=!!S.depth);var L=!1;return"stencil"in S&&(L=!!S.stencil),new _(A,y,E,F,D,R,L,C)}},2992(n,a,o){var s=o(3387).sprintf,l=o(5171),u=o(1848),c=o(1085);n.exports=f;function f(h,d,p){"use strict";var v=u(d)||"of unknown name (see npm glsl-shader-name)",m="unknown type";p!==void 0&&(m=p===l.FRAGMENT_SHADER?"fragment":"vertex");for(var g=s(`Error compiling %s shader %s:
`,m,v),w=s("%s%s",g,h),b=h.split(`
`),_={},M=0;M<b.length;M++){var x=b[M];if(!(x===""||x==="\0")){var T=parseInt(x.split(":")[2]);if(isNaN(T))throw new Error(s("Could not parse error: %s",x));_[T]=x}}for(var A=c(d).split(`
`),M=0;M<A.length;M++)if(!(!_[M+3]&&!_[M+2]&&!_[M+1])){var y=A[M];if(g+=y+`
`,_[M+1]){var E=_[M+1];E=E.substr(E.split(":",3).join(":").length+1).trim(),g+=s(`^^^ %s
`,E)}}return{long:g.trim(),short:w.trim()}}},7319(n,a,o){var s=o(3236),l=o(9405),u=s([`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;
}
`]),c=s([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 clipBounds[2];
uniform sampler2D dashTexture;
uniform float dashScale;
uniform float opacity;
varying vec3 worldPosition;
varying float pixelArcLength;
varying vec4 fragColor;
void main() {
if (
outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||
fragColor.a * opacity == 0.
) discard;
float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;
if(dashWeight < 0.5) {
discard;
}
gl_FragColor = fragColor * opacity;
}
`]),f=s([`precision highp float;
#define GLSLIFY 1
#define FLOAT_MAX 1.70141184e38
#define FLOAT_MIN 1.17549435e-38
// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl
vec4 packFloat(float v) {
float av = abs(v);
//Handle special cases
if(av < FLOAT_MIN) {
return vec4(0.0, 0.0, 0.0, 0.0);
} else if(v > FLOAT_MAX) {
return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;
} else if(v < -FLOAT_MAX) {
return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;
}
vec4 c = vec4(0,0,0,0);
//Compute exponent and mantissa
float e = floor(log2(av));
float m = av * pow(2.0, -e) - 1.0;
//Unpack mantissa
c[1] = floor(128.0 * m);
m -= c[1] / 128.0;
c[2] = floor(32768.0 * m);
m -= c[2] / 32768.0;
c[3] = floor(8388608.0 * m);
//Unpack exponent
float ebias = e + 127.0;
c[0] = floor(ebias / 2.0);
ebias -= c[0] * 2.0;
c[1] += floor(ebias) * 128.0;
//Unpack sign bit
c[0] += 128.0 * step(0.0, -v);
//Scale back to range
return c / 255.0;
}
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform float pickId;
uniform vec3 clipBounds[2];
varying vec3 worldPosition;
varying float pixelArcLength;
varying vec4 fragColor;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;
gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);
}`]),h=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];a.createShader=function(d){return l(d,u,c,null,h)},a.createPickShader=function(d){return l(d,u,f,null,h)}},5714(n,a,o){"use strict";n.exports=A;var s=o(2762),l=o(8116),u=o(7766),c=new Uint8Array(4),f=new Float32Array(c.buffer);function h(y,E,S,C){return c[0]=C,c[1]=S,c[2]=E,c[3]=y,f[0]}var d=o(2478),p=o(9618),v=o(7319),m=v.createShader,g=v.createPickShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function b(y,E){for(var S=0,C=0;C<3;++C){var k=y[C]-E[C];S+=k*k}return Math.sqrt(S)}function _(y){for(var E=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],S=0;S<3;++S)E[0][S]=Math.max(y[0][S],E[0][S]),E[1][S]=Math.min(y[1][S],E[1][S]);return E}function M(y,E,S,C){this.arcLength=y,this.position=E,this.index=S,this.dataCoordinate=C}function x(y,E,S,C,k,D){this.gl=y,this.shader=E,this.pickShader=S,this.buffer=C,this.vao=k,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=D,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var T=x.prototype;T.isTransparent=function(){return this.hasAlpha},T.isOpaque=function(){return!this.hasAlpha},T.pickSlots=1,T.setPickBase=function(y){this.pickId=y},T.drawTransparent=T.draw=function(y){if(this.vertexCount){var E=this.gl,S=this.shader,C=this.vao;S.bind(),S.uniforms={model:y.model||w,view:y.view||w,projection:y.projection||w,clipBounds:_(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[E.drawingBufferWidth,E.drawingBufferHeight],pixelRatio:this.pixelRatio},C.bind(),C.draw(E.TRIANGLE_STRIP,this.vertexCount),C.unbind()}},T.drawPick=function(y){if(this.vertexCount){var E=this.gl,S=this.pickShader,C=this.vao;S.bind(),S.uniforms={model:y.model||w,view:y.view||w,projection:y.projection||w,pickId:this.pickId,clipBounds:_(this.clipBounds),screenShape:[E.drawingBufferWidth,E.drawingBufferHeight],pixelRatio:this.pixelRatio},C.bind(),C.draw(E.TRIANGLE_STRIP,this.vertexCount),C.unbind()}},T.update=function(y){var E,S;this.dirty=!0;var C=!!y.connectGaps;"dashScale"in y&&(this.dashScale=y.dashScale),this.hasAlpha=!1,"opacity"in y&&(this.opacity=+y.opacity,this.opacity<1&&(this.hasAlpha=!0));var k=[],D=[],F=[],P=0,R=0,L=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],I=y.position||y.positions;if(I){var B=y.color||y.colors||[0,0,0,1],O=y.lineWidth||1,$=!1;e:for(E=1;E<I.length;++E){var Y=I[E-1],K=I[E];for(D.push(P),F.push(Y.slice()),S=0;S<3;++S){if(isNaN(Y[S])||isNaN(K[S])||!isFinite(Y[S])||!isFinite(K[S])){if(!C&&k.length>0){for(var j=0;j<24;++j)k.push(k[k.length-12]);R+=2,$=!0}continue e}L[0][S]=Math.min(L[0][S],Y[S],K[S]),L[1][S]=Math.max(L[1][S],Y[S],K[S])}var q,J;Array.isArray(B[0])?(q=B.length>E-1?B[E-1]:B.length>0?B[B.length-1]:[0,0,0,1],J=B.length>E?B[E]:B.length>0?B[B.length-1]:[0,0,0,1]):q=J=B,q.length===3&&(q=[q[0],q[1],q[2],1]),J.length===3&&(J=[J[0],J[1],J[2],1]),!this.hasAlpha&&q[3]<1&&(this.hasAlpha=!0);var U;Array.isArray(O)?U=O.length>E-1?O[E-1]:O.length>0?O[O.length-1]:[0,0,0,1]:U=O;var V=P;if(P+=b(Y,K),$){for(S=0;S<2;++S)k.push(Y[0],Y[1],Y[2],K[0],K[1],K[2],V,U,q[0],q[1],q[2],q[3]);R+=2,$=!1}k.push(Y[0],Y[1],Y[2],K[0],K[1],K[2],V,U,q[0],q[1],q[2],q[3],Y[0],Y[1],Y[2],K[0],K[1],K[2],V,-U,q[0],q[1],q[2],q[3],K[0],K[1],K[2],Y[0],Y[1],Y[2],P,-U,J[0],J[1],J[2],J[3],K[0],K[1],K[2],Y[0],Y[1],Y[2],P,U,J[0],J[1],J[2],J[3]),R+=4}}if(this.buffer.update(k),D.push(P),F.push(I[I.length-1].slice()),this.bounds=L,this.vertexCount=R,this.points=F,this.arcLength=D,"dashes"in y){var X=y.dashes,H=X.slice();for(H.unshift(0),E=1;E<H.length;++E)H[E]=H[E-1]+H[E];var G=p(new Array(256*4),[256,1,4]);for(E=0;E<256;++E){for(S=0;S<4;++S)G.set(E,0,S,0);d.le(H,H[H.length-1]*E/255)&1?G.set(E,0,0,0):G.set(E,0,0,255)}this.texture.setPixels(G)}},T.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},T.pick=function(y){if(!y||y.id!==this.pickId)return null;var E=h(y.value[0],y.value[1],y.value[2],0),S=d.le(this.arcLength,E);if(S<0)return null;if(S===this.arcLength.length-1)return new M(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),S);for(var C=this.points[S],k=this.points[Math.min(S+1,this.points.length-1)],D=(E-this.arcLength[S])/(this.arcLength[S+1]-this.arcLength[S]),F=1-D,P=[0,0,0],R=0;R<3;++R)P[R]=F*C[R]+D*k[R];var L=Math.min(D<.5?S:S+1,this.points.length-1);return new M(E,P,L,this.points[L])};function A(y){var E=y.gl||y.scene&&y.scene.gl,S=m(E);S.attributes.position.location=0,S.attributes.nextPosition.location=1,S.attributes.arcLength.location=2,S.attributes.lineWidth.location=3,S.attributes.color.location=4;var C=g(E);C.attributes.position.location=0,C.attributes.nextPosition.location=1,C.attributes.arcLength.location=2,C.attributes.lineWidth.location=3,C.attributes.color.location=4;for(var k=s(E),D=l(E,[{buffer:k,size:3,offset:0,stride:48},{buffer:k,size:3,offset:12,stride:48},{buffer:k,size:1,offset:24,stride:48},{buffer:k,size:1,offset:28,stride:48},{buffer:k,size:4,offset:32,stride:48}]),F=p(new Array(256*4),[256,1,4]),P=0;P<1024;++P)F.data[P]=255;var R=u(E,F);R.wrap=E.REPEAT;var L=new x(E,S,C,k,D,R);return L.update(y),L}},1903(n){n.exports=a;function a(o){var s=new Float32Array(16);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s[4]=o[4],s[5]=o[5],s[6]=o[6],s[7]=o[7],s[8]=o[8],s[9]=o[9],s[10]=o[10],s[11]=o[11],s[12]=o[12],s[13]=o[13],s[14]=o[14],s[15]=o[15],s}},6864(n){n.exports=a;function a(){var o=new Float32Array(16);return o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o}},9921(n){n.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3],f=o[4],h=o[5],d=o[6],p=o[7],v=o[8],m=o[9],g=o[10],w=o[11],b=o[12],_=o[13],M=o[14],x=o[15],T=s*h-l*f,A=s*d-u*f,y=s*p-c*f,E=l*d-u*h,S=l*p-c*h,C=u*p-c*d,k=v*_-m*b,D=v*M-g*b,F=v*x-w*b,P=m*M-g*_,R=m*x-w*_,L=g*x-w*M;return T*L-A*R+y*P+E*F-S*D+C*k}},7399(n){n.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],h=l+l,d=u+u,p=c+c,v=l*h,m=u*h,g=u*d,w=c*h,b=c*d,_=c*p,M=f*h,x=f*d,T=f*p;return o[0]=1-g-_,o[1]=m+T,o[2]=w-x,o[3]=0,o[4]=m-T,o[5]=1-v-_,o[6]=b+M,o[7]=0,o[8]=w+x,o[9]=b-M,o[10]=1-v-g,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o}},6743(n){n.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3],d=u+u,p=c+c,v=f+f,m=u*d,g=u*p,w=u*v,b=c*p,_=c*v,M=f*v,x=h*d,T=h*p,A=h*v;return o[0]=1-(b+M),o[1]=g+A,o[2]=w-T,o[3]=0,o[4]=g-A,o[5]=1-(m+M),o[6]=_+x,o[7]=0,o[8]=w+T,o[9]=_-x,o[10]=1-(m+b),o[11]=0,o[12]=l[0],o[13]=l[1],o[14]=l[2],o[15]=1,o}},7894(n){n.exports=a;function a(o){return o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o}},7608(n){n.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],h=s[4],d=s[5],p=s[6],v=s[7],m=s[8],g=s[9],w=s[10],b=s[11],_=s[12],M=s[13],x=s[14],T=s[15],A=l*d-u*h,y=l*p-c*h,E=l*v-f*h,S=u*p-c*d,C=u*v-f*d,k=c*v-f*p,D=m*M-g*_,F=m*x-w*_,P=m*T-b*_,R=g*x-w*M,L=g*T-b*M,I=w*T-b*x,B=A*I-y*L+E*R+S*P-C*F+k*D;return B?(B=1/B,o[0]=(d*I-p*L+v*R)*B,o[1]=(c*L-u*I-f*R)*B,o[2]=(M*k-x*C+T*S)*B,o[3]=(w*C-g*k-b*S)*B,o[4]=(p*P-h*I-v*F)*B,o[5]=(l*I-c*P+f*F)*B,o[6]=(x*E-_*k-T*y)*B,o[7]=(m*k-w*E+b*y)*B,o[8]=(h*L-d*P+v*D)*B,o[9]=(u*P-l*L-f*D)*B,o[10]=(_*C-M*E+T*A)*B,o[11]=(g*E-m*C-b*A)*B,o[12]=(d*F-h*R-p*D)*B,o[13]=(l*R-u*F+c*D)*B,o[14]=(M*y-_*S-x*A)*B,o[15]=(m*S-g*y+w*A)*B,o):null}},6582(n,a,o){var s=o(7894);n.exports=l;function l(u,c,f,h){var d,p,v,m,g,w,b,_,M,x,T=c[0],A=c[1],y=c[2],E=h[0],S=h[1],C=h[2],k=f[0],D=f[1],F=f[2];return Math.abs(T-k)<1e-6&&Math.abs(A-D)<1e-6&&Math.abs(y-F)<1e-6?s(u):(b=T-k,_=A-D,M=y-F,x=1/Math.sqrt(b*b+_*_+M*M),b*=x,_*=x,M*=x,d=S*M-C*_,p=C*b-E*M,v=E*_-S*b,x=Math.sqrt(d*d+p*p+v*v),x?(x=1/x,d*=x,p*=x,v*=x):(d=0,p=0,v=0),m=_*v-M*p,g=M*d-b*v,w=b*p-_*d,x=Math.sqrt(m*m+g*g+w*w),x?(x=1/x,m*=x,g*=x,w*=x):(m=0,g=0,w=0),u[0]=d,u[1]=m,u[2]=b,u[3]=0,u[4]=p,u[5]=g,u[6]=_,u[7]=0,u[8]=v,u[9]=w,u[10]=M,u[11]=0,u[12]=-(d*T+p*A+v*y),u[13]=-(m*T+g*A+w*y),u[14]=-(b*T+_*A+M*y),u[15]=1,u)}},6760(n){n.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3],d=s[4],p=s[5],v=s[6],m=s[7],g=s[8],w=s[9],b=s[10],_=s[11],M=s[12],x=s[13],T=s[14],A=s[15],y=l[0],E=l[1],S=l[2],C=l[3];return o[0]=y*u+E*d+S*g+C*M,o[1]=y*c+E*p+S*w+C*x,o[2]=y*f+E*v+S*b+C*T,o[3]=y*h+E*m+S*_+C*A,y=l[4],E=l[5],S=l[6],C=l[7],o[4]=y*u+E*d+S*g+C*M,o[5]=y*c+E*p+S*w+C*x,o[6]=y*f+E*v+S*b+C*T,o[7]=y*h+E*m+S*_+C*A,y=l[8],E=l[9],S=l[10],C=l[11],o[8]=y*u+E*d+S*g+C*M,o[9]=y*c+E*p+S*w+C*x,o[10]=y*f+E*v+S*b+C*T,o[11]=y*h+E*m+S*_+C*A,y=l[12],E=l[13],S=l[14],C=l[15],o[12]=y*u+E*d+S*g+C*M,o[13]=y*c+E*p+S*w+C*x,o[14]=y*f+E*v+S*b+C*T,o[15]=y*h+E*m+S*_+C*A,o}},4040(n){n.exports=a;function a(o,s,l,u,c,f,h){var d=1/(s-l),p=1/(u-c),v=1/(f-h);return o[0]=-2*d,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*p,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*v,o[11]=0,o[12]=(s+l)*d,o[13]=(c+u)*p,o[14]=(h+f)*v,o[15]=1,o}},4772(n){n.exports=a;function a(o,s,l,u,c){var f=1/Math.tan(s/2),h=1/(u-c);return o[0]=f/l,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=f,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=(c+u)*h,o[11]=-1,o[12]=0,o[13]=0,o[14]=2*c*u*h,o[15]=0,o}},6079(n){n.exports=a;function a(o,s,l,u){var c=u[0],f=u[1],h=u[2],d=Math.sqrt(c*c+f*f+h*h),p,v,m,g,w,b,_,M,x,T,A,y,E,S,C,k,D,F,P,R,L,I,B,O;return Math.abs(d)<1e-6?null:(d=1/d,c*=d,f*=d,h*=d,p=Math.sin(l),v=Math.cos(l),m=1-v,g=s[0],w=s[1],b=s[2],_=s[3],M=s[4],x=s[5],T=s[6],A=s[7],y=s[8],E=s[9],S=s[10],C=s[11],k=c*c*m+v,D=f*c*m+h*p,F=h*c*m-f*p,P=c*f*m-h*p,R=f*f*m+v,L=h*f*m+c*p,I=c*h*m+f*p,B=f*h*m-c*p,O=h*h*m+v,o[0]=g*k+M*D+y*F,o[1]=w*k+x*D+E*F,o[2]=b*k+T*D+S*F,o[3]=_*k+A*D+C*F,o[4]=g*P+M*R+y*L,o[5]=w*P+x*R+E*L,o[6]=b*P+T*R+S*L,o[7]=_*P+A*R+C*L,o[8]=g*I+M*B+y*O,o[9]=w*I+x*B+E*O,o[10]=b*I+T*B+S*O,o[11]=_*I+A*B+C*O,s!==o&&(o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),o)}},5567(n){n.exports=a;function a(o,s,l){var u=Math.sin(l),c=Math.cos(l),f=s[4],h=s[5],d=s[6],p=s[7],v=s[8],m=s[9],g=s[10],w=s[11];return s!==o&&(o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),o[4]=f*c+v*u,o[5]=h*c+m*u,o[6]=d*c+g*u,o[7]=p*c+w*u,o[8]=v*c-f*u,o[9]=m*c-h*u,o[10]=g*c-d*u,o[11]=w*c-p*u,o}},2408(n){n.exports=a;function a(o,s,l){var u=Math.sin(l),c=Math.cos(l),f=s[0],h=s[1],d=s[2],p=s[3],v=s[8],m=s[9],g=s[10],w=s[11];return s!==o&&(o[4]=s[4],o[5]=s[5],o[6]=s[6],o[7]=s[7],o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),o[0]=f*c-v*u,o[1]=h*c-m*u,o[2]=d*c-g*u,o[3]=p*c-w*u,o[8]=f*u+v*c,o[9]=h*u+m*c,o[10]=d*u+g*c,o[11]=p*u+w*c,o}},7089(n){n.exports=a;function a(o,s,l){var u=Math.sin(l),c=Math.cos(l),f=s[0],h=s[1],d=s[2],p=s[3],v=s[4],m=s[5],g=s[6],w=s[7];return s!==o&&(o[8]=s[8],o[9]=s[9],o[10]=s[10],o[11]=s[11],o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),o[0]=f*c+v*u,o[1]=h*c+m*u,o[2]=d*c+g*u,o[3]=p*c+w*u,o[4]=v*c-f*u,o[5]=m*c-h*u,o[6]=g*c-d*u,o[7]=w*c-p*u,o}},2504(n){n.exports=a;function a(o,s,l){var u=l[0],c=l[1],f=l[2];return o[0]=s[0]*u,o[1]=s[1]*u,o[2]=s[2]*u,o[3]=s[3]*u,o[4]=s[4]*c,o[5]=s[5]*c,o[6]=s[6]*c,o[7]=s[7]*c,o[8]=s[8]*f,o[9]=s[9]*f,o[10]=s[10]*f,o[11]=s[11]*f,o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15],o}},7656(n){n.exports=a;function a(o,s,l){var u=l[0],c=l[1],f=l[2],h,d,p,v,m,g,w,b,_,M,x,T;return s===o?(o[12]=s[0]*u+s[4]*c+s[8]*f+s[12],o[13]=s[1]*u+s[5]*c+s[9]*f+s[13],o[14]=s[2]*u+s[6]*c+s[10]*f+s[14],o[15]=s[3]*u+s[7]*c+s[11]*f+s[15]):(h=s[0],d=s[1],p=s[2],v=s[3],m=s[4],g=s[5],w=s[6],b=s[7],_=s[8],M=s[9],x=s[10],T=s[11],o[0]=h,o[1]=d,o[2]=p,o[3]=v,o[4]=m,o[5]=g,o[6]=w,o[7]=b,o[8]=_,o[9]=M,o[10]=x,o[11]=T,o[12]=h*u+m*c+_*f+s[12],o[13]=d*u+g*c+M*f+s[13],o[14]=p*u+w*c+x*f+s[14],o[15]=v*u+b*c+T*f+s[15]),o}},5665(n){n.exports=a;function a(o,s){if(o===s){var l=s[1],u=s[2],c=s[3],f=s[6],h=s[7],d=s[11];o[1]=s[4],o[2]=s[8],o[3]=s[12],o[4]=l,o[6]=s[9],o[7]=s[13],o[8]=u,o[9]=f,o[11]=s[14],o[12]=c,o[13]=h,o[14]=d}else o[0]=s[0],o[1]=s[4],o[2]=s[8],o[3]=s[12],o[4]=s[1],o[5]=s[5],o[6]=s[9],o[7]=s[13],o[8]=s[2],o[9]=s[6],o[10]=s[10],o[11]=s[14],o[12]=s[3],o[13]=s[7],o[14]=s[11],o[15]=s[15];return o}},7626(n,a,o){"use strict";var s=o(2642),l=o(9346);n.exports=d;function u(p,v){for(var m=[0,0,0,0],g=0;g<4;++g)for(var w=0;w<4;++w)m[w]+=p[4*g+w]*v[g];return m}function c(p,v,m,g,w){for(var b=u(g,u(m,u(v,[p[0],p[1],p[2],1]))),_=0;_<3;++_)b[_]/=b[3];return[.5*w[0]*(1+b[0]),.5*w[1]*(1-b[1])]}function f(p,v){if(p.length===2){for(var m=0,g=0,w=0;w<2;++w)m+=Math.pow(v[w]-p[0][w],2),g+=Math.pow(v[w]-p[1][w],2);return m=Math.sqrt(m),g=Math.sqrt(g),m+g<1e-6?[1,0]:[g/(m+g),m/(g+m)]}else if(p.length===3){var b=[0,0];return l(p[0],p[1],p[2],v,b),s(p,b)}return[]}function h(p,v){for(var m=[0,0,0],g=0;g<p.length;++g)for(var w=p[g],b=v[g],_=0;_<3;++_)m[_]+=b*w[_];return m}function d(p,v,m,g,w,b){if(p.length===1)return[0,p[0].slice()];for(var _=new Array(p.length),M=0;M<p.length;++M)_[M]=c(p[M],m,g,w,b);for(var x=0,T=1/0,M=0;M<_.length;++M){for(var A=0,y=0;y<2;++y)A+=Math.pow(_[M][y]-v[y],2);A<T&&(T=A,x=M)}for(var E=f(_,v),S=0,M=0;M<3;++M){if(E[M]<-.001||E[M]>1.0001)return null;S+=E[M]}return Math.abs(S-1)>.001?null:[x,h(p,E),E]}},840(n,a,o){var s=o(3236),l=s([`precision highp float;
#define GLSLIFY 1
attribute vec3 position, normal;
attribute vec4 color;
attribute vec2 uv;
uniform mat4 model
, view
, projection
, inverseModel;
uniform vec3 eyePosition
, lightPosition;
varying vec3 f_normal
, f_lightDirection
, f_eyeDirection
, f_data;
varying vec4 f_color;
varying vec2 f_uv;
vec4 project(vec3 p) {
return projection * (view * (model * vec4(p, 1.0)));
}
void main() {
gl_Position = project(position);
//Lighting geometry parameters
vec4 cameraCoordinate = view * vec4(position , 1.0);
cameraCoordinate.xyz /= cameraCoordinate.w;
f_lightDirection = lightPosition - cameraCoordinate.xyz;
f_eyeDirection = eyePosition - cameraCoordinate.xyz;
f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);
f_color = color;
f_data = position;
f_uv = uv;
}
`]),u=s([`#extension GL_OES_standard_derivatives : enable
precision highp float;
#define GLSLIFY 1
float beckmannDistribution(float x, float roughness) {
float NdotH = max(x, 0.0001);
float cos2Alpha = NdotH * NdotH;
float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
float roughness2 = roughness * roughness;
float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
return exp(tan2Alpha / roughness2) / denom;
}
float cookTorranceSpecular(
vec3 lightDirection,
vec3 viewDirection,
vec3 surfaceNormal,
float roughness,
float fresnel) {
float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);
float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);
//Half angle vector
vec3 H = normalize(lightDirection + viewDirection);
//Geometric term
float NdotH = max(dot(surfaceNormal, H), 0.0);
float VdotH = max(dot(viewDirection, H), 0.000001);
float LdotH = max(dot(lightDirection, H), 0.000001);
float G1 = (2.0 * NdotH * VdotN) / VdotH;
float G2 = (2.0 * NdotH * LdotN) / LdotH;
float G = min(1.0, min(G1, G2));
//Distribution term
float D = beckmannDistribution(NdotH, roughness);
//Fresnel term
float F = pow(1.0 - VdotN, fresnel);
//Multiply terms and done
return G * F * D / max(3.14159265 * VdotN, 0.000001);
}
//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 clipBounds[2];
uniform float roughness
, fresnel
, kambient
, kdiffuse
, kspecular;
uniform sampler2D texture;
varying vec3 f_normal
, f_lightDirection
, f_eyeDirection
, f_data;
varying vec4 f_color;
varying vec2 f_uv;
void main() {
if (f_color.a == 0.0 ||
outOfRange(clipBounds[0], clipBounds[1], f_data)
) discard;
vec3 N = normalize(f_normal);
vec3 L = normalize(f_lightDirection);
vec3 V = normalize(f_eyeDirection);
if(gl_FrontFacing) {
N = -N;
}
float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));
//float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d
float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);
vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);
vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);
gl_FragColor = litColor * f_color.a;
}
`]),c=s([`precision highp float;
#define GLSLIFY 1
attribute vec3 position;
attribute vec4 color;
attribute vec2 uv;
uniform mat4 model, view, projection;
varying vec4 f_color;
varying vec3 f_data;
varying vec2 f_uv;
void main() {
gl_Position = projection * (view * (model * vec4(position, 1.0)));
f_color = color;
f_data = position;
f_uv = uv;
}`]),f=s([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 clipBounds[2];
uniform sampler2D texture;
uniform float opacity;
varying vec4 f_color;
varying vec3 f_data;
varying vec2 f_uv;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;
gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;
}`]),h=s([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
attribute vec3 position;
attribute vec4 color;
attribute vec2 uv;
attribute float pointSize;
uniform mat4 model, view, projection;
uniform vec3 clipBounds[2];
varying vec4 f_color;
varying vec2 f_uv;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], position)) {
gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);
} else {
gl_Position = projection * (view * (model * vec4(position, 1.0)));
}
gl_PointSize = pointSize;
f_color = color;
f_uv = uv;
}`]),d=s([`precision highp float;
#define GLSLIFY 1
uniform sampler2D texture;
uniform float opacity;
varying vec4 f_color;
varying vec2 f_uv;
void main() {
vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);
if(dot(pointR, pointR) > 0.25) {
discard;
}
gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;
}`]),p=s([`precision highp float;
#define GLSLIFY 1
attribute vec3 position;
attribute vec4 id;
uniform mat4 model, view, projection;
varying vec3 f_position;
varying vec4 f_id;
void main() {
gl_Position = projection * (view * (model * vec4(position, 1.0)));
f_id = id;
f_position = position;
}`]),v=s([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
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);
}`]),m=s([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
attribute vec3 position;
attribute float pointSize;
attribute vec4 id;
uniform mat4 model, view, projection;
uniform vec3 clipBounds[2];
varying vec3 f_position;
varying vec4 f_id;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], position)) {
gl_Position = vec4(0.0, 0.0, 0.0, 0.0);
} else {
gl_Position = projection * (view * (model * vec4(position, 1.0)));
gl_PointSize = pointSize;
}
f_id = id;
f_position = position;
}`]),g=s([`precision highp float;
#define GLSLIFY 1
attribute vec3 position;
uniform mat4 model, view, projection;
void main() {
gl_Position = projection * (view * (model * vec4(position, 1.0)));
}`]),w=s([`precision highp float;
#define GLSLIFY 1
uniform vec3 contourColor;
void main() {
gl_FragColor = vec4(contourColor, 1.0);
}
`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},a.wireShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},a.pointShader={vertex:h,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},a.pickShader={vertex:p,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},a.pointPickShader={vertex:m,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},a.contourShader={vertex:g,fragment:w,attributes:[{name:"position",type:"vec3"}]}},7201(n,a,o){"use strict";var s=1e-6,l=1e-6,u=o(9405),c=o(2762),f=o(8116),h=o(7766),d=o(8406),p=o(6760),v=o(7608),m=o(9618),g=o(6729),w=o(7765),b=o(1888),_=o(840),M=o(7626),x=_.meshShader,T=_.wireShader,A=_.pointShader,y=_.pickShader,E=_.pointPickShader,S=_.contourShader,C=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(j,q,J,U,V,X,H,G,Q,te,ce,ge,Ce,be,he,oe,Ee,ye,ue,ee,ae,xe,re,pe,we,Fe,Se){this.gl=j,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=q,this.dirty=!0,this.triShader=J,this.lineShader=U,this.pointShader=V,this.pickShader=X,this.pointPickShader=H,this.contourShader=G,this.trianglePositions=Q,this.triangleColors=ce,this.triangleNormals=Ce,this.triangleUVs=ge,this.triangleIds=te,this.triangleVAO=be,this.triangleCount=0,this.lineWidth=1,this.edgePositions=he,this.edgeColors=Ee,this.edgeUVs=ye,this.edgeIds=oe,this.edgeVAO=ue,this.edgeCount=0,this.pointPositions=ee,this.pointColors=xe,this.pointUVs=re,this.pointSizes=pe,this.pointIds=ae,this.pointVAO=we,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Fe,this.contourVAO=Se,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=C,this._view=C,this._projection=C,this._resolution=[1,1]}var D=k.prototype;D.isOpaque=function(){return!this.hasAlpha},D.isTransparent=function(){return this.hasAlpha},D.pickSlots=1,D.setPickBase=function(j){this.pickId=j};function F(j,q){if(!q||!q.length)return 1;for(var J=0;J<q.length;++J){if(q.length<2)return 1;if(q[J][0]===j)return q[J][1];if(q[J][0]>j&&J>0){var U=(q[J][0]-j)/(q[J][0]-q[J-1][0]);return q[J][1]*(1-U)+U*q[J-1][1]}}return 1}function P(j,q){for(var J=g({colormap:j,nshades:256,format:"rgba"}),U=new Uint8Array(256*4),V=0;V<256;++V){for(var X=J[V],H=0;H<3;++H)U[4*V+H]=X[H];q?U[4*V+3]=255*F(V/255,q):U[4*V+3]=255*X[3]}return m(U,[256,256,4],[4,0,1])}function R(j){for(var q=j.length,J=new Array(q),U=0;U<q;++U)J[U]=j[U][2];return J}D.highlight=function(j){if(!j||!this.contourEnable){this.contourCount=0;return}for(var q=w(this.cells,this.intensity,j.intensity),J=q.cells,U=q.vertexIds,V=q.vertexWeights,X=J.length,H=b.mallocFloat32(6*X),G=0,Q=0;Q<X;++Q)for(var te=J[Q],ce=0;ce<2;++ce){var ge=te[0];te.length===2&&(ge=te[ce]);for(var Ce=U[ge][0],be=U[ge][1],he=V[ge],oe=1-he,Ee=this.positions[Ce],ye=this.positions[be],ue=0;ue<3;++ue)H[G++]=he*Ee[ue]+oe*ye[ue]}this.contourCount=G/3|0,this.contourPositions.update(H.subarray(0,G)),b.free(H)},D.update=function(j){j=j||{};var q=this.gl;this.dirty=!0,"contourEnable"in j&&(this.contourEnable=j.contourEnable),"contourColor"in j&&(this.contourColor=j.contourColor),"lineWidth"in j&&(this.lineWidth=j.lineWidth),"lightPosition"in j&&(this.lightPosition=j.lightPosition),this.hasAlpha=!1,"opacity"in j&&(this.opacity=j.opacity,this.opacity<1&&(this.hasAlpha=!0)),"opacityscale"in j&&(this.opacityscale=j.opacityscale,this.hasAlpha=!0),"ambient"in j&&(this.ambientLight=j.ambient),"diffuse"in j&&(this.diffuseLight=j.diffuse),"specular"in j&&(this.specularLight=j.specular),"roughness"in j&&(this.roughness=j.roughness),"fresnel"in j&&(this.fresnel=j.fresnel),j.texture?(this.texture.dispose(),this.texture=h(q,j.texture)):j.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=q.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=q.LINEAR,this.texture.setPixels(P(j.colormap,this.opacityscale)),this.texture.generateMipmap());var J=j.cells,U=j.positions;if(!(!U||!J)){var V=[],X=[],H=[],G=[],Q=[],te=[],ce=[],ge=[],Ce=[],be=[],he=[],oe=[],Ee=[],ye=[];this.cells=J,this.positions=U;var ue=j.vertexNormals,ee=j.cellNormals,ae=j.vertexNormalsEpsilon===void 0?s:j.vertexNormalsEpsilon,xe=j.faceNormalsEpsilon===void 0?l:j.faceNormalsEpsilon;j.useFacetNormals&&!ee&&(ee=d.faceNormals(J,U,xe)),!ee&&!ue&&(ue=d.vertexNormals(J,U,ae));var re=j.vertexColors,pe=j.cellColors,we=j.meshColor||[1,1,1,1],Fe=j.vertexUVs,Se=j.vertexIntensity,ke=j.cellUVs,_e=j.cellIntensity,Ie=1/0,Oe=-1/0;if(!Fe&&!ke)if(Se)if(j.vertexIntensityBounds)Ie=+j.vertexIntensityBounds[0],Oe=+j.vertexIntensityBounds[1];else for(var Qe=0;Qe<Se.length;++Qe){var et=Se[Qe];Ie=Math.min(Ie,et),Oe=Math.max(Oe,et)}else if(_e)if(j.cellIntensityBounds)Ie=+j.cellIntensityBounds[0],Oe=+j.cellIntensityBounds[1];else for(var Qe=0;Qe<_e.length;++Qe){var et=_e[Qe];Ie=Math.min(Ie,et),Oe=Math.max(Oe,et)}else for(var Qe=0;Qe<U.length;++Qe){var et=U[Qe][2];Ie=Math.min(Ie,et),Oe=Math.max(Oe,et)}Se?this.intensity=Se:_e?this.intensity=_e:this.intensity=R(U),this.pickVertex=!(_e||pe);var _t=j.pointSizes,ut=j.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var Qe=0;Qe<U.length;++Qe)for(var vt=U[Qe],Xe=0;Xe<3;++Xe)isNaN(vt[Xe])||!isFinite(vt[Xe])||(this.bounds[0][Xe]=Math.min(this.bounds[0][Xe],vt[Xe]),this.bounds[1][Xe]=Math.max(this.bounds[1][Xe],vt[Xe]));var mt=0,bt=0,Ne=0;e:for(var Qe=0;Qe<J.length;++Qe){var Ue=J[Qe];switch(Ue.length){case 1:for(var Ge=Ue[0],vt=U[Ge],Xe=0;Xe<3;++Xe)if(isNaN(vt[Xe])||!isFinite(vt[Xe]))continue e;be.push(vt[0],vt[1],vt[2]);var je;re?je=re[Ge]:pe?je=pe[Qe]:je=we,this.opacityscale&&Se?X.push(je[0],je[1],je[2],this.opacity*F((Se[Ge]-Ie)/(Oe-Ie),this.opacityscale)):je.length===3?he.push(je[0],je[1],je[2],this.opacity):(he.push(je[0],je[1],je[2],je[3]*this.opacity),je[3]<1&&(this.hasAlpha=!0));var Re;Fe?Re=Fe[Ge]:Se?Re=[(Se[Ge]-Ie)/(Oe-Ie),0]:ke?Re=ke[Qe]:_e?Re=[(_e[Qe]-Ie)/(Oe-Ie),0]:Re=[(vt[2]-Ie)/(Oe-Ie),0],oe.push(Re[0],Re[1]),_t?Ee.push(_t[Ge]):Ee.push(ut),ye.push(Qe),Ne+=1;break;case 2:for(var Xe=0;Xe<2;++Xe)for(var Ge=Ue[Xe],vt=U[Ge],Ve=0;Ve<3;++Ve)if(isNaN(vt[Ve])||!isFinite(vt[Ve]))continue e;for(var Xe=0;Xe<2;++Xe){var Ge=Ue[Xe],vt=U[Ge];te.push(vt[0],vt[1],vt[2]);var je;re?je=re[Ge]:pe?je=pe[Qe]:je=we,this.opacityscale&&Se?X.push(je[0],je[1],je[2],this.opacity*F((Se[Ge]-Ie)/(Oe-Ie),this.opacityscale)):je.length===3?ce.push(je[0],je[1],je[2],this.opacity):(ce.push(je[0],je[1],je[2],je[3]*this.opacity),je[3]<1&&(this.hasAlpha=!0));var Re;Fe?Re=Fe[Ge]:Se?Re=[(Se[Ge]-Ie)/(Oe-Ie),0]:ke?Re=ke[Qe]:_e?Re=[(_e[Qe]-Ie)/(Oe-Ie),0]:Re=[(vt[2]-Ie)/(Oe-Ie),0],ge.push(Re[0],Re[1]),Ce.push(Qe)}bt+=1;break;case 3:for(var Xe=0;Xe<3;++Xe)for(var Ge=Ue[Xe],vt=U[Ge],Ve=0;Ve<3;++Ve)if(isNaN(vt[Ve])||!isFinite(vt[Ve]))continue e;for(var Xe=0;Xe<3;++Xe){var Ge=Ue[2-Xe],vt=U[Ge];V.push(vt[0],vt[1],vt[2]);var je;re?je=re[Ge]:pe?je=pe[Qe]:je=we,je?this.opacityscale&&Se?X.push(je[0],je[1],je[2],this.opacity*F((Se[Ge]-Ie)/(Oe-Ie),this.opacityscale)):je.length===3?X.push(je[0],je[1],je[2],this.opacity):(X.push(je[0],je[1],je[2],je[3]*this.opacity),je[3]<1&&(this.hasAlpha=!0)):X.push(.5,.5,.5,1);var Re;Fe?Re=Fe[Ge]:Se?Re=[(Se[Ge]-Ie)/(Oe-Ie),0]:ke?Re=ke[Qe]:_e?Re=[(_e[Qe]-Ie)/(Oe-Ie),0]:Re=[(vt[2]-Ie)/(Oe-Ie),0],G.push(Re[0],Re[1]);var ct;ue?ct=ue[Ge]:ct=ee[Qe],H.push(ct[0],ct[1],ct[2]),Q.push(Qe)}mt+=1;break;default:break}}this.pointCount=Ne,this.edgeCount=bt,this.triangleCount=mt,this.pointPositions.update(be),this.pointColors.update(he),this.pointUVs.update(oe),this.pointSizes.update(Ee),this.pointIds.update(new Uint32Array(ye)),this.edgePositions.update(te),this.edgeColors.update(ce),this.edgeUVs.update(ge),this.edgeIds.update(new Uint32Array(Ce)),this.trianglePositions.update(V),this.triangleColors.update(X),this.triangleUVs.update(G),this.triangleNormals.update(H),this.triangleIds.update(new Uint32Array(Q))}},D.drawTransparent=D.draw=function(j){j=j||{};for(var q=this.gl,J=j.model||C,U=j.view||C,V=j.projection||C,X=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],H=0;H<3;++H)X[0][H]=Math.max(X[0][H],this.clipBounds[0][H]),X[1][H]=Math.min(X[1][H],this.clipBounds[1][H]);var G={model:J,view:U,projection:V,inverseModel:C.slice(),clipBounds:X,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],contourColor:this.contourColor,texture:0};G.inverseModel=v(G.inverseModel,G.model),q.disable(q.CULL_FACE),this.texture.bind(0);var Q=new Array(16);p(Q,G.view,G.model),p(Q,G.projection,Q),v(Q,Q);for(var H=0;H<3;++H)G.eyePosition[H]=Q[12+H]/Q[15];for(var te=Q[15],H=0;H<3;++H)te+=this.lightPosition[H]*Q[4*H+3];for(var H=0;H<3;++H){for(var ce=Q[12+H],ge=0;ge<3;++ge)ce+=Q[4*ge+H]*this.lightPosition[ge];G.lightPosition[H]=ce/te}if(this.triangleCount>0){var Ce=this.triShader;Ce.bind(),Ce.uniforms=G,this.triangleVAO.bind(),q.drawArrays(q.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Ce=this.lineShader;Ce.bind(),Ce.uniforms=G,this.edgeVAO.bind(),q.lineWidth(this.lineWidth*this.pixelRatio),q.drawArrays(q.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Ce=this.pointShader;Ce.bind(),Ce.uniforms=G,this.pointVAO.bind(),q.drawArrays(q.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Ce=this.contourShader;Ce.bind(),Ce.uniforms=G,this.contourVAO.bind(),q.drawArrays(q.LINES,0,this.contourCount),this.contourVAO.unbind()}},D.drawPick=function(j){j=j||{};for(var q=this.gl,J=j.model||C,U=j.view||C,V=j.projection||C,X=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],H=0;H<3;++H)X[0][H]=Math.max(X[0][H],this.clipBounds[0][H]),X[1][H]=Math.min(X[1][H],this.clipBounds[1][H]);this._model=[].slice.call(J),this._view=[].slice.call(U),this._projection=[].slice.call(V),this._resolution=[q.drawingBufferWidth,q.drawingBufferHeight];var G={model:J,view:U,projection:V,clipBounds:X,pickId:this.pickId/255},Q=this.pickShader;if(Q.bind(),Q.uniforms=G,this.triangleCount>0&&(this.triangleVAO.bind(),q.drawArrays(q.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),q.lineWidth(this.lineWidth*this.pixelRatio),q.drawArrays(q.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Q=this.pointPickShader;Q.bind(),Q.uniforms=G,this.pointVAO.bind(),q.drawArrays(q.POINTS,0,this.pointCount),this.pointVAO.unbind()}},D.pick=function(j){if(!j||j.id!==this.pickId)return null;for(var q=j.value[0]+256*j.value[1]+65536*j.value[2],J=this.cells[q],U=this.positions,V=new Array(J.length),X=0;X<J.length;++X)V[X]=U[J[X]];var H=j.coord[0],G=j.coord[1];if(!this.pickVertex){var Q=this.positions[J[0]],te=this.positions[J[1]],ce=this.positions[J[2]],ge=[(Q[0]+te[0]+ce[0])/3,(Q[1]+te[1]+ce[1])/3,(Q[2]+te[2]+ce[2])/3];return{_cellCenter:!0,position:[H,G],index:q,cell:J,cellId:q,intensity:this.intensity[q],dataCoordinate:ge}}var Ce=M(V,[H*this.pixelRatio,this._resolution[1]-G*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!Ce)return null;for(var be=Ce[2],he=0,X=0;X<J.length;++X)he+=be[X]*this.intensity[J[X]];return{position:Ce[1],index:J[Ce[0]],cell:J,cellId:q,intensity:he,dataCoordinate:this.positions[J[Ce[0]]]}},D.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 L(j){var q=u(j,x.vertex,x.fragment);return q.attributes.position.location=0,q.attributes.color.location=2,q.attributes.uv.location=3,q.attributes.normal.location=4,q}function I(j){var q=u(j,T.vertex,T.fragment);return q.attributes.position.location=0,q.attributes.color.location=2,q.attributes.uv.location=3,q}function B(j){var q=u(j,A.vertex,A.fragment);return q.attributes.position.location=0,q.attributes.color.location=2,q.attributes.uv.location=3,q.attributes.pointSize.location=4,q}function O(j){var q=u(j,y.vertex,y.fragment);return q.attributes.position.location=0,q.attributes.id.location=1,q}function $(j){var q=u(j,E.vertex,E.fragment);return q.attributes.position.location=0,q.attributes.id.location=1,q.attributes.pointSize.location=4,q}function Y(j){var q=u(j,S.vertex,S.fragment);return q.attributes.position.location=0,q}function K(j,q){arguments.length===1&&(q=j,j=q.gl);var J=j.getExtension("OES_standard_derivatives")||j.getExtension("MOZ_OES_standard_derivatives")||j.getExtension("WEBKIT_OES_standard_derivatives");if(!J)throw new Error("derivatives not supported");var U=L(j),V=I(j),X=B(j),H=O(j),G=$(j),Q=Y(j),te=h(j,m(new Uint8Array([255,255,255,255]),[1,1,4]));te.generateMipmap(),te.minFilter=j.LINEAR_MIPMAP_LINEAR,te.magFilter=j.LINEAR;var ce=c(j),ge=c(j),Ce=c(j),be=c(j),he=c(j),oe=f(j,[{buffer:ce,type:j.FLOAT,size:3},{buffer:he,type:j.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:ge,type:j.FLOAT,size:4},{buffer:Ce,type:j.FLOAT,size:2},{buffer:be,type:j.FLOAT,size:3}]),Ee=c(j),ye=c(j),ue=c(j),ee=c(j),ae=f(j,[{buffer:Ee,type:j.FLOAT,size:3},{buffer:ee,type:j.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:ye,type:j.FLOAT,size:4},{buffer:ue,type:j.FLOAT,size:2}]),xe=c(j),re=c(j),pe=c(j),we=c(j),Fe=c(j),Se=f(j,[{buffer:xe,type:j.FLOAT,size:3},{buffer:Fe,type:j.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:re,type:j.FLOAT,size:4},{buffer:pe,type:j.FLOAT,size:2},{buffer:we,type:j.FLOAT,size:1}]),ke=c(j),_e=f(j,[{buffer:ke,type:j.FLOAT,size:3}]),Ie=new k(j,te,U,V,X,H,G,Q,ce,he,ge,Ce,be,oe,Ee,ee,ye,ue,ae,xe,Fe,re,pe,we,Se,ke,_e);return Ie.update(q),Ie}n.exports=K},4437(n,a,o){"use strict";n.exports=d;var s=o(3025),l=o(6296),u=o(351),c=o(8512),f=o(24),h=o(7520);function d(p,v){p=p||document.body,v=v||{};var m=[.01,1/0];"distanceLimits"in v&&(m[0]=v.distanceLimits[0],m[1]=v.distanceLimits[1]),"zoomMin"in v&&(m[0]=v.zoomMin),"zoomMax"in v&&(m[1]=v.zoomMax);var g=l({center:v.center||[0,0,0],up:v.up||[0,1,0],eye:v.eye||[0,0,10],mode:v.mode||"orbit",distanceLimits:m}),w=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b=0,_=p.clientWidth,M=p.clientHeight,x={keyBindingMode:"rotate",enableWheel:!0,view:g,element:p,delay:v.delay||16,rotateSpeed:v.rotateSpeed||1,zoomSpeed:v.zoomSpeed||1,translateSpeed:v.translateSpeed||1,flipX:!!v.flipX,flipY:!!v.flipY,modes:g.modes,_ortho:v._ortho||v.projection&&v.projection.type==="orthographic"||!1,tick:function(){var T=s(),A=this.delay,y=T-2*A;g.idle(T-A),g.recalcMatrix(y),g.flush(T-(100+A*2));for(var E=!0,S=g.computedMatrix,C=0;C<16;++C)E=E&&w[C]===S[C],w[C]=S[C];var k=p.clientWidth===_&&p.clientHeight===M;return _=p.clientWidth,M=p.clientHeight,E?!k:(b=Math.exp(g.computedRadius[0]),!0)},lookAt:function(T,A,y){g.lookAt(g.lastT(),T,A,y)},rotate:function(T,A,y){g.rotate(g.lastT(),T,A,y)},pan:function(T,A,y){g.pan(g.lastT(),T,A,y)},translate:function(T,A,y){g.translate(g.lastT(),T,A,y)}};return Object.defineProperties(x,{matrix:{get:function(){return g.computedMatrix},set:function(T){return g.setMatrix(g.lastT(),T),g.computedMatrix},enumerable:!0},mode:{get:function(){return g.getMode()},set:function(T){var A=g.computedUp.slice(),y=g.computedEye.slice(),E=g.computedCenter.slice();if(g.setMode(T),T==="turntable"){var S=s();g._active.lookAt(S,y,E,A),g._active.lookAt(S+500,y,E,[0,0,1]),g._active.flush(S)}return g.getMode()},enumerable:!0},center:{get:function(){return g.computedCenter},set:function(T){return g.lookAt(g.lastT(),null,T),g.computedCenter},enumerable:!0},eye:{get:function(){return g.computedEye},set:function(T){return g.lookAt(g.lastT(),T),g.computedEye},enumerable:!0},up:{get:function(){return g.computedUp},set:function(T){return g.lookAt(g.lastT(),null,null,T),g.computedUp},enumerable:!0},distance:{get:function(){return b},set:function(T){return g.setDistance(g.lastT(),T),T},enumerable:!0},distanceLimits:{get:function(){return g.getDistanceLimits(m)},set:function(T){return g.setDistanceLimits(T),T},enumerable:!0}}),p.addEventListener("contextmenu",function(T){return T.preventDefault(),!1}),x._lastX=-1,x._lastY=-1,x._lastMods={shift:!1,control:!1,alt:!1,meta:!1},x.enableMouseListeners=function(){x.mouseListener=u(p,T),p.addEventListener("touchstart",function(A){var y=f(A.changedTouches[0],p);T(0,y[0],y[1],x._lastMods),T(1,y[0],y[1],x._lastMods)},h?{passive:!0}:!1),p.addEventListener("touchmove",function(A){var y=f(A.changedTouches[0],p);T(1,y[0],y[1],x._lastMods),A.preventDefault()},h?{passive:!1}:!1),p.addEventListener("touchend",function(A){T(0,x._lastX,x._lastY,x._lastMods)},h?{passive:!0}:!1);function T(A,y,E,S){var C=x.keyBindingMode;if(C!==!1){var k=C==="rotate",D=C==="pan",F=C==="zoom",P=!!S.control,R=!!S.alt,L=!!S.shift,I=!!(A&1),B=!!(A&2),O=!!(A&4),$=1/p.clientHeight,Y=$*(y-x._lastX),K=$*(E-x._lastY),j=x.flipX?1:-1,q=x.flipY?1:-1,J=Math.PI*x.rotateSpeed,U=s();if(x._lastX!==-1&&x._lastY!==-1&&((k&&I&&!P&&!R&&!L||I&&!P&&!R&&L)&&g.rotate(U,j*J*Y,-q*J*K,0),(D&&I&&!P&&!R&&!L||B||I&&P&&!R&&!L)&&g.pan(U,-x.translateSpeed*Y*b,x.translateSpeed*K*b,0),F&&I&&!P&&!R&&!L||O||I&&!P&&R&&!L)){var V=-x.zoomSpeed*K/window.innerHeight*(U-g.lastT())*100;g.pan(U,0,0,b*(Math.exp(V)-1))}return x._lastX=y,x._lastY=E,x._lastMods=S,!0}}x.wheelListener=c(p,function(A,y){if(x.keyBindingMode!==!1&&x.enableWheel){var E=x.flipX?1:-1,S=x.flipY?1:-1,C=s();if(Math.abs(A)>Math.abs(y))g.rotate(C,0,0,-A*E*Math.PI*x.rotateSpeed/window.innerWidth);else if(!x._ortho){var k=-x.zoomSpeed*S*y/window.innerHeight*(C-g.lastT())/20;g.pan(C,0,0,b*(Math.exp(k)-1))}}},!0)},x.enableMouseListeners(),x}},799(n,a,o){var s=o(3236),l=o(9405),u=s([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
varying vec2 uv;
void main() {
uv = position;
gl_Position = vec4(position, 0, 1);
}`]),c=s([`precision mediump float;
#define GLSLIFY 1
uniform sampler2D accumBuffer;
varying vec2 uv;
void main() {
vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));
gl_FragColor = min(vec4(1,1,1,1), accum);
}`]);n.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec2"}])}},4100(n,a,o){"use strict";var s=o(4437),l=o(3837),u=o(5445),c=o(4449),f=o(3589),h=o(2260),d=o(7169),p=o(351),v=o(4772),m=o(4040),g=o(799),w=o(2431)({tablet:!0,featureDetect:!0});n.exports={createScene:T,createCamera:s};function b(){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 _(y,E){var S=null;try{S=y.getContext("webgl",E),S||(S=y.getContext("experimental-webgl",E))}catch(C){return null}return S}function M(y){var E=Math.round(Math.log(Math.abs(y))/Math.log(10));if(E<0){var S=Math.round(Math.pow(10,-E));return Math.ceil(y*S)/S}else if(E>0){var S=Math.round(Math.pow(10,E));return Math.ceil(y/S)*S}return Math.ceil(y)}function x(y){return typeof y=="boolean"?y:!0}function T(y){y=y||{},y.camera=y.camera||{};var E=y.canvas;if(!E)if(E=document.createElement("canvas"),y.container){var S=y.container;S.appendChild(E)}else document.body.appendChild(E);var C=y.gl;if(C||(y.glOptions&&(w=!!y.glOptions.preserveDrawingBuffer),C=_(E,y.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:w})),!C)throw new Error("webgl not supported");var k=y.bounds||[[-10,-10,-10],[10,10,10]],D=new b,F=h(C,C.drawingBufferWidth,C.drawingBufferHeight,{preferFloat:!w}),P=g(C),R=y.cameraObject&&y.cameraObject._ortho===!0||y.camera.projection&&y.camera.projection.type==="orthographic"||!1,L={eye:y.camera.eye||[2,0,0],center:y.camera.center||[0,0,0],up:y.camera.up||[0,1,0],zoomMin:y.camera.zoomMax||.1,zoomMax:y.camera.zoomMin||100,mode:y.camera.mode||"turntable",_ortho:R},I=y.axes||{},B=l(C,I);B.enable=!I.disable;var O=y.spikes||{},$=c(C,O),Y=[],K=[],j=[],q=[],J=!0,H=!0,U=new Array(16),V=new Array(16),X={view:null,projection:U,model:V,_ortho:!1},H=!0,G=[C.drawingBufferWidth,C.drawingBufferHeight],Q=y.cameraObject||s(E,L),te={gl:C,contextLost:!1,pixelRatio:y.pixelRatio||1,canvas:E,selection:D,camera:Q,axes:B,axesPixels:null,spikes:$,bounds:k,objects:Y,shape:G,aspect:y.aspectRatio||[1,1,1],pickRadius:y.pickRadius||10,zNear:y.zNear||.01,zFar:y.zFar||1e3,fovy:y.fovy||Math.PI/4,clearColor:y.clearColor||[0,0,0,0],autoResize:x(y.autoResize),autoBounds:x(y.autoBounds),autoScale:!!y.autoScale,autoCenter:x(y.autoCenter),clipToBounds:x(y.clipToBounds),snapToData:!!y.snapToData,onselect:y.onselect||null,onrender:y.onrender||null,onclick:y.onclick||null,cameraParams:X,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(ee){this.aspect[0]=ee.x,this.aspect[1]=ee.y,this.aspect[2]=ee.z,H=!0},setBounds:function(ee,ae){this.bounds[0][ee]=ae.min,this.bounds[1][ee]=ae.max},setClearColor:function(ee){this.clearColor=ee},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=[C.drawingBufferWidth/te.pixelRatio|0,C.drawingBufferHeight/te.pixelRatio|0];function ge(){if(!te._stopped&&te.autoResize){var ee=E.parentNode,ae=1,xe=1;ee&&ee!==document.body?(ae=ee.clientWidth,xe=ee.clientHeight):(ae=window.innerWidth,xe=window.innerHeight);var re=Math.ceil(ae*te.pixelRatio)|0,pe=Math.ceil(xe*te.pixelRatio)|0;if(re!==E.width||pe!==E.height){E.width=re,E.height=pe;var we=E.style;we.position=we.position||"absolute",we.left="0px",we.top="0px",we.width=ae+"px",we.height=xe+"px",J=!0}}}te.autoResize&&ge(),window.addEventListener("resize",ge);function Ce(){for(var ee=Y.length,ae=q.length,xe=0;xe<ae;++xe)j[xe]=0;e:for(var xe=0;xe<ee;++xe){var re=Y[xe],pe=re.pickSlots;if(!pe){K[xe]=-1;continue}for(var we=0;we<ae;++we)if(j[we]+pe<255){K[xe]=we,re.setPickBase(j[we]+1),j[we]+=pe;continue e}var Fe=f(C,G);K[xe]=ae,q.push(Fe),j.push(pe),re.setPickBase(1),ae+=1}for(;ae>0&&j[ae-1]===0;)j.pop(),q.pop().dispose()}te.update=function(ee){te._stopped||(ee=ee||{},J=!0,H=!0)},te.add=function(ee){te._stopped||(ee.axes=B,Y.push(ee),K.push(-1),J=!0,H=!0,Ce())},te.remove=function(ee){if(!te._stopped){var ae=Y.indexOf(ee);ae<0||(Y.splice(ae,1),K.pop(),J=!0,H=!0,Ce())}},te.dispose=function(){if(!te._stopped&&(te._stopped=!0,window.removeEventListener("resize",ge),E.removeEventListener("webglcontextlost",be),te.mouseListener.enabled=!1,!te.contextLost)){B.dispose(),$.dispose();for(var ee=0;ee<Y.length;++ee)Y[ee].dispose();F.dispose();for(var ee=0;ee<q.length;++ee)q[ee].dispose();P.dispose(),C=null,B=null,$=null,Y=[]}},te._mouseRotating=!1,te._prevButtons=0,te.enableMouseListeners=function(){te.mouseListener=p(E,function(ee,ae,xe){if(!te._stopped){var re=q.length,pe=Y.length,we=D.object;D.distance=1/0,D.mouse[0]=ae,D.mouse[1]=xe,D.object=null,D.screen=null,D.dataCoordinate=D.dataPosition=null;var Fe=!1;if(ee&&te._prevButtons)te._mouseRotating=!0;else{te._mouseRotating&&(H=!0),te._mouseRotating=!1;for(var Se=0;Se<re;++Se){var ke=q[Se].query(ae,ce[1]-xe-1,te.pickRadius);if(ke){if(ke.distance>D.distance)continue;for(var _e=0;_e<pe;++_e){var Ie=Y[_e];if(K[_e]===Se){var Oe=Ie.pick(ke);Oe&&(D.buttons=ee,D.screen=ke.coord,D.distance=ke.distance,D.object=Ie,D.index=Oe.distance,D.dataPosition=Oe.position,D.dataCoordinate=Oe.dataCoordinate,D.data=Oe,Fe=!0)}}}}}we&&we!==D.object&&(we.highlight&&we.highlight(null),J=!0),D.object&&(D.object.highlight&&D.object.highlight(D.data),J=!0),Fe=Fe||D.object!==we,Fe&&te.onselect&&te.onselect(D),ee&1&&!(te._prevButtons&1)&&te.onclick&&te.onclick(D),te._prevButtons=ee}})};function be(){if(te.contextLost)return!0;C.isContextLost()&&(te.contextLost=!0,te.mouseListener.enabled=!1,te.selection.object=null,te.oncontextloss&&te.oncontextloss())}E.addEventListener("webglcontextlost",be);function he(){if(!be()){C.colorMask(!0,!0,!0,!0),C.depthMask(!0),C.disable(C.BLEND),C.enable(C.DEPTH_TEST),C.depthFunc(C.LEQUAL);for(var ee=Y.length,ae=q.length,xe=0;xe<ae;++xe){var re=q[xe];re.shape=ce,re.begin();for(var pe=0;pe<ee;++pe)if(K[pe]===xe){var we=Y[pe];we.drawPick&&(we.pixelRatio=1,we.drawPick(X))}re.end()}}}var oe=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],Ee=[oe[0].slice(),oe[1].slice()];function ye(){if(!be()){ge();var ee=te.camera.tick();X.view=te.camera.matrix,J=J||ee,H=H||ee,B.pixelRatio=te.pixelRatio,$.pixelRatio=te.pixelRatio;var ae=Y.length,xe=oe[0],re=oe[1];xe[0]=xe[1]=xe[2]=1/0,re[0]=re[1]=re[2]=-1/0;for(var pe=0;pe<ae;++pe){var we=Y[pe];we.pixelRatio=te.pixelRatio,we.axes=te.axes,J=J||!!we.dirty,H=H||!!we.dirty;var Fe=we.bounds;if(Fe)for(var Se=Fe[0],ke=Fe[1],_e=0;_e<3;++_e)xe[_e]=Math.min(xe[_e],Se[_e]),re[_e]=Math.max(re[_e],ke[_e])}var Ie=te.bounds;if(te.autoBounds)for(var _e=0;_e<3;++_e){if(re[_e]<xe[_e])xe[_e]=-1,re[_e]=1;else{xe[_e]===re[_e]&&(xe[_e]-=1,re[_e]+=1);var Oe=.05*(re[_e]-xe[_e]);xe[_e]=xe[_e]-Oe,re[_e]=re[_e]+Oe}Ie[0][_e]=xe[_e],Ie[1][_e]=re[_e]}for(var Qe=!1,_e=0;_e<3;++_e)Qe=Qe||Ee[0][_e]!==Ie[0][_e]||Ee[1][_e]!==Ie[1][_e],Ee[0][_e]=Ie[0][_e],Ee[1][_e]=Ie[1][_e];if(H=H||Qe,J=J||Qe,!!J){if(Qe){for(var et=[0,0,0],pe=0;pe<3;++pe)et[pe]=M((Ie[1][pe]-Ie[0][pe])/10);B.autoTicks?B.update({bounds:Ie,tickSpacing:et}):B.update({bounds:Ie})}var _t=C.drawingBufferWidth,ut=C.drawingBufferHeight;G[0]=_t,G[1]=ut,ce[0]=Math.max(_t/te.pixelRatio,1)|0,ce[1]=Math.max(ut/te.pixelRatio,1)|0,A(te,R);for(var pe=0;pe<ae;++pe){var we=Y[pe];we.axesBounds=Ie,te.clipToBounds&&(we.clipBounds=Ie)}D.object&&(te.snapToData?$.position=D.dataCoordinate:$.position=D.dataPosition,$.bounds=Ie),H&&(H=!1,he()),te.axesPixels=u(te.axes,X,_t,ut),te.onrender&&te.onrender(),C.bindFramebuffer(C.FRAMEBUFFER,null),C.viewport(0,0,_t,ut),te.clearRGBA(),C.depthMask(!0),C.colorMask(!0,!0,!0,!0),C.enable(C.DEPTH_TEST),C.depthFunc(C.LEQUAL),C.disable(C.BLEND),C.disable(C.CULL_FACE);var vt=!1;B.enable&&(vt=vt||B.isTransparent(),B.draw(X)),$.axes=B,D.object&&$.draw(X),C.disable(C.CULL_FACE);for(var pe=0;pe<ae;++pe){var we=Y[pe];we.axes=B,we.pixelRatio=te.pixelRatio,we.isOpaque&&we.isOpaque()&&we.draw(X),we.isTransparent&&we.isTransparent()&&(vt=!0)}if(vt){F.shape=G,F.bind(),C.clear(C.DEPTH_BUFFER_BIT),C.colorMask(!1,!1,!1,!1),C.depthMask(!0),C.depthFunc(C.LESS),B.enable&&B.isTransparent()&&B.drawTransparent(X);for(var pe=0;pe<ae;++pe){var we=Y[pe];we.isOpaque&&we.isOpaque()&&we.draw(X)}C.enable(C.BLEND),C.blendEquation(C.FUNC_ADD),C.blendFunc(C.ONE,C.ONE_MINUS_SRC_ALPHA),C.colorMask(!0,!0,!0,!0),C.depthMask(!1),C.clearColor(0,0,0,0),C.clear(C.COLOR_BUFFER_BIT),B.isTransparent()&&B.drawTransparent(X);for(var pe=0;pe<ae;++pe){var we=Y[pe];we.isTransparent&&we.isTransparent()&&we.drawTransparent(X)}C.bindFramebuffer(C.FRAMEBUFFER,null),C.blendFunc(C.ONE,C.ONE_MINUS_SRC_ALPHA),C.disable(C.DEPTH_TEST),P.bind(),F.color[0].bind(0),P.uniforms.accumBuffer=0,d(C),C.disable(C.BLEND)}J=!1;for(var pe=0;pe<ae;++pe)Y[pe].dirty=!1}}}function ue(){te._stopped||te.contextLost||(ye(),requestAnimationFrame(ue))}return te.enableMouseListeners(),ue(),te.redraw=function(){te._stopped||(J=!0,ye())},te}function A(y,E){var S=y.bounds,C=y.cameraParams,k=C.projection,D=C.model,F=y.gl.drawingBufferWidth,P=y.gl.drawingBufferHeight,R=y.zNear,L=y.zFar,I=y.fovy,B=F/P;E?(m(k,-B,B,-1,1,R,L),C._ortho=!0):(v(k,I,B,R,L),C._ortho=!1);for(var O=0;O<16;++O)D[O]=0;D[15]=1;for(var $=0,O=0;O<3;++O)$=Math.max($,S[1][O]-S[0][O]);for(var O=0;O<3;++O)y.autoScale?D[5*O]=y.aspect[O]/(S[1][O]-S[0][O]):D[5*O]=1/$,y.autoCenter&&(D[12+O]=-D[5*O]*.5*(S[0][O]+S[1][O]))}},783(n){n.exports=a;function a(o,s,l,u){var c=s[0],f=s[1],h=s[2],d=s[3],p=l[0],v=l[1],m=l[2],g=l[3],w,b,_,M,x;return b=c*p+f*v+h*m+d*g,b<0&&(b=-b,p=-p,v=-v,m=-m,g=-g),1-b>1e-6?(w=Math.acos(b),_=Math.sin(w),M=Math.sin((1-u)*w)/_,x=Math.sin(u*w)/_):(M=1-u,x=u),o[0]=M*c+x*p,o[1]=M*f+x*v,o[2]=M*h+x*m,o[3]=M*d+x*g,o}},5964(n){"use strict";n.exports=function(a){return!a&&a!==0?"":a.toString()}},9366(n,a,o){"use strict";var s=o(4359);n.exports=u;var l={};function u(c,f,h){var d=[f.style,f.weight,f.variant,f.family].join("_"),p=l[d];if(p||(p=l[d]={}),c in p)return p[c];var v={textAlign:"center",textBaseline:"middle",lineHeight:1,font:f.family,fontStyle:f.style,fontWeight:f.weight,fontVariant:f.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};v.triangles=!0;var m=s(c,v);v.triangles=!1;var g=s(c,v),w,b;if(h&&h!==1){for(w=0;w<m.positions.length;++w)for(b=0;b<m.positions[w].length;++b)m.positions[w][b]/=h;for(w=0;w<g.positions.length;++w)for(b=0;b<g.positions[w].length;++b)g.positions[w][b]/=h}var _=[[1/0,1/0],[-1/0,-1/0]],M=g.positions.length;for(w=0;w<M;++w){var x=g.positions[w];for(b=0;b<2;++b)_[0][b]=Math.min(_[0][b],x[b]),_[1][b]=Math.max(_[1][b],x[b])}return p[c]=[m,g,_]}},1283(n,a,o){var s=o(9405),l=o(3236),u=l([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
attribute vec3 position;
attribute vec4 color;
attribute vec2 glyph;
attribute vec4 id;
uniform vec4 highlightId;
uniform float highlightScale;
uniform mat4 model, view, projection;
uniform vec3 clipBounds[2];
varying vec4 interpColor;
varying vec4 pickId;
varying vec3 dataCoordinate;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], position)) {
gl_Position = vec4(0,0,0,0);
} else {
float scale = 1.0;
if(distance(highlightId, id) < 0.0001) {
scale = highlightScale;
}
vec4 worldPosition = model * vec4(position, 1);
vec4 viewPosition = view * worldPosition;
viewPosition = viewPosition / viewPosition.w;
vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));
gl_Position = clipPosition;
interpColor = color;
pickId = id;
dataCoordinate = position;
}
}`]),c=l([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
attribute vec3 position;
attribute vec4 color;
attribute vec2 glyph;
attribute vec4 id;
uniform mat4 model, view, projection;
uniform vec2 screenSize;
uniform vec3 clipBounds[2];
uniform float highlightScale, pixelRatio;
uniform vec4 highlightId;
varying vec4 interpColor;
varying vec4 pickId;
varying vec3 dataCoordinate;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], position)) {
gl_Position = vec4(0,0,0,0);
} else {
float scale = pixelRatio;
if(distance(highlightId.bgr, id.bgr) < 0.001) {
scale *= highlightScale;
}
vec4 worldPosition = model * vec4(position, 1.0);
vec4 viewPosition = view * worldPosition;
vec4 clipPosition = projection * viewPosition;
clipPosition /= clipPosition.w;
gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);
interpColor = color;
pickId = id;
dataCoordinate = position;
}
}`]),f=l([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
attribute vec3 position;
attribute vec4 color;
attribute vec2 glyph;
attribute vec4 id;
uniform float highlightScale;
uniform vec4 highlightId;
uniform vec3 axes[2];
uniform mat4 model, view, projection;
uniform vec2 screenSize;
uniform vec3 clipBounds[2];
uniform float scale, pixelRatio;
varying vec4 interpColor;
varying vec4 pickId;
varying vec3 dataCoordinate;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], position)) {
gl_Position = vec4(0,0,0,0);
} else {
float lscale = pixelRatio * scale;
if(distance(highlightId, id) < 0.0001) {
lscale *= highlightScale;
}
vec4 clipCenter = projection * (view * (model * vec4(position, 1)));
vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;
vec4 clipPosition = projection * (view * (model * vec4(dataPosition, 1)));
gl_Position = clipPosition;
interpColor = color;
pickId = id;
dataCoordinate = dataPosition;
}
}
`]),h=l([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 fragClipBounds[2];
uniform float opacity;
varying vec4 interpColor;
varying vec3 dataCoordinate;
void main() {
if (
outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||
interpColor.a * opacity == 0.
) discard;
gl_FragColor = interpColor * opacity;
}
`]),d=l([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 fragClipBounds[2];
uniform float pickGroup;
varying vec4 pickId;
varying vec3 dataCoordinate;
void main() {
if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;
gl_FragColor = vec4(pickGroup, pickId.bgr);
}`]),p=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],v={vertex:u,fragment:h,attributes:p},m={vertex:c,fragment:h,attributes:p},g={vertex:f,fragment:h,attributes:p},w={vertex:u,fragment:d,attributes:p},b={vertex:c,fragment:d,attributes:p},_={vertex:f,fragment:d,attributes:p};function M(x,T){var A=s(x,T),y=A.attributes;return y.position.location=0,y.color.location=1,y.glyph.location=2,y.id.location=3,A}a.createPerspective=function(x){return M(x,v)},a.createOrtho=function(x){return M(x,m)},a.createProject=function(x){return M(x,g)},a.createPickPerspective=function(x){return M(x,w)},a.createPickOrtho=function(x){return M(x,b)},a.createPickProject=function(x){return M(x,_)}},8418(n,a,o){"use strict";var s=o(5219),l=o(2762),u=o(8116),c=o(1888),f=o(6760),h=o(1283),d=o(9366),p=o(5964),v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],m=ArrayBuffer,g=DataView;function w(V){return m.isView(V)&&!(V instanceof g)}function b(V){return Array.isArray(V)||w(V)}n.exports=U;function _(V,X){var H=V[0],G=V[1],Q=V[2],te=V[3];return V[0]=X[0]*H+X[4]*G+X[8]*Q+X[12]*te,V[1]=X[1]*H+X[5]*G+X[9]*Q+X[13]*te,V[2]=X[2]*H+X[6]*G+X[10]*Q+X[14]*te,V[3]=X[3]*H+X[7]*G+X[11]*Q+X[15]*te,V}function M(V,X,H,G){return _(G,G,H),_(G,G,X),_(G,G,V)}function x(V,X){this.index=V,this.dataCoordinate=this.position=X}function T(V){return V===!0||V>1?1:V}function A(V,X,H,G,Q,te,ce,ge,Ce,be,he,oe){this.gl=V,this.pixelRatio=1,this.shader=X,this.orthoShader=H,this.projectShader=G,this.pointBuffer=Q,this.colorBuffer=te,this.glyphBuffer=ce,this.idBuffer=ge,this.vao=Ce,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=be,this.pickOrthoShader=he,this.pickProjectShader=oe,this.points=[],this._selectResult=new x(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 y=A.prototype;y.pickSlots=1,y.setPickBase=function(V){this.pickId=V},y.isTransparent=function(){if(this.hasAlpha)return!0;for(var V=0;V<3;++V)if(this.axesProject[V]&&this.projectHasAlpha)return!0;return!1},y.isOpaque=function(){if(!this.hasAlpha)return!0;for(var V=0;V<3;++V)if(this.axesProject[V]&&!this.projectHasAlpha)return!0;return!1};var E=[0,0],S=[0,0,0],C=[0,0,0],k=[0,0,0,1],D=[0,0,0,1],F=v.slice(),P=[0,0,0],R=[[0,0,0],[0,0,0]];function L(V){return V[0]=V[1]=V[2]=0,V}function I(V,X){return V[0]=X[0],V[1]=X[1],V[2]=X[2],V[3]=1,V}function B(V,X,H,G){return V[0]=X[0],V[1]=X[1],V[2]=X[2],V[H]=G,V}function O(V){for(var X=R,H=0;H<2;++H)for(var G=0;G<3;++G)X[H][G]=Math.max(Math.min(V[H][G],1e8),-1e8);return X}function $(V,X,H,G){var Q=X.axesProject,te=X.gl,ce=V.uniforms,ge=H.model||v,Ce=H.view||v,be=H.projection||v,he=X.axesBounds,oe=O(X.clipBounds),Ee;X.axes&&X.axes.lastCubeProps?Ee=X.axes.lastCubeProps.axis:Ee=[1,1,1],E[0]=2/te.drawingBufferWidth,E[1]=2/te.drawingBufferHeight,V.bind(),ce.view=Ce,ce.projection=be,ce.screenSize=E,ce.highlightId=X.highlightId,ce.highlightScale=X.highlightScale,ce.clipBounds=oe,ce.pickGroup=X.pickId/255,ce.pixelRatio=G;for(var ye=0;ye<3;++ye)if(Q[ye]){ce.scale=X.projectScale[ye],ce.opacity=X.projectOpacity[ye];for(var ue=F,ee=0;ee<16;++ee)ue[ee]=0;for(var ee=0;ee<4;++ee)ue[5*ee]=1;ue[5*ye]=0,Ee[ye]<0?ue[12+ye]=he[0][ye]:ue[12+ye]=he[1][ye],f(ue,ge,ue),ce.model=ue;var ae=(ye+1)%3,xe=(ye+2)%3,re=L(S),pe=L(C);re[ae]=1,pe[xe]=1;var we=M(be,Ce,ge,I(k,re)),Fe=M(be,Ce,ge,I(D,pe));if(Math.abs(we[1])>Math.abs(Fe[1])){var Se=we;we=Fe,Fe=Se,Se=re,re=pe,pe=Se;var ke=ae;ae=xe,xe=ke}we[0]<0&&(re[ae]=-1),Fe[1]>0&&(pe[xe]=-1);for(var _e=0,Ie=0,ee=0;ee<4;++ee)_e+=Math.pow(ge[4*ae+ee],2),Ie+=Math.pow(ge[4*xe+ee],2);re[ae]/=Math.sqrt(_e),pe[xe]/=Math.sqrt(Ie),ce.axes[0]=re,ce.axes[1]=pe,ce.fragClipBounds[0]=B(P,oe[0],ye,-1e8),ce.fragClipBounds[1]=B(P,oe[1],ye,1e8),X.vao.bind(),X.vao.draw(te.TRIANGLES,X.vertexCount),X.lineWidth>0&&(te.lineWidth(X.lineWidth*G),X.vao.draw(te.LINES,X.lineVertexCount,X.vertexCount)),X.vao.unbind()}}var Y=[-1e8,-1e8,-1e8],K=[1e8,1e8,1e8],j=[Y,K];function q(V,X,H,G,Q,te,ce){var ge=H.gl;if((te===H.projectHasAlpha||ce)&&$(X,H,G,Q),te===H.hasAlpha||ce){V.bind();var Ce=V.uniforms;Ce.model=G.model||v,Ce.view=G.view||v,Ce.projection=G.projection||v,E[0]=2/ge.drawingBufferWidth,E[1]=2/ge.drawingBufferHeight,Ce.screenSize=E,Ce.highlightId=H.highlightId,Ce.highlightScale=H.highlightScale,Ce.fragClipBounds=j,Ce.clipBounds=H.axes.bounds,Ce.opacity=H.opacity,Ce.pickGroup=H.pickId/255,Ce.pixelRatio=Q,H.vao.bind(),H.vao.draw(ge.TRIANGLES,H.vertexCount),H.lineWidth>0&&(ge.lineWidth(H.lineWidth*Q),H.vao.draw(ge.LINES,H.lineVertexCount,H.vertexCount)),H.vao.unbind()}}y.draw=function(V){var X=this.useOrtho?this.orthoShader:this.shader;q(X,this.projectShader,this,V,this.pixelRatio,!1,!1)},y.drawTransparent=function(V){var X=this.useOrtho?this.orthoShader:this.shader;q(X,this.projectShader,this,V,this.pixelRatio,!0,!1)},y.drawPick=function(V){var X=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;q(X,this.pickProjectShader,this,V,1,!0,!0)},y.pick=function(V){if(!V||V.id!==this.pickId)return null;var X=V.value[2]+(V.value[1]<<8)+(V.value[0]<<16);if(X>=this.pointCount||X<0)return null;var H=this.points[X],G=this._selectResult;G.index=X;for(var Q=0;Q<3;++Q)G.position[Q]=G.dataCoordinate[Q]=H[Q];return G},y.highlight=function(V){if(!V)this.highlightId=[1,1,1,1];else{var X=V.index,H=X&255,G=X>>8&255,Q=X>>16&255;this.highlightId=[H/255,G/255,Q/255,0]}};function J(V,X,H,G){var Q;b(V)?X<V.length?Q=V[X]:Q=void 0:Q=V,Q=p(Q);var te=!0;s(Q)&&(Q="\u25BC",te=!1),H||(H={});var ce=H.family;b(ce)&&(ce=ce[X]),ce||(ce="normal");var ge=H.weight;b(ge)&&(ge=ge[X]),ge||(ge="normal");var Ce=H.style;b(Ce)&&(Ce=Ce[X]),Ce||(Ce="normal");var be=H.variant;b(be)&&(be=be[X]),be||(be="normal");var he=d(Q,{family:ce,weight:ge,style:Ce,variant:be},G),he=d(Q,H,G);return{mesh:he[0],lines:he[1],bounds:he[2],visible:te}}y.update=function(V){if(V=V||{},"perspective"in V&&(this.useOrtho=!V.perspective),"orthographic"in V&&(this.useOrtho=!!V.orthographic),"lineWidth"in V&&(this.lineWidth=V.lineWidth),"project"in V)if(b(V.project))this.axesProject=V.project;else{var X=!!V.project;this.axesProject=[X,X,X]}if("projectScale"in V)if(b(V.projectScale))this.projectScale=V.projectScale.slice();else{var H=+V.projectScale;this.projectScale=[H,H,H]}if(this.projectHasAlpha=!1,"projectOpacity"in V){if(b(V.projectOpacity))this.projectOpacity=V.projectOpacity.slice();else{var H=+V.projectOpacity;this.projectOpacity=[H,H,H]}for(var G=0;G<3;++G)this.projectOpacity[G]=T(this.projectOpacity[G]),this.projectOpacity[G]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in V&&(this.opacity=T(V.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var Q=V.position,te={family:V.font||"normal",style:V.fontStyle||"normal",weight:V.fontWeight||"normal",variant:V.fontVariant||"normal"},ce=V.alignment||[0,0],ge,Ce;if(ce.length===2)ge=ce[0],Ce=ce[1];else{ge=[],Ce=[];for(var G=0;G<ce.length;++G)ge[G]=ce[G][0],Ce[G]=ce[G][1]}var be=[1/0,1/0,1/0],he=[-1/0,-1/0,-1/0],oe=V.glyph,Ee=V.color,ye=V.size,ue=V.angle,ee=V.lineColor,ae=-1,xe=0,re=0,pe=0;if(Q.length){pe=Q.length;e:for(var G=0;G<pe;++G){for(var we=Q[G],Fe=0;Fe<3;++Fe)if(isNaN(we[Fe])||!isFinite(we[Fe]))continue e;var Se=J(oe,G,te,this.pixelRatio),ke=Se.mesh,_e=Se.lines,Ie=Se.bounds;xe+=ke.cells.length*3,re+=_e.edges.length*2}}var Oe=xe+re,Qe=c.mallocFloat(3*Oe),et=c.mallocFloat(4*Oe),_t=c.mallocFloat(2*Oe),ut=c.mallocUint32(Oe);if(Oe>0){var vt=0,Xe=xe,mt=[0,0,0,1],bt=[0,0,0,1],Ne=b(Ee)&&b(Ee[0]),Ue=b(ee)&&b(ee[0]);e:for(var G=0;G<pe;++G){ae+=1;for(var we=Q[G],Fe=0;Fe<3;++Fe){if(isNaN(we[Fe])||!isFinite(we[Fe]))continue e;he[Fe]=Math.max(he[Fe],we[Fe]),be[Fe]=Math.min(be[Fe],we[Fe])}var Se=J(oe,G,te,this.pixelRatio),ke=Se.mesh,_e=Se.lines,Ie=Se.bounds,Ge=Se.visible;if(!Ge)mt=[1,1,1,0];else if(b(Ee)){var je;if(Ne?G<Ee.length?je=Ee[G]:je=[0,0,0,0]:je=Ee,je.length===3){for(var Fe=0;Fe<3;++Fe)mt[Fe]=je[Fe];mt[3]=1}else if(je.length===4){for(var Fe=0;Fe<4;++Fe)mt[Fe]=je[Fe];!this.hasAlpha&&je[3]<1&&(this.hasAlpha=!0)}}else mt[0]=mt[1]=mt[2]=0,mt[3]=1;if(!Ge)bt=[1,1,1,0];else if(b(ee)){var je;if(Ue?G<ee.length?je=ee[G]:je=[0,0,0,0]:je=ee,je.length===3){for(var Fe=0;Fe<3;++Fe)bt[Fe]=je[Fe];bt[Fe]=1}else if(je.length===4){for(var Fe=0;Fe<4;++Fe)bt[Fe]=je[Fe];!this.hasAlpha&&je[3]<1&&(this.hasAlpha=!0)}}else bt[0]=bt[1]=bt[2]=0,bt[3]=1;var Re=.5;Ge?b(ye)?G<ye.length?Re=+ye[G]:Re=12:ye?Re=+ye:this.useOrtho&&(Re=12):Re=0;var Ve=0;b(ue)?G<ue.length?Ve=+ue[G]:Ve=0:ue&&(Ve=+ue);for(var ct=Math.cos(Ve),Tt=Math.sin(Ve),we=Q[G],Fe=0;Fe<3;++Fe)he[Fe]=Math.max(he[Fe],we[Fe]),be[Fe]=Math.min(be[Fe],we[Fe]);var Xt=ge,Vt=Ce,Xt=0;b(ge)?G<ge.length?Xt=ge[G]:Xt=0:ge&&(Xt=ge);var Vt=0;b(Ce)?G<Ce.length?Vt=Ce[G]:Vt=0:Ce&&(Vt=Ce),Xt*=Xt>0?1-Ie[0][0]:Xt<0?1+Ie[1][0]:1,Vt*=Vt>0?1-Ie[0][1]:Vt<0?1+Ie[1][1]:1;for(var lr=[Xt,Vt],$e=ke.cells||[],tt=ke.positions||[],Fe=0;Fe<$e.length;++Fe)for(var ur=$e[Fe],Bt=0;Bt<3;++Bt){for(var Zt=0;Zt<3;++Zt)Qe[3*vt+Zt]=we[Zt];for(var Zt=0;Zt<4;++Zt)et[4*vt+Zt]=mt[Zt];ut[vt]=ae;var kr=tt[ur[Bt]];_t[2*vt]=Re*(ct*kr[0]-Tt*kr[1]+lr[0]),_t[2*vt+1]=Re*(Tt*kr[0]+ct*kr[1]+lr[1]),vt+=1}for(var $e=_e.edges,tt=_e.positions,Fe=0;Fe<$e.length;++Fe)for(var ur=$e[Fe],Bt=0;Bt<2;++Bt){for(var Zt=0;Zt<3;++Zt)Qe[3*Xe+Zt]=we[Zt];for(var Zt=0;Zt<4;++Zt)et[4*Xe+Zt]=bt[Zt];ut[Xe]=ae;var kr=tt[ur[Bt]];_t[2*Xe]=Re*(ct*kr[0]-Tt*kr[1]+lr[0]),_t[2*Xe+1]=Re*(Tt*kr[0]+ct*kr[1]+lr[1]),Xe+=1}}}this.bounds=[be,he],this.points=Q,this.pointCount=Q.length,this.vertexCount=xe,this.lineVertexCount=re,this.pointBuffer.update(Qe),this.colorBuffer.update(et),this.glyphBuffer.update(_t),this.idBuffer.update(ut),c.free(Qe),c.free(et),c.free(_t),c.free(ut)},y.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 U(V){var X=V.gl,H=h.createPerspective(X),G=h.createOrtho(X),Q=h.createProject(X),te=h.createPickPerspective(X),ce=h.createPickOrtho(X),ge=h.createPickProject(X),Ce=l(X),be=l(X),he=l(X),oe=l(X),Ee=u(X,[{buffer:Ce,size:3,type:X.FLOAT},{buffer:be,size:4,type:X.FLOAT},{buffer:he,size:2,type:X.FLOAT},{buffer:oe,size:4,type:X.UNSIGNED_BYTE,normalized:!0}]),ye=new A(X,H,G,Q,Ce,be,he,oe,Ee,te,ce,ge);return ye.update(V),ye}},3589(n,a,o){"use strict";n.exports=v;var s=o(2260),l=o(1888),u=o(9618),c=o(8828).nextPow2,f=function(m,g,w){for(var b=1e8,_=-1,M=-1,x=m.shape[0],T=m.shape[1],A=0;A<x;A++)for(var y=0;y<T;y++){var E=m.get(A,y,0),S=m.get(A,y,1),C=m.get(A,y,2),k=m.get(A,y,3);if(E<255||S<255||C<255||k<255){var D=g-A,F=w-y,P=D*D+F*F;P<b&&(b=P,_=A,M=y)}}return[_,M,b]};function h(m,g,w,b,_){this.coord=[m,g],this.id=w,this.value=b,this.distance=_}function d(m,g,w){this.gl=m,this.fbo=g,this.buffer=w,this._readTimeout=null;var b=this;this._readCallback=function(){b.gl&&(g.bind(),m.readPixels(0,0,g.shape[0],g.shape[1],m.RGBA,m.UNSIGNED_BYTE,b.buffer),b._readTimeout=null)}}var p=d.prototype;Object.defineProperty(p,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(m){if(this.gl){this.fbo.shape=m;var g=this.fbo.shape[0],w=this.fbo.shape[1];if(w*g*4>this.buffer.length){l.free(this.buffer);for(var b=this.buffer=l.mallocUint8(c(w*g*4)),_=0;_<w*g*4;++_)b[_]=255}return m}}}),p.begin=function(){var m=this.gl,g=this.shape;m&&(this.fbo.bind(),m.clearColor(1,1,1,1),m.clear(m.COLOR_BUFFER_BIT|m.DEPTH_BUFFER_BIT))},p.end=function(){var m=this.gl;m&&(m.bindFramebuffer(m.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},p.query=function(m,g,w){if(!this.gl)return null;var b=this.fbo.shape.slice();m=m|0,g=g|0,typeof w!="number"&&(w=1);var _=Math.min(Math.max(m-w,0),b[0])|0,M=Math.min(Math.max(m+w,0),b[0])|0,x=Math.min(Math.max(g-w,0),b[1])|0,T=Math.min(Math.max(g+w,0),b[1])|0;if(M<=_||T<=x)return null;var A=[M-_,T-x],y=u(this.buffer,[A[0],A[1],4],[4,b[0]*4,1],4*(_+b[0]*x)),E=f(y.hi(A[0],A[1],1),w,w),S=E[0],C=E[1];if(S<0||Math.pow(this.radius,2)<E[2])return null;var k=y.get(S,C,0),D=y.get(S,C,1),F=y.get(S,C,2),P=y.get(S,C,3);return new h(S+_|0,C+x|0,k,[D,F,P],Math.sqrt(E[2]))},p.dispose=function(){this.gl&&(this.fbo.dispose(),l.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))};function v(m,g){var w=g[0],b=g[1],_={},M=s(m,w,b,_),x=l.mallocUint8(w*b*4);return new d(m,M,x)}},9405(n,a,o){"use strict";var s=o(3327),l=o(8731),u=o(216),c=o(5091),f=o(2145),h=o(8866);function d(g){this.gl=g,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var p=d.prototype;p.bind=function(){this.program||this._relink();var g,w=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),b=this.gl.lastAttribCount;if(w>b)for(g=b;g<w;g++)this.gl.enableVertexAttribArray(g);else if(b>w)for(g=w;g<b;g++)this.gl.disableVertexAttribArray(g);this.gl.lastAttribCount=w,this.gl.useProgram(this.program)},p.dispose=function(){for(var g=this.gl.lastAttribCount,w=0;w<g;w++)this.gl.disableVertexAttribArray(w);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 v(g,w){return g.name<w.name?-1:1}p.update=function(g,w,b,_){if(!w||arguments.length===1){var M=g;g=M.vertex,w=M.fragment,b=M.uniforms,_=M.attributes}var x=this,T=x.gl,A=x._vref;x._vref=c.shader(T,T.VERTEX_SHADER,g),A&&A.dispose(),x.vertShader=x._vref.shader;var y=this._fref;if(x._fref=c.shader(T,T.FRAGMENT_SHADER,w),y&&y.dispose(),x.fragShader=x._fref.shader,!b||!_){var E=T.createProgram();if(T.attachShader(E,x.fragShader),T.attachShader(E,x.vertShader),T.linkProgram(E),!T.getProgramParameter(E,T.LINK_STATUS)){var S=T.getProgramInfoLog(E);throw new h(S,"Error linking program:"+S)}b=b||f.uniforms(T,E),_=_||f.attributes(T,E),T.deleteProgram(E)}_=_.slice(),_.sort(v);var C=[],k=[],D=[],F;for(F=0;F<_.length;++F){var P=_[F];if(P.type.indexOf("mat")>=0){for(var R=P.type.charAt(P.type.length-1)|0,L=new Array(R),I=0;I<R;++I)L[I]=D.length,k.push(P.name+"["+I+"]"),typeof P.location=="number"?D.push(P.location+I):Array.isArray(P.location)&&P.location.length===R&&typeof P.location[I]=="number"?D.push(P.location[I]|0):D.push(-1);C.push({name:P.name,type:P.type,locations:L})}else C.push({name:P.name,type:P.type,locations:[D.length]}),k.push(P.name),typeof P.location=="number"?D.push(P.location|0):D.push(-1)}var B=0;for(F=0;F<D.length;++F)if(D[F]<0){for(;D.indexOf(B)>=0;)B+=1;D[F]=B}var O=new Array(b.length);function $(){x.program=c.program(T,x._vref,x._fref,k,D);for(var Y=0;Y<b.length;++Y)O[Y]=T.getUniformLocation(x.program,b[Y].name)}$(),x._relink=$,x.types={uniforms:u(b),attributes:u(_)},x.attributes=l(T,x,C,D),Object.defineProperty(x,"uniforms",s(T,x,b,O))};function m(g,w,b,_,M){var x=new d(g);return x.update(w,b,_,M),x}n.exports=m},8866(n){function a(o,s,l){this.shortMessage=s||"",this.longMessage=l||"",this.rawError=o||"",this.message="gl-shader: "+(s||o||"")+(l?`
`+l:""),this.stack=new Error().stack}a.prototype=new Error,a.prototype.name="GLError",a.prototype.constructor=a,n.exports=a},8731(n,a,o){"use strict";n.exports=d;var s=o(8866);function l(p,v,m,g,w,b){this._gl=p,this._wrapper=v,this._index=m,this._locations=g,this._dimension=w,this._constFunc=b}var u=l.prototype;u.pointer=function(v,m,g,w){var b=this,_=b._gl,M=b._locations[b._index];_.vertexAttribPointer(M,b._dimension,v||_.FLOAT,!!m,g||0,w||0),_.enableVertexAttribArray(M)},u.set=function(p,v,m,g){return this._constFunc(this._locations[this._index],p,v,m,g)},Object.defineProperty(u,"location",{get:function(){return this._locations[this._index]},set:function(p){return p!==this._locations[this._index]&&(this._locations[this._index]=p|0,this._wrapper.program=null),p|0}});var c=[function(p,v,m){return m.length===void 0?p.vertexAttrib1f(v,m):p.vertexAttrib1fv(v,m)},function(p,v,m,g){return m.length===void 0?p.vertexAttrib2f(v,m,g):p.vertexAttrib2fv(v,m)},function(p,v,m,g,w){return m.length===void 0?p.vertexAttrib3f(v,m,g,w):p.vertexAttrib3fv(v,m)},function(p,v,m,g,w,b){return m.length===void 0?p.vertexAttrib4f(v,m,g,w,b):p.vertexAttrib4fv(v,m)}];function f(p,v,m,g,w,b,_){var M=c[w],x=new l(p,v,m,g,w,M);Object.defineProperty(b,_,{set:function(T){return p.disableVertexAttribArray(g[m]),M(p,g[m],T),T},get:function(){return x},enumerable:!0})}function h(p,v,m,g,w,b,_){for(var M=new Array(w),x=new Array(w),T=0;T<w;++T)f(p,v,m[T],g,w,M,T),x[T]=M[T];Object.defineProperty(M,"location",{set:function(E){if(Array.isArray(E))for(var S=0;S<w;++S)x[S].location=E[S];else for(var S=0;S<w;++S)x[S].location=E+S;return E},get:function(){for(var E=new Array(w),S=0;S<w;++S)E[S]=g[m[S]];return E},enumerable:!0}),M.pointer=function(E,S,C,k){E=E||p.FLOAT,S=!!S,C=C||w*w,k=k||0;for(var D=0;D<w;++D){var F=g[m[D]];p.vertexAttribPointer(F,w,E,S,C,k+D*w),p.enableVertexAttribArray(F)}};var A=new Array(w),y=p["vertexAttrib"+w+"fv"];Object.defineProperty(b,_,{set:function(E){for(var S=0;S<w;++S){var C=g[m[S]];if(p.disableVertexAttribArray(C),Array.isArray(E[0]))y.call(p,C,E[S]);else{for(var k=0;k<w;++k)A[k]=E[w*S+k];y.call(p,C,A)}}return E},get:function(){return M},enumerable:!0})}function d(p,v,m,g){for(var w={},b=0,_=m.length;b<_;++b){var M=m[b],x=M.name,T=M.type,A=M.locations;switch(T){case"bool":case"int":case"float":f(p,v,A[0],g,1,w,x);break;default:if(T.indexOf("vec")>=0){var y=T.charCodeAt(T.length-1)-48;if(y<2||y>4)throw new s("","Invalid data type for attribute "+x+": "+T);f(p,v,A[0],g,y,w,x)}else if(T.indexOf("mat")>=0){var y=T.charCodeAt(T.length-1)-48;if(y<2||y>4)throw new s("","Invalid data type for attribute "+x+": "+T);h(p,v,A,g,y,w,x)}else throw new s("","Unknown data type for attribute "+x+": "+T);break}}return w}},3327(n,a,o){"use strict";var s=o(216),l=o(8866);n.exports=f;function u(h){return function(){return h}}function c(h,d){for(var p=new Array(h),v=0;v<h;++v)p[v]=d;return p}function f(h,d,p,v){function m(T){return function(A,y,E){return A.getUniform(y.program,E[T])}}function g(T){return function(y){for(var E=w("",T),S=0;S<E.length;++S){var C=E[S],k=C[0],D=C[1];if(v[D]){var F=y;if(typeof k=="string"&&(k.indexOf(".")===0||k.indexOf("[")===0)){var P=k;if(k.indexOf(".")===0&&(P=k.slice(1)),P.indexOf("]")===P.length-1){var R=P.indexOf("["),L=P.slice(0,R),I=P.slice(R+1,P.length-1);F=L?y[L][I]:y[I]}else F=y[P]}var B=p[D].type,O;switch(B){case"bool":case"int":case"sampler2D":case"samplerCube":h.uniform1i(v[D],F);break;case"float":h.uniform1f(v[D],F);break;default:var $=B.indexOf("vec");if(0<=$&&$<=1&&B.length===4+$){if(O=B.charCodeAt(B.length-1)-48,O<2||O>4)throw new l("","Invalid data type");switch(B.charAt(0)){case"b":case"i":h["uniform"+O+"iv"](v[D],F);break;case"v":h["uniform"+O+"fv"](v[D],F);break;default:throw new l("","Unrecognized data type for vector "+name+": "+B)}}else if(B.indexOf("mat")===0&&B.length===4){if(O=B.charCodeAt(B.length-1)-48,O<2||O>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+B);h["uniformMatrix"+O+"fv"](v[D],!1,F);break}else throw new l("","Unknown uniform data type for "+name+": "+B)}}}}}function w(T,A){if(typeof A!="object")return[[T,A]];var y=[];for(var E in A){var S=A[E],C=T;parseInt(E)+""===E?C+="["+E+"]":C+="."+E,typeof S=="object"?y.push.apply(y,w(C,S)):y.push([C,S])}return y}function b(T){switch(T){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var A=T.indexOf("vec");if(0<=A&&A<=1&&T.length===4+A){var y=T.charCodeAt(T.length-1)-48;if(y<2||y>4)throw new l("","Invalid data type");return T.charAt(0)==="b"?c(y,!1):c(y,0)}else if(T.indexOf("mat")===0&&T.length===4){var y=T.charCodeAt(T.length-1)-48;if(y<2||y>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+T);return c(y*y,0)}else throw new l("","Unknown uniform data type for "+name+": "+T)}}function _(T,A,y){if(typeof y=="object"){var E=M(y);Object.defineProperty(T,A,{get:u(E),set:g(y),enumerable:!0,configurable:!1})}else v[y]?Object.defineProperty(T,A,{get:m(y),set:g(y),enumerable:!0,configurable:!1}):T[A]=b(p[y].type)}function M(T){var A;if(Array.isArray(T)){A=new Array(T.length);for(var y=0;y<T.length;++y)_(A,y,T[y])}else{A={};for(var E in T)_(A,E,T[E])}return A}var x=s(p,!0);return{get:u(M(x)),set:g(x),enumerable:!0,configurable:!0}}},216(n){"use strict";n.exports=a;function a(o,s){for(var l={},u=0;u<o.length;++u)for(var c=o[u].name,f=c.split("."),h=l,d=0;d<f.length;++d){var p=f[d].split("[");if(p.length>1){p[0]in h||(h[p[0]]=[]),h=h[p[0]];for(var v=1;v<p.length;++v){var m=parseInt(p[v]);v<p.length-1||d<f.length-1?(m in h||(v<p.length-1?h[m]=[]:h[m]={}),h=h[m]):s?h[m]=u:h[m]=o[u].type}}else d<f.length-1?(p[0]in h||(h[p[0]]={}),h=h[p[0]]):s?h[p[0]]=u:h[p[0]]=o[u].type}return l}},2145(n,a){"use strict";a.uniforms=u,a.attributes=c;var o={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"},s=null;function l(f,h){if(!s){var d=Object.keys(o);s={};for(var p=0;p<d.length;++p){var v=d[p];s[f[v]]=o[v]}}return s[h]}function u(f,h){for(var d=f.getProgramParameter(h,f.ACTIVE_UNIFORMS),p=[],v=0;v<d;++v){var m=f.getActiveUniform(h,v);if(m){var g=l(f,m.type);if(m.size>1)for(var w=0;w<m.size;++w)p.push({name:m.name.replace("[0]","["+w+"]"),type:g});else p.push({name:m.name,type:g})}}return p}function c(f,h){for(var d=f.getProgramParameter(h,f.ACTIVE_ATTRIBUTES),p=[],v=0;v<d;++v){var m=f.getActiveAttrib(h,v);m&&p.push({name:m.name,type:l(f,m.type)})}return p}},5091(n,a,o){"use strict";a.shader=w,a.program=b;var s=o(8866),l=o(2992),u=typeof WeakMap=="undefined"?o(606):WeakMap,c=new u,f=0;function h(_,M,x,T,A,y,E){this.id=_,this.src=M,this.type=x,this.shader=T,this.count=y,this.programs=[],this.cache=E}h.prototype.dispose=function(){if(--this.count===0){for(var _=this.cache,M=_.gl,x=this.programs,T=0,A=x.length;T<A;++T){var y=_.programs[x[T]];y&&(delete _.programs[T],M.deleteProgram(y))}M.deleteShader(this.shader),delete _.shaders[this.type===M.FRAGMENT_SHADER|0][this.src]}};function d(_){this.gl=_,this.shaders=[{},{}],this.programs={}}var p=d.prototype;function v(_,M,x){var T=_.createShader(M);if(_.shaderSource(T,x),_.compileShader(T),!_.getShaderParameter(T,_.COMPILE_STATUS)){var A=_.getShaderInfoLog(T);try{var y=l(A,x,M)}catch(E){throw console.warn("Failed to format compiler error: "+E),new s(A,`Error compiling shader:
`+A)}throw new s(A,y.short,y.long)}return T}p.getShaderReference=function(_,M){var x=this.gl,T=this.shaders[_===x.FRAGMENT_SHADER|0],A=T[M];if(!A||!x.isShader(A.shader)){var y=v(x,_,M);A=T[M]=new h(f++,M,_,y,[],1,this)}else A.count+=1;return A};function m(_,M,x,T,A){var y=_.createProgram();_.attachShader(y,M),_.attachShader(y,x);for(var E=0;E<T.length;++E)_.bindAttribLocation(y,A[E],T[E]);if(_.linkProgram(y),!_.getProgramParameter(y,_.LINK_STATUS)){var S=_.getProgramInfoLog(y);throw new s(S,"Error linking program: "+S)}return y}p.getProgram=function(_,M,x,T){var A=[_.id,M.id,x.join(":"),T.join(":")].join("@"),y=this.programs[A];return(!y||!this.gl.isProgram(y))&&(this.programs[A]=y=m(this.gl,_.shader,M.shader,x,T),_.programs.push(A),M.programs.push(A)),y};function g(_){var M=c.get(_);return M||(M=new d(_),c.set(_,M)),M}function w(_,M,x){return g(_).getShaderReference(M,x)}function b(_,M,x,T,A){return g(_).getProgram(M,x,T,A)}},1493(n,a,o){"use strict";var s=o(3236),l=o(9405),u=s([`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];
}
`]),c=s([`precision mediump float;
#define GLSLIFY 1
varying vec4 fragColor;
void main() {
gl_FragColor = fragColor;
}`]);n.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},4449(n,a,o){"use strict";var s=o(2762),l=o(8116),u=o(1493);n.exports=m;var c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(g,w,b,_){this.gl=g,this.buffer=w,this.vao=b,this.shader=_,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=f.prototype,d=[0,0,0],p=[0,0,0],v=[0,0];h.isTransparent=function(){return!1},h.drawTransparent=function(g){},h.draw=function(g){var w=this.gl,b=this.vao,_=this.shader;b.bind(),_.bind();var M=g.model||c,x=g.view||c,T=g.projection||c,A;this.axes&&(A=this.axes.lastCubeProps.axis);for(var y=d,E=p,S=0;S<3;++S)A&&A[S]<0?(y[S]=this.bounds[0][S],E[S]=this.bounds[1][S]):(y[S]=this.bounds[1][S],E[S]=this.bounds[0][S]);v[0]=w.drawingBufferWidth,v[1]=w.drawingBufferHeight,_.uniforms.model=M,_.uniforms.view=x,_.uniforms.projection=T,_.uniforms.coordinates=[this.position,y,E],_.uniforms.colors=this.colors,_.uniforms.screenShape=v;for(var S=0;S<3;++S)_.uniforms.lineWidth=this.lineWidth[S]*this.pixelRatio,this.enabled[S]&&(b.draw(w.TRIANGLES,6,6*S),this.drawSides[S]&&b.draw(w.TRIANGLES,12,18+12*S));b.unbind()},h.update=function(g){g&&("bounds"in g&&(this.bounds=g.bounds),"position"in g&&(this.position=g.position),"lineWidth"in g&&(this.lineWidth=g.lineWidth),"colors"in g&&(this.colors=g.colors),"enabled"in g&&(this.enabled=g.enabled),"drawSides"in g&&(this.drawSides=g.drawSides))},h.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function m(g,w){var b=[];function _(y,E,S,C,k,D){var F=[y,E,S,0,0,0,1];F[C+3]=1,F[C]=k,b.push.apply(b,F),F[6]=-1,b.push.apply(b,F),F[C]=D,b.push.apply(b,F),b.push.apply(b,F),F[6]=1,b.push.apply(b,F),F[C]=k,b.push.apply(b,F)}_(0,0,0,0,0,1),_(0,0,0,1,0,1),_(0,0,0,2,0,1),_(1,0,0,1,-1,1),_(1,0,0,2,-1,1),_(0,1,0,0,-1,1),_(0,1,0,2,-1,1),_(0,0,1,0,-1,1),_(0,0,1,1,-1,1);var M=s(g,b),x=l(g,[{type:g.FLOAT,buffer:M,size:3,offset:0,stride:28},{type:g.FLOAT,buffer:M,size:3,offset:12,stride:28},{type:g.FLOAT,buffer:M,size:1,offset:24,stride:28}]),T=u(g);T.attributes.position.location=0,T.attributes.color.location=1,T.attributes.weight.location=2;var A=new f(g,M,x,T);return A.update(w),A}},6740(n,a,o){var s=o(3236),l=s([`precision highp float;
precision highp float;
#define GLSLIFY 1
vec3 getOrthogonalVector(vec3 v) {
// Return up-vector for only-z vector.
// Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).
// From the above if-statement we have ||a|| > 0 U ||b|| > 0.
// Assign z = 0, x = -b, y = a:
// a*-b + b*a + c*0 = -ba + ba + 0 = 0
if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
return normalize(vec3(-v.y, v.x, 0.0));
} else {
return normalize(vec3(0.0, v.z, -v.y));
}
}
// Calculate the tube vertex and normal at the given index.
//
// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.
//
// Each tube segment is made up of a ring of vertices.
// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.
// The indexes of tube segments run from 0 to 8.
//
vec3 getTubePosition(vec3 d, float index, out vec3 normal) {
float segmentCount = 8.0;
float angle = 2.0 * 3.14159 * (index / segmentCount);
vec3 u = getOrthogonalVector(d);
vec3 v = normalize(cross(u, d));
vec3 x = u * cos(angle) * length(d);
vec3 y = v * sin(angle) * length(d);
vec3 v3 = x + y;
normal = normalize(v3);
return v3;
}
attribute vec4 vector;
attribute vec4 color, position;
attribute vec2 uv;
uniform float vectorScale, tubeScale;
uniform mat4 model, view, projection, inverseModel;
uniform vec3 eyePosition, lightPosition;
varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;
void main() {
// Scale the vector magnitude to stay constant with
// model & view changes.
vec3 normal;
vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);
vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);
//Lighting geometry parameters
vec4 cameraCoordinate = view * tubePosition;
cameraCoordinate.xyz /= cameraCoordinate.w;
f_lightDirection = lightPosition - cameraCoordinate.xyz;
f_eyeDirection = eyePosition - cameraCoordinate.xyz;
f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);
// vec4 m_position = model * vec4(tubePosition, 1.0);
vec4 t_position = view * tubePosition;
gl_Position = projection * t_position;
f_color = color;
f_data = tubePosition.xyz;
f_position = position.xyz;
f_uv = uv;
}
`]),u=s([`#extension GL_OES_standard_derivatives : enable
precision highp float;
#define GLSLIFY 1
float beckmannDistribution(float x, float roughness) {
float NdotH = max(x, 0.0001);
float cos2Alpha = NdotH * NdotH;
float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
float roughness2 = roughness * roughness;
float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
return exp(tan2Alpha / roughness2) / denom;
}
float cookTorranceSpecular(
vec3 lightDirection,
vec3 viewDirection,
vec3 surfaceNormal,
float roughness,
float fresnel) {
float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);
float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);
//Half angle vector
vec3 H = normalize(lightDirection + viewDirection);
//Geometric term
float NdotH = max(dot(surfaceNormal, H), 0.0);
float VdotH = max(dot(viewDirection, H), 0.000001);
float LdotH = max(dot(lightDirection, H), 0.000001);
float G1 = (2.0 * NdotH * VdotN) / VdotH;
float G2 = (2.0 * NdotH * LdotN) / LdotH;
float G = min(1.0, min(G1, G2));
//Distribution term
float D = beckmannDistribution(NdotH, roughness);
//Fresnel term
float F = pow(1.0 - VdotN, fresnel);
//Multiply terms and done
return G * F * D / max(3.14159265 * VdotN, 0.000001);
}
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 clipBounds[2];
uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;
uniform sampler2D texture;
varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;
varying vec4 f_color;
varying vec2 f_uv;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
vec3 N = normalize(f_normal);
vec3 L = normalize(f_lightDirection);
vec3 V = normalize(f_eyeDirection);
if(gl_FrontFacing) {
N = -N;
}
float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));
float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);
vec4 surfaceColor = f_color * texture2D(texture, f_uv);
vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);
gl_FragColor = litColor * opacity;
}
`]),c=s([`precision highp float;
precision highp float;
#define GLSLIFY 1
vec3 getOrthogonalVector(vec3 v) {
// Return up-vector for only-z vector.
// Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).
// From the above if-statement we have ||a|| > 0 U ||b|| > 0.
// Assign z = 0, x = -b, y = a:
// a*-b + b*a + c*0 = -ba + ba + 0 = 0
if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {
return normalize(vec3(-v.y, v.x, 0.0));
} else {
return normalize(vec3(0.0, v.z, -v.y));
}
}
// Calculate the tube vertex and normal at the given index.
//
// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.
//
// Each tube segment is made up of a ring of vertices.
// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.
// The indexes of tube segments run from 0 to 8.
//
vec3 getTubePosition(vec3 d, float index, out vec3 normal) {
float segmentCount = 8.0;
float angle = 2.0 * 3.14159 * (index / segmentCount);
vec3 u = getOrthogonalVector(d);
vec3 v = normalize(cross(u, d));
vec3 x = u * cos(angle) * length(d);
vec3 y = v * sin(angle) * length(d);
vec3 v3 = x + y;
normal = normalize(v3);
return v3;
}
attribute vec4 vector;
attribute vec4 position;
attribute vec4 id;
uniform mat4 model, view, projection;
uniform float tubeScale;
varying vec3 f_position;
varying vec4 f_id;
void main() {
vec3 normal;
vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);
vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);
gl_Position = projection * (view * tubePosition);
f_id = id;
f_position = position.xyz;
}
`]),f=s([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 clipBounds[2];
uniform float pickId;
varying vec3 f_position;
varying vec4 f_id;
void main() {
if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;
gl_FragColor = vec4(pickId, f_id.xyz);
}`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},a.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815(n,a,o){"use strict";var s=o(2931),l=o(9970),u=["xyz","xzy","yxz","yzx","zxy","zyx"],c=function(_,M,x,T){for(var A=_.points,y=_.velocities,E=_.divergences,S=[],C=[],k=[],D=[],F=[],P=[],R=0,L=0,I=l.create(),B=l.create(),O=8,$=0;$<A.length;$++){var Y=A[$],K=y[$],j=E[$];M===0&&(j=x*.05),L=s.length(K)/T,I=l.create(),s.copy(I,K),I[3]=j;for(var q=0;q<O;q++)F[q]=[Y[0],Y[1],Y[2],q];if(D.length>0)for(var q=0;q<O;q++){var J=(q+1)%O;S.push(D[q],F[q],F[J],F[J],D[J],D[q]),k.push(B,I,I,I,B,B),P.push(R,L,L,L,R,R);var U=S.length;C.push([U-6,U-5,U-4],[U-3,U-2,U-1])}var V=D;D=F,F=V;var X=B;B=I,I=X;var H=R;R=L,L=H}return{positions:S,cells:C,vectors:k,vertexIntensity:P}},f=function(_,M,x,T){for(var A=0,y=0;y<_.length;y++)for(var E=_[y].velocities,S=0;S<E.length;S++)A=Math.max(A,s.length(E[S]));for(var C=_.map(function($){return c($,x,T,A)}),k=[],D=[],F=[],P=[],y=0;y<C.length;y++){var R=C[y],L=k.length;k=k.concat(R.positions),F=F.concat(R.vectors),P=P.concat(R.vertexIntensity);for(var S=0;S<R.cells.length;S++){var I=R.cells[S],B=[];D.push(B);for(var O=0;O<I.length;O++)B.push(I[O]+L)}}return{positions:k,cells:D,vectors:F,vertexIntensity:P,colormap:M}},h=function(_,M){var x=_.length,T;for(T=0;T<x;T++){var A=_[T];if(A===M)return T;if(A>M)return T-1}return T},d=function(_,M,x){return _<M?M:_>x?x:_},p=function(_,M,x){var T=M.vectors,A=M.meshgrid,y=_[0],E=_[1],S=_[2],C=A[0].length,k=A[1].length,D=A[2].length,F=h(A[0],y),P=h(A[1],E),R=h(A[2],S),L=F+1,I=P+1,B=R+1;if(F=d(F,0,C-1),L=d(L,0,C-1),P=d(P,0,k-1),I=d(I,0,k-1),R=d(R,0,D-1),B=d(B,0,D-1),F<0||P<0||R<0||L>C-1||I>k-1||B>D-1)return s.create();var O=A[0][F],$=A[0][L],Y=A[1][P],K=A[1][I],j=A[2][R],q=A[2][B],J=(y-O)/($-O),U=(E-Y)/(K-Y),V=(S-j)/(q-j);isFinite(J)||(J=.5),isFinite(U)||(U=.5),isFinite(V)||(V=.5);var X,H,G,Q,te,ce;switch(x.reversedX&&(F=C-1-F,L=C-1-L),x.reversedY&&(P=k-1-P,I=k-1-I),x.reversedZ&&(R=D-1-R,B=D-1-B),x.filled){case 5:te=R,ce=B,G=P*D,Q=I*D,X=F*D*k,H=L*D*k;break;case 4:te=R,ce=B,X=F*D,H=L*D,G=P*D*C,Q=I*D*C;break;case 3:G=P,Q=I,te=R*k,ce=B*k,X=F*k*D,H=L*k*D;break;case 2:G=P,Q=I,X=F*k,H=L*k,te=R*k*C,ce=B*k*C;break;case 1:X=F,H=L,te=R*C,ce=B*C,G=P*C*D,Q=I*C*D;break;default:X=F,H=L,G=P*C,Q=I*C,te=R*C*k,ce=B*C*k;break}var ge=T[X+G+te],Ce=T[X+G+ce],be=T[X+Q+te],he=T[X+Q+ce],oe=T[H+G+te],Ee=T[H+G+ce],ye=T[H+Q+te],ue=T[H+Q+ce],ee=s.create(),ae=s.create(),xe=s.create(),re=s.create();s.lerp(ee,ge,oe,J),s.lerp(ae,Ce,Ee,J),s.lerp(xe,be,ye,J),s.lerp(re,he,ue,J);var pe=s.create(),we=s.create();s.lerp(pe,ee,xe,U),s.lerp(we,ae,re,U);var Fe=s.create();return s.lerp(Fe,pe,we,V),Fe},v=function(_,M){var x=M[0],T=M[1],A=M[2];return _[0]=x<0?-x:x,_[1]=T<0?-T:T,_[2]=A<0?-A:A,_},m=function(_){var M=1/0;_.sort(function(y,E){return y-E});for(var x=_.length,T=1;T<x;T++){var A=Math.abs(_[T]-_[T-1]);A<M&&(M=A)}return M},g=function(_){for(var M=[],x=[],T=[],A={},y={},E={},S=_.length,C=0;C<S;C++){var k=_[C],D=k[0],F=k[1],P=k[2];A[D]||(M.push(D),A[D]=!0),y[F]||(x.push(F),y[F]=!0),E[P]||(T.push(P),E[P]=!0)}var R=m(M),L=m(x),I=m(T),B=Math.min(R,L,I);return isFinite(B)?B:1};n.exports=function(_,M){var x=_.startingPositions,T=_.maxLength||1e3,A=_.tubeSize||1,y=_.absoluteTubeSize,E=_.gridFill||"+x+y+z",S={};E.indexOf("-x")!==-1&&(S.reversedX=!0),E.indexOf("-y")!==-1&&(S.reversedY=!0),E.indexOf("-z")!==-1&&(S.reversedZ=!0),S.filled=u.indexOf(E.replace(/-/g,"").replace(/\+/g,""));var C=_.getVelocity||function(Ee){return p(Ee,_,S)},k=_.getDivergence||function(Ee,ye){var ue=s.create(),ee=1e-4;s.add(ue,Ee,[ee,0,0]);var ae=C(ue);s.subtract(ae,ae,ye),s.scale(ae,ae,1/ee),s.add(ue,Ee,[0,ee,0]);var xe=C(ue);s.subtract(xe,xe,ye),s.scale(xe,xe,1/ee),s.add(ue,Ee,[0,0,ee]);var re=C(ue);return s.subtract(re,re,ye),s.scale(re,re,1/ee),s.add(ue,ae,xe),s.add(ue,ue,re),ue},D=[],F=M[0][0],P=M[0][1],R=M[0][2],L=M[1][0],I=M[1][1],B=M[1][2],O=function(Ee){var ye=Ee[0],ue=Ee[1],ee=Ee[2];return!(ye<F||ye>L||ue<P||ue>I||ee<R||ee>B)},$=s.distance(M[0],M[1]),Y=10*$/T,K=Y*Y,j=1,q=0,J=x.length;J>1&&(j=g(x));for(var U=0;U<J;U++){var V=s.create();s.copy(V,x[U]);var X=[V],H=[],G=C(V),Q=V;H.push(G);var te=[],ce=k(V,G),ge=s.length(ce);isFinite(ge)&&ge>q&&(q=ge),te.push(ge),D.push({points:X,velocities:H,divergences:te});for(var Ce=0;Ce<T*100&&X.length<T&&O(V);){Ce++;var be=s.clone(G),he=s.squaredLength(be);if(he===0)break;if(he>K&&s.scale(be,be,Y/Math.sqrt(he)),s.add(be,be,V),G=C(be),s.squaredDistance(Q,be)-K>-1e-4*K){X.push(be),Q=be,H.push(G);var ce=k(be,G),ge=s.length(ce);isFinite(ge)&&ge>q&&(q=ge),te.push(ge)}V=be}}var oe=f(D,_.colormap,q,j);return y?oe.tubeScale=y:(q===0&&(q=1),oe.tubeScale=A*.5*j/q),oe};var w=o(6740),b=o(6405).createMesh;n.exports.createTubeMesh=function(_,M){return b(_,M,{shaders:w,traceType:"streamtube"})}},990(n,a,o){var s=o(9405),l=o(3236),u=l([`precision highp float;
#define GLSLIFY 1
attribute vec4 uv;
attribute vec3 f;
attribute vec3 normal;
uniform vec3 objectOffset;
uniform mat4 model, view, projection, inverseModel;
uniform vec3 lightPosition, eyePosition;
uniform sampler2D colormap;
varying float value, kill;
varying vec3 worldCoordinate;
varying vec2 planeCoordinate;
varying vec3 lightDirection, eyeDirection, surfaceNormal;
varying vec4 vColor;
void main() {
vec3 localCoordinate = vec3(uv.zw, f.x);
worldCoordinate = objectOffset + localCoordinate;
mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));
vec4 worldPosition = (model * objectOffsetTranslation) * vec4(localCoordinate, 1.0);
vec4 clipPosition = projection * (view * worldPosition);
gl_Position = clipPosition;
kill = f.y;
value = f.z;
planeCoordinate = uv.xy;
vColor = texture2D(colormap, vec2(value, value));
//Lighting geometry parameters
vec4 cameraCoordinate = view * worldPosition;
cameraCoordinate.xyz /= cameraCoordinate.w;
lightDirection = lightPosition - cameraCoordinate.xyz;
eyeDirection = eyePosition - cameraCoordinate.xyz;
surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz);
}
`]),c=l([`precision highp float;
#define GLSLIFY 1
float beckmannDistribution(float x, float roughness) {
float NdotH = max(x, 0.0001);
float cos2Alpha = NdotH * NdotH;
float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;
float roughness2 = roughness * roughness;
float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;
return exp(tan2Alpha / roughness2) / denom;
}
float beckmannSpecular(
vec3 lightDirection,
vec3 viewDirection,
vec3 surfaceNormal,
float roughness) {
return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);
}
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec3 lowerBound, upperBound;
uniform float contourTint;
uniform vec4 contourColor;
uniform sampler2D colormap;
uniform vec3 clipBounds[2];
uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;
uniform float vertexColor;
varying float value, kill;
varying vec3 worldCoordinate;
varying vec3 lightDirection, eyeDirection, surfaceNormal;
varying vec4 vColor;
void main() {
if (
kill > 0.0 ||
vColor.a == 0.0 ||
outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)
) discard;
vec3 N = normalize(surfaceNormal);
vec3 V = normalize(eyeDirection);
vec3 L = normalize(lightDirection);
if(gl_FrontFacing) {
N = -N;
}
float specular = max(beckmannSpecular(L, V, N, roughness), 0.);
float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);
//decide how to interpolate color \u2014 in vertex or in fragment
vec4 surfaceColor =
step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +
step(.5, vertexColor) * vColor;
vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);
gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;
}
`]),f=l([`precision highp float;
#define GLSLIFY 1
attribute vec4 uv;
attribute float f;
uniform vec3 objectOffset;
uniform mat3 permutation;
uniform mat4 model, view, projection;
uniform float height, zOffset;
uniform sampler2D colormap;
varying float value, kill;
varying vec3 worldCoordinate;
varying vec2 planeCoordinate;
varying vec3 lightDirection, eyeDirection, surfaceNormal;
varying vec4 vColor;
void main() {
vec3 dataCoordinate = permutation * vec3(uv.xy, height);
worldCoordinate = objectOffset + dataCoordinate;
mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));
vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0);
vec4 clipPosition = projection * (view * worldPosition);
clipPosition.z += zOffset;
gl_Position = clipPosition;
value = f + objectOffset.z;
kill = -1.0;
planeCoordinate = uv.zw;
vColor = texture2D(colormap, vec2(value, value));
//Don't do lighting for contours
surfaceNormal = vec3(1,0,0);
eyeDirection = vec3(0,1,0);
lightDirection = vec3(0,0,1);
}
`]),h=l([`precision highp float;
#define GLSLIFY 1
bool outOfRange(float a, float b, float p) {
return ((p > max(a, b)) ||
(p < min(a, b)));
}
bool outOfRange(vec2 a, vec2 b, vec2 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y));
}
bool outOfRange(vec3 a, vec3 b, vec3 p) {
return (outOfRange(a.x, b.x, p.x) ||
outOfRange(a.y, b.y, p.y) ||
outOfRange(a.z, b.z, p.z));
}
bool outOfRange(vec4 a, vec4 b, vec4 p) {
return outOfRange(a.xyz, b.xyz, p.xyz);
}
uniform vec2 shape;
uniform vec3 clipBounds[2];
uniform float pickId;
varying float value, kill;
varying vec3 worldCoordinate;
varying vec2 planeCoordinate;
varying vec3 surfaceNormal;
vec2 splitFloat(float v) {
float vh = 255.0 * v;
float upper = floor(vh);
float lower = fract(vh);
return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);
}
void main() {
if ((kill > 0.0) ||
(outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;
vec2 ux = splitFloat(planeCoordinate.x / shape.x);
vec2 uy = splitFloat(planeCoordinate.y / shape.y);
gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));
}
`]);a.createShader=function(d){var p=s(d,u,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p.attributes.normal.location=2,p},a.createPickShader=function(d){var p=s(d,u,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p.attributes.normal.location=2,p},a.createContourShader=function(d){var p=s(d,f,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p},a.createPickContourShader=function(d){var p=s(d,f,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p}},9499(n,a,o){"use strict";n.exports=X;var s=o(8828),l=o(2762),u=o(8116),c=o(7766),f=o(1888),h=o(6729),d=o(5298),p=o(9994),v=o(9618),m=o(3711),g=o(6760),w=o(7608),b=o(2478),_=o(6199),M=o(990),x=M.createShader,T=M.createContourShader,A=M.createPickShader,y=M.createPickContourShader,E=40,S=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],C=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],k=[[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 H=0;H<3;++H){var G=k[H],Q=(H+1)%3,te=(H+2)%3;G[Q+0]=1,G[te+3]=1,G[H+6]=1}})();function D(H,G,Q,te,ce){this.position=H,this.index=G,this.uv=Q,this.level=te,this.dataCoordinate=ce}var F=256;function P(H,G,Q,te,ce,ge,Ce,be,he,oe,Ee,ye,ue,ee,ae){this.gl=H,this.shape=G,this.bounds=Q,this.objectOffset=ae,this.intensityBounds=[],this._shader=te,this._pickShader=ce,this._coordinateBuffer=ge,this._vao=Ce,this._colorMap=be,this._contourShader=he,this._contourPickShader=oe,this._contourBuffer=Ee,this._contourVAO=ye,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new D([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=ue,this._dynamicVAO=ee,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=[v(f.mallocFloat(1024),[0,0]),v(f.mallocFloat(1024),[0,0]),v(f.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var R=P.prototype;R.genColormap=function(H,G){var Q=!1,te=p([h({colormap:H,nshades:F,format:"rgba"}).map(function(ce,ge){var Ce=G?L(ge/255,G):ce[3];return Ce<1&&(Q=!0),[ce[0],ce[1],ce[2],255*Ce]})]);return d.divseq(te,255),this.hasAlphaScale=Q,te},R.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},R.isOpaque=function(){return!this.isTransparent()},R.pickSlots=1,R.setPickBase=function(H){this.pickId=H};function L(H,G){if(!G||!G.length)return 1;for(var Q=0;Q<G.length;++Q){if(G.length<2)return 1;if(G[Q][0]===H)return G[Q][1];if(G[Q][0]>H&&Q>0){var te=(G[Q][0]-H)/(G[Q][0]-G[Q-1][0]);return G[Q][1]*(1-te)+te*G[Q-1][1]}}return 1}var I=[0,0,0],B={showSurface:!1,showContour:!1,projections:[S.slice(),S.slice(),S.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function O(H,G){var Q,te,ce,ge=G.axes&&G.axes.lastCubeProps.axis||I,Ce=G.showSurface,be=G.showContour;for(Q=0;Q<3;++Q)for(Ce=Ce||G.surfaceProject[Q],te=0;te<3;++te)be=be||G.contourProject[Q][te];for(Q=0;Q<3;++Q){var he=B.projections[Q];for(te=0;te<16;++te)he[te]=0;for(te=0;te<4;++te)he[5*te]=1;he[5*Q]=0,he[12+Q]=G.axesBounds[+(ge[Q]>0)][Q],g(he,H.model,he);var oe=B.clipBounds[Q];for(ce=0;ce<2;++ce)for(te=0;te<3;++te)oe[ce][te]=H.clipBounds[ce][te];oe[0][Q]=-1e8,oe[1][Q]=1e8}return B.showSurface=Ce,B.showContour=be,B}var $={model:S,view:S,projection:S,inverseModel:S.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},Y=S.slice(),K=[1,0,0,0,1,0,0,0,1];function j(H,G){H=H||{};var Q=this.gl;Q.disable(Q.CULL_FACE),this._colorMap.bind(0);var te=$;te.model=H.model||S,te.view=H.view||S,te.projection=H.projection||S,te.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],te.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],te.objectOffset=this.objectOffset,te.contourColor=this.contourColor[0],te.inverseModel=w(te.inverseModel,te.model);for(var ce=0;ce<2;++ce)for(var ge=te.clipBounds[ce],Ce=0;Ce<3;++Ce)ge[Ce]=Math.min(Math.max(this.clipBounds[ce][Ce],-1e8),1e8);te.kambient=this.ambientLight,te.kdiffuse=this.diffuseLight,te.kspecular=this.specularLight,te.roughness=this.roughness,te.fresnel=this.fresnel,te.opacity=this.opacity,te.height=0,te.permutation=K,te.vertexColor=this.vertexColor;var be=Y;for(g(be,te.view,te.model),g(be,te.projection,be),w(be,be),ce=0;ce<3;++ce)te.eyePosition[ce]=be[12+ce]/be[15];var he=be[15];for(ce=0;ce<3;++ce)he+=this.lightPosition[ce]*be[4*ce+3];for(ce=0;ce<3;++ce){var oe=be[12+ce];for(Ce=0;Ce<3;++Ce)oe+=be[4*Ce+ce]*this.lightPosition[Ce];te.lightPosition[ce]=oe/he}var Ee=O(te,this);if(Ee.showSurface){for(this._shader.bind(),this._shader.uniforms=te,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=Ee.projections[ce],this._shader.uniforms.clipBounds=Ee.clipBounds[ce],this._vao.draw(Q.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Ee.showContour){var ye=this._contourShader;te.kambient=1,te.kdiffuse=0,te.kspecular=0,te.opacity=1,ye.bind(),ye.uniforms=te;var ue=this._contourVAO;for(ue.bind(),ce=0;ce<3;++ce)for(ye.uniforms.permutation=k[ce],Q.lineWidth(this.contourWidth[ce]*this.pixelRatio),Ce=0;Ce<this.contourLevels[ce].length;++Ce)Ce===this.highlightLevel[ce]?(ye.uniforms.contourColor=this.highlightColor[ce],ye.uniforms.contourTint=this.highlightTint[ce]):(Ce===0||Ce-1===this.highlightLevel[ce])&&(ye.uniforms.contourColor=this.contourColor[ce],ye.uniforms.contourTint=this.contourTint[ce]),this._contourCounts[ce][Ce]&&(ye.uniforms.height=this.contourLevels[ce][Ce],ue.draw(Q.LINES,this._contourCounts[ce][Ce],this._contourOffsets[ce][Ce]));for(ce=0;ce<3;++ce)for(ye.uniforms.model=Ee.projections[ce],ye.uniforms.clipBounds=Ee.clipBounds[ce],Ce=0;Ce<3;++Ce)if(this.contourProject[ce][Ce]){ye.uniforms.permutation=k[Ce],Q.lineWidth(this.contourWidth[Ce]*this.pixelRatio);for(var ee=0;ee<this.contourLevels[Ce].length;++ee)ee===this.highlightLevel[Ce]?(ye.uniforms.contourColor=this.highlightColor[Ce],ye.uniforms.contourTint=this.highlightTint[Ce]):(ee===0||ee-1===this.highlightLevel[Ce])&&(ye.uniforms.contourColor=this.contourColor[Ce],ye.uniforms.contourTint=this.contourTint[Ce]),this._contourCounts[Ce][ee]&&(ye.uniforms.height=this.contourLevels[Ce][ee],ue.draw(Q.LINES,this._contourCounts[Ce][ee],this._contourOffsets[Ce][ee]))}for(ue.unbind(),ue=this._dynamicVAO,ue.bind(),ce=0;ce<3;++ce)if(this._dynamicCounts[ce]!==0)for(ye.uniforms.model=te.model,ye.uniforms.clipBounds=te.clipBounds,ye.uniforms.permutation=k[ce],Q.lineWidth(this.dynamicWidth[ce]*this.pixelRatio),ye.uniforms.contourColor=this.dynamicColor[ce],ye.uniforms.contourTint=this.dynamicTint[ce],ye.uniforms.height=this.dynamicLevel[ce],ue.draw(Q.LINES,this._dynamicCounts[ce],this._dynamicOffsets[ce]),Ce=0;Ce<3;++Ce)this.contourProject[Ce][ce]&&(ye.uniforms.model=Ee.projections[Ce],ye.uniforms.clipBounds=Ee.clipBounds[Ce],ue.draw(Q.LINES,this._dynamicCounts[ce],this._dynamicOffsets[ce]));ue.unbind()}}R.draw=function(H){return j.call(this,H,!1)},R.drawTransparent=function(H){return j.call(this,H,!0)};var q={model:S,view:S,projection:S,inverseModel:S,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]};R.drawPick=function(H){H=H||{};var G=this.gl;G.disable(G.CULL_FACE);var Q=q;Q.model=H.model||S,Q.view=H.view||S,Q.projection=H.projection||S,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=K;for(var te=0;te<2;++te)for(var ce=Q.clipBounds[te],ge=0;ge<3;++ge)ce[ge]=Math.min(Math.max(this.clipBounds[te][ge],-1e8),1e8);var Ce=O(Q,this);if(Ce.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=Q,this._vao.bind(),this._vao.draw(G.TRIANGLES,this._vertexCount),te=0;te<3;++te)this.surfaceProject[te]&&(this._pickShader.uniforms.model=Ce.projections[te],this._pickShader.uniforms.clipBounds=Ce.clipBounds[te],this._vao.draw(G.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Ce.showContour){var be=this._contourPickShader;be.bind(),be.uniforms=Q;var he=this._contourVAO;for(he.bind(),ge=0;ge<3;++ge)for(G.lineWidth(this.contourWidth[ge]*this.pixelRatio),be.uniforms.permutation=k[ge],te=0;te<this.contourLevels[ge].length;++te)this._contourCounts[ge][te]&&(be.uniforms.height=this.contourLevels[ge][te],he.draw(G.LINES,this._contourCounts[ge][te],this._contourOffsets[ge][te]));for(te=0;te<3;++te)for(be.uniforms.model=Ce.projections[te],be.uniforms.clipBounds=Ce.clipBounds[te],ge=0;ge<3;++ge)if(this.contourProject[te][ge]){be.uniforms.permutation=k[ge],G.lineWidth(this.contourWidth[ge]*this.pixelRatio);for(var oe=0;oe<this.contourLevels[ge].length;++oe)this._contourCounts[ge][oe]&&(be.uniforms.height=this.contourLevels[ge][oe],he.draw(G.LINES,this._contourCounts[ge][oe],this._contourOffsets[ge][oe]))}he.unbind()}},R.pick=function(H){if(!H||H.id!==this.pickId)return null;var G=this._field[2].shape,Q=this._pickResult,te=G[0]*(H.value[0]+(H.value[2]>>4)/16)/255,ce=Math.floor(te),ge=te-ce,Ce=G[1]*(H.value[1]+(H.value[2]&15)/16)/255,be=Math.floor(Ce),he=Ce-be;ce+=1,be+=1;var oe=Q.position;oe[0]=oe[1]=oe[2]=0;for(var Ee=0;Ee<2;++Ee)for(var ye=Ee?ge:1-ge,ue=0;ue<2;++ue)for(var ee=ue?he:1-he,ae=ce+Ee,xe=be+ue,re=ye*ee,pe=0;pe<3;++pe)oe[pe]+=this._field[pe].get(ae,xe)*re;for(var we=this._pickResult.level,Fe=0;Fe<3;++Fe)if(we[Fe]=b.le(this.contourLevels[Fe],oe[Fe]),we[Fe]<0)this.contourLevels[Fe].length>0&&(we[Fe]=0);else if(we[Fe]<this.contourLevels[Fe].length-1){var Se=this.contourLevels[Fe][we[Fe]],ke=this.contourLevels[Fe][we[Fe]+1];Math.abs(Se-oe[Fe])>Math.abs(ke-oe[Fe])&&(we[Fe]+=1)}for(Q.index[0]=ge<.5?ce:ce+1,Q.index[1]=he<.5?be:be+1,Q.uv[0]=te/G[0],Q.uv[1]=Ce/G[1],pe=0;pe<3;++pe)Q.dataCoordinate[pe]=this._field[pe].get(Q.index[0],Q.index[1]);return Q},R.padField=function(H,G){var Q=G.shape.slice(),te=H.shape.slice();d.assign(H.lo(1,1).hi(Q[0],Q[1]),G),d.assign(H.lo(1).hi(Q[0],1),G.hi(Q[0],1)),d.assign(H.lo(1,te[1]-1).hi(Q[0],1),G.lo(0,Q[1]-1).hi(Q[0],1)),d.assign(H.lo(0,1).hi(1,Q[1]),G.hi(1)),d.assign(H.lo(te[0]-1,1).hi(1,Q[1]),G.lo(Q[0]-1)),H.set(0,0,G.get(0,0)),H.set(0,te[1]-1,G.get(0,Q[1]-1)),H.set(te[0]-1,0,G.get(Q[0]-1,0)),H.set(te[0]-1,te[1]-1,G.get(Q[0]-1,Q[1]-1))};function J(H,G){return Array.isArray(H)?[G(H[0]),G(H[1]),G(H[2])]:[G(H),G(H),G(H)]}function U(H){return Array.isArray(H)?H.length===3?[H[0],H[1],H[2],1]:[H[0],H[1],H[2],H[3]]:[0,0,0,1]}function V(H){if(Array.isArray(H)){if(Array.isArray(H))return[U(H[0]),U(H[1]),U(H[2])];var G=U(H);return[G.slice(),G.slice(),G.slice()]}}R.update=function(H){H=H||{},this.objectOffset=H.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in H&&(this.contourWidth=J(H.contourWidth,Number)),"showContour"in H&&(this.showContour=J(H.showContour,Boolean)),"showSurface"in H&&(this.showSurface=!!H.showSurface),"contourTint"in H&&(this.contourTint=J(H.contourTint,Boolean)),"contourColor"in H&&(this.contourColor=V(H.contourColor)),"contourProject"in H&&(this.contourProject=J(H.contourProject,function(ra){return J(ra,Boolean)})),"surfaceProject"in H&&(this.surfaceProject=H.surfaceProject),"dynamicColor"in H&&(this.dynamicColor=V(H.dynamicColor)),"dynamicTint"in H&&(this.dynamicTint=J(H.dynamicTint,Number)),"dynamicWidth"in H&&(this.dynamicWidth=J(H.dynamicWidth,Number)),"opacity"in H&&(this.opacity=H.opacity),"opacityscale"in H&&(this.opacityscale=H.opacityscale),"colorBounds"in H&&(this.colorBounds=H.colorBounds),"vertexColor"in H&&(this.vertexColor=H.vertexColor?1:0),"colormap"in H&&this._colorMap.setPixels(this.genColormap(H.colormap,this.opacityscale));var G=H.field||H.coords&&H.coords[2]||null,Q=!1;if(G||(this._field[2].shape[0]||this._field[2].shape[2]?G=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):G=this._field[2].hi(0,0)),"field"in H||"coords"in H){var te=(G.shape[0]+2)*(G.shape[1]+2);te>this._field[2].data.length&&(f.freeFloat(this._field[2].data),this._field[2].data=f.mallocFloat(s.nextPow2(te))),this._field[2]=v(this._field[2].data,[G.shape[0]+2,G.shape[1]+2]),this.padField(this._field[2],G),this.shape=G.shape.slice();for(var ce=this.shape,ge=0;ge<2;++ge)this._field[2].size>this._field[ge].data.length&&(f.freeFloat(this._field[ge].data),this._field[ge].data=f.mallocFloat(this._field[2].size)),this._field[ge]=v(this._field[ge].data,[ce[0]+2,ce[1]+2]);if(H.coords){var Ce=H.coords;if(!Array.isArray(Ce)||Ce.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(ge=0;ge<2;++ge){var be=Ce[ge];for(ue=0;ue<2;++ue)if(be.shape[ue]!==ce[ue])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[ge],be)}}else if(H.ticks){var he=H.ticks;if(!Array.isArray(he)||he.length!==2)throw new Error("gl-surface: invalid ticks");for(ge=0;ge<2;++ge){var oe=he[ge];if((Array.isArray(oe)||oe.length)&&(oe=v(oe)),oe.shape[0]!==ce[ge])throw new Error("gl-surface: invalid tick length");var Ee=v(oe.data,ce);Ee.stride[ge]=oe.stride[0],Ee.stride[ge^1]=0,this.padField(this._field[ge],Ee)}}else{for(ge=0;ge<2;++ge){var ye=[0,0];ye[ge]=1,this._field[ge]=v(this._field[ge].data,[ce[0]+2,ce[1]+2],ye,0)}this._field[0].set(0,0,0);for(var ue=0;ue<ce[0];++ue)this._field[0].set(ue+1,0,ue);for(this._field[0].set(ce[0]+1,0,ce[0]-1),this._field[1].set(0,0,0),ue=0;ue<ce[1];++ue)this._field[1].set(0,ue+1,ue);this._field[1].set(0,ce[1]+1,ce[1]-1)}var ee=this._field,ae=v(f.mallocFloat(ee[2].size*3*2),[3,ce[0]+2,ce[1]+2,2]);for(ge=0;ge<3;++ge)_(ae.pick(ge),ee[ge],"mirror");var xe=v(f.mallocFloat(ee[2].size*3),[ce[0]+2,ce[1]+2,3]);for(ge=0;ge<ce[0]+2;++ge)for(ue=0;ue<ce[1]+2;++ue){var re=ae.get(0,ge,ue,0),pe=ae.get(0,ge,ue,1),we=ae.get(1,ge,ue,0),Fe=ae.get(1,ge,ue,1),Se=ae.get(2,ge,ue,0),ke=ae.get(2,ge,ue,1),_e=we*ke-Fe*Se,Ie=Se*pe-ke*re,Oe=re*Fe-pe*we,Qe=Math.sqrt(_e*_e+Ie*Ie+Oe*Oe);Qe<1e-8?(Qe=Math.max(Math.abs(_e),Math.abs(Ie),Math.abs(Oe)),Qe<1e-8?(Oe=1,Ie=_e=0,Qe=1):Qe=1/Qe):Qe=1/Math.sqrt(Qe),xe.set(ge,ue,0,_e*Qe),xe.set(ge,ue,1,Ie*Qe),xe.set(ge,ue,2,Oe*Qe)}f.free(ae.data);var et=[1/0,1/0,1/0],_t=[-1/0,-1/0,-1/0],ut=1/0,vt=-1/0,Xe=(ce[0]-1)*(ce[1]-1)*6,mt=f.mallocFloat(s.nextPow2(10*Xe)),bt=0,Ne=0;for(ge=0;ge<ce[0]-1;++ge)e:for(ue=0;ue<ce[1]-1;++ue){for(var Ue=0;Ue<2;++Ue)for(var Ge=0;Ge<2;++Ge)for(var je=0;je<3;++je){var Re=this._field[je].get(1+ge+Ue,1+ue+Ge);if(isNaN(Re)||!isFinite(Re))continue e}for(je=0;je<6;++je){var Ve=ge+C[je][0],ct=ue+C[je][1],Tt=this._field[0].get(Ve+1,ct+1),Xt=this._field[1].get(Ve+1,ct+1);Re=this._field[2].get(Ve+1,ct+1),_e=xe.get(Ve+1,ct+1,0),Ie=xe.get(Ve+1,ct+1,1),Oe=xe.get(Ve+1,ct+1,2),H.intensity&&(Vt=H.intensity.get(Ve,ct));var Vt=H.intensity?H.intensity.get(Ve,ct):Re+this.objectOffset[2];mt[bt++]=Ve,mt[bt++]=ct,mt[bt++]=Tt,mt[bt++]=Xt,mt[bt++]=Re,mt[bt++]=0,mt[bt++]=Vt,mt[bt++]=_e,mt[bt++]=Ie,mt[bt++]=Oe,et[0]=Math.min(et[0],Tt+this.objectOffset[0]),et[1]=Math.min(et[1],Xt+this.objectOffset[1]),et[2]=Math.min(et[2],Re+this.objectOffset[2]),ut=Math.min(ut,Vt),_t[0]=Math.max(_t[0],Tt+this.objectOffset[0]),_t[1]=Math.max(_t[1],Xt+this.objectOffset[1]),_t[2]=Math.max(_t[2],Re+this.objectOffset[2]),vt=Math.max(vt,Vt),Ne+=1}}for(H.intensityBounds&&(ut=+H.intensityBounds[0],vt=+H.intensityBounds[1]),ge=6;ge<bt;ge+=10)mt[ge]=(mt[ge]-ut)/(vt-ut);this._vertexCount=Ne,this._coordinateBuffer.update(mt.subarray(0,bt)),f.freeFloat(mt),f.free(xe.data),this.bounds=[et,_t],this.intensity=H.intensity||this._field[2],(this.intensityBounds[0]!==ut||this.intensityBounds[1]!==vt)&&(Q=!0),this.intensityBounds=[ut,vt]}if("levels"in H){var lr=H.levels;for(Array.isArray(lr[0])?lr=lr.slice():lr=[[],[],lr],ge=0;ge<3;++ge)lr[ge]=lr[ge].slice(),lr[ge].sort(function(ra,ds){return ra-ds});for(ge=0;ge<3;++ge)for(ue=0;ue<lr[ge].length;++ue)lr[ge][ue]-=this.objectOffset[ge];e:for(ge=0;ge<3;++ge){if(lr[ge].length!==this.contourLevels[ge].length){Q=!0;break}for(ue=0;ue<lr[ge].length;++ue)if(lr[ge][ue]!==this.contourLevels[ge][ue]){Q=!0;break e}}this.contourLevels=lr}if(Q){ee=this._field,ce=this.shape;for(var ur=[],Bt=0;Bt<3;++Bt){var Zt=this.contourLevels[Bt],kr=[],$e=[],tt=[0,0,0];for(ge=0;ge<Zt.length;++ge){var st=m(this._field[Bt],Zt[ge]);kr.push(ur.length/5|0),Ne=0;e:for(ue=0;ue<st.cells.length;++ue){var xt=st.cells[ue];for(je=0;je<2;++je){var Je=st.positions[xt[je]],Ct=Je[0],ir=Math.floor(Ct)|0,hr=Ct-ir,Ur=Je[1],si=Math.floor(Ur)|0,ei=Ur-si,Lr=!1;t:for(var $i=0;$i<3;++$i){tt[$i]=0;var Tn=(Bt+$i+1)%3;for(Ue=0;Ue<2;++Ue){var hn=Ue?hr:1-hr;for(Ve=Math.min(Math.max(ir+Ue,0),ce[0])|0,Ge=0;Ge<2;++Ge){var ta=Ge?ei:1-ei;if(ct=Math.min(Math.max(si+Ge,0),ce[1])|0,$i<2?Re=this._field[Tn].get(Ve,ct):Re=(this.intensity.get(Ve,ct)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(Re)||isNaN(Re)){Lr=!0;break t}var ca=hn*ta;tt[$i]+=ca*Re}}}if(!Lr)ur.push(tt[0],tt[1],Je[0],Je[1],tt[2]),Ne+=1;else{if(je>0){for(var dn=0;dn<5;++dn)ur.pop();Ne-=1}continue e}}}$e.push(Ne)}this._contourOffsets[Bt]=kr,this._contourCounts[Bt]=$e}var Vn=f.mallocFloat(ur.length);for(ge=0;ge<ur.length;++ge)Vn[ge]=ur[ge];this._contourBuffer.update(Vn),f.freeFloat(Vn)}},R.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 H=0;H<3;++H)f.freeFloat(this._field[H].data)},R.highlight=function(H){var G;if(!H){this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],this.highlightLevel=[-1,-1,-1];return}for(G=0;G<3;++G)this.enableHighlight[G]?this.highlightLevel[G]=H.level[G]:this.highlightLevel[G]=-1;var Q;for(this.snapToData?Q=H.dataCoordinate:Q=H.position,G=0;G<3;++G)Q[G]-=this.objectOffset[G];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 te=0,ce=this.shape,ge=f.mallocFloat(12*ce[0]*ce[1]),Ce=0;Ce<3;++Ce){if(!this.enableDynamic[Ce]){this.dynamicLevel[Ce]=NaN,this._dynamicCounts[Ce]=0;continue}this.dynamicLevel[Ce]=Q[Ce];var be=(Ce+1)%3,he=(Ce+2)%3,oe=this._field[Ce],Ee=this._field[be],ye=this._field[he],ue=m(oe,Q[Ce]),ee=ue.cells,ae=ue.positions;for(this._dynamicOffsets[Ce]=te,G=0;G<ee.length;++G)for(var xe=ee[G],re=0;re<2;++re){var pe=ae[xe[re]],we=+pe[0],Fe=we|0,Se=Math.min(Fe+1,ce[0])|0,ke=we-Fe,_e=1-ke,Ie=+pe[1],Oe=Ie|0,Qe=Math.min(Oe+1,ce[1])|0,et=Ie-Oe,_t=1-et,ut=_e*_t,vt=_e*et,Xe=ke*_t,mt=ke*et,bt=ut*Ee.get(Fe,Oe)+vt*Ee.get(Fe,Qe)+Xe*Ee.get(Se,Oe)+mt*Ee.get(Se,Qe),Ne=ut*ye.get(Fe,Oe)+vt*ye.get(Fe,Qe)+Xe*ye.get(Se,Oe)+mt*ye.get(Se,Qe);if(isNaN(bt)||isNaN(Ne)){re&&(te-=1);break}ge[2*te+0]=bt,ge[2*te+1]=Ne,te+=1}this._dynamicCounts[Ce]=te-this._dynamicOffsets[Ce]}this._dynamicBuffer.update(ge.subarray(0,2*te)),f.freeFloat(ge)}};function X(H){var G=H.gl,Q=x(G),te=A(G),ce=T(G),ge=y(G),Ce=l(G),be=u(G,[{buffer:Ce,size:4,stride:E,offset:0},{buffer:Ce,size:3,stride:E,offset:16},{buffer:Ce,size:3,stride:E,offset:28}]),he=l(G),oe=u(G,[{buffer:he,size:4,stride:20,offset:0},{buffer:he,size:1,stride:20,offset:16}]),Ee=l(G),ye=u(G,[{buffer:Ee,size:2,type:G.FLOAT}]),ue=c(G,1,F,G.RGBA,G.UNSIGNED_BYTE);ue.minFilter=G.LINEAR,ue.magFilter=G.LINEAR;var ee=new P(G,[0,0],[[0,0,0],[0,0,0]],Q,te,Ce,be,ue,ce,ge,he,oe,Ee,ye,[0,0,0]),ae={levels:[[],[],[]]};for(var xe in H)ae[xe]=H[xe];return ae.colormap=ae.colormap||"jet",ee.update(ae),ee}},7766(n,a,o){"use strict";var s=o(9618),l=o(5298),u=o(1888);n.exports=y;var c=null,f=null,h=null;function d(E){c=[E.LINEAR,E.NEAREST_MIPMAP_LINEAR,E.LINEAR_MIPMAP_NEAREST,E.LINEAR_MIPMAP_NEAREST],f=[E.NEAREST,E.LINEAR,E.NEAREST_MIPMAP_NEAREST,E.NEAREST_MIPMAP_LINEAR,E.LINEAR_MIPMAP_NEAREST,E.LINEAR_MIPMAP_LINEAR],h=[E.REPEAT,E.CLAMP_TO_EDGE,E.MIRRORED_REPEAT]}function p(E){return typeof HTMLCanvasElement!="undefined"&&E instanceof HTMLCanvasElement||typeof HTMLImageElement!="undefined"&&E instanceof HTMLImageElement||typeof HTMLVideoElement!="undefined"&&E instanceof HTMLVideoElement||typeof ImageData!="undefined"&&E instanceof ImageData}var v=function(E,S){l.muls(E,S,255)};function m(E,S,C){var k=E.gl,D=k.getParameter(k.MAX_TEXTURE_SIZE);if(S<0||S>D||C<0||C>D)throw new Error("gl-texture2d: Invalid texture size");return E._shape=[S,C],E.bind(),k.texImage2D(k.TEXTURE_2D,0,E.format,S,C,0,E.format,E.type,null),E._mipLevels=[0],E}function g(E,S,C,k,D,F){this.gl=E,this.handle=S,this.format=D,this.type=F,this._shape=[C,k],this._mipLevels=[0],this._magFilter=E.NEAREST,this._minFilter=E.NEAREST,this._wrapS=E.CLAMP_TO_EDGE,this._wrapT=E.CLAMP_TO_EDGE,this._anisoSamples=1;var P=this,R=[this._wrapS,this._wrapT];Object.defineProperties(R,[{get:function(){return P._wrapS},set:function(I){return P.wrapS=I}},{get:function(){return P._wrapT},set:function(I){return P.wrapT=I}}]),this._wrapVector=R;var L=[this._shape[0],this._shape[1]];Object.defineProperties(L,[{get:function(){return P._shape[0]},set:function(I){return P.width=I}},{get:function(){return P._shape[1]},set:function(I){return P.height=I}}]),this._shapeVector=L}var w=g.prototype;Object.defineProperties(w,{minFilter:{get:function(){return this._minFilter},set:function(E){this.bind();var S=this.gl;if(this.type===S.FLOAT&&c.indexOf(E)>=0&&(S.getExtension("OES_texture_float_linear")||(E=S.NEAREST)),f.indexOf(E)<0)throw new Error("gl-texture2d: Unknown filter mode "+E);return S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,E),this._minFilter=E}},magFilter:{get:function(){return this._magFilter},set:function(E){this.bind();var S=this.gl;if(this.type===S.FLOAT&&c.indexOf(E)>=0&&(S.getExtension("OES_texture_float_linear")||(E=S.NEAREST)),f.indexOf(E)<0)throw new Error("gl-texture2d: Unknown filter mode "+E);return S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,E),this._magFilter=E}},mipSamples:{get:function(){return this._anisoSamples},set:function(E){var S=this._anisoSamples;if(this._anisoSamples=Math.max(E,1)|0,S!==this._anisoSamples){var C=this.gl.getExtension("EXT_texture_filter_anisotropic");C&&this.gl.texParameterf(this.gl.TEXTURE_2D,C.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(E){if(this.bind(),h.indexOf(E)<0)throw new Error("gl-texture2d: Unknown wrap mode "+E);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,E),this._wrapS=E}},wrapT:{get:function(){return this._wrapT},set:function(E){if(this.bind(),h.indexOf(E)<0)throw new Error("gl-texture2d: Unknown wrap mode "+E);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,E),this._wrapT=E}},wrap:{get:function(){return this._wrapVector},set:function(E){if(Array.isArray(E)||(E=[E,E]),E.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var S=0;S<2;++S)if(h.indexOf(E[S])<0)throw new Error("gl-texture2d: Unknown wrap mode "+E);this._wrapS=E[0],this._wrapT=E[1];var C=this.gl;return this.bind(),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_S,this._wrapS),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_T,this._wrapT),E}},shape:{get:function(){return this._shapeVector},set:function(E){if(!Array.isArray(E))E=[E|0,E|0];else if(E.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return m(this,E[0]|0,E[1]|0),[E[0]|0,E[1]|0]}},width:{get:function(){return this._shape[0]},set:function(E){return E=E|0,m(this,E,this._shape[1]),E}},height:{get:function(){return this._shape[1]},set:function(E){return E=E|0,m(this,this._shape[0],E),E}}}),w.bind=function(E){var S=this.gl;return E!==void 0&&S.activeTexture(S.TEXTURE0+(E|0)),S.bindTexture(S.TEXTURE_2D,this.handle),E!==void 0?E|0:S.getParameter(S.ACTIVE_TEXTURE)-S.TEXTURE0},w.dispose=function(){this.gl.deleteTexture(this.handle)},w.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var E=Math.min(this._shape[0],this._shape[1]),S=0;E>0;++S,E>>>=1)this._mipLevels.indexOf(S)<0&&this._mipLevels.push(S)},w.setPixels=function(E,S,C,k){var D=this.gl;this.bind(),Array.isArray(S)?(k=C,C=S[1]|0,S=S[0]|0):(S=S||0,C=C||0),k=k||0;var F=p(E)?E:E.raw;if(F){var P=this._mipLevels.indexOf(k)<0;P?(D.texImage2D(D.TEXTURE_2D,0,this.format,this.format,this.type,F),this._mipLevels.push(k)):D.texSubImage2D(D.TEXTURE_2D,k,S,C,this.format,this.type,F)}else if(E.shape&&E.stride&&E.data){if(E.shape.length<2||S+E.shape[1]>this._shape[1]>>>k||C+E.shape[0]>this._shape[0]>>>k||S<0||C<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");_(D,S,C,k,this.format,this.type,this._mipLevels,E)}else throw new Error("gl-texture2d: Unsupported data type")};function b(E,S){return E.length===3?S[2]===1&&S[1]===E[0]*E[2]&&S[0]===E[2]:S[0]===1&&S[1]===E[0]}function _(E,S,C,k,D,F,P,R){var L=R.dtype,I=R.shape.slice();if(I.length<2||I.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var B=0,O=0,$=b(I,R.stride.slice());L==="float32"?B=E.FLOAT:L==="float64"?(B=E.FLOAT,$=!1,L="float32"):L==="uint8"?B=E.UNSIGNED_BYTE:(B=E.UNSIGNED_BYTE,$=!1,L="uint8");var Y=1;if(I.length===2)O=E.LUMINANCE,I=[I[0],I[1],1],R=s(R.data,I,[R.stride[0],R.stride[1],1],R.offset);else if(I.length===3){if(I[2]===1)O=E.ALPHA;else if(I[2]===2)O=E.LUMINANCE_ALPHA;else if(I[2]===3)O=E.RGB;else if(I[2]===4)O=E.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");Y=I[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((O===E.LUMINANCE||O===E.ALPHA)&&(D===E.LUMINANCE||D===E.ALPHA)&&(O=D),O!==D)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var K=R.size,j=P.indexOf(k)<0;if(j&&P.push(k),B===F&&$)R.offset===0&&R.data.length===K?j?E.texImage2D(E.TEXTURE_2D,k,D,I[0],I[1],0,D,F,R.data):E.texSubImage2D(E.TEXTURE_2D,k,S,C,I[0],I[1],D,F,R.data):j?E.texImage2D(E.TEXTURE_2D,k,D,I[0],I[1],0,D,F,R.data.subarray(R.offset,R.offset+K)):E.texSubImage2D(E.TEXTURE_2D,k,S,C,I[0],I[1],D,F,R.data.subarray(R.offset,R.offset+K));else{var q;F===E.FLOAT?q=u.mallocFloat32(K):q=u.mallocUint8(K);var J=s(q,I,[I[2],I[2]*I[0],1]);B===E.FLOAT&&F===E.UNSIGNED_BYTE?v(J,R):l.assign(J,R),j?E.texImage2D(E.TEXTURE_2D,k,D,I[0],I[1],0,D,F,q.subarray(0,K)):E.texSubImage2D(E.TEXTURE_2D,k,S,C,I[0],I[1],D,F,q.subarray(0,K)),F===E.FLOAT?u.freeFloat32(q):u.freeUint8(q)}}function M(E){var S=E.createTexture();return E.bindTexture(E.TEXTURE_2D,S),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MIN_FILTER,E.NEAREST),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MAG_FILTER,E.NEAREST),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_S,E.CLAMP_TO_EDGE),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_WRAP_T,E.CLAMP_TO_EDGE),S}function x(E,S,C,k,D){var F=E.getParameter(E.MAX_TEXTURE_SIZE);if(S<0||S>F||C<0||C>F)throw new Error("gl-texture2d: Invalid texture shape");if(D===E.FLOAT&&!E.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var P=M(E);return E.texImage2D(E.TEXTURE_2D,0,k,S,C,0,k,D,null),new g(E,P,S,C,k,D)}function T(E,S,C,k,D,F){var P=M(E);return E.texImage2D(E.TEXTURE_2D,0,D,D,F,S),new g(E,P,C,k,D,F)}function A(E,S){var C=S.dtype,k=S.shape.slice(),D=E.getParameter(E.MAX_TEXTURE_SIZE);if(k[0]<0||k[0]>D||k[1]<0||k[1]>D)throw new Error("gl-texture2d: Invalid texture size");var F=b(k,S.stride.slice()),P=0;C==="float32"?P=E.FLOAT:C==="float64"?(P=E.FLOAT,F=!1,C="float32"):C==="uint8"?P=E.UNSIGNED_BYTE:(P=E.UNSIGNED_BYTE,F=!1,C="uint8");var R=0;if(k.length===2)R=E.LUMINANCE,k=[k[0],k[1],1],S=s(S.data,k,[S.stride[0],S.stride[1],1],S.offset);else if(k.length===3)if(k[2]===1)R=E.ALPHA;else if(k[2]===2)R=E.LUMINANCE_ALPHA;else if(k[2]===3)R=E.RGB;else if(k[2]===4)R=E.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");P===E.FLOAT&&!E.getExtension("OES_texture_float")&&(P=E.UNSIGNED_BYTE,F=!1);var L,I,B=S.size;if(F)S.offset===0&&S.data.length===B?L=S.data:L=S.data.subarray(S.offset,S.offset+B);else{var O=[k[2],k[2]*k[0],1];I=u.malloc(B,C);var $=s(I,k,O,0);(C==="float32"||C==="float64")&&P===E.UNSIGNED_BYTE?v($,S):l.assign($,S),L=I.subarray(0,B)}var Y=M(E);return E.texImage2D(E.TEXTURE_2D,0,R,k[0],k[1],0,R,P,L),F||u.free(I),new g(E,Y,k[0],k[1],R,P)}function y(E){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(c||d(E),typeof arguments[1]=="number")return x(E,arguments[1],arguments[2],arguments[3]||E.RGBA,arguments[4]||E.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return x(E,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||E.RGBA,arguments[3]||E.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var S=arguments[1],C=p(S)?S:S.raw;if(C)return T(E,C,S.width|0,S.height|0,arguments[2]||E.RGBA,arguments[3]||E.UNSIGNED_BYTE);if(S.shape&&S.data&&S.stride)return A(E,S)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433(n){"use strict";function a(o,s,l){s?s.bind():o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null);var u=o.getParameter(o.MAX_VERTEX_ATTRIBS)|0;if(l){if(l.length>u)throw new Error("gl-vao: Too many vertex attributes");for(var c=0;c<l.length;++c){var f=l[c];if(f.buffer){var h=f.buffer,d=f.size||4,p=f.type||o.FLOAT,v=!!f.normalized,m=f.stride||0,g=f.offset||0;h.bind(),o.enableVertexAttribArray(c),o.vertexAttribPointer(c,d,p,v,m,g)}else{if(typeof f=="number")o.vertexAttrib1f(c,f);else if(f.length===1)o.vertexAttrib1f(c,f[0]);else if(f.length===2)o.vertexAttrib2f(c,f[0],f[1]);else if(f.length===3)o.vertexAttrib3f(c,f[0],f[1],f[2]);else if(f.length===4)o.vertexAttrib4f(c,f[0],f[1],f[2],f[3]);else throw new Error("gl-vao: Invalid vertex attribute");o.disableVertexAttribArray(c)}}for(;c<u;++c)o.disableVertexAttribArray(c)}else{o.bindBuffer(o.ARRAY_BUFFER,null);for(var c=0;c<u;++c)o.disableVertexAttribArray(c)}}n.exports=a},870(n,a,o){"use strict";var s=o(1433);function l(c){this.gl=c,this._elements=null,this._attributes=null,this._elementsType=c.UNSIGNED_SHORT}l.prototype.bind=function(){s(this.gl,this._elements,this._attributes)},l.prototype.update=function(c,f,h){this._elements=f,this._attributes=c,this._elementsType=h||this.gl.UNSIGNED_SHORT},l.prototype.dispose=function(){},l.prototype.unbind=function(){},l.prototype.draw=function(c,f,h){h=h||0;var d=this.gl;this._elements?d.drawElements(c,f,this._elementsType,h):d.drawArrays(c,h,f)};function u(c){return new l(c)}n.exports=u},7518(n,a,o){"use strict";var s=o(1433);function l(f,h,d,p,v,m){this.location=f,this.dimension=h,this.a=d,this.b=p,this.c=v,this.d=m}l.prototype.bind=function(f){switch(this.dimension){case 1:f.vertexAttrib1f(this.location,this.a);break;case 2:f.vertexAttrib2f(this.location,this.a,this.b);break;case 3:f.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:f.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function u(f,h,d){this.gl=f,this._ext=h,this.handle=d,this._attribs=[],this._useElements=!1,this._elementsType=f.UNSIGNED_SHORT}u.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var f=0;f<this._attribs.length;++f)this._attribs[f].bind(this.gl)},u.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},u.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},u.prototype.update=function(f,h,d){if(this.bind(),s(this.gl,h,f),this.unbind(),this._attribs.length=0,f)for(var p=0;p<f.length;++p){var v=f[p];typeof v=="number"?this._attribs.push(new l(p,1,v)):Array.isArray(v)&&this._attribs.push(new l(p,v.length,v[0],v[1],v[2],v[3]))}this._useElements=!!h,this._elementsType=d||this.gl.UNSIGNED_SHORT},u.prototype.draw=function(f,h,d){d=d||0;var p=this.gl;this._useElements?p.drawElements(f,h,this._elementsType,d):p.drawArrays(f,d,h)};function c(f,h){return new u(f,h,h.createVertexArrayOES())}n.exports=c},8116(n,a,o){"use strict";var s=o(7518),l=o(870);function u(f){this.bindVertexArrayOES=f.bindVertexArray.bind(f),this.createVertexArrayOES=f.createVertexArray.bind(f),this.deleteVertexArrayOES=f.deleteVertexArray.bind(f)}function c(f,h,d,p){var v=f.createVertexArray?new u(f):f.getExtension("OES_vertex_array_object"),m;return v?m=s(f,v):m=l(f),m.update(h,d,p),m}n.exports=c},5632(n){n.exports=a;function a(o,s,l){return o[0]=s[0]+l[0],o[1]=s[1]+l[1],o[2]=s[2]+l[2],o}},8192(n,a,o){n.exports=c;var s=o(2825),l=o(3536),u=o(244);function c(f,h){var d=s(f[0],f[1],f[2]),p=s(h[0],h[1],h[2]);l(d,d),l(p,p);var v=u(d,p);return v>1?0:Math.acos(v)}},9226(n){n.exports=a;function a(o,s){return o[0]=Math.ceil(s[0]),o[1]=Math.ceil(s[1]),o[2]=Math.ceil(s[2]),o}},3126(n){n.exports=a;function a(o){var s=new Float32Array(3);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s}},3990(n){n.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o}},1091(n){n.exports=a;function a(){var o=new Float32Array(3);return o[0]=0,o[1]=0,o[2]=0,o}},5911(n){n.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],p=l[2];return o[0]=c*p-f*d,o[1]=f*h-u*p,o[2]=u*d-c*h,o}},5455(n,a,o){n.exports=o(7056)},7056(n){n.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return Math.sqrt(l*l+u*u+c*c)}},4008(n,a,o){n.exports=o(6690)},6690(n){n.exports=a;function a(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o}},244(n){n.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]}},2613(n){n.exports=1e-6},9922(n,a,o){n.exports=l;var s=o(2613);function l(u,c){var f=u[0],h=u[1],d=u[2],p=c[0],v=c[1],m=c[2];return Math.abs(f-p)<=s*Math.max(1,Math.abs(f),Math.abs(p))&&Math.abs(h-v)<=s*Math.max(1,Math.abs(h),Math.abs(v))&&Math.abs(d-m)<=s*Math.max(1,Math.abs(d),Math.abs(m))}},9265(n){n.exports=a;function a(o,s){return o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]}},2681(n){n.exports=a;function a(o,s){return o[0]=Math.floor(s[0]),o[1]=Math.floor(s[1]),o[2]=Math.floor(s[2]),o}},5137(n,a,o){n.exports=l;var s=o(1091)();function l(u,c,f,h,d,p){var v,m;for(c||(c=3),f||(f=0),h?m=Math.min(h*c+f,u.length):m=u.length,v=f;v<m;v+=c)s[0]=u[v],s[1]=u[v+1],s[2]=u[v+2],d(s,s,p),u[v]=s[0],u[v+1]=s[1],u[v+2]=s[2];return u}},2825(n){n.exports=a;function a(o,s,l){var u=new Float32Array(3);return u[0]=o,u[1]=s,u[2]=l,u}},2931(n,a,o){n.exports={EPSILON:o(2613),create:o(1091),clone:o(3126),angle:o(8192),fromValues:o(2825),copy:o(3990),set:o(1463),equals:o(9922),exactEquals:o(9265),add:o(5632),subtract:o(6843),sub:o(2229),multiply:o(5847),mul:o(4505),divide:o(6690),div:o(4008),min:o(8107),max:o(7417),floor:o(2681),ceil:o(9226),round:o(2447),scale:o(6621),scaleAndAdd:o(8489),distance:o(7056),dist:o(5455),squaredDistance:o(2953),sqrDist:o(6141),length:o(1387),len:o(868),squaredLength:o(3066),sqrLen:o(5486),negate:o(5093),inverse:o(811),normalize:o(3536),dot:o(244),cross:o(5911),lerp:o(6658),random:o(7636),transformMat4:o(5673),transformMat3:o(492),transformQuat:o(264),rotateX:o(6894),rotateY:o(109),rotateZ:o(8692),forEach:o(5137)}},811(n){n.exports=a;function a(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o}},868(n,a,o){n.exports=o(1387)},1387(n){n.exports=a;function a(o){var s=o[0],l=o[1],u=o[2];return Math.sqrt(s*s+l*l+u*u)}},6658(n){n.exports=a;function a(o,s,l,u){var c=s[0],f=s[1],h=s[2];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=h+u*(l[2]-h),o}},7417(n){n.exports=a;function a(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o}},8107(n){n.exports=a;function a(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o}},4505(n,a,o){n.exports=o(5847)},5847(n){n.exports=a;function a(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o}},5093(n){n.exports=a;function a(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o}},3536(n){n.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=l*l+u*u+c*c;return f>0&&(f=1/Math.sqrt(f),o[0]=s[0]*f,o[1]=s[1]*f,o[2]=s[2]*f),o}},7636(n){n.exports=a;function a(o,s){s=s||1;var l=Math.random()*2*Math.PI,u=Math.random()*2-1,c=Math.sqrt(1-u*u)*s;return o[0]=Math.cos(l)*c,o[1]=Math.sin(l)*c,o[2]=u*s,o}},6894(n){n.exports=a;function a(o,s,l,u){var c=l[1],f=l[2],h=s[1]-c,d=s[2]-f,p=Math.sin(u),v=Math.cos(u);return o[0]=s[0],o[1]=c+h*v-d*p,o[2]=f+h*p+d*v,o}},109(n){n.exports=a;function a(o,s,l,u){var c=l[0],f=l[2],h=s[0]-c,d=s[2]-f,p=Math.sin(u),v=Math.cos(u);return o[0]=c+d*p+h*v,o[1]=s[1],o[2]=f+d*v-h*p,o}},8692(n){n.exports=a;function a(o,s,l,u){var c=l[0],f=l[1],h=s[0]-c,d=s[1]-f,p=Math.sin(u),v=Math.cos(u);return o[0]=c+h*v-d*p,o[1]=f+h*p+d*v,o[2]=s[2],o}},2447(n){n.exports=a;function a(o,s){return o[0]=Math.round(s[0]),o[1]=Math.round(s[1]),o[2]=Math.round(s[2]),o}},6621(n){n.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o}},8489(n){n.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o}},1463(n){n.exports=a;function a(o,s,l,u){return o[0]=s,o[1]=l,o[2]=u,o}},6141(n,a,o){n.exports=o(2953)},5486(n,a,o){n.exports=o(3066)},2953(n){n.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return l*l+u*u+c*c}},3066(n){n.exports=a;function a(o){var s=o[0],l=o[1],u=o[2];return s*s+l*l+u*u}},2229(n,a,o){n.exports=o(6843)},6843(n){n.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o}},492(n){n.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2];return o[0]=u*l[0]+c*l[3]+f*l[6],o[1]=u*l[1]+c*l[4]+f*l[7],o[2]=u*l[2]+c*l[5]+f*l[8],o}},5673(n){n.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[3]*u+l[7]*c+l[11]*f+l[15];return h=h||1,o[0]=(l[0]*u+l[4]*c+l[8]*f+l[12])/h,o[1]=(l[1]*u+l[5]*c+l[9]*f+l[13])/h,o[2]=(l[2]*u+l[6]*c+l[10]*f+l[14])/h,o}},264(n){n.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],p=l[2],v=l[3],m=d*f-p*c,g=p*u-h*f,w=h*c-d*u;return m*=2,g*=2,w*=2,o[0]=u+v*m+d*w-p*g,o[1]=c+v*g+p*m-h*w,o[2]=f+v*w+h*g-d*m,o}},4361(n){n.exports=a;function a(o,s,l){return o[0]=s[0]+l[0],o[1]=s[1]+l[1],o[2]=s[2]+l[2],o[3]=s[3]+l[3],o}},2335(n){n.exports=a;function a(o){var s=new Float32Array(4);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s}},2933(n){n.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o}},7536(n){n.exports=a;function a(){var o=new Float32Array(4);return o[0]=0,o[1]=0,o[2]=0,o[3]=0,o}},4691(n){n.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return Math.sqrt(l*l+u*u+c*c+f*f)}},1373(n){n.exports=a;function a(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o[3]=s[3]/l[3],o}},3750(n){n.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]*s[3]}},3390(n){n.exports=a;function a(o,s,l,u){var c=new Float32Array(4);return c[0]=o,c[1]=s,c[2]=l,c[3]=u,c}},9970(n,a,o){n.exports={create:o(7536),clone:o(2335),fromValues:o(3390),copy:o(2933),set:o(4578),add:o(4361),subtract:o(6860),multiply:o(3576),divide:o(1373),min:o(2334),max:o(160),scale:o(9288),scaleAndAdd:o(4844),distance:o(4691),squaredDistance:o(7960),length:o(6808),squaredLength:o(483),negate:o(1498),inverse:o(4494),normalize:o(5177),dot:o(3750),lerp:o(2573),random:o(9131),transformMat4:o(5352),transformQuat:o(4041)}},4494(n){n.exports=a;function a(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o[3]=1/s[3],o}},6808(n){n.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3];return Math.sqrt(s*s+l*l+u*u+c*c)}},2573(n){n.exports=a;function a(o,s,l,u){var c=s[0],f=s[1],h=s[2],d=s[3];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=h+u*(l[2]-h),o[3]=d+u*(l[3]-d),o}},160(n){n.exports=a;function a(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o[3]=Math.max(s[3],l[3]),o}},2334(n){n.exports=a;function a(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o[3]=Math.min(s[3],l[3]),o}},3576(n){n.exports=a;function a(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o[3]=s[3]*l[3],o}},1498(n){n.exports=a;function a(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o[3]=-s[3],o}},5177(n){n.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],h=l*l+u*u+c*c+f*f;return h>0&&(h=1/Math.sqrt(h),o[0]=l*h,o[1]=u*h,o[2]=c*h,o[3]=f*h),o}},9131(n,a,o){var s=o(5177),l=o(9288);n.exports=u;function u(c,f){return f=f||1,c[0]=Math.random(),c[1]=Math.random(),c[2]=Math.random(),c[3]=Math.random(),s(c,c),l(c,c,f),c}},9288(n){n.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o[3]=s[3]*l,o}},4844(n){n.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o[3]=s[3]+l[3]*u,o}},4578(n){n.exports=a;function a(o,s,l,u,c){return o[0]=s,o[1]=l,o[2]=u,o[3]=c,o}},7960(n){n.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return l*l+u*u+c*c+f*f}},483(n){n.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3];return s*s+l*l+u*u+c*c}},6860(n){n.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o[3]=s[3]-l[3],o}},5352(n){n.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3];return o[0]=l[0]*u+l[4]*c+l[8]*f+l[12]*h,o[1]=l[1]*u+l[5]*c+l[9]*f+l[13]*h,o[2]=l[2]*u+l[6]*c+l[10]*f+l[14]*h,o[3]=l[3]*u+l[7]*c+l[11]*f+l[15]*h,o}},4041(n){n.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],p=l[2],v=l[3],m=v*u+d*f-p*c,g=v*c+p*u-h*f,w=v*f+h*c-d*u,b=-h*u-d*c-p*f;return o[0]=m*v+b*-h+g*-p-w*-d,o[1]=g*v+b*-d+w*-h-m*-p,o[2]=w*v+b*-p+m*-d-g*-h,o[3]=s[3],o}},1848(n,a,o){var s=o(4905),l=o(6468);n.exports=u;function u(c){for(var f=Array.isArray(c)?c:s(c),h=0;h<f.length;h++){var d=f[h];if(d.type==="preprocessor"){var p=d.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(p&&p[2]){var v=p[1],m=p[2];return(v?l(m):m).trim()}}}}},5874(n,a,o){n.exports=S;var s=o(620),l=o(7827),u=o(6852),c=o(7932),f=o(3508),h=999,d=9999,p=0,v=1,m=2,g=3,w=4,b=5,_=6,M=7,x=8,T=9,A=10,y=11,E=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function S(C){var k=0,D=0,F=h,P,R,L=[],I=[],B=0,O=0,$=1,Y=0,K=0,j=!1,q=!1,J="",U;C=C||{};var V=u,X=s;C.version==="300 es"&&(V=f,X=c);for(var H={},G={},k=0;k<V.length;k++)H[V[k]]=!0;for(var k=0;k<X.length;k++)G[X[k]]=!0;return function(re){return I=[],re!==null?te(re):ce()};function Q(re){re.length&&I.push({type:E[F],data:re,position:K,line:$,column:Y})}function te(re){k=0,re.toString&&(re=re.toString()),J+=re.replace(/\r\n/g,`
`),U=J.length;for(var pe;P=J[k],k<U;){switch(pe=k,F){case p:k=oe();break;case v:k=he();break;case m:k=be();break;case g:k=Ee();break;case w:k=ee();break;case y:k=ue();break;case b:k=ae();break;case d:k=xe();break;case T:k=Ce();break;case h:k=ge();break}pe!==k&&(J[pe]===`
`?(Y=0,++$):++Y)}return D+=k,J=J.slice(k),I}function ce(re){return L.length&&Q(L.join("")),F=A,Q("(eof)"),I}function ge(){return L=L.length?[]:L,R==="/"&&P==="*"?(K=D+k-1,F=p,R=P,k+1):R==="/"&&P==="/"?(K=D+k-1,F=v,R=P,k+1):P==="#"?(F=m,K=D+k,k):/\s/.test(P)?(F=T,K=D+k,k):(j=/\d/.test(P),q=/[^\w_]/.test(P),K=D+k,F=j?w:q?g:d,k)}function Ce(){return/[^\s]/g.test(P)?(Q(L.join("")),F=h,k):(L.push(P),R=P,k+1)}function be(){return(P==="\r"||P===`
`)&&R!=="\\"?(Q(L.join("")),F=h,k):(L.push(P),R=P,k+1)}function he(){return be()}function oe(){return P==="/"&&R==="*"?(L.push(P),Q(L.join("")),F=h,k+1):(L.push(P),R=P,k+1)}function Ee(){if(R==="."&&/\d/.test(P))return F=b,k;if(R==="/"&&P==="*")return F=p,k;if(R==="/"&&P==="/")return F=v,k;if(P==="."&&L.length){for(;ye(L););return F=b,k}if(P===";"||P===")"||P==="("){if(L.length)for(;ye(L););return Q(P),F=h,k+1}var re=L.length===2&&P!=="=";if(/[\w_\d\s]/.test(P)||re){for(;ye(L););return F=h,k}return L.push(P),R=P,k+1}function ye(re){var pe=0,we,Fe;do{if(we=l.indexOf(re.slice(0,re.length+pe).join("")),Fe=l[we],we===-1){if(pe--+re.length>0)continue;Fe=re.slice(0,1).join("")}return Q(Fe),K+=Fe.length,L=L.slice(Fe.length),L.length}while(!0)}function ue(){return/[^a-fA-F0-9]/.test(P)?(Q(L.join("")),F=h,k):(L.push(P),R=P,k+1)}function ee(){return P==="."||/[eE]/.test(P)?(L.push(P),F=b,R=P,k+1):P==="x"&&L.length===1&&L[0]==="0"?(F=y,L.push(P),R=P,k+1):/[^\d]/.test(P)?(Q(L.join("")),F=h,k):(L.push(P),R=P,k+1)}function ae(){return P==="f"&&(L.push(P),R=P,k+=1),/[eE]/.test(P)||(P==="-"||P==="+")&&/[eE]/.test(R)?(L.push(P),R=P,k+1):/[^\d]/.test(P)?(Q(L.join("")),F=h,k):(L.push(P),R=P,k+1)}function xe(){if(/[^\d\w_]/.test(P)){var re=L.join("");return G[re]?F=x:H[re]?F=M:F=_,Q(L.join("")),F=h,k}return L.push(P),R=P,k+1}}},3508(n,a,o){var s=o(6852);s=s.slice().filter(function(l){return!/^(gl\_|texture)/.test(l)}),n.exports=s.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852(n){n.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932(n,a,o){var s=o(620);n.exports=s.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620(n){n.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827(n){n.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905(n,a,o){var s=o(5874);n.exports=l;function l(u,c){var f=s(c),h=[];return h=h.concat(f(u)),h=h.concat(f(null)),h}},3236(n){n.exports=function(a){typeof a=="string"&&(a=[a]);for(var o=[].slice.call(arguments,1),s=[],l=0;l<a.length-1;l++)s.push(a[l],o[l]||"");return s.push(a[l]),s.join("")}},7520(n,a,o){"use strict";var s=o(9507);function l(){var u=!1;try{var c=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("test",null,c),window.removeEventListener("test",null,c)}catch(f){u=!1}return u}n.exports=s&&l()},3778(n,a){a.read=function(o,s,l,u,c){var f,h,d=c*8-u-1,p=(1<<d)-1,v=p>>1,m=-7,g=l?c-1:0,w=l?-1:1,b=o[s+g];for(g+=w,f=b&(1<<-m)-1,b>>=-m,m+=d;m>0;f=f*256+o[s+g],g+=w,m-=8);for(h=f&(1<<-m)-1,f>>=-m,m+=u;m>0;h=h*256+o[s+g],g+=w,m-=8);if(f===0)f=1-v;else{if(f===p)return h?NaN:(b?-1:1)*(1/0);h=h+Math.pow(2,u),f=f-v}return(b?-1:1)*h*Math.pow(2,f-u)},a.write=function(o,s,l,u,c,f){var h,d,p,v=f*8-c-1,m=(1<<v)-1,g=m>>1,w=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,b=u?0:f-1,_=u?1:-1,M=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(d=isNaN(s)?1:0,h=m):(h=Math.floor(Math.log(s)/Math.LN2),s*(p=Math.pow(2,-h))<1&&(h--,p*=2),h+g>=1?s+=w/p:s+=w*Math.pow(2,1-g),s*p>=2&&(h++,p/=2),h+g>=m?(d=0,h=m):h+g>=1?(d=(s*p-1)*Math.pow(2,c),h=h+g):(d=s*Math.pow(2,g-1)*Math.pow(2,c),h=0));c>=8;o[l+b]=d&255,b+=_,d/=256,c-=8);for(h=h<<c|d,v+=c;v>0;o[l+b]=h&255,b+=_,h/=256,v-=8);o[l+b-_]|=M*128}},8954(n,a,o){"use strict";n.exports=g;var s=o(3250),l=o(6803).Fw;function u(w,b,_){this.vertices=w,this.adjacent=b,this.boundary=_,this.lastVisited=-1}u.prototype.flip=function(){var w=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=w;var b=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=b};function c(w,b,_){this.vertices=w,this.cell=b,this.index=_}function f(w,b){return l(w.vertices,b.vertices)}function h(w){return function(){var b=this.tuple;return w.apply(this,b)}}function d(w){var b=s[w+1];return b||(b=s),h(b)}var p=[];function v(w,b,_){this.dimension=w,this.vertices=b,this.simplices=_,this.interior=_.filter(function(T){return!T.boundary}),this.tuple=new Array(w+1);for(var M=0;M<=w;++M)this.tuple[M]=this.vertices[M];var x=p[w];x||(x=p[w]=d(w)),this.orient=x}var m=v.prototype;m.handleBoundaryDegeneracy=function(w,b){var _=this.dimension,M=this.vertices.length-1,x=this.tuple,T=this.vertices,A=[w];for(w.lastVisited=-M;A.length>0;){w=A.pop();for(var y=w.adjacent,E=0;E<=_;++E){var S=y[E];if(!(!S.boundary||S.lastVisited<=-M)){for(var C=S.vertices,k=0;k<=_;++k){var D=C[k];D<0?x[k]=b:x[k]=T[D]}var F=this.orient();if(F>0)return S;S.lastVisited=-M,F===0&&A.push(S)}}}return null},m.walk=function(w,b){var _=this.vertices.length-1,M=this.dimension,x=this.vertices,T=this.tuple,A=b?this.interior.length*Math.random()|0:this.interior.length-1,y=this.interior[A];e:for(;!y.boundary;){for(var E=y.vertices,S=y.adjacent,C=0;C<=M;++C)T[C]=x[E[C]];y.lastVisited=_;for(var C=0;C<=M;++C){var k=S[C];if(!(k.lastVisited>=_)){var D=T[C];T[C]=w;var F=this.orient();if(T[C]=D,F<0){y=k;continue e}else k.boundary?k.lastVisited=-_:k.lastVisited=_}}return}return y},m.addPeaks=function(w,b){var _=this.vertices.length-1,M=this.dimension,x=this.vertices,T=this.tuple,A=this.interior,y=this.simplices,E=[b];b.lastVisited=_,b.vertices[b.vertices.indexOf(-1)]=_,b.boundary=!1,A.push(b);for(var S=[];E.length>0;){var b=E.pop(),C=b.vertices,k=b.adjacent,D=C.indexOf(_);if(!(D<0)){for(var F=0;F<=M;++F)if(F!==D){var P=k[F];if(!(!P.boundary||P.lastVisited>=_)){var R=P.vertices;if(P.lastVisited!==-_){for(var L=0,I=0;I<=M;++I)R[I]<0?(L=I,T[I]=w):T[I]=x[R[I]];var B=this.orient();if(B>0){R[L]=_,P.boundary=!1,A.push(P),E.push(P),P.lastVisited=_;continue}else P.lastVisited=-_}var O=P.adjacent,$=C.slice(),Y=k.slice(),K=new u($,Y,!0);y.push(K);var j=O.indexOf(b);if(!(j<0)){O[j]=K,Y[D]=P,$[F]=-1,Y[F]=b,k[F]=K,K.flip();for(var I=0;I<=M;++I){var q=$[I];if(!(q<0||q===_)){for(var J=new Array(M-1),U=0,V=0;V<=M;++V){var X=$[V];X<0||V===I||(J[U++]=X)}S.push(new c(J,K,I))}}}}}}}S.sort(f);for(var F=0;F+1<S.length;F+=2){var H=S[F],G=S[F+1],Q=H.index,te=G.index;Q<0||te<0||(H.cell.adjacent[H.index]=G.cell,G.cell.adjacent[G.index]=H.cell)}},m.insert=function(w,b){var _=this.vertices;_.push(w);var M=this.walk(w,b);if(M){for(var x=this.dimension,T=this.tuple,A=0;A<=x;++A){var y=M.vertices[A];y<0?T[A]=w:T[A]=_[y]}var E=this.orient(T);E<0||E===0&&(M=this.handleBoundaryDegeneracy(M,w),!M)||this.addPeaks(w,M)}},m.boundary=function(){for(var w=this.dimension,b=[],_=this.simplices,M=_.length,x=0;x<M;++x){var T=_[x];if(T.boundary){for(var A=new Array(w),y=T.vertices,E=0,S=0,C=0;C<=w;++C)y[C]>=0?A[E++]=y[C]:S=C&1;if(S===(w&1)){var k=A[0];A[0]=A[1],A[1]=k}b.push(A)}}return b};function g(w,b){var _=w.length;if(_===0)throw new Error("Must have at least d+1 points");var M=w[0].length;if(_<=M)throw new Error("Must input at least d+1 points");var x=w.slice(0,M+1),T=s.apply(void 0,x);if(T===0)throw new Error("Input not in general position");for(var A=new Array(M+1),y=0;y<=M;++y)A[y]=y;T<0&&(A[0]=1,A[1]=0);for(var E=new u(A,new Array(M+1),!1),S=E.adjacent,C=new Array(M+2),y=0;y<=M;++y){for(var k=A.slice(),D=0;D<=M;++D)D===y&&(k[D]=-1);var F=k[0];k[0]=k[1],k[1]=F;var P=new u(k,new Array(M+1),!0);S[y]=P,C[y]=P}C[M+1]=E;for(var y=0;y<=M;++y)for(var k=S[y].vertices,R=S[y].adjacent,D=0;D<=M;++D){var L=k[D];if(L<0){R[D]=E;continue}for(var I=0;I<=M;++I)S[I].vertices.indexOf(L)<0&&(R[D]=S[I])}for(var B=new v(M,x,C),O=!!b,y=M+1;y<_;++y)B.insert(w[y],O);return B.boundary()}},3352(n,a,o){"use strict";var s=o(2478),l=0,u=1,c=2;n.exports=E;function f(S,C,k,D,F){this.mid=S,this.left=C,this.right=k,this.leftPoints=D,this.rightPoints=F,this.count=(C?C.count:0)+(k?k.count:0)+D.length}var h=f.prototype;function d(S,C){S.mid=C.mid,S.left=C.left,S.right=C.right,S.leftPoints=C.leftPoints,S.rightPoints=C.rightPoints,S.count=C.count}function p(S,C){var k=T(C);S.mid=k.mid,S.left=k.left,S.right=k.right,S.leftPoints=k.leftPoints,S.rightPoints=k.rightPoints,S.count=k.count}function v(S,C){var k=S.intervals([]);k.push(C),p(S,k)}function m(S,C){var k=S.intervals([]),D=k.indexOf(C);return D<0?l:(k.splice(D,1),p(S,k),u)}h.intervals=function(S){return S.push.apply(S,this.leftPoints),this.left&&this.left.intervals(S),this.right&&this.right.intervals(S),S},h.insert=function(S){var C=this.count-this.leftPoints.length;if(this.count+=1,S[1]<this.mid)this.left?4*(this.left.count+1)>3*(C+1)?v(this,S):this.left.insert(S):this.left=T([S]);else if(S[0]>this.mid)this.right?4*(this.right.count+1)>3*(C+1)?v(this,S):this.right.insert(S):this.right=T([S]);else{var k=s.ge(this.leftPoints,S,M),D=s.ge(this.rightPoints,S,x);this.leftPoints.splice(k,0,S),this.rightPoints.splice(D,0,S)}},h.remove=function(S){var C=this.count-this.leftPoints;if(S[1]<this.mid){if(!this.left)return l;var k=this.right?this.right.count:0;if(4*k>3*(C-1))return m(this,S);var D=this.left.remove(S);return D===c?(this.left=null,this.count-=1,u):(D===u&&(this.count-=1),D)}else if(S[0]>this.mid){if(!this.right)return l;var F=this.left?this.left.count:0;if(4*F>3*(C-1))return m(this,S);var D=this.right.remove(S);return D===c?(this.right=null,this.count-=1,u):(D===u&&(this.count-=1),D)}else{if(this.count===1)return this.leftPoints[0]===S?c:l;if(this.leftPoints.length===1&&this.leftPoints[0]===S){if(this.left&&this.right){for(var P=this,R=this.left;R.right;)P=R,R=R.right;if(P===this)R.right=this.right;else{var L=this.left,D=this.right;P.count-=R.count,P.right=R.left,R.left=L,R.right=D}d(this,R),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?d(this,this.left):d(this,this.right);return u}for(var L=s.ge(this.leftPoints,S,M);L<this.leftPoints.length&&this.leftPoints[L][0]===S[0];++L)if(this.leftPoints[L]===S){this.count-=1,this.leftPoints.splice(L,1);for(var D=s.ge(this.rightPoints,S,x);D<this.rightPoints.length&&this.rightPoints[D][1]===S[1];++D)if(this.rightPoints[D]===S)return this.rightPoints.splice(D,1),u}return l}};function g(S,C,k){for(var D=0;D<S.length&&S[D][0]<=C;++D){var F=k(S[D]);if(F)return F}}function w(S,C,k){for(var D=S.length-1;D>=0&&S[D][1]>=C;--D){var F=k(S[D]);if(F)return F}}function b(S,C){for(var k=0;k<S.length;++k){var D=C(S[k]);if(D)return D}}h.queryPoint=function(S,C){if(S<this.mid){if(this.left){var k=this.left.queryPoint(S,C);if(k)return k}return g(this.leftPoints,S,C)}else if(S>this.mid){if(this.right){var k=this.right.queryPoint(S,C);if(k)return k}return w(this.rightPoints,S,C)}else return b(this.leftPoints,C)},h.queryInterval=function(S,C,k){if(S<this.mid&&this.left){var D=this.left.queryInterval(S,C,k);if(D)return D}if(C>this.mid&&this.right){var D=this.right.queryInterval(S,C,k);if(D)return D}return C<this.mid?g(this.leftPoints,C,k):S>this.mid?w(this.rightPoints,S,k):b(this.leftPoints,k)};function _(S,C){return S-C}function M(S,C){var k=S[0]-C[0];return k||S[1]-C[1]}function x(S,C){var k=S[1]-C[1];return k||S[0]-C[0]}function T(S){if(S.length===0)return null;for(var C=[],k=0;k<S.length;++k)C.push(S[k][0],S[k][1]);C.sort(_);for(var D=C[C.length>>1],F=[],P=[],R=[],k=0;k<S.length;++k){var L=S[k];L[1]<D?F.push(L):D<L[0]?P.push(L):R.push(L)}var I=R,B=R.slice();return I.sort(M),B.sort(x),new f(D,T(F),T(P),I,B)}function A(S){this.root=S}var y=A.prototype;y.insert=function(S){this.root?this.root.insert(S):this.root=new f(S[0],null,null,[S],[S])},y.remove=function(S){if(this.root){var C=this.root.remove(S);return C===c&&(this.root=null),C!==l}return!1},y.queryPoint=function(S,C){if(this.root)return this.root.queryPoint(S,C)},y.queryInterval=function(S,C,k){if(S<=C&&this.root)return this.root.queryInterval(S,C,k)},Object.defineProperty(y,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(y,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});function E(S){return!S||S.length===0?new A(null):new A(T(S))}},9507(n){n.exports=!0},7163(n){n.exports=function(s){return s!=null&&(a(s)||o(s)||!!s._isBuffer)};function a(s){return!!s.constructor&&typeof s.constructor.isBuffer=="function"&&s.constructor.isBuffer(s)}function o(s){return typeof s.readFloatLE=="function"&&typeof s.slice=="function"&&a(s.slice(0,0))}},2431(n){"use strict";n.exports=l,n.exports.isMobile=l,n.exports.default=l;let a=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,o=/CrOS/,s=/android|ipad|playbook|silk/i;function l(u){u||(u={});let c=u.ua;if(!c&&typeof navigator!="undefined"&&(c=navigator.userAgent),c&&c.headers&&typeof c.headers["user-agent"]=="string"&&(c=c.headers["user-agent"]),typeof c!="string")return!1;let f=a.test(c)&&!o.test(c)||!!u.tablet&&s.test(c);return!f&&u.tablet&&u.featureDetect&&navigator&&navigator.maxTouchPoints>1&&c.indexOf("Macintosh")!==-1&&c.indexOf("Safari")!==-1&&(f=!0),f}},5219(n){"use strict";n.exports=function(a){for(var o=a.length,s,l=0;l<o;l++)if(s=a.charCodeAt(l),(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}},395(n){function a(o,s,l){return o*(1-l)+s*l}n.exports=a},2652(n,a,o){var s=o(4335),l=o(6864),u=o(1903),c=o(9921),f=o(7608),h=o(5665),d={length:o(1387),normalize:o(3536),dot:o(244),cross:o(5911)},p=l(),v=l(),m=[0,0,0,0],g=[[0,0,0],[0,0,0],[0,0,0]],w=[0,0,0];n.exports=function(T,A,y,E,S,C){if(A||(A=[0,0,0]),y||(y=[0,0,0]),E||(E=[0,0,0]),S||(S=[0,0,0,1]),C||(C=[0,0,0,1]),!s(p,T)||(u(v,p),v[3]=0,v[7]=0,v[11]=0,v[15]=1,Math.abs(c(v)<1e-8)))return!1;var k=p[3],D=p[7],F=p[11],P=p[12],R=p[13],L=p[14],I=p[15];if(k!==0||D!==0||F!==0){m[0]=k,m[1]=D,m[2]=F,m[3]=I;var B=f(v,v);if(!B)return!1;h(v,v),b(S,m,v)}else S[0]=S[1]=S[2]=0,S[3]=1;if(A[0]=P,A[1]=R,A[2]=L,_(g,p),y[0]=d.length(g[0]),d.normalize(g[0],g[0]),E[0]=d.dot(g[0],g[1]),M(g[1],g[1],g[0],1,-E[0]),y[1]=d.length(g[1]),d.normalize(g[1],g[1]),E[0]/=y[1],E[1]=d.dot(g[0],g[2]),M(g[2],g[2],g[0],1,-E[1]),E[2]=d.dot(g[1],g[2]),M(g[2],g[2],g[1],1,-E[2]),y[2]=d.length(g[2]),d.normalize(g[2],g[2]),E[1]/=y[2],E[2]/=y[2],d.cross(w,g[1],g[2]),d.dot(g[0],w)<0)for(var O=0;O<3;O++)y[O]*=-1,g[O][0]*=-1,g[O][1]*=-1,g[O][2]*=-1;return C[0]=.5*Math.sqrt(Math.max(1+g[0][0]-g[1][1]-g[2][2],0)),C[1]=.5*Math.sqrt(Math.max(1-g[0][0]+g[1][1]-g[2][2],0)),C[2]=.5*Math.sqrt(Math.max(1-g[0][0]-g[1][1]+g[2][2],0)),C[3]=.5*Math.sqrt(Math.max(1+g[0][0]+g[1][1]+g[2][2],0)),g[2][1]>g[1][2]&&(C[0]=-C[0]),g[0][2]>g[2][0]&&(C[1]=-C[1]),g[1][0]>g[0][1]&&(C[2]=-C[2]),!0};function b(x,T,A){var y=T[0],E=T[1],S=T[2],C=T[3];return x[0]=A[0]*y+A[4]*E+A[8]*S+A[12]*C,x[1]=A[1]*y+A[5]*E+A[9]*S+A[13]*C,x[2]=A[2]*y+A[6]*E+A[10]*S+A[14]*C,x[3]=A[3]*y+A[7]*E+A[11]*S+A[15]*C,x}function _(x,T){x[0][0]=T[0],x[0][1]=T[1],x[0][2]=T[2],x[1][0]=T[4],x[1][1]=T[5],x[1][2]=T[6],x[2][0]=T[8],x[2][1]=T[9],x[2][2]=T[10]}function M(x,T,A,y,E){x[0]=T[0]*y+A[0]*E,x[1]=T[1]*y+A[1]*E,x[2]=T[2]*y+A[2]*E}},4335(n){n.exports=function(o,s){var l=s[15];if(l===0)return!1;for(var u=1/l,c=0;c<16;c++)o[c]=s[c]*u;return!0}},7442(n,a,o){var s=o(6658),l=o(7182),u=o(2652),c=o(9921),f=o(8648),h=m(),d=m(),p=m();n.exports=v;function v(b,_,M,x){if(c(_)===0||c(M)===0)return!1;var T=u(_,h.translate,h.scale,h.skew,h.perspective,h.quaternion),A=u(M,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!T||!A?!1:(s(p.translate,h.translate,d.translate,x),s(p.skew,h.skew,d.skew,x),s(p.scale,h.scale,d.scale,x),s(p.perspective,h.perspective,d.perspective,x),f(p.quaternion,h.quaternion,d.quaternion,x),l(b,p.translate,p.scale,p.skew,p.perspective,p.quaternion),!0)}function m(){return{translate:g(),scale:g(1),skew:g(),perspective:w(),quaternion:w()}}function g(b){return[b||0,b||0,b||0]}function w(){return[0,0,0,1]}},7182(n,a,o){var s={identity:o(7894),translate:o(7656),multiply:o(6760),create:o(6864),scale:o(2504),fromRotationTranslation:o(6743)},l=s.create(),u=s.create();n.exports=function(f,h,d,p,v,m){return s.identity(f),s.fromRotationTranslation(f,m,h),f[3]=v[0],f[7]=v[1],f[11]=v[2],f[15]=v[3],s.identity(u),p[2]!==0&&(u[9]=p[2],s.multiply(f,f,u)),p[1]!==0&&(u[9]=0,u[8]=p[1],s.multiply(f,f,u)),p[0]!==0&&(u[8]=0,u[4]=p[0],s.multiply(f,f,u)),s.scale(f,f,d),f}},1811(n,a,o){"use strict";var s=o(2478),l=o(7442),u=o(7608),c=o(5567),f=o(2408),h=o(7089),d=o(6582),p=o(7656),v=o(2504),m=o(3536),g=[0,0,0];n.exports=M;function w(x){this._components=x.slice(),this._time=[0],this.prevMatrix=x.slice(),this.nextMatrix=x.slice(),this.computedMatrix=x.slice(),this.computedInverse=x.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 b=w.prototype;b.recalcMatrix=function(x){var T=this._time,A=s.le(T,x),y=this.computedMatrix;if(!(A<0)){var E=this._components;if(A===T.length-1)for(var S=16*A,C=0;C<16;++C)y[C]=E[S++];else{for(var k=T[A+1]-T[A],S=16*A,D=this.prevMatrix,F=!0,C=0;C<16;++C)D[C]=E[S++];for(var P=this.nextMatrix,C=0;C<16;++C)P[C]=E[S++],F=F&&D[C]===P[C];if(k<1e-6||F)for(var C=0;C<16;++C)y[C]=D[C];else l(y,D,P,(x-T[A])/k)}var R=this.computedUp;R[0]=y[1],R[1]=y[5],R[2]=y[9],m(R,R);var L=this.computedInverse;u(L,y);var I=this.computedEye,B=L[15];I[0]=L[12]/B,I[1]=L[13]/B,I[2]=L[14]/B;for(var O=this.computedCenter,$=Math.exp(this.computedRadius[0]),C=0;C<3;++C)O[C]=I[C]-y[2+4*C]*$}},b.idle=function(x){if(!(x<this.lastT())){for(var T=this._components,A=T.length-16,y=0;y<16;++y)T.push(T[A++]);this._time.push(x)}},b.flush=function(x){var T=s.gt(this._time,x)-2;T<0||(this._time.splice(0,T),this._components.splice(0,16*T))},b.lastT=function(){return this._time[this._time.length-1]},b.lookAt=function(x,T,A,y){this.recalcMatrix(x),T=T||this.computedEye,A=A||g,y=y||this.computedUp,this.setMatrix(x,d(this.computedMatrix,T,A,y));for(var E=0,S=0;S<3;++S)E+=Math.pow(A[S]-T[S],2);E=Math.log(Math.sqrt(E)),this.computedRadius[0]=E},b.rotate=function(x,T,A,y){this.recalcMatrix(x);var E=this.computedInverse;T&&f(E,E,T),A&&c(E,E,A),y&&h(E,E,y),this.setMatrix(x,u(this.computedMatrix,E))};var _=[0,0,0];b.pan=function(x,T,A,y){_[0]=-(T||0),_[1]=-(A||0),_[2]=-(y||0),this.recalcMatrix(x);var E=this.computedInverse;p(E,E,_),this.setMatrix(x,u(E,E))},b.translate=function(x,T,A,y){_[0]=T||0,_[1]=A||0,_[2]=y||0,this.recalcMatrix(x);var E=this.computedMatrix;p(E,E,_),this.setMatrix(x,E)},b.setMatrix=function(x,T){if(!(x<this.lastT())){this._time.push(x);for(var A=0;A<16;++A)this._components.push(T[A])}},b.setDistance=function(x,T){this.computedRadius[0]=T},b.setDistanceLimits=function(x,T){var A=this._limits;A[0]=x,A[1]=T},b.getDistanceLimits=function(x){var T=this._limits;return x?(x[0]=T[0],x[1]=T[1],x):T};function M(x){x=x||{};var T=x.matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return new w(T)}},3090(n,a,o){"use strict";n.exports=l;var s=o(3250)[3];function l(u){var c=u.length;if(c<3){for(var w=new Array(c),f=0;f<c;++f)w[f]=f;return c===2&&u[0][0]===u[1][0]&&u[0][1]===u[1][1]?[0]:w}for(var h=new Array(c),f=0;f<c;++f)h[f]=f;h.sort(function(x,T){var A=u[x][0]-u[T][0];return A||u[x][1]-u[T][1]});for(var d=[h[0],h[1]],p=[h[0],h[1]],f=2;f<c;++f){for(var v=h[f],m=u[v],g=d.length;g>1&&s(u[d[g-2]],u[d[g-1]],m)<=0;)g-=1,d.pop();for(d.push(v),g=p.length;g>1&&s(u[p[g-2]],u[p[g-1]],m)>=0;)g-=1,p.pop();p.push(v)}for(var w=new Array(p.length+d.length-2),b=0,f=0,_=d.length;f<_;++f)w[b++]=d[f];for(var M=p.length-2;M>0;--M)w[b++]=p[M];return w}},351(n,a,o){"use strict";n.exports=l;var s=o(4687);function l(u,c){c||(c=u,u=window);var f=0,h=0,d=0,p={shift:!1,alt:!1,control:!1,meta:!1},v=!1;function m(S){var C=!1;return"altKey"in S&&(C=C||S.altKey!==p.alt,p.alt=!!S.altKey),"shiftKey"in S&&(C=C||S.shiftKey!==p.shift,p.shift=!!S.shiftKey),"ctrlKey"in S&&(C=C||S.ctrlKey!==p.control,p.control=!!S.ctrlKey),"metaKey"in S&&(C=C||S.metaKey!==p.meta,p.meta=!!S.metaKey),C}function g(S,C){var k=s.x(C),D=s.y(C);"buttons"in C&&(S=C.buttons|0),(S!==f||k!==h||D!==d||m(C))&&(f=S|0,h=k||0,d=D||0,c&&c(f,h,d,p))}function w(S){g(0,S)}function b(){(f||h||d||p.shift||p.alt||p.meta||p.control)&&(h=d=0,f=0,p.shift=p.alt=p.control=p.meta=!1,c&&c(0,0,0,p))}function _(S){m(S)&&c&&c(f,h,d,p)}function M(S){s.buttons(S)===0?g(0,S):g(f,S)}function x(S){g(f|s.buttons(S),S)}function T(S){g(f&~s.buttons(S),S)}function A(){v||(v=!0,u.addEventListener("mousemove",M),u.addEventListener("mousedown",x),u.addEventListener("mouseup",T),u.addEventListener("mouseleave",w),u.addEventListener("mouseenter",w),u.addEventListener("mouseout",w),u.addEventListener("mouseover",w),u.addEventListener("blur",b),u.addEventListener("keyup",_),u.addEventListener("keydown",_),u.addEventListener("keypress",_),u!==window&&(window.addEventListener("blur",b),window.addEventListener("keyup",_),window.addEventListener("keydown",_),window.addEventListener("keypress",_)))}function y(){v&&(v=!1,u.removeEventListener("mousemove",M),u.removeEventListener("mousedown",x),u.removeEventListener("mouseup",T),u.removeEventListener("mouseleave",w),u.removeEventListener("mouseenter",w),u.removeEventListener("mouseout",w),u.removeEventListener("mouseover",w),u.removeEventListener("blur",b),u.removeEventListener("keyup",_),u.removeEventListener("keydown",_),u.removeEventListener("keypress",_),u!==window&&(window.removeEventListener("blur",b),window.removeEventListener("keyup",_),window.removeEventListener("keydown",_),window.removeEventListener("keypress",_)))}A();var E={element:u};return Object.defineProperties(E,{enabled:{get:function(){return v},set:function(S){S?A():y()},enumerable:!0},buttons:{get:function(){return f},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return d},enumerable:!0},mods:{get:function(){return p},enumerable:!0}}),E}},24(n){var a={left:0,top:0};n.exports=o;function o(l,u,c){u=u||l.currentTarget||l.srcElement,Array.isArray(c)||(c=[0,0]);var f=l.clientX||0,h=l.clientY||0,d=s(u);return c[0]=f-d.left,c[1]=h-d.top,c}function s(l){return l===window||l===document||l===document.body?a:l.getBoundingClientRect()}},4687(n,a){"use strict";function o(c){if(typeof c=="object"){if("buttons"in c)return c.buttons;if("which"in c){var f=c.which;if(f===2)return 4;if(f===3)return 2;if(f>0)return 1<<f-1}else if("button"in c){var f=c.button;if(f===1)return 4;if(f===2)return 2;if(f>=0)return 1<<f}}return 0}a.buttons=o;function s(c){return c.target||c.srcElement||window}a.element=s;function l(c){if(typeof c=="object"){if("offsetX"in c)return c.offsetX;var f=s(c),h=f.getBoundingClientRect();return c.clientX-h.left}return 0}a.x=l;function u(c){if(typeof c=="object"){if("offsetY"in c)return c.offsetY;var f=s(c),h=f.getBoundingClientRect();return c.clientY-h.top}return 0}a.y=u},2288(n,a,o){"use strict";var s=o(3202);n.exports=f;var l=96;function u(h,d){var p=s(getComputedStyle(h).getPropertyValue(d));return p[0]*f(p[1],h)}function c(h,d){var p=document.createElement("div");p.style["font-size"]="128"+h,d.appendChild(p);var v=u(p,"font-size")/128;return d.removeChild(p),v}function f(h,d){switch(d=d||document.body,h=(h||"px").trim().toLowerCase(),(d===window||d===document)&&(d=document.body),h){case"%":return d.clientHeight/100;case"ch":case"ex":return c(h,d);case"em":return u(d,"font-size");case"rem":return u(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 l;case"cm":return l/2.54;case"mm":return l/25.4;case"pt":return l/72;case"pc":return l/6}return 1}},8512(n,a,o){"use strict";var s=o(2288);n.exports=l;function l(u,c,f){typeof u=="function"&&(f=!!c,c=u,u=window);var h=s("ex",u),d=function(p){f&&p.preventDefault();var v=p.deltaX||0,m=p.deltaY||0,g=p.deltaZ||0,w=p.deltaMode,b=1;switch(w){case 1:b=h;break;case 2:b=window.innerHeight;break}if(v*=b,m*=b,g*=b,v||m||g)return c(v,m,g,p)};return u.addEventListener("wheel",d),d}},2640(n,a,o){"use strict";var s=o(1888);n.exports=c;var l={"false,0,1":function(h,d,p,v,m){return function(w,b,_,M){var x=w.shape[0]|0,T=w.shape[1]|0,A=w.data,y=w.offset|0,E=w.stride[0]|0,S=w.stride[1]|0,C=y,k,D=-E|0,F=0,P=-S|0,R=0,L=-E-S|0,I=0,B=E|0,O=S-E*x|0,$=0,Y=0,K=0,j=2*x|0,q=v(j),J=v(j),U=0,V=0,X=-1,H=-1,G=0,Q=-x|0,te=x|0,ce=0,ge=-x-1|0,Ce=x-1|0,be=0,he=0,oe=0;for($=0;$<x;++$)q[U++]=p(A[C],b,_,M),C+=B;if(C+=O,T>0){if(Y=1,q[U++]=p(A[C],b,_,M),C+=B,x>0)for($=1,k=A[C],V=q[U]=p(k,b,_,M),G=q[U+X],ce=q[U+Q],be=q[U+ge],(V!==G||V!==ce||V!==be)&&(F=A[C+D],R=A[C+P],I=A[C+L],h($,Y,k,F,R,I,V,G,ce,be,b,_,M),he=J[U]=K++),U+=1,C+=B,$=2;$<x;++$)k=A[C],V=q[U]=p(k,b,_,M),G=q[U+X],ce=q[U+Q],be=q[U+ge],(V!==G||V!==ce||V!==be)&&(F=A[C+D],R=A[C+P],I=A[C+L],h($,Y,k,F,R,I,V,G,ce,be,b,_,M),he=J[U]=K++,be!==G&&d(J[U+X],he,I,F,be,G,b,_,M)),U+=1,C+=B;for(C+=O,U=0,oe=X,X=H,H=oe,oe=Q,Q=te,te=oe,oe=ge,ge=Ce,Ce=oe,Y=2;Y<T;++Y){if(q[U++]=p(A[C],b,_,M),C+=B,x>0)for($=1,k=A[C],V=q[U]=p(k,b,_,M),G=q[U+X],ce=q[U+Q],be=q[U+ge],(V!==G||V!==ce||V!==be)&&(F=A[C+D],R=A[C+P],I=A[C+L],h($,Y,k,F,R,I,V,G,ce,be,b,_,M),he=J[U]=K++,be!==ce&&d(J[U+Q],he,R,I,ce,be,b,_,M)),U+=1,C+=B,$=2;$<x;++$)k=A[C],V=q[U]=p(k,b,_,M),G=q[U+X],ce=q[U+Q],be=q[U+ge],(V!==G||V!==ce||V!==be)&&(F=A[C+D],R=A[C+P],I=A[C+L],h($,Y,k,F,R,I,V,G,ce,be,b,_,M),he=J[U]=K++,be!==ce&&d(J[U+Q],he,R,I,ce,be,b,_,M),be!==G&&d(J[U+X],he,I,F,be,G,b,_,M)),U+=1,C+=B;Y&1&&(U=0),oe=X,X=H,H=oe,oe=Q,Q=te,te=oe,oe=ge,ge=Ce,Ce=oe,C+=O}}m(J),m(q)}},"false,1,0":function(h,d,p,v,m){return function(w,b,_,M){var x=w.shape[0]|0,T=w.shape[1]|0,A=w.data,y=w.offset|0,E=w.stride[0]|0,S=w.stride[1]|0,C=y,k,D=-E|0,F=0,P=-S|0,R=0,L=-E-S|0,I=0,B=S|0,O=E-S*T|0,$=0,Y=0,K=0,j=2*T|0,q=v(j),J=v(j),U=0,V=0,X=-1,H=-1,G=0,Q=-T|0,te=T|0,ce=0,ge=-T-1|0,Ce=T-1|0,be=0,he=0,oe=0;for(Y=0;Y<T;++Y)q[U++]=p(A[C],b,_,M),C+=B;if(C+=O,x>0){if($=1,q[U++]=p(A[C],b,_,M),C+=B,T>0)for(Y=1,k=A[C],V=q[U]=p(k,b,_,M),ce=q[U+Q],G=q[U+X],be=q[U+ge],(V!==ce||V!==G||V!==be)&&(F=A[C+D],R=A[C+P],I=A[C+L],h($,Y,k,F,R,I,V,ce,G,be,b,_,M),he=J[U]=K++),U+=1,C+=B,Y=2;Y<T;++Y)k=A[C],V=q[U]=p(k,b,_,M),ce=q[U+Q],G=q[U+X],be=q[U+ge],(V!==ce||V!==G||V!==be)&&(F=A[C+D],R=A[C+P],I=A[C+L],h($,Y,k,F,R,I,V,ce,G,be,b,_,M),he=J[U]=K++,be!==G&&d(J[U+X],he,R,I,G,be,b,_,M)),U+=1,C+=B;for(C+=O,U=0,oe=Q,Q=te,te=oe,oe=X,X=H,H=oe,oe=ge,ge=Ce,Ce=oe,$=2;$<x;++$){if(q[U++]=p(A[C],b,_,M),C+=B,T>0)for(Y=1,k=A[C],V=q[U]=p(k,b,_,M),ce=q[U+Q],G=q[U+X],be=q[U+ge],(V!==ce||V!==G||V!==be)&&(F=A[C+D],R=A[C+P],I=A[C+L],h($,Y,k,F,R,I,V,ce,G,be,b,_,M),he=J[U]=K++,be!==ce&&d(J[U+Q],he,I,F,be,ce,b,_,M)),U+=1,C+=B,Y=2;Y<T;++Y)k=A[C],V=q[U]=p(k,b,_,M),ce=q[U+Q],G=q[U+X],be=q[U+ge],(V!==ce||V!==G||V!==be)&&(F=A[C+D],R=A[C+P],I=A[C+L],h($,Y,k,F,R,I,V,ce,G,be,b,_,M),he=J[U]=K++,be!==G&&d(J[U+X],he,R,I,G,be,b,_,M),be!==ce&&d(J[U+Q],he,I,F,be,ce,b,_,M)),U+=1,C+=B;$&1&&(U=0),oe=Q,Q=te,te=oe,oe=X,X=H,H=oe,oe=ge,ge=Ce,Ce=oe,C+=O}}m(J),m(q)}}};function u(f,h,d,p,v,m){var g=[m,v].join(","),w=l[g];return w(f,h,d,s.mallocUint32,s.freeUint32)}function c(f){function h(b){throw new Error("ndarray-extract-contour: "+b)}typeof f!="object"&&h("Must specify arguments");var d=f.order;Array.isArray(d)||h("Must specify order");var p=f.arrayArguments||1;p<1&&h("Must have at least one array argument");var v=f.scalarArguments||0;v<0&&h("Scalar arg count must be > 0"),typeof f.vertex!="function"&&h("Must specify vertex creation function"),typeof f.cell!="function"&&h("Must specify cell creation function"),typeof f.phase!="function"&&h("Must specify phase function");for(var m=f.getters||[],g=new Array(p),w=0;w<p;++w)m.indexOf(w)>=0?g[w]=!0:g[w]=!1;return u(f.vertex,f.cell,f.phase,v,d,g)}},6199(n,a,o){"use strict";var s=o(1338),l={zero:function(M,x,T,A){var y=M[0],E=T[0];A|=0;var S=0,C=E;for(S=0;S<y;++S)x[A]=0,A+=C},fdTemplate1:function(M,x,T,A,y,E,S){var C=M[0],k=T[0],D=E[0],F=-1*k,P=k;A|=0,S|=0;var R=0,L=k,I=D;for(R=0;R<C;++R)y[S]=.5*(x[A+F]-x[A+P]),A+=L,S+=I},fdTemplate2:function(M,x,T,A,y,E,S,C,k,D){var F=M[0],P=M[1],R=T[0],L=T[1],I=E[0],B=E[1],O=k[0],$=k[1],Y=-1*R,K=R,j=-1*L,q=L;A|=0,S|=0,D|=0;var J=0,U=0,V=L,X=R-P*L,H=B,G=I-P*B,Q=$,te=O-P*$;for(U=0;U<F;++U){for(J=0;J<P;++J)y[S]=.5*(x[A+Y]-x[A+K]),C[D]=.5*(x[A+j]-x[A+q]),A+=V,S+=H,D+=Q;A+=X,S+=G,D+=te}}},u={cdiff:function(M){var x={};return function(A,y,E){var S=A.dtype,C=A.order,k=y.dtype,D=y.order,F=E.dtype,P=E.order,R=[S,C.join(),k,D.join(),F,P.join()].join(),L=x[R];return L||(x[R]=L=M([S,C,k,D,F,P])),L(A.shape.slice(0),A.data,A.stride,A.offset|0,y.data,y.stride,y.offset|0,E.data,E.stride,E.offset|0)}},zero:function(M){var x={};return function(A){var y=A.dtype,E=A.order,S=[y,E.join()].join(),C=x[S];return C||(x[S]=C=M([y,E])),C(A.shape.slice(0),A.data,A.stride,A.offset|0)}},fdTemplate1:function(M){var x={};return function(A,y){var E=A.dtype,S=A.order,C=y.dtype,k=y.order,D=[E,S.join(),C,k.join()].join(),F=x[D];return F||(x[D]=F=M([E,S,C,k])),F(A.shape.slice(0),A.data,A.stride,A.offset|0,y.data,y.stride,y.offset|0)}},fdTemplate2:function(M){var x={};return function(A,y,E){var S=A.dtype,C=A.order,k=y.dtype,D=y.order,F=E.dtype,P=E.order,R=[S,C.join(),k,D.join(),F,P.join()].join(),L=x[R];return L||(x[R]=L=M([S,C,k,D,F,P])),L(A.shape.slice(0),A.data,A.stride,A.offset|0,y.data,y.stride,y.offset|0,E.data,E.stride,E.offset|0)}}};function c(M){var x=u[M.funcName];return x(f.bind(void 0,M))}function f(M){return l[M.funcName]}function h(M){return c({funcName:M.funcName})}var d={},p={},v=null,m=h({funcName:"cdiff"}),g=h({funcName:"zero"});function w(M){return M in d?d[M]:d[M]=h({funcName:"fdTemplate"+M})}function b(M,x,T,A){return function(y,E){var S=E.shape.slice();return S[0]>2&&S[1]>2&&A(E.pick(-1,-1).lo(1,1).hi(S[0]-2,S[1]-2),y.pick(-1,-1,0).lo(1,1).hi(S[0]-2,S[1]-2),y.pick(-1,-1,1).lo(1,1).hi(S[0]-2,S[1]-2)),S[1]>2&&(T(E.pick(0,-1).lo(1).hi(S[1]-2),y.pick(0,-1,1).lo(1).hi(S[1]-2)),x(y.pick(0,-1,0).lo(1).hi(S[1]-2))),S[1]>2&&(T(E.pick(S[0]-1,-1).lo(1).hi(S[1]-2),y.pick(S[0]-1,-1,1).lo(1).hi(S[1]-2)),x(y.pick(S[0]-1,-1,0).lo(1).hi(S[1]-2))),S[0]>2&&(T(E.pick(-1,0).lo(1).hi(S[0]-2),y.pick(-1,0,0).lo(1).hi(S[0]-2)),x(y.pick(-1,0,1).lo(1).hi(S[0]-2))),S[0]>2&&(T(E.pick(-1,S[1]-1).lo(1).hi(S[0]-2),y.pick(-1,S[1]-1,0).lo(1).hi(S[0]-2)),x(y.pick(-1,S[1]-1,1).lo(1).hi(S[0]-2))),y.set(0,0,0,0),y.set(0,0,1,0),y.set(S[0]-1,0,0,0),y.set(S[0]-1,0,1,0),y.set(0,S[1]-1,0,0),y.set(0,S[1]-1,1,0),y.set(S[0]-1,S[1]-1,0,0),y.set(S[0]-1,S[1]-1,1,0),y}}function _(M){var x=M.join(),S=p[x];if(S)return S;for(var T=M.length,A=[m,g],y=1;y<=T;++y)A.push(w(y));var E=b,S=E.apply(void 0,A);return p[x]=S,S}n.exports=function(x,T,A){if(Array.isArray(A)||(typeof A=="string"?A=s(T.dimension,A):A=s(T.dimension,"clamp")),T.size===0)return x;if(T.dimension===0)return x.set(0),x;var y=_(A);return y(x,T)}},4317(n){"use strict";function a(c,f){var h=Math.floor(f),d=f-h,p=0<=h&&h<c.shape[0],v=0<=h+1&&h+1<c.shape[0],m=p?+c.get(h):0,g=v?+c.get(h+1):0;return(1-d)*m+d*g}function o(c,f,h){var d=Math.floor(f),p=f-d,v=0<=d&&d<c.shape[0],m=0<=d+1&&d+1<c.shape[0],g=Math.floor(h),w=h-g,b=0<=g&&g<c.shape[1],_=0<=g+1&&g+1<c.shape[1],M=v&&b?c.get(d,g):0,x=v&&_?c.get(d,g+1):0,T=m&&b?c.get(d+1,g):0,A=m&&_?c.get(d+1,g+1):0;return(1-w)*((1-p)*M+p*T)+w*((1-p)*x+p*A)}function s(c,f,h,d){var p=Math.floor(f),v=f-p,m=0<=p&&p<c.shape[0],g=0<=p+1&&p+1<c.shape[0],w=Math.floor(h),b=h-w,_=0<=w&&w<c.shape[1],M=0<=w+1&&w+1<c.shape[1],x=Math.floor(d),T=d-x,A=0<=x&&x<c.shape[2],y=0<=x+1&&x+1<c.shape[2],E=m&&_&&A?c.get(p,w,x):0,S=m&&M&&A?c.get(p,w+1,x):0,C=g&&_&&A?c.get(p+1,w,x):0,k=g&&M&&A?c.get(p+1,w+1,x):0,D=m&&_&&y?c.get(p,w,x+1):0,F=m&&M&&y?c.get(p,w+1,x+1):0,P=g&&_&&y?c.get(p+1,w,x+1):0,R=g&&M&&y?c.get(p+1,w+1,x+1):0;return(1-T)*((1-b)*((1-v)*E+v*C)+b*((1-v)*S+v*k))+T*((1-b)*((1-v)*D+v*P)+b*((1-v)*F+v*R))}function l(c){var f=c.shape.length|0,h=new Array(f),d=new Array(f),p=new Array(f),v=new Array(f),m,g;for(m=0;m<f;++m)g=+arguments[m+1],h[m]=Math.floor(g),d[m]=g-h[m],p[m]=0<=h[m]&&h[m]<c.shape[m],v[m]=0<=h[m]+1&&h[m]+1<c.shape[m];var w=0,b,_,M;e:for(m=0;m<1<<f;++m){for(_=1,M=c.offset,b=0;b<f;++b)if(m&1<<b){if(!v[b])continue e;_*=d[b],M+=c.stride[b]*(h[b]+1)}else{if(!p[b])continue e;_*=1-d[b],M+=c.stride[b]*h[b]}w+=_*c.data[M]}return w}function u(c,f,h,d){switch(c.shape.length){case 0:return 0;case 1:return a(c,f);case 2:return o(c,f,h);case 3:return s(c,f,h,d);default:return l.apply(void 0,arguments)}}n.exports=u,n.exports.d1=a,n.exports.d2=o,n.exports.d3=s},5298(n,a){"use strict";var o={"float64,2,1,0":function(){return function(p,v,m,g,w){var b=p[0],_=p[1],M=p[2],x=m[0],T=m[1],A=m[2];g|=0;var y=0,E=0,S=0,C=A,k=T-M*A,D=x-_*T;for(S=0;S<b;++S){for(E=0;E<_;++E){for(y=0;y<M;++y)v[g]/=w,g+=C;g+=k}g+=D}}},"uint8,2,0,1,float64,2,1,0":function(){return function(p,v,m,g,w,b,_,M){var x=p[0],T=p[1],A=p[2],y=m[0],E=m[1],S=m[2],C=b[0],k=b[1],D=b[2];g|=0,_|=0;for(var F=g,P=_,R=p[0]|0;R>0;){R<64?(x=R,R=0):(x=64,R-=64);for(var L=p[1]|0;L>0;){L<64?(T=L,L=0):(T=64,L-=64),g=F+R*y+L*E,_=P+R*C+L*k;var I=0,B=0,O=0,$=S,Y=y-A*S,K=E-x*y,j=D,q=C-A*D,J=k-x*C;for(O=0;O<T;++O){for(B=0;B<x;++B){for(I=0;I<A;++I)v[g]=w[_]*M,g+=$,_+=j;g+=Y,_+=q}g+=K,_+=J}}}}},"float32,1,0,float32,1,0":function(){return function(p,v,m,g,w,b,_){var M=p[0],x=p[1],T=m[0],A=m[1],y=b[0],E=b[1];g|=0,_|=0;var S=0,C=0,k=A,D=T-x*A,F=E,P=y-x*E;for(C=0;C<M;++C){for(S=0;S<x;++S)v[g]=w[_],g+=k,_+=F;g+=D,_+=P}}},"float32,1,0,float32,0,1":function(){return function(p,v,m,g,w,b,_){var M=p[0],x=p[1],T=m[0],A=m[1],y=b[0],E=b[1];g|=0,_|=0;for(var S=g,C=_,k=p[1]|0;k>0;){k<64?(x=k,k=0):(x=64,k-=64);for(var D=p[0]|0;D>0;){D<64?(M=D,D=0):(M=64,D-=64),g=S+k*A+D*T,_=C+k*E+D*y;var F=0,P=0,R=A,L=T-x*A,I=E,B=y-x*E;for(P=0;P<M;++P){for(F=0;F<x;++F)v[g]=w[_],g+=R,_+=I;g+=L,_+=B}}}}},"uint8,2,0,1,uint8,1,2,0":function(){return function(p,v,m,g,w,b,_){var M=p[0],x=p[1],T=p[2],A=m[0],y=m[1],E=m[2],S=b[0],C=b[1],k=b[2];g|=0,_|=0;for(var D=g,F=_,P=p[2]|0;P>0;){P<64?(T=P,P=0):(T=64,P-=64);for(var R=p[0]|0;R>0;){R<64?(M=R,R=0):(M=64,R-=64);for(var L=p[1]|0;L>0;){L<64?(x=L,L=0):(x=64,L-=64),g=D+P*E+R*A+L*y,_=F+P*k+R*S+L*C;var I=0,B=0,O=0,$=E,Y=A-T*E,K=y-M*A,j=k,q=S-T*k,J=C-M*S;for(O=0;O<x;++O){for(B=0;B<M;++B){for(I=0;I<T;++I)v[g]=w[_],g+=$,_+=j;g+=Y,_+=q}g+=K,_+=J}}}}}},"uint8,2,0,1,array,2,0,1":function(){return function(p,v,m,g,w,b,_){var M=p[0],x=p[1],T=p[2],A=m[0],y=m[1],E=m[2],S=b[0],C=b[1],k=b[2];g|=0,_|=0;var D=0,F=0,P=0,R=E,L=A-T*E,I=y-M*A,B=k,O=S-T*k,$=C-M*S;for(P=0;P<x;++P){for(F=0;F<M;++F){for(D=0;D<T;++D)v[g]=w[_],g+=R,_+=B;g+=L,_+=O}g+=I,_+=$}}}};function s(d,p){var v=p.join(","),m=o[v];return m()}var l=s,u={mul:function(d){var p={};return function(m,g,w){var b=m.dtype,_=m.order,M=g.dtype,x=g.order,T=w.dtype,A=w.order,y=[b,_.join(),M,x.join(),T,A.join()].join(),E=p[y];return E||(p[y]=E=d([b,_,M,x,T,A])),E(m.shape.slice(0),m.data,m.stride,m.offset|0,g.data,g.stride,g.offset|0,w.data,w.stride,w.offset|0)}},muls:function(d){var p={};return function(m,g,w){var b=m.dtype,_=m.order,M=g.dtype,x=g.order,T=[b,_.join(),M,x.join()].join(),A=p[T];return A||(p[T]=A=d([b,_,M,x])),A(m.shape.slice(0),m.data,m.stride,m.offset|0,g.data,g.stride,g.offset|0,w)}},mulseq:function(d){var p={};return function(m,g){var w=m.dtype,b=m.order,_=[w,b.join()].join(),M=p[_];return M||(p[_]=M=d([w,b])),M(m.shape.slice(0),m.data,m.stride,m.offset|0,g)}},div:function(d){var p={};return function(m,g,w){var b=m.dtype,_=m.order,M=g.dtype,x=g.order,T=w.dtype,A=w.order,y=[b,_.join(),M,x.join(),T,A.join()].join(),E=p[y];return E||(p[y]=E=d([b,_,M,x,T,A])),E(m.shape.slice(0),m.data,m.stride,m.offset|0,g.data,g.stride,g.offset|0,w.data,w.stride,w.offset|0)}},divs:function(d){var p={};return function(m,g,w){var b=m.dtype,_=m.order,M=g.dtype,x=g.order,T=[b,_.join(),M,x.join()].join(),A=p[T];return A||(p[T]=A=d([b,_,M,x])),A(m.shape.slice(0),m.data,m.stride,m.offset|0,g.data,g.stride,g.offset|0,w)}},divseq:function(d){var p={};return function(m,g){var w=m.dtype,b=m.order,_=[w,b.join()].join(),M=p[_];return M||(p[_]=M=d([w,b])),M(m.shape.slice(0),m.data,m.stride,m.offset|0,g)}},assign:function(d){var p={};return function(m,g){var w=m.dtype,b=m.order,_=g.dtype,M=g.order,x=[w,b.join(),_,M.join()].join(),T=p[x];return T||(p[x]=T=d([w,b,_,M])),T(m.shape.slice(0),m.data,m.stride,m.offset|0,g.data,g.stride,g.offset|0)}}};function c(d){var p=u[d.funcName];return p(l.bind(void 0,d))}function f(d){return c({funcName:d.funcName})}var h={mul:"*",div:"/"};(function(){for(var d in h)a[d]=f({funcName:d}),a[d+"s"]=f({funcName:d+"s"}),a[d+"seq"]=f({funcName:d+"seq"})})(),a.assign=f({funcName:"assign"})},9994(n,a,o){"use strict";var s=o(9618),l=o(8277);n.exports=function(c,f){for(var h=[],d=c,p=1;Array.isArray(d);)h.push(d.length),p*=d.length,d=d[0];return h.length===0?s():(f||(f=s(new Float64Array(p),h)),l(f,c),f)}},8277(n){"use strict";function a(){return function(f,h,d,p,v){var m=f[0],g=f[1],w=f[2],b=d[0],_=d[1],M=d[2],x=[0,0,0];p|=0;var T=0,A=0,y=0,E=M,S=_-w*M,C=b-g*_;for(y=0;y<m;++y){for(A=0;A<g;++A){for(T=0;T<w;++T){{var k=v,D;for(D=0;D<x.length-1;++D)k=k[x[D]];h[p]=k[x[x.length-1]]}p+=E,++x[2]}p+=S,x[2]-=w,++x[1]}p+=C,x[1]-=g,++x[0]}}}function o(){return a()}var s=o;function l(f){var h={};return function(p,v){var m=p.dtype,g=p.order,w=[m,g.join()].join(),b=h[w];return b||(h[w]=b=f([m,g])),b(p.shape.slice(0),p.data,p.stride,p.offset|0,v)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}n.exports=c({funcName:"convert"})},7640(n,a,o){"use strict";var s=o(1888);function l(v){return v==="uint32"?[s.mallocUint32,s.freeUint32]:null}var u={"uint32,1,0":function(v,m){return function(w,b,_,M,x,T,A,y,E,S,C){var k,D,F,P=w*x+M,R,L=v(y),I,B,O,$;for(k=w+1;k<=b;++k){for(D=k,P+=x,F=P,I=0,B=P,R=0;R<y;++R)L[I++]=_[B],B+=E;e:for(;D-- >w;){I=0,B=F-x;t:for(R=0;R<y;++R){if(O=_[B],$=L[I],O<$)break e;if(O>$)break t;B+=S,I+=C}for(I=F,B=F-x,R=0;R<y;++R)_[I]=_[B],I+=E,B+=E;F-=x}for(I=F,B=0,R=0;R<y;++R)_[I]=L[B++],I+=E}m(L)}}};function c(v,m){var g=l(m),w=[m,v].join(","),b=u[w];return g?b(g[0],g[1]):b()}var f={"uint32,1,0":function(v,m,g){return function w(b,_,M,x,T,A,y,E,S,C,k){var D=(_-b+1)/6|0,F=b+D,P=_-D,R=b+_>>1,L=R-D,I=R+D,B=F,O=L,$=R,Y=I,K=P,j=b+1,q=_-1,J=!0,U,V,X,H,G,Q,te,ce,ge,Ce=0,be=0,he=0,oe,Ee,ye,ue,ee,ae,xe,re,pe,we,Fe,Se,ke,_e,Ie,Oe,Qe=E,et=m(Qe),_t=m(Qe);Ee=T*B,ye=T*O,Oe=x;e:for(oe=0;oe<E;++oe){if(te=Ee+Oe,ce=ye+Oe,he=M[te]-M[ce],he>0){V=B,B=O,O=V;break e}if(he<0)break e;Oe+=C}Ee=T*Y,ye=T*K,Oe=x;e:for(oe=0;oe<E;++oe){if(te=Ee+Oe,ce=ye+Oe,he=M[te]-M[ce],he>0){V=Y,Y=K,K=V;break e}if(he<0)break e;Oe+=C}Ee=T*B,ye=T*$,Oe=x;e:for(oe=0;oe<E;++oe){if(te=Ee+Oe,ce=ye+Oe,he=M[te]-M[ce],he>0){V=B,B=$,$=V;break e}if(he<0)break e;Oe+=C}Ee=T*O,ye=T*$,Oe=x;e:for(oe=0;oe<E;++oe){if(te=Ee+Oe,ce=ye+Oe,he=M[te]-M[ce],he>0){V=O,O=$,$=V;break e}if(he<0)break e;Oe+=C}Ee=T*B,ye=T*Y,Oe=x;e:for(oe=0;oe<E;++oe){if(te=Ee+Oe,ce=ye+Oe,he=M[te]-M[ce],he>0){V=B,B=Y,Y=V;break e}if(he<0)break e;Oe+=C}Ee=T*$,ye=T*Y,Oe=x;e:for(oe=0;oe<E;++oe){if(te=Ee+Oe,ce=ye+Oe,he=M[te]-M[ce],he>0){V=$,$=Y,Y=V;break e}if(he<0)break e;Oe+=C}Ee=T*O,ye=T*K,Oe=x;e:for(oe=0;oe<E;++oe){if(te=Ee+Oe,ce=ye+Oe,he=M[te]-M[ce],he>0){V=O,O=K,K=V;break e}if(he<0)break e;Oe+=C}Ee=T*O,ye=T*$,Oe=x;e:for(oe=0;oe<E;++oe){if(te=Ee+Oe,ce=ye+Oe,he=M[te]-M[ce],he>0){V=O,O=$,$=V;break e}if(he<0)break e;Oe+=C}Ee=T*Y,ye=T*K,Oe=x;e:for(oe=0;oe<E;++oe){if(te=Ee+Oe,ce=ye+Oe,he=M[te]-M[ce],he>0){V=Y,Y=K,K=V;break e}if(he<0)break e;Oe+=C}for(Ee=T*B,ye=T*O,ue=T*$,ee=T*Y,ae=T*K,xe=T*F,re=T*R,pe=T*P,Ie=0,Oe=x,oe=0;oe<E;++oe)te=Ee+Oe,ce=ye+Oe,ge=ue+Oe,we=ee+Oe,Fe=ae+Oe,Se=xe+Oe,ke=re+Oe,_e=pe+Oe,et[Ie]=M[ce],_t[Ie]=M[we],J=J&&et[Ie]===_t[Ie],X=M[te],H=M[ge],G=M[Fe],M[Se]=X,M[ke]=H,M[_e]=G,++Ie,Oe+=S;for(Ee=T*L,ye=T*b,Oe=x,oe=0;oe<E;++oe)te=Ee+Oe,ce=ye+Oe,M[te]=M[ce],Oe+=S;for(Ee=T*I,ye=T*_,Oe=x,oe=0;oe<E;++oe)te=Ee+Oe,ce=ye+Oe,M[te]=M[ce],Oe+=S;if(J)for(Q=j;Q<=q;++Q){te=x+Q*T,Ie=0;e:for(oe=0;oe<E;++oe){if(he=M[te]-et[Ie],he!==0)break e;Ie+=k,te+=C}if(he!==0)if(he<0){if(Q!==j)for(Ee=T*Q,ye=T*j,Oe=x,oe=0;oe<E;++oe)te=Ee+Oe,ce=ye+Oe,U=M[te],M[te]=M[ce],M[ce]=U,Oe+=S;++j}else for(;;){te=x+q*T,Ie=0;e:for(oe=0;oe<E;++oe){if(he=M[te]-et[Ie],he!==0)break e;Ie+=k,te+=C}if(he>0)q--;else if(he<0){for(Ee=T*Q,ye=T*j,ue=T*q,Oe=x,oe=0;oe<E;++oe)te=Ee+Oe,ce=ye+Oe,ge=ue+Oe,U=M[te],M[te]=M[ce],M[ce]=M[ge],M[ge]=U,Oe+=S;++j,--q;break}else{for(Ee=T*Q,ye=T*q,Oe=x,oe=0;oe<E;++oe)te=Ee+Oe,ce=ye+Oe,U=M[te],M[te]=M[ce],M[ce]=U,Oe+=S;--q;break}}}else for(Q=j;Q<=q;++Q){te=x+Q*T,Ie=0;e:for(oe=0;oe<E;++oe){if(Ce=M[te]-et[Ie],Ce!==0)break e;Ie+=k,te+=C}if(Ce<0){if(Q!==j)for(Ee=T*Q,ye=T*j,Oe=x,oe=0;oe<E;++oe)te=Ee+Oe,ce=ye+Oe,U=M[te],M[te]=M[ce],M[ce]=U,Oe+=S;++j}else{te=x+Q*T,Ie=0;e:for(oe=0;oe<E;++oe){if(be=M[te]-_t[Ie],be!==0)break e;Ie+=k,te+=C}if(be>0)for(;;){te=x+q*T,Ie=0;e:for(oe=0;oe<E;++oe){if(he=M[te]-_t[Ie],he!==0)break e;Ie+=k,te+=C}if(he>0){if(--q<Q)break;continue}else{te=x+q*T,Ie=0;e:for(oe=0;oe<E;++oe){if(he=M[te]-et[Ie],he!==0)break e;Ie+=k,te+=C}if(he<0){for(Ee=T*Q,ye=T*j,ue=T*q,Oe=x,oe=0;oe<E;++oe)te=Ee+Oe,ce=ye+Oe,ge=ue+Oe,U=M[te],M[te]=M[ce],M[ce]=M[ge],M[ge]=U,Oe+=S;++j,--q}else{for(Ee=T*Q,ye=T*q,Oe=x,oe=0;oe<E;++oe)te=Ee+Oe,ce=ye+Oe,U=M[te],M[te]=M[ce],M[ce]=U,Oe+=S;--q}break}}}}for(Ee=T*b,ye=T*(j-1),Ie=0,Oe=x,oe=0;oe<E;++oe)te=Ee+Oe,ce=ye+Oe,M[te]=M[ce],M[ce]=et[Ie],++Ie,Oe+=S;for(Ee=T*_,ye=T*(q+1),Ie=0,Oe=x,oe=0;oe<E;++oe)te=Ee+Oe,ce=ye+Oe,M[te]=M[ce],M[ce]=_t[Ie],++Ie,Oe+=S;if(j-2-b<=32?v(b,j-2,M,x,T,A,y,E,S,C,k):w(b,j-2,M,x,T,A,y,E,S,C,k),_-(q+2)<=32?v(q+2,_,M,x,T,A,y,E,S,C,k):w(q+2,_,M,x,T,A,y,E,S,C,k),J){g(et),g(_t);return}if(j<F&&q>P){e:for(;;){for(te=x+j*T,Ie=0,Oe=x,oe=0;oe<E;++oe){if(M[te]!==et[Ie])break e;++Ie,te+=S}++j}e:for(;;){for(te=x+q*T,Ie=0,Oe=x,oe=0;oe<E;++oe){if(M[te]!==_t[Ie])break e;++Ie,te+=S}--q}for(Q=j;Q<=q;++Q){te=x+Q*T,Ie=0;e:for(oe=0;oe<E;++oe){if(Ce=M[te]-et[Ie],Ce!==0)break e;Ie+=k,te+=C}if(Ce===0){if(Q!==j)for(Ee=T*Q,ye=T*j,Oe=x,oe=0;oe<E;++oe)te=Ee+Oe,ce=ye+Oe,U=M[te],M[te]=M[ce],M[ce]=U,Oe+=S;++j}else{te=x+Q*T,Ie=0;e:for(oe=0;oe<E;++oe){if(be=M[te]-_t[Ie],be!==0)break e;Ie+=k,te+=C}if(be===0)for(;;){te=x+q*T,Ie=0;e:for(oe=0;oe<E;++oe){if(he=M[te]-_t[Ie],he!==0)break e;Ie+=k,te+=C}if(he===0){if(--q<Q)break;continue}else{te=x+q*T,Ie=0;e:for(oe=0;oe<E;++oe){if(he=M[te]-et[Ie],he!==0)break e;Ie+=k,te+=C}if(he<0){for(Ee=T*Q,ye=T*j,ue=T*q,Oe=x,oe=0;oe<E;++oe)te=Ee+Oe,ce=ye+Oe,ge=ue+Oe,U=M[te],M[te]=M[ce],M[ce]=M[ge],M[ge]=U,Oe+=S;++j,--q}else{for(Ee=T*Q,ye=T*q,Oe=x,oe=0;oe<E;++oe)te=Ee+Oe,ce=ye+Oe,U=M[te],M[te]=M[ce],M[ce]=U,Oe+=S;--q}break}}}}}g(et),g(_t),q-j<=32?v(j,q,M,x,T,A,y,E,S,C,k):w(j,q,M,x,T,A,y,E,S,C,k)}}};function h(v,m,g){var w=l(m),b=[m,v].join(","),_=f[b];return v.length>1&&w?_(g,w[0],w[1]):_(g)}var d={"uint32,1,0":function(v,m){return function(g){var w=g.data,b=g.offset|0,_=g.shape,M=g.stride,x=M[0]|0,T=_[0]|0,A=M[1]|0,y=_[1]|0,E=A,S=A,C=1;T<=32?v(0,T-1,w,b,x,A,T,y,E,S,C):m(0,T-1,w,b,x,A,T,y,E,S,C)}}};function p(v,m){var g=[m,v].join(","),w=d[g],b=c(v,m),_=h(v,m,b);return w(b,_)}n.exports=p},446(n,a,o){"use strict";var s=o(7640),l={};function u(c){var f=c.order,h=c.dtype,d=[f,h],p=d.join(":"),v=l[p];return v||(l[p]=v=s(f,h)),v(c),c}n.exports=u},9618(n,a,o){var s=o(7163),l=typeof Float64Array!="undefined";function u(m,g){return m[0]-g[0]}function c(){var m=this.stride,g=new Array(m.length),w;for(w=0;w<g.length;++w)g[w]=[Math.abs(m[w]),w];g.sort(u);var b=new Array(g.length);for(w=0;w<b.length;++w)b[w]=g[w][1];return b}var f={T:function(m){function g(b){this.data=b}var w=g.prototype;return w.dtype=m,w.index=function(){return-1},w.size=0,w.dimension=-1,w.shape=w.stride=w.order=[],w.lo=w.hi=w.transpose=w.step=function(){return new g(this.data)},w.get=w.set=function(){},w.pick=function(){return null},function(_){return new g(_)}},0:function(m,g){function w(_,M){this.data=_,this.offset=M}var b=w.prototype;return b.dtype=m,b.index=function(){return this.offset},b.dimension=0,b.size=1,b.shape=b.stride=b.order=[],b.lo=b.hi=b.transpose=b.step=function(){return new w(this.data,this.offset)},b.pick=function(){return g(this.data)},b.valueOf=b.get=function(){return m==="generic"?this.data.get(this.offset):this.data[this.offset]},b.set=function(M){return m==="generic"?this.data.set(this.offset,M):this.data[this.offset]=M},function(M,x,T,A){return new w(M,A)}},1:function(m,g,w){function b(M,x,T,A){this.data=M,this.shape=[x],this.stride=[T],this.offset=A|0}var _=b.prototype;return _.dtype=m,_.dimension=1,Object.defineProperty(_,"size",{get:function(){return this.shape[0]}}),_.order=[0],_.set=function(x,T){return m==="generic"?this.data.set(this.offset+this.stride[0]*x,T):this.data[this.offset+this.stride[0]*x]=T},_.get=function(x){return m==="generic"?this.data.get(this.offset+this.stride[0]*x):this.data[this.offset+this.stride[0]*x]},_.index=function(x){return this.offset+this.stride[0]*x},_.hi=function(x){return new b(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,this.stride[0],this.offset)},_.lo=function(x){var T=this.offset,A=0,y=this.shape[0],E=this.stride[0];return typeof x=="number"&&x>=0&&(A=x|0,T+=E*A,y-=A),new b(this.data,y,E,T)},_.step=function(x){var T=this.shape[0],A=this.stride[0],y=this.offset,E=0,S=Math.ceil;return typeof x=="number"&&(E=x|0,E<0?(y+=A*(T-1),T=S(-T/E)):T=S(T/E),A*=E),new b(this.data,T,A,y)},_.transpose=function(x){x=x===void 0?0:x|0;var T=this.shape,A=this.stride;return new b(this.data,T[x],A[x],this.offset)},_.pick=function(x){var T=[],A=[],y=this.offset;typeof x=="number"&&x>=0?y=y+this.stride[0]*x|0:(T.push(this.shape[0]),A.push(this.stride[0]));var E=g[T.length+1];return E(this.data,T,A,y)},function(x,T,A,y){return new b(x,T[0],A[0],y)}},2:function(m,g,w){function b(M,x,T,A,y,E){this.data=M,this.shape=[x,T],this.stride=[A,y],this.offset=E|0}var _=b.prototype;return _.dtype=m,_.dimension=2,Object.defineProperty(_,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(_,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),_.set=function(x,T,A){return m==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*T,A):this.data[this.offset+this.stride[0]*x+this.stride[1]*T]=A},_.get=function(x,T){return m==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*T):this.data[this.offset+this.stride[0]*x+this.stride[1]*T]},_.index=function(x,T){return this.offset+this.stride[0]*x+this.stride[1]*T},_.hi=function(x,T){return new b(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof T!="number"||T<0?this.shape[1]:T|0,this.stride[0],this.stride[1],this.offset)},_.lo=function(x,T){var A=this.offset,y=0,E=this.shape[0],S=this.shape[1],C=this.stride[0],k=this.stride[1];return typeof x=="number"&&x>=0&&(y=x|0,A+=C*y,E-=y),typeof T=="number"&&T>=0&&(y=T|0,A+=k*y,S-=y),new b(this.data,E,S,C,k,A)},_.step=function(x,T){var A=this.shape[0],y=this.shape[1],E=this.stride[0],S=this.stride[1],C=this.offset,k=0,D=Math.ceil;return typeof x=="number"&&(k=x|0,k<0?(C+=E*(A-1),A=D(-A/k)):A=D(A/k),E*=k),typeof T=="number"&&(k=T|0,k<0?(C+=S*(y-1),y=D(-y/k)):y=D(y/k),S*=k),new b(this.data,A,y,E,S,C)},_.transpose=function(x,T){x=x===void 0?0:x|0,T=T===void 0?1:T|0;var A=this.shape,y=this.stride;return new b(this.data,A[x],A[T],y[x],y[T],this.offset)},_.pick=function(x,T){var A=[],y=[],E=this.offset;typeof x=="number"&&x>=0?E=E+this.stride[0]*x|0:(A.push(this.shape[0]),y.push(this.stride[0])),typeof T=="number"&&T>=0?E=E+this.stride[1]*T|0:(A.push(this.shape[1]),y.push(this.stride[1]));var S=g[A.length+1];return S(this.data,A,y,E)},function(x,T,A,y){return new b(x,T[0],T[1],A[0],A[1],y)}},3:function(m,g,w){function b(M,x,T,A,y,E,S,C){this.data=M,this.shape=[x,T,A],this.stride=[y,E,S],this.offset=C|0}var _=b.prototype;return _.dtype=m,_.dimension=3,Object.defineProperty(_,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(_,"order",{get:function(){var x=Math.abs(this.stride[0]),T=Math.abs(this.stride[1]),A=Math.abs(this.stride[2]);return x>T?T>A?[2,1,0]:x>A?[1,2,0]:[1,0,2]:x>A?[2,0,1]:A>T?[0,1,2]:[0,2,1]}}),_.set=function(x,T,A,y){return m==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A,y):this.data[this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A]=y},_.get=function(x,T,A){return m==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A):this.data[this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A]},_.index=function(x,T,A){return this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A},_.hi=function(x,T,A){return new b(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof A!="number"||A<0?this.shape[2]:A|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},_.lo=function(x,T,A){var y=this.offset,E=0,S=this.shape[0],C=this.shape[1],k=this.shape[2],D=this.stride[0],F=this.stride[1],P=this.stride[2];return typeof x=="number"&&x>=0&&(E=x|0,y+=D*E,S-=E),typeof T=="number"&&T>=0&&(E=T|0,y+=F*E,C-=E),typeof A=="number"&&A>=0&&(E=A|0,y+=P*E,k-=E),new b(this.data,S,C,k,D,F,P,y)},_.step=function(x,T,A){var y=this.shape[0],E=this.shape[1],S=this.shape[2],C=this.stride[0],k=this.stride[1],D=this.stride[2],F=this.offset,P=0,R=Math.ceil;return typeof x=="number"&&(P=x|0,P<0?(F+=C*(y-1),y=R(-y/P)):y=R(y/P),C*=P),typeof T=="number"&&(P=T|0,P<0?(F+=k*(E-1),E=R(-E/P)):E=R(E/P),k*=P),typeof A=="number"&&(P=A|0,P<0?(F+=D*(S-1),S=R(-S/P)):S=R(S/P),D*=P),new b(this.data,y,E,S,C,k,D,F)},_.transpose=function(x,T,A){x=x===void 0?0:x|0,T=T===void 0?1:T|0,A=A===void 0?2:A|0;var y=this.shape,E=this.stride;return new b(this.data,y[x],y[T],y[A],E[x],E[T],E[A],this.offset)},_.pick=function(x,T,A){var y=[],E=[],S=this.offset;typeof x=="number"&&x>=0?S=S+this.stride[0]*x|0:(y.push(this.shape[0]),E.push(this.stride[0])),typeof T=="number"&&T>=0?S=S+this.stride[1]*T|0:(y.push(this.shape[1]),E.push(this.stride[1])),typeof A=="number"&&A>=0?S=S+this.stride[2]*A|0:(y.push(this.shape[2]),E.push(this.stride[2]));var C=g[y.length+1];return C(this.data,y,E,S)},function(x,T,A,y){return new b(x,T[0],T[1],T[2],A[0],A[1],A[2],y)}},4:function(m,g,w){function b(M,x,T,A,y,E,S,C,k,D){this.data=M,this.shape=[x,T,A,y],this.stride=[E,S,C,k],this.offset=D|0}var _=b.prototype;return _.dtype=m,_.dimension=4,Object.defineProperty(_,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(_,"order",{get:w}),_.set=function(x,T,A,y,E){return m==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A+this.stride[3]*y,E):this.data[this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A+this.stride[3]*y]=E},_.get=function(x,T,A,y){return m==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A+this.stride[3]*y):this.data[this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A+this.stride[3]*y]},_.index=function(x,T,A,y){return this.offset+this.stride[0]*x+this.stride[1]*T+this.stride[2]*A+this.stride[3]*y},_.hi=function(x,T,A,y){return new b(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof A!="number"||A<0?this.shape[2]:A|0,typeof y!="number"||y<0?this.shape[3]:y|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},_.lo=function(x,T,A,y){var E=this.offset,S=0,C=this.shape[0],k=this.shape[1],D=this.shape[2],F=this.shape[3],P=this.stride[0],R=this.stride[1],L=this.stride[2],I=this.stride[3];return typeof x=="number"&&x>=0&&(S=x|0,E+=P*S,C-=S),typeof T=="number"&&T>=0&&(S=T|0,E+=R*S,k-=S),typeof A=="number"&&A>=0&&(S=A|0,E+=L*S,D-=S),typeof y=="number"&&y>=0&&(S=y|0,E+=I*S,F-=S),new b(this.data,C,k,D,F,P,R,L,I,E)},_.step=function(x,T,A,y){var E=this.shape[0],S=this.shape[1],C=this.shape[2],k=this.shape[3],D=this.stride[0],F=this.stride[1],P=this.stride[2],R=this.stride[3],L=this.offset,I=0,B=Math.ceil;return typeof x=="number"&&(I=x|0,I<0?(L+=D*(E-1),E=B(-E/I)):E=B(E/I),D*=I),typeof T=="number"&&(I=T|0,I<0?(L+=F*(S-1),S=B(-S/I)):S=B(S/I),F*=I),typeof A=="number"&&(I=A|0,I<0?(L+=P*(C-1),C=B(-C/I)):C=B(C/I),P*=I),typeof y=="number"&&(I=y|0,I<0?(L+=R*(k-1),k=B(-k/I)):k=B(k/I),R*=I),new b(this.data,E,S,C,k,D,F,P,R,L)},_.transpose=function(x,T,A,y){x=x===void 0?0:x|0,T=T===void 0?1:T|0,A=A===void 0?2:A|0,y=y===void 0?3:y|0;var E=this.shape,S=this.stride;return new b(this.data,E[x],E[T],E[A],E[y],S[x],S[T],S[A],S[y],this.offset)},_.pick=function(x,T,A,y){var E=[],S=[],C=this.offset;typeof x=="number"&&x>=0?C=C+this.stride[0]*x|0:(E.push(this.shape[0]),S.push(this.stride[0])),typeof T=="number"&&T>=0?C=C+this.stride[1]*T|0:(E.push(this.shape[1]),S.push(this.stride[1])),typeof A=="number"&&A>=0?C=C+this.stride[2]*A|0:(E.push(this.shape[2]),S.push(this.stride[2])),typeof y=="number"&&y>=0?C=C+this.stride[3]*y|0:(E.push(this.shape[3]),S.push(this.stride[3]));var k=g[E.length+1];return k(this.data,E,S,C)},function(x,T,A,y){return new b(x,T[0],T[1],T[2],T[3],A[0],A[1],A[2],A[3],y)}},5:function(g,w,b){function _(x,T,A,y,E,S,C,k,D,F,P,R){this.data=x,this.shape=[T,A,y,E,S],this.stride=[C,k,D,F,P],this.offset=R|0}var M=_.prototype;return M.dtype=g,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:b}),M.set=function(T,A,y,E,S,C){return g==="generic"?this.data.set(this.offset+this.stride[0]*T+this.stride[1]*A+this.stride[2]*y+this.stride[3]*E+this.stride[4]*S,C):this.data[this.offset+this.stride[0]*T+this.stride[1]*A+this.stride[2]*y+this.stride[3]*E+this.stride[4]*S]=C},M.get=function(T,A,y,E,S){return g==="generic"?this.data.get(this.offset+this.stride[0]*T+this.stride[1]*A+this.stride[2]*y+this.stride[3]*E+this.stride[4]*S):this.data[this.offset+this.stride[0]*T+this.stride[1]*A+this.stride[2]*y+this.stride[3]*E+this.stride[4]*S]},M.index=function(T,A,y,E,S){return this.offset+this.stride[0]*T+this.stride[1]*A+this.stride[2]*y+this.stride[3]*E+this.stride[4]*S},M.hi=function(T,A,y,E,S){return new _(this.data,typeof T!="number"||T<0?this.shape[0]:T|0,typeof A!="number"||A<0?this.shape[1]:A|0,typeof y!="number"||y<0?this.shape[2]:y|0,typeof E!="number"||E<0?this.shape[3]:E|0,typeof S!="number"||S<0?this.shape[4]:S|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},M.lo=function(T,A,y,E,S){var C=this.offset,k=0,D=this.shape[0],F=this.shape[1],P=this.shape[2],R=this.shape[3],L=this.shape[4],I=this.stride[0],B=this.stride[1],O=this.stride[2],$=this.stride[3],Y=this.stride[4];return typeof T=="number"&&T>=0&&(k=T|0,C+=I*k,D-=k),typeof A=="number"&&A>=0&&(k=A|0,C+=B*k,F-=k),typeof y=="number"&&y>=0&&(k=y|0,C+=O*k,P-=k),typeof E=="number"&&E>=0&&(k=E|0,C+=$*k,R-=k),typeof S=="number"&&S>=0&&(k=S|0,C+=Y*k,L-=k),new _(this.data,D,F,P,R,L,I,B,O,$,Y,C)},M.step=function(T,A,y,E,S){var C=this.shape[0],k=this.shape[1],D=this.shape[2],F=this.shape[3],P=this.shape[4],R=this.stride[0],L=this.stride[1],I=this.stride[2],B=this.stride[3],O=this.stride[4],$=this.offset,Y=0,K=Math.ceil;return typeof T=="number"&&(Y=T|0,Y<0?($+=R*(C-1),C=K(-C/Y)):C=K(C/Y),R*=Y),typeof A=="number"&&(Y=A|0,Y<0?($+=L*(k-1),k=K(-k/Y)):k=K(k/Y),L*=Y),typeof y=="number"&&(Y=y|0,Y<0?($+=I*(D-1),D=K(-D/Y)):D=K(D/Y),I*=Y),typeof E=="number"&&(Y=E|0,Y<0?($+=B*(F-1),F=K(-F/Y)):F=K(F/Y),B*=Y),typeof S=="number"&&(Y=S|0,Y<0?($+=O*(P-1),P=K(-P/Y)):P=K(P/Y),O*=Y),new _(this.data,C,k,D,F,P,R,L,I,B,O,$)},M.transpose=function(T,A,y,E,S){T=T===void 0?0:T|0,A=A===void 0?1:A|0,y=y===void 0?2:y|0,E=E===void 0?3:E|0,S=S===void 0?4:S|0;var C=this.shape,k=this.stride;return new _(this.data,C[T],C[A],C[y],C[E],C[S],k[T],k[A],k[y],k[E],k[S],this.offset)},M.pick=function(T,A,y,E,S){var C=[],k=[],D=this.offset;typeof T=="number"&&T>=0?D=D+this.stride[0]*T|0:(C.push(this.shape[0]),k.push(this.stride[0])),typeof A=="number"&&A>=0?D=D+this.stride[1]*A|0:(C.push(this.shape[1]),k.push(this.stride[1])),typeof y=="number"&&y>=0?D=D+this.stride[2]*y|0:(C.push(this.shape[2]),k.push(this.stride[2])),typeof E=="number"&&E>=0?D=D+this.stride[3]*E|0:(C.push(this.shape[3]),k.push(this.stride[3])),typeof S=="number"&&S>=0?D=D+this.stride[4]*S|0:(C.push(this.shape[4]),k.push(this.stride[4]));var F=w[C.length+1];return F(this.data,C,k,D)},function(T,A,y,E){return new _(T,A[0],A[1],A[2],A[3],A[4],y[0],y[1],y[2],y[3],y[4],E)}}};function h(m,g){var w=g===-1?"T":String(g),b=f[w];return g===-1?b(m):g===0?b(m,p[m][0]):b(m,p[m],c)}function d(m){if(s(m))return"buffer";if(l)switch(Object.prototype.toString.call(m)){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(m)?"array":"generic"}var p={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function v(m,g,w,b){if(m===void 0){var y=p.array[0];return y([])}else typeof m=="number"&&(m=[m]);g===void 0&&(g=[m.length]);var _=g.length;if(w===void 0){w=new Array(_);for(var M=_-1,x=1;M>=0;--M)w[M]=x,x*=g[M]}if(b===void 0){b=0;for(var M=0;M<_;++M)w[M]<0&&(b-=(g[M]-1)*w[M])}for(var T=d(m),A=p[T];A.length<=_+1;)A.push(h(T,A.length-1));var y=A[_+1];return y(m,g,w,b)}n.exports=v},1278(n,a,o){"use strict";var s=o(2361),l=Math.pow(2,-1074),u=-1>>>0;n.exports=c;function c(f,h){if(isNaN(f)||isNaN(h))return NaN;if(f===h)return f;if(f===0)return h<0?-l:l;var d=s.hi(f),p=s.lo(f);return h>f==f>0?p===u?(d+=1,p=0):p+=1:p===0?(p=u,d-=1):p-=1,s.pack(p,d)}},8406(n,a){var o=1e-6,s=1e-6;a.vertexNormals=function(l,u,c){for(var f=u.length,h=new Array(f),d=c===void 0?o:c,p=0;p<f;++p)h[p]=[0,0,0];for(var p=0;p<l.length;++p)for(var v=l[p],m=0,g=v[v.length-1],w=v[0],b=0;b<v.length;++b){m=g,g=w,w=v[(b+1)%v.length];for(var _=u[m],M=u[g],x=u[w],T=new Array(3),A=0,y=new Array(3),E=0,S=0;S<3;++S)T[S]=_[S]-M[S],A+=T[S]*T[S],y[S]=x[S]-M[S],E+=y[S]*y[S];if(A*E>d)for(var C=h[g],k=1/Math.sqrt(A*E),S=0;S<3;++S){var D=(S+1)%3,F=(S+2)%3;C[S]+=k*(y[D]*T[F]-y[F]*T[D])}}for(var p=0;p<f;++p){for(var C=h[p],P=0,S=0;S<3;++S)P+=C[S]*C[S];if(P>d)for(var k=1/Math.sqrt(P),S=0;S<3;++S)C[S]*=k;else for(var S=0;S<3;++S)C[S]=0}return h},a.faceNormals=function(l,u,c){for(var f=l.length,h=new Array(f),d=c===void 0?s:c,p=0;p<f;++p){for(var v=l[p],m=new Array(3),g=0;g<3;++g)m[g]=u[v[g]];for(var w=new Array(3),b=new Array(3),g=0;g<3;++g)w[g]=m[1][g]-m[0][g],b[g]=m[2][g]-m[0][g];for(var _=new Array(3),M=0,g=0;g<3;++g){var x=(g+1)%3,T=(g+2)%3;_[g]=w[x]*b[T]-w[T]*b[x],M+=_[g]*_[g]}M>d?M=1/Math.sqrt(M):M=0;for(var g=0;g<3;++g)_[g]*=M;h[p]=_}return h}},4081(n){"use strict";n.exports=a;function a(o,s,l,u,c,f,h,d,p,v){var m=s+f+v;if(g>0){var g=Math.sqrt(m+1);o[0]=.5*(h-p)/g,o[1]=.5*(d-u)/g,o[2]=.5*(l-f)/g,o[3]=.5*g}else{var w=Math.max(s,f,v),g=Math.sqrt(2*w-m+1);s>=w?(o[0]=.5*g,o[1]=.5*(c+l)/g,o[2]=.5*(d+u)/g,o[3]=.5*(h-p)/g):f>=w?(o[0]=.5*(l+c)/g,o[1]=.5*g,o[2]=.5*(p+h)/g,o[3]=.5*(d-u)/g):(o[0]=.5*(u+d)/g,o[1]=.5*(h+p)/g,o[2]=.5*g,o[3]=.5*(l-c)/g)}return o}},9977(n,a,o){"use strict";n.exports=g;var s=o(9215),l=o(6582),u=o(7399),c=o(7608),f=o(4081);function h(w,b,_){return Math.sqrt(Math.pow(w,2)+Math.pow(b,2)+Math.pow(_,2))}function d(w,b,_,M){return Math.sqrt(Math.pow(w,2)+Math.pow(b,2)+Math.pow(_,2)+Math.pow(M,2))}function p(w,b){var _=b[0],M=b[1],x=b[2],T=b[3],A=d(_,M,x,T);A>1e-6?(w[0]=_/A,w[1]=M/A,w[2]=x/A,w[3]=T/A):(w[0]=w[1]=w[2]=0,w[3]=1)}function v(w,b,_){this.radius=s([_]),this.center=s(b),this.rotation=s(w),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 m=v.prototype;m.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},m.recalcMatrix=function(w){this.radius.curve(w),this.center.curve(w),this.rotation.curve(w);var b=this.computedRotation;p(b,b);var _=this.computedMatrix;u(_,b);var M=this.computedCenter,x=this.computedEye,T=this.computedUp,A=Math.exp(this.computedRadius[0]);x[0]=M[0]+A*_[2],x[1]=M[1]+A*_[6],x[2]=M[2]+A*_[10],T[0]=_[1],T[1]=_[5],T[2]=_[9];for(var y=0;y<3;++y){for(var E=0,S=0;S<3;++S)E+=_[y+4*S]*x[S];_[12+y]=-E}},m.getMatrix=function(w,b){this.recalcMatrix(w);var _=this.computedMatrix;if(b){for(var M=0;M<16;++M)b[M]=_[M];return b}return _},m.idle=function(w){this.center.idle(w),this.radius.idle(w),this.rotation.idle(w)},m.flush=function(w){this.center.flush(w),this.radius.flush(w),this.rotation.flush(w)},m.pan=function(w,b,_,M){b=b||0,_=_||0,M=M||0,this.recalcMatrix(w);var x=this.computedMatrix,T=x[1],A=x[5],y=x[9],E=h(T,A,y);T/=E,A/=E,y/=E;var S=x[0],C=x[4],k=x[8],D=S*T+C*A+k*y;S-=T*D,C-=A*D,k-=y*D;var F=h(S,C,k);S/=F,C/=F,k/=F;var P=x[2],R=x[6],L=x[10],I=P*T+R*A+L*y,B=P*S+R*C+L*k;P-=I*T+B*S,R-=I*A+B*C,L-=I*y+B*k;var O=h(P,R,L);P/=O,R/=O,L/=O;var $=S*b+T*_,Y=C*b+A*_,K=k*b+y*_;this.center.move(w,$,Y,K);var j=Math.exp(this.computedRadius[0]);j=Math.max(1e-4,j+M),this.radius.set(w,Math.log(j))},m.rotate=function(w,b,_,M){this.recalcMatrix(w),b=b||0,_=_||0;var x=this.computedMatrix,T=x[0],A=x[4],y=x[8],E=x[1],S=x[5],C=x[9],k=x[2],D=x[6],F=x[10],P=b*T+_*E,R=b*A+_*S,L=b*y+_*C,I=-(D*L-F*R),B=-(F*P-k*L),O=-(k*R-D*P),$=Math.sqrt(Math.max(0,1-Math.pow(I,2)-Math.pow(B,2)-Math.pow(O,2))),Y=d(I,B,O,$);Y>1e-6?(I/=Y,B/=Y,O/=Y,$/=Y):(I=B=O=0,$=1);var K=this.computedRotation,j=K[0],q=K[1],J=K[2],U=K[3],V=j*$+U*I+q*O-J*B,X=q*$+U*B+J*I-j*O,H=J*$+U*O+j*B-q*I,G=U*$-j*I-q*B-J*O;if(M){I=k,B=D,O=F;var Q=Math.sin(M)/h(I,B,O);I*=Q,B*=Q,O*=Q,$=Math.cos(b),V=V*$+G*I+X*O-H*B,X=X*$+G*B+H*I-V*O,H=H*$+G*O+V*B-X*I,G=G*$-V*I-X*B-H*O}var te=d(V,X,H,G);te>1e-6?(V/=te,X/=te,H/=te,G/=te):(V=X=H=0,G=1),this.rotation.set(w,V,X,H,G)},m.lookAt=function(w,b,_,M){this.recalcMatrix(w),_=_||this.computedCenter,b=b||this.computedEye,M=M||this.computedUp;var x=this.computedMatrix;l(x,b,_,M);var T=this.computedRotation;f(T,x[0],x[1],x[2],x[4],x[5],x[6],x[8],x[9],x[10]),p(T,T),this.rotation.set(w,T[0],T[1],T[2],T[3]);for(var A=0,y=0;y<3;++y)A+=Math.pow(_[y]-b[y],2);this.radius.set(w,.5*Math.log(Math.max(A,1e-6))),this.center.set(w,_[0],_[1],_[2])},m.translate=function(w,b,_,M){this.center.move(w,b||0,_||0,M||0)},m.setMatrix=function(w,b){var _=this.computedRotation;f(_,b[0],b[1],b[2],b[4],b[5],b[6],b[8],b[9],b[10]),p(_,_),this.rotation.set(w,_[0],_[1],_[2],_[3]);var M=this.computedMatrix;c(M,b);var x=M[15];if(Math.abs(x)>1e-6){var T=M[12]/x,A=M[13]/x,y=M[14]/x;this.recalcMatrix(w);var E=Math.exp(this.computedRadius[0]);this.center.set(w,T-M[2]*E,A-M[6]*E,y-M[10]*E),this.radius.idle(w)}else this.center.idle(w),this.radius.idle(w)},m.setDistance=function(w,b){b>0&&this.radius.set(w,Math.log(b))},m.setDistanceLimits=function(w,b){w>0?w=Math.log(w):w=-1/0,b>0?b=Math.log(b):b=1/0,b=Math.max(b,w),this.radius.bounds[0][0]=w,this.radius.bounds[1][0]=b},m.getDistanceLimits=function(w){var b=this.radius.bounds;return w?(w[0]=Math.exp(b[0][0]),w[1]=Math.exp(b[1][0]),w):[Math.exp(b[0][0]),Math.exp(b[1][0])]},m.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]}},m.fromJSON=function(w){var b=this.lastT(),_=w.center;_&&this.center.set(b,_[0],_[1],_[2]);var M=w.rotation;M&&this.rotation.set(b,M[0],M[1],M[2],M[3]);var x=w.distance;x&&x>0&&this.radius.set(b,Math.log(x)),this.setDistanceLimits(w.zoomMin,w.zoomMax)};function g(w){w=w||{};var b=w.center||[0,0,0],_=w.rotation||[0,0,0,1],M=w.radius||1;b=[].slice.call(b,0,3),_=[].slice.call(_,0,4),p(_,_);var x=new v(_,b,Math.log(M));return x.setDistanceLimits(w.zoomMin,w.zoomMax),("eye"in w||"up"in w)&&x.lookAt(0,w.eye,w.center,w.up),x}},1371(n,a,o){"use strict";var s=o(3233);n.exports=function(u,c,f){return f=typeof f!="undefined"?f+"":" ",s(f,c)+u}},3202(n){n.exports=function(o,s){s||(s=[0,""]),o=String(o);var l=parseFloat(o,10);return s[0]=l,s[1]=o.match(/[\d.\-\+]*\s*(.*)/)[1]||"",s}},3088(n,a,o){"use strict";n.exports=l;var s=o(3140);function l(u,c){for(var f=c.length|0,h=u.length,d=[new Array(f),new Array(f)],p=0;p<f;++p)d[0][p]=[],d[1][p]=[];for(var p=0;p<h;++p){var v=u[p];d[0][v[0]].push(v),d[1][v[1]].push(v)}for(var m=[],p=0;p<f;++p)d[0][p].length+d[1][p].length===0&&m.push([p]);function g(y,E){var S=d[E][y[E]];S.splice(S.indexOf(y),1)}function w(y,E,S){for(var C,k,D,F=0;F<2;++F)if(d[F][E].length>0){C=d[F][E][0],D=F;break}k=C[D^1];for(var P=0;P<2;++P)for(var R=d[P][E],L=0;L<R.length;++L){var I=R[L],B=I[P^1],O=s(c[y],c[E],c[k],c[B]);O>0&&(C=I,k=B,D=P)}return S||C&&g(C,D),k}function b(y,E){var S=d[E][y][0],C=[y];g(S,E);for(var k=S[E^1],D=E;;){for(;k!==y;)C.push(k),k=w(C[C.length-2],k,!1);if(d[0][y].length+d[1][y].length===0)break;var F=C[C.length-1],P=y,R=C[1],L=w(F,P,!0);if(s(c[F],c[P],c[R],c[L])<0)break;C.push(y),k=w(F,P)}return C}function _(y,E){return E[1]===E[E.length-1]}for(var p=0;p<f;++p)for(var M=0;M<2;++M){for(var x=[];d[M][p].length>0;){var T=d[0][p].length,A=b(p,M);_(x,A)?x.push.apply(x,A):(x.length>0&&m.push(x),x=A)}x.length>0&&m.push(x)}return m}},5609(n,a,o){"use strict";n.exports=l;var s=o(3134);function l(u,c){for(var f=s(u,c.length),h=new Array(c.length),d=new Array(c.length),p=[],v=0;v<c.length;++v){var m=f[v].length;d[v]=m,h[v]=!0,m<=1&&p.push(v)}for(;p.length>0;){var g=p.pop();h[g]=!1;for(var w=f[g],v=0;v<w.length;++v){var b=w[v];--d[b]===0&&p.push(b)}}for(var _=new Array(c.length),M=[],v=0;v<c.length;++v)if(h[v]){var g=M.length;_[v]=g,M.push(c[v])}else _[v]=-1;for(var x=[],v=0;v<u.length;++v){var T=u[v];h[T[0]]&&h[T[1]]&&x.push([_[T[0]],_[T[1]]])}return[x,M]}},2095(n,a,o){"use strict";n.exports=m;var s=o(3134),l=o(3088),u=o(5085),c=o(5250),f=o(8210),h=o(1682),d=o(5609);function p(g,w){for(var b=new Array(g),_=0;_<g;++_)b[_]=w;return b}function v(g){for(var w=new Array(g),b=0;b<g;++b)w[b]=[];return w}function m(g,w){var Q=d(g,w);g=Q[0],w=Q[1];for(var b=w.length,_=g.length,M=s(g,w.length),x=0;x<b;++x)if(M[x].length%2===1)throw new Error("planar-graph-to-polyline: graph must be manifold");var T=l(g,w);function A(oe){for(var Ee=oe.length,ye=[0],ue=0;ue<Ee;++ue){var ee=w[oe[ue]],ae=w[oe[(ue+1)%Ee]],xe=c(-ee[0],ee[1]),re=c(-ee[0],ae[1]),pe=c(ae[0],ee[1]),we=c(ae[0],ae[1]);ye=f(ye,f(f(xe,re),f(pe,we)))}return ye[ye.length-1]>0}T=T.filter(A);for(var y=T.length,E=new Array(y),S=new Array(y),x=0;x<y;++x){E[x]=x;var C=new Array(y),k=T[x].map(function(Ee){return w[Ee]}),D=u([k]),F=0;e:for(var P=0;P<y;++P)if(C[P]=0,x!==P){for(var R=T[P],L=R.length,I=0;I<L;++I){var B=D(w[R[I]]);if(B!==0){B<0&&(C[P]=1,F+=1);continue e}}C[P]=1,F+=1}S[x]=[F,x,C]}S.sort(function(oe,Ee){return Ee[0]-oe[0]});for(var x=0;x<y;++x)for(var C=S[x],O=C[1],$=C[2],P=0;P<y;++P)$[P]&&(E[P]=O);for(var Y=v(y),x=0;x<y;++x)Y[x].push(E[x]),Y[E[x]].push(x);for(var K={},j=p(b,!1),x=0;x<y;++x)for(var R=T[x],L=R.length,P=0;P<L;++P){var q=R[P],J=R[(P+1)%L],U=Math.min(q,J)+":"+Math.max(q,J);if(U in K){var V=K[U];Y[V].push(x),Y[x].push(V),j[q]=j[J]=!0}else K[U]=x}function X(oe){for(var Ee=oe.length,ye=0;ye<Ee;++ye)if(!j[oe[ye]])return!1;return!0}for(var H=[],G=p(y,-1),x=0;x<y;++x)E[x]===x&&!X(T[x])?(H.push(x),G[x]=0):G[x]=-1;for(var Q=[];H.length>0;){var te=H.pop(),ce=Y[te];h(ce,function(oe,Ee){return oe-Ee});var ge=ce.length,Ce=G[te],be;if(Ce===0){var R=T[te];be=[R]}for(var x=0;x<ge;++x){var he=ce[x];if(!(G[he]>=0)&&(G[he]=Ce^1,H.push(he),Ce===0)){var R=T[he];X(R)||(R.reverse(),be.push(R))}}Ce===0&&Q.push(be)}return Q}},5085(n,a,o){n.exports=w;var s=o(3250)[3],l=o(4209),u=o(3352),c=o(2478);function f(){return!0}function h(b){return function(_,M){var x=b[_];return x?!!x.queryPoint(M,f):!1}}function d(b){for(var _={},M=0;M<b.length;++M){var x=b[M],T=x[0][0],A=x[0][1],y=x[1][1],E=[Math.min(A,y),Math.max(A,y)];T in _?_[T].push(E):_[T]=[E]}for(var S={},C=Object.keys(_),M=0;M<C.length;++M){var k=_[C[M]];S[C[M]]=u(k)}return h(S)}function p(b,_){return function(M){var x=c.le(_,M[0]);if(x<0)return 1;var T=b[x];if(!T)if(x>0&&_[x]===M[0])T=b[x-1];else return 1;for(var A=1;T;){var y=T.key,E=s(M,y[0],y[1]);if(y[0][0]<y[1][0])if(E<0)T=T.left;else if(E>0)A=-1,T=T.right;else return 0;else if(E>0)T=T.left;else if(E<0)A=1,T=T.right;else return 0}return A}}function v(b){return 1}function m(b){return function(M){return b(M[0],M[1])?0:1}}function g(b,_){return function(x){return b(x[0],x[1])?0:_(x)}}function w(b){for(var _=b.length,M=[],x=[],T=0,A=0;A<_;++A)for(var y=b[A],E=y.length,S=E-1,C=0;C<E;S=C++){var k=y[S],D=y[C];k[0]===D[0]?x.push([k,D]):M.push([k,D])}if(M.length===0)return x.length===0?v:m(d(x));var F=l(M),P=p(F.slabs,F.coordinates);return x.length===0?P:g(d(x),P)}},9346(n){"use strict";var a=new Float64Array(4),o=new Float64Array(4),s=new Float64Array(4);function l(u,c,f,h,d){a.length<h.length&&(a=new Float64Array(h.length),o=new Float64Array(h.length),s=new Float64Array(h.length));for(var p=0;p<h.length;++p)a[p]=u[p]-h[p],o[p]=c[p]-u[p],s[p]=f[p]-u[p];for(var v=0,m=0,g=0,w=0,b=0,_=0,p=0;p<h.length;++p){var M=o[p],x=s[p],T=a[p];v+=M*M,m+=M*x,g+=x*x,w+=T*M,b+=T*x,_+=T*T}var A=Math.abs(v*g-m*m),y=m*b-g*w,E=m*w-v*b,S;if(y+E<=A)if(y<0)E<0&&w<0?(E=0,-w>=v?(y=1,S=v+2*w+_):(y=-w/v,S=w*y+_)):(y=0,b>=0?(E=0,S=_):-b>=g?(E=1,S=g+2*b+_):(E=-b/g,S=b*E+_));else if(E<0)E=0,w>=0?(y=0,S=_):-w>=v?(y=1,S=v+2*w+_):(y=-w/v,S=w*y+_);else{var C=1/A;y*=C,E*=C,S=y*(v*y+m*E+2*w)+E*(m*y+g*E+2*b)+_}else{var k,D,F,P;y<0?(k=m+w,D=g+b,D>k?(F=D-k,P=v-2*m+g,F>=P?(y=1,E=0,S=v+2*w+_):(y=F/P,E=1-y,S=y*(v*y+m*E+2*w)+E*(m*y+g*E+2*b)+_)):(y=0,D<=0?(E=1,S=g+2*b+_):b>=0?(E=0,S=_):(E=-b/g,S=b*E+_))):E<0?(k=m+b,D=v+w,D>k?(F=D-k,P=v-2*m+g,F>=P?(E=1,y=0,S=g+2*b+_):(E=F/P,y=1-E,S=y*(v*y+m*E+2*w)+E*(m*y+g*E+2*b)+_)):(E=0,D<=0?(y=1,S=v+2*w+_):w>=0?(y=0,S=_):(y=-w/v,S=w*y+_))):(F=g+b-m-w,F<=0?(y=0,E=1,S=g+2*b+_):(P=v-2*m+g,F>=P?(y=1,E=0,S=v+2*w+_):(y=F/P,E=1-y,S=y*(v*y+m*E+2*w)+E*(m*y+g*E+2*b)+_)))}for(var R=1-y-E,p=0;p<h.length;++p)d[p]=R*u[p]+y*c[p]+E*f[p];return S<0?0:S}n.exports=l},8648(n,a,o){n.exports=o(783)},2653(n,a,o){"use strict";var s=o(3865);n.exports=l;function l(u,c){for(var f=u.length,h=new Array(f),d=0;d<f;++d)h[d]=s(u[d],c[d]);return h}},5838(n,a,o){"use strict";n.exports=l;var s=o(7842);function l(u){for(var c=new Array(u.length),f=0;f<u.length;++f)c[f]=s(u[f]);return c}},8987(n,a,o){"use strict";var s=o(7842),l=o(6504);n.exports=u;function u(c,f){for(var h=s(f),d=c.length,p=new Array(d),v=0;v<d;++v)p[v]=l(c[v],h);return p}},544(n,a,o){"use strict";var s=o(5572);n.exports=l;function l(u,c){for(var f=u.length,h=new Array(f),d=0;d<f;++d)h[d]=s(u[d],c[d]);return h}},5771(n,a,o){"use strict";var s=o(8507),l=o(3788),u=o(2419);n.exports=c;function c(f){f.sort(l);for(var h=f.length,d=0,p=0;p<h;++p){var v=f[p],m=u(v);if(m!==0){if(d>0){var g=f[d-1];if(s(v,g)===0&&u(g)!==m){d-=1;continue}}f[d++]=v}}return f.length=d,f}},3233(n){"use strict";var a="",o;n.exports=s;function s(l,u){if(typeof l!="string")throw new TypeError("expected a string");if(u===1)return l;if(u===2)return l+l;var c=l.length*u;if(o!==l||typeof o=="undefined")o=l,a="";else if(a.length>=c)return a.substr(0,c);for(;c>a.length&&u>1;)u&1&&(a+=l),u>>=1,l+=l;return a+=l,a=a.substr(0,c),a}},3025(n,a,o){n.exports=o.g.performance&&o.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004(n){"use strict";n.exports=a;function a(o){for(var s=o.length,l=o[o.length-1],u=s,c=s-2;c>=0;--c){var f=l,h=o[c];l=f+h;var d=l-f,p=h-d;p&&(o[--u]=l,l=p)}for(var v=0,c=u;c<s;++c){var f=o[c],h=l;l=f+h;var d=l-f,p=h-d;p&&(o[v++]=p)}return o[v++]=l,o.length=v,o}},2962(n,a,o){"use strict";var s=o(5250),l=o(8210),u=o(3012),c=o(7004),f=6;function h(_,M,x,T){return function(y){return T(_(x(y[0][0],y[1][1]),x(-y[0][1],y[1][0])))}}function d(_,M,x,T){return function(y){return T(_(M(_(x(y[1][1],y[2][2]),x(-y[1][2],y[2][1])),y[0][0]),_(M(_(x(y[1][0],y[2][2]),x(-y[1][2],y[2][0])),-y[0][1]),M(_(x(y[1][0],y[2][1]),x(-y[1][1],y[2][0])),y[0][2]))))}}function p(_,M,x,T){return function(y){return T(_(_(M(_(M(_(x(y[2][2],y[3][3]),x(-y[2][3],y[3][2])),y[1][1]),_(M(_(x(y[2][1],y[3][3]),x(-y[2][3],y[3][1])),-y[1][2]),M(_(x(y[2][1],y[3][2]),x(-y[2][2],y[3][1])),y[1][3]))),y[0][0]),M(_(M(_(x(y[2][2],y[3][3]),x(-y[2][3],y[3][2])),y[1][0]),_(M(_(x(y[2][0],y[3][3]),x(-y[2][3],y[3][0])),-y[1][2]),M(_(x(y[2][0],y[3][2]),x(-y[2][2],y[3][0])),y[1][3]))),-y[0][1])),_(M(_(M(_(x(y[2][1],y[3][3]),x(-y[2][3],y[3][1])),y[1][0]),_(M(_(x(y[2][0],y[3][3]),x(-y[2][3],y[3][0])),-y[1][1]),M(_(x(y[2][0],y[3][1]),x(-y[2][1],y[3][0])),y[1][3]))),y[0][2]),M(_(M(_(x(y[2][1],y[3][2]),x(-y[2][2],y[3][1])),y[1][0]),_(M(_(x(y[2][0],y[3][2]),x(-y[2][2],y[3][0])),-y[1][1]),M(_(x(y[2][0],y[3][1]),x(-y[2][1],y[3][0])),y[1][2]))),-y[0][3]))))}}function v(_,M,x,T){return function(y){return T(_(_(M(_(_(M(_(M(_(x(y[3][3],y[4][4]),x(-y[3][4],y[4][3])),y[2][2]),_(M(_(x(y[3][2],y[4][4]),x(-y[3][4],y[4][2])),-y[2][3]),M(_(x(y[3][2],y[4][3]),x(-y[3][3],y[4][2])),y[2][4]))),y[1][1]),M(_(M(_(x(y[3][3],y[4][4]),x(-y[3][4],y[4][3])),y[2][1]),_(M(_(x(y[3][1],y[4][4]),x(-y[3][4],y[4][1])),-y[2][3]),M(_(x(y[3][1],y[4][3]),x(-y[3][3],y[4][1])),y[2][4]))),-y[1][2])),_(M(_(M(_(x(y[3][2],y[4][4]),x(-y[3][4],y[4][2])),y[2][1]),_(M(_(x(y[3][1],y[4][4]),x(-y[3][4],y[4][1])),-y[2][2]),M(_(x(y[3][1],y[4][2]),x(-y[3][2],y[4][1])),y[2][4]))),y[1][3]),M(_(M(_(x(y[3][2],y[4][3]),x(-y[3][3],y[4][2])),y[2][1]),_(M(_(x(y[3][1],y[4][3]),x(-y[3][3],y[4][1])),-y[2][2]),M(_(x(y[3][1],y[4][2]),x(-y[3][2],y[4][1])),y[2][3]))),-y[1][4]))),y[0][0]),M(_(_(M(_(M(_(x(y[3][3],y[4][4]),x(-y[3][4],y[4][3])),y[2][2]),_(M(_(x(y[3][2],y[4][4]),x(-y[3][4],y[4][2])),-y[2][3]),M(_(x(y[3][2],y[4][3]),x(-y[3][3],y[4][2])),y[2][4]))),y[1][0]),M(_(M(_(x(y[3][3],y[4][4]),x(-y[3][4],y[4][3])),y[2][0]),_(M(_(x(y[3][0],y[4][4]),x(-y[3][4],y[4][0])),-y[2][3]),M(_(x(y[3][0],y[4][3]),x(-y[3][3],y[4][0])),y[2][4]))),-y[1][2])),_(M(_(M(_(x(y[3][2],y[4][4]),x(-y[3][4],y[4][2])),y[2][0]),_(M(_(x(y[3][0],y[4][4]),x(-y[3][4],y[4][0])),-y[2][2]),M(_(x(y[3][0],y[4][2]),x(-y[3][2],y[4][0])),y[2][4]))),y[1][3]),M(_(M(_(x(y[3][2],y[4][3]),x(-y[3][3],y[4][2])),y[2][0]),_(M(_(x(y[3][0],y[4][3]),x(-y[3][3],y[4][0])),-y[2][2]),M(_(x(y[3][0],y[4][2]),x(-y[3][2],y[4][0])),y[2][3]))),-y[1][4]))),-y[0][1])),_(M(_(_(M(_(M(_(x(y[3][3],y[4][4]),x(-y[3][4],y[4][3])),y[2][1]),_(M(_(x(y[3][1],y[4][4]),x(-y[3][4],y[4][1])),-y[2][3]),M(_(x(y[3][1],y[4][3]),x(-y[3][3],y[4][1])),y[2][4]))),y[1][0]),M(_(M(_(x(y[3][3],y[4][4]),x(-y[3][4],y[4][3])),y[2][0]),_(M(_(x(y[3][0],y[4][4]),x(-y[3][4],y[4][0])),-y[2][3]),M(_(x(y[3][0],y[4][3]),x(-y[3][3],y[4][0])),y[2][4]))),-y[1][1])),_(M(_(M(_(x(y[3][1],y[4][4]),x(-y[3][4],y[4][1])),y[2][0]),_(M(_(x(y[3][0],y[4][4]),x(-y[3][4],y[4][0])),-y[2][1]),M(_(x(y[3][0],y[4][1]),x(-y[3][1],y[4][0])),y[2][4]))),y[1][3]),M(_(M(_(x(y[3][1],y[4][3]),x(-y[3][3],y[4][1])),y[2][0]),_(M(_(x(y[3][0],y[4][3]),x(-y[3][3],y[4][0])),-y[2][1]),M(_(x(y[3][0],y[4][1]),x(-y[3][1],y[4][0])),y[2][3]))),-y[1][4]))),y[0][2]),_(M(_(_(M(_(M(_(x(y[3][2],y[4][4]),x(-y[3][4],y[4][2])),y[2][1]),_(M(_(x(y[3][1],y[4][4]),x(-y[3][4],y[4][1])),-y[2][2]),M(_(x(y[3][1],y[4][2]),x(-y[3][2],y[4][1])),y[2][4]))),y[1][0]),M(_(M(_(x(y[3][2],y[4][4]),x(-y[3][4],y[4][2])),y[2][0]),_(M(_(x(y[3][0],y[4][4]),x(-y[3][4],y[4][0])),-y[2][2]),M(_(x(y[3][0],y[4][2]),x(-y[3][2],y[4][0])),y[2][4]))),-y[1][1])),_(M(_(M(_(x(y[3][1],y[4][4]),x(-y[3][4],y[4][1])),y[2][0]),_(M(_(x(y[3][0],y[4][4]),x(-y[3][4],y[4][0])),-y[2][1]),M(_(x(y[3][0],y[4][1]),x(-y[3][1],y[4][0])),y[2][4]))),y[1][2]),M(_(M(_(x(y[3][1],y[4][2]),x(-y[3][2],y[4][1])),y[2][0]),_(M(_(x(y[3][0],y[4][2]),x(-y[3][2],y[4][0])),-y[2][1]),M(_(x(y[3][0],y[4][1]),x(-y[3][1],y[4][0])),y[2][2]))),-y[1][4]))),-y[0][3]),M(_(_(M(_(M(_(x(y[3][2],y[4][3]),x(-y[3][3],y[4][2])),y[2][1]),_(M(_(x(y[3][1],y[4][3]),x(-y[3][3],y[4][1])),-y[2][2]),M(_(x(y[3][1],y[4][2]),x(-y[3][2],y[4][1])),y[2][3]))),y[1][0]),M(_(M(_(x(y[3][2],y[4][3]),x(-y[3][3],y[4][2])),y[2][0]),_(M(_(x(y[3][0],y[4][3]),x(-y[3][3],y[4][0])),-y[2][2]),M(_(x(y[3][0],y[4][2]),x(-y[3][2],y[4][0])),y[2][3]))),-y[1][1])),_(M(_(M(_(x(y[3][1],y[4][3]),x(-y[3][3],y[4][1])),y[2][0]),_(M(_(x(y[3][0],y[4][3]),x(-y[3][3],y[4][0])),-y[2][1]),M(_(x(y[3][0],y[4][1]),x(-y[3][1],y[4][0])),y[2][3]))),y[1][2]),M(_(M(_(x(y[3][1],y[4][2]),x(-y[3][2],y[4][1])),y[2][0]),_(M(_(x(y[3][0],y[4][2]),x(-y[3][2],y[4][0])),-y[2][1]),M(_(x(y[3][0],y[4][1]),x(-y[3][1],y[4][0])),y[2][2]))),-y[1][3]))),y[0][4])))))}}function m(_){var M=_===2?h:_===3?d:_===4?p:_===5?v:void 0;return M(l,u,s,c)}var g=[function(){return[0]},function(M){return[M[0][0]]}];function w(_,M,x,T,A,y,E,S){return function(k){switch(k.length){case 0:return _(k);case 1:return M(k);case 2:return x(k);case 3:return T(k);case 4:return A(k);case 5:return y(k)}var D=E[k.length];return D||(D=E[k.length]=S(k.length)),D(k)}}function b(){for(;g.length<f;)g.push(m(g.length));n.exports=w.apply(void 0,g.concat([g,m]));for(var _=0;_<g.length;++_)n.exports[_]=g[_]}b()},1944(n,a,o){"use strict";var s=o(5250),l=o(8210);n.exports=u;function u(c,f){for(var h=s(c[0],f[0]),d=1;d<c.length;++d)h=l(h,s(c[d],f[d]));return h}},2646(n,a,o){"use strict";var s=o(5250),l=o(8210),u=o(8545),c=o(3012),f=6;function h(A){var y=A===3?m:A===4?g:A===5?w:b;return y(l,u,s,c)}function d(){return 0}function p(){return 0}function v(){return 0}function m(A,y,E,S){function C(k,D,F){var P=E(k[0],k[0]),R=S(P,D[0]),L=S(P,F[0]),I=E(D[0],D[0]),B=S(I,k[0]),O=S(I,F[0]),$=E(F[0],F[0]),Y=S($,k[0]),K=S($,D[0]),j=A(y(K,O),y(B,R)),q=y(Y,L),J=y(j,q);return J[J.length-1]}return C}function g(A,y,E,S){function C(k,D,F,P){var R=A(E(k[0],k[0]),E(k[1],k[1])),L=S(R,D[0]),I=S(R,F[0]),B=S(R,P[0]),O=A(E(D[0],D[0]),E(D[1],D[1])),$=S(O,k[0]),Y=S(O,F[0]),K=S(O,P[0]),j=A(E(F[0],F[0]),E(F[1],F[1])),q=S(j,k[0]),J=S(j,D[0]),U=S(j,P[0]),V=A(E(P[0],P[0]),E(P[1],P[1])),X=S(V,k[0]),H=S(V,D[0]),G=S(V,F[0]),Q=A(A(S(y(G,U),D[1]),A(S(y(H,K),-F[1]),S(y(J,Y),P[1]))),A(S(y(H,K),k[1]),A(S(y(X,B),-D[1]),S(y($,L),P[1])))),te=A(A(S(y(G,U),k[1]),A(S(y(X,B),-F[1]),S(y(q,I),P[1]))),A(S(y(J,Y),k[1]),A(S(y(q,I),-D[1]),S(y($,L),F[1])))),ce=y(Q,te);return ce[ce.length-1]}return C}function w(A,y,E,S){function C(k,D,F,P,R){var L=A(E(k[0],k[0]),A(E(k[1],k[1]),E(k[2],k[2]))),I=S(L,D[0]),B=S(L,F[0]),O=S(L,P[0]),$=S(L,R[0]),Y=A(E(D[0],D[0]),A(E(D[1],D[1]),E(D[2],D[2]))),K=S(Y,k[0]),j=S(Y,F[0]),q=S(Y,P[0]),J=S(Y,R[0]),U=A(E(F[0],F[0]),A(E(F[1],F[1]),E(F[2],F[2]))),V=S(U,k[0]),X=S(U,D[0]),H=S(U,P[0]),G=S(U,R[0]),Q=A(E(P[0],P[0]),A(E(P[1],P[1]),E(P[2],P[2]))),te=S(Q,k[0]),ce=S(Q,D[0]),ge=S(Q,F[0]),Ce=S(Q,R[0]),be=A(E(R[0],R[0]),A(E(R[1],R[1]),E(R[2],R[2]))),he=S(be,k[0]),oe=S(be,D[0]),Ee=S(be,F[0]),ye=S(be,P[0]),ue=A(A(A(S(A(S(y(ye,Ce),F[1]),A(S(y(Ee,G),-P[1]),S(y(ge,H),R[1]))),D[2]),A(S(A(S(y(ye,Ce),D[1]),A(S(y(oe,J),-P[1]),S(y(ce,q),R[1]))),-F[2]),S(A(S(y(Ee,G),D[1]),A(S(y(oe,J),-F[1]),S(y(X,j),R[1]))),P[2]))),A(S(A(S(y(ge,H),D[1]),A(S(y(ce,q),-F[1]),S(y(X,j),P[1]))),-R[2]),A(S(A(S(y(ye,Ce),D[1]),A(S(y(oe,J),-P[1]),S(y(ce,q),R[1]))),k[2]),S(A(S(y(ye,Ce),k[1]),A(S(y(he,$),-P[1]),S(y(te,O),R[1]))),-D[2])))),A(A(S(A(S(y(oe,J),k[1]),A(S(y(he,$),-D[1]),S(y(K,I),R[1]))),P[2]),A(S(A(S(y(ce,q),k[1]),A(S(y(te,O),-D[1]),S(y(K,I),P[1]))),-R[2]),S(A(S(y(ge,H),D[1]),A(S(y(ce,q),-F[1]),S(y(X,j),P[1]))),k[2]))),A(S(A(S(y(ge,H),k[1]),A(S(y(te,O),-F[1]),S(y(V,B),P[1]))),-D[2]),A(S(A(S(y(ce,q),k[1]),A(S(y(te,O),-D[1]),S(y(K,I),P[1]))),F[2]),S(A(S(y(X,j),k[1]),A(S(y(V,B),-D[1]),S(y(K,I),F[1]))),-P[2]))))),ee=A(A(A(S(A(S(y(ye,Ce),F[1]),A(S(y(Ee,G),-P[1]),S(y(ge,H),R[1]))),k[2]),S(A(S(y(ye,Ce),k[1]),A(S(y(he,$),-P[1]),S(y(te,O),R[1]))),-F[2])),A(S(A(S(y(Ee,G),k[1]),A(S(y(he,$),-F[1]),S(y(V,B),R[1]))),P[2]),S(A(S(y(ge,H),k[1]),A(S(y(te,O),-F[1]),S(y(V,B),P[1]))),-R[2]))),A(A(S(A(S(y(Ee,G),D[1]),A(S(y(oe,J),-F[1]),S(y(X,j),R[1]))),k[2]),S(A(S(y(Ee,G),k[1]),A(S(y(he,$),-F[1]),S(y(V,B),R[1]))),-D[2])),A(S(A(S(y(oe,J),k[1]),A(S(y(he,$),-D[1]),S(y(K,I),R[1]))),F[2]),S(A(S(y(X,j),k[1]),A(S(y(V,B),-D[1]),S(y(K,I),F[1]))),-R[2])))),ae=y(ue,ee);return ae[ae.length-1]}return C}function b(A,y,E,S){function C(k,D,F,P,R,L){var I=A(A(E(k[0],k[0]),E(k[1],k[1])),A(E(k[2],k[2]),E(k[3],k[3]))),B=S(I,D[0]),O=S(I,F[0]),$=S(I,P[0]),Y=S(I,R[0]),K=S(I,L[0]),j=A(A(E(D[0],D[0]),E(D[1],D[1])),A(E(D[2],D[2]),E(D[3],D[3]))),q=S(j,k[0]),J=S(j,F[0]),U=S(j,P[0]),V=S(j,R[0]),X=S(j,L[0]),H=A(A(E(F[0],F[0]),E(F[1],F[1])),A(E(F[2],F[2]),E(F[3],F[3]))),G=S(H,k[0]),Q=S(H,D[0]),te=S(H,P[0]),ce=S(H,R[0]),ge=S(H,L[0]),Ce=A(A(E(P[0],P[0]),E(P[1],P[1])),A(E(P[2],P[2]),E(P[3],P[3]))),be=S(Ce,k[0]),he=S(Ce,D[0]),oe=S(Ce,F[0]),Ee=S(Ce,R[0]),ye=S(Ce,L[0]),ue=A(A(E(R[0],R[0]),E(R[1],R[1])),A(E(R[2],R[2]),E(R[3],R[3]))),ee=S(ue,k[0]),ae=S(ue,D[0]),xe=S(ue,F[0]),re=S(ue,P[0]),pe=S(ue,L[0]),we=A(A(E(L[0],L[0]),E(L[1],L[1])),A(E(L[2],L[2]),E(L[3],L[3]))),Fe=S(we,k[0]),Se=S(we,D[0]),ke=S(we,F[0]),_e=S(we,P[0]),Ie=S(we,R[0]),Oe=A(A(A(S(A(A(S(A(S(y(Ie,pe),P[1]),A(S(y(_e,ye),-R[1]),S(y(re,Ee),L[1]))),F[2]),S(A(S(y(Ie,pe),F[1]),A(S(y(ke,ge),-R[1]),S(y(xe,ce),L[1]))),-P[2])),A(S(A(S(y(_e,ye),F[1]),A(S(y(ke,ge),-P[1]),S(y(oe,te),L[1]))),R[2]),S(A(S(y(re,Ee),F[1]),A(S(y(xe,ce),-P[1]),S(y(oe,te),R[1]))),-L[2]))),D[3]),A(S(A(A(S(A(S(y(Ie,pe),P[1]),A(S(y(_e,ye),-R[1]),S(y(re,Ee),L[1]))),D[2]),S(A(S(y(Ie,pe),D[1]),A(S(y(Se,X),-R[1]),S(y(ae,V),L[1]))),-P[2])),A(S(A(S(y(_e,ye),D[1]),A(S(y(Se,X),-P[1]),S(y(he,U),L[1]))),R[2]),S(A(S(y(re,Ee),D[1]),A(S(y(ae,V),-P[1]),S(y(he,U),R[1]))),-L[2]))),-F[3]),S(A(A(S(A(S(y(Ie,pe),F[1]),A(S(y(ke,ge),-R[1]),S(y(xe,ce),L[1]))),D[2]),S(A(S(y(Ie,pe),D[1]),A(S(y(Se,X),-R[1]),S(y(ae,V),L[1]))),-F[2])),A(S(A(S(y(ke,ge),D[1]),A(S(y(Se,X),-F[1]),S(y(Q,J),L[1]))),R[2]),S(A(S(y(xe,ce),D[1]),A(S(y(ae,V),-F[1]),S(y(Q,J),R[1]))),-L[2]))),P[3]))),A(A(S(A(A(S(A(S(y(_e,ye),F[1]),A(S(y(ke,ge),-P[1]),S(y(oe,te),L[1]))),D[2]),S(A(S(y(_e,ye),D[1]),A(S(y(Se,X),-P[1]),S(y(he,U),L[1]))),-F[2])),A(S(A(S(y(ke,ge),D[1]),A(S(y(Se,X),-F[1]),S(y(Q,J),L[1]))),P[2]),S(A(S(y(oe,te),D[1]),A(S(y(he,U),-F[1]),S(y(Q,J),P[1]))),-L[2]))),-R[3]),S(A(A(S(A(S(y(re,Ee),F[1]),A(S(y(xe,ce),-P[1]),S(y(oe,te),R[1]))),D[2]),S(A(S(y(re,Ee),D[1]),A(S(y(ae,V),-P[1]),S(y(he,U),R[1]))),-F[2])),A(S(A(S(y(xe,ce),D[1]),A(S(y(ae,V),-F[1]),S(y(Q,J),R[1]))),P[2]),S(A(S(y(oe,te),D[1]),A(S(y(he,U),-F[1]),S(y(Q,J),P[1]))),-R[2]))),L[3])),A(S(A(A(S(A(S(y(Ie,pe),P[1]),A(S(y(_e,ye),-R[1]),S(y(re,Ee),L[1]))),D[2]),S(A(S(y(Ie,pe),D[1]),A(S(y(Se,X),-R[1]),S(y(ae,V),L[1]))),-P[2])),A(S(A(S(y(_e,ye),D[1]),A(S(y(Se,X),-P[1]),S(y(he,U),L[1]))),R[2]),S(A(S(y(re,Ee),D[1]),A(S(y(ae,V),-P[1]),S(y(he,U),R[1]))),-L[2]))),k[3]),S(A(A(S(A(S(y(Ie,pe),P[1]),A(S(y(_e,ye),-R[1]),S(y(re,Ee),L[1]))),k[2]),S(A(S(y(Ie,pe),k[1]),A(S(y(Fe,K),-R[1]),S(y(ee,Y),L[1]))),-P[2])),A(S(A(S(y(_e,ye),k[1]),A(S(y(Fe,K),-P[1]),S(y(be,$),L[1]))),R[2]),S(A(S(y(re,Ee),k[1]),A(S(y(ee,Y),-P[1]),S(y(be,$),R[1]))),-L[2]))),-D[3])))),A(A(A(S(A(A(S(A(S(y(Ie,pe),D[1]),A(S(y(Se,X),-R[1]),S(y(ae,V),L[1]))),k[2]),S(A(S(y(Ie,pe),k[1]),A(S(y(Fe,K),-R[1]),S(y(ee,Y),L[1]))),-D[2])),A(S(A(S(y(Se,X),k[1]),A(S(y(Fe,K),-D[1]),S(y(q,B),L[1]))),R[2]),S(A(S(y(ae,V),k[1]),A(S(y(ee,Y),-D[1]),S(y(q,B),R[1]))),-L[2]))),P[3]),S(A(A(S(A(S(y(_e,ye),D[1]),A(S(y(Se,X),-P[1]),S(y(he,U),L[1]))),k[2]),S(A(S(y(_e,ye),k[1]),A(S(y(Fe,K),-P[1]),S(y(be,$),L[1]))),-D[2])),A(S(A(S(y(Se,X),k[1]),A(S(y(Fe,K),-D[1]),S(y(q,B),L[1]))),P[2]),S(A(S(y(he,U),k[1]),A(S(y(be,$),-D[1]),S(y(q,B),P[1]))),-L[2]))),-R[3])),A(S(A(A(S(A(S(y(re,Ee),D[1]),A(S(y(ae,V),-P[1]),S(y(he,U),R[1]))),k[2]),S(A(S(y(re,Ee),k[1]),A(S(y(ee,Y),-P[1]),S(y(be,$),R[1]))),-D[2])),A(S(A(S(y(ae,V),k[1]),A(S(y(ee,Y),-D[1]),S(y(q,B),R[1]))),P[2]),S(A(S(y(he,U),k[1]),A(S(y(be,$),-D[1]),S(y(q,B),P[1]))),-R[2]))),L[3]),S(A(A(S(A(S(y(_e,ye),F[1]),A(S(y(ke,ge),-P[1]),S(y(oe,te),L[1]))),D[2]),S(A(S(y(_e,ye),D[1]),A(S(y(Se,X),-P[1]),S(y(he,U),L[1]))),-F[2])),A(S(A(S(y(ke,ge),D[1]),A(S(y(Se,X),-F[1]),S(y(Q,J),L[1]))),P[2]),S(A(S(y(oe,te),D[1]),A(S(y(he,U),-F[1]),S(y(Q,J),P[1]))),-L[2]))),k[3]))),A(A(S(A(A(S(A(S(y(_e,ye),F[1]),A(S(y(ke,ge),-P[1]),S(y(oe,te),L[1]))),k[2]),S(A(S(y(_e,ye),k[1]),A(S(y(Fe,K),-P[1]),S(y(be,$),L[1]))),-F[2])),A(S(A(S(y(ke,ge),k[1]),A(S(y(Fe,K),-F[1]),S(y(G,O),L[1]))),P[2]),S(A(S(y(oe,te),k[1]),A(S(y(be,$),-F[1]),S(y(G,O),P[1]))),-L[2]))),-D[3]),S(A(A(S(A(S(y(_e,ye),D[1]),A(S(y(Se,X),-P[1]),S(y(he,U),L[1]))),k[2]),S(A(S(y(_e,ye),k[1]),A(S(y(Fe,K),-P[1]),S(y(be,$),L[1]))),-D[2])),A(S(A(S(y(Se,X),k[1]),A(S(y(Fe,K),-D[1]),S(y(q,B),L[1]))),P[2]),S(A(S(y(he,U),k[1]),A(S(y(be,$),-D[1]),S(y(q,B),P[1]))),-L[2]))),F[3])),A(S(A(A(S(A(S(y(ke,ge),D[1]),A(S(y(Se,X),-F[1]),S(y(Q,J),L[1]))),k[2]),S(A(S(y(ke,ge),k[1]),A(S(y(Fe,K),-F[1]),S(y(G,O),L[1]))),-D[2])),A(S(A(S(y(Se,X),k[1]),A(S(y(Fe,K),-D[1]),S(y(q,B),L[1]))),F[2]),S(A(S(y(Q,J),k[1]),A(S(y(G,O),-D[1]),S(y(q,B),F[1]))),-L[2]))),-P[3]),S(A(A(S(A(S(y(oe,te),D[1]),A(S(y(he,U),-F[1]),S(y(Q,J),P[1]))),k[2]),S(A(S(y(oe,te),k[1]),A(S(y(be,$),-F[1]),S(y(G,O),P[1]))),-D[2])),A(S(A(S(y(he,U),k[1]),A(S(y(be,$),-D[1]),S(y(q,B),P[1]))),F[2]),S(A(S(y(Q,J),k[1]),A(S(y(G,O),-D[1]),S(y(q,B),F[1]))),-P[2]))),L[3]))))),Qe=A(A(A(S(A(A(S(A(S(y(Ie,pe),P[1]),A(S(y(_e,ye),-R[1]),S(y(re,Ee),L[1]))),F[2]),S(A(S(y(Ie,pe),F[1]),A(S(y(ke,ge),-R[1]),S(y(xe,ce),L[1]))),-P[2])),A(S(A(S(y(_e,ye),F[1]),A(S(y(ke,ge),-P[1]),S(y(oe,te),L[1]))),R[2]),S(A(S(y(re,Ee),F[1]),A(S(y(xe,ce),-P[1]),S(y(oe,te),R[1]))),-L[2]))),k[3]),A(S(A(A(S(A(S(y(Ie,pe),P[1]),A(S(y(_e,ye),-R[1]),S(y(re,Ee),L[1]))),k[2]),S(A(S(y(Ie,pe),k[1]),A(S(y(Fe,K),-R[1]),S(y(ee,Y),L[1]))),-P[2])),A(S(A(S(y(_e,ye),k[1]),A(S(y(Fe,K),-P[1]),S(y(be,$),L[1]))),R[2]),S(A(S(y(re,Ee),k[1]),A(S(y(ee,Y),-P[1]),S(y(be,$),R[1]))),-L[2]))),-F[3]),S(A(A(S(A(S(y(Ie,pe),F[1]),A(S(y(ke,ge),-R[1]),S(y(xe,ce),L[1]))),k[2]),S(A(S(y(Ie,pe),k[1]),A(S(y(Fe,K),-R[1]),S(y(ee,Y),L[1]))),-F[2])),A(S(A(S(y(ke,ge),k[1]),A(S(y(Fe,K),-F[1]),S(y(G,O),L[1]))),R[2]),S(A(S(y(xe,ce),k[1]),A(S(y(ee,Y),-F[1]),S(y(G,O),R[1]))),-L[2]))),P[3]))),A(A(S(A(A(S(A(S(y(_e,ye),F[1]),A(S(y(ke,ge),-P[1]),S(y(oe,te),L[1]))),k[2]),S(A(S(y(_e,ye),k[1]),A(S(y(Fe,K),-P[1]),S(y(be,$),L[1]))),-F[2])),A(S(A(S(y(ke,ge),k[1]),A(S(y(Fe,K),-F[1]),S(y(G,O),L[1]))),P[2]),S(A(S(y(oe,te),k[1]),A(S(y(be,$),-F[1]),S(y(G,O),P[1]))),-L[2]))),-R[3]),S(A(A(S(A(S(y(re,Ee),F[1]),A(S(y(xe,ce),-P[1]),S(y(oe,te),R[1]))),k[2]),S(A(S(y(re,Ee),k[1]),A(S(y(ee,Y),-P[1]),S(y(be,$),R[1]))),-F[2])),A(S(A(S(y(xe,ce),k[1]),A(S(y(ee,Y),-F[1]),S(y(G,O),R[1]))),P[2]),S(A(S(y(oe,te),k[1]),A(S(y(be,$),-F[1]),S(y(G,O),P[1]))),-R[2]))),L[3])),A(S(A(A(S(A(S(y(Ie,pe),F[1]),A(S(y(ke,ge),-R[1]),S(y(xe,ce),L[1]))),D[2]),S(A(S(y(Ie,pe),D[1]),A(S(y(Se,X),-R[1]),S(y(ae,V),L[1]))),-F[2])),A(S(A(S(y(ke,ge),D[1]),A(S(y(Se,X),-F[1]),S(y(Q,J),L[1]))),R[2]),S(A(S(y(xe,ce),D[1]),A(S(y(ae,V),-F[1]),S(y(Q,J),R[1]))),-L[2]))),k[3]),S(A(A(S(A(S(y(Ie,pe),F[1]),A(S(y(ke,ge),-R[1]),S(y(xe,ce),L[1]))),k[2]),S(A(S(y(Ie,pe),k[1]),A(S(y(Fe,K),-R[1]),S(y(ee,Y),L[1]))),-F[2])),A(S(A(S(y(ke,ge),k[1]),A(S(y(Fe,K),-F[1]),S(y(G,O),L[1]))),R[2]),S(A(S(y(xe,ce),k[1]),A(S(y(ee,Y),-F[1]),S(y(G,O),R[1]))),-L[2]))),-D[3])))),A(A(A(S(A(A(S(A(S(y(Ie,pe),D[1]),A(S(y(Se,X),-R[1]),S(y(ae,V),L[1]))),k[2]),S(A(S(y(Ie,pe),k[1]),A(S(y(Fe,K),-R[1]),S(y(ee,Y),L[1]))),-D[2])),A(S(A(S(y(Se,X),k[1]),A(S(y(Fe,K),-D[1]),S(y(q,B),L[1]))),R[2]),S(A(S(y(ae,V),k[1]),A(S(y(ee,Y),-D[1]),S(y(q,B),R[1]))),-L[2]))),F[3]),S(A(A(S(A(S(y(ke,ge),D[1]),A(S(y(Se,X),-F[1]),S(y(Q,J),L[1]))),k[2]),S(A(S(y(ke,ge),k[1]),A(S(y(Fe,K),-F[1]),S(y(G,O),L[1]))),-D[2])),A(S(A(S(y(Se,X),k[1]),A(S(y(Fe,K),-D[1]),S(y(q,B),L[1]))),F[2]),S(A(S(y(Q,J),k[1]),A(S(y(G,O),-D[1]),S(y(q,B),F[1]))),-L[2]))),-R[3])),A(S(A(A(S(A(S(y(xe,ce),D[1]),A(S(y(ae,V),-F[1]),S(y(Q,J),R[1]))),k[2]),S(A(S(y(xe,ce),k[1]),A(S(y(ee,Y),-F[1]),S(y(G,O),R[1]))),-D[2])),A(S(A(S(y(ae,V),k[1]),A(S(y(ee,Y),-D[1]),S(y(q,B),R[1]))),F[2]),S(A(S(y(Q,J),k[1]),A(S(y(G,O),-D[1]),S(y(q,B),F[1]))),-R[2]))),L[3]),S(A(A(S(A(S(y(re,Ee),F[1]),A(S(y(xe,ce),-P[1]),S(y(oe,te),R[1]))),D[2]),S(A(S(y(re,Ee),D[1]),A(S(y(ae,V),-P[1]),S(y(he,U),R[1]))),-F[2])),A(S(A(S(y(xe,ce),D[1]),A(S(y(ae,V),-F[1]),S(y(Q,J),R[1]))),P[2]),S(A(S(y(oe,te),D[1]),A(S(y(he,U),-F[1]),S(y(Q,J),P[1]))),-R[2]))),k[3]))),A(A(S(A(A(S(A(S(y(re,Ee),F[1]),A(S(y(xe,ce),-P[1]),S(y(oe,te),R[1]))),k[2]),S(A(S(y(re,Ee),k[1]),A(S(y(ee,Y),-P[1]),S(y(be,$),R[1]))),-F[2])),A(S(A(S(y(xe,ce),k[1]),A(S(y(ee,Y),-F[1]),S(y(G,O),R[1]))),P[2]),S(A(S(y(oe,te),k[1]),A(S(y(be,$),-F[1]),S(y(G,O),P[1]))),-R[2]))),-D[3]),S(A(A(S(A(S(y(re,Ee),D[1]),A(S(y(ae,V),-P[1]),S(y(he,U),R[1]))),k[2]),S(A(S(y(re,Ee),k[1]),A(S(y(ee,Y),-P[1]),S(y(be,$),R[1]))),-D[2])),A(S(A(S(y(ae,V),k[1]),A(S(y(ee,Y),-D[1]),S(y(q,B),R[1]))),P[2]),S(A(S(y(he,U),k[1]),A(S(y(be,$),-D[1]),S(y(q,B),P[1]))),-R[2]))),F[3])),A(S(A(A(S(A(S(y(xe,ce),D[1]),A(S(y(ae,V),-F[1]),S(y(Q,J),R[1]))),k[2]),S(A(S(y(xe,ce),k[1]),A(S(y(ee,Y),-F[1]),S(y(G,O),R[1]))),-D[2])),A(S(A(S(y(ae,V),k[1]),A(S(y(ee,Y),-D[1]),S(y(q,B),R[1]))),F[2]),S(A(S(y(Q,J),k[1]),A(S(y(G,O),-D[1]),S(y(q,B),F[1]))),-R[2]))),-P[3]),S(A(A(S(A(S(y(oe,te),D[1]),A(S(y(he,U),-F[1]),S(y(Q,J),P[1]))),k[2]),S(A(S(y(oe,te),k[1]),A(S(y(be,$),-F[1]),S(y(G,O),P[1]))),-D[2])),A(S(A(S(y(he,U),k[1]),A(S(y(be,$),-D[1]),S(y(q,B),P[1]))),F[2]),S(A(S(y(Q,J),k[1]),A(S(y(G,O),-D[1]),S(y(q,B),F[1]))),-P[2]))),R[3]))))),et=y(Oe,Qe);return et[et.length-1]}return C}var _=[d,p,v];function M(A){var y=_[A.length];return y||(y=_[A.length]=h(A.length)),y.apply(void 0,A)}function x(A,y,E,S,C,k,D,F){function P(R,L,I,B,O,$){switch(arguments.length){case 0:case 1:return 0;case 2:return S(R,L);case 3:return C(R,L,I);case 4:return k(R,L,I,B);case 5:return D(R,L,I,B,O);case 6:return F(R,L,I,B,O,$)}for(var Y=new Array(arguments.length),K=0;K<arguments.length;++K)Y[K]=arguments[K];return A(Y)}return P}function T(){for(;_.length<=f;)_.push(h(_.length));n.exports=x.apply(void 0,[M].concat(_));for(var A=0;A<=f;++A)n.exports[A]=_[A]}T()},727(n,a,o){"use strict";var s=o(2962),l=6;function u(_){var M=_===2?h:_===3?d:_===4?p:_===5?v:m;return _<6?M(s[_]):M(s)}function c(){return[[0]]}function f(_,M){return[[M[0]],[_[0][0]]]}function h(_){return function(x,T){return[_([[+T[0],+x[0][1]],[+T[1],+x[1][1]]]),_([[+x[0][0],+T[0]],[+x[1][0],+T[1]]]),_(x)]}}function d(_){return function(x,T){return[_([[+T[0],+x[0][1],+x[0][2]],[+T[1],+x[1][1],+x[1][2]],[+T[2],+x[2][1],+x[2][2]]]),_([[+x[0][0],+T[0],+x[0][2]],[+x[1][0],+T[1],+x[1][2]],[+x[2][0],+T[2],+x[2][2]]]),_([[+x[0][0],+x[0][1],+T[0]],[+x[1][0],+x[1][1],+T[1]],[+x[2][0],+x[2][1],+T[2]]]),_(x)]}}function p(_){return function(x,T){return[_([[+T[0],+x[0][1],+x[0][2],+x[0][3]],[+T[1],+x[1][1],+x[1][2],+x[1][3]],[+T[2],+x[2][1],+x[2][2],+x[2][3]],[+T[3],+x[3][1],+x[3][2],+x[3][3]]]),_([[+x[0][0],+T[0],+x[0][2],+x[0][3]],[+x[1][0],+T[1],+x[1][2],+x[1][3]],[+x[2][0],+T[2],+x[2][2],+x[2][3]],[+x[3][0],+T[3],+x[3][2],+x[3][3]]]),_([[+x[0][0],+x[0][1],+T[0],+x[0][3]],[+x[1][0],+x[1][1],+T[1],+x[1][3]],[+x[2][0],+x[2][1],+T[2],+x[2][3]],[+x[3][0],+x[3][1],+T[3],+x[3][3]]]),_([[+x[0][0],+x[0][1],+x[0][2],+T[0]],[+x[1][0],+x[1][1],+x[1][2],+T[1]],[+x[2][0],+x[2][1],+x[2][2],+T[2]],[+x[3][0],+x[3][1],+x[3][2],+T[3]]]),_(x)]}}function v(_){return function(x,T){return[_([[+T[0],+x[0][1],+x[0][2],+x[0][3],+x[0][4]],[+T[1],+x[1][1],+x[1][2],+x[1][3],+x[1][4]],[+T[2],+x[2][1],+x[2][2],+x[2][3],+x[2][4]],[+T[3],+x[3][1],+x[3][2],+x[3][3],+x[3][4]],[+T[4],+x[4][1],+x[4][2],+x[4][3],+x[4][4]]]),_([[+x[0][0],+T[0],+x[0][2],+x[0][3],+x[0][4]],[+x[1][0],+T[1],+x[1][2],+x[1][3],+x[1][4]],[+x[2][0],+T[2],+x[2][2],+x[2][3],+x[2][4]],[+x[3][0],+T[3],+x[3][2],+x[3][3],+x[3][4]],[+x[4][0],+T[4],+x[4][2],+x[4][3],+x[4][4]]]),_([[+x[0][0],+x[0][1],+T[0],+x[0][3],+x[0][4]],[+x[1][0],+x[1][1],+T[1],+x[1][3],+x[1][4]],[+x[2][0],+x[2][1],+T[2],+x[2][3],+x[2][4]],[+x[3][0],+x[3][1],+T[3],+x[3][3],+x[3][4]],[+x[4][0],+x[4][1],+T[4],+x[4][3],+x[4][4]]]),_([[+x[0][0],+x[0][1],+x[0][2],+T[0],+x[0][4]],[+x[1][0],+x[1][1],+x[1][2],+T[1],+x[1][4]],[+x[2][0],+x[2][1],+x[2][2],+T[2],+x[2][4]],[+x[3][0],+x[3][1],+x[3][2],+T[3],+x[3][4]],[+x[4][0],+x[4][1],+x[4][2],+T[4],+x[4][4]]]),_([[+x[0][0],+x[0][1],+x[0][2],+x[0][3],+T[0]],[+x[1][0],+x[1][1],+x[1][2],+x[1][3],+T[1]],[+x[2][0],+x[2][1],+x[2][2],+x[2][3],+T[2]],[+x[3][0],+x[3][1],+x[3][2],+x[3][3],+T[3]],[+x[4][0],+x[4][1],+x[4][2],+x[4][3],+T[4]]]),_(x)]}}function m(_){return function(x,T){return[_([[+T[0],+x[0][1],+x[0][2],+x[0][3],+x[0][4],+x[0][5]],[+T[1],+x[1][1],+x[1][2],+x[1][3],+x[1][4],+x[1][5]],[+T[2],+x[2][1],+x[2][2],+x[2][3],+x[2][4],+x[2][5]],[+T[3],+x[3][1],+x[3][2],+x[3][3],+x[3][4],+x[3][5]],[+T[4],+x[4][1],+x[4][2],+x[4][3],+x[4][4],+x[4][5]],[+T[5],+x[5][1],+x[5][2],+x[5][3],+x[5][4],+x[5][5]]]),_([[+x[0][0],+T[0],+x[0][2],+x[0][3],+x[0][4],+x[0][5]],[+x[1][0],+T[1],+x[1][2],+x[1][3],+x[1][4],+x[1][5]],[+x[2][0],+T[2],+x[2][2],+x[2][3],+x[2][4],+x[2][5]],[+x[3][0],+T[3],+x[3][2],+x[3][3],+x[3][4],+x[3][5]],[+x[4][0],+T[4],+x[4][2],+x[4][3],+x[4][4],+x[4][5]],[+x[5][0],+T[5],+x[5][2],+x[5][3],+x[5][4],+x[5][5]]]),_([[+x[0][0],+x[0][1],+T[0],+x[0][3],+x[0][4],+x[0][5]],[+x[1][0],+x[1][1],+T[1],+x[1][3],+x[1][4],+x[1][5]],[+x[2][0],+x[2][1],+T[2],+x[2][3],+x[2][4],+x[2][5]],[+x[3][0],+x[3][1],+T[3],+x[3][3],+x[3][4],+x[3][5]],[+x[4][0],+x[4][1],+T[4],+x[4][3],+x[4][4],+x[4][5]],[+x[5][0],+x[5][1],+T[5],+x[5][3],+x[5][4],+x[5][5]]]),_([[+x[0][0],+x[0][1],+x[0][2],+T[0],+x[0][4],+x[0][5]],[+x[1][0],+x[1][1],+x[1][2],+T[1],+x[1][4],+x[1][5]],[+x[2][0],+x[2][1],+x[2][2],+T[2],+x[2][4],+x[2][5]],[+x[3][0],+x[3][1],+x[3][2],+T[3],+x[3][4],+x[3][5]],[+x[4][0],+x[4][1],+x[4][2],+T[4],+x[4][4],+x[4][5]],[+x[5][0],+x[5][1],+x[5][2],+T[5],+x[5][4],+x[5][5]]]),_([[+x[0][0],+x[0][1],+x[0][2],+x[0][3],+T[0],+x[0][5]],[+x[1][0],+x[1][1],+x[1][2],+x[1][3],+T[1],+x[1][5]],[+x[2][0],+x[2][1],+x[2][2],+x[2][3],+T[2],+x[2][5]],[+x[3][0],+x[3][1],+x[3][2],+x[3][3],+T[3],+x[3][5]],[+x[4][0],+x[4][1],+x[4][2],+x[4][3],+T[4],+x[4][5]],[+x[5][0],+x[5][1],+x[5][2],+x[5][3],+T[5],+x[5][5]]]),_([[+x[0][0],+x[0][1],+x[0][2],+x[0][3],+x[0][4],+T[0]],[+x[1][0],+x[1][1],+x[1][2],+x[1][3],+x[1][4],+T[1]],[+x[2][0],+x[2][1],+x[2][2],+x[2][3],+x[2][4],+T[2]],[+x[3][0],+x[3][1],+x[3][2],+x[3][3],+x[3][4],+T[3]],[+x[4][0],+x[4][1],+x[4][2],+x[4][3],+x[4][4],+T[4]],[+x[5][0],+x[5][1],+x[5][2],+x[5][3],+x[5][4],+T[5]]]),_(x)]}}var g=[c,f];function w(_,M,x,T,A,y,E,S){return function(k,D){switch(k.length){case 0:return _(k,D);case 1:return M(k,D);case 2:return x(k,D);case 3:return T(k,D);case 4:return A(k,D);case 5:return y(k,D)}var F=E[k.length];return F||(F=E[k.length]=S(k.length)),F(k,D)}}function b(){for(;g.length<l;)g.push(u(g.length));n.exports=w.apply(void 0,g.concat([g,u]));for(var _=0;_<l;++_)n.exports[_]=g[_]}b()},3250(n,a,o){"use strict";var s=o(5250),l=o(8210),u=o(3012),c=o(8545),f=5,h=11102230246251565e-32,d=(3+16*h)*h,p=(7+56*h)*h;function v(y,E,S,C){return function(D,F,P){var R=y(y(E(F[1],P[0]),E(-P[1],F[0])),y(E(D[1],F[0]),E(-F[1],D[0]))),L=y(E(D[1],P[0]),E(-P[1],D[0])),I=C(R,L);return I[I.length-1]}}function m(y,E,S,C){return function(D,F,P,R){var L=y(y(S(y(E(P[1],R[0]),E(-R[1],P[0])),F[2]),y(S(y(E(F[1],R[0]),E(-R[1],F[0])),-P[2]),S(y(E(F[1],P[0]),E(-P[1],F[0])),R[2]))),y(S(y(E(F[1],R[0]),E(-R[1],F[0])),D[2]),y(S(y(E(D[1],R[0]),E(-R[1],D[0])),-F[2]),S(y(E(D[1],F[0]),E(-F[1],D[0])),R[2])))),I=y(y(S(y(E(P[1],R[0]),E(-R[1],P[0])),D[2]),y(S(y(E(D[1],R[0]),E(-R[1],D[0])),-P[2]),S(y(E(D[1],P[0]),E(-P[1],D[0])),R[2]))),y(S(y(E(F[1],P[0]),E(-P[1],F[0])),D[2]),y(S(y(E(D[1],P[0]),E(-P[1],D[0])),-F[2]),S(y(E(D[1],F[0]),E(-F[1],D[0])),P[2])))),B=C(L,I);return B[B.length-1]}}function g(y,E,S,C){return function(D,F,P,R,L){var I=y(y(y(S(y(S(y(E(R[1],L[0]),E(-L[1],R[0])),P[2]),y(S(y(E(P[1],L[0]),E(-L[1],P[0])),-R[2]),S(y(E(P[1],R[0]),E(-R[1],P[0])),L[2]))),F[3]),y(S(y(S(y(E(R[1],L[0]),E(-L[1],R[0])),F[2]),y(S(y(E(F[1],L[0]),E(-L[1],F[0])),-R[2]),S(y(E(F[1],R[0]),E(-R[1],F[0])),L[2]))),-P[3]),S(y(S(y(E(P[1],L[0]),E(-L[1],P[0])),F[2]),y(S(y(E(F[1],L[0]),E(-L[1],F[0])),-P[2]),S(y(E(F[1],P[0]),E(-P[1],F[0])),L[2]))),R[3]))),y(S(y(S(y(E(P[1],R[0]),E(-R[1],P[0])),F[2]),y(S(y(E(F[1],R[0]),E(-R[1],F[0])),-P[2]),S(y(E(F[1],P[0]),E(-P[1],F[0])),R[2]))),-L[3]),y(S(y(S(y(E(R[1],L[0]),E(-L[1],R[0])),F[2]),y(S(y(E(F[1],L[0]),E(-L[1],F[0])),-R[2]),S(y(E(F[1],R[0]),E(-R[1],F[0])),L[2]))),D[3]),S(y(S(y(E(R[1],L[0]),E(-L[1],R[0])),D[2]),y(S(y(E(D[1],L[0]),E(-L[1],D[0])),-R[2]),S(y(E(D[1],R[0]),E(-R[1],D[0])),L[2]))),-F[3])))),y(y(S(y(S(y(E(F[1],L[0]),E(-L[1],F[0])),D[2]),y(S(y(E(D[1],L[0]),E(-L[1],D[0])),-F[2]),S(y(E(D[1],F[0]),E(-F[1],D[0])),L[2]))),R[3]),y(S(y(S(y(E(F[1],R[0]),E(-R[1],F[0])),D[2]),y(S(y(E(D[1],R[0]),E(-R[1],D[0])),-F[2]),S(y(E(D[1],F[0]),E(-F[1],D[0])),R[2]))),-L[3]),S(y(S(y(E(P[1],R[0]),E(-R[1],P[0])),F[2]),y(S(y(E(F[1],R[0]),E(-R[1],F[0])),-P[2]),S(y(E(F[1],P[0]),E(-P[1],F[0])),R[2]))),D[3]))),y(S(y(S(y(E(P[1],R[0]),E(-R[1],P[0])),D[2]),y(S(y(E(D[1],R[0]),E(-R[1],D[0])),-P[2]),S(y(E(D[1],P[0]),E(-P[1],D[0])),R[2]))),-F[3]),y(S(y(S(y(E(F[1],R[0]),E(-R[1],F[0])),D[2]),y(S(y(E(D[1],R[0]),E(-R[1],D[0])),-F[2]),S(y(E(D[1],F[0]),E(-F[1],D[0])),R[2]))),P[3]),S(y(S(y(E(F[1],P[0]),E(-P[1],F[0])),D[2]),y(S(y(E(D[1],P[0]),E(-P[1],D[0])),-F[2]),S(y(E(D[1],F[0]),E(-F[1],D[0])),P[2]))),-R[3]))))),B=y(y(y(S(y(S(y(E(R[1],L[0]),E(-L[1],R[0])),P[2]),y(S(y(E(P[1],L[0]),E(-L[1],P[0])),-R[2]),S(y(E(P[1],R[0]),E(-R[1],P[0])),L[2]))),D[3]),S(y(S(y(E(R[1],L[0]),E(-L[1],R[0])),D[2]),y(S(y(E(D[1],L[0]),E(-L[1],D[0])),-R[2]),S(y(E(D[1],R[0]),E(-R[1],D[0])),L[2]))),-P[3])),y(S(y(S(y(E(P[1],L[0]),E(-L[1],P[0])),D[2]),y(S(y(E(D[1],L[0]),E(-L[1],D[0])),-P[2]),S(y(E(D[1],P[0]),E(-P[1],D[0])),L[2]))),R[3]),S(y(S(y(E(P[1],R[0]),E(-R[1],P[0])),D[2]),y(S(y(E(D[1],R[0]),E(-R[1],D[0])),-P[2]),S(y(E(D[1],P[0]),E(-P[1],D[0])),R[2]))),-L[3]))),y(y(S(y(S(y(E(P[1],L[0]),E(-L[1],P[0])),F[2]),y(S(y(E(F[1],L[0]),E(-L[1],F[0])),-P[2]),S(y(E(F[1],P[0]),E(-P[1],F[0])),L[2]))),D[3]),S(y(S(y(E(P[1],L[0]),E(-L[1],P[0])),D[2]),y(S(y(E(D[1],L[0]),E(-L[1],D[0])),-P[2]),S(y(E(D[1],P[0]),E(-P[1],D[0])),L[2]))),-F[3])),y(S(y(S(y(E(F[1],L[0]),E(-L[1],F[0])),D[2]),y(S(y(E(D[1],L[0]),E(-L[1],D[0])),-F[2]),S(y(E(D[1],F[0]),E(-F[1],D[0])),L[2]))),P[3]),S(y(S(y(E(F[1],P[0]),E(-P[1],F[0])),D[2]),y(S(y(E(D[1],P[0]),E(-P[1],D[0])),-F[2]),S(y(E(D[1],F[0]),E(-F[1],D[0])),P[2]))),-L[3])))),O=C(I,B);return O[O.length-1]}}function w(y){var E=y===3?v:y===4?m:g;return E(l,s,u,c)}var b=w(3),_=w(4),M=[function(){return 0},function(){return 0},function(E,S){return S[0]-E[0]},function(E,S,C){var k=(E[1]-C[1])*(S[0]-C[0]),D=(E[0]-C[0])*(S[1]-C[1]),F=k-D,P;if(k>0){if(D<=0)return F;P=k+D}else if(k<0){if(D>=0)return F;P=-(k+D)}else return F;var R=d*P;return F>=R||F<=-R?F:b(E,S,C)},function(E,S,C,k){var D=E[0]-k[0],F=S[0]-k[0],P=C[0]-k[0],R=E[1]-k[1],L=S[1]-k[1],I=C[1]-k[1],B=E[2]-k[2],O=S[2]-k[2],$=C[2]-k[2],Y=F*I,K=P*L,j=P*R,q=D*I,J=D*L,U=F*R,V=B*(Y-K)+O*(j-q)+$*(J-U),X=(Math.abs(Y)+Math.abs(K))*Math.abs(B)+(Math.abs(j)+Math.abs(q))*Math.abs(O)+(Math.abs(J)+Math.abs(U))*Math.abs($),H=p*X;return V>H||-V>H?V:_(E,S,C,k)}];function x(y){var E=M[y.length];return E||(E=M[y.length]=w(y.length)),E.apply(void 0,y)}function T(y,E,S,C,k,D,F){return function(R,L,I,B,O){switch(arguments.length){case 0:case 1:return 0;case 2:return C(R,L);case 3:return k(R,L,I);case 4:return D(R,L,I,B);case 5:return F(R,L,I,B,O)}for(var $=new Array(arguments.length),Y=0;Y<arguments.length;++Y)$[Y]=arguments[Y];return y($)}}function A(){for(;M.length<=f;)M.push(w(M.length));n.exports=T.apply(void 0,[x].concat(M));for(var y=0;y<=f;++y)n.exports[y]=M[y]}A()},5382(n,a,o){"use strict";var s=o(8210),l=o(3012);n.exports=u;function u(c,f){if(c.length===1)return l(f,c[0]);if(f.length===1)return l(c,f[0]);if(c.length===0||f.length===0)return[0];var h=[0];if(c.length<f.length)for(var d=0;d<c.length;++d)h=s(h,l(f,c[d]));else for(var d=0;d<f.length;++d)h=s(h,l(c,f[d]));return h}},3012(n,a,o){"use strict";var s=o(5250),l=o(9362);n.exports=u;function u(c,f){var h=c.length;if(h===1){var d=s(c[0],f);return d[0]?d:[d[1]]}var p=new Array(2*h),v=[.1,.1],m=[.1,.1],g=0;s(c[0],f,v),v[0]&&(p[g++]=v[0]);for(var w=1;w<h;++w){s(c[w],f,m);var b=v[1];l(b,m[0],v),v[0]&&(p[g++]=v[0]);var _=m[1],M=v[1],x=_+M,T=x-_,A=M-T;v[1]=x,A&&(p[g++]=A)}return v[1]&&(p[g++]=v[1]),g===0&&(p[g++]=0),p.length=g,p}},1125(n,a,o){"use strict";n.exports=u;var s=o(3250)[3];function l(c,f,h,d){for(var p=0;p<2;++p){var v=c[p],m=f[p],g=Math.min(v,m),w=Math.max(v,m),b=h[p],_=d[p],M=Math.min(b,_),x=Math.max(b,_);if(x<g||w<M)return!1}return!0}function u(c,f,h,d){var p=s(c,h,d),v=s(f,h,d);if(p>0&&v>0||p<0&&v<0)return!1;var m=s(h,c,f),g=s(d,c,f);return m>0&&g>0||m<0&&g<0?!1:p===0&&v===0&&m===0&&g===0?l(c,f,h,d):!0}},8545(n){"use strict";n.exports=o;function a(s,l){var u=s+l,c=u-s,f=u-c,h=l-c,d=s-f,p=d+h;return p?[p,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return a(s[0],-l[0]);var f=u+c,h=new Array(f),d=0,p=0,v=0,m=Math.abs,g=s[p],w=m(g),b=-l[v],_=m(b),M,x;w<_?(x=g,p+=1,p<u&&(g=s[p],w=m(g))):(x=b,v+=1,v<c&&(b=-l[v],_=m(b))),p<u&&w<_||v>=c?(M=g,p+=1,p<u&&(g=s[p],w=m(g))):(M=b,v+=1,v<c&&(b=-l[v],_=m(b)));for(var T=M+x,A=T-M,y=x-A,E=y,S=T,C,k,D,F,P;p<u&&v<c;)w<_?(M=g,p+=1,p<u&&(g=s[p],w=m(g))):(M=b,v+=1,v<c&&(b=-l[v],_=m(b))),x=E,T=M+x,A=T-M,y=x-A,y&&(h[d++]=y),C=S+T,k=C-S,D=C-k,F=T-k,P=S-D,E=P+F,S=C;for(;p<u;)M=g,x=E,T=M+x,A=T-M,y=x-A,y&&(h[d++]=y),C=S+T,k=C-S,D=C-k,F=T-k,P=S-D,E=P+F,S=C,p+=1,p<u&&(g=s[p]);for(;v<c;)M=b,x=E,T=M+x,A=T-M,y=x-A,y&&(h[d++]=y),C=S+T,k=C-S,D=C-k,F=T-k,P=S-D,E=P+F,S=C,v+=1,v<c&&(b=-l[v]);return E&&(h[d++]=E),S&&(h[d++]=S),d||(h[d++]=0),h.length=d,h}},8210(n){"use strict";n.exports=o;function a(s,l){var u=s+l,c=u-s,f=u-c,h=l-c,d=s-f,p=d+h;return p?[p,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return a(s[0],l[0]);var f=u+c,h=new Array(f),d=0,p=0,v=0,m=Math.abs,g=s[p],w=m(g),b=l[v],_=m(b),M,x;w<_?(x=g,p+=1,p<u&&(g=s[p],w=m(g))):(x=b,v+=1,v<c&&(b=l[v],_=m(b))),p<u&&w<_||v>=c?(M=g,p+=1,p<u&&(g=s[p],w=m(g))):(M=b,v+=1,v<c&&(b=l[v],_=m(b)));for(var T=M+x,A=T-M,y=x-A,E=y,S=T,C,k,D,F,P;p<u&&v<c;)w<_?(M=g,p+=1,p<u&&(g=s[p],w=m(g))):(M=b,v+=1,v<c&&(b=l[v],_=m(b))),x=E,T=M+x,A=T-M,y=x-A,y&&(h[d++]=y),C=S+T,k=C-S,D=C-k,F=T-k,P=S-D,E=P+F,S=C;for(;p<u;)M=g,x=E,T=M+x,A=T-M,y=x-A,y&&(h[d++]=y),C=S+T,k=C-S,D=C-k,F=T-k,P=S-D,E=P+F,S=C,p+=1,p<u&&(g=s[p]);for(;v<c;)M=b,x=E,T=M+x,A=T-M,y=x-A,y&&(h[d++]=y),C=S+T,k=C-S,D=C-k,F=T-k,P=S-D,E=P+F,S=C,v+=1,v<c&&(b=l[v]);return E&&(h[d++]=E),S&&(h[d++]=S),d||(h[d++]=0),h.length=d,h}},9127(n,a,o){"use strict";n.exports=u;var s=o(6204),l=o(5771);function u(c){return l(s(c))}},7765(n,a,o){"use strict";n.exports=g;var s=o(9618),l=o(1888),u=o(446),c=o(1570);function f(w){for(var b=w.length,_=0,M=0;M<b;++M)_=Math.max(_,w[M].length)|0;return _-1}function h(w,b){for(var _=w.length,M=l.mallocUint8(_),x=0;x<_;++x)M[x]=w[x]<b|0;return M}function d(w,b){for(var _=w.length,M=b*(b+1)/2*_|0,x=l.mallocUint32(M*2),T=0,A=0;A<_;++A)for(var y=w[A],b=y.length,E=0;E<b;++E)for(var S=0;S<E;++S){var C=y[S],k=y[E];x[T++]=Math.min(C,k)|0,x[T++]=Math.max(C,k)|0}var D=T/2|0;u(s(x,[D,2]));for(var F=2,A=2;A<T;A+=2)x[A-2]===x[A]&&x[A-1]===x[A+1]||(x[F++]=x[A],x[F++]=x[A+1]);return s(x,[F/2|0,2])}function p(w,b,_,M){for(var x=w.data,T=w.shape[0],A=l.mallocDouble(T),y=0,E=0;E<T;++E){var S=x[2*E],C=x[2*E+1];if(_[S]!==_[C]){var k=b[S],D=b[C];x[2*y]=S,x[2*y+1]=C,A[y++]=(D-M)/(D-k)}}return w.shape[0]=y,s(A,[y])}function v(w,b){var _=l.mallocInt32(b*2),M=w.shape[0],x=w.data;_[0]=0;for(var T=0,A=0;A<M;++A){var y=x[2*A];if(y!==T){for(_[2*T+1]=A;++T<y;)_[2*T]=A,_[2*T+1]=A;_[2*T]=A}}for(_[2*T+1]=M;++T<b;)_[2*T]=_[2*T+1]=M;return _}function m(w){for(var b=w.shape[0]|0,_=w.data,M=new Array(b),x=0;x<b;++x)M[x]=[_[2*x],_[2*x+1]];return M}function g(w,b,_,M){_=_||0,typeof M=="undefined"&&(M=f(w));var x=w.length;if(x===0||M<1)return{cells:[],vertexIds:[],vertexWeights:[]};var T=h(b,+_),A=d(w,M),y=p(A,b,T,+_),E=v(A,b.length|0),S=c(M)(w,A.data,E,T),C=m(A),k=[].slice.call(y.data,0,y.shape[0]);return l.free(T),l.free(A.data),l.free(y.data),l.free(E),{cells:S,vertexIds:C,vertexWeights:k}}},1570(n){"use strict";n.exports=o;var a=[function(){function l(c,f,h,d){for(var p=Math.min(h,d)|0,v=Math.max(h,d)|0,m=c[2*p],g=c[2*p+1];m<g;){var w=m+g>>1,b=f[2*w+1];if(b===v)return w;v<b?g=w:m=w+1}return m}function u(c,f,h,d){for(var p=c.length,v=[],m=0;m<p;++m)var g=c[m],w=g.length;return v}return u},function(){function l(c,f,h,d){for(var p=Math.min(h,d)|0,v=Math.max(h,d)|0,m=c[2*p],g=c[2*p+1];m<g;){var w=m+g>>1,b=f[2*w+1];if(b===v)return w;v<b?g=w:m=w+1}return m}function u(c,f,h,d){for(var p=c.length,v=[],m=0;m<p;++m){var g=c[m],w=g.length;if(w===2){var b=(d[g[0]]<<0)+(d[g[1]]<<1);if(b===0||b===3)continue;switch(b){case 0:break;case 1:v.push([l(h,f,g[0],g[1])]);break;case 2:v.push([l(h,f,g[1],g[0])]);break;case 3:break}}}return v}return u},function(){function l(c,f,h,d){for(var p=Math.min(h,d)|0,v=Math.max(h,d)|0,m=c[2*p],g=c[2*p+1];m<g;){var w=m+g>>1,b=f[2*w+1];if(b===v)return w;v<b?g=w:m=w+1}return m}function u(c,f,h,d){for(var p=c.length,v=[],m=0;m<p;++m){var g=c[m],w=g.length;if(w===3){var b=(d[g[0]]<<0)+(d[g[1]]<<1)+(d[g[2]]<<2);if(b===0||b===7)continue;switch(b){case 0:break;case 1:v.push([l(h,f,g[0],g[2]),l(h,f,g[0],g[1])]);break;case 2:v.push([l(h,f,g[1],g[0]),l(h,f,g[1],g[2])]);break;case 3:v.push([l(h,f,g[0],g[2]),l(h,f,g[1],g[2])]);break;case 4:v.push([l(h,f,g[2],g[1]),l(h,f,g[2],g[0])]);break;case 5:v.push([l(h,f,g[2],g[1]),l(h,f,g[0],g[1])]);break;case 6:v.push([l(h,f,g[1],g[0]),l(h,f,g[2],g[0])]);break;case 7:break}}else if(w===2){var b=(d[g[0]]<<0)+(d[g[1]]<<1);if(b===0||b===3)continue;switch(b){case 0:break;case 1:v.push([l(h,f,g[0],g[1])]);break;case 2:v.push([l(h,f,g[1],g[0])]);break;case 3:break}}}return v}return u},function(){function l(c,f,h,d){for(var p=Math.min(h,d)|0,v=Math.max(h,d)|0,m=c[2*p],g=c[2*p+1];m<g;){var w=m+g>>1,b=f[2*w+1];if(b===v)return w;v<b?g=w:m=w+1}return m}function u(c,f,h,d){for(var p=c.length,v=[],m=0;m<p;++m){var g=c[m],w=g.length;if(w===4){var b=(d[g[0]]<<0)+(d[g[1]]<<1)+(d[g[2]]<<2)+(d[g[3]]<<3);if(b===0||b===15)continue;switch(b){case 0:break;case 1:v.push([l(h,f,g[0],g[1]),l(h,f,g[0],g[2]),l(h,f,g[0],g[3])]);break;case 2:v.push([l(h,f,g[1],g[2]),l(h,f,g[1],g[0]),l(h,f,g[1],g[3])]);break;case 3:v.push([l(h,f,g[1],g[2]),l(h,f,g[0],g[2]),l(h,f,g[0],g[3])],[l(h,f,g[1],g[3]),l(h,f,g[1],g[2]),l(h,f,g[0],g[3])]);break;case 4:v.push([l(h,f,g[2],g[0]),l(h,f,g[2],g[1]),l(h,f,g[2],g[3])]);break;case 5:v.push([l(h,f,g[0],g[1]),l(h,f,g[2],g[1]),l(h,f,g[0],g[3])],[l(h,f,g[2],g[1]),l(h,f,g[2],g[3]),l(h,f,g[0],g[3])]);break;case 6:v.push([l(h,f,g[2],g[0]),l(h,f,g[1],g[0]),l(h,f,g[1],g[3])],[l(h,f,g[2],g[3]),l(h,f,g[2],g[0]),l(h,f,g[1],g[3])]);break;case 7:v.push([l(h,f,g[0],g[3]),l(h,f,g[1],g[3]),l(h,f,g[2],g[3])]);break;case 8:v.push([l(h,f,g[3],g[1]),l(h,f,g[3],g[0]),l(h,f,g[3],g[2])]);break;case 9:v.push([l(h,f,g[3],g[1]),l(h,f,g[0],g[1]),l(h,f,g[0],g[2])],[l(h,f,g[3],g[2]),l(h,f,g[3],g[1]),l(h,f,g[0],g[2])]);break;case 10:v.push([l(h,f,g[1],g[0]),l(h,f,g[3],g[0]),l(h,f,g[1],g[2])],[l(h,f,g[3],g[0]),l(h,f,g[3],g[2]),l(h,f,g[1],g[2])]);break;case 11:v.push([l(h,f,g[1],g[2]),l(h,f,g[0],g[2]),l(h,f,g[3],g[2])]);break;case 12:v.push([l(h,f,g[3],g[0]),l(h,f,g[2],g[0]),l(h,f,g[2],g[1])],[l(h,f,g[3],g[1]),l(h,f,g[3],g[0]),l(h,f,g[2],g[1])]);break;case 13:v.push([l(h,f,g[0],g[1]),l(h,f,g[2],g[1]),l(h,f,g[3],g[1])]);break;case 14:v.push([l(h,f,g[2],g[0]),l(h,f,g[1],g[0]),l(h,f,g[3],g[0])]);break;case 15:break}}else if(w===3){var b=(d[g[0]]<<0)+(d[g[1]]<<1)+(d[g[2]]<<2);if(b===0||b===7)continue;switch(b){case 0:break;case 1:v.push([l(h,f,g[0],g[2]),l(h,f,g[0],g[1])]);break;case 2:v.push([l(h,f,g[1],g[0]),l(h,f,g[1],g[2])]);break;case 3:v.push([l(h,f,g[0],g[2]),l(h,f,g[1],g[2])]);break;case 4:v.push([l(h,f,g[2],g[1]),l(h,f,g[2],g[0])]);break;case 5:v.push([l(h,f,g[2],g[1]),l(h,f,g[0],g[1])]);break;case 6:v.push([l(h,f,g[1],g[0]),l(h,f,g[2],g[0])]);break;case 7:break}}else if(w===2){var b=(d[g[0]]<<0)+(d[g[1]]<<1);if(b===0||b===3)continue;switch(b){case 0:break;case 1:v.push([l(h,f,g[0],g[1])]);break;case 2:v.push([l(h,f,g[1],g[0])]);break;case 3:break}}}return v}return u}];function o(s){return a[s]()}},6803(n,a,o){"use strict";var s,l=o(8828),u=o(1755);function c(E){for(var S=0,C=Math.max,k=0,D=E.length;k<D;++k)S=C(S,E[k].length);return S-1}s=c;function f(E){for(var S=-1,C=Math.max,k=0,D=E.length;k<D;++k)for(var F=E[k],P=0,R=F.length;P<R;++P)S=C(S,F[P]);return S+1}s=f;function h(E){for(var S=new Array(E.length),C=0,k=E.length;C<k;++C)S[C]=E[C].slice(0);return S}s=h;function d(E,S){var C=E.length,k=E.length-S.length,D=Math.min;if(k)return k;switch(C){case 0:return 0;case 1:return E[0]-S[0];case 2:var I=E[0]+E[1]-S[0]-S[1];return I||D(E[0],E[1])-D(S[0],S[1]);case 3:var F=E[0]+E[1],P=S[0]+S[1];if(I=F+E[2]-(P+S[2]),I)return I;var R=D(E[0],E[1]),L=D(S[0],S[1]),I=D(R,E[2])-D(L,S[2]);return I||D(R+E[2],F)-D(L+S[2],P);default:var B=E.slice(0);B.sort();var O=S.slice(0);O.sort();for(var $=0;$<C;++$)if(k=B[$]-O[$],k)return k;return 0}}a.Fw=d;function p(E,S){return d(E[0],S[0])}function v(E,S){if(S){for(var C=E.length,k=new Array(C),D=0;D<C;++D)k[D]=[E[D],S[D]];k.sort(p);for(var D=0;D<C;++D)E[D]=k[D][0],S[D]=k[D][1];return E}else return E.sort(d),E}s=v;function m(E){if(E.length===0)return[];for(var S=1,C=E.length,k=1;k<C;++k){var D=E[k];if(d(D,E[k-1])){if(k===S){S++;continue}E[S++]=D}}return E.length=S,E}s=m;function g(E,S){for(var C=0,k=E.length-1,D=-1;C<=k;){var F=C+k>>1,P=d(E[F],S);P<=0?(P===0&&(D=F),C=F+1):P>0&&(k=F-1)}return D}s=g;function w(E,S){for(var C=new Array(E.length),k=0,D=C.length;k<D;++k)C[k]=[];for(var F=[],k=0,P=S.length;k<P;++k)for(var R=S[k],L=R.length,I=1,B=1<<L;I<B;++I){F.length=l.popCount(I);for(var O=0,$=0;$<L;++$)I&1<<$&&(F[O++]=R[$]);var Y=g(E,F);if(!(Y<0))for(;C[Y++].push(k),!(Y>=E.length||d(E[Y],F)!==0););}return C}s=w;function b(E,S){if(!S)return w(m(M(E,0)),E,0);for(var C=new Array(S),k=0;k<S;++k)C[k]=[];for(var k=0,D=E.length;k<D;++k)for(var F=E[k],P=0,R=F.length;P<R;++P)C[F[P]].push(k);return C}s=b;function _(E){for(var S=[],C=0,k=E.length;C<k;++C)for(var D=E[C],F=D.length|0,P=1,R=1<<F;P<R;++P){for(var L=[],I=0;I<F;++I)P>>>I&1&&L.push(D[I]);S.push(L)}return v(S)}s=_;function M(E,S){if(S<0)return[];for(var C=[],k=(1<<S+1)-1,D=0;D<E.length;++D)for(var F=E[D],P=k;P<1<<F.length;P=l.nextCombination(P)){for(var R=new Array(S+1),L=0,I=0;I<F.length;++I)P&1<<I&&(R[L++]=F[I]);C.push(R)}return v(C)}s=M;function x(E){for(var S=[],C=0,k=E.length;C<k;++C)for(var D=E[C],F=0,P=D.length;F<P;++F){for(var R=new Array(D.length-1),L=0,I=0;L<P;++L)L!==F&&(R[I++]=D[L]);S.push(R)}return v(S)}s=x;function T(E,S){for(var C=new u(S),k=0;k<E.length;++k)for(var D=E[k],F=0;F<D.length;++F)for(var P=F+1;P<D.length;++P)C.link(D[F],D[P]);for(var R=[],L=C.ranks,k=0;k<L.length;++k)L[k]=-1;for(var k=0;k<E.length;++k){var I=C.find(E[k][0]);L[I]<0?(L[I]=R.length,R.push([E[k].slice(0)])):R[L[I]].push(E[k].slice(0))}return R}function A(E){for(var S=m(v(M(E,0))),C=new u(S.length),k=0;k<E.length;++k)for(var D=E[k],F=0;F<D.length;++F)for(var P=g(S,[D[F]]),R=F+1;R<D.length;++R)C.link(P,g(S,[D[R]]));for(var L=[],I=C.ranks,k=0;k<I.length;++k)I[k]=-1;for(var k=0;k<E.length;++k){var B=C.find(g(S,[E[k][0]]));I[B]<0?(I[B]=L.length,L.push([E[k].slice(0)])):L[I[B]].push(E[k].slice(0))}return L}function y(E,S){return S?T(E,S):A(E)}s=y},3105(n,a){"use strict";"use restrict";var o=32;a.INT_BITS=o,a.INT_MAX=2147483647,a.INT_MIN=-1<<o-1,a.sign=function(u){return(u>0)-(u<0)},a.abs=function(u){var c=u>>o-1;return(u^c)-c},a.min=function(u,c){return c^(u^c)&-(u<c)},a.max=function(u,c){return u^(u^c)&-(u<c)},a.isPow2=function(u){return!(u&u-1)&&!!u},a.log2=function(u){var c,f;return c=(u>65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},a.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},a.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}a.countTrailingZeros=s,a.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},a.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},a.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,h=c,d=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--d;u[c]=h<<d&255}})(l),a.reverse=function(u){return l[u&255]<<24|l[u>>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},a.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},a.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},a.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},a.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},a.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},2014(n,a,o){"use strict";"use restrict";var s=o(3105),l=o(4623);function u(y){for(var E=0,S=Math.max,C=0,k=y.length;C<k;++C)E=S(E,y[C].length);return E-1}a.dimension=u;function c(y){for(var E=-1,S=Math.max,C=0,k=y.length;C<k;++C)for(var D=y[C],F=0,P=D.length;F<P;++F)E=S(E,D[F]);return E+1}a.countVertices=c;function f(y){for(var E=new Array(y.length),S=0,C=y.length;S<C;++S)E[S]=y[S].slice(0);return E}a.cloneCells=f;function h(y,E){var S=y.length,C=y.length-E.length,k=Math.min;if(C)return C;switch(S){case 0:return 0;case 1:return y[0]-E[0];case 2:var L=y[0]+y[1]-E[0]-E[1];return L||k(y[0],y[1])-k(E[0],E[1]);case 3:var D=y[0]+y[1],F=E[0]+E[1];if(L=D+y[2]-(F+E[2]),L)return L;var P=k(y[0],y[1]),R=k(E[0],E[1]),L=k(P,y[2])-k(R,E[2]);return L||k(P+y[2],D)-k(R+E[2],F);default:var I=y.slice(0);I.sort();var B=E.slice(0);B.sort();for(var O=0;O<S;++O)if(C=I[O]-B[O],C)return C;return 0}}a.compareCells=h;function d(y,E){return h(y[0],E[0])}function p(y,E){if(E){for(var S=y.length,C=new Array(S),k=0;k<S;++k)C[k]=[y[k],E[k]];C.sort(d);for(var k=0;k<S;++k)y[k]=C[k][0],E[k]=C[k][1];return y}else return y.sort(h),y}a.normalize=p;function v(y){if(y.length===0)return[];for(var E=1,S=y.length,C=1;C<S;++C){var k=y[C];if(h(k,y[C-1])){if(C===E){E++;continue}y[E++]=k}}return y.length=E,y}a.unique=v;function m(y,E){for(var S=0,C=y.length-1,k=-1;S<=C;){var D=S+C>>1,F=h(y[D],E);F<=0?(F===0&&(k=D),S=D+1):F>0&&(C=D-1)}return k}a.findCell=m;function g(y,E){for(var S=new Array(y.length),C=0,k=S.length;C<k;++C)S[C]=[];for(var D=[],C=0,F=E.length;C<F;++C)for(var P=E[C],R=P.length,L=1,I=1<<R;L<I;++L){D.length=s.popCount(L);for(var B=0,O=0;O<R;++O)L&1<<O&&(D[B++]=P[O]);var $=m(y,D);if(!($<0))for(;S[$++].push(C),!($>=y.length||h(y[$],D)!==0););}return S}a.incidence=g;function w(y,E){if(!E)return g(v(_(y,0)),y,0);for(var S=new Array(E),C=0;C<E;++C)S[C]=[];for(var C=0,k=y.length;C<k;++C)for(var D=y[C],F=0,P=D.length;F<P;++F)S[D[F]].push(C);return S}a.dual=w;function b(y){for(var E=[],S=0,C=y.length;S<C;++S)for(var k=y[S],D=k.length|0,F=1,P=1<<D;F<P;++F){for(var R=[],L=0;L<D;++L)F>>>L&1&&R.push(k[L]);E.push(R)}return p(E)}a.explode=b;function _(y,E){if(E<0)return[];for(var S=[],C=(1<<E+1)-1,k=0;k<y.length;++k)for(var D=y[k],F=C;F<1<<D.length;F=s.nextCombination(F)){for(var P=new Array(E+1),R=0,L=0;L<D.length;++L)F&1<<L&&(P[R++]=D[L]);S.push(P)}return p(S)}a.skeleton=_;function M(y){for(var E=[],S=0,C=y.length;S<C;++S)for(var k=y[S],D=0,F=k.length;D<F;++D){for(var P=new Array(k.length-1),R=0,L=0;R<F;++R)R!==D&&(P[L++]=k[R]);E.push(P)}return p(E)}a.boundary=M;function x(y,E){for(var S=new l(E),C=0;C<y.length;++C)for(var k=y[C],D=0;D<k.length;++D)for(var F=D+1;F<k.length;++F)S.link(k[D],k[F]);for(var P=[],R=S.ranks,C=0;C<R.length;++C)R[C]=-1;for(var C=0;C<y.length;++C){var L=S.find(y[C][0]);R[L]<0?(R[L]=P.length,P.push([y[C].slice(0)])):P[R[L]].push(y[C].slice(0))}return P}function T(y){for(var E=v(p(_(y,0))),S=new l(E.length),C=0;C<y.length;++C)for(var k=y[C],D=0;D<k.length;++D)for(var F=m(E,[k[D]]),P=D+1;P<k.length;++P)S.link(F,m(E,[k[P]]));for(var R=[],L=S.ranks,C=0;C<L.length;++C)L[C]=-1;for(var C=0;C<y.length;++C){var I=S.find(m(E,[y[C][0]]));L[I]<0?(L[I]=R.length,R.push([y[C].slice(0)])):R[L[I]].push(y[C].slice(0))}return R}function A(y,E){return E?x(y,E):T(y)}a.connectedComponents=A},4623(n){"use strict";"use restrict";n.exports=a;function a(o){this.roots=new Array(o),this.ranks=new Array(o);for(var s=0;s<o;++s)this.roots[s]=s,this.ranks[s]=0}a.prototype.length=function(){return this.roots.length},a.prototype.makeSet=function(){var o=this.roots.length;return this.roots.push(o),this.ranks.push(0),o},a.prototype.find=function(o){for(var s=this.roots;s[o]!==o;){var l=s[o];s[o]=s[l],o=l}return o},a.prototype.link=function(o,s){var l=this.find(o),u=this.find(s);if(l!==u){var c=this.ranks,f=this.roots,h=c[l],d=c[u];h<d?f[l]=u:d<h?f[u]=l:(f[u]=l,++c[l])}}},5878(n,a,o){"use strict";n.exports=c;var s=o(3250),l=o(2014);function u(f,h,d){var p=Math.abs(s(f,h,d)),v=Math.sqrt(Math.pow(h[0]-d[0],2)+Math.pow(h[1]-d[1],2));return p/v}function c(f,h,d){for(var p=h.length,v=f.length,m=new Array(p),g=new Array(p),w=new Array(p),b=new Array(p),_=0;_<p;++_)m[_]=g[_]=-1,w[_]=1/0,b[_]=!1;for(var _=0;_<v;++_){var M=f[_];if(M.length!==2)throw new Error("Input must be a graph");var x=M[1],T=M[0];g[T]!==-1?g[T]=-2:g[T]=x,m[x]!==-1?m[x]=-2:m[x]=T}function A(q){if(b[q])return 1/0;var J=m[q],U=g[q];return J<0||U<0?1/0:u(h[q],h[J],h[U])}function y(q,J){var U=R[q],V=R[J];R[q]=V,R[J]=U,L[U]=J,L[V]=q}function E(q){return w[R[q]]}function S(q){return q&1?q-1>>1:(q>>1)-1}function C(q){for(var J=E(q);;){var U=J,V=2*q+1,X=2*(q+1),H=q;if(V<B){var G=E(V);G<U&&(H=V,U=G)}if(X<B){var Q=E(X);Q<U&&(H=X)}if(H===q)return q;y(q,H),q=H}}function k(q){for(var J=E(q);q>0;){var U=S(q);if(U>=0){var V=E(U);if(J<V){y(q,U),q=U;continue}}return q}}function D(){if(B>0){var q=R[0];return y(0,B-1),B-=1,C(0),q}return-1}function F(q,J){var U=R[q];return w[U]===J?q:(w[U]=-1/0,k(q),D(),w[U]=J,B+=1,k(B-1))}function P(q){if(!b[q]){b[q]=!0;var J=m[q],U=g[q];m[U]>=0&&(m[U]=J),g[J]>=0&&(g[J]=U),L[J]>=0&&F(L[J],A(J)),L[U]>=0&&F(L[U],A(U))}}for(var R=[],L=new Array(p),_=0;_<p;++_){var I=w[_]=A(_);I<1/0?(L[_]=R.length,R.push(_)):L[_]=-1}for(var B=R.length,_=B>>1;_>=0;--_)C(_);for(;;){var O=D();if(O<0||w[O]>d)break;P(O)}for(var $=[],_=0;_<p;++_)b[_]||(L[_]=$.length,$.push(h[_].slice()));var Y=$.length;function K(q,J){if(q[J]<0)return J;var U=J,V=J;do{var X=q[V];if(!b[V]||X<0||X===V||(V=X,X=q[V],!b[V]||X<0||X===V))break;V=X,U=q[U]}while(U!==V);for(var H=J;H!==V;H=q[H])q[H]=V;return V}var j=[];return f.forEach(function(q){var J=K(m,q[0]),U=K(g,q[1]);if(J>=0&&U>=0&&J!==U){var V=L[J],X=L[U];V!==X&&j.push([V,X])}}),l.unique(l.normalize(j)),{positions:$,edges:j}}},1303(n,a,o){"use strict";n.exports=u;var s=o(3250);function l(c,f){var h,d;if(f[0][0]<f[1][0])h=f[0],d=f[1];else if(f[0][0]>f[1][0])h=f[1],d=f[0];else{var p=Math.min(c[0][1],c[1][1]),v=Math.max(c[0][1],c[1][1]),m=Math.min(f[0][1],f[1][1]),g=Math.max(f[0][1],f[1][1]);return v<m?v-m:p>g?p-g:v-g}var w,b;c[0][1]<c[1][1]?(w=c[0],b=c[1]):(w=c[1],b=c[0]);var _=s(d,h,w);return _||(_=s(d,h,b),_)?_:b-d}function u(c,f){var h,d;if(f[0][0]<f[1][0])h=f[0],d=f[1];else if(f[0][0]>f[1][0])h=f[1],d=f[0];else return l(f,c);var p,v;if(c[0][0]<c[1][0])p=c[0],v=c[1];else if(c[0][0]>c[1][0])p=c[1],v=c[0];else return-l(c,f);var m=s(h,d,v),g=s(h,d,p);if(m<0){if(g<=0)return m}else if(m>0){if(g>=0)return m}else if(g)return g;if(m=s(v,p,d),g=s(v,p,h),m<0){if(g<=0)return m}else if(m>0){if(g>=0)return m}else if(g)return g;return d[0]-v[0]}},4209(n,a,o){"use strict";n.exports=g;var s=o(2478),l=o(3840),u=o(3250),c=o(1303);function f(w,b,_){this.slabs=w,this.coordinates=b,this.horizontal=_}var h=f.prototype;function d(w,b){return w.y-b}function p(w,b){for(var _=null;w;){var M=w.key,x,T;M[0][0]<M[1][0]?(x=M[0],T=M[1]):(x=M[1],T=M[0]);var A=u(x,T,b);if(A<0)w=w.left;else if(A>0)if(b[0]!==M[1][0])_=w,w=w.right;else{var y=p(w.right,b);if(y)return y;w=w.left}else{if(b[0]!==M[1][0])return w;var y=p(w.right,b);if(y)return y;w=w.left}}return _}h.castUp=function(w){var b=s.le(this.coordinates,w[0]);if(b<0)return-1;var _=this.slabs[b],M=p(this.slabs[b],w),x=-1;if(M&&(x=M.value),this.coordinates[b]===w[0]){var T=null;if(M&&(T=M.key),b>0){var A=p(this.slabs[b-1],w);A&&(T?c(A.key,T)>0&&(T=A.key,x=A.value):(x=A.value,T=A.key))}var y=this.horizontal[b];if(y.length>0){var E=s.ge(y,w[1],d);if(E<y.length){var S=y[E];if(w[1]===S.y){if(S.closed)return S.index;for(;E<y.length-1&&y[E+1].y===w[1];)if(E=E+1,S=y[E],S.closed)return S.index;if(S.y===w[1]&&!S.start){if(E=E+1,E>=y.length)return x;S=y[E]}}if(S.start)if(T){var C=u(T[0],T[1],[w[0],S.y]);T[0][0]>T[1][0]&&(C=-C),C>0&&(x=S.index)}else x=S.index;else S.y!==w[1]&&(x=S.index)}}}return x};function v(w,b,_,M){this.y=w,this.index=b,this.start=_,this.closed=M}function m(w,b,_,M){this.x=w,this.segment=b,this.create=_,this.index=M}function g(w){for(var b=w.length,_=2*b,M=new Array(_),x=0;x<b;++x){var T=w[x],A=T[0][0]<T[1][0];M[2*x]=new m(T[0][0],T,A,x),M[2*x+1]=new m(T[1][0],T,!A,x)}M.sort(function(R,L){var I=R.x-L.x;return I||(I=R.create-L.create,I)?I:Math.min(R.segment[0][1],R.segment[1][1])-Math.min(L.segment[0][1],L.segment[1][1])});for(var y=l(c),E=[],S=[],C=[],k=-1/0,x=0;x<_;){for(var D=M[x].x,F=[];x<_;){var P=M[x];if(P.x!==D)break;x+=1,P.segment[0][0]===P.x&&P.segment[1][0]===P.x?P.create&&(P.segment[0][1]<P.segment[1][1]?(F.push(new v(P.segment[0][1],P.index,!0,!0)),F.push(new v(P.segment[1][1],P.index,!1,!1))):(F.push(new v(P.segment[1][1],P.index,!0,!1)),F.push(new v(P.segment[0][1],P.index,!1,!0)))):P.create?y=y.insert(P.segment,P.index):y=y.remove(P.segment)}E.push(y.root),S.push(D),C.push(F)}return new f(E,S,C)}},5202(n,a,o){"use strict";var s=o(1944),l=o(8210);n.exports=f,n.exports.positive=h,n.exports.negative=d;function u(p,v){var m=l(s(p,v),[v[v.length-1]]);return m[m.length-1]}function c(p,v,m,g){var w=g-v,b=-v/w;b<0?b=0:b>1&&(b=1);for(var _=1-b,M=p.length,x=new Array(M),T=0;T<M;++T)x[T]=b*p[T]+_*m[T];return x}function f(p,v){for(var m=[],g=[],w=u(p[p.length-1],v),b=p[p.length-1],_=p[0],M=0;M<p.length;++M,b=_){_=p[M];var x=u(_,v);if(w<0&&x>0||w>0&&x<0){var T=c(b,x,_,w);m.push(T),g.push(T.slice())}x<0?g.push(_.slice()):x>0?m.push(_.slice()):(m.push(_.slice()),g.push(_.slice())),w=x}return{positive:m,negative:g}}function h(p,v){for(var m=[],g=u(p[p.length-1],v),w=p[p.length-1],b=p[0],_=0;_<p.length;++_,w=b){b=p[_];var M=u(b,v);(g<0&&M>0||g>0&&M<0)&&m.push(c(w,M,b,g)),M>=0&&m.push(b.slice()),g=M}return m}function d(p,v){for(var m=[],g=u(p[p.length-1],v),w=p[p.length-1],b=p[0],_=0;_<p.length;++_,w=b){b=p[_];var M=u(b,v);(g<0&&M>0||g>0&&M<0)&&m.push(c(w,M,b,g)),M<=0&&m.push(b.slice()),g=M}return m}},3387(n,a,o){var s;(function(){"use strict";var l={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function u(p){return f(d(p),arguments)}function c(p,v){return u.apply(null,[p].concat(v||[]))}function f(p,v){var m=1,g=p.length,w,b="",_,M,x,T,A,y,E,S;for(_=0;_<g;_++)if(typeof p[_]=="string")b+=p[_];else if(typeof p[_]=="object"){if(x=p[_],x.keys)for(w=v[m],M=0;M<x.keys.length;M++){if(w==null)throw new Error(u('[sprintf] Cannot access property "%s" of undefined value "%s"',x.keys[M],x.keys[M-1]));w=w[x.keys[M]]}else x.param_no?w=v[x.param_no]:w=v[m++];if(l.not_type.test(x.type)&&l.not_primitive.test(x.type)&&w instanceof Function&&(w=w()),l.numeric_arg.test(x.type)&&typeof w!="number"&&isNaN(w))throw new TypeError(u("[sprintf] expecting number but found %T",w));switch(l.number.test(x.type)&&(E=w>=0),x.type){case"b":w=parseInt(w,10).toString(2);break;case"c":w=String.fromCharCode(parseInt(w,10));break;case"d":case"i":w=parseInt(w,10);break;case"j":w=JSON.stringify(w,null,x.width?parseInt(x.width):0);break;case"e":w=x.precision?parseFloat(w).toExponential(x.precision):parseFloat(w).toExponential();break;case"f":w=x.precision?parseFloat(w).toFixed(x.precision):parseFloat(w);break;case"g":w=x.precision?String(Number(w.toPrecision(x.precision))):parseFloat(w);break;case"o":w=(parseInt(w,10)>>>0).toString(8);break;case"s":w=String(w),w=x.precision?w.substring(0,x.precision):w;break;case"t":w=String(!!w),w=x.precision?w.substring(0,x.precision):w;break;case"T":w=Object.prototype.toString.call(w).slice(8,-1).toLowerCase(),w=x.precision?w.substring(0,x.precision):w;break;case"u":w=parseInt(w,10)>>>0;break;case"v":w=w.valueOf(),w=x.precision?w.substring(0,x.precision):w;break;case"x":w=(parseInt(w,10)>>>0).toString(16);break;case"X":w=(parseInt(w,10)>>>0).toString(16).toUpperCase();break}l.json.test(x.type)?b+=w:(l.number.test(x.type)&&(!E||x.sign)?(S=E?"+":"-",w=w.toString().replace(l.sign,"")):S="",A=x.pad_char?x.pad_char==="0"?"0":x.pad_char.charAt(1):" ",y=x.width-(S+w).length,T=x.width&&y>0?A.repeat(y):"",b+=x.align?S+w+T:A==="0"?S+T+w:T+S+w)}return b}var h=Object.create(null);function d(p){if(h[p])return h[p];for(var v=p,m,g=[],w=0;v;){if((m=l.text.exec(v))!==null)g.push(m[0]);else if((m=l.modulo.exec(v))!==null)g.push("%");else if((m=l.placeholder.exec(v))!==null){if(m[2]){w|=1;var b=[],_=m[2],M=[];if((M=l.key.exec(_))!==null)for(b.push(M[1]);(_=_.substring(M[0].length))!=="";)if((M=l.key_access.exec(_))!==null)b.push(M[1]);else if((M=l.index_access.exec(_))!==null)b.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");m[2]=b}else w|=2;if(w===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");g.push({placeholder:m[0],param_no:m[1],keys:m[2],sign:m[3],pad_char:m[4],align:m[5],width:m[6],precision:m[7],type:m[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");v=v.substring(m[0].length)}return h[p]=g}a.sprintf=u,a.vsprintf=c,typeof window!="undefined"&&(window.sprintf=u,window.vsprintf=c,s=(function(){return{sprintf:u,vsprintf:c}}).call(a,o,a,n),s!==void 0&&(n.exports=s))})()},3711(n,a,o){"use strict";n.exports=d;var s=o(2640),l=o(781),u={"2d":function(p,v,m){var g=p({order:v,scalarArguments:3,getters:m==="generic"?[0]:void 0,phase:function(b,_,M,x){return b>x|0},vertex:function(b,_,M,x,T,A,y,E,S,C,k,D,F){var P=(y<<0)+(E<<1)+(S<<2)+(C<<3)|0;if(!(P===0||P===15))switch(P){case 0:k.push([b-.5,_-.5]);break;case 1:k.push([b-.25-.25*(x+M-2*F)/(M-x),_-.25-.25*(T+M-2*F)/(M-T)]);break;case 2:k.push([b-.75-.25*(-x-M+2*F)/(x-M),_-.25-.25*(A+x-2*F)/(x-A)]);break;case 3:k.push([b-.5,_-.5-.5*(T+M+A+x-4*F)/(M-T+x-A)]);break;case 4:k.push([b-.25-.25*(A+T-2*F)/(T-A),_-.75-.25*(-T-M+2*F)/(T-M)]);break;case 5:k.push([b-.5-.5*(x+M+A+T-4*F)/(M-x+T-A),_-.5]);break;case 6:k.push([b-.5-.25*(-x-M+A+T)/(x-M+T-A),_-.5-.25*(-T-M+A+x)/(T-M+x-A)]);break;case 7:k.push([b-.75-.25*(A+T-2*F)/(T-A),_-.75-.25*(A+x-2*F)/(x-A)]);break;case 8:k.push([b-.75-.25*(-A-T+2*F)/(A-T),_-.75-.25*(-A-x+2*F)/(A-x)]);break;case 9:k.push([b-.5-.25*(x+M+-A-T)/(M-x+A-T),_-.5-.25*(T+M+-A-x)/(M-T+A-x)]);break;case 10:k.push([b-.5-.5*(-x-M+-A-T+4*F)/(x-M+A-T),_-.5]);break;case 11:k.push([b-.25-.25*(-A-T+2*F)/(A-T),_-.75-.25*(T+M-2*F)/(M-T)]);break;case 12:k.push([b-.5,_-.5-.5*(-T-M+-A-x+4*F)/(T-M+A-x)]);break;case 13:k.push([b-.75-.25*(x+M-2*F)/(M-x),_-.25-.25*(-A-x+2*F)/(A-x)]);break;case 14:k.push([b-.25-.25*(-x-M+2*F)/(x-M),_-.25-.25*(-T-M+2*F)/(T-M)]);break;case 15:k.push([b-.5,_-.5]);break}},cell:function(b,_,M,x,T,A,y,E,S){T?E.push([b,_]):E.push([_,b])}});return function(w,b){var _=[],M=[];return g(w,_,M,b),{positions:_,cells:M}}}};function c(p,v){var m=p.length+"d",g=u[m];if(g)return g(s,p,v)}function f(p,v){for(var m=l(p,v),g=m.length,w=new Array(g),b=new Array(g),_=0;_<g;++_)w[_]=[m[_]],b[_]=[_];return{positions:w,cells:b}}var h={};function d(p,w){if(p.dimension<=0)return{positions:[],cells:[]};if(p.dimension===1)return f(p,w);var m=p.order.join()+"-"+p.dtype,g=h[m],w=+w||0;return g||(g=h[m]=c(p.order,p.dtype)),g(p,w)}},7261(n,a,o){"use strict";n.exports=b;var s=o(9215),l=o(7608),u=o(6079),c=o(5911),f=o(3536),h=o(244);function d(_,M,x){return Math.sqrt(Math.pow(_,2)+Math.pow(M,2)+Math.pow(x,2))}function p(_){return Math.min(1,Math.max(-1,_))}function v(_){var M=Math.abs(_[0]),x=Math.abs(_[1]),T=Math.abs(_[2]),A=[0,0,0];M>Math.max(x,T)?A[2]=1:x>Math.max(M,T)?A[0]=1:A[1]=1;for(var y=0,E=0,S=0;S<3;++S)y+=_[S]*_[S],E+=A[S]*_[S];for(var S=0;S<3;++S)A[S]-=E/y*_[S];return f(A,A),A}function m(_,M,x,T,A,y,E,S){this.center=s(x),this.up=s(T),this.right=s(A),this.radius=s([y]),this.angle=s([E,S]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(_,M),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var C=0;C<16;++C)this.computedMatrix[C]=.5;this.recalcMatrix(0)}var g=m.prototype;g.setDistanceLimits=function(_,M){_>0?_=Math.log(_):_=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,_),this.radius.bounds[0][0]=_,this.radius.bounds[1][0]=M},g.getDistanceLimits=function(_){var M=this.radius.bounds[0];return _?(_[0]=Math.exp(M[0][0]),_[1]=Math.exp(M[1][0]),_):[Math.exp(M[0][0]),Math.exp(M[1][0])]},g.recalcMatrix=function(_){this.center.curve(_),this.up.curve(_),this.right.curve(_),this.radius.curve(_),this.angle.curve(_);for(var M=this.computedUp,x=this.computedRight,T=0,A=0,y=0;y<3;++y)A+=M[y]*x[y],T+=M[y]*M[y];for(var E=Math.sqrt(T),S=0,y=0;y<3;++y)x[y]-=M[y]*A/T,S+=x[y]*x[y],M[y]/=E;for(var C=Math.sqrt(S),y=0;y<3;++y)x[y]/=C;var k=this.computedToward;c(k,M,x),f(k,k);for(var D=Math.exp(this.computedRadius[0]),F=this.computedAngle[0],P=this.computedAngle[1],R=Math.cos(F),L=Math.sin(F),I=Math.cos(P),B=Math.sin(P),O=this.computedCenter,$=R*I,Y=L*I,K=B,j=-R*B,q=-L*B,J=I,U=this.computedEye,V=this.computedMatrix,y=0;y<3;++y){var X=$*x[y]+Y*k[y]+K*M[y];V[4*y+1]=j*x[y]+q*k[y]+J*M[y],V[4*y+2]=X,V[4*y+3]=0}var H=V[1],G=V[5],Q=V[9],te=V[2],ce=V[6],ge=V[10],Ce=G*ge-Q*ce,be=Q*te-H*ge,he=H*ce-G*te,oe=d(Ce,be,he);Ce/=oe,be/=oe,he/=oe,V[0]=Ce,V[4]=be,V[8]=he;for(var y=0;y<3;++y)U[y]=O[y]+V[2+4*y]*D;for(var y=0;y<3;++y){for(var S=0,Ee=0;Ee<3;++Ee)S+=V[y+4*Ee]*U[Ee];V[12+y]=-S}V[15]=1},g.getMatrix=function(_,M){this.recalcMatrix(_);var x=this.computedMatrix;if(M){for(var T=0;T<16;++T)M[T]=x[T];return M}return x};var w=[0,0,0];g.rotate=function(_,M,x,T){if(this.angle.move(_,M,x),T){this.recalcMatrix(_);var A=this.computedMatrix;w[0]=A[2],w[1]=A[6],w[2]=A[10];for(var y=this.computedUp,E=this.computedRight,S=this.computedToward,C=0;C<3;++C)A[4*C]=y[C],A[4*C+1]=E[C],A[4*C+2]=S[C];u(A,A,T,w);for(var C=0;C<3;++C)y[C]=A[4*C],E[C]=A[4*C+1];this.up.set(_,y[0],y[1],y[2]),this.right.set(_,E[0],E[1],E[2])}},g.pan=function(_,M,x,T){M=M||0,x=x||0,T=T||0,this.recalcMatrix(_);var A=this.computedMatrix,y=Math.exp(this.computedRadius[0]),E=A[1],S=A[5],C=A[9],k=d(E,S,C);E/=k,S/=k,C/=k;var D=A[0],F=A[4],P=A[8],R=D*E+F*S+P*C;D-=E*R,F-=S*R,P-=C*R;var L=d(D,F,P);D/=L,F/=L,P/=L;var I=D*M+E*x,B=F*M+S*x,O=P*M+C*x;this.center.move(_,I,B,O);var $=Math.exp(this.computedRadius[0]);$=Math.max(1e-4,$+T),this.radius.set(_,Math.log($))},g.translate=function(_,M,x,T){this.center.move(_,M||0,x||0,T||0)},g.setMatrix=function(_,M,x,T){var A=1;typeof x=="number"&&(A=x|0),(A<0||A>3)&&(A=1);var y=(A+2)%3,E=(A+1)%3;M||(this.recalcMatrix(_),M=this.computedMatrix);var S=M[A],C=M[A+4],k=M[A+8];if(T){var F=Math.abs(S),P=Math.abs(C),R=Math.abs(k),L=Math.max(F,P,R);F===L?(S=S<0?-1:1,C=k=0):R===L?(k=k<0?-1:1,S=C=0):(C=C<0?-1:1,S=k=0)}else{var D=d(S,C,k);S/=D,C/=D,k/=D}var I=M[y],B=M[y+4],O=M[y+8],$=I*S+B*C+O*k;I-=S*$,B-=C*$,O-=k*$;var Y=d(I,B,O);I/=Y,B/=Y,O/=Y;var K=C*O-k*B,j=k*I-S*O,q=S*B-C*I,J=d(K,j,q);K/=J,j/=J,q/=J,this.center.jump(_,xe,re,pe),this.radius.idle(_),this.up.jump(_,S,C,k),this.right.jump(_,I,B,O);var U,V;if(A===2){var X=M[1],H=M[5],G=M[9],Q=X*I+H*B+G*O,te=X*K+H*j+G*q;be<0?U=-Math.PI/2:U=Math.PI/2,V=Math.atan2(te,Q)}else{var ce=M[2],ge=M[6],Ce=M[10],be=ce*S+ge*C+Ce*k,he=ce*I+ge*B+Ce*O,oe=ce*K+ge*j+Ce*q;U=Math.asin(p(be)),V=Math.atan2(oe,he)}this.angle.jump(_,V,U),this.recalcMatrix(_);var Ee=M[2],ye=M[6],ue=M[10],ee=this.computedMatrix;l(ee,M);var ae=ee[15],xe=ee[12]/ae,re=ee[13]/ae,pe=ee[14]/ae,we=Math.exp(this.computedRadius[0]);this.center.jump(_,xe-Ee*we,re-ye*we,pe-ue*we)},g.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},g.idle=function(_){this.center.idle(_),this.up.idle(_),this.right.idle(_),this.radius.idle(_),this.angle.idle(_)},g.flush=function(_){this.center.flush(_),this.up.flush(_),this.right.flush(_),this.radius.flush(_),this.angle.flush(_)},g.setDistance=function(_,M){M>0&&this.radius.set(_,Math.log(M))},g.lookAt=function(_,M,x,T){this.recalcMatrix(_),M=M||this.computedEye,x=x||this.computedCenter,T=T||this.computedUp;var A=T[0],y=T[1],E=T[2],S=d(A,y,E);if(!(S<1e-6)){A/=S,y/=S,E/=S;var C=M[0]-x[0],k=M[1]-x[1],D=M[2]-x[2],F=d(C,k,D);if(!(F<1e-6)){C/=F,k/=F,D/=F;var P=this.computedRight,R=P[0],L=P[1],I=P[2],B=A*R+y*L+E*I;R-=B*A,L-=B*y,I-=B*E;var O=d(R,L,I);if(!(O<.01&&(R=y*D-E*k,L=E*C-A*D,I=A*k-y*C,O=d(R,L,I),O<1e-6))){R/=O,L/=O,I/=O,this.up.set(_,A,y,E),this.right.set(_,R,L,I),this.center.set(_,x[0],x[1],x[2]),this.radius.set(_,Math.log(F));var $=y*I-E*L,Y=E*R-A*I,K=A*L-y*R,j=d($,Y,K);$/=j,Y/=j,K/=j;var q=A*C+y*k+E*D,J=R*C+L*k+I*D,U=$*C+Y*k+K*D,V=Math.asin(p(q)),X=Math.atan2(U,J),H=this.angle._state,G=H[H.length-1],Q=H[H.length-2];G=G%(2*Math.PI);var te=Math.abs(G+2*Math.PI-X),ce=Math.abs(G-X),ge=Math.abs(G-2*Math.PI-X);te<ce&&(G+=2*Math.PI),ge<ce&&(G-=2*Math.PI),this.angle.jump(this.angle.lastT(),G,Q),this.angle.set(_,X,V)}}}};function b(_){_=_||{};var M=_.center||[0,0,0],x=_.up||[0,1,0],T=_.right||v(x),A=_.radius||1,y=_.theta||0,E=_.phi||0;if(M=[].slice.call(M,0,3),x=[].slice.call(x,0,3),f(x,x),T=[].slice.call(T,0,3),f(T,T),"eye"in _){var S=_.eye,C=[S[0]-M[0],S[1]-M[1],S[2]-M[2]];c(T,C,x),d(T[0],T[1],T[2])<1e-6?T=v(x):f(T,T),A=d(C[0],C[1],C[2]);var k=h(x,C)/A,D=h(T,C)/A;E=Math.acos(k),y=Math.acos(D)}return A=Math.log(A),new m(_.zoomMin,_.zoomMax,M,x,T,A,y,E)}},5250(n){"use strict";n.exports=o;var a=+(Math.pow(2,27)+1);function o(s,l,u){var c=s*l,f=a*s,h=f-s,d=f-h,p=s-d,v=a*l,m=v-l,g=v-m,w=l-g,b=c-d*g,_=b-p*g,M=_-d*w,x=p*w-M;return u?(u[0]=x,u[1]=c,u):[x,c]}},9362(n){"use strict";n.exports=a;function a(o,s,l){var u=o+s,c=u-o,f=u-c,h=s-c,d=o-f;return l?(l[0]=d+h,l[1]=u,l):[d+h,u]}},1888(n,a,o){"use strict";var s=o(8828),l=o(1338),u=o(5500).hp;o.g.__TYPEDARRAY_POOL||(o.g.__TYPEDARRAY_POOL={UINT8:l([32,0]),UINT16:l([32,0]),UINT32:l([32,0]),BIGUINT64:l([32,0]),INT8:l([32,0]),INT16:l([32,0]),INT32:l([32,0]),BIGINT64:l([32,0]),FLOAT:l([32,0]),DOUBLE:l([32,0]),DATA:l([32,0]),UINT8C:l([32,0]),BUFFER:l([32,0])});var c=typeof Uint8ClampedArray!="undefined",f=typeof BigUint64Array!="undefined",h=typeof BigInt64Array!="undefined",d=o.g.__TYPEDARRAY_POOL;d.UINT8C||(d.UINT8C=l([32,0])),d.BIGUINT64||(d.BIGUINT64=l([32,0])),d.BIGINT64||(d.BIGINT64=l([32,0])),d.BUFFER||(d.BUFFER=l([32,0]));var p=d.DATA,v=d.BUFFER;a.free=function(R){if(u.isBuffer(R))v[s.log2(R.length)].push(R);else{if(Object.prototype.toString.call(R)!=="[object ArrayBuffer]"&&(R=R.buffer),!R)return;var L=R.length||R.byteLength,I=s.log2(L)|0;p[I].push(R)}};function m(P){if(P){var R=P.length||P.byteLength,L=s.log2(R);p[L].push(P)}}function g(P){m(P.buffer)}a.freeUint8=a.freeUint16=a.freeUint32=a.freeBigUint64=a.freeInt8=a.freeInt16=a.freeInt32=a.freeBigInt64=a.freeFloat32=a.freeFloat=a.freeFloat64=a.freeDouble=a.freeUint8Clamped=a.freeDataView=g,a.freeArrayBuffer=m,a.freeBuffer=function(R){v[s.log2(R.length)].push(R)},a.malloc=function(R,L){if(L===void 0||L==="arraybuffer")return w(R);switch(L){case"uint8":return b(R);case"uint16":return _(R);case"uint32":return M(R);case"int8":return x(R);case"int16":return T(R);case"int32":return A(R);case"float":case"float32":return y(R);case"double":case"float64":return E(R);case"uint8_clamped":return S(R);case"bigint64":return k(R);case"biguint64":return C(R);case"buffer":return F(R);case"data":case"dataview":return D(R);default:return null}return null};function w(R){var R=s.nextPow2(R),L=s.log2(R),I=p[L];return I.length>0?I.pop():new ArrayBuffer(R)}a.mallocArrayBuffer=w;function b(P){return new Uint8Array(w(P),0,P)}a.mallocUint8=b;function _(P){return new Uint16Array(w(2*P),0,P)}a.mallocUint16=_;function M(P){return new Uint32Array(w(4*P),0,P)}a.mallocUint32=M;function x(P){return new Int8Array(w(P),0,P)}a.mallocInt8=x;function T(P){return new Int16Array(w(2*P),0,P)}a.mallocInt16=T;function A(P){return new Int32Array(w(4*P),0,P)}a.mallocInt32=A;function y(P){return new Float32Array(w(4*P),0,P)}a.mallocFloat32=a.mallocFloat=y;function E(P){return new Float64Array(w(8*P),0,P)}a.mallocFloat64=a.mallocDouble=E;function S(P){return c?new Uint8ClampedArray(w(P),0,P):b(P)}a.mallocUint8Clamped=S;function C(P){return f?new BigUint64Array(w(8*P),0,P):null}a.mallocBigUint64=C;function k(P){return h?new BigInt64Array(w(8*P),0,P):null}a.mallocBigInt64=k;function D(P){return new DataView(w(P),0,P)}a.mallocDataView=D;function F(P){P=s.nextPow2(P);var R=s.log2(P),L=v[R];return L.length>0?L.pop():new u(P)}a.mallocBuffer=F,a.clearCache=function(){for(var R=0;R<32;++R)d.UINT8[R].length=0,d.UINT16[R].length=0,d.UINT32[R].length=0,d.INT8[R].length=0,d.INT16[R].length=0,d.INT32[R].length=0,d.FLOAT[R].length=0,d.DOUBLE[R].length=0,d.BIGUINT64[R].length=0,d.BIGINT64[R].length=0,d.UINT8C[R].length=0,p[R].length=0,v[R].length=0}},1755(n){"use strict";"use restrict";n.exports=a;function a(s){this.roots=new Array(s),this.ranks=new Array(s);for(var l=0;l<s;++l)this.roots[l]=l,this.ranks[l]=0}var o=a.prototype;Object.defineProperty(o,"length",{get:function(){return this.roots.length}}),o.makeSet=function(){var s=this.roots.length;return this.roots.push(s),this.ranks.push(0),s},o.find=function(s){for(var l=s,u=this.roots;u[s]!==s;)s=u[s];for(;u[l]!==s;){var c=u[l];u[l]=s,l=c}return s},o.link=function(s,l){var u=this.find(s),c=this.find(l);if(u!==c){var f=this.ranks,h=this.roots,d=f[u],p=f[c];d<p?h[u]=c:p<d?h[c]=u:(h[c]=u,++f[u])}}},1682(n){"use strict";function a(l,u){for(var c=1,f=l.length,h=l[0],d=l[0],p=1;p<f;++p)if(d=h,h=l[p],u(h,d)){if(p===c){c++;continue}l[c++]=h}return l.length=c,l}function o(l){for(var u=1,c=l.length,f=l[0],h=l[0],d=1;d<c;++d,h=f)if(h=f,f=l[d],f!==h){if(d===u){u++;continue}l[u++]=f}return l.length=u,l}function s(l,u,c){return l.length===0?l:u?(c||l.sort(u),a(l,u)):(c||l.sort(),o(l))}n.exports=s},4359(n,a,o){"use strict";n.exports=c;var s=o(7718),l=null,u=null;typeof document!="undefined"&&(l=document.createElement("canvas"),l.width=8192,l.height=1024,u=l.getContext("2d"));function c(f,h){return(typeof h!="object"||h===null)&&(h={}),s(f,h.canvas||l,h.context||u,h)}},7718(n,a,o){n.exports=k,n.exports.processPixels=C;var s=o(3711),l=o(9618),u=o(5878),c=o(332),f=o(2538),h=o(2095),d="b",p="b|",v="i",m="i|",g="sup",w="+",b="+1",_="sub",M="-",x="-1";function T(D,F,P,R){for(var L="<"+D+">",I="</"+D+">",B=L.length,O=I.length,$=F[0]===w||F[0]===M,Y=0,K=-O;Y>-1&&(Y=P.indexOf(L,Y),!(Y===-1||(K=P.indexOf(I,Y+B),K===-1)||K<=Y));){for(var j=Y;j<K+O;++j)if(j<Y+B||j>=K)R[j]=null,P=P.substr(0,j)+" "+P.substr(j+1);else if(R[j]!==null){var q=R[j].indexOf(F[0]);q===-1?R[j]+=F:$&&(R[j]=R[j].substr(0,q+1)+(1+parseInt(R[j][q+1]))+R[j].substr(q+2))}var J=Y+B,U=P.substr(J,K-J),V=U.indexOf(L);V!==-1?Y=V:Y=K+O}return R}function A(D,F,P){for(var R=F.textAlign||"start",L=F.textBaseline||"alphabetic",I=[1<<30,1<<30],B=[0,0],O=D.length,$=0;$<O;++$)for(var Y=D[$],K=0;K<2;++K)I[K]=Math.min(I[K],Y[K])|0,B[K]=Math.max(B[K],Y[K])|0;var j=0;switch(R){case"center":j=-.5*(I[0]+B[0]);break;case"right":case"end":j=-B[0];break;case"left":case"start":j=-I[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+R+"'")}var q=0;switch(L){case"hanging":case"top":q=-I[1];break;case"middle":q=-.5*(I[1]+B[1]);break;case"alphabetic":case"ideographic":q=-3*P;break;case"bottom":q=-B[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+L+"'")}var J=1/P;return"lineHeight"in F?J*=+F.lineHeight:"width"in F?J=F.width/(B[0]-I[0]):"height"in F&&(J=F.height/(B[1]-I[1])),D.map(function(U){return[J*(U[0]+j),J*(U[1]+q)]})}function y(D,F,P,R,L,I){P=P.replace(/\n/g,""),I.breaklines===!0?P=P.replace(/\<br\>/g,`
`):P=P.replace(/\<br\>/g," ");var B="",O=[];for(G=0;G<P.length;++G)O[G]=B;I.bolds===!0&&(O=T(d,p,P,O)),I.italics===!0&&(O=T(v,m,P,O)),I.superscripts===!0&&(O=T(g,b,P,O)),I.subscripts===!0&&(O=T(_,x,P,O));var $=[],Y="";for(G=0;G<P.length;++G)O[G]!==null&&(Y+=P[G],$.push(O[G]));var K=Y.split(`
`),j=K.length,q=Math.round(L*R),J=R,U=R*2,V=0,X=j*q+U;D.height<X&&(D.height=X),F.fillStyle="#000",F.fillRect(0,0,D.width,D.height),F.fillStyle="#fff";var H,G,Q,te,ce,ge=0,Ce="";function be(){if(Ce!==""){var re=F.measureText(Ce).width;F.fillText(Ce,J+Q,U+te),Q+=re}}function he(){return""+Math.round(ce)+"px "}function oe(re,pe){var we=""+F.font;if(I.subscripts===!0){var Fe=re.indexOf(M),Se=pe.indexOf(M),ke=Fe>-1?parseInt(re[1+Fe]):0,_e=Se>-1?parseInt(pe[1+Se]):0;ke!==_e&&(we=we.replace(he(),"?px "),ce*=Math.pow(.75,_e-ke),we=we.replace("?px ",he())),te+=.25*q*(_e-ke)}if(I.superscripts===!0){var Ie=re.indexOf(w),Oe=pe.indexOf(w),Qe=Ie>-1?parseInt(re[1+Ie]):0,et=Oe>-1?parseInt(pe[1+Oe]):0;Qe!==et&&(we=we.replace(he(),"?px "),ce*=Math.pow(.75,et-Qe),we=we.replace("?px ",he())),te-=.25*q*(et-Qe)}if(I.bolds===!0){var _t=re.indexOf(p)>-1,ut=pe.indexOf(p)>-1;!_t&&ut&&(vt?we=we.replace("italic ","italic bold "):we="bold "+we),_t&&!ut&&(we=we.replace("bold ",""))}if(I.italics===!0){var vt=re.indexOf(m)>-1,Xe=pe.indexOf(m)>-1;!vt&&Xe&&(we="italic "+we),vt&&!Xe&&(we=we.replace("italic ",""))}F.font=we}for(H=0;H<j;++H){var Ee=K[H]+`
`;for(Q=0,te=H*q,ce=R,Ce="",G=0;G<Ee.length;++G){var ye=G+ge<$.length?$[G+ge]:$[$.length-1];B===ye?Ce+=Ee[G]:(be(),Ce=Ee[G],ye!==void 0&&(oe(B,ye),B=ye))}be(),ge+=Ee.length;var ue=Math.round(Q+2*J)|0;V<ue&&(V=ue)}var ee=V,ae=U+q*j,xe=l(F.getImageData(0,0,ee,ae).data,[ae,ee,4]);return xe.pick(-1,-1,0).transpose(1,0)}function E(D,F){var P=s(D,128);return F?u(P.cells,P.positions,.25):{edges:P.cells,positions:P.positions}}function S(D,F,P,R){var L=E(D,R),I=A(L.positions,F,P),B=L.edges,O=F.orientation==="ccw";if(c(I,B),F.polygons||F.polygon||F.polyline){for(var $=h(B,I),Y=new Array($.length),K=0;K<$.length;++K){for(var j=$[K],q=new Array(j.length),J=0;J<j.length;++J){for(var U=j[J],V=new Array(U.length),X=0;X<U.length;++X)V[X]=I[U[X]].slice();O&&V.reverse(),q[J]=V}Y[K]=q}return Y}else return F.triangles||F.triangulate||F.triangle?{cells:f(I,B,{delaunay:!1,exterior:!1,interior:!0}),positions:I}:{edges:B,positions:I}}function C(D,F,P){try{return S(D,F,P,!0)}catch(R){}try{return S(D,F,P,!1)}catch(R){}return F.polygons||F.polyline||F.polygon?[]:F.triangles||F.triangulate||F.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}function k(D,F,P,R){var L=64,I=1.25,B={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};R&&(R.size&&R.size>0&&(L=R.size),R.lineSpacing&&R.lineSpacing>0&&(I=R.lineSpacing),R.styletags&&R.styletags.breaklines&&(B.breaklines=!!R.styletags.breaklines),R.styletags&&R.styletags.bolds&&(B.bolds=!!R.styletags.bolds),R.styletags&&R.styletags.italics&&(B.italics=!!R.styletags.italics),R.styletags&&R.styletags.subscripts&&(B.subscripts=!!R.styletags.subscripts),R.styletags&&R.styletags.superscripts&&(B.superscripts=!!R.styletags.superscripts)),P.font=[R.fontStyle,R.fontVariant,R.fontWeight,L+"px",R.font].filter(function($){return $}).join(" "),P.textAlign="start",P.textBaseline="alphabetic",P.direction="ltr";var O=y(F,P,D,L,I,B);return C(O,R,L)}},1538(n){(function(){"use strict";if(typeof ses!="undefined"&&ses.ok&&!ses.ok())return;function o(S){S.permitHostObjects___&&S.permitHostObjects___(o)}typeof ses!="undefined"&&(ses.weakMapPermitHostObjects=o);var s=!1;if(typeof WeakMap=="function"){var l=WeakMap;if(!(typeof navigator!="undefined"&&/Firefox/.test(navigator.userAgent))){var u=new l,c=Object.freeze({});if(u.set(c,1),u.get(c)!==1)s=!0;else{n.exports=WeakMap;return}}}var f=Object.prototype.hasOwnProperty,h=Object.getOwnPropertyNames,d=Object.defineProperty,p=Object.isExtensible,v="weakmap:",m=v+"ident:"+Math.random()+"___";if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var g=new ArrayBuffer(25),w=new Uint8Array(g);crypto.getRandomValues(w),m=v+"rand:"+Array.prototype.map.call(w,function(S){return(S%36).toString(36)}).join("")+"___"}function b(S){return!(S.substr(0,v.length)==v&&S.substr(S.length-3)==="___")}if(d(Object,"getOwnPropertyNames",{value:function(C){return h(C).filter(b)}}),"getPropertyNames"in Object){var _=Object.getPropertyNames;d(Object,"getPropertyNames",{value:function(C){return _(C).filter(b)}})}function M(S){if(S!==Object(S))throw new TypeError("Not an object: "+S);var C=S[m];if(C&&C.key===S)return C;if(p(S)){C={key:S};try{return d(S,m,{value:C,writable:!1,enumerable:!1,configurable:!1}),C}catch(k){return}}}(function(){var S=Object.freeze;d(Object,"freeze",{value:function(F){return M(F),S(F)}});var C=Object.seal;d(Object,"seal",{value:function(F){return M(F),C(F)}});var k=Object.preventExtensions;d(Object,"preventExtensions",{value:function(F){return M(F),k(F)}})})();function x(S){return S.prototype=null,Object.freeze(S)}var T=!1;function A(){!T&&typeof console!="undefined"&&(T=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var y=0,E=function(){this instanceof E||A();var S=[],C=[],k=y++;function D(L,I){var B,O=M(L);return O?k in O?O[k]:I:(B=S.indexOf(L),B>=0?C[B]:I)}function F(L){var I=M(L);return I?k in I:S.indexOf(L)>=0}function P(L,I){var B,O=M(L);return O?O[k]=I:(B=S.indexOf(L),B>=0?C[B]=I:(B=S.length,C[B]=I,S[B]=L)),this}function R(L){var I=M(L),B,O;return I?k in I&&delete I[k]:(B=S.indexOf(L),B<0?!1:(O=S.length-1,S[B]=void 0,C[B]=C[O],S[B]=S[O],S.length=O,C.length=O,!0))}return Object.create(E.prototype,{get___:{value:x(D)},has___:{value:x(F)},set___:{value:x(P)},delete___:{value:x(R)}})};E.prototype=Object.create(Object.prototype,{get:{value:function(C,k){return this.get___(C,k)},writable:!0,configurable:!0},has:{value:function(C){return this.has___(C)},writable:!0,configurable:!0},set:{value:function(C,k){return this.set___(C,k)},writable:!0,configurable:!0},delete:{value:function(C){return this.delete___(C)},writable:!0,configurable:!0}}),typeof l=="function"?(function(){s&&typeof Proxy!="undefined"&&(Proxy=void 0);function S(){this instanceof E||A();var C=new l,k=void 0,D=!1;function F(I,B){return k?C.has(I)?C.get(I):k.get___(I,B):C.get(I,B)}function P(I){return C.has(I)||(k?k.has___(I):!1)}var R;s?R=function(I,B){return C.set(I,B),C.has(I)||(k||(k=new E),k.set(I,B)),this}:R=function(I,B){if(D)try{C.set(I,B)}catch(O){k||(k=new E),k.set___(I,B)}else C.set(I,B);return this};function L(I){var B=!!C.delete(I);return k&&k.delete___(I)||B}return Object.create(E.prototype,{get___:{value:x(F)},has___:{value:x(P)},set___:{value:x(R)},delete___:{value:x(L)},permitHostObjects___:{value:x(function(I){if(I===o)D=!0;else throw new Error("bogus call to permitHostObjects___")})}})}S.prototype=E.prototype,n.exports=S,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})})():(typeof Proxy!="undefined"&&(Proxy=void 0),n.exports=E)})()},236(n,a,o){var s=o(8284);n.exports=l;function l(){var u={};return function(c){if((typeof c!="object"||c===null)&&typeof c!="function")throw new Error("Weakmap-shim: Key must be object");var f=c.valueOf(u);return f&&f.identity===u?f:s(c,u)}}},8284(n){n.exports=a;function a(o,s){var l={identity:s},u=o.valueOf;return Object.defineProperty(o,"valueOf",{value:function(c){return c!==s?u.apply(this,arguments):l},writable:!0}),l}},606(n,a,o){var s=o(236);n.exports=l;function l(){var u=s();return{get:function(c,f){var h=u(c);return h.hasOwnProperty("value")?h.value:f},set:function(c,f){return u(c).value=f,this},has:function(c){return"value"in u(c)},delete:function(c){return delete u(c).value}}}},3349(n){"use strict";function a(){return function(f,h,d,p,v,m){var g=f[0],w=d[0],b=[0],_=w;p|=0;var M=0,x=w;for(M=0;M<g;++M){{var T=h[p]-m,A=h[p+_]-m;T>=0!=A>=0&&v.push(b[0]+.5+.5*(T+A)/(T-A))}p+=x,++b[0]}}}function o(){return a()}var s=o;function l(f){var h={};return function(p,v,m){var g=p.dtype,w=p.order,b=[g,w.join()].join(),_=h[b];return _||(h[b]=_=f([g,w])),_(p.shape.slice(0),p.data,p.stride,p.offset|0,v,m)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}n.exports=c({funcName:"zeroCrossings"})},781(n,a,o){"use strict";n.exports=l;var s=o(3349);function l(u,c){var f=[];return c=+c||0,s(u.hi(u.shape[0]-1),f,c),f}},7790(){}};let t={};function r(n){let a=t[n];if(a!==void 0)return a.exports;let o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(n){if(typeof window=="object")return window}})(),r.nmd=n=>(n.paths=[],n.children||(n.children=[]),n);let i=r(3065);dqe.exports=i})()});var om=W((fHr,pqe)=>{"use strict";var{normalize:oKt}=ni();function sKt(e){return e?oKt(e):[0,0,0,1]}pqe.exports=sKt});var sm=W((hHr,_qe)=>{"use strict";var yqe=sn(),mI=Jo(),M4=ni(),lKt=Vl().defaultLine,vqe=yc().isArrayOrTypedArray,NK=M4.normalize(lKt),xqe=1;function gqe(e,t){return[e[0],e[1],e[2],e[3]*t]}function OK(e){return yqe(e)||!M4.isChannelArray(e)&&!M4.isValid(e)?NK:M4.normalize(e)}function mqe(e){return yqe(e)?e:xqe}function uKt(e,t,r){var i=e.color;i&&i._inputArray&&(i=i._inputArray);var n=vqe(i),a=vqe(t),o=mI.extractOpts(e),s=[],l,u,c,f,h;if(o.colorscale!==void 0?l=mI.makeColorScaleFuncFromTrace(e):l=OK,n?u=(p,v)=>p[v]===void 0?NK:o.colorscale===void 0?l(p[v]):M4.normalize(l(p[v])):u=OK,a?c=function(p,v){return p[v]===void 0?xqe:mqe(p[v])}:c=mqe,n||a)for(var d=0;d<r;d++)f=u(i,d),h=c(t,d),s[d]=gqe(f,h);else s=gqe(OK(i),t);return s}function cKt(e){var t=mI.extractOpts(e),r=t.colorscale;return t.reversescale&&(r=mI.flipScale(t.colorscale)),r.map(function(i){return{index:i[0],rgb:M4.rgbaArray(i[1])}})}_qe.exports={formatColor:uKt,parseColorScale:cKt}});var UK=W((dHr,bqe)=>{"use strict";bqe.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}});var yI=W((pHr,wqe)=>{"use strict";wqe.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}});var Aqe=W((vHr,Tqe)=>{"use strict";var fKt=yi();function VK(e,t,r,i){if(!t||!t.visible)return null;for(var n=fKt.getComponentMethod("errorbars","makeComputeError")(t),a=new Array(e.length),o=0;o<e.length;o++){var s=n(+e[o],o);if(i.type==="log"){var l=i.c2l(e[o]),u=e[o]-s[0],c=e[o]+s[1];if(a[o]=[(i.c2l(u,!0)-l)*r,(i.c2l(c,!0)-l)*r],u>0){var f=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=f),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,f)}}else a[o]=[-s[0]*r,s[1]*r]}return a}function hKt(e){for(var t=0;t<e.length;t++)if(e[t])return e[t].length;return 0}function dKt(e,t,r){var i=[VK(e.x,e.error_x,t[0],r.xaxis),VK(e.y,e.error_y,t[1],r.yaxis),VK(e.z,e.error_z,t[2],r.zaxis)],n=hKt(i);if(n===0)return null;for(var a=new Array(n),o=0;o<n;o++){for(var s=[[0,0,0],[0,0,0]],l=0;l<3;l++)if(i[l])for(var u=0;u<2;u++)s[u][l]=i[l][o][u];a[o]=s}return a}Tqe.exports=dKt});var Pqe=W((gHr,Lqe)=>{"use strict";var pKt=nc().gl_line3d,Mqe=nc().gl_scatter3d,vKt=nc().gl_error3d,gKt=nc().gl_mesh3d,mKt=nc().delaunay_triangulate,lm=it(),Dqe=om(),xI=sm().formatColor,yKt=fA(),GK=UK(),xKt=yI(),_Kt=ji(),bKt=Kf().appendArrayPointValue,wKt=Aqe();function Fqe(e,t){this.scene=e,this.uid=t,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var jK=Fqe.prototype;jK.handlePick=function(e){if(e.object&&(e.object===this.linePlot||e.object===this.delaunayMesh||e.object===this.textMarkers||e.object===this.scatterPlot)){var t=e.index=e.data.index;return e.object.highlight&&e.object.highlight(null),this.scatterPlot&&(e.object=this.scatterPlot,this.scatterPlot.highlight(e.data)),e.textLabel="",this.textLabels&&(lm.isArrayOrTypedArray(this.textLabels)?(this.textLabels[t]||this.textLabels[t]===0)&&(e.textLabel=this.textLabels[t]):e.textLabel=this.textLabels),e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]],!0}};function TKt(e,t,r){var i=(r+1)%3,n=(r+2)%3,a=[],o=[],s;for(s=0;s<e.length;++s){var l=e[s];isNaN(l[i])||!isFinite(l[i])||isNaN(l[n])||!isFinite(l[n])||(a.push([l[i],l[n]]),o.push(s))}var u=mKt(a);for(s=0;s<u.length;++s)for(var c=u[s],f=0;f<c.length;++f)c[f]=o[c[f]];return{positions:e,cells:u,meshColor:t}}function AKt(e){for(var t=[0,0,0],r=[[0,0,0],[0,0,0],[0,0,0]],i=[1,1,1],n=0;n<3;n++){var a=e[n];a&&a.copy_zstyle!==!1&&e[2].visible!==!1&&(a=e[2]),!(!a||!a.visible)&&(t[n]=a.width/2,r[n]=Dqe(a.color),i[n]=a.thickness)}return{capSize:t,color:r,lineWidth:i}}function Sqe(e){return e==null?0:e.indexOf("left")>-1?-1:e.indexOf("right")>-1?1:0}function Eqe(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function MKt(e){var t=0,r=0,i=[t,r];if(Array.isArray(e))for(var n=0;n<e.length;n++)i[n]=[t,r],e[n]&&(i[n][0]=Sqe(e[n]),i[n][1]=Eqe(e[n]));else i[0]=Sqe(e),i[1]=Eqe(e);return i}function SKt(e,t){return t(e*4)}function EKt(e){return xKt[e]}function HK(e,t,r,i,n){var a=null;if(lm.isArrayOrTypedArray(e)){a=[];for(var o=0;o<t;o++)e[o]===void 0?a[o]=i:a[o]=r(e[o],n)}else a=r(e,lm.identity);return a}function kKt(e,t){var r=[],i=e.fullSceneLayout,n=e.dataScale,a=i.xaxis,o=i.yaxis,s=i.zaxis,l=t.marker,u=t.line,c=t.x||[],f=t.y||[],h=t.z||[],d=c.length,p=t.xcalendar,v=t.ycalendar,m=t.zcalendar,g,w,b,_,M,x;for(M=0;M<d;M++)g=a.d2l(c[M],0,p)*n[0],w=o.d2l(f[M],0,v)*n[1],b=s.d2l(h[M],0,m)*n[2],r[M]=[g,w,b];if(Array.isArray(t.text))x=t.text;else if(lm.isTypedArray(t.text))x=Array.from(t.text);else if(t.text!==void 0)for(x=new Array(d),M=0;M<d;M++)x[M]=t.text;function T(O,$){var Y=i[O];return _Kt.tickText(Y,Y.d2l($),!0).text}var A=t.texttemplate;if(A){var y=e.fullLayout,E=y._d3locale,S=Array.isArray(A),C=S?Math.min(A.length,d):d,k=S?function(O){return A[O]}:function(){return A};for(x=new Array(C),M=0;M<C;M++){var D={x:c[M],y:f[M],z:h[M]},F={xLabel:T("xaxis",c[M]),yLabel:T("yaxis",f[M]),zLabel:T("zaxis",h[M])},P={};bKt(P,t,M),x[M]=lm.texttemplateString({data:[P,D,t._meta],fallback:t.texttemplatefallback,labels:F,locale:E,template:k(M)})}}if(_={position:r,mode:t.mode,text:x},"line"in t&&(_.lineColor=xI(u,1,d),_.lineWidth=u.width,_.lineDashes=u.dash),"marker"in t){var R=yKt(t);_.scatterColor=xI(l,1,d),_.scatterSize=HK(l.size,d,SKt,20,R),_.scatterMarker=HK(l.symbol,d,EKt,"\u25CF"),_.scatterLineWidth=l.line.width,_.scatterLineColor=xI(l.line,1,d),_.scatterAngle=0}"textposition"in t&&(_.textOffset=MKt(t.textposition),_.textColor=xI(t.textfont,1,d),_.textSize=HK(t.textfont.size,d,lm.identity,12),_.textFontFamily=t.textfont.family,_.textFontWeight=t.textfont.weight,_.textFontStyle=t.textfont.style,_.textFontVariant=t.textfont.variant,_.textAngle=0);var L=["x","y","z"];for(_.project=[!1,!1,!1],_.projectScale=[1,1,1],_.projectOpacity=[1,1,1],M=0;M<3;++M){var I=t.projection[L[M]];(_.project[M]=I.show)&&(_.projectOpacity[M]=I.opacity,_.projectScale[M]=I.scale)}_.errorBounds=wKt(t,n,i);var B=AKt([t.error_x,t.error_y,t.error_z]);return _.errorColor=B.color,_.errorLineWidth=B.lineWidth,_.errorCapSize=B.capSize,_.delaunayAxis=t.surfaceaxis,_.delaunayColor=Dqe(t.surfacecolor),_}function kqe(e){if(lm.isArrayOrTypedArray(e)){var t=e[0];return lm.isArrayOrTypedArray(t)&&(e=t),"rgb("+e.slice(0,3).map(function(r){return Math.round(r*255)})+")"}return null}function Cqe(e){return lm.isArrayOrTypedArray(e)?e.length===4&&typeof e[0]=="number"?kqe(e):e.map(kqe):null}jK.update=function(e){var t=this.scene.glplot.gl,r,i,n,a,o=GK.solid;this.data=e;var s=kKt(this.scene,e);"mode"in s&&(this.mode=s.mode),"lineDashes"in s&&s.lineDashes in GK&&(o=GK[s.lineDashes]),this.color=Cqe(s.scatterColor)||Cqe(s.lineColor),this.dataPoints=s.position,r={gl:this.scene.glplot.gl,position:s.position,color:s.lineColor,lineWidth:s.lineWidth||1,dashes:o[0],dashScale:o[1],opacity:e.opacity,connectGaps:e.connectgaps},this.mode.indexOf("lines")!==-1?this.linePlot?this.linePlot.update(r):(this.linePlot=pKt(r),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 l=e.opacity;if(e.marker&&e.marker.opacity!==void 0&&(l*=e.marker.opacity),i={gl:this.scene.glplot.gl,position:s.position,color:s.scatterColor,size:s.scatterSize,glyph:s.scatterMarker,opacity:l,orthographic:!0,lineWidth:s.scatterLineWidth,lineColor:s.scatterLineColor,project:s.project,projectScale:s.projectScale,projectOpacity:s.projectOpacity},this.mode.indexOf("markers")!==-1?this.scatterPlot?this.scatterPlot.update(i):(this.scatterPlot=Mqe(i),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),a={gl:this.scene.glplot.gl,position:s.position,glyph:s.text,color:s.textColor,size:s.textSize,angle:s.textAngle,alignment:s.textOffset,font:s.textFontFamily,fontWeight:s.textFontWeight,fontStyle:s.textFontStyle,fontVariant:s.textFontVariant,orthographic:!0,lineWidth:0,project:!1,opacity:e.opacity},this.textLabels=e.hovertext||e.text,this.mode.indexOf("text")!==-1?this.textMarkers?this.textMarkers.update(a):(this.textMarkers=Mqe(a),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:s.position,color:s.errorColor,error:s.errorBounds,lineWidth:s.errorLineWidth,capSize:s.errorCapSize,opacity:e.opacity},this.errorBars?s.errorBounds?this.errorBars.update(n):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):s.errorBounds&&(this.errorBars=vKt(n),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),s.delaunayAxis>=0){var u=TKt(s.position,s.delaunayColor,s.delaunayAxis);u.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(u):(u.gl=t,this.delaunayMesh=gKt(u),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)};jK.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 CKt(e,t){var r=new Fqe(e,t.uid);return r.update(t),r}Lqe.exports=CKt});var ZK=W((mHr,Bqe)=>{"use strict";var um=Ns(),DKt=Ho(),XK=Eo(),$K=_s().axisHoverFormat,{hovertemplateAttrs:FKt,texttemplateAttrs:LKt,templatefallbackAttrs:Iqe}=Ga(),Rqe=Wa(),PKt=UK(),IKt=yI(),cv=tn().extendFlat,RKt=ls().overrideAll,zqe=(qx(),Go(Bx)).default,zKt=um.line,_b=um.marker,BKt=_b.line,qKt=cv({width:zKt.width,dash:{valType:"enumerated",values:zqe(PKt),dflt:"solid"}},XK("line"));function WK(e){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var YK=Bqe.exports=RKt({x:um.x,y:um.y,z:{valType:"data_array"},text:cv({},um.text,{}),texttemplate:LKt(),texttemplatefallback:Iqe({editType:"calc"}),hovertext:cv({},um.hovertext,{}),hovertemplate:FKt(),hovertemplatefallback:Iqe(),xhoverformat:$K("x"),yhoverformat:$K("y"),zhoverformat:$K("z"),mode:cv({},um.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:WK("x"),y:WK("y"),z:WK("z")},connectgaps:um.connectgaps,line:qKt,marker:cv({symbol:{valType:"enumerated",values:zqe(IKt),dflt:"circle",arrayOk:!0},size:cv({},_b.size,{dflt:8}),sizeref:_b.sizeref,sizemin:_b.sizemin,sizemode:_b.sizemode,opacity:cv({},_b.opacity,{arrayOk:!1}),colorbar:_b.colorbar,line:cv({width:cv({},BKt.width,{arrayOk:!1})},XK("marker.line"))},XK("marker")),textposition:cv({},um.textposition,{dflt:"top center"}),textfont:DKt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:Rqe.opacity,hoverinfo:cv({},Rqe.hoverinfo)},"calc","nested");YK.x.editType=YK.y.editType=YK.z.editType="calc+clearAxisTypes"});var Nqe=W((yHr,Oqe)=>{"use strict";var qqe=yi(),OKt=it(),KK=$o(),NKt=bd(),UKt=jp(),VKt=$p(),GKt=ZK();Oqe.exports=function(t,r,i,n){function a(d,p){return OKt.coerce(t,r,GKt,d,p)}var o=HKt(t,r,a,n);if(!o){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),a("mode"),KK.hasMarkers(r)&&NKt(t,r,i,n,a,{noAngle:!0,noLineDash:!0,noSelect:!0}),KK.hasLines(r)&&(a("connectgaps"),UKt(t,r,i,n,a)),KK.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),VKt(t,r,n,a,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var s=(r.line||{}).color,l=(r.marker||{}).color;a("surfaceaxis")>=0&&a("surfacecolor",s||l);for(var u=["x","y","z"],c=0;c<3;++c){var f="projection."+u[c];a(f+".show")&&(a(f+".opacity"),a(f+".scale"))}var h=qqe.getComponentMethod("errorbars","supplyDefaults");h(t,r,s||l||i,{axis:"z"}),h(t,r,s||l||i,{axis:"y",inherit:"z"}),h(t,r,s||l||i,{axis:"x",inherit:"z"})};function HKt(e,t,r,i){var n=0,a=r("x"),o=r("y"),s=r("z"),l=qqe.getComponentMethod("calendars","handleTraceDefaults");return l(e,t,["x","y","z"],i),a&&o&&s&&(n=Math.min(a.length,o.length,s.length),t._length=t._xlength=t._ylength=t._zlength=n),n}});var Vqe=W((xHr,Uqe)=>{"use strict";var jKt=x1(),$Kt=wd();Uqe.exports=function(t,r){var i=[{x:!1,y:!1,trace:r,t:{}}];return jKt(i,r),$Kt(t,r),i}});var Hqe=W((_Hr,Gqe)=>{Gqe.exports=WKt;function WKt(e,t){if(typeof e!="string")throw new TypeError("must specify type string");if(t=t||{},typeof document=="undefined"&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");typeof t.width=="number"&&(r.width=t.width),typeof t.height=="number"&&(r.height=t.height);var i=t,n;try{var a=[e];e.indexOf("webgl")===0&&a.push("experimental-"+e);for(var o=0;o<a.length;o++)if(n=r.getContext(a[o],i),n)return n}catch(s){n=null}return n||null}});var $qe=W((bHr,jqe)=>{var YKt=Hqe();jqe.exports=function(t){return YKt("webgl",t)}});var JK=W((wHr,Yqe)=>{"use strict";var Wqe=ni(),XKt=function(){};Yqe.exports=function(t){for(var r in t)typeof t[r]=="function"&&(t[r]=XKt);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var i=document.createElement("div");i.className="no-webgl",i.style.cursor="pointer",i.style.fontSize="24px",i.style.color=Wqe.defaults[0],i.style.position="absolute",i.style.left=i.style.top="0px",i.style.width=i.style.height="100%",i.style["background-color"]=Wqe.lightLine,i.style["z-index"]=30;var n=document.createElement("p");return n.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",n.style.position="relative",n.style.top="50%",n.style.left="50%",n.style.height="30%",n.style.width="50%",n.style.margin="-15% 0 0 -25%",i.appendChild(n),t.container.appendChild(i),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}});var Kqe=W((THr,Zqe)=>{"use strict";var bb=om(),ZKt=it(),KKt=["xaxis","yaxis","zaxis"];function Xqe(){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 JKt=Xqe.prototype;JKt.merge=function(e,t){for(var r=this,i=0;i<3;++i){var n=t[KKt[i]];if(!n.visible){r.tickEnable[i]=!1,r.labelEnable[i]=!1,r.lineEnable[i]=!1,r.lineTickEnable[i]=!1,r.gridEnable[i]=!1,r.zeroEnable[i]=!1,r.backgroundEnable[i]=!1;continue}r.labels[i]=e._meta?ZKt.templateString(n.title.text,e._meta):n.title.text,"font"in n.title&&(n.title.font.color&&(r.labelColor[i]=bb(n.title.font.color)),n.title.font.family&&(r.labelFont[i]=n.title.font.family),n.title.font.size&&(r.labelSize[i]=n.title.font.size),n.title.font.weight&&(r.labelFontWeight[i]=n.title.font.weight),n.title.font.style&&(r.labelFontStyle[i]=n.title.font.style),n.title.font.variant&&(r.labelFontVariant[i]=n.title.font.variant)),"showline"in n&&(r.lineEnable[i]=n.showline),"linecolor"in n&&(r.lineColor[i]=bb(n.linecolor)),"linewidth"in n&&(r.lineWidth[i]=n.linewidth),"showgrid"in n&&(r.gridEnable[i]=n.showgrid),"gridcolor"in n&&(r.gridColor[i]=bb(n.gridcolor)),"gridwidth"in n&&(r.gridWidth[i]=n.gridwidth),n.type==="log"?r.zeroEnable[i]=!1:"zeroline"in n&&(r.zeroEnable[i]=n.zeroline),"zerolinecolor"in n&&(r.zeroLineColor[i]=bb(n.zerolinecolor)),"zerolinewidth"in n&&(r.zeroLineWidth[i]=n.zerolinewidth),"ticks"in n&&n.ticks?r.lineTickEnable[i]=!0:r.lineTickEnable[i]=!1,"ticklen"in n&&(r.lineTickLength[i]=r._defaultLineTickLength[i]=n.ticklen),"tickcolor"in n&&(r.lineTickColor[i]=bb(n.tickcolor)),"tickwidth"in n&&(r.lineTickWidth[i]=n.tickwidth),"tickangle"in n&&(r.tickAngle[i]=n.tickangle==="auto"?-3600:Math.PI*-n.tickangle/180),"showticklabels"in n&&(r.tickEnable[i]=n.showticklabels),"tickfont"in n&&(n.tickfont.color&&(r.tickColor[i]=bb(n.tickfont.color)),n.tickfont.family&&(r.tickFont[i]=n.tickfont.family),n.tickfont.size&&(r.tickSize[i]=n.tickfont.size),n.tickfont.weight&&(r.tickFontWeight[i]=n.tickfont.weight),n.tickfont.style&&(r.tickFontStyle[i]=n.tickfont.style),n.tickfont.variant&&(r.tickFontVariant[i]=n.tickfont.variant)),"mirror"in n?["ticks","all","allticks"].indexOf(n.mirror)!==-1?(r.lineTickMirror[i]=!0,r.lineMirror[i]=!0):n.mirror===!0?(r.lineTickMirror[i]=!1,r.lineMirror[i]=!0):(r.lineTickMirror[i]=!1,r.lineMirror[i]=!1):r.lineMirror[i]=!1,"showbackground"in n&&n.showbackground!==!1?(r.backgroundEnable[i]=!0,r.backgroundColor[i]=bb(n.backgroundcolor)):r.backgroundEnable[i]=!1}};function QKt(e,t){var r=new Xqe;return r.merge(e,t),r}Zqe.exports=QKt});var eOe=W((AHr,Qqe)=>{"use strict";var eJt=om(),tJt=["xaxis","yaxis","zaxis"];function Jqe(){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 rJt=Jqe.prototype;rJt.merge=function(e){for(var t=0;t<3;++t){var r=e[tJt[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=eJt(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function iJt(e){var t=new Jqe;return t.merge(e),t}Qqe.exports=iJt});var iOe=W((MHr,rOe)=>{"use strict";rOe.exports=lJt;var tOe=ji(),nJt=it(),aJt=["xaxis","yaxis","zaxis"],oJt=[0,0,0];function sJt(e){for(var t=new Array(3),r=0;r<3;++r){for(var i=e[r],n=new Array(i.length),a=0;a<i.length;++a)n[a]=i[a].x;t[r]=n}return t}function lJt(e){for(var t=e.axesOptions,r=e.glplot.axesPixels,i=e.fullSceneLayout,n=[[],[],[]],a=0;a<3;++a){var o=i[aJt[a]];if(o._length=(r[a].hi-r[a].lo)*r[a].pixelsPerDataUnit/e.dataScale[a],Math.abs(o._length)===1/0||isNaN(o._length))n[a]=[];else{o._input_range=o.range.slice(),o.range[0]=r[a].lo/e.dataScale[a],o.range[1]=r[a].hi/e.dataScale[a],o._m=1/(e.dataScale[a]*r[a].pixelsPerDataUnit),o.range[0]===o.range[1]&&(o.range[0]-=1,o.range[1]+=1);var s=o.tickmode;if(o.tickmode==="auto"){o.tickmode="linear";var l=o.nticks||nJt.constrain(o._length/40,4,9);tOe.autoTicks(o,Math.abs(o.range[1]-o.range[0])/l)}for(var u=tOe.calcTicks(o,{msUTC:!0}),c=0;c<u.length;++c)u[c].x=u[c].x*e.dataScale[a],o.type==="date"&&(u[c].text=u[c].text.replace(/\<br\>/g," "));n[a]=u,o.tickmode=s}}t.ticks=n;for(var a=0;a<3;++a){oJt[a]=.5*(e.glplot.bounds[0][a]+e.glplot.bounds[1][a]);for(var c=0;c<2;++c)t.bounds[c][a]=e.glplot.bounds[c][a]}e.contourLevels=sJt(n)}});var cOe=W((SHr,uOe)=>{"use strict";var oOe=nc().gl_plot3d,uJt=oOe.createCamera,nOe=oOe.createScene,cJt=$qe(),fJt=XD(),wI=yi(),nh=it(),bI=nh.preserveDrawingBuffer(),TI=ji(),fv=Ds(),hJt=om(),dJt=JK(),pJt=d$(),vJt=Kqe(),gJt=eOe(),mJt=iOe(),yJt=Op().applyAutorangeOptions,aE,_I,sOe=!1;function lOe(e,t){var r=document.createElement("div"),i=e.container;this.graphDiv=e.graphDiv;var n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.style.position="absolute",n.style.top=n.style.left="0px",n.style.width=n.style.height="100%",n.style["z-index"]=20,n.style["pointer-events"]="none",r.appendChild(n),this.svgContainer=n,r.id=e.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",i.appendChild(r),this.fullLayout=t,this.id=e.id||"scene",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=vJt(t,t[this.id]),this.spikeOptions=gJt(t[this.id]),this.container=r,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=wI.getComponentMethod("annotations3d","convert"),this.drawAnnotations=wI.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var af=lOe.prototype;af.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:bI,premultipliedAlpha:!0,antialias:!0},container:e.container,axes:e.axesOptions,spikes:e.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:e.camera,pixelRatio:e.pixelRatio};if(e.staticMode){if(!_I&&(aE=document.createElement("canvas"),_I=cJt({canvas:aE,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!_I))throw new Error("error creating static canvas/context for image server");t.gl=_I,t.canvas=aE}return t};var aOe=!0;af.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=nOe(t)}catch(i){if(e.staticMode||!aOe||bI)r=!1;else{nh.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{bI=t.glOptions.preserveDrawingBuffer=!0,e.glplot=nOe(t)}catch(n){bI=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return aOe=!1,r};af.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type==="orthographic";e.camera=uJt(e.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:"orbit"})};af.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return dJt(e);e.traces={},e.make4thDimension();var r=e.graphDiv,i=r.layout,n=function(){var o={};return e.isCameraChanged(i)&&(o[e.id+".camera"]=e.getCamera()),e.isAspectChanged(i)&&(o[e.id+".aspectratio"]=e.glplot.getAspectratio(),i[e.id].aspectmode!=="manual"&&(e.fullSceneLayout.aspectmode=i[e.id].aspectmode=o[e.id+".aspectmode"]="manual")),o},a=function(o){if(o.fullSceneLayout.dragmode!==!1){var s=n();o.saveLayout(i),o.graphDiv.emit("plotly_relayout",s)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener("mouseup",function(){a(e)}),e.glplot.canvas.addEventListener("touchstart",function(){sOe=!0}),e.glplot.canvas.addEventListener("wheel",function(o){if(r._context._scrollZoom.gl3d){if(e.camera._ortho){var s=o.deltaX>o.deltaY?1.1:.9090909090909091,l=e.glplot.getAspectratio();e.glplot.setAspectratio({x:s*l.x,y:s*l.y,z:s*l.z})}a(e)}},fJt?{passive:!1}:!1),e.glplot.canvas.addEventListener("mousemove",function(){if(e.fullSceneLayout.dragmode!==!1&&e.camera.mouseListener.buttons!==0){var o=n();e.graphDiv.emit("plotly_relayouting",o)}}),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",function(o){r&&r.emit&&r.emit("plotly_webglcontextlost",{event:o,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0};af.render=function(){var e=this,t=e.graphDiv,r,i=e.svgContainer,n=e.container.getBoundingClientRect();t._fullLayout._calcInverseTransform(t);var a=t._fullLayout._invScaleX,o=t._fullLayout._invScaleY,s=n.width*a,l=n.height*o;i.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),i.setAttributeNS(null,"width",s),i.setAttributeNS(null,"height",l),mJt(e),e.glplot.axes.update(e.axesOptions);for(var u=Object.keys(e.traces),c=null,f=e.glplot.selection,h=0;h<u.length;++h)r=e.traces[u[h]],r.data.hoverinfo!=="skip"&&r.handlePick(f)&&(c=r),r.setContourLevels&&r.setContourLevels();function d(E,S,C){var k=e.fullSceneLayout[E+"axis"];return k.type!=="log"&&(S=k.d2l(S)),TI.hoverLabelText(k,S,C)}if(c!==null){var p=pJt(e.glplot.cameraParams,f.dataCoordinate);r=c.data;var v=t._fullData[r.index],m=f.index,g={xLabel:d("x",f.traceCoordinate[0],r.xhoverformat),yLabel:d("y",f.traceCoordinate[1],r.yhoverformat),zLabel:d("z",f.traceCoordinate[2],r.zhoverformat)},w=fv.castHoverinfo(v,e.fullLayout,m),b=(w||"").split("+"),_=w&&w==="all";!v.hovertemplate&&!_&&(b.indexOf("x")===-1&&(g.xLabel=void 0),b.indexOf("y")===-1&&(g.yLabel=void 0),b.indexOf("z")===-1&&(g.zLabel=void 0),b.indexOf("text")===-1&&(f.textLabel=void 0),b.indexOf("name")===-1&&(c.name=void 0));var M,x=[];r.type==="cone"||r.type==="streamtube"?(g.uLabel=d("x",f.traceCoordinate[3],r.uhoverformat),(_||b.indexOf("u")!==-1)&&x.push("u: "+g.uLabel),g.vLabel=d("y",f.traceCoordinate[4],r.vhoverformat),(_||b.indexOf("v")!==-1)&&x.push("v: "+g.vLabel),g.wLabel=d("z",f.traceCoordinate[5],r.whoverformat),(_||b.indexOf("w")!==-1)&&x.push("w: "+g.wLabel),g.normLabel=f.traceCoordinate[6].toPrecision(3),(_||b.indexOf("norm")!==-1)&&x.push("norm: "+g.normLabel),r.type==="streamtube"&&(g.divergenceLabel=f.traceCoordinate[7].toPrecision(3),(_||b.indexOf("divergence")!==-1)&&x.push("divergence: "+g.divergenceLabel)),f.textLabel&&x.push(f.textLabel),M=x.join("<br>")):r.type==="isosurface"||r.type==="volume"?(g.valueLabel=TI.hoverLabelText(e._mockAxis,e._mockAxis.d2l(f.traceCoordinate[3]),r.valuehoverformat),x.push("value: "+g.valueLabel),f.textLabel&&x.push(f.textLabel),M=x.join("<br>")):M=f.textLabel;var T={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:v._input,fullData:v,curveNumber:v.index,pointNumber:m};fv.appendArrayPointValue(T,v,m),r._module.eventData&&(T=v._module.eventData(T,f,v,{},m));var A={points:[T]};if(e.fullSceneLayout.hovermode){var y=[];fv.loneHover({trace:v,x:(.5+.5*p[0]/p[3])*s,y:(.5-.5*p[1]/p[3])*l,xLabel:g.xLabel,yLabel:g.yLabel,zLabel:g.zLabel,text:M,name:c.name,color:fv.castHoverOption(v,m,"bgcolor")||c.color,borderColor:fv.castHoverOption(v,m,"bordercolor"),fontFamily:fv.castHoverOption(v,m,"font.family"),fontSize:fv.castHoverOption(v,m,"font.size"),fontColor:fv.castHoverOption(v,m,"font.color"),nameLength:fv.castHoverOption(v,m,"namelength"),textAlign:fv.castHoverOption(v,m,"align"),hovertemplate:nh.castOption(v,m,"hovertemplate"),hovertemplateLabels:nh.extendFlat({},T,g),eventData:[T]},{container:i,gd:t,inOut_bbox:y}),T.bbox=y[0]}f.distance<5&&(f.buttons||sOe)?t.emit("plotly_click",A):t.emit("plotly_hover",A),this.oldEventData=A}else fv.loneUnhover(i),this.oldEventData&&t.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};af.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(t);return}if(!e.initializeGLPlot()){nh.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(t)};var oE=["xaxis","yaxis","zaxis"];function xJt(e,t,r){for(var i=e.fullSceneLayout,n=0;n<3;n++){var a=oE[n],o=a.charAt(0),s=i[a],l=t[o],u=t[o+"calendar"],c=t["_"+o+"length"];if(!nh.isArrayOrTypedArray(l))r[0][n]=Math.min(r[0][n],0),r[1][n]=Math.max(r[1][n],c-1);else for(var f,h=0;h<(c||l.length);h++)if(nh.isArrayOrTypedArray(l[h]))for(var d=0;d<l[h].length;++d)f=s.d2l(l[h][d],0,u),!isNaN(f)&&isFinite(f)&&(r[0][n]=Math.min(r[0][n],f),r[1][n]=Math.max(r[1][n],f));else f=s.d2l(l[h],0,u),!isNaN(f)&&isFinite(f)&&(r[0][n]=Math.min(r[0][n],f),r[1][n]=Math.max(r[1][n],f))}}function _Jt(e,t){for(var r=e.fullSceneLayout,i=r.annotations||[],n=0;n<3;n++)for(var a=oE[n],o=a.charAt(0),s=r[a],l=0;l<i.length;l++){var u=i[l];if(u.visible){var c=s.r2l(u[o]);!isNaN(c)&&isFinite(c)&&(t[0][n]=Math.min(t[0][n],c),t[1][n]=Math.max(t[1][n],c))}}}af.plot=function(e,t,r){var i=this;if(i.plotArgs=[e,t,r],!i.glplot.contextLost){var n,a,o,s,l,u,c=t[i.id],f=r[i.id];i.fullLayout=t,i.fullSceneLayout=c,i.axesOptions.merge(t,c),i.spikeOptions.merge(c),i.setViewport(c),i.updateFx(c.dragmode,c.hovermode),i.camera.enableWheel=i.graphDiv._context._scrollZoom.gl3d,i.glplot.setClearColor(hJt(c.bgcolor)),i.setConvert(l),e?Array.isArray(e)||(e=[e]):e=[];var h=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(o=0;o<e.length;++o)n=e[o],!(n.visible!==!0||n._length===0)&&xJt(this,n,h);_Jt(this,h);var d=[1,1,1];for(s=0;s<3;++s)h[1][s]===h[0][s]?d[s]=1:d[s]=1/(h[1][s]-h[0][s]);for(i.dataScale=d,i.convertAnnotations(this),o=0;o<e.length;++o)n=e[o],!(n.visible!==!0||n._length===0)&&(a=i.traces[n.uid],a?a.data.type===n.type?a.update(n):(a.dispose(),a=n._module.plot(this,n),i.traces[n.uid]=a):(a=n._module.plot(this,n),i.traces[n.uid]=a),a.name=n.name);var p=Object.keys(i.traces);e:for(o=0;o<p.length;++o){for(s=0;s<e.length;++s)if(e[s].uid===p[o]&&e[s].visible===!0&&e[s]._length!==0)continue e;a=i.traces[p[o]],a.dispose(),delete i.traces[p[o]]}i.glplot.objects.sort(function(O,$){return O._trace.data.index-$._trace.data.index});var v=[[0,0,0],[0,0,0]],m=[],g={};for(o=0;o<3;++o){l=c[oE[o]],u=l.type,u in g?(g[u].acc*=d[o],g[u].count+=1):g[u]={acc:d[o],count:1};var w;if(l.autorange){v[0][o]=1/0,v[1][o]=-1/0;var b=i.glplot.objects,_=i.fullSceneLayout.annotations||[],M=l._name.charAt(0);for(s=0;s<b.length;s++){var x=b[s],T=x.bounds,A=x._trace.data._pad||0;x.constructor.name==="ErrorBars"&&l._lowerLogErrorBound?v[0][o]=Math.min(v[0][o],l._lowerLogErrorBound):v[0][o]=Math.min(v[0][o],T[0][o]/d[o]-A),v[1][o]=Math.max(v[1][o],T[1][o]/d[o]+A)}for(s=0;s<_.length;s++){var y=_[s];if(y.visible){var E=l.r2l(y[M]);v[0][o]=Math.min(v[0][o],E),v[1][o]=Math.max(v[1][o],E)}}if("rangemode"in l&&l.rangemode==="tozero"&&(v[0][o]=Math.min(v[0][o],0),v[1][o]=Math.max(v[1][o],0)),v[0][o]>v[1][o])v[0][o]=-1,v[1][o]=1;else{var S=v[1][o]-v[0][o];v[0][o]-=S/32,v[1][o]+=S/32}if(w=[v[0][o],v[1][o]],w=yJt(w,l),v[0][o]=w[0],v[1][o]=w[1],l.isReversed()){var C=v[0][o];v[0][o]=v[1][o],v[1][o]=C}}else w=l.range,v[0][o]=l.r2l(w[0]),v[1][o]=l.r2l(w[1]);v[0][o]===v[1][o]&&(v[0][o]-=1,v[1][o]+=1),m[o]=v[1][o]-v[0][o],l.range=[v[0][o],v[1][o]],l.limitRange(),i.glplot.setBounds(o,{min:l.range[0]*d[o],max:l.range[1]*d[o]})}var k,D=c.aspectmode;if(D==="cube")k=[1,1,1];else if(D==="manual"){var F=c.aspectratio;k=[F.x,F.y,F.z]}else if(D==="auto"||D==="data"){var P=[1,1,1];for(o=0;o<3;++o){l=c[oE[o]],u=l.type;var R=g[u];P[o]=Math.pow(R.acc,1/R.count)/d[o]}D==="data"||Math.max.apply(null,P)/Math.min.apply(null,P)<=4?k=P:k=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");c.aspectratio.x=f.aspectratio.x=k[0],c.aspectratio.y=f.aspectratio.y=k[1],c.aspectratio.z=f.aspectratio.z=k[2],i.glplot.setAspectratio(c.aspectratio),i.viewInitial.aspectratio||(i.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),i.viewInitial.aspectmode||(i.viewInitial.aspectmode=c.aspectmode);var L=c.domain||null,I=t._size||null;if(L&&I){var B=i.container.style;B.position="absolute",B.left=I.l+L.x[0]*I.w+"px",B.top=I.t+(1-L.y[1])*I.h+"px",B.width=I.w*(L.x[1]-L.x[0])+"px",B.height=I.h*(L.y[1]-L.y[0])+"px"}i.glplot.redraw()}};af.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)};function bJt(e){return[[e.eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]}function wJt(e){return{up:{x:e.up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:e._ortho===!0?"orthographic":"perspective"}}}af.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),wJt(e.camera)};af.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,bJt(r)),t.glplot.setAspectratio(e.aspectratio);var i=r.projection.type==="orthographic",n=t.camera._ortho;i!==n&&(t.glplot.redraw(),t.glplot.clearRGBA(),t.glplot.dispose(),t.initializeGLPlot())};af.isCameraChanged=function(e){var t=this,r=t.getCamera(),i=nh.nestedProperty(e,t.id+".camera"),n=i.get();function a(u,c,f,h){var d=["up","center","eye"],p=["x","y","z"];return c[d[f]]&&u[d[f]][p[h]]===c[d[f]][p[h]]}var o=!1;if(n===void 0)o=!0;else{for(var s=0;s<3;s++)for(var l=0;l<3;l++)if(!a(r,n,s,l)){o=!0;break}(!n.projection||r.projection&&r.projection.type!==n.projection.type)&&(o=!0)}return o};af.isAspectChanged=function(e){var t=this,r=t.glplot.getAspectratio(),i=nh.nestedProperty(e,t.id+".aspectratio"),n=i.get();return n===void 0||n.x!==r.x||n.y!==r.y||n.z!==r.z};af.saveLayout=function(e){var t=this,r=t.fullLayout,i,n,a,o,s,l,u=t.isCameraChanged(e),c=t.isAspectChanged(e),f=u||c;if(f){var h={};if(u&&(i=t.getCamera(),n=nh.nestedProperty(e,t.id+".camera"),a=n.get(),h[t.id+".camera"]=a),c&&(o=t.glplot.getAspectratio(),s=nh.nestedProperty(e,t.id+".aspectratio"),l=s.get(),h[t.id+".aspectratio"]=l),wI.call("_storeDirectGUIEdit",e,r._preGUI,h),u){n.set(i);var d=nh.nestedProperty(r,t.id+".camera");d.set(i)}if(c){s.set(o);var p=nh.nestedProperty(r,t.id+".aspectratio");p.set(o),t.glplot.redraw()}}return f};af.updateFx=function(e,t){var r=this,i=r.camera;if(i)if(e==="orbit")i.mode="orbit",i.keyBindingMode="rotate";else if(e==="turntable"){i.up=[0,0,1],i.mode="turntable",i.keyBindingMode="rotate";var n=r.graphDiv,a=n._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,u=o.up.z;if(u/Math.sqrt(s*s+l*l+u*u)<.999){var c=r.id+".camera.up",f={x:0,y:0,z:1},h={};h[c]=f;var d=n.layout;wI.call("_storeDirectGUIEdit",d,a._preGUI,h),o.up=f,nh.nestedProperty(d,c).set(f)}}else i.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function TJt(e,t,r){for(var i=0,n=r-1;i<n;++i,--n)for(var a=0;a<t;++a)for(var o=0;o<4;++o){var s=4*(t*i+a)+o,l=4*(t*n+a)+o,u=e[s];e[s]=e[l],e[l]=u}}function AJt(e,t,r){for(var i=0;i<r;++i)for(var n=0;n<t;++n){var a=4*(t*i+n),o=e[a+3];if(o>0)for(var s=255/o,l=0;l<3;++l)e[a+l]=Math.min(s*e[a+l],255)}}af.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(aE),t.glplot.redraw();var r=t.glplot.gl,i=r.drawingBufferWidth,n=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var a=new Uint8Array(i*n*4);r.readPixels(0,0,i,n,r.RGBA,r.UNSIGNED_BYTE,a),TJt(a,i,n),AJt(a,i,n);var o=document.createElement("canvas");o.width=i,o.height=n;var s=o.getContext("2d",{willReadFrequently:!0}),l=s.createImageData(i,n);l.data.set(a),s.putImageData(l,0,0);var u;switch(e){case"jpeg":u=o.toDataURL("image/jpeg");break;case"webp":u=o.toDataURL("image/webp");break;default:u=o.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(aE),u};af.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[oE[t]];TI.setConvert(r,e.fullLayout),r.setScale=nh.noop}};af.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},TI.setConvert(e._mockAxis,r)};uOe.exports=lOe});var hOe=W((EHr,fOe)=>{"use strict";fOe.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var eJ=W((kHr,dOe)=>{"use strict";var MJt=ni(),Xn=ec(),QK=tn().extendFlat,SJt=ls().overrideAll;dOe.exports=SJt({visible:Xn.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:MJt.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:Xn.color,categoryorder:Xn.categoryorder,categoryarray:Xn.categoryarray,title:{text:Xn.title.text,font:Xn.title.font},type:QK({},Xn.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Xn.autotypenumbers,autorange:Xn.autorange,autorangeoptions:{minallowed:Xn.autorangeoptions.minallowed,maxallowed:Xn.autorangeoptions.maxallowed,clipmin:Xn.autorangeoptions.clipmin,clipmax:Xn.autorangeoptions.clipmax,include:Xn.autorangeoptions.include,editType:"plot"},rangemode:Xn.rangemode,minallowed:Xn.minallowed,maxallowed:Xn.maxallowed,range:QK({},Xn.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:Xn.minor.tickmode,nticks:Xn.nticks,tick0:Xn.tick0,dtick:Xn.dtick,tickvals:Xn.tickvals,ticktext:Xn.ticktext,ticks:Xn.ticks,mirror:Xn.mirror,ticklen:Xn.ticklen,tickwidth:Xn.tickwidth,tickcolor:Xn.tickcolor,showticklabels:Xn.showticklabels,labelalias:Xn.labelalias,tickfont:Xn.tickfont,tickangle:Xn.tickangle,tickprefix:Xn.tickprefix,showtickprefix:Xn.showtickprefix,ticksuffix:Xn.ticksuffix,showticksuffix:Xn.showticksuffix,showexponent:Xn.showexponent,exponentformat:Xn.exponentformat,minexponent:Xn.minexponent,separatethousands:Xn.separatethousands,tickformat:Xn.tickformat,tickformatstops:Xn.tickformatstops,hoverformat:Xn.hoverformat,showline:Xn.showline,linecolor:Xn.linecolor,linewidth:Xn.linewidth,showgrid:Xn.showgrid,gridcolor:QK({},Xn.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:Xn.gridwidth,zeroline:Xn.zeroline,zerolinecolor:Xn.zerolinecolor,zerolinewidth:Xn.zerolinewidth},"plot","from-root")});var nJ=W((CHr,pOe)=>{"use strict";var tJ=eJ(),EJt=us().attributes,rJ=tn().extendFlat,kJt=it().counterRegex;function iJ(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}pOe.exports={_arrayAttrRegexps:[kJt("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:rJ(iJ(0,0,1),{}),center:rJ(iJ(0,0,0),{}),eye:rJ(iJ(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:EJt({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:tJ,yaxis:tJ,zaxis:tJ,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot"}});var yOe=W((DHr,mOe)=>{"use strict";var CJt=ni(),vOe=it(),DJt=Da(),FJt=eJ(),LJt=Kj(),PJt=mM(),gOe=["xaxis","yaxis","zaxis"],IJt=13600/187;mOe.exports=function(t,r,i){var n,a;function o(u,c){return vOe.coerce(n,a,FJt,u,c)}for(var s=0;s<gOe.length;s++){var l=gOe[s];n=t[l]||{},a=DJt.newContainer(r,l),a._id=l[0]+i.scene,a._name=l,LJt(n,a,o,i),PJt(n,a,o,{font:i.font,letter:l[0],data:i.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:i.bgColor,calendar:i.calendar},i.fullLayout),o("gridcolor",CJt.mix(a.color,i.bgColor,IJt)),o("title.text",l[0]),a.setScale=vOe.noop,o("showspikes")&&(o("spikesides"),o("spikethickness"),o("spikecolor",a.color)),o("showaxeslabels"),o("showbackground")&&o("backgroundcolor")}}});var wOe=W((FHr,bOe)=>{"use strict";var RJt=it(),zJt=ni(),BJt=yi(),qJt=q_(),OJt=yOe(),xOe=nJ(),NJt=_c().getSubplotData,_Oe="gl3d";bOe.exports=function(t,r,i){var n=r._basePlotModules.length>1;function a(o){if(!n){var s=RJt.validate(t[o],xOe[o]);if(s)return t[o]}}qJt(t,r,i,{type:_Oe,attributes:xOe,handleDefaults:UJt,fullLayout:r,font:r.font,fullData:i,getDfltFromLayout:a,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function UJt(e,t,r,i){for(var n=r("bgcolor"),a=zJt.combine(n,i.paper_bgcolor),o=["up","center","eye"],s=0;s<o.length;s++)r("camera."+o[s]+".x"),r("camera."+o[s]+".y"),r("camera."+o[s]+".z");r("camera.projection.type");var l=!!r("aspectratio.x")&&!!r("aspectratio.y")&&!!r("aspectratio.z"),u=l?"manual":"auto",c=r("aspectmode",u);l||(e.aspectratio=t.aspectratio={x:1,y:1,z:1},c==="manual"&&(t.aspectmode="auto"),e.aspectmode=t.aspectmode);var f=NJt(i.fullData,_Oe,i.id);OJt(e,t,{font:i.font,scene:i.id,data:f,bgColor:a,calendar:i.calendar,autotypenumbersDflt:i.autotypenumbersDflt,fullLayout:i.fullLayout}),BJt.getComponentMethod("annotations3d","handleDefaults")(e,t,i);var h=i.getDfltFromLayout("dragmode");if(h!==!1&&!h)if(h="orbit",e.camera&&e.camera.up){var d=e.camera.up.x,p=e.camera.up.y,v=e.camera.up.z;v!==0&&(!d||!p||!v||v/Math.sqrt(d*d+p*p+v*v)>.999)&&(h="turntable")}else h="turntable";r("dragmode",h),r("hovermode",i.getDfltFromLayout("hovermode"))}});var w2=W(ah=>{"use strict";var VJt=ls().overrideAll,GJt=sy(),HJt=cOe(),jJt=_c().getSubplotData,$Jt=it(),WJt=sd(),S4="gl3d",aJ="scene";ah.name=S4;ah.attr=aJ;ah.idRoot=aJ;ah.idRegex=ah.attrRegex=$Jt.counterRegex("scene");ah.attributes=hOe();ah.layoutAttributes=nJ();ah.baseLayoutAttrOverrides=VJt({hoverlabel:GJt.hoverlabel},"plot","nested");ah.supplyLayoutDefaults=wOe();ah.plot=function(t){for(var r=t._fullLayout,i=t._fullData,n=r._subplots[S4],a=0;a<n.length;a++){var o=n[a],s=jJt(i,S4,o),l=r[o],u=l.camera,c=l._scene;c||(c=new HJt({id:o,graphDiv:t,container:t.querySelector(".gl-container"),staticPlot:t._context.staticPlot,plotGlPixelRatio:t._context.plotGlPixelRatio,camera:u},r),l._scene=c),c.viewInitial||(c.viewInitial={up:{x:u.up.x,y:u.up.y,z:u.up.z},eye:{x:u.eye.x,y:u.eye.y,z:u.eye.z},center:{x:u.center.x,y:u.center.y,z:u.center.z}}),c.plot(s,r,t.layout)}};ah.clean=function(e,t,r,i){for(var n=i._subplots[S4]||[],a=0;a<n.length;a++){var o=n[a];!t[o]&&i[o]._scene&&(i[o]._scene.destroy(),i._infolayer&&i._infolayer.selectAll(".annotation-"+o).remove())}};ah.toSVG=function(e){for(var t=e._fullLayout,r=t._subplots[S4],i=t._size,n=0;n<r.length;n++){var a=t[r[n]],o=a.domain,s=a._scene,l=s.toImage("png"),u=t._glimages.append("svg:image");u.attr({xmlns:WJt.svg,"xlink:href":l,x:i.l+i.w*o.x[0],y:i.t+i.h*(1-o.y[1]),width:i.w*(o.x[1]-o.x[0]),height:i.h*(o.y[1]-o.y[0]),preserveAspectRatio:"none"}),s.destroy()}};ah.cleanId=function(t){if(t.match(/^scene[0-9]*$/)){var r=t.slice(5);return r==="1"&&(r=""),aJ+r}};ah.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[S4],i=0;i<r.length;i++){var n=t[r[i]]._scene;n.updateFx(t.dragmode,t.hovermode)}}});var AOe=W((PHr,TOe)=>{"use strict";TOe.exports={plot:Pqe(),attributes:ZK(),markerSymbols:yI(),supplyDefaults:Nqe(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:Vqe(),moduleType:"trace",name:"scatter3d",basePlotModule:w2(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var SOe=W((IHr,MOe)=>{"use strict";MOe.exports=AOe()});var sE=W((RHr,COe)=>{"use strict";var EOe=ni(),YJt=Eo(),oJ=_s().axisHoverFormat,{hovertemplateAttrs:XJt,templatefallbackAttrs:ZJt}=Ga(),kOe=Wa(),sJ=tn().extendFlat,KJt=ls().overrideAll;function lJ(e){return{valType:"boolean",dflt:!1}}function uJ(e){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:lJ("x"),y:lJ("y"),z:lJ("z")},color:{valType:"color",dflt:EOe.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:EOe.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var cJ=COe.exports=KJt(sJ({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:XJt(),hovertemplatefallback:ZJt(),xhoverformat:oJ("x"),yhoverformat:oJ("y"),zhoverformat:oJ("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},YJt("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:uJ("x"),y:uJ("y"),z:uJ("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:sJ({},kOe.hoverinfo),showlegend:sJ({},kOe.showlegend,{dflt:!1})}),"calc","nested");cJ.x.editType=cJ.y.editType=cJ.z.editType="calc+clearAxisTypes"});var hJ=W((zHr,LOe)=>{"use strict";var JJt=yi(),DOe=it(),QJt=Fu(),eQt=sE(),fJ=.1;function tQt(e,t){for(var r=[],i=32,n=0;n<i;n++){var a=n/(i-1),o=t+(1-t)*(1-Math.pow(Math.sin(e*a*Math.PI),2));r.push([a,Math.max(0,Math.min(1,o))])}return r}function rQt(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||+e[0][0]!=0||+e[e.length-1][0]!=1)return!1;for(var r=0;r<e.length;r++){var i=e[r];if(i.length!==2||+i[0]<t)return!1;t=+i[0]}return!0}function iQt(e,t,r,i){var n,a;function o(m,g){return DOe.coerce(e,t,eQt,m,g)}var s=o("x"),l=o("y"),u=o("z");if(!u||!u.length||s&&s.length<1||l&&l.length<1){t.visible=!1;return}t._xlength=Array.isArray(s)&&DOe.isArrayOrTypedArray(s[0])?u.length:u[0].length,t._ylength=u.length;var c=JJt.getComponentMethod("calendars","handleTraceDefaults");c(e,t,["x","y","z"],i),o("text"),o("hovertext"),o("hovertemplate"),o("hovertemplatefallback"),o("xhoverformat"),o("yhoverformat"),o("zhoverformat"),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lightposition.x","lightposition.y","lightposition.z","hidesurface","connectgaps","opacity"].forEach(function(m){o(m)});var f=o("surfacecolor"),h=["x","y","z"];for(n=0;n<3;++n){var d="contours."+h[n],p=o(d+".show"),v=o(d+".highlight");if(p||v)for(a=0;a<3;++a)o(d+".project."+h[a]);p&&(o(d+".color"),o(d+".width"),o(d+".usecolormap")),v&&(o(d+".highlightcolor"),o(d+".highlightwidth")),o(d+".start"),o(d+".end"),o(d+".size")}QJt(e,t,i,o,{prefix:"",cLetter:"c"}),FOe(e,t,i,o),t._length=null}function FOe(e,t,r,i){var n=i("opacityscale");n==="max"?t.opacityscale=[[0,fJ],[1,1]]:n==="min"?t.opacityscale=[[0,1],[1,fJ]]:n==="extremes"?t.opacityscale=tQt(1,fJ):rQt(n)||(t.opacityscale=void 0)}LOe.exports={supplyDefaults:iQt,opacityscaleDefaults:FOe}});var ROe=W((BHr,IOe)=>{"use strict";var POe=Zc();IOe.exports=function(t,r){r.surfacecolor?POe(t,r,{vals:r.surfacecolor,containerStr:"",cLetter:"c"}):POe(t,r,{vals:r.z,containerStr:"",cLetter:"c"})}});var UOe=W((qHr,NOe)=>{"use strict";var nQt=nc().gl_surface3d,E4=nc().ndarray,aQt=nc().ndarray_linear_interpolate.d2,oQt=_L(),sQt=bL(),lE=it().isArrayOrTypedArray,lQt=sm().parseColorScale,zOe=om(),uQt=Jo().extractOpts;function qOe(e,t,r){this.scene=e,this.uid=r,this.surface=t,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var hv=qOe.prototype;hv.getXat=function(e,t,r,i){var n=lE(this.data.x)?lE(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?n:i.d2l(n,0,r)};hv.getYat=function(e,t,r,i){var n=lE(this.data.y)?lE(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?n:i.d2l(n,0,r)};hv.getZat=function(e,t,r,i){var n=this.data.z[t][e];return n===null&&this.data.connectgaps&&this.data._interpolatedZ&&(n=this.data._interpolatedZ[t][e]),r===void 0?n:i.d2l(n,0,r)};hv.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,r=(e.data.index[1]-1)/this.dataScaleY-1,i=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),n=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[i,n],e.traceCoordinate=[this.getXat(i,n),this.getYat(i,n),this.getZat(i,n)],e.dataCoordinate=[this.getXat(i,n,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(i,n,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(i,n,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=e.dataCoordinate[a];o!=null&&(e.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return lE(s)&&s[n]&&s[n][i]!==void 0?e.textLabel=s[n][i]:s?e.textLabel=s:e.textLabel="",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};function cQt(e){var t=e[0].rgb,r=e[e.length-1].rgb;return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]&&t[3]===r[3]}var k4=[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 fQt(e,t){if(e<t)return 0;for(var r=0;Math.floor(e%t)===0;)e/=t,r++;return r}function dJ(e){for(var t=[],r=0;r<k4.length;r++){var i=k4[r];t.push(fQt(e,i))}return t}function hQt(e){for(var t=dJ(e),r=e,i=0;i<k4.length;i++)if(t[i]>0){r=k4[i];break}return r}function dQt(e,t){if(!(e<1||t<1)){for(var r=dJ(e),i=dJ(t),n=1,a=0;a<k4.length;a++)n*=Math.pow(k4[a],Math.max(r[a],i[a]));return n}}function pQt(e){if(e.length!==0){for(var t=1,r=0;r<e.length;r++)t=dQt(t,e[r]);return t}}hv.calcXnums=function(e){var t,r=[];for(t=1;t<e;t++){var i=this.getXat(t-1,0),n=this.getXat(t,0);n!==i&&i!==void 0&&i!==null&&n!==void 0&&n!==null?r[t-1]=Math.abs(n-i):r[t-1]=0}var a=0;for(t=1;t<e;t++)a+=r[t-1];for(t=1;t<e;t++)r[t-1]===0?r[t-1]=1:r[t-1]=Math.round(a/r[t-1]);return r};hv.calcYnums=function(e){var t,r=[];for(t=1;t<e;t++){var i=this.getYat(0,t-1),n=this.getYat(0,t);n!==i&&i!==void 0&&i!==null&&n!==void 0&&n!==null?r[t-1]=Math.abs(n-i):r[t-1]=0}var a=0;for(t=1;t<e;t++)a+=r[t-1];for(t=1;t<e;t++)r[t-1]===0?r[t-1]=1:r[t-1]=Math.round(a/r[t-1]);return r};var OOe=[1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260],BOe=OOe[9],AI=OOe[13];hv.estimateScale=function(e,t){for(var r=t===0?this.calcXnums(e):this.calcYnums(e),i=1+pQt(r);i<BOe;)i*=2;for(;i>AI;)i--,i/=hQt(i),i++,i<BOe&&(i=AI);var n=Math.round(i/e);return n>1?n:1};function vQt(e,t,r){var i=r[8]+r[2]*t[0]+r[5]*t[1];return e[0]=(r[6]+r[0]*t[0]+r[3]*t[1])/i,e[1]=(r[7]+r[1]*t[0]+r[4]*t[1])/i,e}function gQt(e,t,r){return mQt(e,t,vQt,r),e}function mQt(e,t,r,i){for(var n=[0,0],a=e.shape[0],o=e.shape[1],s=0;s<a;s++)for(var l=0;l<o;l++)r(n,[s,l],i),e.set(s,l,aQt(t,n[0],n[1]));return e}hv.refineCoords=function(e){for(var t=this.dataScaleX,r=this.dataScaleY,i=e[0].shape[0],n=e[0].shape[1],a=Math.floor(e[0].shape[0]*t+1)|0,o=Math.floor(e[0].shape[1]*r+1)|0,s=1+i+1,l=1+n+1,u=E4(new Float32Array(s*l),[s,l]),c=[1/t,0,0,0,1/r,0,0,0,1],f=0;f<e.length;++f){this.surface.padField(u,e[f]);var h=E4(new Float32Array(a*o),[a,o]);gQt(h,u,c),e[f]=h}};function yQt(e,t){for(var r=!1,i=0;i<e.length;i++)if(t===e[i]){r=!0;break}r===!1&&e.push(t)}hv.setContourLevels=function(){var e=[[],[],[]],t=[!1,!1,!1],r=!1,i,n,a;for(i=0;i<3;++i)if(this.showContour[i]&&(r=!0,this.contourSize[i]>0&&this.contourStart[i]!==null&&this.contourEnd[i]!==null&&this.contourEnd[i]>this.contourStart[i]))for(t[i]=!0,n=this.contourStart[i];n<this.contourEnd[i];n+=this.contourSize[i])a=n*this.scene.dataScale[i],yQt(e[i],a);if(r){var o=[[],[],[]];for(i=0;i<3;++i)this.showContour[i]&&(o[i]=t[i]?e[i]:this.scene.contourLevels[i]);this.surface.update({levels:o})}};hv.update=function(e){var t=this.scene,r=t.fullSceneLayout,i=this.surface,n=lQt(e),a=t.dataScale,o=e.z[0].length,s=e._ylength,l=t.contourLevels;this.data=e;var u,c,f,h,d=[];for(u=0;u<3;u++)for(d[u]=[],c=0;c<o;c++)d[u][c]=[];for(c=0;c<o;c++)for(f=0;f<s;f++)d[0][c][f]=this.getXat(c,f,e.xcalendar,r.xaxis),d[1][c][f]=this.getYat(c,f,e.ycalendar,r.yaxis),d[2][c][f]=this.getZat(c,f,e.zcalendar,r.zaxis);if(e.connectgaps)for(e._emptypoints=sQt(d[2]),oQt(d[2],e._emptypoints),e._interpolatedZ=[],c=0;c<o;c++)for(e._interpolatedZ[c]=[],f=0;f<s;f++)e._interpolatedZ[c][f]=d[2][c][f];for(u=0;u<3;u++)for(c=0;c<o;c++)for(f=0;f<s;f++)h=d[u][c][f],h==null?d[u][c][f]=NaN:h=d[u][c][f]*=a[u];for(u=0;u<3;u++)for(c=0;c<o;c++)for(f=0;f<s;f++)h=d[u][c][f],h!=null&&(this.minValues[u]>h&&(this.minValues[u]=h),this.maxValues[u]<h&&(this.maxValues[u]=h));for(u=0;u<3;u++)this.objectOffset[u]=.5*(this.minValues[u]+this.maxValues[u]);for(u=0;u<3;u++)for(c=0;c<o;c++)for(f=0;f<s;f++)h=d[u][c][f],h!=null&&(d[u][c][f]-=this.objectOffset[u]);var p=[E4(new Float32Array(o*s),[o,s]),E4(new Float32Array(o*s),[o,s]),E4(new Float32Array(o*s),[o,s])];for(u=0;u<3;u++)for(c=0;c<o;c++)for(f=0;f<s;f++)p[u].set(c,f,d[u][c][f]);d=[];var v={colormap:n,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!e.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:e.opacityscale,opacity:e.opacity},m=uQt(e);if(v.intensityBounds=[m.min,m.max],e.surfacecolor){var g=E4(new Float32Array(o*s),[o,s]);for(c=0;c<o;c++)for(f=0;f<s;f++)g.set(c,f,e.surfacecolor[f][c]);p.push(g)}else v.intensityBounds[0]*=a[2],v.intensityBounds[1]*=a[2];(AI<p[0].shape[0]||AI<p[0].shape[1])&&(this.refineData=!1),this.refineData===!0&&(this.dataScaleX=this.estimateScale(p[0].shape[0],0),this.dataScaleY=this.estimateScale(p[0].shape[1],1),(this.dataScaleX!==1||this.dataScaleY!==1)&&this.refineCoords(p)),e.surfacecolor&&(v.intensity=p.pop());var w=[!0,!0,!0],b=["x","y","z"];for(u=0;u<3;++u){var _=e.contours[b[u]];w[u]=_.highlight,v.showContour[u]=_.show||_.highlight,v.showContour[u]&&(v.contourProject[u]=[_.project.x,_.project.y,_.project.z],_.show?(this.showContour[u]=!0,v.levels[u]=l[u],i.highlightColor[u]=v.contourColor[u]=zOe(_.color),_.usecolormap?i.highlightTint[u]=v.contourTint[u]=0:i.highlightTint[u]=v.contourTint[u]=1,v.contourWidth[u]=_.width,this.contourStart[u]=_.start,this.contourEnd[u]=_.end,this.contourSize[u]=_.size):(this.showContour[u]=!1,this.contourStart[u]=null,this.contourEnd[u]=null,this.contourSize[u]=0),_.highlight&&(v.dynamicColor[u]=zOe(_.highlightcolor),v.dynamicWidth[u]=_.highlightwidth))}cQt(n)&&(v.vertexColor=!0),v.objectOffset=this.objectOffset,v.coords=p,i.update(v),i.visible=e.visible,i.enableDynamic=w,i.enableHighlight=w,i.snapToData=!0,"lighting"in e&&(i.ambientLight=e.lighting.ambient,i.diffuseLight=e.lighting.diffuse,i.specularLight=e.lighting.specular,i.roughness=e.lighting.roughness,i.fresnel=e.lighting.fresnel),"lightposition"in e&&(i.lightPosition=[e.lightposition.x,e.lightposition.y,e.lightposition.z])};hv.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()};function xQt(e,t){var r=e.glplot.gl,i=nQt({gl:r}),n=new qOe(e,i,t.uid);return i._trace=n,n.update(t),e.glplot.add(i),n}NOe.exports=xQt});var GOe=W((OHr,VOe)=>{"use strict";VOe.exports={attributes:sE(),supplyDefaults:hJ().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:ROe(),plot:UOe(),moduleType:"trace",name:"surface",basePlotModule:w2(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var jOe=W((NHr,HOe)=>{"use strict";HOe.exports=GOe()});var C4=W((UHr,WOe)=>{"use strict";var _Qt=Eo(),pJ=_s().axisHoverFormat,{hovertemplateAttrs:bQt,templatefallbackAttrs:wQt}=Ga(),T2=sE(),$Oe=Wa(),A2=tn().extendFlat;WOe.exports=A2({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:bQt({editType:"calc"}),hovertemplatefallback:wQt({editType:"calc"}),xhoverformat:pJ("x"),yhoverformat:pJ("y"),zhoverformat:pJ("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"}},_Qt("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:T2.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:A2({},T2.contours.x.show,{}),color:T2.contours.x.color,width:T2.contours.x.width,editType:"calc"},lightposition:{x:A2({},T2.lightposition.x,{dflt:1e5}),y:A2({},T2.lightposition.y,{dflt:1e5}),z:A2({},T2.lightposition.z,{dflt:0}),editType:"calc"},lighting:A2({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"},T2.lighting),hoverinfo:A2({},$Oe.hoverinfo,{editType:"calc"}),showlegend:A2({},$Oe.showlegend,{dflt:!1})})});var SI=W((VHr,XOe)=>{"use strict";var TQt=Eo(),MI=_s().axisHoverFormat,{hovertemplateAttrs:AQt,templatefallbackAttrs:MQt}=Ga(),uE=C4(),YOe=Wa(),vJ=tn().extendFlat,SQt=ls().overrideAll;function gJ(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function mJ(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var D4=XOe.exports=SQt(vJ({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:gJ("x"),y:gJ("y"),z:gJ("z")},caps:{x:mJ("x"),y:mJ("y"),z:mJ("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:AQt(),hovertemplatefallback:MQt(),xhoverformat:MI("x"),yhoverformat:MI("y"),zhoverformat:MI("z"),valuehoverformat:MI("value",1),showlegend:vJ({},YOe.showlegend,{dflt:!1})},TQt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:uE.opacity,lightposition:uE.lightposition,lighting:uE.lighting,flatshading:uE.flatshading,contour:uE.contour,hoverinfo:vJ({},YOe.hoverinfo)}),"calc","nested");D4.flatshading.dflt=!0;D4.lighting.facenormalsepsilon.dflt=0;D4.x.editType=D4.y.editType=D4.z.editType=D4.value.editType="calc+clearAxisTypes"});var yJ=W((GHr,KOe)=>{"use strict";var EQt=it(),kQt=yi(),CQt=SI(),DQt=Fu();function FQt(e,t,r,i){function n(a,o){return EQt.coerce(e,t,CQt,a,o)}ZOe(e,t,r,i,n)}function ZOe(e,t,r,i,n){var a=n("isomin"),o=n("isomax");o!=null&&a!==void 0&&a!==null&&a>o&&(t.isomin=null,t.isomax=null);var s=n("x"),l=n("y"),u=n("z"),c=n("value");if(!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length){t.visible=!1;return}var f=kQt.getComponentMethod("calendars","handleTraceDefaults");f(e,t,["x","y","z"],i),n("valuehoverformat"),["x","y","z"].forEach(function(v){n(v+"hoverformat");var m="caps."+v,g=n(m+".show");g&&n(m+".fill");var w="slices."+v,b=n(w+".show");b&&(n(w+".fill"),n(w+".locations"))});var h=n("spaceframe.show");h&&n("spaceframe.fill");var d=n("surface.show");d&&(n("surface.count"),n("surface.fill"),n("surface.pattern"));var p=n("contour.show");p&&(n("contour.color"),n("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(v){n(v)}),DQt(e,t,i,n,{prefix:"",cLetter:"c"}),t._length=null}KOe.exports={supplyDefaults:FQt,supplyIsoDefaults:ZOe}});var EI=W((HHr,QOe)=>{"use strict";var _J=it(),LQt=Zc();function PQt(e,t){t._len=Math.min(t.u.length,t.v.length,t.w.length,t.x.length,t.y.length,t.z.length),t._u=z1(t.u,t._len),t._v=z1(t.v,t._len),t._w=z1(t.w,t._len),t._x=z1(t.x,t._len),t._y=z1(t.y,t._len),t._z=z1(t.z,t._len);var r=JOe(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;var i=0,n,a,o;t.starts&&(n=z1(t.starts.x||[]),a=z1(t.starts.y||[]),o=z1(t.starts.z||[]),i=Math.min(n.length,a.length,o.length)),t._startsX=n||[],t._startsY=a||[],t._startsZ=o||[];var s=0,l=1/0,u;for(u=0;u<t._len;u++){var c=t._u[u],f=t._v[u],h=t._w[u],d=Math.sqrt(c*c+f*f+h*h);s=Math.max(s,d),l=Math.min(l,d)}for(LQt(e,t,{vals:[l,s],containerStr:"",cLetter:"c"}),u=0;u<i;u++){var p=n[u];r.xMax=Math.max(r.xMax,p),r.xMin=Math.min(r.xMin,p);var v=a[u];r.yMax=Math.max(r.yMax,v),r.yMin=Math.min(r.yMin,v);var m=o[u];r.zMax=Math.max(r.zMax,m),r.zMin=Math.min(r.zMin,m)}t._slen=i,t._normMax=s,t._xbnds=[r.xMin,r.xMax],t._ybnds=[r.yMin,r.yMax],t._zbnds=[r.zMin,r.zMax]}function JOe(e){var t=e._x,r=e._y,i=e._z,n=e._len,a,o,s,l=-1/0,u=1/0,c=-1/0,f=1/0,h=-1/0,d=1/0,p="",v,m,g,w,b,_,M,x,T;for(n&&(w=t[0],_=r[0],x=i[0]),n>1&&(b=t[n-1],M=r[n-1],T=i[n-1]),a=0;a<n;a++)l=Math.max(l,t[a]),u=Math.min(u,t[a]),c=Math.max(c,r[a]),f=Math.min(f,r[a]),h=Math.max(h,i[a]),d=Math.min(d,i[a]),!v&&t[a]!==w&&(v=!0,p+="x"),!m&&r[a]!==_&&(m=!0,p+="y"),!g&&i[a]!==x&&(g=!0,p+="z");v||(p+="x"),m||(p+="y"),g||(p+="z");var A=xJ(e._x),y=xJ(e._y),E=xJ(e._z);p=p.replace("x",(w>b?"-":"+")+"x"),p=p.replace("y",(_>M?"-":"+")+"y"),p=p.replace("z",(x>T?"-":"+")+"z");var S=function(){n=0,A=[],y=[],E=[]};(!n||n<A.length*y.length*E.length)&&S();var C=function(X){return X==="x"?t:X==="y"?r:i},k=function(X){return X==="x"?A:X==="y"?y:E},D=function(X){return X[n-1]<X[0]?-1:1},F=C(p[1]),P=C(p[3]),R=C(p[5]),L=k(p[1]).length,I=k(p[3]).length,B=k(p[5]).length,O=!1,$=function(X,H,G){return L*(I*X+H)+G},Y=D(C(p[1])),K=D(C(p[3])),j=D(C(p[5]));for(a=0;a<B-1;a++){for(o=0;o<I-1;o++){for(s=0;s<L-1;s++){var q=$(a,o,s),J=$(a,o,s+1),U=$(a,o+1,s),V=$(a+1,o,s);if((!(F[q]*Y<F[J]*Y)||!(P[q]*K<P[U]*K)||!(R[q]*j<R[V]*j))&&(O=!0),O)break}if(O)break}if(O)break}return O&&(_J.warn("Encountered arbitrary coordinates! Unable to input data grid."),S()),{xMin:u,yMin:f,zMin:d,xMax:l,yMax:c,zMax:h,Xs:A,Ys:y,Zs:E,len:n,fill:p}}function xJ(e){return _J.distinctVals(e).vals}function z1(e,t){if(t===void 0&&(t=e.length),_J.isTypedArray(e))return e.subarray(0,t);for(var r=[],i=0;i<t;i++)r[i]=+e[i];return r}QOe.exports={calc:PQt,filter:z1,processGrid:JOe}});var bJ=W((jHr,eNe)=>{"use strict";var IQt=Zc(),RQt=EI().processGrid,kI=EI().filter;eNe.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=kI(r.x,r._len),r._y=kI(r.y,r._len),r._z=kI(r.z,r._len),r._value=kI(r.value,r._len);var i=RQt(r);r._gridFill=i.fill,r._Xs=i.Xs,r._Ys=i.Ys,r._Zs=i.Zs,r._len=i.len;for(var n=1/0,a=-1/0,o=0;o<r._len;o++){var s=r._value[o];n=Math.min(n,s),a=Math.max(a,s)}r._minValues=n,r._maxValues=a,r._vMin=r.isomin===void 0||r.isomin===null?n:r.isomin,r._vMax=r.isomax===void 0||r.isomax===null?a:r.isomax,IQt(t,r,{vals:[r._vMin,r._vMax],containerStr:"",cLetter:"c"})}});var F4=W(($Hr,tNe)=>{"use strict";tNe.exports=function(t,r,i,n){n=n||t.length;for(var a=new Array(n),o=0;o<n;o++)a[o]=[t[o],r[o],i[o]];return a}});var CI=W((WHr,aNe)=>{"use strict";var zQt=nc().gl_mesh3d,BQt=sm().parseColorScale,qQt=it().isArrayOrTypedArray,OQt=om(),NQt=Jo().extractOpts,rNe=F4(),cE=function(e,t){for(var r=t.length-1;r>0;r--){var i=Math.min(t[r],t[r-1]),n=Math.max(t[r],t[r-1]);if(n>i&&i<e&&e<=n)return{id:r,distRatio:(n-e)/(n-i)}}return{id:0,distRatio:0}};function iNe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var wJ=iNe.prototype;wJ.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],i=this.data._meshY[t],n=this.data._meshZ[t],a=this.data._Ys.length,o=this.data._Zs.length,s=cE(r,this.data._Xs).id,l=cE(i,this.data._Ys).id,u=cE(n,this.data._Zs).id,c=e.index=u+o*l+o*a*s;e.traceCoordinate=[this.data._meshX[c],this.data._meshY[c],this.data._meshZ[c],this.data._value[c]];var f=this.data.hovertext||this.data.text;return qQt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};wJ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=nNe(e);function i(l,u,c,f){return u.map(function(h){return l.d2l(h,0,f)*c})}var n=rNe(i(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),i(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),i(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),a=rNe(e._meshI,e._meshJ,e._meshK),o={positions:n,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:OQt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=NQt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=BQt(e),this.mesh.update(o)};wJ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};var UQt=["xyz","xzy","yxz","yzx","zxy","zyx"];function nNe(e){e._meshI=[],e._meshJ=[],e._meshK=[];var t=e.surface.show,r=e.spaceframe.show,i=e.surface.fill,n=e.spaceframe.fill,a=!1,o=!1,s=0,l,u,c=e._Xs,f=e._Ys,h=e._Zs,d=c.length,p=f.length,v=h.length,m=UQt.indexOf(e._gridFill.replace(/-/g,"").replace(/\+/g,"")),g=function(we,Fe,Se){switch(m){case 5:return Se+v*Fe+v*p*we;case 4:return Se+v*we+v*d*Fe;case 3:return Fe+p*Se+p*v*we;case 2:return Fe+p*we+p*d*Se;case 1:return we+d*Se+d*v*Fe;default:return we+d*Fe+d*p*Se}},w=e._minValues,b=e._maxValues,_=e._vMin,M=e._vMax,x,T,A,y;function E(we,Fe,Se){for(var ke=y.length,_e=u;_e<ke;_e++)if(we===x[_e]&&Fe===T[_e]&&Se===A[_e])return _e;return-1}function S(){u=l}function C(){x=[],T=[],A=[],y=[],l=0,S()}function k(we,Fe,Se,ke){return x.push(we),T.push(Fe),A.push(Se),y.push(ke),l++,l-1}function D(we,Fe,Se){return e._meshI.push(we),e._meshJ.push(Fe),e._meshK.push(Se),s++,s-1}function F(we,Fe,Se){for(var ke=[],_e=0;_e<we.length;_e++)ke[_e]=(we[_e]+Fe[_e]+Se[_e])/3;return ke}function P(we,Fe,Se){for(var ke=[],_e=0;_e<we.length;_e++)ke[_e]=we[_e]*(1-Se)+Se*Fe[_e];return ke}var R;function L(we){R=we}function I(we,Fe){var Se=we[0],ke=we[1],_e=we[2],Ie=F(Se,ke,_e),Oe=Math.sqrt(1-R),Qe=P(Ie,Se,Oe),et=P(Ie,ke,Oe),_t=P(Ie,_e,Oe),ut=Fe[0],vt=Fe[1],Xe=Fe[2];return{xyzv:[[Se,ke,et],[et,Qe,Se],[ke,_e,_t],[_t,et,ke],[_e,Se,Qe],[Qe,_t,_e]],abc:[[ut,vt,-1],[-1,-1,ut],[vt,Xe,-1],[-1,-1,vt],[Xe,ut,-1],[-1,-1,Xe]]}}function B(we,Fe){return we==="all"||we===null?!0:we.indexOf(Fe)>-1}function O(we,Fe){return we===null?Fe:we}function $(we,Fe,Se){S();var ke=[Fe],_e=[Se];if(R>=1)ke=[Fe],_e=[Se];else if(R>0){var Ie=I(Fe,Se);ke=Ie.xyzv,_e=Ie.abc}for(var Oe=0;Oe<ke.length;Oe++){Fe=ke[Oe],Se=_e[Oe];for(var Qe=[],et=0;et<3;et++){var _t=Fe[et][0],ut=Fe[et][1],vt=Fe[et][2],Xe=Fe[et][3],mt=Se[et]>-1?Se[et]:E(_t,ut,vt);mt>-1?Qe[et]=mt:Qe[et]=k(_t,ut,vt,O(we,Xe))}D(Qe[0],Qe[1],Qe[2])}}function Y(we,Fe,Se){var ke=function(_e,Ie,Oe){$(we,[Fe[_e],Fe[Ie],Fe[Oe]],[Se[_e],Se[Ie],Se[Oe]])};ke(0,1,2),ke(2,3,0)}function K(we,Fe,Se){var ke=function(_e,Ie,Oe){$(we,[Fe[_e],Fe[Ie],Fe[Oe]],[Se[_e],Se[Ie],Se[Oe]])};ke(0,1,2),ke(3,0,1),ke(2,3,0),ke(1,2,3)}function j(we,Fe,Se,ke){var _e=we[3];_e<Se&&(_e=Se),_e>ke&&(_e=ke);for(var Ie=(we[3]-_e)/(we[3]-Fe[3]+1e-9),Oe=[],Qe=0;Qe<4;Qe++)Oe[Qe]=(1-Ie)*we[Qe]+Ie*Fe[Qe];return Oe}function q(we,Fe,Se){return we>=Fe&&we<=Se}function J(we){var Fe=.001*(M-_);return we>=_-Fe&&we<=M+Fe}function U(we){for(var Fe=[],Se=0;Se<4;Se++){var ke=we[Se];Fe.push([e._x[ke],e._y[ke],e._z[ke],e._value[ke]])}return Fe}var V=3;function X(we,Fe,Se,ke,_e,Ie){Ie||(Ie=1),Se=[-1,-1,-1];var Oe=!1,Qe=[q(Fe[0][3],ke,_e),q(Fe[1][3],ke,_e),q(Fe[2][3],ke,_e)];if(!Qe[0]&&!Qe[1]&&!Qe[2])return!1;var et=function(ut,vt,Xe){return J(vt[0][3])&&J(vt[1][3])&&J(vt[2][3])?($(ut,vt,Xe),!0):Ie<V?X(ut,vt,Xe,_,M,++Ie):!1};if(Qe[0]&&Qe[1]&&Qe[2])return et(we,Fe,Se)||Oe;var _t=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(ut){if(Qe[ut[0]]&&Qe[ut[1]]&&!Qe[ut[2]]){var vt=Fe[ut[0]],Xe=Fe[ut[1]],mt=Fe[ut[2]],bt=j(mt,vt,ke,_e),Ne=j(mt,Xe,ke,_e);Oe=et(we,[Ne,bt,vt],[-1,-1,Se[ut[0]]])||Oe,Oe=et(we,[vt,Xe,Ne],[Se[ut[0]],Se[ut[1]],-1])||Oe,_t=!0}}),_t||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(ut){if(Qe[ut[0]]&&!Qe[ut[1]]&&!Qe[ut[2]]){var vt=Fe[ut[0]],Xe=Fe[ut[1]],mt=Fe[ut[2]],bt=j(Xe,vt,ke,_e),Ne=j(mt,vt,ke,_e);Oe=et(we,[Ne,bt,vt],[-1,-1,Se[ut[0]]])||Oe,_t=!0}}),Oe}function H(we,Fe,Se,ke){var _e=!1,Ie=U(Fe),Oe=[q(Ie[0][3],Se,ke),q(Ie[1][3],Se,ke),q(Ie[2][3],Se,ke),q(Ie[3][3],Se,ke)];if(!Oe[0]&&!Oe[1]&&!Oe[2]&&!Oe[3])return _e;if(Oe[0]&&Oe[1]&&Oe[2]&&Oe[3])return o&&(_e=K(we,Ie,Fe)||_e),_e;var Qe=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(et){if(Oe[et[0]]&&Oe[et[1]]&&Oe[et[2]]&&!Oe[et[3]]){var _t=Ie[et[0]],ut=Ie[et[1]],vt=Ie[et[2]],Xe=Ie[et[3]];if(o)_e=$(we,[_t,ut,vt],[Fe[et[0]],Fe[et[1]],Fe[et[2]]])||_e;else{var mt=j(Xe,_t,Se,ke),bt=j(Xe,ut,Se,ke),Ne=j(Xe,vt,Se,ke);_e=$(null,[mt,bt,Ne],[-1,-1,-1])||_e}Qe=!0}}),Qe||([[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(et){if(Oe[et[0]]&&Oe[et[1]]&&!Oe[et[2]]&&!Oe[et[3]]){var _t=Ie[et[0]],ut=Ie[et[1]],vt=Ie[et[2]],Xe=Ie[et[3]],mt=j(vt,_t,Se,ke),bt=j(vt,ut,Se,ke),Ne=j(Xe,ut,Se,ke),Ue=j(Xe,_t,Se,ke);o?(_e=$(we,[_t,Ue,mt],[Fe[et[0]],-1,-1])||_e,_e=$(we,[ut,bt,Ne],[Fe[et[1]],-1,-1])||_e):_e=Y(null,[mt,bt,Ne,Ue],[-1,-1,-1,-1])||_e,Qe=!0}}),Qe)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(et){if(Oe[et[0]]&&!Oe[et[1]]&&!Oe[et[2]]&&!Oe[et[3]]){var _t=Ie[et[0]],ut=Ie[et[1]],vt=Ie[et[2]],Xe=Ie[et[3]],mt=j(ut,_t,Se,ke),bt=j(vt,_t,Se,ke),Ne=j(Xe,_t,Se,ke);o?(_e=$(we,[_t,mt,bt],[Fe[et[0]],-1,-1])||_e,_e=$(we,[_t,bt,Ne],[Fe[et[0]],-1,-1])||_e,_e=$(we,[_t,Ne,mt],[Fe[et[0]],-1,-1])||_e):_e=$(null,[mt,bt,Ne],[-1,-1,-1])||_e,Qe=!0}}),_e}function G(we,Fe,Se,ke,_e,Ie,Oe,Qe,et,_t,ut){var vt=!1;return a&&(B(we,"A")&&(vt=H(null,[Fe,Se,ke,Ie],_t,ut)||vt),B(we,"B")&&(vt=H(null,[Se,ke,_e,et],_t,ut)||vt),B(we,"C")&&(vt=H(null,[Se,Ie,Oe,et],_t,ut)||vt),B(we,"D")&&(vt=H(null,[ke,Ie,Qe,et],_t,ut)||vt),B(we,"E")&&(vt=H(null,[Se,ke,Ie,et],_t,ut)||vt)),o&&(vt=H(we,[Se,ke,Ie,et],_t,ut)||vt),vt}function Q(we,Fe,Se,ke,_e,Ie,Oe,Qe){return[Qe[0]===!0?!0:X(we,U([Fe,Se,ke]),[Fe,Se,ke],Ie,Oe),Qe[1]===!0?!0:X(we,U([ke,_e,Fe]),[ke,_e,Fe],Ie,Oe)]}function te(we,Fe,Se,ke,_e,Ie,Oe,Qe,et){return Qe?Q(we,Fe,Se,_e,ke,Ie,Oe,et):Q(we,Se,_e,ke,Fe,Ie,Oe,et)}function ce(we,Fe,Se,ke,_e,Ie,Oe){var Qe=!1,et,_t,ut,vt,Xe=function(){Qe=X(we,[et,_t,ut],[-1,-1,-1],_e,Ie)||Qe,Qe=X(we,[ut,vt,et],[-1,-1,-1],_e,Ie)||Qe},mt=Oe[0],bt=Oe[1],Ne=Oe[2];return mt&&(et=P(U([g(Fe,Se-0,ke-0)])[0],U([g(Fe-1,Se-0,ke-0)])[0],mt),_t=P(U([g(Fe,Se-0,ke-1)])[0],U([g(Fe-1,Se-0,ke-1)])[0],mt),ut=P(U([g(Fe,Se-1,ke-1)])[0],U([g(Fe-1,Se-1,ke-1)])[0],mt),vt=P(U([g(Fe,Se-1,ke-0)])[0],U([g(Fe-1,Se-1,ke-0)])[0],mt),Xe()),bt&&(et=P(U([g(Fe-0,Se,ke-0)])[0],U([g(Fe-0,Se-1,ke-0)])[0],bt),_t=P(U([g(Fe-0,Se,ke-1)])[0],U([g(Fe-0,Se-1,ke-1)])[0],bt),ut=P(U([g(Fe-1,Se,ke-1)])[0],U([g(Fe-1,Se-1,ke-1)])[0],bt),vt=P(U([g(Fe-1,Se,ke-0)])[0],U([g(Fe-1,Se-1,ke-0)])[0],bt),Xe()),Ne&&(et=P(U([g(Fe-0,Se-0,ke)])[0],U([g(Fe-0,Se-0,ke-1)])[0],Ne),_t=P(U([g(Fe-0,Se-1,ke)])[0],U([g(Fe-0,Se-1,ke-1)])[0],Ne),ut=P(U([g(Fe-1,Se-1,ke)])[0],U([g(Fe-1,Se-1,ke-1)])[0],Ne),vt=P(U([g(Fe-1,Se-0,ke)])[0],U([g(Fe-1,Se-0,ke-1)])[0],Ne),Xe()),Qe}function ge(we,Fe,Se,ke,_e,Ie,Oe,Qe,et,_t,ut,vt){var Xe=we;return vt?(a&&we==="even"&&(Xe=null),G(Xe,Fe,Se,ke,_e,Ie,Oe,Qe,et,_t,ut)):(a&&we==="odd"&&(Xe=null),G(Xe,et,Qe,Oe,Ie,_e,ke,Se,Fe,_t,ut))}function Ce(we,Fe,Se,ke,_e){for(var Ie=[],Oe=0,Qe=0;Qe<Fe.length;Qe++)for(var et=Fe[Qe],_t=1;_t<v;_t++)for(var ut=1;ut<p;ut++)Ie.push(te(we,g(et,ut-1,_t-1),g(et,ut-1,_t),g(et,ut,_t-1),g(et,ut,_t),Se,ke,(et+ut+_t)%2,_e&&_e[Oe]?_e[Oe]:[])),Oe++;return Ie}function be(we,Fe,Se,ke,_e){for(var Ie=[],Oe=0,Qe=0;Qe<Fe.length;Qe++)for(var et=Fe[Qe],_t=1;_t<d;_t++)for(var ut=1;ut<v;ut++)Ie.push(te(we,g(_t-1,et,ut-1),g(_t,et,ut-1),g(_t-1,et,ut),g(_t,et,ut),Se,ke,(_t+et+ut)%2,_e&&_e[Oe]?_e[Oe]:[])),Oe++;return Ie}function he(we,Fe,Se,ke,_e){for(var Ie=[],Oe=0,Qe=0;Qe<Fe.length;Qe++)for(var et=Fe[Qe],_t=1;_t<p;_t++)for(var ut=1;ut<d;ut++)Ie.push(te(we,g(ut-1,_t-1,et),g(ut-1,_t,et),g(ut,_t-1,et),g(ut,_t,et),Se,ke,(ut+_t+et)%2,_e&&_e[Oe]?_e[Oe]:[])),Oe++;return Ie}function oe(we,Fe,Se){for(var ke=1;ke<v;ke++)for(var _e=1;_e<p;_e++)for(var Ie=1;Ie<d;Ie++)ge(we,g(Ie-1,_e-1,ke-1),g(Ie-1,_e-1,ke),g(Ie-1,_e,ke-1),g(Ie-1,_e,ke),g(Ie,_e-1,ke-1),g(Ie,_e-1,ke),g(Ie,_e,ke-1),g(Ie,_e,ke),Fe,Se,(Ie+_e+ke)%2)}function Ee(we,Fe,Se){o=!0,oe(we,Fe,Se),o=!1}function ye(we,Fe,Se){a=!0,oe(we,Fe,Se),a=!1}function ue(we,Fe,Se,ke,_e,Ie){for(var Oe=[],Qe=0,et=0;et<Fe.length;et++)for(var _t=Fe[et],ut=1;ut<v;ut++)for(var vt=1;vt<p;vt++)Oe.push(ce(we,_t,vt,ut,Se,ke,_e[et],Ie&&Ie[Qe]?Ie[Qe]:[])),Qe++;return Oe}function ee(we,Fe,Se,ke,_e,Ie){for(var Oe=[],Qe=0,et=0;et<Fe.length;et++)for(var _t=Fe[et],ut=1;ut<d;ut++)for(var vt=1;vt<v;vt++)Oe.push(ce(we,ut,_t,vt,Se,ke,_e[et],Ie&&Ie[Qe]?Ie[Qe]:[])),Qe++;return Oe}function ae(we,Fe,Se,ke,_e,Ie){for(var Oe=[],Qe=0,et=0;et<Fe.length;et++)for(var _t=Fe[et],ut=1;ut<p;ut++)for(var vt=1;vt<d;vt++)Oe.push(ce(we,vt,ut,_t,Se,ke,_e[et],Ie&&Ie[Qe]?Ie[Qe]:[])),Qe++;return Oe}function xe(we,Fe){for(var Se=[],ke=we;ke<Fe;ke++)Se.push(ke);return Se}function re(){for(var we=0;we<d;we++)for(var Fe=0;Fe<p;Fe++)for(var Se=0;Se<v;Se++){var ke=g(we,Fe,Se);k(e._x[ke],e._y[ke],e._z[ke],e._value[ke])}}function pe(){C(),re();var we=null;if(r&&n&&(L(n),Ee(we,_,M)),t&&i){L(i);for(var Fe=e.surface.pattern,Se=e.surface.count,ke=0;ke<Se;ke++){var _e=Se===1?.5:ke/(Se-1),Ie=(1-_e)*_+_e*M,Oe=Math.abs(Ie-w),Qe=Math.abs(Ie-b),et=Oe>Qe?[w,Ie]:[Ie,b];ye(Fe,et[0],et[1])}}var _t=[[Math.min(_,b),Math.max(_,b)],[Math.min(w,M),Math.max(w,M)]];["x","y","z"].forEach(function(ut){for(var vt=[],Xe=0;Xe<_t.length;Xe++){var mt=0,bt=_t[Xe][0],Ne=_t[Xe][1],Ue=e.slices[ut];if(Ue.show&&Ue.fill){L(Ue.fill);var Ge=[],je=[],Re=[];if(Ue.locations.length)for(var Ve=0;Ve<Ue.locations.length;Ve++){var ct=cE(Ue.locations[Ve],ut==="x"?c:ut==="y"?f:h);ct.distRatio===0?Ge.push(ct.id):ct.id>0&&(je.push(ct.id),ut==="x"?Re.push([ct.distRatio,0,0]):ut==="y"?Re.push([0,ct.distRatio,0]):Re.push([0,0,ct.distRatio]))}else ut==="x"?Ge=xe(1,d-1):ut==="y"?Ge=xe(1,p-1):Ge=xe(1,v-1);je.length>0&&(ut==="x"?vt[mt]=ue(we,je,bt,Ne,Re,vt[mt]):ut==="y"?vt[mt]=ee(we,je,bt,Ne,Re,vt[mt]):vt[mt]=ae(we,je,bt,Ne,Re,vt[mt]),mt++),Ge.length>0&&(ut==="x"?vt[mt]=Ce(we,Ge,bt,Ne,vt[mt]):ut==="y"?vt[mt]=be(we,Ge,bt,Ne,vt[mt]):vt[mt]=he(we,Ge,bt,Ne,vt[mt]),mt++)}var Tt=e.caps[ut];Tt.show&&Tt.fill&&(L(Tt.fill),ut==="x"?vt[mt]=Ce(we,[0,d-1],bt,Ne,vt[mt]):ut==="y"?vt[mt]=be(we,[0,p-1],bt,Ne,vt[mt]):vt[mt]=he(we,[0,v-1],bt,Ne,vt[mt]),mt++)}}),s===0&&C(),e._meshX=x,e._meshY=T,e._meshZ=A,e._meshIntensity=y,e._Xs=c,e._Ys=f,e._Zs=h}return pe(),e}function VQt(e,t){var r=e.glplot.gl,i=zQt({gl:r}),n=new iNe(e,i,t.uid);return i._trace=n,n.update(t),e.glplot.add(i),n}aNe.exports={findNearestOnAxis:cE,generateIsoMeshes:nNe,createIsosurfaceTrace:VQt}});var sNe=W((YHr,oNe)=>{"use strict";oNe.exports={attributes:SI(),supplyDefaults:yJ().supplyDefaults,calc:bJ(),colorbar:{min:"cmin",max:"cmax"},plot:CI().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:w2(),categories:["gl3d","showLegend"],meta:{}}});var uNe=W((XHr,lNe)=>{"use strict";lNe.exports=sNe()});var AJ=W((ZHr,fNe)=>{"use strict";var GQt=Eo(),Il=SI(),HQt=sE(),cNe=Wa(),TJ=tn().extendFlat,jQt=ls().overrideAll,DI=fNe.exports=jQt(TJ({x:Il.x,y:Il.y,z:Il.z,value:Il.value,isomin:Il.isomin,isomax:Il.isomax,surface:Il.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:Il.slices,caps:Il.caps,text:Il.text,hovertext:Il.hovertext,xhoverformat:Il.xhoverformat,yhoverformat:Il.yhoverformat,zhoverformat:Il.zhoverformat,valuehoverformat:Il.valuehoverformat,hovertemplate:Il.hovertemplate,hovertemplatefallback:Il.hovertemplatefallback},GQt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:Il.colorbar,opacity:Il.opacity,opacityscale:HQt.opacityscale,lightposition:Il.lightposition,lighting:Il.lighting,flatshading:Il.flatshading,contour:Il.contour,hoverinfo:TJ({},cNe.hoverinfo),showlegend:TJ({},cNe.showlegend,{dflt:!1})}),"calc","nested");DI.x.editType=DI.y.editType=DI.z.editType=DI.value.editType="calc+clearAxisTypes"});var dNe=W((KHr,hNe)=>{"use strict";var $Qt=it(),WQt=AJ(),YQt=yJ().supplyIsoDefaults,XQt=hJ().opacityscaleDefaults;hNe.exports=function(t,r,i,n){function a(o,s){return $Qt.coerce(t,r,WQt,o,s)}YQt(t,r,i,n,a),XQt(t,r,n,a)}});var mNe=W((JHr,gNe)=>{"use strict";var ZQt=nc().gl_mesh3d,KQt=sm().parseColorScale,JQt=it().isArrayOrTypedArray,QQt=om(),eer=Jo().extractOpts,pNe=F4(),MJ=CI().findNearestOnAxis,ter=CI().generateIsoMeshes;function vNe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var SJ=vNe.prototype;SJ.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],i=this.data._meshY[t],n=this.data._meshZ[t],a=this.data._Ys.length,o=this.data._Zs.length,s=MJ(r,this.data._Xs).id,l=MJ(i,this.data._Ys).id,u=MJ(n,this.data._Zs).id,c=e.index=u+o*l+o*a*s;e.traceCoordinate=[this.data._meshX[c],this.data._meshY[c],this.data._meshZ[c],this.data._value[c]];var f=this.data.hovertext||this.data.text;return JQt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};SJ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=ter(e);function i(l,u,c,f){return u.map(function(h){return l.d2l(h,0,f)*c})}var n=pNe(i(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),i(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),i(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),a=pNe(e._meshI,e._meshJ,e._meshK),o={positions:n,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:QQt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=eer(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=KQt(e),this.mesh.update(o)};SJ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function rer(e,t){var r=e.glplot.gl,i=ZQt({gl:r}),n=new vNe(e,i,t.uid);return i._trace=n,n.update(t),e.glplot.add(i),n}gNe.exports=rer});var xNe=W((QHr,yNe)=>{"use strict";yNe.exports={attributes:AJ(),supplyDefaults:dNe(),calc:bJ(),colorbar:{min:"cmin",max:"cmax"},plot:mNe(),moduleType:"trace",name:"volume",basePlotModule:w2(),categories:["gl3d","showLegend"],meta:{}}});var bNe=W((ejr,_Ne)=>{"use strict";_Ne.exports=xNe()});var ANe=W((tjr,TNe)=>{"use strict";var ier=yi(),wNe=it(),ner=Fu(),aer=C4();TNe.exports=function(t,r,i,n){function a(c,f){return wNe.coerce(t,r,aer,c,f)}function o(c){var f=c.map(function(h){var d=a(h);return d&&wNe.isArrayOrTypedArray(d)?d:null});return f.every(function(h){return h&&h.length===f[0].length})&&f}var s=o(["x","y","z"]);if(!s){r.visible=!1;return}if(o(["i","j","k"]),r.i&&(!r.j||!r.k)||r.j&&(!r.k||!r.i)||r.k&&(!r.i||!r.j)){r.visible=!1;return}var l=ier.getComponentMethod("calendars","handleTraceDefaults");l(t,r,["x","y","z"],n),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(c){a(c)});var u=a("contour.show");u&&(a("contour.color"),a("contour.width")),"intensity"in t?(a("intensity"),a("intensitymode"),ner(t,r,n,a,{prefix:"",cLetter:"c"})):(r.showscale=!1,"facecolor"in t?a("facecolor"):"vertexcolor"in t?a("vertexcolor"):a("color",i)),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var SNe=W((rjr,MNe)=>{"use strict";var oer=Zc();MNe.exports=function(t,r){r.intensity&&oer(t,r,{vals:r.intensity,containerStr:"",cLetter:"c"})}});var FNe=W((ijr,DNe)=>{"use strict";var ser=nc().gl_mesh3d,ler=nc().delaunay_triangulate,uer=nc().alpha_shape,cer=nc().convex_hull,fer=sm().parseColorScale,her=it().isArrayOrTypedArray,DJ=om(),der=Jo().extractOpts,ENe=F4();function CNe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var FJ=CNe.prototype;FJ.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return her(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function kNe(e){for(var t=[],r=e.length,i=0;i<r;i++)t[i]=DJ(e[i]);return t}function EJ(e,t,r,i){for(var n=[],a=t.length,o=0;o<a;o++)n[o]=e.d2l(t[o],0,i)*r;return n}function kJ(e){for(var t=[],r=e.length,i=0;i<r;i++)t[i]=Math.round(e[i]);return t}function per(e,t){for(var r=["x","y","z"].indexOf(e),i=[],n=t.length,a=0;a<n;a++)i[a]=[t[a][(r+1)%3],t[a][(r+2)%3]];return ler(i)}function CJ(e,t){for(var r=e.length,i=0;i<r;i++)if(e[i]<=-.5||e[i]>=t-.5)return!1;return!0}FJ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var i=e.x.length,n=ENe(EJ(r.xaxis,e.x,t.dataScale[0],e.xcalendar),EJ(r.yaxis,e.y,t.dataScale[1],e.ycalendar),EJ(r.zaxis,e.z,t.dataScale[2],e.zcalendar)),a;if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!CJ(e.i,i)||!CJ(e.j,i)||!CJ(e.k,i))return;a=ENe(kJ(e.i),kJ(e.j),kJ(e.k))}else e.alphahull===0?a=cer(n):e.alphahull>0?a=uer(e.alphahull,n):a=per(e.delaunayaxis,n);var o={positions:n,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:DJ(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=der(e);this.color="#fff";var l=e.intensitymode;o[l+"Intensity"]=e.intensity,o[l+"IntensityBounds"]=[s.min,s.max],o.colormap=fer(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=kNe(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=kNe(e.facecolor)):(this.color=e.color,o.meshColor=DJ(e.color));this.mesh.update(o)};FJ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function ver(e,t){var r=e.glplot.gl,i=ser({gl:r}),n=new CNe(e,i,t.uid);return i._trace=n,n.update(t),e.glplot.add(i),n}DNe.exports=ver});var PNe=W((njr,LNe)=>{"use strict";LNe.exports={attributes:C4(),supplyDefaults:ANe(),calc:SNe(),colorbar:{min:"cmin",max:"cmax"},plot:FNe(),moduleType:"trace",name:"mesh3d",basePlotModule:w2(),categories:["gl3d","showLegend"],meta:{}}});var RNe=W((ajr,INe)=>{"use strict";INe.exports=PNe()});var PJ=W((ojr,BNe)=>{"use strict";var ger=Eo(),L4=_s().axisHoverFormat,{hovertemplateAttrs:mer,templatefallbackAttrs:yer}=Ga(),xer=C4(),zNe=Wa(),LJ=tn().extendFlat,FI={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:mer({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:yer({editType:"calc"}),uhoverformat:L4("u",1),vhoverformat:L4("v",1),whoverformat:L4("w",1),xhoverformat:L4("x"),yhoverformat:L4("y"),zhoverformat:L4("z"),showlegend:LJ({},zNe.showlegend,{dflt:!1})};LJ(FI,ger("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var _er=["opacity","lightposition","lighting"];_er.forEach(function(e){FI[e]=xer[e]});FI.hoverinfo=LJ({},zNe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});BNe.exports=FI});var ONe=W((sjr,qNe)=>{"use strict";var ber=it(),wer=Fu(),Ter=PJ();qNe.exports=function(t,r,i,n){function a(d,p){return ber.coerce(t,r,Ter,d,p)}var o=a("u"),s=a("v"),l=a("w"),u=a("x"),c=a("y"),f=a("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}var h=a("sizemode");a("sizeref",h==="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"),wer(t,r,n,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var UNe=W((ljr,NNe)=>{"use strict";var Aer=Zc();NNe.exports=function(t,r){for(var i=r.u,n=r.v,a=r.w,o=Math.min(r.x.length,r.y.length,r.z.length,i.length,n.length,a.length),s=-1/0,l=1/0,u=0;u<o;u++){var c=i[u],f=n[u],h=a[u],d=Math.sqrt(c*c+f*f+h*h);s=Math.max(s,d),l=Math.min(l,d)}r._len=o,r._normMax=s,Aer(t,r,{vals:[l,s],containerStr:"",cLetter:"c"})}});var $Ne=W((ujr,jNe)=>{"use strict";var Mer=nc().gl_cone3d,Ser=nc().gl_cone3d.createConeMesh,Eer=it().simpleMap,ker=sm().parseColorScale,Cer=Jo().extractOpts,Der=it().isArrayOrTypedArray,VNe=F4();function GNe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var IJ=GNe.prototype;IJ.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index,r=this.data.x[t],i=this.data.y[t],n=this.data.z[t],a=this.data.u[t],o=this.data.v[t],s=this.data.w[t];e.traceCoordinate=[r,i,n,a,o,s,Math.sqrt(a*a+o*o+s*s)];var l=this.data.hovertext||this.data.text;return Der(l)&&l[t]!==void 0?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var Fer={xaxis:0,yaxis:1,zaxis:2},Ler={tip:1,tail:0,cm:.25,center:.5},Per={tip:1,tail:1,cm:.75,center:.5};function HNe(e,t){var r=e.fullSceneLayout,i=e.dataScale,n={};function a(c,f){var h=r[f],d=i[Fer[f]];return Eer(c,function(p){return h.d2l(p)*d})}n.vectors=VNe(a(t.u,"xaxis"),a(t.v,"yaxis"),a(t.w,"zaxis"),t._len),n.positions=VNe(a(t.x,"xaxis"),a(t.y,"yaxis"),a(t.z,"zaxis"),t._len);var o=Cer(t);n.colormap=ker(t),n.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],n.coneOffset=Ler[t.anchor];var s=t.sizemode;s==="scaled"?n.coneSize=t.sizeref||.5:s==="absolute"?n.coneSize=t.sizeref&&t._normMax?t.sizeref/t._normMax:.5:s==="raw"&&(n.coneSize=t.sizeref),n.coneSizemode=s;var l=Mer(n),u=t.lightposition;return l.lightPosition=[u.x,u.y,u.z],l.ambient=t.lighting.ambient,l.diffuse=t.lighting.diffuse,l.specular=t.lighting.specular,l.roughness=t.lighting.roughness,l.fresnel=t.lighting.fresnel,l.opacity=t.opacity,t._pad=Per[t.anchor]*l.vectorScale*l.coneScale*t._normMax,l}IJ.update=function(e){this.data=e;var t=HNe(this.scene,e);this.mesh.update(t)};IJ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function Ier(e,t){var r=e.glplot.gl,i=HNe(e,t),n=Ser(r,i),a=new GNe(e,t.uid);return a.mesh=n,a.data=t,n._trace=a,e.glplot.add(n),a}jNe.exports=Ier});var YNe=W((cjr,WNe)=>{"use strict";WNe.exports={moduleType:"trace",name:"cone",basePlotModule:w2(),categories:["gl3d","showLegend"],attributes:PJ(),supplyDefaults:ONe(),colorbar:{min:"cmin",max:"cmax"},calc:UNe(),plot:$Ne(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var ZNe=W((fjr,XNe)=>{"use strict";XNe.exports=YNe()});var zJ=W((hjr,JNe)=>{"use strict";var Rer=Eo(),P4=_s().axisHoverFormat,{hovertemplateAttrs:zer,templatefallbackAttrs:Ber}=Ga(),qer=C4(),KNe=Wa(),RJ=tn().extendFlat,LI={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:zer({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:Ber({editType:"calc"}),uhoverformat:P4("u",1),vhoverformat:P4("v",1),whoverformat:P4("w",1),xhoverformat:P4("x"),yhoverformat:P4("y"),zhoverformat:P4("z"),showlegend:RJ({},KNe.showlegend,{dflt:!1})};RJ(LI,Rer("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var Oer=["opacity","lightposition","lighting"];Oer.forEach(function(e){LI[e]=qer[e]});LI.hoverinfo=RJ({},KNe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});JNe.exports=LI});var eUe=W((djr,QNe)=>{"use strict";var Ner=it(),Uer=Fu(),Ver=zJ();QNe.exports=function(t,r,i,n){function a(h,d){return Ner.coerce(t,r,Ver,h,d)}var o=a("u"),s=a("v"),l=a("w"),u=a("x"),c=a("y"),f=a("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.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"),Uer(t,r,n,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var lUe=W((pjr,sUe)=>{"use strict";var iUe=nc().gl_streamtube3d,Ger=iUe.createTubeMesh,Her=it(),jer=sm().parseColorScale,$er=Jo().extractOpts,tUe=F4(),nUe={xaxis:0,yaxis:1,zaxis:2};function aUe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var qJ=aUe.prototype;qJ.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function i(o,s){var l=t[s],u=r[nUe[s]];return l.l2c(o)/u}if(e.object===this.mesh){var n=e.data.position,a=e.data.velocity;return e.traceCoordinate=[i(n[0],"xaxis"),i(n[1],"yaxis"),i(n[2],"zaxis"),i(a[0],"xaxis"),i(a[1],"yaxis"),i(a[2],"zaxis"),e.data.intensity*this.data._normMax,e.data.divergence],e.textLabel=this.data.hovertext||this.data.text,!0}};function rUe(e){var t=e.length,r;return t>2?r=e.slice(1,t-1):t===2?r=[(e[0]+e[1])/2]:r=e,r}function BJ(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function oUe(e,t){var r=e.fullSceneLayout,i=e.dataScale,n=t._len,a={};function o(C,k){var D=r[k],F=i[nUe[k]];return Her.simpleMap(C,function(P){return D.d2l(P)*F})}if(a.vectors=tUe(o(t._u,"xaxis"),o(t._v,"yaxis"),o(t._w,"zaxis"),n),!n)return{positions:[],cells:[]};var s=o(t._Xs,"xaxis"),l=o(t._Ys,"yaxis"),u=o(t._Zs,"zaxis");a.meshgrid=[s,l,u],a.gridFill=t._gridFill;var c=t._slen;if(c)a.startingPositions=tUe(o(t._startsX,"xaxis"),o(t._startsY,"yaxis"),o(t._startsZ,"zaxis"));else{for(var f=l[0],h=rUe(s),d=rUe(u),p=new Array(h.length*d.length),v=0,m=0;m<h.length;m++)for(var g=0;g<d.length;g++)p[v++]=[h[m],f,d[g]];a.startingPositions=p}a.colormap=jer(t),a.tubeSize=t.sizeref,a.maxLength=t.maxdisplayed;var w=o(t._xbnds,"xaxis"),b=o(t._ybnds,"yaxis"),_=o(t._zbnds,"zaxis"),M=BJ(s),x=BJ(l),T=BJ(u),A=[[w[0]-M[0],b[0]-x[0],_[0]-T[0]],[w[1]+M[1],b[1]+x[1],_[1]+T[1]]],y=iUe(a,A),E=$er(t);y.vertexIntensityBounds=[E.min/t._normMax,E.max/t._normMax];var S=t.lightposition;return y.lightPosition=[S.x,S.y,S.z],y.ambient=t.lighting.ambient,y.diffuse=t.lighting.diffuse,y.specular=t.lighting.specular,y.roughness=t.lighting.roughness,y.fresnel=t.lighting.fresnel,y.opacity=t.opacity,t._pad=y.tubeScale*t.sizeref*2,y}qJ.update=function(e){this.data=e;var t=oUe(this.scene,e);this.mesh.update(t)};qJ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function Wer(e,t){var r=e.glplot.gl,i=oUe(e,t),n=Ger(r,i),a=new aUe(e,t.uid);return a.mesh=n,a.data=t,n._trace=a,e.glplot.add(n),a}sUe.exports=Wer});var cUe=W((vjr,uUe)=>{"use strict";uUe.exports={moduleType:"trace",name:"streamtube",basePlotModule:w2(),categories:["gl3d","showLegend"],attributes:zJ(),supplyDefaults:eUe(),colorbar:{min:"cmin",max:"cmax"},calc:EI().calc,plot:lUe(),eventData:function(e,t){return e.tubex=e.x,e.tubey=e.y,e.tubez=e.z,e.tubeu=t.traceCoordinate[3],e.tubev=t.traceCoordinate[4],e.tubew=t.traceCoordinate[5],e.norm=t.traceCoordinate[6],e.divergence=t.traceCoordinate[7],delete e.x,delete e.y,delete e.z,e},meta:{}}});var hUe=W((gjr,fUe)=>{"use strict";fUe.exports=cUe()});var I4=W((mjr,mUe)=>{"use strict";var{hovertemplateAttrs:Yer,texttemplateAttrs:Xer,templatefallbackAttrs:dUe}=Ga(),Zer=g1(),B1=Ns(),Ker=Wa(),pUe=Eo(),Jer=Du().dash,wb=tn().extendFlat,Qer=ls().overrideAll,Ud=B1.marker,vUe=B1.line,gUe=Ud.line;mUe.exports=Qer({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:wb({},B1.mode,{dflt:"markers"}),text:wb({},B1.text,{}),texttemplate:Xer({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:dUe({editType:"plot"}),hovertext:wb({},B1.hovertext,{}),textfont:B1.textfont,textposition:B1.textposition,line:{color:vUe.color,width:vUe.width,dash:Jer},connectgaps:B1.connectgaps,marker:wb({symbol:Ud.symbol,opacity:Ud.opacity,angle:Ud.angle,angleref:wb({},Ud.angleref,{values:["previous","up","north"]}),standoff:Ud.standoff,size:Ud.size,sizeref:Ud.sizeref,sizemin:Ud.sizemin,sizemode:Ud.sizemode,colorbar:Ud.colorbar,line:wb({width:gUe.width,dash:gUe.dash},pUe("marker.line")),gradient:Ud.gradient},pUe("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:Zer(),selected:B1.selected,unselected:B1.unselected,hoverinfo:wb({},Ker.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:Yer(),hovertemplatefallback:dUe()},"calc","nested")});var xUe=W((yjr,yUe)=>{"use strict";var OJ=it(),NJ=$o(),etr=bd(),ttr=jp(),rtr=$p(),itr=y1(),ntr=I4();yUe.exports=function(t,r,i,n){function a(d,p){return OJ.coerce(t,r,ntr,d,p)}var o=a("locations"),s;if(o&&o.length){var l=a("geojson"),u;(typeof l=="string"&&l!==""||OJ.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="geojson-id"&&a("featureidkey"),s=o.length}else{var f=a("lon")||[],h=a("lat")||[];s=Math.min(f.length,h.length)}if(!s){r.visible=!1;return}r._length=s,a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode"),NJ.hasMarkers(r)&&etr(t,r,i,n,a,{gradient:!0}),NJ.hasLines(r)&&(ttr(t,r,i,n,a),a("connectgaps")),NJ.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),rtr(t,r,n,a)),a("fill"),r.fill!=="none"&&itr(t,r,i,a),OJ.coerceSelectionMarkerOpacity(r,a)}});var wUe=W((xjr,bUe)=>{"use strict";var _Ue=ji();bUe.exports=function(t,r,i){var n={},a=i[r.geo]._subplot,o=a.mockAxis,s=t.lonlat;return n.lonLabel=_Ue.tickText(o,o.c2l(s[0]),!0).text,n.latLabel=_Ue.tickText(o,o.c2l(s[1]),!0).text,n}});var VJ=W((_jr,SUe)=>{"use strict";var UJ=sn(),TUe=Kn().BADNUM,atr=wd(),otr=x1(),str=w0(),ltr=it().isArrayOrTypedArray,AUe=it()._;function MUe(e){return e&&typeof e=="string"}SUe.exports=function(t,r){var i=ltr(r.locations),n=i?r.locations.length:r._length,a=new Array(n),o;r.geojson?o=function(h){return MUe(h)||UJ(h)}:o=MUe;for(var s=0;s<n;s++){var l=a[s]={};if(i){var u=r.locations[s];l.loc=o(u)?u:null}else{var c=r.lon[s],f=r.lat[s];UJ(c)&&UJ(f)?l.lonlat=[+c,+f]:l.lonlat=[TUe,TUe]}}return otr(a,r),atr(t,r),str(a,r),n&&(a[0].t={labels:{lat:AUe(t,"lat:")+" ",lon:AUe(t,"lon:")+" "}}),a}});var fE=W(Dc=>{"use strict";Dc.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"};Dc.axesNames=["lonaxis","lataxis"];Dc.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360};Dc.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180};Dc.fitboundsIncompatible=new Set(["albers usa","craig","peirce quincuncial","satellite"]);Dc.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]}};Dc.clipPad=.001;Dc.precision=.1;Dc.landColor="#F0DC82";Dc.waterColor="#3399FF";Dc.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"};Dc.sphereSVG={type:"Sphere"};Dc.fillLayers={ocean:1,land:1,lakes:1};Dc.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};Dc.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"];Dc.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"];Dc.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var GJ=W((PI,EUe)=>{(function(e,t){typeof PI=="object"&&typeof EUe!="undefined"?t(PI):(e=e||self,t(e.topojson=e.topojson||{}))})(PI,function(e){"use strict";function t(b){return b}function r(b){if(b==null)return t;var _,M,x=b.scale[0],T=b.scale[1],A=b.translate[0],y=b.translate[1];return function(E,S){S||(_=M=0);var C=2,k=E.length,D=new Array(k);for(D[0]=(_+=E[0])*x+A,D[1]=(M+=E[1])*T+y;C<k;)D[C]=E[C],++C;return D}}function i(b){var _=r(b.transform),M,x=1/0,T=x,A=-x,y=-x;function E(C){C=_(C),C[0]<x&&(x=C[0]),C[0]>A&&(A=C[0]),C[1]<T&&(T=C[1]),C[1]>y&&(y=C[1])}function S(C){switch(C.type){case"GeometryCollection":C.geometries.forEach(S);break;case"Point":E(C.coordinates);break;case"MultiPoint":C.coordinates.forEach(E);break}}b.arcs.forEach(function(C){for(var k=-1,D=C.length,F;++k<D;)F=_(C[k],k),F[0]<x&&(x=F[0]),F[0]>A&&(A=F[0]),F[1]<T&&(T=F[1]),F[1]>y&&(y=F[1])});for(M in b.objects)S(b.objects[M]);return[x,T,A,y]}function n(b,_){for(var M,x=b.length,T=x-_;T<--x;)M=b[T],b[T++]=b[x],b[x]=M}function a(b,_){return typeof _=="string"&&(_=b.objects[_]),_.type==="GeometryCollection"?{type:"FeatureCollection",features:_.geometries.map(function(M){return o(b,M)})}:o(b,_)}function o(b,_){var M=_.id,x=_.bbox,T=_.properties==null?{}:_.properties,A=s(b,_);return M==null&&x==null?{type:"Feature",properties:T,geometry:A}:x==null?{type:"Feature",id:M,properties:T,geometry:A}:{type:"Feature",id:M,bbox:x,properties:T,geometry:A}}function s(b,_){var M=r(b.transform),x=b.arcs;function T(k,D){D.length&&D.pop();for(var F=x[k<0?~k:k],P=0,R=F.length;P<R;++P)D.push(M(F[P],P));k<0&&n(D,R)}function A(k){return M(k)}function y(k){for(var D=[],F=0,P=k.length;F<P;++F)T(k[F],D);return D.length<2&&D.push(D[0]),D}function E(k){for(var D=y(k);D.length<4;)D.push(D[0]);return D}function S(k){return k.map(E)}function C(k){var D=k.type,F;switch(D){case"GeometryCollection":return{type:D,geometries:k.geometries.map(C)};case"Point":F=A(k.coordinates);break;case"MultiPoint":F=k.coordinates.map(A);break;case"LineString":F=y(k.arcs);break;case"MultiLineString":F=k.arcs.map(y);break;case"Polygon":F=S(k.arcs);break;case"MultiPolygon":F=k.arcs.map(S);break;default:return null}return{type:D,coordinates:F}}return C(_)}function l(b,_){var M={},x={},T={},A=[],y=-1;_.forEach(function(C,k){var D=b.arcs[C<0?~C:C],F;D.length<3&&!D[1][0]&&!D[1][1]&&(F=_[++y],_[y]=C,_[k]=F)}),_.forEach(function(C){var k=E(C),D=k[0],F=k[1],P,R;if(P=T[D])if(delete T[P.end],P.push(C),P.end=F,R=x[F]){delete x[R.start];var L=R===P?P:P.concat(R);x[L.start=P.start]=T[L.end=R.end]=L}else x[P.start]=T[P.end]=P;else if(P=x[F])if(delete x[P.start],P.unshift(C),P.start=D,R=T[D]){delete T[R.end];var I=R===P?P:R.concat(P);x[I.start=R.start]=T[I.end=P.end]=I}else x[P.start]=T[P.end]=P;else P=[C],x[P.start=D]=T[P.end=F]=P});function E(C){var k=b.arcs[C<0?~C:C],D=k[0],F;return b.transform?(F=[0,0],k.forEach(function(P){F[0]+=P[0],F[1]+=P[1]})):F=k[k.length-1],C<0?[F,D]:[D,F]}function S(C,k){for(var D in C){var F=C[D];delete k[F.start],delete F.start,delete F.end,F.forEach(function(P){M[P<0?~P:P]=1}),A.push(F)}}return S(T,x),S(x,T),_.forEach(function(C){M[C<0?~C:C]||A.push([C])}),A}function u(b){return s(b,c.apply(this,arguments))}function c(b,_,M){var x,T,A;if(arguments.length>1)x=f(b,_,M);else for(T=0,x=new Array(A=b.arcs.length);T<A;++T)x[T]=T;return{type:"MultiLineString",arcs:l(b,x)}}function f(b,_,M){var x=[],T=[],A;function y(D){var F=D<0?~D:D;(T[F]||(T[F]=[])).push({i:D,g:A})}function E(D){D.forEach(y)}function S(D){D.forEach(E)}function C(D){D.forEach(S)}function k(D){switch(A=D,D.type){case"GeometryCollection":D.geometries.forEach(k);break;case"LineString":E(D.arcs);break;case"MultiLineString":case"Polygon":S(D.arcs);break;case"MultiPolygon":C(D.arcs);break}}return k(_),T.forEach(M==null?function(D){x.push(D[0].i)}:function(D){M(D[0].g,D[D.length-1].g)&&x.push(D[0].i)}),x}function h(b){for(var _=-1,M=b.length,x,T=b[M-1],A=0;++_<M;)x=T,T=b[_],A+=x[0]*T[1]-x[1]*T[0];return Math.abs(A)}function d(b){return s(b,p.apply(this,arguments))}function p(b,_){var M={},x=[],T=[];_.forEach(A);function A(S){switch(S.type){case"GeometryCollection":S.geometries.forEach(A);break;case"Polygon":y(S.arcs);break;case"MultiPolygon":S.arcs.forEach(y);break}}function y(S){S.forEach(function(C){C.forEach(function(k){(M[k=k<0?~k:k]||(M[k]=[])).push(S)})}),x.push(S)}function E(S){return h(s(b,{type:"Polygon",arcs:[S]}).coordinates[0])}return x.forEach(function(S){if(!S._){var C=[],k=[S];for(S._=1,T.push(C);S=k.pop();)C.push(S),S.forEach(function(D){D.forEach(function(F){M[F<0?~F:F].forEach(function(P){P._||(P._=1,k.push(P))})})})}}),x.forEach(function(S){delete S._}),{type:"MultiPolygon",arcs:T.map(function(S){var C=[],k;if(S.forEach(function(L){L.forEach(function(I){I.forEach(function(B){M[B<0?~B:B].length<2&&C.push(B)})})}),C=l(b,C),(k=C.length)>1)for(var D=1,F=E(C[0]),P,R;D<k;++D)(P=E(C[D]))>F&&(R=C[0],C[0]=C[D],C[D]=R,F=P);return C}).filter(function(S){return S.length>0})}}function v(b,_){for(var M=0,x=b.length;M<x;){var T=M+x>>>1;b[T]<_?M=T+1:x=T}return M}function m(b){var _={},M=b.map(function(){return[]});function x(L,I){L.forEach(function(B){B<0&&(B=~B);var O=_[B];O?O.push(I):_[B]=[I]})}function T(L,I){L.forEach(function(B){x(B,I)})}function A(L,I){L.type==="GeometryCollection"?L.geometries.forEach(function(B){A(B,I)}):L.type in y&&y[L.type](L.arcs,I)}var y={LineString:x,MultiLineString:T,Polygon:T,MultiPolygon:function(L,I){L.forEach(function(B){T(B,I)})}};b.forEach(A);for(var E in _)for(var S=_[E],C=S.length,k=0;k<C;++k)for(var D=k+1;D<C;++D){var F=S[k],P=S[D],R;(R=M[F])[E=v(R,P)]!==P&&R.splice(E,0,P),(R=M[P])[E=v(R,F)]!==F&&R.splice(E,0,F)}return M}function g(b){if(b==null)return t;var _,M,x=b.scale[0],T=b.scale[1],A=b.translate[0],y=b.translate[1];return function(E,S){S||(_=M=0);var C=2,k=E.length,D=new Array(k),F=Math.round((E[0]-A)/x),P=Math.round((E[1]-y)/T);for(D[0]=F-_,_=F,D[1]=P-M,M=P;C<k;)D[C]=E[C],++C;return D}}function w(b,_){if(b.transform)throw new Error("already quantized");if(!_||!_.scale){if(!((y=Math.floor(_))>=2))throw new Error("n must be \u22652");S=b.bbox||i(b);var M=S[0],x=S[1],T=S[2],A=S[3],y;_={scale:[T-M?(T-M)/(y-1):1,A-x?(A-x)/(y-1):1],translate:[M,x]}}else S=b.bbox;var E=g(_),S,C,k=b.objects,D={};function F(L){return E(L)}function P(L){var I;switch(L.type){case"GeometryCollection":I={type:"GeometryCollection",geometries:L.geometries.map(P)};break;case"Point":I={type:"Point",coordinates:F(L.coordinates)};break;case"MultiPoint":I={type:"MultiPoint",coordinates:L.coordinates.map(F)};break;default:return L}return L.id!=null&&(I.id=L.id),L.bbox!=null&&(I.bbox=L.bbox),L.properties!=null&&(I.properties=L.properties),I}function R(L){var I=0,B=1,O=L.length,$,Y=new Array(O);for(Y[0]=E(L[0],0);++I<O;)(($=E(L[I],I))[0]||$[1])&&(Y[B++]=$);return B===1&&(Y[B++]=[0,0]),Y.length=B,Y}for(C in k)D[C]=P(k[C]);return{type:"Topology",bbox:S,transform:_,objects:D,arcs:b.arcs.map(R)}}e.bbox=i,e.feature=a,e.merge=d,e.mergeArcs=p,e.mesh=u,e.meshArcs=c,e.neighbors=m,e.quantize=w,e.transform=r,e.untransform=g,Object.defineProperty(e,"__esModule",{value:!0})})});var II=W((wjr,kUe)=>{"use strict";var HJ=kUe.exports={},utr=fE().locationmodeToLayer,ctr=GJ().feature;HJ.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};HJ.getTopojsonPath=function(e,t){return e+=e.endsWith("/")?"":"/",`${e}${t}.json`};HJ.getTopojsonFeatures=function(e,t){var r=utr[e.locationmode],i=t.objects[r];return ctr(t,i).features}});var dE=W(hE=>{"use strict";var ftr=Kn().BADNUM;hE.calcTraceToLineCoords=function(e){for(var t=e[0].trace,r=t.connectgaps,i=[],n=[],a=0;a<e.length;a++){var o=e[a],s=o.lonlat;s[0]!==ftr?n.push(s):!r&&n.length>0&&(i.push(n),n=[])}return n.length>0&&i.push(n),i};hE.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};hE.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r<e.length;r++)t[r]=[e[r]];return{type:"MultiPolygon",coordinates:t}};hE.makeBlank=function(){return{type:"Point",coordinates:[]}}});var PUe=W((Ajr,LUe)=>{"use strict";var $J=Object.defineProperty,htr=Object.getOwnPropertyDescriptor,dtr=Object.getOwnPropertyNames,ptr=Object.prototype.hasOwnProperty,vtr=(e,t)=>{for(var r in t)$J(e,r,{get:t[r],enumerable:!0})},gtr=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of dtr(t))!ptr.call(e,n)&&n!==r&&$J(e,n,{get:()=>t[n],enumerable:!(i=htr(t,n))||i.enumerable});return e},mtr=e=>gtr($J({},"__esModule",{value:!0}),e),CUe={};vtr(CUe,{COUNTRIES:()=>DUe,byAlpha2:()=>btr,byAlpha3:()=>_tr,byM49:()=>wtr,createLookup:()=>FUe,lookup:()=>ytr,lookupAlpha3:()=>xtr,sanitize:()=>jJ});LUe.exports=mtr(CUe);var DUe=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\u{1F1E6}\u{1F1FC}","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\u{1F1E6}\u{1F1EB}","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","\u0430\u0444\u0493\u043E\u043D\u0438\u0441\u0442\u043E\u043D","\u0623\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u062F \u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u0647\u0648\u0631\u06CC\u062A"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\u{1F1E6}\u{1F1F4}","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\u{1F1E6}\u{1F1EE}","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xC5land Islands",aliases:["\u{1F1E6}\u{1F1FD}","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\u{1F1E6}\u{1F1F1}","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\u{1F1E6}\u{1F1E9}","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\u{1F1E6}\u{1F1EA}","emirates","uae","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\u{1F1E6}\u{1F1F7}","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\u{1F1E6}\u{1F1F2}","hayastan","hayastani hanrapetutyun","republic of armenia","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576\u056B \u0570\u0561\u0576\u0580\u0561\u057A\u0565\u057F\u0578\u0582\u0569\u0575\u0578\u0582\u0576","\u0570\u0561\u0575\u0584","\u0570\u0570"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\u{1F1E6}\u{1F1F8}","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\u{1F1E6}\u{1F1F6}","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\u{1F1F9}\u{1F1EB}","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\u{1F1E6}\u{1F1EC}","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\u{1F1E6}\u{1F1FA}","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\u{1F1E6}\u{1F1F9}","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\u{1F1E6}\u{1F1FF}","az\u0259rbaycan","az\u0259rbaycan respublikas\u0131","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\u{1F1E7}\u{1F1EE}","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\u{1F1E7}\u{1F1EA}","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\u{1F1E7}\u{1F1EF}","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\u{1F1E7}\u{1F1F6}","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\u{1F1E7}\u{1F1EB}","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\u{1F1E7}\u{1F1E9}","bangla desh","east pakistan","gonaoprojatontri bangladesh","peoples republic of bangladesh","\u0997\u09A3\u09AA\u09CD\u09B0\u099C\u09BE\u09A4\u09A8\u09CD\u09A4\u09CD\u09B0\u09C0 \u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE \u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BF\u09A1\u09BF"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\u{1F1E7}\u{1F1EC}","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","\u0431\u0433","\u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\u{1F1E7}\u{1F1ED}","bahrein islands","kingdom of bahrain","\u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\u{1F1E7}\u{1F1F8}","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\u{1F1E7}\u{1F1E6}","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","\u0431\u0438\u0445","\u0431\u043E\u0441\u043D\u0430","\u0431\u043E\u0441\u043D\u0430 \u0438 \u0445\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430","\u0431\u0445"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xE9lemy",aliases:["\u{1F1E7}\u{1F1F1}","collectivite doutre mer de saint barthelemy","collectivite territoriale de saint barthelemy","collectivity of saint barthelemy","saint barth","saint barths","saint barts","saint bartz"]},{iso3:"BLR",iso2:"BY",m49:"112",name:"Belarus",aliases:["\u{1F1E7}\u{1F1FE}","republic of belarus","respublika belarus","respublika byelarus","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u0430\u044F \u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u043E\u0440\u0443\u0441\u0441\u0438\u044F","\u0440\u0431","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\u{1F1E7}\u{1F1FF}"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\u{1F1E7}\u{1F1F2}","barmuda","barmuda i","barmuda isl","barmuda islands","barmudas","bermoothes","bermuda islands","bermudas","bermudian islands","colony of bermuda","devils isles","isle of devils","somers islands","somers isles","summers isles","territory of bermuda","virgineola"]},{iso3:"BOL",iso2:"BO",m49:"068",name:"Bolivia (Plurinational State of)",aliases:["\u{1F1E7}\u{1F1F4}","bolivia","bulibiya","estado plurinacional de bolivia","plurinational state of bolivia","puliwya","republic of bolivia","republica de bolivia","volivia","wuliwiya","wuliwya"]},{iso3:"BRA",iso2:"BR",m49:"076",name:"Brazil",aliases:["\u{1F1E7}\u{1F1F7}","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\u{1F1E7}\u{1F1E7}","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\u{1F1E7}\u{1F1F3}","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\u{1F1E7}\u{1F1F9}","kingdom of bhutan","\u0F60\u0F56\u0FB2\u0F74\u0F42","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F0B\u0F61\u0F74\u0F63\u0F0B","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F61\u0F74\u0F63\u0F0B\u0F0B"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\u{1F1E7}\u{1F1FB}"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\u{1F1E7}\u{1F1FC}","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\u{1F1E8}\u{1F1EB}","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\u{1F1E8}\u{1F1E6}","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\u{1F1E8}\u{1F1E8}","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\u{1F1E8}\u{1F1ED}","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","conf\u0153deratio helvetica","eidgenossenschaft","elvezia","helvetie","la confederation suisse","schweiz","schweizerische eidgenossenschaft","suisse","svizra","svizzera","swiss","swiss confederation"]},{iso3:"CHL",iso2:"CL",m49:"152",name:"Chile",aliases:["\u{1F1E8}\u{1F1F1}","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\u{1F1E8}\u{1F1F3}","china pr","peoples republic of china","pr china","prc","\u4E2D\u534E\u4EBA\u6C11\u5171\u548C\u56FD","\u4E2D\u56FD"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xF4te d'Ivoire",aliases:["\u{1F1E8}\u{1F1EE}","cote ivoire","ivory coast","republic of cote divoire","republic of ivory coast","republic of the ivory coast","republique de cote divoire"]},{iso3:"CMR",iso2:"CM",m49:"120",name:"Cameroon",aliases:["\u{1F1E8}\u{1F1F2}","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\u{1F1E8}\u{1F1E9}","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","drc","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\u{1F1E8}\u{1F1EC}","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\u{1F1E8}\u{1F1F0}","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\u{1F1E8}\u{1F1F4}","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\u{1F1F0}\u{1F1F2}","comores","comores archipel","etat comorien","lunion des comores","republique des comores","republique federale et islamique des comores","republique federale islamique des comores","territoire des comores","union des comores","union of the comoros","\u0625\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631","\u0627\u062A\u062D\u0627\u062F \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u0627\u0644\u0627\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631\u064A","\u0627\u0644\u0642\u0645\u0631","\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0627\u062A\u062D\u0627\u062F\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631\u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\u{1F1E8}\u{1F1FB}","cape verde","cape verde islands","kab verd","kabu verdi","kauberdi","republic of cabo verde","republic of cape verde","republica de cabo verde"]},{iso3:"CRI",iso2:"CR",m49:"188",name:"Costa Rica",aliases:["\u{1F1E8}\u{1F1F7}","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\u{1F1E8}\u{1F1FA}","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xE7ao",aliases:["\u{1F1E8}\u{1F1FC}","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","cura\u03C2ao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\u{1F1E8}\u{1F1FD}","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\u{1F1F0}\u{1F1FE}","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\u{1F1E8}\u{1F1FE}","greek administration of southern cyprus","greek cypriot state","guney k\u0131br\u0131s","guney k\u0131br\u0131s rum cumhuriyeti","guney k\u0131br\u0131s rum kesimi","guney k\u0131br\u0131s rum yonetimi","kipriaki dhimokratia","k\u0131br\u0131s","k\u0131br\u0131s cumhuriyeti","k\u0131br\u0131s rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","\u03BA\u03C5\u03C0\u03C1\u03B9\u03B1\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1","\u03BA\u03C5\u03C0\u03C1\u03BF\u03C2"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\u{1F1E8}\u{1F1FF}","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\u{1F1E9}\u{1F1EA}","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\u{1F1E9}\u{1F1EF}","la republique de djibouti","republic of djibouti","republique de djibouti","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u064A\u0628\u0648\u062A\u064A","\u062C\u064A\u0628\u0648\u062A\u064A"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\u{1F1E9}\u{1F1F2}","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\u{1F1E9}\u{1F1F0}","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\u{1F1E9}\u{1F1F4}","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\u{1F1E9}\u{1F1FF}","peoples democratic republic of algeria","\u0627\u0644\u062C\u0632\u0627\u0626\u0631","\u0627\u0644\u062C\u0632\u0627\u064A\u0631","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062C\u0632\u0627\u0626\u0631\u064A\u0629 \u0627\u0644\u062F\u064A\u0645\u0642\u0631\u0627\u0637\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629","\u0627\u0644\u062F\u0632\u0627\u064A\u0631","\u062F\u0632\u0627\u064A\u0631"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\u{1F1EA}\u{1F1E8}","ecuadorian state","el ecuador","estado ecuatoriano","republic of ecuador","republic of equator","republic of the equator","republica del ecuador"]},{iso3:"EGY",iso2:"EG",m49:"818",name:"Egypt",aliases:["\u{1F1EA}\u{1F1EC}","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0645\u0635\u0631 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0645\u0635\u0631"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\u{1F1EA}\u{1F1F7}","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","\u0625\u0631\u062A\u0631\u064A\u0627","\u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u064A\u0631\u064A\u0627","\u0627\u0631\u064A\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u1203\u1308\u1228 \u12A4\u122D\u1275\u122B","\u12A4\u122D\u1275\u122B"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\u{1F1EA}\u{1F1ED}","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\u{1F1EA}\u{1F1F8}","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\u{1F1EA}\u{1F1EA}","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\u{1F1EA}\u{1F1F9}","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","\u12A2\u1275\u12EE\u1335\u12EB","\u12E8\u12A2\u1275\u12EE\u1335\u12EB \u134C\u12F4\u122B\u120B\u12CA \u12F4\u121E\u12AD\u122B\u1232\u12EB\u12CA \u122A\u1350\u1265\u120A\u12AD"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\u{1F1EB}\u{1F1EE}","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\u{1F1EB}\u{1F1EF}","fiji ganarajya","matanitu ko viti","matanitu tugalala o viti","republic of fiji","republic of the fiji islands","viti"]},{iso3:"FLK",iso2:"FK",m49:"238",name:"Falkland Islands (Malvinas)",aliases:["\u{1F1EB}\u{1F1F0}","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\u{1F1EB}\u{1F1F7}","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\u{1F1EB}\u{1F1F4}","faer oer","f\xE6r\xF8","faeroe is","faeroe islands","faeroe isles","f\xE6r\xF8erne","faeroes","far oer","faroe island","faroe isles","faroes","faroese islands","f\xF8roya","f\xF8royar","f\xF8royum"]},{iso3:"FSM",iso2:"FM",m49:"583",name:"Micronesia (Federated States of)",aliases:["\u{1F1EB}\u{1F1F2}","fed sts micronesia","fed sts of micronesia","federated states of micronesia","federated states of micronesia fsm","micronesia"]},{iso3:"GAB",iso2:"GA",m49:"266",name:"Gabon",aliases:["\u{1F1EC}\u{1F1E6}","gabonese republic","la republique gabonaise","le gabon","republique du gabon","republique gabonaise"]},{iso3:"GBR",iso2:"GB",m49:"826",name:"United Kingdom of Great Britain and Northern Ireland",aliases:["\u{1F1EC}\u{1F1E7}","britain","england","great britain","great britain and northern ireland","northern ireland","scotland","uk","united kingdom","wales"]},{iso3:"GEO",iso2:"GE",m49:"268",name:"Georgia",aliases:["\u{1F1EC}\u{1F1EA}","georgia country","republic of georgia","sakartvelo","\u049B\u044B\u0440\u04AD\u0442\u04D9\u044B\u043B\u0430","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD\u10E1 \u10E0\u10D4\u10E1\u10DE\u10E3\u10D1\u10DA\u10D8\u10D9\u10D0"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\u{1F1EC}\u{1F1EC}","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\u{1F1EC}\u{1F1ED}","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\u{1F1EC}\u{1F1EE}","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\u{1F1EC}\u{1F1F3}","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\u{1F1EC}\u{1F1F5}"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\u{1F1EC}\u{1F1F2}","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\u{1F1EC}\u{1F1FC}","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\u{1F1EC}\u{1F1F6}","guine equatorial","guinea ecuatorial","guinea espanola","guinee equat","guinee equatoriale","la republique de guinee equatoriale","posesiones espanolas del golfo de guinea","provincia de la guinea ecuatorial","republic of equatorial guinea","republica da guine equatorial","republica de guinea ecuatorial","territorios espanoles del golfo de guinea"]},{iso3:"GRC",iso2:"GR",m49:"300",name:"Greece",aliases:["\u{1F1EC}\u{1F1F7}","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1\u03C2","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03BF\u03C2","\u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B1\u03C2","\u03B5\u03BB\u03BB\u03B1\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\u{1F1EC}\u{1F1E9}"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\u{1F1EC}\u{1F1F1}","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\u{1F1EC}\u{1F1F9}","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\u{1F1EC}\u{1F1EB}","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\u{1F1EC}\u{1F1FA}","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\u{1F1EC}\u{1F1FE}","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\u{1F1ED}\u{1F1F0}","hksar","hong kong sar","hong kong special administrative region","hong kong special administrative region of the peoples republic of china","hongkong"]},{iso3:"HMD",iso2:"HM",m49:"334",name:"Heard Island and McDonald Islands",aliases:["\u{1F1ED}\u{1F1F2}","heard","heard & mcdonald islands","heard and macdonald islands","heard island","himi","mcdonald","mcdonald island","territory of heard island and mcdonald islands"]},{iso3:"HND",iso2:"HN",m49:"340",name:"Honduras",aliases:["\u{1F1ED}\u{1F1F3}","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\u{1F1ED}\u{1F1F7}","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\u{1F1ED}\u{1F1F9}","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\u{1F1ED}\u{1F1FA}","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\u{1F1EE}\u{1F1E9}","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\u{1F1EE}\u{1F1F2}","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\u{1F1EE}\u{1F1F3}","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","\u0906\u0930\u094D\u092F\u0935\u0930\u094D\u0924","\u0907\u0902\u0921\u093F\u092F\u093E","\u0907\u0923\u094D\u0921\u093F\u092F\u093E","\u092D\u093E\u0930\u0924","\u092D\u093E\u0930\u0924 \u0917\u0923\u0930\u093E\u091C\u094D\u092F","\u092D\u093E\u0930\u0924\u0935\u0930\u094D\u0937","\u0939\u093F\u0902\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u094B\u0938\u094D\u0924\u093E\u0928"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\u{1F1EE}\u{1F1F4}","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\u{1F1EE}\u{1F1EA}","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\u{1F1EE}\u{1F1F7}","iran","islamic rep iran","islamic republic of iran","persia","\u0627\u06CC\u0631\u0627\u0646","\u0627\u06CC\u0631\u0627\u0646\u0632\u0645\u06CC\u0646","\u067E\u0627\u0631\u0633","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u064A\u0631\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u06CC\u0631\u0627\u0646","\u0643\u0634\u0648\u0631 \u0634\u0627\u0647\u0646\u0634\u0627\u0647\u06CC \u0627\u064A\u0631\u0627\u0646"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\u{1F1EE}\u{1F1F6}","eraq","iraqe","komar i eraq","republic of iraq","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642\u064A\u0629","\u0627\u0644\u0639\u0631\u0627\u0642","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642","\u0639\u0631\u0627\u0642","\u0639\u06CE\u0631\u0627\u0642"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\u{1F1EE}\u{1F1F8}","icelandic republic","island","ly\xF0veldi\xF0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\u{1F1EE}\u{1F1F1}","erez yisrael","medinat yisrael","state of israel","yisrael","\u05D9\u05E9\u05E8\u05D0\u05DC","\u05DE\u05D3\u05D9\u05E0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\u{1F1EE}\u{1F1F9}","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\u{1F1EF}\u{1F1F2}","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\u{1F1EF}\u{1F1EA}","bailliage de jerri","bailliage de jersey","balliwick of jersey","i iersey","i jersey","iersey","iersey i","isle of jersey","jerri","jersey i","jersey island"]},{iso3:"JOR",iso2:"JO",m49:"400",name:"Jordan",aliases:["\u{1F1EF}\u{1F1F4}","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","\u0627\u0644\u0623\u0631\u062F\u0646","\u0627\u0644\u0627\u0631\u062F\u0646","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0623\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0627\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\u{1F1EF}\u{1F1F5}","state of japan","\u3042\u304D\u3064\u3057\u307E","\u304A\u304A\u3084\u3057\u307E","\u3057\u304D\u3057\u307E","\u30B8\u30E3\u30D1\u30F3","\u3057\u3093\u3057\u3085\u3046","\u306B\u3063\u307D\u3093","\u306B\u3063\u307D\u3093\u3053\u304F","\u306B\u307B\u3093","\u306B\u307B\u3093\u3053\u304F","\u3072\u3044\u305A\u308B\u304F\u306B","\u3075\u305D\u3046","\u5927\u516B\u5DDE","\u6276\u6728\u4E4B\u5730","\u6276\u6851","\u6276\u6851\u56FD","\u6577\u5CF6","\u65E5\u51FA\u308B\u56FD","\u65E5\u672C","\u6991\u6728\u4E4B\u5730","\u745E\u7A42\u56FD","\u795E\u5DDE","\u79CB\u6D25\u5CF6","\u8466\u539F\u4E2D\u56FD"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\u{1F1F0}\u{1F1FF}","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","\u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u0440\u043A"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\u{1F1F0}\u{1F1EA}","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\u{1F1F0}\u{1F1EC}","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","\u043A\u0440","\u043A\u044B\u0440\u0433\u044B\u0437 \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u043A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\u{1F1F0}\u{1F1ED}","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6","\u1796\u17D2\u179A\u17C7\u179A\u17B6\u1787\u17B6\u178E\u17B6\u1785\u1780\u17D2\u179A\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\u{1F1F0}\u{1F1EE}","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\u{1F1F0}\u{1F1F3}","federation of saint christopher and nevis","federation of saint kitts and nevis","kitts & nevis","nevis","saint christopher","saint christopher and nevis","saint kitts"]},{iso3:"KOR",iso2:"KR",m49:"410",name:"Republic of Korea",aliases:["\u{1F1F0}\u{1F1F7}","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","\uB0A8\uC870\uC120","\uB0A8\uD55C","\uB300\uD55C","\uB300\uD55C\uBBFC\uAD6D","\uCF54\uB9AC\uC544","\uD55C\uAD6D"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\u{1F1F0}\u{1F1FC}","state of kuwait","\u0627\u0644\u0643\u0648\u064A\u062A","\u062F\u0648\u0644\u0629 \u0627\u0644\u0643\u0648\u064A\u062A"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\u{1F1F1}\u{1F1E6}","laos","sathalanalat paxathipatai paxaxon lao","\u0EAA\u0EB2\u0E97\u0EB2\u0EA5\u0EB0\u0E99\u0EB0\u0EA5\u0EB1\u0E94 \u0E9B\u0EB0\u0E8A\u0EB2\u0E97\u0EB4\u0E9B\u0EB0\u0EC4\u0E95 \u0E9B\u0EB0\u0E8A\u0EB2\u0E8A\u0EBB\u0E99\u0EA5\u0EB2\u0EA7","\u0E9B\u0EB0\u0EC0\u0E97\u0E94\u0EA5\u0EB2\u0EA7","\u0EA5\u0EB2\u0EA7"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\u{1F1F1}\u{1F1E7}","lebanese republic","republic of lebanon","state of lebanon","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u0628\u0646\u0627\u0646\u064A\u0629","\u0644\u0628\u0646\u0627\u0646"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\u{1F1F1}\u{1F1F7}","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\u{1F1F1}\u{1F1FE}","state of libya","\u0627\u0644\u062C\u0645\u0627\u0647\u064A\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629 \u0627\u0644\u0625\u0634\u062A\u0631\u0627\u0643\u064A\u0629","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A","\u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A\u0646","\u062F\u0648\u0644\u0629 \u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u0628\u064A\u0627","\u0644\u064A\u0628\u064A","\u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u064A\u0629"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\u{1F1F1}\u{1F1E8}","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\u{1F1F1}\u{1F1EE}","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\u{1F1F1}\u{1F1F0}","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0B9A\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0BB7\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B88\u0BB4\u0BAE\u0BCD","\u0B9A\u0BBF\u0BB2\u0BCB\u0BA9\u0BCD","\u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF \u0DB4\u0DCA\u0DBB\u0DA2\u0DCF\u0DAD\u0DB1\u0DCA\u0DAD\u0DCA\u0DBB\u0DC0\u0DCF\u0DAF\u0DD3 \u0DC3\u0DB8\u0DCF\u0DA2\u0DC0\u0DCF\u0DAF\u0DD3 \u0DA2\u0DB1\u0DBB\u0DA2\u0DBA","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\u{1F1F1}\u{1F1F8}","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\u{1F1F1}\u{1F1F9}","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\u{1F1F1}\u{1F1FA}","grand duche","grand duche de luxembourg","grand duchy of luxembourg","gro\xDFherzogtum luxemburg","groussherzogtum letzebuerg","le grand duche de luxembourg","letzebuerg","letzebuerger land","lux","luxemburg"]},{iso3:"LVA",iso2:"LV",m49:"428",name:"Latvia",aliases:["\u{1F1F1}\u{1F1FB}","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letm\u043E","letm\u043E vabam\u043E","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\u{1F1F2}\u{1F1F4}","aomen","macao sar","macao special administrative region","macao special administrative region of the peoples republic of china","macau","macau rae da china","macau sar","macau special administrative region","macau special administrative region of the peoples republic of china","raem","regiao administrativa especial de macau","regiao administrativa especial de macau da republica popular da china","\u4E2D\u570B\u6FB3\u9580\u7279\u5225\u884C\u653F\u5340","\u6FB3\u9580"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\u{1F1F2}\u{1F1EB}","collectivite de saint martin","collectivity of saint martin","saint martin","saint martin antilles francaises","saint martin france"]},{iso3:"MAR",iso2:"MA",m49:"504",name:"Morocco",aliases:["\u{1F1F2}\u{1F1E6}","kingdom of morocco","\u0627\u0644\u0645\u063A\u0631\u0628","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0645\u063A\u0631\u0628\u064A\u0629","\u2D30\u2D4E\u2D53\u2D54 \u2D4F \u2D61\u2D30\u2D3D\u2D53\u2D5B","\u2D30\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31","\u2D5C\u2D30\u2D33\u2D4D\u2D37\u2D49\u2D5C \u2D4F \u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\u{1F1F2}\u{1F1E8}","fort hercule","la principaute de monaco","monaco rattachee au district de menton en 1793","munegu","principality and diocese of monaco","principality of monaco","principatu de munegu","principaute de monaco"]},{iso3:"MDA",iso2:"MD",m49:"498",name:"Republic of Moldova",aliases:["\u{1F1F2}\u{1F1E9}","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","\u043C\u043E\u043B\u0434\u043E\u0432\u0430"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\u{1F1F2}\u{1F1EC}","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\u{1F1F2}\u{1F1FB}","dhivehi raajjeyge jumhooriyyaa","republic of maldives","\u078B\u07A8\u0788\u07AC\u0780\u07A8 \u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07AA\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07B0\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\u{1F1F2}\u{1F1FD}","estados unidos mejicanos","estados unidos mexicanos","mejico","mexican republic","mexican united states","mexihco","mexihko","mexika sentik wexteyowalko","mexiko","mexko","mexko axkayotl","mexko tlalli","nueva espana","republica mejicana","republica mexicana","united mexican states","united states of mexico"]},{iso3:"MHL",iso2:"MH",m49:"584",name:"Marshall Islands",aliases:["\u{1F1F2}\u{1F1ED}","aelon kein ad","aolepan aorokin majel","jolet jen anij","majel","majol","republic of the marshall islands"]},{iso3:"MKD",iso2:"MK",m49:"807",name:"North Macedonia",aliases:["\u{1F1F2}\u{1F1F0}","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","macedonia former yugoslav republic of","macedonia fyr","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u043C","\u0440\u0441\u043C","\u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\u{1F1F2}\u{1F1F1}","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\u{1F1F2}\u{1F1F9}","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\u{1F1F2}\u{1F1F2}","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u200C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1017\u1019\u102C\u1015\u103C\u100A\u103A","\u1019\u103C\u1014\u103A\u1019\u102C","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1019\u103C\u1014\u103A\u1019\u102C\u1015\u103C\u100A\u103A"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\u{1F1F2}\u{1F1EA}","crna cora","\u0446\u0440\u043D\u0430 \u0433\u043E\u0440\u0430"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\u{1F1F2}\u{1F1F3}","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","\u043C\u043E\u043D\u0433\u043E\u043B","\u043C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441","\u182E\u1824\u1829\u182D\u1824\u182F \u1824\u182F\u1824\u1830"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\u{1F1F2}\u{1F1F5}","cnmi","commonwealth of the northern maria islands","commonwealth of the northern mariana islands","northern marianas","notte marianas","sankattan siha na islas marianas"]},{iso3:"MOZ",iso2:"MZ",m49:"508",name:"Mozambique",aliases:["\u{1F1F2}\u{1F1FF}","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\u{1F1F2}\u{1F1F7}","islamic republic of mauritania","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629 \u0627\u0644\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0629","\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\u{1F1F2}\u{1F1F8}","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\u{1F1F2}\u{1F1F6}","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\u{1F1F2}\u{1F1FA}","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\u{1F1F2}\u{1F1FC}","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\u{1F1F2}\u{1F1FE}","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\u{1F1FE}\u{1F1F9}","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\u{1F1F3}\u{1F1E6}","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\u{1F1F3}\u{1F1E8}","caledonie","kanaky","kanaky nouvelle caledonie","nouvelle caledonie","territoire de la nouvelle caledonie et dependances","territoire des nouvelle caledonie et dependances","territory of new caledonia and dependencies"]},{iso3:"NER",iso2:"NE",m49:"562",name:"Niger",aliases:["\u{1F1F3}\u{1F1EA}","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\u{1F1F3}\u{1F1EB}","norfolk island australia","norfolk island other territories","norfolk island other territories australia","territory of norfolk island"]},{iso3:"NGA",iso2:"NG",m49:"566",name:"Nigeria",aliases:["\u{1F1F3}\u{1F1EC}","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\u{1F1F3}\u{1F1EE}","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\u{1F1F3}\u{1F1FA}"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\u{1F1F3}\u{1F1F1}","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\u{1F1F3}\u{1F1F4}","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\u{1F1F3}\u{1F1F5}","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","\u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930\u093E\u0924\u094D\u092E\u0915 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u0940\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Naoero",aliases:["\u{1F1F3}\u{1F1F7}","nauru","pleasant island","republic of naoero","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\u{1F1F3}\u{1F1FF}","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\u{1F1F4}\u{1F1F2}","sultanate of oman","uman","\u0633\u0644\u0637\u0646\u0629 \u0639\u0645\u0627\u0646","\u0639\u0645\u0627\u0646"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\u{1F1F5}\u{1F1F0}","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","\u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u06C1\u0648\u0631\u06CC\u06C1 \u067E\u0627\u06A9\u0633\u062A\u0627\u0646","\u0628\u0627\u06A9\u0633\u062A\u0627\u0646","\u067E\u0627\u06A9\u0633\u062A\u0627\u0646"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\u{1F1F5}\u{1F1E6}","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\u{1F1F5}\u{1F1F3}","occas island","pisskern ali\u0435n","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\u{1F1F5}\u{1F1EA}","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\u{1F1F5}\u{1F1ED}","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\u{1F1F5}\u{1F1FC}","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","\u30D1\u30E9\u30AA","\u30D1\u30E9\u30AA\u5171\u548C\u56FD"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\u{1F1F5}\u{1F1EC}","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\u{1F1F5}\u{1F1F1}","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\u{1F1F5}\u{1F1F7}","boriken","borinquen","boriquen","commonwealth of puerto rico","estado libre asociado de puerto rico","free associated state of puerto rico","isla del encanto","island of enchantment","isle of enchantment","mancomunidad de puerto rico","porto rico","territorio de puerto rico","territorio estadounidense de puerto rico","territory of porto rico","territory of puerto rico"]},{iso3:"PRK",iso2:"KP",m49:"408",name:"Democratic People's Republic of Korea",aliases:["\u{1F1F0}\u{1F1F5}","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","\uACF5\uD654\uAD6D","\uBD81\uC870\uC120","\uBD81\uD55C","\uC870\uC120","\uC870\uC120\uBBFC\uC8FC\uC8FC\uC758\uC778\uBBFC\uACF5\uD654\uAD6D"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\u{1F1F5}\u{1F1F9}","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\u{1F1F5}\u{1F1FE}","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\u{1F1F5}\u{1F1F8}","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","\u0623\u0631\u0627\u0636\u064A \u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0623\u0631\u0627\u0636\u064A \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0648\u0637\u0646\u064A\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0636\u0641\u0629 \u0627\u0644\u063A\u0631\u0628\u064A\u0629 \u0648\u0642\u0637\u0627\u0639 \u063A\u0632\u0629","\u062F\u0648\u0644\u0629 \u0641\u0644\u0633\u0637\u064A\u0646","\u0641\u0644\u0633\u0637\u064A\u0646"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\u{1F1F5}\u{1F1EB}","f oh","french establishments in oceania","french oceania","french settlements in oceania","polynesie francaise","territoire de la polynesie francaise","territory of french polynesia"]},{iso3:"QAT",iso2:"QA",m49:"634",name:"Qatar",aliases:["\u{1F1F6}\u{1F1E6}","state of qatar","\u0625\u0645\u0627\u0631\u0629 \u0642\u0637\u0631","\u062F\u0648\u0644\u0629 \u0642\u0637\u0631","\u0642\u0637\u0631"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xE9union",aliases:["\u{1F1F7}\u{1F1EA}","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\u{1F1F7}\u{1F1F4}"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\u{1F1F7}\u{1F1FA}","federation of russia","russia","\u0440\u043E\u0441\u0441\u0438\u0438\u0441\u043A\u0430\u044F \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044F","\u0440\u043E\u0441\u0441\u0438\u044F","\u0440\u0444"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\u{1F1F7}\u{1F1FC}","igihugu cyimisozi igihumbi","jamhuri ya rwanda","la republique du rwanda","land of a thousand hills","republic of rwanda","republika yu rwanda","republique du rwanda","republique rwandaise","repubulika yu rwanda","u rwanda"]},{iso3:"SAU",iso2:"SA",m49:"682",name:"Saudi Arabia",aliases:["\u{1F1F8}\u{1F1E6}","kingdom of saudi arabia","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0647","\u0627\u0644\u0645\u0645\u0644\u0643\u0647 \u0627\u0644\u0639\u0631\u0628\u064A\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0628\u0644\u0627\u062F \u0627\u0644\u062D\u0631\u0645\u064A\u0646 \u0627\u0644\u0634\u0631\u064A\u0641\u064A\u0646","\u062F\u0648\u0644\u0629 \u0622\u0644 \u0633\u0639\u0648\u062F","\u0633\u0639\u0648\u062F\u064A\u0629","\u0633\u0639\u0648\u062F\u064A\u0647","\u0645\u0646\u0628\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","\u0645\u0647\u0628\u0637 \u0627\u0644\u0648\u062D\u064A"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\u{1F1F8}\u{1F1E9}","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","\u0627\u0644\u0633\u0648\u062F\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0633\u0648\u062F\u0627\u0646"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\u{1F1F8}\u{1F1F3}","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\u{1F1F8}\u{1F1EC}","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BC8","\u0BB8\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BC2\u0BB0\u0BCD"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\u{1F1EC}\u{1F1F8}","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\u{1F1F8}\u{1F1ED}","ascension","saint helena and dependencies","saint helena ascension and tristan da cunha","tristan da cunha"]},{iso3:"SJM",iso2:"SJ",m49:"744",name:"Svalbard and Jan Mayen Islands",aliases:["\u{1F1F8}\u{1F1EF}","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\u{1F1F8}\u{1F1E7}"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\u{1F1F8}\u{1F1F1}","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\u{1F1F8}\u{1F1FB}","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\u{1F1F8}\u{1F1F2}","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\u{1F1F8}\u{1F1F4}","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","\u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u062F\u064A\u0645\u0648\u0642\u0631\u0627\u0637\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u0641\u064A\u062F\u0631\u0627\u0644\u064A\u0629","\u0635\u0648\u0645\u0627\u0644"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\u{1F1F5}\u{1F1F2}","collectivite territoriale de saint pierre et miquelon","miquelon","saint pierre","saint pierre et miquelon","territorial collectivity of saint pierre and miquelon"]},{iso3:"SRB",iso2:"RS",m49:"688",name:"Serbia",aliases:["\u{1F1F7}\u{1F1F8}","republic of serbia","republika srbija","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0440\u0431\u0438\u0458\u0430","\u0441\u0440\u0431\u0438\u0458\u0430"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\u{1F1F8}\u{1F1F8}","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\u{1F1F8}\u{1F1F9}","democratic republic of sao tome and principe","principe","republica democratica de sao tome e principe","sao tome","sao tome e principe","sao tome og principe"]},{iso3:"SUR",iso2:"SR",m49:"740",name:"Suriname",aliases:["\u{1F1F8}\u{1F1F7}","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\u{1F1F8}\u{1F1F0}","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\u{1F1F8}\u{1F1EE}","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\u{1F1F8}\u{1F1EA}","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\u{1F1F8}\u{1F1FF}","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\u{1F1F8}\u{1F1FD}","country of sint maarten","eilandgebied sint maarten","land sint maarten","saint maarten","saint martin dutch part","sint maarten","sint martin"]},{iso3:"SYC",iso2:"SC",m49:"690",name:"Seychelles",aliases:["\u{1F1F8}\u{1F1E8}","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\u{1F1F8}\u{1F1FE}","surya","syria","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0648\u0631\u064A\u0629","\u0627\u0644\u0634\u0627\u0645","\u0633\u0648\u0631\u064A\u0627","\u0633\u0648\u0631\u064A\u0629"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\u{1F1F9}\u{1F1E8}","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\u{1F1F9}\u{1F1E9}","la republique du tchad","republic of chad","republique du tchad","tchad","\u062A\u0634\u0627\u062F","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062A\u0634\u0627\u062F"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\u{1F1F9}\u{1F1EC}","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\u{1F1F9}\u{1F1ED}","kingdom of siam","kingdom of thailand","siam","thai","\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E2A\u0E22\u0E32\u0E21","\u0E40\u0E21\u0E37\u0E2D\u0E07\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E2A\u0E22\u0E32\u0E21","\u0E2A\u0E22\u0E32\u0E21"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\u{1F1F9}\u{1F1EF}","jumhurii tojikiston","republic of tajikistan","\u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D","\u0442\u04B7","\u0442\u04B7\u043A","\u04B7\u0442","\u04B7\u0443\u043C\u04B3\u0443\u0440\u0438\u0438 \u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\u{1F1F9}\u{1F1F0}","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\u{1F1F9}\u{1F1F2}"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\u{1F1F9}\u{1F1F1}","democratic republic of timor leste","east timor","republica democratica de timor leste","republika demokratika timor lorosae","timor loro sae","timor lorosae"]},{iso3:"TON",iso2:"TO",m49:"776",name:"Tonga",aliases:["\u{1F1F9}\u{1F1F4}","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\u{1F1F9}\u{1F1F9}","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\u{1F1F9}\u{1F1F3}","republic of tunisia","tunisian republic","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062A\u0648\u0646\u0633\u064A\u0629","\u062A\u0648\u0646\u0633","\u062A\u0648\u0646\u0633 \u0627\u0644\u062E\u0636\u0631\u0627\u0621"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xFCrkiye",aliases:["\u{1F1F9}\u{1F1F7}","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\u{1F1F9}\u{1F1FB}","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\u{1F1F9}\u{1F1FC}","chinese republic","chinese taipei","chunghwa minkuo","chunghwa minkwo","conghwaminku","cunghwa minkwo","cyukamingkok","formosa","nanasian","nationalist china","republic of china","republic of china taiwan","roc","taivang","taiwan province of china","taiwan roc","taywan","taywang","teywan","\u4E2D\u83EF\u6C11\u570B","\u4E2D\u83EF\u6C11\u570B\uFF08\u81FA\u7063\uFF09","\u4E2D\u83EF\u81FA\u5317","\u53F0\u7063","\u81FA\u6F8E\u91D1\u99AC","\u81FA\u7063"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\u{1F1F9}\u{1F1FF}","jamhuri ya muungano wa tanganyika na zanzibar","jamhuri ya muungano wa tanzania","tanzania","tanzania jamhuri ya muungano wa","tanzania united republic of","united republic of tanganyika and zanzibar"]},{iso3:"UGA",iso2:"UG",m49:"800",name:"Uganda",aliases:["\u{1F1FA}\u{1F1EC}","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\u{1F1FA}\u{1F1E6}","ukr","ukraina","ukrainia","ukrayina","\u0432\u043A\u0440\u0430\u0456\u043D\u0430","\u0443\u043A\u0440\u0430\u0456\u043D\u0430"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\u{1F1FA}\u{1F1F2}","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\u{1F1FA}\u{1F1FE}","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\u{1F1FA}\u{1F1F8}","amelika","amelika hui pu ia","amelika huipuia","amelika mokuaina hui pu ia","america","eeuu","eeuu de america","estados unidos","estados unidos de america","los estados","los estados unidos","los estados unidos de america","mokuaina hui pu ia","union americana","united states","us","us of a","us of america","usa"]},{iso3:"UZB",iso2:"UZ",m49:"860",name:"Uzbekistan",aliases:["\u{1F1FA}\u{1F1FF}","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\u{1F1FB}\u{1F1E6}","citta del vaticano","civitas vaticana","colle vaticano","papal state","santa sede citta del vaticano","state of vatican city","stato della citta del vaticano","status civitatis vaticanae","status civitatis vatican\xE6","vatican","vatican city","vatican city state","vaticano"]},{iso3:"VCT",iso2:"VC",m49:"670",name:"Saint Vincent and the Grenadines",aliases:["\u{1F1FB}\u{1F1E8}","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\u{1F1FB}\u{1F1EA}","bolivarian republic of venezuela","br venezuela","estados unidos de venezuela","rb venezuela","republic of venezuela","republica bolivariana de venezuela","republica de venezuela","venezuela"]},{iso3:"VGB",iso2:"VG",m49:"092",name:"British Virgin Islands",aliases:["\u{1F1FB}\u{1F1EC}","bvi","virgin islands british","virgin islands of the united kingdom","virgin islands united kingdom"]},{iso3:"VIR",iso2:"VI",m49:"850",name:"United States Virgin Islands",aliases:["\u{1F1FB}\u{1F1EE}","american virgin islands","us virgin islands","virgin islands of the united states","virgin islands us"]},{iso3:"VNM",iso2:"VN",m49:"704",name:"Viet Nam",aliases:["\u{1F1FB}\u{1F1F3}","chxhcn viet nam","chxhcnvn","cong hoa xa hoi chu nghia viet nam","socialist republic of viet nam","socialist republic of vietnam","vietnam"]},{iso3:"VUT",iso2:"VU",m49:"548",name:"Vanuatu",aliases:["\u{1F1FB}\u{1F1FA}","la republique du vanuatu","republic of vanuatu","republique de vanuatu","ripablik blong vanuatu"]},{iso3:"WLF",iso2:"WF",m49:"876",name:"Wallis and Futuna Islands",aliases:["\u{1F1FC}\u{1F1EB}","collectivite des iles wallis et futuna","emeni simete","futuna","iles wallis et futuna","makape papilio","territoire de wallis et futuna","territoire des iles wallis et futuna","wallis","wallis & futuna","wallis et futuna"]},{iso3:"WSM",iso2:"WS",m49:"882",name:"Samoa",aliases:["\u{1F1FC}\u{1F1F8}","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\u{1F1FE}\u{1F1EA}","rep yemen","republic of yemen","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u064A\u0645\u0646\u064A\u0629","\u0627\u0644\u064A\u0645\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u064A\u0645\u0646"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\u{1F1FF}\u{1F1E6}","aferika borwa","aforika borwa","afrika boroa","afrika borwa","afrika dzonga","afurika tshipembe","emzantsi afrika","iningizimu afrika","iriphabhulikhi ye ningizimu afrika","iriphabhulikhi yeningizimu afrika","iriphabhuliki yase ningizimu afrika","iriphabliki yasemzantsi afrika","iriphabliki yaseningizimu afrika","iriphabliki yom zantsi afrika","isewula afrika","repabliki ya afrika borwa","rephaboliki ya aforika borwa","rephaboliki ya afrika borwa","republic of south africa","republiek van suid afrika","riphabliki ra afrika dzonga","rsa","suid afrika","umzansi","umzantsi afrika","unie van suid afrika","union of south africa"]},{iso3:"ZMB",iso2:"ZM",m49:"894",name:"Zambia",aliases:["\u{1F1FF}\u{1F1F2}","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\u{1F1FF}\u{1F1FC}","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function jJ(e){return e.normalize("NFD").replace(/[\u0300-\u036F]/g,"").normalize("NFC").toLowerCase().replace(/[\u064B-\u065F]/g,"").replace(/['\u2018\u2019\u02BB\u02BC\u02BD\u02C8\u2032`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-\u2013\u2014]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function FUe(e){let t=new Map,r=new Map,i=new Map;for(let s of e)t.set(s.iso3,s),s.iso2&&r.set(s.iso2,s),s.m49&&i.set(s.m49,s);let n=new Map;for(let s of e)for(let l of[s.name,...s.aliases]){let u=jJ(l),c=n.get(u);if(c!==void 0&&c!==s.iso3)throw new Error(`Duplicate name/alias "${u}": ${c} vs ${s.iso3}`);n.set(u,s.iso3)}function a(s){if(s==null)return;let l=String(s).trim();if(!l)return;if(/^\d+$/.test(l)){let c=i.get(String(parseInt(l,10)).padStart(3,"0"));if(c)return c}if(/^[A-Za-z]{2}$/.test(l)){let c=r.get(l.toUpperCase());if(c)return c}if(/^[A-Za-z]{3}$/.test(l)){let c=t.get(l.toUpperCase());if(c)return c}let u=n.get(jJ(l));return u===void 0?void 0:t.get(u)}function o(s){var l;return(l=a(s))==null?void 0:l.iso3}return{lookup:a,lookupAlpha3:o,byAlpha3:t,byAlpha2:r,byM49:i}}var pE=FUe(DUe),ytr=pE.lookup,xtr=pE.lookupAlpha3,_tr=pE.byAlpha3,btr=pE.byAlpha2,wtr=pE.byM49});var BI=W(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});var Wh=63710088e-1,YJ={centimeters:Wh*100,centimetres:Wh*100,degrees:360/(2*Math.PI),feet:Wh*3.28084,inches:Wh*39.37,kilometers:Wh/1e3,kilometres:Wh/1e3,meters:Wh,metres:Wh,miles:Wh/1609.344,millimeters:Wh*1e3,millimetres:Wh*1e3,nauticalmiles:Wh/1852,radians:1,yards:Wh*1.0936},WJ={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 M2(e,t,r={}){let i={type:"Feature"};return(r.id===0||r.id)&&(i.id=r.id),r.bbox&&(i.bbox=r.bbox),i.properties=t||{},i.geometry=e,i}function Ttr(e,t,r={}){switch(e){case"Point":return XJ(t).geometry;case"LineString":return KJ(t).geometry;case"Polygon":return ZJ(t).geometry;case"MultiPoint":return RUe(t).geometry;case"MultiLineString":return IUe(t).geometry;case"MultiPolygon":return zUe(t).geometry;default:throw new Error(e+" is invalid")}}function XJ(e,t,r={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!RI(e[0])||!RI(e[1]))throw new Error("coordinates must contain numbers");return M2({type:"Point",coordinates:e},t,r)}function Atr(e,t,r={}){return zI(e.map(i=>XJ(i,t)),r)}function ZJ(e,t,r={}){for(let n of e){if(n.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(n[n.length-1].length!==n[0].length)throw new Error("First and last Position are not equivalent.");for(let a=0;a<n[n.length-1].length;a++)if(n[n.length-1][a]!==n[0][a])throw new Error("First and last Position are not equivalent.")}return M2({type:"Polygon",coordinates:e},t,r)}function Mtr(e,t,r={}){return zI(e.map(i=>ZJ(i,t)),r)}function KJ(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return M2({type:"LineString",coordinates:e},t,r)}function Str(e,t,r={}){return zI(e.map(i=>KJ(i,t)),r)}function zI(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function IUe(e,t,r={}){return M2({type:"MultiLineString",coordinates:e},t,r)}function RUe(e,t,r={}){return M2({type:"MultiPoint",coordinates:e},t,r)}function zUe(e,t,r={}){return M2({type:"MultiPolygon",coordinates:e},t,r)}function Etr(e,t,r={}){return M2({type:"GeometryCollection",geometries:e},t,r)}function ktr(e,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r}function BUe(e,t="kilometers"){let r=YJ[t];if(!r)throw new Error(t+" units is invalid");return e*r}function JJ(e,t="kilometers"){let r=YJ[t];if(!r)throw new Error(t+" units is invalid");return e/r}function Ctr(e,t){return qUe(JJ(e,t))}function Dtr(e){let t=e%360;return t<0&&(t+=360),t}function Ftr(e){return e=e%360,e>180?e-360:e<-180?e+360:e}function qUe(e){return e%(2*Math.PI)*180/Math.PI}function Ltr(e){return e%360*Math.PI/180}function Ptr(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return BUe(JJ(e,t),r)}function Itr(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let i=WJ[t];if(!i)throw new Error("invalid original units");let n=WJ[r];if(!n)throw new Error("invalid final units");return e/i*n}function RI(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function Rtr(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function ztr(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(t=>{if(!RI(t))throw new Error("bbox must only contain numbers")})}function Btr(e){if(!e)throw new Error("id is required");if(["string","number"].indexOf(typeof e)===-1)throw new Error("id must be a number or a string")}zo.areaFactors=WJ;zo.azimuthToBearing=Ftr;zo.bearingToAzimuth=Dtr;zo.convertArea=Itr;zo.convertLength=Ptr;zo.degreesToRadians=Ltr;zo.earthRadius=Wh;zo.factors=YJ;zo.feature=M2;zo.featureCollection=zI;zo.geometry=Ttr;zo.geometryCollection=Etr;zo.isNumber=RI;zo.isObject=Rtr;zo.lengthToDegrees=Ctr;zo.lengthToRadians=JJ;zo.lineString=KJ;zo.lineStrings=Str;zo.multiLineString=IUe;zo.multiPoint=RUe;zo.multiPolygon=zUe;zo.point=XJ;zo.points=Atr;zo.polygon=ZJ;zo.polygons=Mtr;zo.radiansToDegrees=qUe;zo.radiansToLength=BUe;zo.round=ktr;zo.validateBBox=ztr;zo.validateId=Btr});var OI=W(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});var Df=BI();function vE(e,t,r){if(e!==null)for(var i,n,a,o,s,l,u,c=0,f=0,h,d=e.type,p=d==="FeatureCollection",v=d==="Feature",m=p?e.features.length:1,g=0;g<m;g++){u=p?e.features[g].geometry:v?e.geometry:e,h=u?u.type==="GeometryCollection":!1,s=h?u.geometries.length:1;for(var w=0;w<s;w++){var b=0,_=0;if(o=h?u.geometries[w]:u,o!==null){l=o.coordinates;var M=o.type;switch(c=r&&(M==="Polygon"||M==="MultiPolygon")?1:0,M){case null:break;case"Point":if(t(l,f,g,b,_)===!1)return!1;f++,b++;break;case"LineString":case"MultiPoint":for(i=0;i<l.length;i++){if(t(l[i],f,g,b,_)===!1)return!1;f++,M==="MultiPoint"&&b++}M==="LineString"&&b++;break;case"Polygon":case"MultiLineString":for(i=0;i<l.length;i++){for(n=0;n<l[i].length-c;n++){if(t(l[i][n],f,g,b,_)===!1)return!1;f++}M==="MultiLineString"&&b++,M==="Polygon"&&_++}M==="Polygon"&&b++;break;case"MultiPolygon":for(i=0;i<l.length;i++){for(_=0,n=0;n<l[i].length;n++){for(a=0;a<l[i][n].length-c;a++){if(t(l[i][n][a],f,g,b,_)===!1)return!1;f++}_++}b++}break;case"GeometryCollection":for(i=0;i<o.geometries.length;i++)if(vE(o.geometries[i],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function qtr(e,t,r,i){var n=r;return vE(e,function(a,o,s,l,u){o===0&&r===void 0?n=a:n=t(n,a,o,s,l,u)},i),n}function OUe(e,t){var r;switch(e.type){case"FeatureCollection":for(r=0;r<e.features.length&&t(e.features[r].properties,r)!==!1;r++);break;case"Feature":t(e.properties,0);break}}function Otr(e,t,r){var i=r;return OUe(e,function(n,a){a===0&&r===void 0?i=n:i=t(i,n,a)}),i}function NUe(e,t){if(e.type==="Feature")t(e,0);else if(e.type==="FeatureCollection")for(var r=0;r<e.features.length&&t(e.features[r],r)!==!1;r++);}function Ntr(e,t,r){var i=r;return NUe(e,function(n,a){a===0&&r===void 0?i=n:i=t(i,n,a)}),i}function Utr(e){var t=[];return vE(e,function(r){t.push(r)}),t}function QJ(e,t){var r,i,n,a,o,s,l,u,c,f,h=0,d=e.type==="FeatureCollection",p=e.type==="Feature",v=d?e.features.length:1;for(r=0;r<v;r++){for(s=d?e.features[r].geometry:p?e.geometry:e,u=d?e.features[r].properties:p?e.properties:{},c=d?e.features[r].bbox:p?e.bbox:void 0,f=d?e.features[r].id:p?e.id:void 0,l=s?s.type==="GeometryCollection":!1,o=l?s.geometries.length:1,n=0;n<o;n++){if(a=l?s.geometries[n]:s,a===null){if(t(null,h,u,c,f)===!1)return!1;continue}switch(a.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(a,h,u,c,f)===!1)return!1;break}case"GeometryCollection":{for(i=0;i<a.geometries.length;i++)if(t(a.geometries[i],h,u,c,f)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}h++}}function Vtr(e,t,r){var i=r;return QJ(e,function(n,a,o,s,l){a===0&&r===void 0?i=n:i=t(i,n,a,o,s,l)}),i}function qI(e,t){QJ(e,function(r,i,n,a,o){var s=r===null?null:r.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return t(Df.feature.call(void 0,r,n,{bbox:a,id:o}),i,0)===!1?!1:void 0}var l;switch(s){case"MultiPoint":l="Point";break;case"MultiLineString":l="LineString";break;case"MultiPolygon":l="Polygon";break}for(var u=0;u<r.coordinates.length;u++){var c=r.coordinates[u],f={type:l,coordinates:c};if(t(Df.feature.call(void 0,f,n),i,u)===!1)return!1}})}function Gtr(e,t,r){var i=r;return qI(e,function(n,a,o){a===0&&o===0&&r===void 0?i=n:i=t(i,n,a,o)}),i}function UUe(e,t){qI(e,function(r,i,n){var a=0;if(r.geometry){var o=r.geometry.type;if(!(o==="Point"||o==="MultiPoint")){var s,l=0,u=0,c=0;if(vE(r,function(f,h,d,p,v){if(s===void 0||i>l||p>u||v>c){s=f,l=i,u=p,c=v,a=0;return}var m=Df.lineString.call(void 0,[s,f],r.properties);if(t(m,i,n,v,a)===!1)return!1;a++,s=f})===!1)return!1}}})}function Htr(e,t,r){var i=r,n=!1;return UUe(e,function(a,o,s,l,u){n===!1&&r===void 0?i=a:i=t(i,a,o,s,l,u),n=!0}),i}function VUe(e,t){if(!e)throw new Error("geojson is required");qI(e,function(r,i,n){if(r.geometry!==null){var a=r.geometry.type,o=r.geometry.coordinates;switch(a){case"LineString":if(t(r,i,n,0,0)===!1)return!1;break;case"Polygon":for(var s=0;s<o.length;s++)if(t(Df.lineString.call(void 0,o[s],r.properties),i,n,s)===!1)return!1;break}}})}function jtr(e,t,r){var i=r;return VUe(e,function(n,a,o,s){a===0&&r===void 0?i=n:i=t(i,n,a,o,s)}),i}function $tr(e,t){if(t=t||{},!Df.isObject.call(void 0,t))throw new Error("options is invalid");var r=t.featureIndex||0,i=t.multiFeatureIndex||0,n=t.geometryIndex||0,a=t.segmentIndex||0,o=t.properties,s;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),o=o||e.features[r].properties,s=e.features[r].geometry;break;case"Feature":o=o||e.properties,s=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":s=e;break;default:throw new Error("geojson is invalid")}if(s===null)return null;var l=s.coordinates;switch(s.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=l.length+a-1),Df.lineString.call(void 0,[l[a],l[a+1]],o,t);case"Polygon":return n<0&&(n=l.length+n),a<0&&(a=l[n].length+a-1),Df.lineString.call(void 0,[l[n][a],l[n][a+1]],o,t);case"MultiLineString":return i<0&&(i=l.length+i),a<0&&(a=l[i].length+a-1),Df.lineString.call(void 0,[l[i][a],l[i][a+1]],o,t);case"MultiPolygon":return i<0&&(i=l.length+i),n<0&&(n=l[i].length+n),a<0&&(a=l[i][n].length-a-1),Df.lineString.call(void 0,[l[i][n][a],l[i][n][a+1]],o,t)}throw new Error("geojson is invalid")}function Wtr(e,t){if(t=t||{},!Df.isObject.call(void 0,t))throw new Error("options is invalid");var r=t.featureIndex||0,i=t.multiFeatureIndex||0,n=t.geometryIndex||0,a=t.coordIndex||0,o=t.properties,s;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),o=o||e.features[r].properties,s=e.features[r].geometry;break;case"Feature":o=o||e.properties,s=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":s=e;break;default:throw new Error("geojson is invalid")}if(s===null)return null;var l=s.coordinates;switch(s.type){case"Point":return Df.point.call(void 0,l,o,t);case"MultiPoint":return i<0&&(i=l.length+i),Df.point.call(void 0,l[i],o,t);case"LineString":return a<0&&(a=l.length+a),Df.point.call(void 0,l[a],o,t);case"Polygon":return n<0&&(n=l.length+n),a<0&&(a=l[n].length+a),Df.point.call(void 0,l[n][a],o,t);case"MultiLineString":return i<0&&(i=l.length+i),a<0&&(a=l[i].length+a),Df.point.call(void 0,l[i][a],o,t);case"MultiPolygon":return i<0&&(i=l.length+i),n<0&&(n=l[i].length+n),a<0&&(a=l[i][n].length-a),Df.point.call(void 0,l[i][n][a],o,t)}throw new Error("geojson is invalid")}ac.coordAll=Utr;ac.coordEach=vE;ac.coordReduce=qtr;ac.featureEach=NUe;ac.featureReduce=Ntr;ac.findPoint=Wtr;ac.findSegment=$tr;ac.flattenEach=qI;ac.flattenReduce=Gtr;ac.geomEach=QJ;ac.geomReduce=Vtr;ac.lineEach=VUe;ac.lineReduce=jtr;ac.propEach=OUe;ac.propReduce=Otr;ac.segmentEach=UUe;ac.segmentReduce=Htr});var WUe=W(NI=>{"use strict";Object.defineProperty(NI,"__esModule",{value:!0});var GUe=BI(),Ytr=OI();function $Ue(e){return Ytr.geomReduce.call(void 0,e,(t,r)=>t+Xtr(r),0)}function Xtr(e){let t=0,r;switch(e.type){case"Polygon":return HUe(e.coordinates);case"MultiPolygon":for(r=0;r<e.coordinates.length;r++)t+=HUe(e.coordinates[r]);return t;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function HUe(e){let t=0;if(e&&e.length>0){t+=Math.abs(jUe(e[0]));for(let r=1;r<e.length;r++)t-=Math.abs(jUe(e[r]))}return t}var Ztr=GUe.earthRadius*GUe.earthRadius/2,eQ=Math.PI/180;function jUe(e){let t=e.length-1;if(t<=2)return 0;let r=0,i=0;for(;i<t;){let n=e[i],a=e[i+1===t?0:i+1],o=e[i+2>=t?(i+2)%t:i+2],s=n[0]*eQ,l=a[1]*eQ,u=o[0]*eQ;r+=(u-s)*Math.sin(l),i++}return r*Ztr}var Ktr=$Ue;NI.area=$Ue;NI.default=Ktr});var XUe=W(UI=>{"use strict";Object.defineProperty(UI,"__esModule",{value:!0});var Jtr=BI(),Qtr=OI();function YUe(e,t={}){let r=0,i=0,n=0;return Qtr.coordEach.call(void 0,e,function(a){r+=a[0],i+=a[1],n++},!0),Jtr.point.call(void 0,[r/n,i/n],t.properties)}var err=YUe;UI.centroid=YUe;UI.default=err});var KUe=W((VI,ZUe)=>{(function(e,t){t(typeof VI=="object"&&typeof ZUe!="undefined"?VI:e.d3=e.d3||{})})(VI,(function(e){"use strict";function t(U,V){return U<V?-1:U>V?1:U>=V?0:NaN}function r(U){return U.length===1&&(U=i(U)),{left:function(V,X,H,G){for(H==null&&(H=0),G==null&&(G=V.length);H<G;){var Q=H+G>>>1;U(V[Q],X)<0?H=Q+1:G=Q}return H},right:function(V,X,H,G){for(H==null&&(H=0),G==null&&(G=V.length);H<G;){var Q=H+G>>>1;U(V[Q],X)>0?G=Q:H=Q+1}return H}}}function i(U){return function(V,X){return t(U(V),X)}}var n=r(t),a=n.right,o=n.left;function s(U,V){V==null&&(V=l);for(var X=0,H=U.length-1,G=U[0],Q=new Array(H<0?0:H);X<H;)Q[X]=V(G,G=U[++X]);return Q}function l(U,V){return[U,V]}function u(U,V,X){var H=U.length,G=V.length,Q=new Array(H*G),te,ce,ge,Ce;for(X==null&&(X=l),te=ge=0;te<H;++te)for(Ce=U[te],ce=0;ce<G;++ce,++ge)Q[ge]=X(Ce,V[ce]);return Q}function c(U,V){return V<U?-1:V>U?1:V>=U?0:NaN}function f(U){return U===null?NaN:+U}function h(U,V){var X=U.length,H=0,G=-1,Q=0,te,ce,ge=0;if(V==null)for(;++G<X;)isNaN(te=f(U[G]))||(ce=te-Q,Q+=ce/++H,ge+=ce*(te-Q));else for(;++G<X;)isNaN(te=f(V(U[G],G,U)))||(ce=te-Q,Q+=ce/++H,ge+=ce*(te-Q));if(H>1)return ge/(H-1)}function d(U,V){var X=h(U,V);return X&&Math.sqrt(X)}function p(U,V){var X=U.length,H=-1,G,Q,te;if(V==null){for(;++H<X;)if((G=U[H])!=null&&G>=G)for(Q=te=G;++H<X;)(G=U[H])!=null&&(Q>G&&(Q=G),te<G&&(te=G))}else for(;++H<X;)if((G=V(U[H],H,U))!=null&&G>=G)for(Q=te=G;++H<X;)(G=V(U[H],H,U))!=null&&(Q>G&&(Q=G),te<G&&(te=G));return[Q,te]}var v=Array.prototype,m=v.slice,g=v.map;function w(U){return function(){return U}}function b(U){return U}function _(U,V,X){U=+U,V=+V,X=(G=arguments.length)<2?(V=U,U=0,1):G<3?1:+X;for(var H=-1,G=Math.max(0,Math.ceil((V-U)/X))|0,Q=new Array(G);++H<G;)Q[H]=U+H*X;return Q}var M=Math.sqrt(50),x=Math.sqrt(10),T=Math.sqrt(2);function A(U,V,X){var H,G=-1,Q,te,ce;if(V=+V,U=+U,X=+X,U===V&&X>0)return[U];if((H=V<U)&&(Q=U,U=V,V=Q),(ce=y(U,V,X))===0||!isFinite(ce))return[];if(ce>0)for(U=Math.ceil(U/ce),V=Math.floor(V/ce),te=new Array(Q=Math.ceil(V-U+1));++G<Q;)te[G]=(U+G)*ce;else for(U=Math.floor(U*ce),V=Math.ceil(V*ce),te=new Array(Q=Math.ceil(U-V+1));++G<Q;)te[G]=(U-G)/ce;return H&&te.reverse(),te}function y(U,V,X){var H=(V-U)/Math.max(0,X),G=Math.floor(Math.log(H)/Math.LN10),Q=H/Math.pow(10,G);return G>=0?(Q>=M?10:Q>=x?5:Q>=T?2:1)*Math.pow(10,G):-Math.pow(10,-G)/(Q>=M?10:Q>=x?5:Q>=T?2:1)}function E(U,V,X){var H=Math.abs(V-U)/Math.max(0,X),G=Math.pow(10,Math.floor(Math.log(H)/Math.LN10)),Q=H/G;return Q>=M?G*=10:Q>=x?G*=5:Q>=T&&(G*=2),V<U?-G:G}function S(U){return Math.ceil(Math.log(U.length)/Math.LN2)+1}function C(){var U=b,V=p,X=S;function H(G){var Q,te=G.length,ce,ge=new Array(te);for(Q=0;Q<te;++Q)ge[Q]=U(G[Q],Q,G);var Ce=V(ge),be=Ce[0],he=Ce[1],oe=X(ge,be,he);Array.isArray(oe)||(oe=E(be,he,oe),oe=_(Math.ceil(be/oe)*oe,he,oe));for(var Ee=oe.length;oe[0]<=be;)oe.shift(),--Ee;for(;oe[Ee-1]>he;)oe.pop(),--Ee;var ye=new Array(Ee+1),ue;for(Q=0;Q<=Ee;++Q)ue=ye[Q]=[],ue.x0=Q>0?oe[Q-1]:be,ue.x1=Q<Ee?oe[Q]:he;for(Q=0;Q<te;++Q)ce=ge[Q],be<=ce&&ce<=he&&ye[a(oe,ce,0,Ee)].push(G[Q]);return ye}return H.value=function(G){return arguments.length?(U=typeof G=="function"?G:w(G),H):U},H.domain=function(G){return arguments.length?(V=typeof G=="function"?G:w([G[0],G[1]]),H):V},H.thresholds=function(G){return arguments.length?(X=typeof G=="function"?G:Array.isArray(G)?w(m.call(G)):w(G),H):X},H}function k(U,V,X){if(X==null&&(X=f),!!(H=U.length)){if((V=+V)<=0||H<2)return+X(U[0],0,U);if(V>=1)return+X(U[H-1],H-1,U);var H,G=(H-1)*V,Q=Math.floor(G),te=+X(U[Q],Q,U),ce=+X(U[Q+1],Q+1,U);return te+(ce-te)*(G-Q)}}function D(U,V,X){return U=g.call(U,f).sort(t),Math.ceil((X-V)/(2*(k(U,.75)-k(U,.25))*Math.pow(U.length,-1/3)))}function F(U,V,X){return Math.ceil((X-V)/(3.5*d(U)*Math.pow(U.length,-1/3)))}function P(U,V){var X=U.length,H=-1,G,Q;if(V==null){for(;++H<X;)if((G=U[H])!=null&&G>=G)for(Q=G;++H<X;)(G=U[H])!=null&&G>Q&&(Q=G)}else for(;++H<X;)if((G=V(U[H],H,U))!=null&&G>=G)for(Q=G;++H<X;)(G=V(U[H],H,U))!=null&&G>Q&&(Q=G);return Q}function R(U,V){var X=U.length,H=X,G=-1,Q,te=0;if(V==null)for(;++G<X;)isNaN(Q=f(U[G]))?--H:te+=Q;else for(;++G<X;)isNaN(Q=f(V(U[G],G,U)))?--H:te+=Q;if(H)return te/H}function L(U,V){var X=U.length,H=-1,G,Q=[];if(V==null)for(;++H<X;)isNaN(G=f(U[H]))||Q.push(G);else for(;++H<X;)isNaN(G=f(V(U[H],H,U)))||Q.push(G);return k(Q.sort(t),.5)}function I(U){for(var V=U.length,X,H=-1,G=0,Q,te;++H<V;)G+=U[H].length;for(Q=new Array(G);--V>=0;)for(te=U[V],X=te.length;--X>=0;)Q[--G]=te[X];return Q}function B(U,V){var X=U.length,H=-1,G,Q;if(V==null){for(;++H<X;)if((G=U[H])!=null&&G>=G)for(Q=G;++H<X;)(G=U[H])!=null&&Q>G&&(Q=G)}else for(;++H<X;)if((G=V(U[H],H,U))!=null&&G>=G)for(Q=G;++H<X;)(G=V(U[H],H,U))!=null&&Q>G&&(Q=G);return Q}function O(U,V){for(var X=V.length,H=new Array(X);X--;)H[X]=U[V[X]];return H}function $(U,V){if(X=U.length){var X,H=0,G=0,Q,te=U[G];for(V==null&&(V=t);++H<X;)(V(Q=U[H],te)<0||V(te,te)!==0)&&(te=Q,G=H);if(V(te,te)===0)return G}}function Y(U,V,X){for(var H=(X==null?U.length:X)-(V=V==null?0:+V),G,Q;H;)Q=Math.random()*H--|0,G=U[H+V],U[H+V]=U[Q+V],U[Q+V]=G;return U}function K(U,V){var X=U.length,H=-1,G,Q=0;if(V==null)for(;++H<X;)(G=+U[H])&&(Q+=G);else for(;++H<X;)(G=+V(U[H],H,U))&&(Q+=G);return Q}function j(U){if(!(Q=U.length))return[];for(var V=-1,X=B(U,q),H=new Array(X);++V<X;)for(var G=-1,Q,te=H[V]=new Array(Q);++G<Q;)te[G]=U[G][V];return H}function q(U){return U.length}function J(){return j(arguments)}e.bisect=a,e.bisectRight=a,e.bisectLeft=o,e.ascending=t,e.bisector=r,e.cross=u,e.descending=c,e.deviation=d,e.extent=p,e.histogram=C,e.thresholdFreedmanDiaconis=D,e.thresholdScott=F,e.thresholdSturges=S,e.max=P,e.mean=R,e.median=L,e.merge=I,e.min=B,e.pairs=s,e.permute=O,e.quantile=k,e.range=_,e.scan=$,e.shuffle=Y,e.sum=K,e.ticks=A,e.tickIncrement=y,e.tickStep=E,e.transpose=j,e.variance=h,e.zip=J,Object.defineProperty(e,"__esModule",{value:!0})}))});var HI=W((GI,JUe)=>{(function(e,t){typeof GI=="object"&&typeof JUe!="undefined"?t(GI,KUe()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(GI,(function(e,t){"use strict";function r(){return new i}function i(){this.reset()}i.prototype={constructor:i,reset:function(){this.s=this.t=0},add:function(Te){a(n,Te,this.t),a(this,n.s,this.s),this.s?this.t+=n.t:this.s=n.t},valueOf:function(){return this.s}};var n=new i;function a(Te,qe,rt){var Ye=Te.s=qe+rt,At=Ye-qe,Gt=Ye-At;Te.t=qe-Gt+(rt-At)}var o=1e-6,s=1e-12,l=Math.PI,u=l/2,c=l/4,f=l*2,h=180/l,d=l/180,p=Math.abs,v=Math.atan,m=Math.atan2,g=Math.cos,w=Math.ceil,b=Math.exp,_=Math.log,M=Math.pow,x=Math.sin,T=Math.sign||function(Te){return Te>0?1:Te<0?-1:0},A=Math.sqrt,y=Math.tan;function E(Te){return Te>1?0:Te<-1?l:Math.acos(Te)}function S(Te){return Te>1?u:Te<-1?-u:Math.asin(Te)}function C(Te){return(Te=x(Te/2))*Te}function k(){}function D(Te,qe){Te&&P.hasOwnProperty(Te.type)&&P[Te.type](Te,qe)}var F={Feature:function(Te,qe){D(Te.geometry,qe)},FeatureCollection:function(Te,qe){for(var rt=Te.features,Ye=-1,At=rt.length;++Ye<At;)D(rt[Ye].geometry,qe)}},P={Sphere:function(Te,qe){qe.sphere()},Point:function(Te,qe){Te=Te.coordinates,qe.point(Te[0],Te[1],Te[2])},MultiPoint:function(Te,qe){for(var rt=Te.coordinates,Ye=-1,At=rt.length;++Ye<At;)Te=rt[Ye],qe.point(Te[0],Te[1],Te[2])},LineString:function(Te,qe){R(Te.coordinates,qe,0)},MultiLineString:function(Te,qe){for(var rt=Te.coordinates,Ye=-1,At=rt.length;++Ye<At;)R(rt[Ye],qe,0)},Polygon:function(Te,qe){L(Te.coordinates,qe)},MultiPolygon:function(Te,qe){for(var rt=Te.coordinates,Ye=-1,At=rt.length;++Ye<At;)L(rt[Ye],qe)},GeometryCollection:function(Te,qe){for(var rt=Te.geometries,Ye=-1,At=rt.length;++Ye<At;)D(rt[Ye],qe)}};function R(Te,qe,rt){var Ye=-1,At=Te.length-rt,Gt;for(qe.lineStart();++Ye<At;)Gt=Te[Ye],qe.point(Gt[0],Gt[1],Gt[2]);qe.lineEnd()}function L(Te,qe){var rt=-1,Ye=Te.length;for(qe.polygonStart();++rt<Ye;)R(Te[rt],qe,1);qe.polygonEnd()}function I(Te,qe){Te&&F.hasOwnProperty(Te.type)?F[Te.type](Te,qe):D(Te,qe)}var B=r(),O=r(),$,Y,K,j,q,J={point:k,lineStart:k,lineEnd:k,polygonStart:function(){B.reset(),J.lineStart=U,J.lineEnd=V},polygonEnd:function(){var Te=+B;O.add(Te<0?f+Te:Te),this.lineStart=this.lineEnd=this.point=k},sphere:function(){O.add(f)}};function U(){J.point=X}function V(){H($,Y)}function X(Te,qe){J.point=H,$=Te,Y=qe,Te*=d,qe*=d,K=Te,j=g(qe=qe/2+c),q=x(qe)}function H(Te,qe){Te*=d,qe*=d,qe=qe/2+c;var rt=Te-K,Ye=rt>=0?1:-1,At=Ye*rt,Gt=g(qe),Kt=x(qe),cr=q*Kt,mr=j*Gt+cr*g(At),Pr=cr*Ye*x(At);B.add(m(Pr,mr)),K=Te,j=Gt,q=Kt}function G(Te){return O.reset(),I(Te,J),O*2}function Q(Te){return[m(Te[1],Te[0]),S(Te[2])]}function te(Te){var qe=Te[0],rt=Te[1],Ye=g(rt);return[Ye*g(qe),Ye*x(qe),x(rt)]}function ce(Te,qe){return Te[0]*qe[0]+Te[1]*qe[1]+Te[2]*qe[2]}function ge(Te,qe){return[Te[1]*qe[2]-Te[2]*qe[1],Te[2]*qe[0]-Te[0]*qe[2],Te[0]*qe[1]-Te[1]*qe[0]]}function Ce(Te,qe){Te[0]+=qe[0],Te[1]+=qe[1],Te[2]+=qe[2]}function be(Te,qe){return[Te[0]*qe,Te[1]*qe,Te[2]*qe]}function he(Te){var qe=A(Te[0]*Te[0]+Te[1]*Te[1]+Te[2]*Te[2]);Te[0]/=qe,Te[1]/=qe,Te[2]/=qe}var oe,Ee,ye,ue,ee,ae,xe,re,pe=r(),we,Fe,Se={point:ke,lineStart:Ie,lineEnd:Oe,polygonStart:function(){Se.point=Qe,Se.lineStart=et,Se.lineEnd=_t,pe.reset(),J.polygonStart()},polygonEnd:function(){J.polygonEnd(),Se.point=ke,Se.lineStart=Ie,Se.lineEnd=Oe,B<0?(oe=-(ye=180),Ee=-(ue=90)):pe>o?ue=90:pe<-o&&(Ee=-90),Fe[0]=oe,Fe[1]=ye},sphere:function(){oe=-(ye=180),Ee=-(ue=90)}};function ke(Te,qe){we.push(Fe=[oe=Te,ye=Te]),qe<Ee&&(Ee=qe),qe>ue&&(ue=qe)}function _e(Te,qe){var rt=te([Te*d,qe*d]);if(re){var Ye=ge(re,rt),At=[Ye[1],-Ye[0],0],Gt=ge(At,Ye);he(Gt),Gt=Q(Gt);var Kt=Te-ee,cr=Kt>0?1:-1,mr=Gt[0]*h*cr,Pr,rr=p(Kt)>180;rr^(cr*ee<mr&&mr<cr*Te)?(Pr=Gt[1]*h,Pr>ue&&(ue=Pr)):(mr=(mr+360)%360-180,rr^(cr*ee<mr&&mr<cr*Te)?(Pr=-Gt[1]*h,Pr<Ee&&(Ee=Pr)):(qe<Ee&&(Ee=qe),qe>ue&&(ue=qe))),rr?Te<ee?ut(oe,Te)>ut(oe,ye)&&(ye=Te):ut(Te,ye)>ut(oe,ye)&&(oe=Te):ye>=oe?(Te<oe&&(oe=Te),Te>ye&&(ye=Te)):Te>ee?ut(oe,Te)>ut(oe,ye)&&(ye=Te):ut(Te,ye)>ut(oe,ye)&&(oe=Te)}else we.push(Fe=[oe=Te,ye=Te]);qe<Ee&&(Ee=qe),qe>ue&&(ue=qe),re=rt,ee=Te}function Ie(){Se.point=_e}function Oe(){Fe[0]=oe,Fe[1]=ye,Se.point=ke,re=null}function Qe(Te,qe){if(re){var rt=Te-ee;pe.add(p(rt)>180?rt+(rt>0?360:-360):rt)}else ae=Te,xe=qe;J.point(Te,qe),_e(Te,qe)}function et(){J.lineStart()}function _t(){Qe(ae,xe),J.lineEnd(),p(pe)>o&&(oe=-(ye=180)),Fe[0]=oe,Fe[1]=ye,re=null}function ut(Te,qe){return(qe-=Te)<0?qe+360:qe}function vt(Te,qe){return Te[0]-qe[0]}function Xe(Te,qe){return Te[0]<=Te[1]?Te[0]<=qe&&qe<=Te[1]:qe<Te[0]||Te[1]<qe}function mt(Te){var qe,rt,Ye,At,Gt,Kt,cr;if(ue=ye=-(oe=Ee=1/0),we=[],I(Te,Se),rt=we.length){for(we.sort(vt),qe=1,Ye=we[0],Gt=[Ye];qe<rt;++qe)At=we[qe],Xe(Ye,At[0])||Xe(Ye,At[1])?(ut(Ye[0],At[1])>ut(Ye[0],Ye[1])&&(Ye[1]=At[1]),ut(At[0],Ye[1])>ut(Ye[0],Ye[1])&&(Ye[0]=At[0])):Gt.push(Ye=At);for(Kt=-1/0,rt=Gt.length-1,qe=0,Ye=Gt[rt];qe<=rt;Ye=At,++qe)At=Gt[qe],(cr=ut(Ye[1],At[0]))>Kt&&(Kt=cr,oe=At[0],ye=Ye[1])}return we=Fe=null,oe===1/0||Ee===1/0?[[NaN,NaN],[NaN,NaN]]:[[oe,Ee],[ye,ue]]}var bt,Ne,Ue,Ge,je,Re,Ve,ct,Tt,Xt,Vt,lr,ur,Bt,Zt,kr,$e={sphere:k,point:tt,lineStart:xt,lineEnd:ir,polygonStart:function(){$e.lineStart=hr,$e.lineEnd=Ur},polygonEnd:function(){$e.lineStart=xt,$e.lineEnd=ir}};function tt(Te,qe){Te*=d,qe*=d;var rt=g(qe);st(rt*g(Te),rt*x(Te),x(qe))}function st(Te,qe,rt){++bt,Ue+=(Te-Ue)/bt,Ge+=(qe-Ge)/bt,je+=(rt-je)/bt}function xt(){$e.point=Je}function Je(Te,qe){Te*=d,qe*=d;var rt=g(qe);Bt=rt*g(Te),Zt=rt*x(Te),kr=x(qe),$e.point=Ct,st(Bt,Zt,kr)}function Ct(Te,qe){Te*=d,qe*=d;var rt=g(qe),Ye=rt*g(Te),At=rt*x(Te),Gt=x(qe),Kt=m(A((Kt=Zt*Gt-kr*At)*Kt+(Kt=kr*Ye-Bt*Gt)*Kt+(Kt=Bt*At-Zt*Ye)*Kt),Bt*Ye+Zt*At+kr*Gt);Ne+=Kt,Re+=Kt*(Bt+(Bt=Ye)),Ve+=Kt*(Zt+(Zt=At)),ct+=Kt*(kr+(kr=Gt)),st(Bt,Zt,kr)}function ir(){$e.point=tt}function hr(){$e.point=si}function Ur(){ei(lr,ur),$e.point=tt}function si(Te,qe){lr=Te,ur=qe,Te*=d,qe*=d,$e.point=ei;var rt=g(qe);Bt=rt*g(Te),Zt=rt*x(Te),kr=x(qe),st(Bt,Zt,kr)}function ei(Te,qe){Te*=d,qe*=d;var rt=g(qe),Ye=rt*g(Te),At=rt*x(Te),Gt=x(qe),Kt=Zt*Gt-kr*At,cr=kr*Ye-Bt*Gt,mr=Bt*At-Zt*Ye,Pr=A(Kt*Kt+cr*cr+mr*mr),rr=S(Pr),fr=Pr&&-rr/Pr;Tt+=fr*Kt,Xt+=fr*cr,Vt+=fr*mr,Ne+=rr,Re+=rr*(Bt+(Bt=Ye)),Ve+=rr*(Zt+(Zt=At)),ct+=rr*(kr+(kr=Gt)),st(Bt,Zt,kr)}function Lr(Te){bt=Ne=Ue=Ge=je=Re=Ve=ct=Tt=Xt=Vt=0,I(Te,$e);var qe=Tt,rt=Xt,Ye=Vt,At=qe*qe+rt*rt+Ye*Ye;return At<s&&(qe=Re,rt=Ve,Ye=ct,Ne<o&&(qe=Ue,rt=Ge,Ye=je),At=qe*qe+rt*rt+Ye*Ye,At<s)?[NaN,NaN]:[m(rt,qe)*h,S(Ye/A(At))*h]}function $i(Te){return function(){return Te}}function Tn(Te,qe){function rt(Ye,At){return Ye=Te(Ye,At),qe(Ye[0],Ye[1])}return Te.invert&&qe.invert&&(rt.invert=function(Ye,At){return Ye=qe.invert(Ye,At),Ye&&Te.invert(Ye[0],Ye[1])}),rt}function hn(Te,qe){return[p(Te)>l?Te+Math.round(-Te/f)*f:Te,qe]}hn.invert=hn;function ta(Te,qe,rt){return(Te%=f)?qe||rt?Tn(dn(Te),Vn(qe,rt)):dn(Te):qe||rt?Vn(qe,rt):hn}function ca(Te){return function(qe,rt){return qe+=Te,[qe>l?qe-f:qe<-l?qe+f:qe,rt]}}function dn(Te){var qe=ca(Te);return qe.invert=ca(-Te),qe}function Vn(Te,qe){var rt=g(Te),Ye=x(Te),At=g(qe),Gt=x(qe);function Kt(cr,mr){var Pr=g(mr),rr=g(cr)*Pr,fr=x(cr)*Pr,pr=x(mr),Dr=pr*rt+rr*Ye;return[m(fr*At-Dr*Gt,rr*rt-pr*Ye),S(Dr*At+fr*Gt)]}return Kt.invert=function(cr,mr){var Pr=g(mr),rr=g(cr)*Pr,fr=x(cr)*Pr,pr=x(mr),Dr=pr*At-fr*Gt;return[m(fr*At+pr*Gt,rr*rt+Dr*Ye),S(Dr*rt-rr*Ye)]},Kt}function ra(Te){Te=ta(Te[0]*d,Te[1]*d,Te.length>2?Te[2]*d:0);function qe(rt){return rt=Te(rt[0]*d,rt[1]*d),rt[0]*=h,rt[1]*=h,rt}return qe.invert=function(rt){return rt=Te.invert(rt[0]*d,rt[1]*d),rt[0]*=h,rt[1]*=h,rt},qe}function ds(Te,qe,rt,Ye,At,Gt){if(rt){var Kt=g(qe),cr=x(qe),mr=Ye*rt;At==null?(At=qe+Ye*f,Gt=qe-mr/2):(At=mo(Kt,At),Gt=mo(Kt,Gt),(Ye>0?At<Gt:At>Gt)&&(At+=Ye*f));for(var Pr,rr=At;Ye>0?rr>Gt:rr<Gt;rr-=mr)Pr=Q([Kt,-cr*g(rr),-cr*x(rr)]),Te.point(Pr[0],Pr[1])}}function mo(Te,qe){qe=te(qe),qe[0]-=Te,he(qe);var rt=E(-qe[1]);return((-qe[2]<0?-rt:rt)+f-o)%f}function Rs(){var Te=$i([0,0]),qe=$i(90),rt=$i(6),Ye,At,Gt={point:Kt};function Kt(mr,Pr){Ye.push(mr=At(mr,Pr)),mr[0]*=h,mr[1]*=h}function cr(){var mr=Te.apply(this,arguments),Pr=qe.apply(this,arguments)*d,rr=rt.apply(this,arguments)*d;return Ye=[],At=ta(-mr[0]*d,-mr[1]*d,0).invert,ds(Gt,Pr,rr,1),mr={type:"Polygon",coordinates:[Ye]},Ye=At=null,mr}return cr.center=function(mr){return arguments.length?(Te=typeof mr=="function"?mr:$i([+mr[0],+mr[1]]),cr):Te},cr.radius=function(mr){return arguments.length?(qe=typeof mr=="function"?mr:$i(+mr),cr):qe},cr.precision=function(mr){return arguments.length?(rt=typeof mr=="function"?mr:$i(+mr),cr):rt},cr}function ho(){var Te=[],qe;return{point:function(rt,Ye,At){qe.push([rt,Ye,At])},lineStart:function(){Te.push(qe=[])},lineEnd:k,rejoin:function(){Te.length>1&&Te.push(Te.pop().concat(Te.shift()))},result:function(){var rt=Te;return Te=[],qe=null,rt}}}function ka(Te,qe){return p(Te[0]-qe[0])<o&&p(Te[1]-qe[1])<o}function ao(Te,qe,rt,Ye){this.x=Te,this.z=qe,this.o=rt,this.e=Ye,this.v=!1,this.n=this.p=null}function zs(Te,qe,rt,Ye,At){var Gt=[],Kt=[],cr,mr;if(Te.forEach(function(Hr){if(!((zi=Hr.length-1)<=0)){var zi,ki=Hr[0],Vi=Hr[zi],Xi;if(ka(ki,Vi)){if(!ki[2]&&!Vi[2]){for(At.lineStart(),cr=0;cr<zi;++cr)At.point((ki=Hr[cr])[0],ki[1]);At.lineEnd();return}Vi[0]+=2*o}Gt.push(Xi=new ao(ki,Hr,null,!0)),Kt.push(Xi.o=new ao(ki,null,Xi,!1)),Gt.push(Xi=new ao(Vi,Hr,null,!1)),Kt.push(Xi.o=new ao(Vi,null,Xi,!0))}}),!!Gt.length){for(Kt.sort(qe),_a(Gt),_a(Kt),cr=0,mr=Kt.length;cr<mr;++cr)Kt[cr].e=rt=!rt;for(var Pr=Gt[0],rr,fr;;){for(var pr=Pr,Dr=!0;pr.v;)if((pr=pr.n)===Pr)return;rr=pr.z,At.lineStart();do{if(pr.v=pr.o.v=!0,pr.e){if(Dr)for(cr=0,mr=rr.length;cr<mr;++cr)At.point((fr=rr[cr])[0],fr[1]);else Ye(pr.x,pr.n.x,1,At);pr=pr.n}else{if(Dr)for(rr=pr.p.z,cr=rr.length-1;cr>=0;--cr)At.point((fr=rr[cr])[0],fr[1]);else Ye(pr.x,pr.p.x,-1,At);pr=pr.p}pr=pr.o,rr=pr.z,Dr=!Dr}while(!pr.v);At.lineEnd()}}}function _a(Te){if(qe=Te.length){for(var qe,rt=0,Ye=Te[0],At;++rt<qe;)Ye.n=At=Te[rt],At.p=Ye,Ye=At;Ye.n=At=Te[0],At.p=Ye}}var Xs=r();function _l(Te){return p(Te[0])<=l?Te[0]:T(Te[0])*((p(Te[0])+l)%f-l)}function yu(Te,qe){var rt=_l(qe),Ye=qe[1],At=x(Ye),Gt=[x(rt),-g(rt),0],Kt=0,cr=0;Xs.reset(),At===1?Ye=u+o:At===-1&&(Ye=-u-o);for(var mr=0,Pr=Te.length;mr<Pr;++mr)if(fr=(rr=Te[mr]).length)for(var rr,fr,pr=rr[fr-1],Dr=_l(pr),Hr=pr[1]/2+c,zi=x(Hr),ki=g(Hr),Vi=0;Vi<fr;++Vi,Dr=Yr,zi=on,ki=En,pr=Xi){var Xi=rr[Vi],Yr=_l(Xi),ai=Xi[1]/2+c,on=x(ai),En=g(ai),ga=Yr-Dr,$a=ga>=0?1:-1,Ca=$a*ga,xo=Ca>l,aa=zi*on;if(Xs.add(m(aa*$a*x(Ca),ki*En+aa*g(Ca))),Kt+=xo?ga+$a*f:ga,xo^Dr>=rt^Yr>=rt){var fl=ge(te(pr),te(Xi));he(fl);var ns=ge(Gt,fl);he(ns);var po=(xo^ga>=0?-1:1)*S(ns[2]);(Ye>po||Ye===po&&(fl[0]||fl[1]))&&(cr+=xo^ga>=0?1:-1)}}return(Kt<-o||Kt<o&&Xs<-o)^cr&1}function ul(Te,qe,rt,Ye){return function(At){var Gt=qe(At),Kt=ho(),cr=qe(Kt),mr=!1,Pr,rr,fr,pr={point:Dr,lineStart:zi,lineEnd:ki,polygonStart:function(){pr.point=Vi,pr.lineStart=Xi,pr.lineEnd=Yr,rr=[],Pr=[]},polygonEnd:function(){pr.point=Dr,pr.lineStart=zi,pr.lineEnd=ki,rr=t.merge(rr);var ai=yu(Pr,Ye);rr.length?(mr||(At.polygonStart(),mr=!0),zs(rr,ot,ai,rt,At)):ai&&(mr||(At.polygonStart(),mr=!0),At.lineStart(),rt(null,null,1,At),At.lineEnd()),mr&&(At.polygonEnd(),mr=!1),rr=Pr=null},sphere:function(){At.polygonStart(),At.lineStart(),rt(null,null,1,At),At.lineEnd(),At.polygonEnd()}};function Dr(ai,on){Te(ai,on)&&At.point(ai,on)}function Hr(ai,on){Gt.point(ai,on)}function zi(){pr.point=Hr,Gt.lineStart()}function ki(){pr.point=Dr,Gt.lineEnd()}function Vi(ai,on){fr.push([ai,on]),cr.point(ai,on)}function Xi(){cr.lineStart(),fr=[]}function Yr(){Vi(fr[0][0],fr[0][1]),cr.lineEnd();var ai=cr.clean(),on=Kt.result(),En,ga=on.length,$a,Ca,xo;if(fr.pop(),Pr.push(fr),fr=null,!!ga){if(ai&1){if(Ca=on[0],($a=Ca.length-1)>0){for(mr||(At.polygonStart(),mr=!0),At.lineStart(),En=0;En<$a;++En)At.point((xo=Ca[En])[0],xo[1]);At.lineEnd()}return}ga>1&&ai&2&&on.push(on.pop().concat(on.shift())),rr.push(on.filter(Le))}}return pr}}function Le(Te){return Te.length>1}function ot(Te,qe){return((Te=Te.x)[0]<0?Te[1]-u-o:u-Te[1])-((qe=qe.x)[0]<0?qe[1]-u-o:u-qe[1])}var lt=ul(function(){return!0},kt,Rt,[-l,-u]);function kt(Te){var qe=NaN,rt=NaN,Ye=NaN,At;return{lineStart:function(){Te.lineStart(),At=1},point:function(Gt,Kt){var cr=Gt>0?l:-l,mr=p(Gt-qe);p(mr-l)<o?(Te.point(qe,rt=(rt+Kt)/2>0?u:-u),Te.point(Ye,rt),Te.lineEnd(),Te.lineStart(),Te.point(cr,rt),Te.point(Gt,rt),At=0):Ye!==cr&&mr>=l&&(p(qe-Ye)<o&&(qe-=Ye*o),p(Gt-cr)<o&&(Gt-=cr*o),rt=Jt(qe,rt,Gt,Kt),Te.point(Ye,rt),Te.lineEnd(),Te.lineStart(),Te.point(cr,rt),At=0),Te.point(qe=Gt,rt=Kt),Ye=cr},lineEnd:function(){Te.lineEnd(),qe=rt=NaN},clean:function(){return 2-At}}}function Jt(Te,qe,rt,Ye){var At,Gt,Kt=x(Te-rt);return p(Kt)>o?v((x(qe)*(Gt=g(Ye))*x(rt)-x(Ye)*(At=g(qe))*x(Te))/(At*Gt*Kt)):(qe+Ye)/2}function Rt(Te,qe,rt,Ye){var At;if(Te==null)At=rt*u,Ye.point(-l,At),Ye.point(0,At),Ye.point(l,At),Ye.point(l,0),Ye.point(l,-At),Ye.point(0,-At),Ye.point(-l,-At),Ye.point(-l,0),Ye.point(-l,At);else if(p(Te[0]-qe[0])>o){var Gt=Te[0]<qe[0]?l:-l;At=rt*Gt/2,Ye.point(-Gt,At),Ye.point(0,At),Ye.point(Gt,At)}else Ye.point(qe[0],qe[1])}function Tr(Te){var qe=g(Te),rt=6*d,Ye=qe>0,At=p(qe)>o;function Gt(rr,fr,pr,Dr){ds(Dr,Te,rt,pr,rr,fr)}function Kt(rr,fr){return g(rr)*g(fr)>qe}function cr(rr){var fr,pr,Dr,Hr,zi;return{lineStart:function(){Hr=Dr=!1,zi=1},point:function(ki,Vi){var Xi=[ki,Vi],Yr,ai=Kt(ki,Vi),on=Ye?ai?0:Pr(ki,Vi):ai?Pr(ki+(ki<0?l:-l),Vi):0;if(!fr&&(Hr=Dr=ai)&&rr.lineStart(),ai!==Dr&&(Yr=mr(fr,Xi),(!Yr||ka(fr,Yr)||ka(Xi,Yr))&&(Xi[2]=1)),ai!==Dr)zi=0,ai?(rr.lineStart(),Yr=mr(Xi,fr),rr.point(Yr[0],Yr[1])):(Yr=mr(fr,Xi),rr.point(Yr[0],Yr[1],2),rr.lineEnd()),fr=Yr;else if(At&&fr&&Ye^ai){var En;!(on&pr)&&(En=mr(Xi,fr,!0))&&(zi=0,Ye?(rr.lineStart(),rr.point(En[0][0],En[0][1]),rr.point(En[1][0],En[1][1]),rr.lineEnd()):(rr.point(En[1][0],En[1][1]),rr.lineEnd(),rr.lineStart(),rr.point(En[0][0],En[0][1],3)))}ai&&(!fr||!ka(fr,Xi))&&rr.point(Xi[0],Xi[1]),fr=Xi,Dr=ai,pr=on},lineEnd:function(){Dr&&rr.lineEnd(),fr=null},clean:function(){return zi|(Hr&&Dr)<<1}}}function mr(rr,fr,pr){var Dr=te(rr),Hr=te(fr),zi=[1,0,0],ki=ge(Dr,Hr),Vi=ce(ki,ki),Xi=ki[0],Yr=Vi-Xi*Xi;if(!Yr)return!pr&&rr;var ai=qe*Vi/Yr,on=-qe*Xi/Yr,En=ge(zi,ki),ga=be(zi,ai),$a=be(ki,on);Ce(ga,$a);var Ca=En,xo=ce(ga,Ca),aa=ce(Ca,Ca),fl=xo*xo-aa*(ce(ga,ga)-1);if(!(fl<0)){var ns=A(fl),po=be(Ca,(-xo-ns)/aa);if(Ce(po,ga),po=Q(po),!pr)return po;var di=rr[0],Sa=fr[0],ks=rr[1],bl=fr[1],Au;Sa<di&&(Au=di,di=Sa,Sa=Au);var vf=Sa-di,Hc=p(vf-l)<o,Hf=Hc||vf<o;if(!Hc&&bl<ks&&(Au=ks,ks=bl,bl=Au),Hf?Hc?ks+bl>0^po[1]<(p(po[0]-di)<o?ks:bl):ks<=po[1]&&po[1]<=bl:vf>l^(di<=po[0]&&po[0]<=Sa)){var Yu=be(Ca,(-xo+ns)/aa);return Ce(Yu,ga),[po,Q(Yu)]}}}function Pr(rr,fr){var pr=Ye?Te:l-Te,Dr=0;return rr<-pr?Dr|=1:rr>pr&&(Dr|=2),fr<-pr?Dr|=4:fr>pr&&(Dr|=8),Dr}return ul(Kt,cr,Gt,Ye?[0,-Te]:[-l,Te-l])}function Wt(Te,qe,rt,Ye,At,Gt){var Kt=Te[0],cr=Te[1],mr=qe[0],Pr=qe[1],rr=0,fr=1,pr=mr-Kt,Dr=Pr-cr,Hr;if(Hr=rt-Kt,!(!pr&&Hr>0)){if(Hr/=pr,pr<0){if(Hr<rr)return;Hr<fr&&(fr=Hr)}else if(pr>0){if(Hr>fr)return;Hr>rr&&(rr=Hr)}if(Hr=At-Kt,!(!pr&&Hr<0)){if(Hr/=pr,pr<0){if(Hr>fr)return;Hr>rr&&(rr=Hr)}else if(pr>0){if(Hr<rr)return;Hr<fr&&(fr=Hr)}if(Hr=Ye-cr,!(!Dr&&Hr>0)){if(Hr/=Dr,Dr<0){if(Hr<rr)return;Hr<fr&&(fr=Hr)}else if(Dr>0){if(Hr>fr)return;Hr>rr&&(rr=Hr)}if(Hr=Gt-cr,!(!Dr&&Hr<0)){if(Hr/=Dr,Dr<0){if(Hr>fr)return;Hr>rr&&(rr=Hr)}else if(Dr>0){if(Hr<rr)return;Hr<fr&&(fr=Hr)}return rr>0&&(Te[0]=Kt+rr*pr,Te[1]=cr+rr*Dr),fr<1&&(qe[0]=Kt+fr*pr,qe[1]=cr+fr*Dr),!0}}}}}var br=1e9,Xr=-br;function ti(Te,qe,rt,Ye){function At(Pr,rr){return Te<=Pr&&Pr<=rt&&qe<=rr&&rr<=Ye}function Gt(Pr,rr,fr,pr){var Dr=0,Hr=0;if(Pr==null||(Dr=Kt(Pr,fr))!==(Hr=Kt(rr,fr))||mr(Pr,rr)<0^fr>0)do pr.point(Dr===0||Dr===3?Te:rt,Dr>1?Ye:qe);while((Dr=(Dr+fr+4)%4)!==Hr);else pr.point(rr[0],rr[1])}function Kt(Pr,rr){return p(Pr[0]-Te)<o?rr>0?0:3:p(Pr[0]-rt)<o?rr>0?2:1:p(Pr[1]-qe)<o?rr>0?1:0:rr>0?3:2}function cr(Pr,rr){return mr(Pr.x,rr.x)}function mr(Pr,rr){var fr=Kt(Pr,1),pr=Kt(rr,1);return fr!==pr?fr-pr:fr===0?rr[1]-Pr[1]:fr===1?Pr[0]-rr[0]:fr===2?Pr[1]-rr[1]:rr[0]-Pr[0]}return function(Pr){var rr=Pr,fr=ho(),pr,Dr,Hr,zi,ki,Vi,Xi,Yr,ai,on,En,ga={point:$a,lineStart:fl,lineEnd:ns,polygonStart:xo,polygonEnd:aa};function $a(di,Sa){At(di,Sa)&&rr.point(di,Sa)}function Ca(){for(var di=0,Sa=0,ks=Dr.length;Sa<ks;++Sa)for(var bl=Dr[Sa],Au=1,vf=bl.length,Hc=bl[0],Hf,Yu,Th=Hc[0],Ah=Hc[1];Au<vf;++Au)Hf=Th,Yu=Ah,Hc=bl[Au],Th=Hc[0],Ah=Hc[1],Yu<=Ye?Ah>Ye&&(Th-Hf)*(Ye-Yu)>(Ah-Yu)*(Te-Hf)&&++di:Ah<=Ye&&(Th-Hf)*(Ye-Yu)<(Ah-Yu)*(Te-Hf)&&--di;return di}function xo(){rr=fr,pr=[],Dr=[],En=!0}function aa(){var di=Ca(),Sa=En&&di,ks=(pr=t.merge(pr)).length;(Sa||ks)&&(Pr.polygonStart(),Sa&&(Pr.lineStart(),Gt(null,null,1,Pr),Pr.lineEnd()),ks&&zs(pr,cr,di,Gt,Pr),Pr.polygonEnd()),rr=Pr,pr=Dr=Hr=null}function fl(){ga.point=po,Dr&&Dr.push(Hr=[]),on=!0,ai=!1,Xi=Yr=NaN}function ns(){pr&&(po(zi,ki),Vi&&ai&&fr.rejoin(),pr.push(fr.result())),ga.point=$a,ai&&rr.lineEnd()}function po(di,Sa){var ks=At(di,Sa);if(Dr&&Hr.push([di,Sa]),on)zi=di,ki=Sa,Vi=ks,on=!1,ks&&(rr.lineStart(),rr.point(di,Sa));else if(ks&&ai)rr.point(di,Sa);else{var bl=[Xi=Math.max(Xr,Math.min(br,Xi)),Yr=Math.max(Xr,Math.min(br,Yr))],Au=[di=Math.max(Xr,Math.min(br,di)),Sa=Math.max(Xr,Math.min(br,Sa))];Wt(bl,Au,Te,qe,rt,Ye)?(ai||(rr.lineStart(),rr.point(bl[0],bl[1])),rr.point(Au[0],Au[1]),ks||rr.lineEnd(),En=!1):ks&&(rr.lineStart(),rr.point(di,Sa),En=!1)}Xi=di,Yr=Sa,ai=ks}return ga}}function Mi(){var Te=0,qe=0,rt=960,Ye=500,At,Gt,Kt;return Kt={stream:function(cr){return At&&Gt===cr?At:At=ti(Te,qe,rt,Ye)(Gt=cr)},extent:function(cr){return arguments.length?(Te=+cr[0][0],qe=+cr[0][1],rt=+cr[1][0],Ye=+cr[1][1],At=Gt=null,Kt):[[Te,qe],[rt,Ye]]}}}var an=r(),Gn,yn,fa,Wn={sphere:k,point:k,lineStart:Ja,lineEnd:k,polygonStart:k,polygonEnd:k};function Ja(){Wn.point=Ao,Wn.lineEnd=oo}function oo(){Wn.point=Wn.lineEnd=k}function Ao(Te,qe){Te*=d,qe*=d,Gn=Te,yn=x(qe),fa=g(qe),Wn.point=Io}function Io(Te,qe){Te*=d,qe*=d;var rt=x(qe),Ye=g(qe),At=p(Te-Gn),Gt=g(At),Kt=x(At),cr=Ye*Kt,mr=fa*rt-yn*Ye*Gt,Pr=yn*rt+fa*Ye*Gt;an.add(m(A(cr*cr+mr*mr),Pr)),Gn=Te,yn=rt,fa=Ye}function ps(Te){return an.reset(),I(Te,Wn),+an}var rs=[null,null],Mo={type:"LineString",coordinates:rs};function is(Te,qe){return rs[0]=Te,rs[1]=qe,ps(Mo)}var Ro={Feature:function(Te,qe){return so(Te.geometry,qe)},FeatureCollection:function(Te,qe){for(var rt=Te.features,Ye=-1,At=rt.length;++Ye<At;)if(so(rt[Ye].geometry,qe))return!0;return!1}},Uo={Sphere:function(){return!0},Point:function(Te,qe){return In(Te.coordinates,qe)},MultiPoint:function(Te,qe){for(var rt=Te.coordinates,Ye=-1,At=rt.length;++Ye<At;)if(In(rt[Ye],qe))return!0;return!1},LineString:function(Te,qe){return va(Te.coordinates,qe)},MultiLineString:function(Te,qe){for(var rt=Te.coordinates,Ye=-1,At=rt.length;++Ye<At;)if(va(rt[Ye],qe))return!0;return!1},Polygon:function(Te,qe){return vs(Te.coordinates,qe)},MultiPolygon:function(Te,qe){for(var rt=Te.coordinates,Ye=-1,At=rt.length;++Ye<At;)if(vs(rt[Ye],qe))return!0;return!1},GeometryCollection:function(Te,qe){for(var rt=Te.geometries,Ye=-1,At=rt.length;++Ye<At;)if(so(rt[Ye],qe))return!0;return!1}};function so(Te,qe){return Te&&Uo.hasOwnProperty(Te.type)?Uo[Te.type](Te,qe):!1}function In(Te,qe){return is(Te,qe)===0}function va(Te,qe){for(var rt,Ye,At,Gt=0,Kt=Te.length;Gt<Kt;Gt++){if(Ye=is(Te[Gt],qe),Ye===0||Gt>0&&(At=is(Te[Gt],Te[Gt-1]),At>0&&rt<=At&&Ye<=At&&(rt+Ye-At)*(1-Math.pow((rt-Ye)/At,2))<s*At))return!0;rt=Ye}return!1}function vs(Te,qe){return!!yu(Te.map(Zs),Ks(qe))}function Zs(Te){return Te=Te.map(Ks),Te.pop(),Te}function Ks(Te){return[Te[0]*d,Te[1]*d]}function Ol(Te,qe){return(Te&&Ro.hasOwnProperty(Te.type)?Ro[Te.type]:so)(Te,qe)}function Js(Te,qe,rt){var Ye=t.range(Te,qe-o,rt).concat(qe);return function(At){return Ye.map(function(Gt){return[At,Gt]})}}function ru(Te,qe,rt){var Ye=t.range(Te,qe-o,rt).concat(qe);return function(At){return Ye.map(function(Gt){return[Gt,At]})}}function xu(){var Te,qe,rt,Ye,At,Gt,Kt,cr,mr=10,Pr=mr,rr=90,fr=360,pr,Dr,Hr,zi,ki=2.5;function Vi(){return{type:"MultiLineString",coordinates:Xi()}}function Xi(){return t.range(w(Ye/rr)*rr,rt,rr).map(Hr).concat(t.range(w(cr/fr)*fr,Kt,fr).map(zi)).concat(t.range(w(qe/mr)*mr,Te,mr).filter(function(Yr){return p(Yr%rr)>o}).map(pr)).concat(t.range(w(Gt/Pr)*Pr,At,Pr).filter(function(Yr){return p(Yr%fr)>o}).map(Dr))}return Vi.lines=function(){return Xi().map(function(Yr){return{type:"LineString",coordinates:Yr}})},Vi.outline=function(){return{type:"Polygon",coordinates:[Hr(Ye).concat(zi(Kt).slice(1),Hr(rt).reverse().slice(1),zi(cr).reverse().slice(1))]}},Vi.extent=function(Yr){return arguments.length?Vi.extentMajor(Yr).extentMinor(Yr):Vi.extentMinor()},Vi.extentMajor=function(Yr){return arguments.length?(Ye=+Yr[0][0],rt=+Yr[1][0],cr=+Yr[0][1],Kt=+Yr[1][1],Ye>rt&&(Yr=Ye,Ye=rt,rt=Yr),cr>Kt&&(Yr=cr,cr=Kt,Kt=Yr),Vi.precision(ki)):[[Ye,cr],[rt,Kt]]},Vi.extentMinor=function(Yr){return arguments.length?(qe=+Yr[0][0],Te=+Yr[1][0],Gt=+Yr[0][1],At=+Yr[1][1],qe>Te&&(Yr=qe,qe=Te,Te=Yr),Gt>At&&(Yr=Gt,Gt=At,At=Yr),Vi.precision(ki)):[[qe,Gt],[Te,At]]},Vi.step=function(Yr){return arguments.length?Vi.stepMajor(Yr).stepMinor(Yr):Vi.stepMinor()},Vi.stepMajor=function(Yr){return arguments.length?(rr=+Yr[0],fr=+Yr[1],Vi):[rr,fr]},Vi.stepMinor=function(Yr){return arguments.length?(mr=+Yr[0],Pr=+Yr[1],Vi):[mr,Pr]},Vi.precision=function(Yr){return arguments.length?(ki=+Yr,pr=Js(Gt,At,90),Dr=ru(qe,Te,ki),Hr=Js(cr,Kt,90),zi=ru(Ye,rt,ki),Vi):ki},Vi.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function _u(){return xu()()}function dc(Te,qe){var rt=Te[0]*d,Ye=Te[1]*d,At=qe[0]*d,Gt=qe[1]*d,Kt=g(Ye),cr=x(Ye),mr=g(Gt),Pr=x(Gt),rr=Kt*g(rt),fr=Kt*x(rt),pr=mr*g(At),Dr=mr*x(At),Hr=2*S(A(C(Gt-Ye)+Kt*mr*C(At-rt))),zi=x(Hr),ki=Hr?function(Vi){var Xi=x(Vi*=Hr)/zi,Yr=x(Hr-Vi)/zi,ai=Yr*rr+Xi*pr,on=Yr*fr+Xi*Dr,En=Yr*cr+Xi*Pr;return[m(on,ai)*h,m(En,A(ai*ai+on*on))*h]}:function(){return[rt*h,Ye*h]};return ki.distance=Hr,ki}function Nl(Te){return Te}var ja=r(),bu=r(),Hu,Ss,iu,ph,yo={point:k,lineStart:k,lineEnd:k,polygonStart:function(){yo.lineStart=nu,yo.lineEnd=Cv},polygonEnd:function(){yo.lineStart=yo.lineEnd=yo.point=k,ja.add(p(bu)),bu.reset()},result:function(){var Te=ja/2;return ja.reset(),Te}};function nu(){yo.point=Zo}function Zo(Te,qe){yo.point=au,Hu=iu=Te,Ss=ph=qe}function au(Te,qe){bu.add(ph*Te-iu*qe),iu=Te,ph=qe}function Cv(){au(Hu,Ss)}var Nc=1/0,r0=Nc,Of=-Nc,vh=Of,Nf={point:i0,lineStart:k,lineEnd:k,polygonStart:k,polygonEnd:k,result:function(){var Te=[[Nc,r0],[Of,vh]];return Of=vh=-(r0=Nc=1/0),Te}};function i0(Te,qe){Te<Nc&&(Nc=Te),Te>Of&&(Of=Te),qe<r0&&(r0=qe),qe>vh&&(vh=qe)}var Dv=0,gh=0,up=0,n0=0,j0=0,$0=0,Fv=0,Lv=0,Uc=0,cp,mh,ju,Es,Vo={point:wu,lineStart:W0,lineEnd:Pv,polygonStart:function(){Vo.lineStart=ug,Vo.lineEnd=Wm},polygonEnd:function(){Vo.point=wu,Vo.lineStart=W0,Vo.lineEnd=Pv},result:function(){var Te=Uc?[Fv/Uc,Lv/Uc]:$0?[n0/$0,j0/$0]:up?[Dv/up,gh/up]:[NaN,NaN];return Dv=gh=up=n0=j0=$0=Fv=Lv=Uc=0,Te}};function wu(Te,qe){Dv+=Te,gh+=qe,++up}function W0(){Vo.point=yh}function yh(Te,qe){Vo.point=a0,wu(ju=Te,Es=qe)}function a0(Te,qe){var rt=Te-ju,Ye=qe-Es,At=A(rt*rt+Ye*Ye);n0+=At*(ju+Te)/2,j0+=At*(Es+qe)/2,$0+=At,wu(ju=Te,Es=qe)}function Pv(){Vo.point=wu}function ug(){Vo.point=Tx}function Wm(){xh(cp,mh)}function Tx(Te,qe){Vo.point=xh,wu(cp=ju=Te,mh=Es=qe)}function xh(Te,qe){var rt=Te-ju,Ye=qe-Es,At=A(rt*rt+Ye*Ye);n0+=At*(ju+Te)/2,j0+=At*(Es+qe)/2,$0+=At,At=Es*Te-ju*qe,Fv+=At*(ju+Te),Lv+=At*(Es+qe),Uc+=At*3,wu(ju=Te,Es=qe)}function Bs(Te){this._context=Te}Bs.prototype={_radius:4.5,pointRadius:function(Te){return this._radius=Te,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(Te,qe){switch(this._point){case 0:{this._context.moveTo(Te,qe),this._point=1;break}case 1:{this._context.lineTo(Te,qe);break}default:{this._context.moveTo(Te+this._radius,qe),this._context.arc(Te,qe,this._radius,0,f);break}}},result:k};var Iv=r(),Rv,_h,cg,Y0,fp,hf={point:k,lineStart:function(){hf.point=zv},lineEnd:function(){Rv&&hp(_h,cg),hf.point=k},polygonStart:function(){Rv=!0},polygonEnd:function(){Rv=null},result:function(){var Te=+Iv;return Iv.reset(),Te}};function zv(Te,qe){hf.point=hp,_h=Y0=Te,cg=fp=qe}function hp(Te,qe){Y0-=Te,fp-=qe,Iv.add(A(Y0*Y0+fp*fp)),Y0=Te,fp=qe}function X0(){this._string=[]}X0.prototype={_radius:4.5,_circle:fg(4.5),pointRadius:function(Te){return(Te=+Te)!==this._radius&&(this._radius=Te,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(Te,qe){switch(this._point){case 0:{this._string.push("M",Te,",",qe),this._point=1;break}case 1:{this._string.push("L",Te,",",qe);break}default:{this._circle==null&&(this._circle=fg(this._radius)),this._string.push("M",Te,",",qe,this._circle);break}}},result:function(){if(this._string.length){var Te=this._string.join("");return this._string=[],Te}else return null}};function fg(Te){return"m0,"+Te+"a"+Te+","+Te+" 0 1,1 0,"+-2*Te+"a"+Te+","+Te+" 0 1,1 0,"+2*Te+"z"}function hg(Te,qe){var rt=4.5,Ye,At;function Gt(Kt){return Kt&&(typeof rt=="function"&&At.pointRadius(+rt.apply(this,arguments)),I(Kt,Ye(At))),At.result()}return Gt.area=function(Kt){return I(Kt,Ye(yo)),yo.result()},Gt.measure=function(Kt){return I(Kt,Ye(hf)),hf.result()},Gt.bounds=function(Kt){return I(Kt,Ye(Nf)),Nf.result()},Gt.centroid=function(Kt){return I(Kt,Ye(Vo)),Vo.result()},Gt.projection=function(Kt){return arguments.length?(Ye=Kt==null?(Te=null,Nl):(Te=Kt).stream,Gt):Te},Gt.context=function(Kt){return arguments.length?(At=Kt==null?(qe=null,new X0):new Bs(qe=Kt),typeof rt!="function"&&At.pointRadius(rt),Gt):qe},Gt.pointRadius=function(Kt){return arguments.length?(rt=typeof Kt=="function"?Kt:(At.pointRadius(+Kt),+Kt),Gt):rt},Gt.projection(Te).context(qe)}function Ym(Te){return{stream:Uf(Te)}}function Uf(Te){return function(qe){var rt=new Bv;for(var Ye in Te)rt[Ye]=Te[Ye];return rt.stream=qe,rt}}function Bv(){}Bv.prototype={constructor:Bv,point:function(Te,qe){this.stream.point(Te,qe)},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 Vf(Te,qe,rt){var Ye=Te.clipExtent&&Te.clipExtent();return Te.scale(150).translate([0,0]),Ye!=null&&Te.clipExtent(null),I(rt,Te.stream(Nf)),qe(Nf.result()),Ye!=null&&Te.clipExtent(Ye),Te}function dp(Te,qe,rt){return Vf(Te,function(Ye){var At=qe[1][0]-qe[0][0],Gt=qe[1][1]-qe[0][1],Kt=Math.min(At/(Ye[1][0]-Ye[0][0]),Gt/(Ye[1][1]-Ye[0][1])),cr=+qe[0][0]+(At-Kt*(Ye[1][0]+Ye[0][0]))/2,mr=+qe[0][1]+(Gt-Kt*(Ye[1][1]+Ye[0][1]))/2;Te.scale(150*Kt).translate([cr,mr])},rt)}function pc(Te,qe,rt){return dp(Te,[[0,0],qe],rt)}function Z0(Te,qe,rt){return Vf(Te,function(Ye){var At=+qe,Gt=At/(Ye[1][0]-Ye[0][0]),Kt=(At-Gt*(Ye[1][0]+Ye[0][0]))/2,cr=-Gt*Ye[0][1];Te.scale(150*Gt).translate([Kt,cr])},rt)}function Gf(Te,qe,rt){return Vf(Te,function(Ye){var At=+qe,Gt=At/(Ye[1][1]-Ye[0][1]),Kt=-Gt*Ye[0][0],cr=(At-Gt*(Ye[1][1]+Ye[0][1]))/2;Te.scale(150*Gt).translate([Kt,cr])},rt)}var dg=16,qv=g(30*d);function pg(Te,qe){return+qe?pp(Te,qe):Ov(Te)}function Ov(Te){return Uf({point:function(qe,rt){qe=Te(qe,rt),this.stream.point(qe[0],qe[1])}})}function pp(Te,qe){function rt(Ye,At,Gt,Kt,cr,mr,Pr,rr,fr,pr,Dr,Hr,zi,ki){var Vi=Pr-Ye,Xi=rr-At,Yr=Vi*Vi+Xi*Xi;if(Yr>4*qe&&zi--){var ai=Kt+pr,on=cr+Dr,En=mr+Hr,ga=A(ai*ai+on*on+En*En),$a=S(En/=ga),Ca=p(p(En)-1)<o||p(Gt-fr)<o?(Gt+fr)/2:m(on,ai),xo=Te(Ca,$a),aa=xo[0],fl=xo[1],ns=aa-Ye,po=fl-At,di=Xi*ns-Vi*po;(di*di/Yr>qe||p((Vi*ns+Xi*po)/Yr-.5)>.3||Kt*pr+cr*Dr+mr*Hr<qv)&&(rt(Ye,At,Gt,Kt,cr,mr,aa,fl,Ca,ai/=ga,on/=ga,En,zi,ki),ki.point(aa,fl),rt(aa,fl,Ca,ai,on,En,Pr,rr,fr,pr,Dr,Hr,zi,ki))}}return function(Ye){var At,Gt,Kt,cr,mr,Pr,rr,fr,pr,Dr,Hr,zi,ki={point:Vi,lineStart:Xi,lineEnd:ai,polygonStart:function(){Ye.polygonStart(),ki.lineStart=on},polygonEnd:function(){Ye.polygonEnd(),ki.lineStart=Xi}};function Vi($a,Ca){$a=Te($a,Ca),Ye.point($a[0],$a[1])}function Xi(){fr=NaN,ki.point=Yr,Ye.lineStart()}function Yr($a,Ca){var xo=te([$a,Ca]),aa=Te($a,Ca);rt(fr,pr,rr,Dr,Hr,zi,fr=aa[0],pr=aa[1],rr=$a,Dr=xo[0],Hr=xo[1],zi=xo[2],dg,Ye),Ye.point(fr,pr)}function ai(){ki.point=Vi,Ye.lineEnd()}function on(){Xi(),ki.point=En,ki.lineEnd=ga}function En($a,Ca){Yr(At=$a,Ca),Gt=fr,Kt=pr,cr=Dr,mr=Hr,Pr=zi,ki.point=Yr}function ga(){rt(fr,pr,rr,Dr,Hr,zi,Gt,Kt,At,cr,mr,Pr,dg,Ye),ki.lineEnd=ai,ai()}return ki}}var Nv=Uf({point:function(Te,qe){this.stream.point(Te*d,qe*d)}});function Uv(Te){return Uf({point:function(qe,rt){var Ye=Te(qe,rt);return this.stream.point(Ye[0],Ye[1])}})}function Xm(Te,qe,rt,Ye,At){function Gt(Kt,cr){return Kt*=Ye,cr*=At,[qe+Te*Kt,rt-Te*cr]}return Gt.invert=function(Kt,cr){return[(Kt-qe)/Te*Ye,(rt-cr)/Te*At]},Gt}function $u(Te,qe,rt,Ye,At,Gt){var Kt=g(Gt),cr=x(Gt),mr=Kt*Te,Pr=cr*Te,rr=Kt/Te,fr=cr/Te,pr=(cr*rt-Kt*qe)/Te,Dr=(cr*qe+Kt*rt)/Te;function Hr(zi,ki){return zi*=Ye,ki*=At,[mr*zi-Pr*ki+qe,rt-Pr*zi-mr*ki]}return Hr.invert=function(zi,ki){return[Ye*(rr*zi-fr*ki+pr),At*(Dr-fr*zi-rr*ki)]},Hr}function Vc(Te){return vg(function(){return Te})()}function vg(Te){var qe,rt=150,Ye=480,At=250,Gt=0,Kt=0,cr=0,mr=0,Pr=0,rr,fr=0,pr=1,Dr=1,Hr=null,zi=lt,ki=null,Vi,Xi,Yr,ai=Nl,on=.5,En,ga,$a,Ca,xo;function aa(di){return $a(di[0]*d,di[1]*d)}function fl(di){return di=$a.invert(di[0],di[1]),di&&[di[0]*h,di[1]*h]}aa.stream=function(di){return Ca&&xo===di?Ca:Ca=Nv(Uv(rr)(zi(En(ai(xo=di)))))},aa.preclip=function(di){return arguments.length?(zi=di,Hr=void 0,po()):zi},aa.postclip=function(di){return arguments.length?(ai=di,ki=Vi=Xi=Yr=null,po()):ai},aa.clipAngle=function(di){return arguments.length?(zi=+di?Tr(Hr=di*d):(Hr=null,lt),po()):Hr*h},aa.clipExtent=function(di){return arguments.length?(ai=di==null?(ki=Vi=Xi=Yr=null,Nl):ti(ki=+di[0][0],Vi=+di[0][1],Xi=+di[1][0],Yr=+di[1][1]),po()):ki==null?null:[[ki,Vi],[Xi,Yr]]},aa.scale=function(di){return arguments.length?(rt=+di,ns()):rt},aa.translate=function(di){return arguments.length?(Ye=+di[0],At=+di[1],ns()):[Ye,At]},aa.center=function(di){return arguments.length?(Gt=di[0]%360*d,Kt=di[1]%360*d,ns()):[Gt*h,Kt*h]},aa.rotate=function(di){return arguments.length?(cr=di[0]%360*d,mr=di[1]%360*d,Pr=di.length>2?di[2]%360*d:0,ns()):[cr*h,mr*h,Pr*h]},aa.angle=function(di){return arguments.length?(fr=di%360*d,ns()):fr*h},aa.reflectX=function(di){return arguments.length?(pr=di?-1:1,ns()):pr<0},aa.reflectY=function(di){return arguments.length?(Dr=di?-1:1,ns()):Dr<0},aa.precision=function(di){return arguments.length?(En=pg(ga,on=di*di),po()):A(on)},aa.fitExtent=function(di,Sa){return dp(aa,di,Sa)},aa.fitSize=function(di,Sa){return pc(aa,di,Sa)},aa.fitWidth=function(di,Sa){return Z0(aa,di,Sa)},aa.fitHeight=function(di,Sa){return Gf(aa,di,Sa)};function ns(){var di=$u(rt,0,0,pr,Dr,fr).apply(null,qe(Gt,Kt)),Sa=(fr?$u:Xm)(rt,Ye-di[0],At-di[1],pr,Dr,fr);return rr=ta(cr,mr,Pr),ga=Tn(qe,Sa),$a=Tn(rr,ga),En=pg(ga,on),po()}function po(){return Ca=xo=null,aa}return function(){return qe=Te.apply(this,arguments),aa.invert=qe.invert&&fl,ns()}}function Tu(Te){var qe=0,rt=l/3,Ye=vg(Te),At=Ye(qe,rt);return At.parallels=function(Gt){return arguments.length?Ye(qe=Gt[0]*d,rt=Gt[1]*d):[qe*h,rt*h]},At}function vp(Te){var qe=g(Te);function rt(Ye,At){return[Ye*qe,x(At)/qe]}return rt.invert=function(Ye,At){return[Ye/qe,S(At*qe)]},rt}function o0(Te,qe){var rt=x(Te),Ye=(rt+x(qe))/2;if(p(Ye)<o)return vp(Te);var At=1+rt*(2*Ye-rt),Gt=A(At)/Ye;function Kt(cr,mr){var Pr=A(At-2*Ye*x(mr))/Ye;return[Pr*x(cr*=Ye),Gt-Pr*g(cr)]}return Kt.invert=function(cr,mr){var Pr=Gt-mr,rr=m(cr,p(Pr))*T(Pr);return Pr*Ye<0&&(rr-=l*T(cr)*T(Pr)),[rr/Ye,S((At-(cr*cr+Pr*Pr)*Ye*Ye)/(2*Ye))]},Kt}function bh(){return Tu(o0).scale(155.424).center([0,33.6442])}function gg(){return bh().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Zm(Te){var qe=Te.length;return{point:function(rt,Ye){for(var At=-1;++At<qe;)Te[At].point(rt,Ye)},sphere:function(){for(var rt=-1;++rt<qe;)Te[rt].sphere()},lineStart:function(){for(var rt=-1;++rt<qe;)Te[rt].lineStart()},lineEnd:function(){for(var rt=-1;++rt<qe;)Te[rt].lineEnd()},polygonStart:function(){for(var rt=-1;++rt<qe;)Te[rt].polygonStart()},polygonEnd:function(){for(var rt=-1;++rt<qe;)Te[rt].polygonEnd()}}}function Km(){var Te,qe,rt=gg(),Ye,At=bh().rotate([154,0]).center([-2,58.5]).parallels([55,65]),Gt,Kt=bh().rotate([157,0]).center([-3,19.9]).parallels([8,18]),cr,mr,Pr={point:function(pr,Dr){mr=[pr,Dr]}};function rr(pr){var Dr=pr[0],Hr=pr[1];return mr=null,Ye.point(Dr,Hr),mr||(Gt.point(Dr,Hr),mr)||(cr.point(Dr,Hr),mr)}rr.invert=function(pr){var Dr=rt.scale(),Hr=rt.translate(),zi=(pr[0]-Hr[0])/Dr,ki=(pr[1]-Hr[1])/Dr;return(ki>=.12&&ki<.234&&zi>=-.425&&zi<-.214?At:ki>=.166&&ki<.234&&zi>=-.214&&zi<-.115?Kt:rt).invert(pr)},rr.stream=function(pr){return Te&&qe===pr?Te:Te=Zm([rt.stream(qe=pr),At.stream(pr),Kt.stream(pr)])},rr.precision=function(pr){return arguments.length?(rt.precision(pr),At.precision(pr),Kt.precision(pr),fr()):rt.precision()},rr.scale=function(pr){return arguments.length?(rt.scale(pr),At.scale(pr*.35),Kt.scale(pr),rr.translate(rt.translate())):rt.scale()},rr.translate=function(pr){if(!arguments.length)return rt.translate();var Dr=rt.scale(),Hr=+pr[0],zi=+pr[1];return Ye=rt.translate(pr).clipExtent([[Hr-.455*Dr,zi-.238*Dr],[Hr+.455*Dr,zi+.238*Dr]]).stream(Pr),Gt=At.translate([Hr-.307*Dr,zi+.201*Dr]).clipExtent([[Hr-.425*Dr+o,zi+.12*Dr+o],[Hr-.214*Dr-o,zi+.234*Dr-o]]).stream(Pr),cr=Kt.translate([Hr-.205*Dr,zi+.212*Dr]).clipExtent([[Hr-.214*Dr+o,zi+.166*Dr+o],[Hr-.115*Dr-o,zi+.234*Dr-o]]).stream(Pr),fr()},rr.fitExtent=function(pr,Dr){return dp(rr,pr,Dr)},rr.fitSize=function(pr,Dr){return pc(rr,pr,Dr)},rr.fitWidth=function(pr,Dr){return Z0(rr,pr,Dr)},rr.fitHeight=function(pr,Dr){return Gf(rr,pr,Dr)};function fr(){return Te=qe=null,rr}return rr.scale(1070)}function df(Te){return function(qe,rt){var Ye=g(qe),At=g(rt),Gt=Te(Ye*At);return[Gt*At*x(qe),Gt*x(rt)]}}function pf(Te){return function(qe,rt){var Ye=A(qe*qe+rt*rt),At=Te(Ye),Gt=x(At),Kt=g(At);return[m(qe*Gt,Ye*Kt),S(Ye&&rt*Gt/Ye)]}}var Wu=df(function(Te){return A(2/(1+Te))});Wu.invert=pf(function(Te){return 2*S(Te/2)});function Ax(){return Vc(Wu).scale(124.75).clipAngle(180-.001)}var K0=df(function(Te){return(Te=E(Te))&&Te/x(Te)});K0.invert=pf(function(Te){return Te});function Jm(){return Vc(K0).scale(79.4188).clipAngle(180-.001)}function vc(Te,qe){return[Te,_(y((u+qe)/2))]}vc.invert=function(Te,qe){return[Te,2*v(b(qe))-u]};function Vv(){return gp(vc).scale(961/f)}function gp(Te){var qe=Vc(Te),rt=qe.center,Ye=qe.scale,At=qe.translate,Gt=qe.clipExtent,Kt=null,cr,mr,Pr;qe.scale=function(fr){return arguments.length?(Ye(fr),rr()):Ye()},qe.translate=function(fr){return arguments.length?(At(fr),rr()):At()},qe.center=function(fr){return arguments.length?(rt(fr),rr()):rt()},qe.clipExtent=function(fr){return arguments.length?(fr==null?Kt=cr=mr=Pr=null:(Kt=+fr[0][0],cr=+fr[0][1],mr=+fr[1][0],Pr=+fr[1][1]),rr()):Kt==null?null:[[Kt,cr],[mr,Pr]]};function rr(){var fr=l*Ye(),pr=qe(ra(qe.rotate()).invert([0,0]));return Gt(Kt==null?[[pr[0]-fr,pr[1]-fr],[pr[0]+fr,pr[1]+fr]]:Te===vc?[[Math.max(pr[0]-fr,Kt),cr],[Math.min(pr[0]+fr,mr),Pr]]:[[Kt,Math.max(pr[1]-fr,cr)],[mr,Math.min(pr[1]+fr,Pr)]])}return rr()}function mp(Te){return y((u+Te)/2)}function Qm(Te,qe){var rt=g(Te),Ye=Te===qe?x(Te):_(rt/g(qe))/_(mp(qe)/mp(Te)),At=rt*M(mp(Te),Ye)/Ye;if(!Ye)return vc;function Gt(Kt,cr){At>0?cr<-u+o&&(cr=-u+o):cr>u-o&&(cr=u-o);var mr=At/M(mp(cr),Ye);return[mr*x(Ye*Kt),At-mr*g(Ye*Kt)]}return Gt.invert=function(Kt,cr){var mr=At-cr,Pr=T(Ye)*A(Kt*Kt+mr*mr),rr=m(Kt,p(mr))*T(mr);return mr*Ye<0&&(rr-=l*T(Kt)*T(mr)),[rr/Ye,2*v(M(At/Pr,1/Ye))-u]},Gt}function yp(){return Tu(Qm).scale(109.5).parallels([30,30])}function wh(Te,qe){return[Te,qe]}wh.invert=wh;function J0(){return Vc(wh).scale(152.63)}function xp(Te,qe){var rt=g(Te),Ye=Te===qe?x(Te):(rt-g(qe))/(qe-Te),At=rt/Ye+Te;if(p(Ye)<o)return wh;function Gt(Kt,cr){var mr=At-cr,Pr=Ye*Kt;return[mr*x(Pr),At-mr*g(Pr)]}return Gt.invert=function(Kt,cr){var mr=At-cr,Pr=m(Kt,p(mr))*T(mr);return mr*Ye<0&&(Pr-=l*T(Kt)*T(mr)),[Pr/Ye,At-T(Ye)*A(Kt*Kt+mr*mr)]},Gt}function ey(){return Tu(xp).scale(131.154).center([0,13.9389])}var _p=1.340264,s0=-.081106,bp=893e-6,l0=.003796,Q0=A(3)/2,ed=12;function wp(Te,qe){var rt=S(Q0*x(qe)),Ye=rt*rt,At=Ye*Ye*Ye;return[Te*g(rt)/(Q0*(_p+3*s0*Ye+At*(7*bp+9*l0*Ye))),rt*(_p+s0*Ye+At*(bp+l0*Ye))]}wp.invert=function(Te,qe){for(var rt=qe,Ye=rt*rt,At=Ye*Ye*Ye,Gt=0,Kt,cr,mr;Gt<ed&&(cr=rt*(_p+s0*Ye+At*(bp+l0*Ye))-qe,mr=_p+3*s0*Ye+At*(7*bp+9*l0*Ye),rt-=Kt=cr/mr,Ye=rt*rt,At=Ye*Ye*Ye,!(p(Kt)<s));++Gt);return[Q0*Te*(_p+3*s0*Ye+At*(7*bp+9*l0*Ye))/g(rt),S(x(rt)/Q0)]};function mg(){return Vc(wp).scale(177.158)}function Gv(Te,qe){var rt=g(qe),Ye=g(Te)*rt;return[rt*x(Te)/Ye,x(qe)/Ye]}Gv.invert=pf(v);function ty(){return Vc(Gv).scale(144.049).clipAngle(60)}function ry(){var Te=1,qe=0,rt=0,Ye=1,At=1,Gt=0,Kt,cr,mr=null,Pr,rr,fr,pr=1,Dr=1,Hr=Uf({point:function(ai,on){var En=Yr([ai,on]);this.stream.point(En[0],En[1])}}),zi=Nl,ki,Vi;function Xi(){return pr=Te*Ye,Dr=Te*At,ki=Vi=null,Yr}function Yr(ai){var on=ai[0]*pr,En=ai[1]*Dr;if(Gt){var ga=En*Kt-on*cr;on=on*Kt+En*cr,En=ga}return[on+qe,En+rt]}return Yr.invert=function(ai){var on=ai[0]-qe,En=ai[1]-rt;if(Gt){var ga=En*Kt+on*cr;on=on*Kt-En*cr,En=ga}return[on/pr,En/Dr]},Yr.stream=function(ai){return ki&&Vi===ai?ki:ki=Hr(zi(Vi=ai))},Yr.postclip=function(ai){return arguments.length?(zi=ai,mr=Pr=rr=fr=null,Xi()):zi},Yr.clipExtent=function(ai){return arguments.length?(zi=ai==null?(mr=Pr=rr=fr=null,Nl):ti(mr=+ai[0][0],Pr=+ai[0][1],rr=+ai[1][0],fr=+ai[1][1]),Xi()):mr==null?null:[[mr,Pr],[rr,fr]]},Yr.scale=function(ai){return arguments.length?(Te=+ai,Xi()):Te},Yr.translate=function(ai){return arguments.length?(qe=+ai[0],rt=+ai[1],Xi()):[qe,rt]},Yr.angle=function(ai){return arguments.length?(Gt=ai%360*d,cr=x(Gt),Kt=g(Gt),Xi()):Gt*h},Yr.reflectX=function(ai){return arguments.length?(Ye=ai?-1:1,Xi()):Ye<0},Yr.reflectY=function(ai){return arguments.length?(At=ai?-1:1,Xi()):At<0},Yr.fitExtent=function(ai,on){return dp(Yr,ai,on)},Yr.fitSize=function(ai,on){return pc(Yr,ai,on)},Yr.fitWidth=function(ai,on){return Z0(Yr,ai,on)},Yr.fitHeight=function(ai,on){return Gf(Yr,ai,on)},Yr}function yg(Te,qe){var rt=qe*qe,Ye=rt*rt;return[Te*(.8707-.131979*rt+Ye*(-.013791+Ye*(.003971*rt-.001529*Ye))),qe*(1.007226+rt*(.015085+Ye*(-.044475+.028874*rt-.005916*Ye)))]}yg.invert=function(Te,qe){var rt=qe,Ye=25,At;do{var Gt=rt*rt,Kt=Gt*Gt;rt-=At=(rt*(1.007226+Gt*(.015085+Kt*(-.044475+.028874*Gt-.005916*Kt)))-qe)/(1.007226+Gt*(.015085*3+Kt*(-.044475*7+.028874*9*Gt-.005916*11*Kt)))}while(p(At)>o&&--Ye>0);return[Te/(.8707+(Gt=rt*rt)*(-.131979+Gt*(-.013791+Gt*Gt*Gt*(.003971-.001529*Gt)))),rt]};function Hv(){return Vc(yg).scale(175.295)}function cl(Te,qe){return[g(qe)*x(Te),x(qe)]}cl.invert=pf(S);function Gc(){return Vc(cl).scale(249.5).clipAngle(90+o)}function Tp(Te,qe){var rt=g(qe),Ye=1+g(Te)*rt;return[rt*x(Te)/Ye,x(qe)/Ye]}Tp.invert=pf(function(Te){return 2*v(Te)});function xg(){return Vc(Tp).scale(250).clipAngle(142)}function Ap(Te,qe){return[_(y((u+qe)/2)),-Te]}Ap.invert=function(Te,qe){return[-qe,2*v(b(Te))-u]};function Mp(){var Te=gp(Ap),qe=Te.center,rt=Te.rotate;return Te.center=function(Ye){return arguments.length?qe([-Ye[1],Ye[0]]):(Ye=qe(),[Ye[1],-Ye[0]])},Te.rotate=function(Ye){return arguments.length?rt([Ye[0],Ye[1],Ye.length>2?Ye[2]+90:90]):(Ye=rt(),[Ye[0],Ye[1],Ye[2]-90])},rt([0,0,90]).scale(159.155)}e.geoAlbers=gg,e.geoAlbersUsa=Km,e.geoArea=G,e.geoAzimuthalEqualArea=Ax,e.geoAzimuthalEqualAreaRaw=Wu,e.geoAzimuthalEquidistant=Jm,e.geoAzimuthalEquidistantRaw=K0,e.geoBounds=mt,e.geoCentroid=Lr,e.geoCircle=Rs,e.geoClipAntimeridian=lt,e.geoClipCircle=Tr,e.geoClipExtent=Mi,e.geoClipRectangle=ti,e.geoConicConformal=yp,e.geoConicConformalRaw=Qm,e.geoConicEqualArea=bh,e.geoConicEqualAreaRaw=o0,e.geoConicEquidistant=ey,e.geoConicEquidistantRaw=xp,e.geoContains=Ol,e.geoDistance=is,e.geoEqualEarth=mg,e.geoEqualEarthRaw=wp,e.geoEquirectangular=J0,e.geoEquirectangularRaw=wh,e.geoGnomonic=ty,e.geoGnomonicRaw=Gv,e.geoGraticule=xu,e.geoGraticule10=_u,e.geoIdentity=ry,e.geoInterpolate=dc,e.geoLength=ps,e.geoMercator=Vv,e.geoMercatorRaw=vc,e.geoNaturalEarth1=Hv,e.geoNaturalEarth1Raw=yg,e.geoOrthographic=Gc,e.geoOrthographicRaw=cl,e.geoPath=hg,e.geoProjection=Vc,e.geoProjectionMutator=vg,e.geoRotation=ra,e.geoStereographic=xg,e.geoStereographicRaw=Tp,e.geoStream=I,e.geoTransform=Ym,e.geoTransverseMercator=Mp,e.geoTransverseMercatorRaw=Ap,Object.defineProperty(e,"__esModule",{value:!0})}))});var tVe=W((Cjr,eVe)=>{"use strict";var QUe={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"},trr=new Set(Object.values(QUe));eVe.exports={usaLocationAbbreviations:trr,usaLocationList:QUe}});var rVe={};Fp(rVe,{COUNTRIES_X:()=>rrr});var rrr,iVe=Ea(()=>{"use strict";rrr=[{iso3:"XAC",iso2:"",m49:"",name:"Aksai Chin",aliases:[]},{iso3:"XAP",iso2:"",m49:"",name:"Arunachal Pradesh",aliases:[]},{iso3:"XBT",iso2:"",m49:"",name:"Bir Tawil",aliases:[]},{iso3:"XHT",iso2:"",m49:"",name:"Halaib Triangle",aliases:[]},{iso3:"XIT",iso2:"",m49:"",name:"Ilemi Triangle",aliases:[]},{iso3:"XJK",iso2:"",m49:"",name:"Jammu and Kashmir",aliases:[]}]});var cm=W((Djr,oVe)=>{"use strict";var irr=vi(),{COUNTRIES:nrr,createLookup:arr}=PUe(),{area:orr}=WUe(),{centroid:srr}=XUe(),{coordAll:lrr}=OI(),{geoBounds:urr}=HI(),crr=tA(),S2=Eg(),frr=oy(),hrr=k6(),jI=GA(),{usaLocationAbbreviations:drr,usaLocationList:prr}=tVe(),{COUNTRIES_X:vrr}=(iVe(),Go(rVe)),{lookupAlpha3:grr}=arr([...nrr,...vrr]),mrr={"ISO-3":crr,"USA-states":xrr,"country names":yrr};function yrr(e){let t=grr(e);return t||(S2.log("Unrecognized country name: "+e+"."),!1)}function xrr(e){e=e.trim();let t=drr.has(e.toUpperCase())?e.toUpperCase():prr[e.toLowerCase()];return t||(S2.log("Unrecognized US location: "+e+"."),!1)}function _rr(e,t,r){var n;if(!t||typeof t!="string")return!1;let i=mrr[e](t);if(i){let a;if(e==="USA-states"){a=[];for(let o of r)((n=o==null?void 0:o.properties)==null?void 0:n.gu)==="USA"&&a.push(o)}else a=r;for(let o of a)if(o.id===i)return o;S2.log(`Location with id ${i} does not have a matching topojson feature at this resolution.`)}return!1}var $I=360;function tQ(e){for(let t=0;t<e.length-1;t++)if(e[t][0]>0&&e[t+1][0]<0)return t;return null}function brr(e){var t=e.geometry,r=t.coordinates,i=e.id,n=[],a,o,s,l;switch(i==="RUS"||i==="FJI"?a=function(u){var c;if(tQ(u)===null)c=u;else for(c=new Array(u.length),l=0;l<u.length;l++)c[l]=[u[l][0]<0?u[l][0]+$I:u[l][0],u[l][1]];n.push(jI.tester(c))}:i==="ATA"?a=function(u){var c=tQ(u);if(c===null)return n.push(jI.tester(u));var f=new Array(u.length+1),h=0;for(l=0;l<u.length;l++)l>c?f[h++]=[u[l][0]+$I,u[l][1]]:l===c?(f[h++]=u[l],f[h++]=[u[l][0],-90]):f[h++]=u[l];var d=jI.tester(f);d.pts.pop(),n.push(d)}:a=function(u){n.push(jI.tester(u))},t.type){case"MultiPolygon":for(o=0;o<r.length;o++)for(s=0;s<r[o].length;s++)a(r[o][s]);break;case"Polygon":for(o=0;o<r.length;o++)a(r[o]);break}return n}function rQ(e){var t=e.geojson,r=window.PlotlyGeoAssets||{},i=typeof t=="string"?r[t]:t;return frr(i)?i:(S2.error("Oops ... something went wrong when fetching "+t),!1)}function wrr(e){var t=e[0].trace,r=rQ(t);if(!r)return!1;var i={},n=[],a;for(a=0;a<t._length;a++){var o=e[a];(o.loc||o.loc===0)&&(i[o.loc]=o)}function s(c){var f=hrr(c,t.featureidkey||"id").get(),h=i[f];if(h){var d=c.geometry;if(d.type==="Polygon"||d.type==="MultiPolygon"){var p={type:"Feature",id:f,geometry:d,properties:{}};p.properties.ct=Trr(p),isNaN(p.properties.ct[0])&&S2.log(["Location",h.loc,"has no polygon with positive area.","Its centroid could not be computed,","so hover and selection will not work for it."].join(" ")),h.fIn=c,h.fOut=p,n.push(p)}else S2.log(["Location",h.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete i[f]}switch(r.type){case"FeatureCollection":var l=r.features;for(a=0;a<l.length;a++)s(l[a]);break;case"Feature":s(r);break;default:return S2.warn(["Invalid GeoJSON type",(r.type||"none")+".","Traces with locationmode *geojson-id* only support","*FeatureCollection* and *Feature* types."].join(" ")),!1}for(var u in i)S2.log(["Location *"+u+"*","does not have a matching feature with id-key","*"+t.featureidkey+"*."].join(" "));return n}function Trr(e){var t=e.geometry,r;if(t.type==="MultiPolygon")for(var i=t.coordinates,n=0,a=0;a<i.length;a++){var o={type:"Polygon",coordinates:i[a]},s=orr(o);s>n&&(n=s,r=o)}else r=t;return!r||!r.coordinates.some(l=>l.length>0)?[NaN,NaN]:srr(r).geometry.coordinates}function Arr(e){var t=window.PlotlyGeoAssets||{},r=[];function i(l){return new Promise(function(u,c){irr.json(l,function(f,h){if(f){delete t[l];var d=f.status===404?'GeoJSON at URL "'+l+'" does not exist.':"Unexpected error while fetching from "+l;return c(new Error(d))}return t[l]=h,u(h)})})}function n(l){return new Promise(function(u,c){var f=0,h=setInterval(function(){if(t[l]&&t[l]!=="pending")return clearInterval(h),u(t[l]);if(f>100)return clearInterval(h),c("Unexpected error while fetching from "+l);f++},50)})}for(var a=0;a<e.length;a++){var o=e[a][0].trace,s=o.geojson;typeof s=="string"&&(t[s]?t[s]==="pending"&&r.push(n(s)):(t[s]="pending",r.push(i(s))))}return r}var Mrr=e=>nQ(iQ(e));function iQ(e){try{return lrr(e)}catch(t){return[]}}function nQ(e){if(e.length===0)return null;if(e.length===1){let[a,o]=e[0];return[a,o,a,o]}let[[t,r],[i,n]]=urr({type:"MultiPoint",coordinates:e});return[t,r,aVe([t,i])[1],n]}var Srr=(e,t)=>t.fitbounds==="geojson"&&e.locationmode==="geojson-id",nVe=(e,t)=>Srr(e,t)?iQ(rQ(e)):[],Err=(e,t)=>nQ(nVe(e,t));function aVe([e,t]){return[e,e>t?t+$I:t]}oVe.exports={locationToFeature:_rr,feature2polygons:brr,getTraceGeojson:rQ,extractTraceFeature:wrr,fetchTraceGeoData:Arr,boundsOfCoords:nQ,computeBbox:Mrr,coordsOf:iQ,doesCrossAntiMeridian:tQ,fitGeojsonBbox:Err,fitGeojsonCoords:nVe,unwrapLonRange:aVe,ANTIMERIDIAN_LON_SHIFT:$I}});var aQ=W((Fjr,uVe)=>{"use strict";var krr=vi(),Crr=Ji(),sVe=ni(),lVe=th(),Drr=lVe.stylePoints,Frr=lVe.styleText;uVe.exports=function(t,r){r&&Lrr(t,r)};function Lrr(e,t){var r=t[0].trace,i=t[0].node3;i.style("opacity",t[0].trace.opacity),Drr(i,r,e),Frr(i,r,e),i.selectAll("path.js-line").style("fill","none").each(function(n){var a=krr.select(this),o=n.trace,s=o.line||{};a.call(sVe.stroke,s.color).call(Crr.dashLine,s.dash||"",s.width||0),o.fill!=="none"&&a.call(sVe.fill,o.fillcolor)})}});var XI=W((Ljr,hVe)=>{"use strict";var cVe=vi(),WI=it(),Prr=II().getTopojsonFeatures,oQ=dE(),YI=cm(),fVe=Op().findExtremes,lQ=Kn().BADNUM,Irr=Td().calcMarkerSize,sQ=$o(),Rrr=aQ();function zrr(e,t,r){var i=t.layers.frontplot.select(".scatterlayer"),n=WI.makeTraceGroups(i,r,"trace scattergeo");function a(o,s){o.lonlat[0]===lQ&&cVe.select(s).remove()}n.selectAll("*").remove(),n.each(function(o){var s=cVe.select(this),l=o[0].trace;if(sQ.hasLines(l)||l.fill!=="none"){var u=oQ.calcTraceToLineCoords(o),c=l.fill!=="none"?oQ.makePolygon(u):oQ.makeLine(u);s.selectAll("path.js-line").data([{geojson:c,trace:l}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}sQ.hasMarkers(l)&&s.selectAll("path.point").data(WI.identity).enter().append("path").classed("point",!0).each(function(f){a(f,this)}),sQ.hasText(l)&&s.selectAll("g").data(WI.identity).enter().append("g").append("text").each(function(f){a(f,this)}),Rrr(e,o)})}function Brr(e,t){var r=e[0].trace,i=t[r.geo],n=i._subplot,a=r._length,o,s;if(WI.isArrayOrTypedArray(r.locations)){var l=r.locationmode,u=l==="geojson-id"?YI.extractTraceFeature(e):Prr(r,n.topojson);for(o=0;o<a;o++){s=e[o];var c=l==="geojson-id"?s.fOut:YI.locationToFeature(l,s.loc,u);s.lonlat=c?c.properties.ct:[lQ,lQ]}}var f={padded:!0},h,d;let p=YI.fitGeojsonBbox(r,i);if(p){let[v,m,g,w]=p;h=[v,g],d=[m,w]}else{for(h=new Array(a),d=new Array(a),o=0;o<a;o++)s=e[o],h[o]=s.lonlat[0],d[o]=s.lonlat[1];f.ppad=Irr(r,a)}r._extremes.lon=fVe(i.lonaxis._ax,h,f),r._extremes.lat=fVe(i.lataxis._ax,d,f)}function qrr(e,t){let r=YI.fitGeojsonCoords(e[0].trace,t);if(r.length)return r;let i=[];for(let n of e)n.lonlat&&isFinite(n.lonlat[0])&&i.push(n.lonlat);return i}hVe.exports={calcGeoJSON:Brr,fitCoords:qrr,plot:zrr}});var pVe=W((Pjr,dVe)=>{"use strict";var Orr=Ds(),Nrr=Kn().BADNUM,Urr=Xw(),Vrr=it().fillText,Grr=I4();dVe.exports=function(t,r,i){var n=t.cd,a=n[0].trace,o=t.xa,s=t.ya,l=t.subplot,u=l.projection.isLonLatOverEdges,c=l.project;function f(w){var b=w.lonlat;if(b[0]===Nrr||u(b))return 1/0;var _=c(b),M=c([r,i]),x=Math.abs(_[0]-M[0]),T=Math.abs(_[1]-M[1]),A=Math.max(3,w.mrc||0);return Math.max(Math.sqrt(x*x+T*T)-A,1-3/A)}if(Orr.getClosest(n,f,t),t.index!==!1){var h=n[t.index],d=h.lonlat,p=[o.c2p(d),s.c2p(d)],v=h.mrc||1;t.x0=p[0]-v,t.x1=p[0]+v,t.y0=p[1]-v,t.y1=p[1]+v,t.loc=h.loc,t.lon=d[0],t.lat=d[1];var m={};m[a.geo]={_subplot:l};var g=a._module.formatLabels(h,a,m);return t.lonLabel=g.lonLabel,t.latLabel=g.latLabel,t.color=Urr(a,h),t.extraText=Hrr(a,h,t,n[0].t.labels),t.hovertemplate=a.hovertemplate,[t]}};function Hrr(e,t,r,i){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,a=n==="all"?Grr.hoverinfo.flags:n.split("+"),o=a.indexOf("location")!==-1&&Array.isArray(e.locations),s=a.indexOf("lon")!==-1,l=a.indexOf("lat")!==-1,u=a.indexOf("text")!==-1,c=[];function f(h){return h+"\xB0"}return o?c.push(t.loc):s&&l?c.push("("+f(r.latLabel)+", "+f(r.lonLabel)+")"):s?c.push(i.lon+f(r.lonLabel)):l&&c.push(i.lat+f(r.latLabel)),u&&Vrr(t,e,c),c.join("<br>")}});var gVe=W((Ijr,vVe)=>{"use strict";vVe.exports=function(t,r,i,n,a){t.lon=r.lon,t.lat=r.lat,t.location=r.loc?r.loc:null;var o=n[a];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t}});var xVe=W((Rjr,yVe)=>{"use strict";var mVe=$o(),jrr=Kn().BADNUM;yVe.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=[],s=i[0].trace,l,u,c,f,h,d=!mVe.hasMarkers(s)&&!mVe.hasText(s);if(d)return[];if(r===!1)for(h=0;h<i.length;h++)i[h].selected=0;else for(h=0;h<i.length;h++)l=i[h],u=l.lonlat,u[0]!==jrr&&(c=n.c2p(u),f=a.c2p(u),r.contains([c,f],null,h,t)?(o.push({pointNumber:h,lon:u[0],lat:u[1]}),l.selected=1):l.selected=0);return o}});var bVe=W((ZI,_Ve)=>{(function(e,t){t(typeof ZI=="object"&&typeof _Ve!="undefined"?ZI:e.d3=e.d3||{})})(ZI,(function(e){"use strict";function t(U,V){return U<V?-1:U>V?1:U>=V?0:NaN}function r(U){return U.length===1&&(U=i(U)),{left:function(V,X,H,G){for(H==null&&(H=0),G==null&&(G=V.length);H<G;){var Q=H+G>>>1;U(V[Q],X)<0?H=Q+1:G=Q}return H},right:function(V,X,H,G){for(H==null&&(H=0),G==null&&(G=V.length);H<G;){var Q=H+G>>>1;U(V[Q],X)>0?G=Q:H=Q+1}return H}}}function i(U){return function(V,X){return t(U(V),X)}}var n=r(t),a=n.right,o=n.left;function s(U,V){V==null&&(V=l);for(var X=0,H=U.length-1,G=U[0],Q=new Array(H<0?0:H);X<H;)Q[X]=V(G,G=U[++X]);return Q}function l(U,V){return[U,V]}function u(U,V,X){var H=U.length,G=V.length,Q=new Array(H*G),te,ce,ge,Ce;for(X==null&&(X=l),te=ge=0;te<H;++te)for(Ce=U[te],ce=0;ce<G;++ce,++ge)Q[ge]=X(Ce,V[ce]);return Q}function c(U,V){return V<U?-1:V>U?1:V>=U?0:NaN}function f(U){return U===null?NaN:+U}function h(U,V){var X=U.length,H=0,G=-1,Q=0,te,ce,ge=0;if(V==null)for(;++G<X;)isNaN(te=f(U[G]))||(ce=te-Q,Q+=ce/++H,ge+=ce*(te-Q));else for(;++G<X;)isNaN(te=f(V(U[G],G,U)))||(ce=te-Q,Q+=ce/++H,ge+=ce*(te-Q));if(H>1)return ge/(H-1)}function d(U,V){var X=h(U,V);return X&&Math.sqrt(X)}function p(U,V){var X=U.length,H=-1,G,Q,te;if(V==null){for(;++H<X;)if((G=U[H])!=null&&G>=G)for(Q=te=G;++H<X;)(G=U[H])!=null&&(Q>G&&(Q=G),te<G&&(te=G))}else for(;++H<X;)if((G=V(U[H],H,U))!=null&&G>=G)for(Q=te=G;++H<X;)(G=V(U[H],H,U))!=null&&(Q>G&&(Q=G),te<G&&(te=G));return[Q,te]}var v=Array.prototype,m=v.slice,g=v.map;function w(U){return function(){return U}}function b(U){return U}function _(U,V,X){U=+U,V=+V,X=(G=arguments.length)<2?(V=U,U=0,1):G<3?1:+X;for(var H=-1,G=Math.max(0,Math.ceil((V-U)/X))|0,Q=new Array(G);++H<G;)Q[H]=U+H*X;return Q}var M=Math.sqrt(50),x=Math.sqrt(10),T=Math.sqrt(2);function A(U,V,X){var H,G=-1,Q,te,ce;if(V=+V,U=+U,X=+X,U===V&&X>0)return[U];if((H=V<U)&&(Q=U,U=V,V=Q),(ce=y(U,V,X))===0||!isFinite(ce))return[];if(ce>0)for(U=Math.ceil(U/ce),V=Math.floor(V/ce),te=new Array(Q=Math.ceil(V-U+1));++G<Q;)te[G]=(U+G)*ce;else for(U=Math.floor(U*ce),V=Math.ceil(V*ce),te=new Array(Q=Math.ceil(U-V+1));++G<Q;)te[G]=(U-G)/ce;return H&&te.reverse(),te}function y(U,V,X){var H=(V-U)/Math.max(0,X),G=Math.floor(Math.log(H)/Math.LN10),Q=H/Math.pow(10,G);return G>=0?(Q>=M?10:Q>=x?5:Q>=T?2:1)*Math.pow(10,G):-Math.pow(10,-G)/(Q>=M?10:Q>=x?5:Q>=T?2:1)}function E(U,V,X){var H=Math.abs(V-U)/Math.max(0,X),G=Math.pow(10,Math.floor(Math.log(H)/Math.LN10)),Q=H/G;return Q>=M?G*=10:Q>=x?G*=5:Q>=T&&(G*=2),V<U?-G:G}function S(U){return Math.ceil(Math.log(U.length)/Math.LN2)+1}function C(){var U=b,V=p,X=S;function H(G){var Q,te=G.length,ce,ge=new Array(te);for(Q=0;Q<te;++Q)ge[Q]=U(G[Q],Q,G);var Ce=V(ge),be=Ce[0],he=Ce[1],oe=X(ge,be,he);Array.isArray(oe)||(oe=E(be,he,oe),oe=_(Math.ceil(be/oe)*oe,he,oe));for(var Ee=oe.length;oe[0]<=be;)oe.shift(),--Ee;for(;oe[Ee-1]>he;)oe.pop(),--Ee;var ye=new Array(Ee+1),ue;for(Q=0;Q<=Ee;++Q)ue=ye[Q]=[],ue.x0=Q>0?oe[Q-1]:be,ue.x1=Q<Ee?oe[Q]:he;for(Q=0;Q<te;++Q)ce=ge[Q],be<=ce&&ce<=he&&ye[a(oe,ce,0,Ee)].push(G[Q]);return ye}return H.value=function(G){return arguments.length?(U=typeof G=="function"?G:w(G),H):U},H.domain=function(G){return arguments.length?(V=typeof G=="function"?G:w([G[0],G[1]]),H):V},H.thresholds=function(G){return arguments.length?(X=typeof G=="function"?G:Array.isArray(G)?w(m.call(G)):w(G),H):X},H}function k(U,V,X){if(X==null&&(X=f),!!(H=U.length)){if((V=+V)<=0||H<2)return+X(U[0],0,U);if(V>=1)return+X(U[H-1],H-1,U);var H,G=(H-1)*V,Q=Math.floor(G),te=+X(U[Q],Q,U),ce=+X(U[Q+1],Q+1,U);return te+(ce-te)*(G-Q)}}function D(U,V,X){return U=g.call(U,f).sort(t),Math.ceil((X-V)/(2*(k(U,.75)-k(U,.25))*Math.pow(U.length,-1/3)))}function F(U,V,X){return Math.ceil((X-V)/(3.5*d(U)*Math.pow(U.length,-1/3)))}function P(U,V){var X=U.length,H=-1,G,Q;if(V==null){for(;++H<X;)if((G=U[H])!=null&&G>=G)for(Q=G;++H<X;)(G=U[H])!=null&&G>Q&&(Q=G)}else for(;++H<X;)if((G=V(U[H],H,U))!=null&&G>=G)for(Q=G;++H<X;)(G=V(U[H],H,U))!=null&&G>Q&&(Q=G);return Q}function R(U,V){var X=U.length,H=X,G=-1,Q,te=0;if(V==null)for(;++G<X;)isNaN(Q=f(U[G]))?--H:te+=Q;else for(;++G<X;)isNaN(Q=f(V(U[G],G,U)))?--H:te+=Q;if(H)return te/H}function L(U,V){var X=U.length,H=-1,G,Q=[];if(V==null)for(;++H<X;)isNaN(G=f(U[H]))||Q.push(G);else for(;++H<X;)isNaN(G=f(V(U[H],H,U)))||Q.push(G);return k(Q.sort(t),.5)}function I(U){for(var V=U.length,X,H=-1,G=0,Q,te;++H<V;)G+=U[H].length;for(Q=new Array(G);--V>=0;)for(te=U[V],X=te.length;--X>=0;)Q[--G]=te[X];return Q}function B(U,V){var X=U.length,H=-1,G,Q;if(V==null){for(;++H<X;)if((G=U[H])!=null&&G>=G)for(Q=G;++H<X;)(G=U[H])!=null&&Q>G&&(Q=G)}else for(;++H<X;)if((G=V(U[H],H,U))!=null&&G>=G)for(Q=G;++H<X;)(G=V(U[H],H,U))!=null&&Q>G&&(Q=G);return Q}function O(U,V){for(var X=V.length,H=new Array(X);X--;)H[X]=U[V[X]];return H}function $(U,V){if(X=U.length){var X,H=0,G=0,Q,te=U[G];for(V==null&&(V=t);++H<X;)(V(Q=U[H],te)<0||V(te,te)!==0)&&(te=Q,G=H);if(V(te,te)===0)return G}}function Y(U,V,X){for(var H=(X==null?U.length:X)-(V=V==null?0:+V),G,Q;H;)Q=Math.random()*H--|0,G=U[H+V],U[H+V]=U[Q+V],U[Q+V]=G;return U}function K(U,V){var X=U.length,H=-1,G,Q=0;if(V==null)for(;++H<X;)(G=+U[H])&&(Q+=G);else for(;++H<X;)(G=+V(U[H],H,U))&&(Q+=G);return Q}function j(U){if(!(Q=U.length))return[];for(var V=-1,X=B(U,q),H=new Array(X);++V<X;)for(var G=-1,Q,te=H[V]=new Array(Q);++G<Q;)te[G]=U[G][V];return H}function q(U){return U.length}function J(){return j(arguments)}e.bisect=a,e.bisectRight=a,e.bisectLeft=o,e.ascending=t,e.bisector=r,e.cross=u,e.descending=c,e.deviation=d,e.extent=p,e.histogram=C,e.thresholdFreedmanDiaconis=D,e.thresholdScott=F,e.thresholdSturges=S,e.max=P,e.mean=R,e.median=L,e.merge=I,e.min=B,e.pairs=s,e.permute=O,e.quantile=k,e.range=_,e.scan=$,e.shuffle=Y,e.sum=K,e.ticks=A,e.tickIncrement=y,e.tickStep=E,e.transpose=j,e.variance=h,e.zip=J,Object.defineProperty(e,"__esModule",{value:!0})}))});var TVe=W((KI,wVe)=>{(function(e,t){typeof KI=="object"&&typeof wVe!="undefined"?t(KI,HI(),bVe()):t(e.d3=e.d3||{},e.d3,e.d3)})(KI,(function(e,t,r){"use strict";var i=Math.abs,n=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,u=Math.log,c=Math.max,f=Math.min,h=Math.pow,d=Math.round,p=Math.sign||function(ie){return ie>0?1:ie<0?-1:0},v=Math.sin,m=Math.tan,g=1e-6,w=1e-12,b=Math.PI,_=b/2,M=b/4,x=Math.SQRT1_2,T=F(2),A=F(b),y=b*2,E=180/b,S=b/180;function C(ie){return ie?ie/Math.sin(ie):1}function k(ie){return ie>1?_:ie<-1?-_:Math.asin(ie)}function D(ie){return ie>1?0:ie<-1?b:Math.acos(ie)}function F(ie){return ie>0?Math.sqrt(ie):0}function P(ie){return ie=s(2*ie),(ie-1)/(ie+1)}function R(ie){return(s(ie)-s(-ie))/2}function L(ie){return(s(ie)+s(-ie))/2}function I(ie){return u(ie+F(ie*ie+1))}function B(ie){return u(ie+F(ie*ie-1))}function O(ie){var se=m(ie/2),de=2*u(o(ie/2))/(se*se);function ve(Me,Ae){var Pe=o(Me),Ke=o(Ae),nt=v(Ae),Ze=Ke*Pe,at=-((1-Ze?u((1+Ze)/2)/(1-Ze):-.5)+de/(1+Ze));return[at*Ke*v(Me),at*nt]}return ve.invert=function(Me,Ae){var Pe=F(Me*Me+Ae*Ae),Ke=-ie/2,nt=50,Ze;if(!Pe)return[0,0];do{var at=Ke/2,yt=o(at),Pt=v(at),Ut=Pt/yt,ar=-u(i(yt));Ke-=Ze=(2/Ut*ar-de*Ut-Pe)/(-ar/(Pt*Pt)+1-de/(2*yt*yt))*(yt<0?.7:1)}while(i(Ze)>g&&--nt>0);var Ar=v(Ke);return[a(Me*Ar,Pe*o(Ke)),k(Ae*Ar/Pe)]},ve}function $(){var ie=_,se=t.geoProjectionMutator(O),de=se(ie);return de.radius=function(ve){return arguments.length?se(ie=ve*S):ie*E},de.scale(179.976).clipAngle(147)}function Y(ie,se){var de=o(se),ve=C(D(de*o(ie/=2)));return[2*de*v(ie)*ve,v(se)*ve]}Y.invert=function(ie,se){if(!(ie*ie+4*se*se>b*b+g)){var de=ie,ve=se,Me=25;do{var Ae=v(de),Pe=v(de/2),Ke=o(de/2),nt=v(ve),Ze=o(ve),at=v(2*ve),yt=nt*nt,Pt=Ze*Ze,Ut=Pe*Pe,ar=1-Pt*Ke*Ke,Ar=ar?D(Ze*Ke)*F(Vr=1/ar):Vr=0,Vr,_i=2*Ar*Ze*Pe-ie,rn=Ar*nt-se,cn=Vr*(Pt*Ut+Ar*Ze*Ke*yt),xn=Vr*(.5*Ae*at-Ar*2*nt*Pe),Dn=Vr*.25*(at*Pe-Ar*nt*Pt*Ae),Qa=Vr*(yt*Ke+Ar*Ut*Ze),So=xn*Dn-Qa*cn;if(!So)break;var oa=(rn*xn-_i*Qa)/So,as=(_i*Dn-rn*cn)/So;de-=oa,ve-=as}while((i(oa)>g||i(as)>g)&&--Me>0);return[de,ve]}};function K(){return t.geoProjection(Y).scale(152.63)}function j(ie){var se=v(ie),de=o(ie),ve=ie>=0?1:-1,Me=m(ve*ie),Ae=(1+se-de)/2;function Pe(Ke,nt){var Ze=o(nt),at=o(Ke/=2);return[(1+Ze)*v(Ke),(ve*nt>-a(at,Me)-.001?0:-ve*10)+Ae+v(nt)*de-(1+Ze)*se*at]}return Pe.invert=function(Ke,nt){var Ze=0,at=0,yt=50;do{var Pt=o(Ze),Ut=v(Ze),ar=o(at),Ar=v(at),Vr=1+ar,_i=Vr*Ut-Ke,rn=Ae+Ar*de-Vr*se*Pt-nt,cn=Vr*Pt/2,xn=-Ut*Ar,Dn=se*Vr*Ut/2,Qa=de*ar+se*Pt*Ar,So=xn*Dn-Qa*cn,oa=(rn*xn-_i*Qa)/So/2,as=(_i*Dn-rn*cn)/So;i(as)>2&&(as/=2),Ze-=oa,at-=as}while((i(oa)>g||i(as)>g)&&--yt>0);return ve*at>-a(o(Ze),Me)-.001?[Ze*2,at]:null},Pe}function q(){var ie=20*S,se=ie>=0?1:-1,de=m(se*ie),ve=t.geoProjectionMutator(j),Me=ve(ie),Ae=Me.stream;return Me.parallel=function(Pe){return arguments.length?(de=m((se=(ie=Pe*S)>=0?1:-1)*ie),ve(ie)):ie*E},Me.stream=function(Pe){var Ke=Me.rotate(),nt=Ae(Pe),Ze=(Me.rotate([0,0]),Ae(Pe)),at=Me.precision();return Me.rotate(Ke),nt.sphere=function(){Ze.polygonStart(),Ze.lineStart();for(var yt=se*-180;se*yt<180;yt+=se*90)Ze.point(yt,se*90);if(ie)for(;se*(yt-=3*se*at)>=-180;)Ze.point(yt,se*-a(o(yt*S/2),de)*E);Ze.lineEnd(),Ze.polygonEnd()},nt},Me.scale(218.695).center([0,28.0974])}function J(ie,se){var de=m(se/2),ve=F(1-de*de),Me=1+ve*o(ie/=2),Ae=v(ie)*ve/Me,Pe=de/Me,Ke=Ae*Ae,nt=Pe*Pe;return[4/3*Ae*(3+Ke-3*nt),4/3*Pe*(3+3*Ke-nt)]}J.invert=function(ie,se){if(ie*=3/8,se*=3/8,!ie&&i(se)>1)return null;var de=ie*ie,ve=se*se,Me=1+de+ve,Ae=F((Me-F(Me*Me-4*se*se))/2),Pe=k(Ae)/3,Ke=Ae?B(i(se/Ae))/3:I(i(ie))/3,nt=o(Pe),Ze=L(Ke),at=Ze*Ze-nt*nt;return[p(ie)*2*a(R(Ke)*nt,.25-at),p(se)*2*a(Ze*v(Pe),.25+at)]};function U(){return t.geoProjection(J).scale(66.1603)}var V=F(8),X=u(1+T);function H(ie,se){var de=i(se);return de<M?[ie,u(m(M+se/2))]:[ie*o(de)*(2*T-1/v(de)),p(se)*(2*T*(de-M)-u(m(de/2)))]}H.invert=function(ie,se){if((Ae=i(se))<X)return[ie,2*n(s(se))-_];var de=M,ve=25,Me,Ae;do{var Pe=o(de/2),Ke=m(de/2);de-=Me=(V*(de-M)-u(Ke)-Ae)/(V-Pe*Pe/(2*Ke))}while(i(Me)>w&&--ve>0);return[ie/(o(de)*(V-1/v(de))),p(se)*de]};function G(){return t.geoProjection(H).scale(112.314)}function Q(ie){var se=2*b/ie;function de(ve,Me){var Ae=t.geoAzimuthalEquidistantRaw(ve,Me);if(i(ve)>_){var Pe=a(Ae[1],Ae[0]),Ke=F(Ae[0]*Ae[0]+Ae[1]*Ae[1]),nt=se*d((Pe-_)/se)+_,Ze=a(v(Pe-=nt),2-o(Pe));Pe=nt+k(b/Ke*v(Ze))-Ze,Ae[0]=Ke*o(Pe),Ae[1]=Ke*v(Pe)}return Ae}return de.invert=function(ve,Me){var Ae=F(ve*ve+Me*Me);if(Ae>_){var Pe=a(Me,ve),Ke=se*d((Pe-_)/se)+_,nt=Pe>Ke?-1:1,Ze=Ae*o(Ke-Pe),at=1/m(nt*D((Ze-b)/F(b*(b-2*Ze)+Ae*Ae)));Pe=Ke+2*n((at+nt*F(at*at-3))/3),ve=Ae*o(Pe),Me=Ae*v(Pe)}return t.geoAzimuthalEquidistantRaw.invert(ve,Me)},de}function te(){var ie=5,se=t.geoProjectionMutator(Q),de=se(ie),ve=de.stream,Me=.01,Ae=-o(Me*S),Pe=v(Me*S);return de.lobes=function(Ke){return arguments.length?se(ie=+Ke):ie},de.stream=function(Ke){var nt=de.rotate(),Ze=ve(Ke),at=(de.rotate([0,0]),ve(Ke));return de.rotate(nt),Ze.sphere=function(){at.polygonStart(),at.lineStart();for(var yt=0,Pt=360/ie,Ut=2*b/ie,ar=90-180/ie,Ar=_;yt<ie;++yt,ar-=Pt,Ar-=Ut)at.point(a(Pe*o(Ar),Ae)*E,k(Pe*v(Ar))*E),ar<-90?(at.point(-90,-180-ar-Me),at.point(-90,-180-ar+Me)):(at.point(90,ar+Me),at.point(90,ar-Me));at.lineEnd(),at.polygonEnd()},Ze},de.scale(87.8076).center([0,17.1875]).clipAngle(180-.001)}function ce(ie,se){if(arguments.length<2&&(se=ie),se===1)return t.geoAzimuthalEqualAreaRaw;if(se===1/0)return ge;function de(ve,Me){var Ae=t.geoAzimuthalEqualAreaRaw(ve/se,Me);return Ae[0]*=ie,Ae}return de.invert=function(ve,Me){var Ae=t.geoAzimuthalEqualAreaRaw.invert(ve/ie,Me);return Ae[0]*=se,Ae},de}function ge(ie,se){return[ie*o(se)/o(se/=2),2*v(se)]}ge.invert=function(ie,se){var de=2*k(se/2);return[ie*o(de/2)/o(de),de]};function Ce(){var ie=2,se=t.geoProjectionMutator(ce),de=se(ie);return de.coefficient=function(ve){return arguments.length?se(ie=+ve):ie},de.scale(169.529)}function be(ie,se,de){var ve=100,Me,Ae,Pe;de=de===void 0?0:+de,se=+se;do Ae=ie(de),Pe=ie(de+g),Ae===Pe&&(Pe=Ae+g),de-=Me=-1*g*(Ae-se)/(Ae-Pe);while(ve-- >0&&i(Me)>g);return ve<0?NaN:de}function he(ie,se,de){return se===void 0&&(se=40),de===void 0&&(de=w),function(ve,Me,Ae,Pe){var Ke,nt,Ze;Ae=Ae===void 0?0:+Ae,Pe=Pe===void 0?0:+Pe;for(var at=0;at<se;at++){var yt=ie(Ae,Pe),Pt=yt[0]-ve,Ut=yt[1]-Me;if(i(Pt)<de&&i(Ut)<de)break;var ar=Pt*Pt+Ut*Ut;if(ar>Ke){Ae-=nt/=2,Pe-=Ze/=2;continue}Ke=ar;var Ar=(Ae>0?-1:1)*de,Vr=(Pe>0?-1:1)*de,_i=ie(Ae+Ar,Pe),rn=ie(Ae,Pe+Vr),cn=(_i[0]-yt[0])/Ar,xn=(_i[1]-yt[1])/Ar,Dn=(rn[0]-yt[0])/Vr,Qa=(rn[1]-yt[1])/Vr,So=Qa*cn-xn*Dn,oa=(i(So)<.5?.5:1)/So;if(nt=(Ut*Dn-Pt*Qa)*oa,Ze=(Pt*xn-Ut*cn)*oa,Ae+=nt,Pe+=Ze,i(nt)<de&&i(Ze)<de)break}return[Ae,Pe]}}function oe(){var ie=ce(1.68,2),se=1.4,de=12;function ve(Me,Ae){if(Me+Ae<-se){var Pe=(Me-Ae+1.6)*(Me+Ae+se)/8;Me+=Pe,Ae-=.8*Pe*v(Ae+b/2)}var Ke=ie(Me,Ae),nt=(1-o(Me*Ae))/de;return Ke[1]<0&&(Ke[0]*=1+nt),Ke[1]>0&&(Ke[1]*=1+nt/1.5*Ke[0]*Ke[0]),Ke}return ve.invert=he(ve),ve}function Ee(){return t.geoProjection(oe()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function ye(ie,se){var de=ie*v(se),ve=30,Me;do se-=Me=(se+v(se)-de)/(1+o(se));while(i(Me)>g&&--ve>0);return se/2}function ue(ie,se,de){function ve(Me,Ae){return[ie*Me*o(Ae=ye(de,Ae)),se*v(Ae)]}return ve.invert=function(Me,Ae){return Ae=k(Ae/se),[Me/(ie*o(Ae)),k((2*Ae+v(2*Ae))/de)]},ve}var ee=ue(T/_,T,b);function ae(){return t.geoProjection(ee).scale(169.529)}var xe=2.00276,re=1.11072;function pe(ie,se){var de=ye(b,se);return[xe*ie/(1/o(se)+re/o(de)),(se+T*v(de))/xe]}pe.invert=function(ie,se){var de=xe*se,ve=se<0?-M:M,Me=25,Ae,Pe;do Pe=de-T*v(ve),ve-=Ae=(v(2*ve)+2*ve-b*v(Pe))/(2*o(2*ve)+2+b*o(Pe)*T*o(ve));while(i(Ae)>g&&--Me>0);return Pe=de-T*v(ve),[ie*(1/o(Pe)+re/o(ve))/xe,Pe]};function we(){return t.geoProjection(pe).scale(160.857)}function Fe(ie){var se=0,de=t.geoProjectionMutator(ie),ve=de(se);return ve.parallel=function(Me){return arguments.length?de(se=Me*S):se*E},ve}function Se(ie,se){return[ie*o(se),se]}Se.invert=function(ie,se){return[ie/o(se),se]};function ke(){return t.geoProjection(Se).scale(152.63)}function _e(ie){if(!ie)return Se;var se=1/m(ie);function de(ve,Me){var Ae=se+ie-Me,Pe=Ae&&ve*o(Me)/Ae;return[Ae*v(Pe),se-Ae*o(Pe)]}return de.invert=function(ve,Me){var Ae=F(ve*ve+(Me=se-Me)*Me),Pe=se+ie-Ae;return[Ae/o(Pe)*a(ve,Me),Pe]},de}function Ie(){return Fe(_e).scale(123.082).center([0,26.1441]).parallel(45)}function Oe(ie){function se(de,ve){var Me=_-ve,Ae=Me&&de*ie*v(Me)/Me;return[Me*v(Ae)/ie,_-Me*o(Ae)]}return se.invert=function(de,ve){var Me=de*ie,Ae=_-ve,Pe=F(Me*Me+Ae*Ae),Ke=a(Me,Ae);return[(Pe?Pe/v(Pe):1)*Ke/ie,_-Pe]},se}function Qe(){var ie=.5,se=t.geoProjectionMutator(Oe),de=se(ie);return de.fraction=function(ve){return arguments.length?se(ie=+ve):ie},de.scale(158.837)}var et=ue(1,4/b,b);function _t(){return t.geoProjection(et).scale(152.63)}function ut(ie,se,de,ve,Me,Ae){var Pe=o(Ae),Ke;if(i(ie)>1||i(Ae)>1)Ke=D(de*Me+se*ve*Pe);else{var nt=v(ie/2),Ze=v(Ae/2);Ke=2*k(F(nt*nt+se*ve*Ze*Ze))}return i(Ke)>g?[Ke,a(ve*v(Ae),se*Me-de*ve*Pe)]:[0,0]}function vt(ie,se,de){return D((ie*ie+se*se-de*de)/(2*ie*se))}function Xe(ie){return ie-2*b*l((ie+b)/(2*b))}function mt(ie,se,de){for(var ve=[[ie[0],ie[1],v(ie[1]),o(ie[1])],[se[0],se[1],v(se[1]),o(se[1])],[de[0],de[1],v(de[1]),o(de[1])]],Me=ve[2],Ae,Pe=0;Pe<3;++Pe,Me=Ae)Ae=ve[Pe],Me.v=ut(Ae[1]-Me[1],Me[3],Me[2],Ae[3],Ae[2],Ae[0]-Me[0]),Me.point=[0,0];var Ke=vt(ve[0].v[0],ve[2].v[0],ve[1].v[0]),nt=vt(ve[0].v[0],ve[1].v[0],ve[2].v[0]),Ze=b-Ke;ve[2].point[1]=0,ve[0].point[0]=-(ve[1].point[0]=ve[0].v[0]/2);var at=[ve[2].point[0]=ve[0].point[0]+ve[2].v[0]*o(Ke),2*(ve[0].point[1]=ve[1].point[1]=ve[2].v[0]*v(Ke))];function yt(Pt,Ut){var ar=v(Ut),Ar=o(Ut),Vr=new Array(3),_i;for(_i=0;_i<3;++_i){var rn=ve[_i];if(Vr[_i]=ut(Ut-rn[1],rn[3],rn[2],Ar,ar,Pt-rn[0]),!Vr[_i][0])return rn.point;Vr[_i][1]=Xe(Vr[_i][1]-rn.v[1])}var cn=at.slice();for(_i=0;_i<3;++_i){var xn=_i==2?0:_i+1,Dn=vt(ve[_i].v[0],Vr[_i][0],Vr[xn][0]);Vr[_i][1]<0&&(Dn=-Dn),_i?_i==1?(Dn=nt-Dn,cn[0]-=Vr[_i][0]*o(Dn),cn[1]-=Vr[_i][0]*v(Dn)):(Dn=Ze-Dn,cn[0]+=Vr[_i][0]*o(Dn),cn[1]+=Vr[_i][0]*v(Dn)):(cn[0]+=Vr[_i][0]*o(Dn),cn[1]-=Vr[_i][0]*v(Dn))}return cn[0]/=3,cn[1]/=3,cn}return yt}function bt(ie){return ie[0]*=S,ie[1]*=S,ie}function Ne(){return Ue([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ue(ie,se,de){var ve=t.geoCentroid({type:"MultiPoint",coordinates:[ie,se,de]}),Me=[-ve[0],-ve[1]],Ae=t.geoRotation(Me),Pe=mt(bt(Ae(ie)),bt(Ae(se)),bt(Ae(de)));Pe.invert=he(Pe);var Ke=t.geoProjection(Pe).rotate(Me),nt=Ke.center;return delete Ke.rotate,Ke.center=function(Ze){return arguments.length?nt(Ae(Ze)):Ae.invert(nt())},Ke.clipAngle(90)}function Ge(ie,se){var de=F(1-v(se));return[2/A*ie*de,A*(1-de)]}Ge.invert=function(ie,se){var de=(de=se/A-1)*de;return[de>0?ie*F(b/de)/2:0,k(1-de)]};function je(){return t.geoProjection(Ge).scale(95.6464).center([0,30])}function Re(ie){var se=m(ie);function de(ve,Me){return[ve,(ve?ve/v(ve):1)*(v(Me)*o(ve)-se*o(Me))]}return de.invert=se?function(ve,Me){ve&&(Me*=v(ve)/ve);var Ae=o(ve);return[ve,2*a(F(Ae*Ae+se*se-Me*Me)-Ae,se-Me)]}:function(ve,Me){return[ve,k(ve?Me*m(ve)/ve:Me)]},de}function Ve(){return Fe(Re).scale(249.828).clipAngle(90)}var ct=F(3);function Tt(ie,se){return[ct*ie*(2*o(2*se/3)-1)/A,ct*A*v(se/3)]}Tt.invert=function(ie,se){var de=3*k(se/(ct*A));return[A*ie/(ct*(2*o(2*de/3)-1)),de]};function Xt(){return t.geoProjection(Tt).scale(156.19)}function Vt(ie){var se=o(ie);function de(ve,Me){return[ve*se,v(Me)/se]}return de.invert=function(ve,Me){return[ve/se,k(Me*se)]},de}function lr(){return Fe(Vt).parallel(38.58).scale(195.044)}function ur(ie){var se=o(ie);function de(ve,Me){return[ve*se,(1+se)*m(Me/2)]}return de.invert=function(ve,Me){return[ve/se,n(Me/(1+se))*2]},de}function Bt(){return Fe(ur).scale(124.75)}function Zt(ie,se){var de=F(8/(3*b));return[de*ie*(1-i(se)/b),de*se]}Zt.invert=function(ie,se){var de=F(8/(3*b)),ve=se/de;return[ie/(de*(1-i(ve)/b)),ve]};function kr(){return t.geoProjection(Zt).scale(165.664)}function $e(ie,se){var de=F(4-3*v(i(se)));return[2/F(6*b)*ie*de,p(se)*F(2*b/3)*(2-de)]}$e.invert=function(ie,se){var de=2-i(se)/F(2*b/3);return[ie*F(6*b)/(2*de),p(se)*k((4-de*de)/3)]};function tt(){return t.geoProjection($e).scale(165.664)}function st(ie,se){var de=F(b*(4+b));return[2/de*ie*(1+F(1-4*se*se/(b*b))),4/de*se]}st.invert=function(ie,se){var de=F(b*(4+b))/2;return[ie*de/(1+F(1-se*se*(4+b)/(4*b))),se*de/2]};function xt(){return t.geoProjection(st).scale(180.739)}function Je(ie,se){var de=(2+_)*v(se);se/=2;for(var ve=0,Me=1/0;ve<10&&i(Me)>g;ve++){var Ae=o(se);se-=Me=(se+v(se)*(Ae+2)-de)/(2*Ae*(1+Ae))}return[2/F(b*(4+b))*ie*(1+o(se)),2*F(b/(4+b))*v(se)]}Je.invert=function(ie,se){var de=se*F((4+b)/b)/2,ve=k(de),Me=o(ve);return[ie/(2/F(b*(4+b))*(1+Me)),k((ve+de*(Me+2))/(2+_))]};function Ct(){return t.geoProjection(Je).scale(180.739)}function ir(ie,se){return[ie*(1+o(se))/F(2+b),2*se/F(2+b)]}ir.invert=function(ie,se){var de=F(2+b),ve=se*de/2;return[de*ie/(1+o(ve)),ve]};function hr(){return t.geoProjection(ir).scale(173.044)}function Ur(ie,se){for(var de=(1+_)*v(se),ve=0,Me=1/0;ve<10&&i(Me)>g;ve++)se-=Me=(se+v(se)-de)/(1+o(se));return de=F(2+b),[ie*(1+o(se))/de,2*se/de]}Ur.invert=function(ie,se){var de=1+_,ve=F(de/2);return[ie*2*ve/(1+o(se*=ve)),k((se+v(se))/de)]};function si(){return t.geoProjection(Ur).scale(173.044)}var ei=3+2*T;function Lr(ie,se){var de=v(ie/=2),ve=o(ie),Me=F(o(se)),Ae=o(se/=2),Pe=v(se)/(Ae+T*ve*Me),Ke=F(2/(1+Pe*Pe)),nt=F((T*Ae+(ve+de)*Me)/(T*Ae+(ve-de)*Me));return[ei*(Ke*(nt-1/nt)-2*u(nt)),ei*(Ke*Pe*(nt+1/nt)-2*n(Pe))]}Lr.invert=function(ie,se){if(!(Ae=J.invert(ie/1.2,se*1.065)))return null;var de=Ae[0],ve=Ae[1],Me=20,Ae;ie/=ei,se/=ei;do{var Pe=de/2,Ke=ve/2,nt=v(Pe),Ze=o(Pe),at=v(Ke),yt=o(Ke),Pt=o(ve),Ut=F(Pt),ar=at/(yt+T*Ze*Ut),Ar=ar*ar,Vr=F(2/(1+Ar)),_i=T*yt+(Ze+nt)*Ut,rn=T*yt+(Ze-nt)*Ut,cn=_i/rn,xn=F(cn),Dn=xn-1/xn,Qa=xn+1/xn,So=Vr*Dn-2*u(xn)-ie,oa=Vr*ar*Qa-2*n(ar)-se,as=at&&x*Ut*nt*Ar/at,wl=(T*Ze*yt+Ut)/(2*(yt+T*Ze*Ut)*(yt+T*Ze*Ut)*Ut),Xu=-.5*ar*Vr*Vr*Vr,jf=Xu*as,u0=Xu*wl,ou=(ou=2*yt+T*Ut*(Ze-nt))*ou*xn,Ul=(T*Ze*yt*Ut+Pt)/ou,$c=-(T*nt*at)/(Ut*ou),$f=Dn*jf-2*Ul/xn+Vr*(Ul+Ul/cn),Wf=Dn*u0-2*$c/xn+Vr*($c+$c/cn),Yf=ar*Qa*jf-2*as/(1+Ar)+Vr*Qa*as+Vr*ar*(Ul-Ul/cn),Sh=ar*Qa*u0-2*wl/(1+Ar)+Vr*Qa*wl+Vr*ar*($c-$c/cn),gf=Wf*Yf-Sh*$f;if(!gf)break;var c0=(oa*Wf-So*Sh)/gf,Dp=(So*Yf-oa*$f)/gf;de-=c0,ve=c(-_,f(_,ve-Dp))}while((i(c0)>g||i(Dp)>g)&&--Me>0);return i(i(ve)-_)<g?[0,ve]:Me&&[de,ve]};function $i(){return t.geoProjection(Lr).scale(62.5271)}var Tn=o(35*S);function hn(ie,se){var de=m(se/2);return[ie*Tn*F(1-de*de),(1+Tn)*de]}hn.invert=function(ie,se){var de=se/(1+Tn);return[ie&&ie/(Tn*F(1-de*de)),2*n(de)]};function ta(){return t.geoProjection(hn).scale(137.152)}function ca(ie,se){var de=se/2,ve=o(de);return[2*ie/A*o(se)*ve*ve,A*m(de)]}ca.invert=function(ie,se){var de=n(se/A),ve=o(de),Me=2*de;return[ie*A/2/(o(Me)*ve*ve),Me]};function dn(){return t.geoProjection(ca).scale(135.264)}function Vn(ie){var se=1-ie,de=Ae(b,0)[0]-Ae(-b,0)[0],ve=Ae(0,_)[1]-Ae(0,-_)[1],Me=F(2*ve/de);function Ae(nt,Ze){var at=o(Ze),yt=v(Ze);return[at/(se+ie*at)*nt,se*Ze+ie*yt]}function Pe(nt,Ze){var at=Ae(nt,Ze);return[at[0]*Me,at[1]/Me]}function Ke(nt){return Pe(0,nt)[1]}return Pe.invert=function(nt,Ze){var at=be(Ke,Ze),yt=nt/Me*(ie+se/o(at));return[yt,at]},Pe}function ra(){var ie=.5,se=t.geoProjectionMutator(Vn),de=se(ie);return de.alpha=function(ve){return arguments.length?se(ie=+ve):ie},de.scale(168.725)}function ds(ie){return[ie[0]/2,k(m(ie[1]/2*S))*E]}function mo(ie){return[ie[0]*2,2*n(v(ie[1]*S))*E]}function Rs(ie){ie==null&&(ie=t.geoOrthographic);var se=ie(),de=t.geoEquirectangular().scale(E).precision(0).clipAngle(null).translate([0,0]);function ve(Ae){return se(ds(Ae))}se.invert&&(ve.invert=function(Ae){return mo(se.invert(Ae))}),ve.stream=function(Ae){var Pe=se.stream(Ae),Ke=de.stream({point:function(nt,Ze){Pe.point(nt/2,k(m(-Ze/2*S))*E)},lineStart:function(){Pe.lineStart()},lineEnd:function(){Pe.lineEnd()},polygonStart:function(){Pe.polygonStart()},polygonEnd:function(){Pe.polygonEnd()}});return Ke.sphere=Pe.sphere,Ke};function Me(Ae){ve[Ae]=function(){return arguments.length?(se[Ae].apply(se,arguments),ve):se[Ae]()}}return ve.rotate=function(Ae){return arguments.length?(de.rotate(Ae),ve):de.rotate()},ve.center=function(Ae){return arguments.length?(se.center(ds(Ae)),ve):mo(se.center())},Me("angle"),Me("clipAngle"),Me("clipExtent"),Me("fitExtent"),Me("fitHeight"),Me("fitSize"),Me("fitWidth"),Me("scale"),Me("translate"),Me("precision"),ve.scale(249.5)}function ho(ie,se){var de=2*b/se,ve=ie*ie;function Me(Ae,Pe){var Ke=t.geoAzimuthalEquidistantRaw(Ae,Pe),nt=Ke[0],Ze=Ke[1],at=nt*nt+Ze*Ze;if(at>ve){var yt=F(at),Pt=a(Ze,nt),Ut=de*d(Pt/de),ar=Pt-Ut,Ar=ie*o(ar),Vr=(ie*v(ar)-ar*v(Ar))/(_-Ar),_i=ka(ar,Vr),rn=(b-ie)/ao(_i,Ar,b);nt=yt;var cn=50,xn;do nt-=xn=(ie+ao(_i,Ar,nt)*rn-yt)/(_i(nt)*rn);while(i(xn)>g&&--cn>0);Ze=ar*v(nt),nt<_&&(Ze-=Vr*(nt-_));var Dn=v(Ut),Qa=o(Ut);Ke[0]=nt*Qa-Ze*Dn,Ke[1]=nt*Dn+Ze*Qa}return Ke}return Me.invert=function(Ae,Pe){var Ke=Ae*Ae+Pe*Pe;if(Ke>ve){var nt=F(Ke),Ze=a(Pe,Ae),at=de*d(Ze/de),yt=Ze-at;Ae=nt*o(yt),Pe=nt*v(yt);for(var Pt=Ae-_,Ut=v(Ae),ar=Pe/Ut,Ar=Ae<_?1/0:0,Vr=10;;){var _i=ie*v(ar),rn=ie*o(ar),cn=v(rn),xn=_-rn,Dn=(_i-ar*cn)/xn,Qa=ka(ar,Dn);if(i(Ar)<w||!--Vr)break;ar-=Ar=(ar*Ut-Dn*Pt-Pe)/(Ut-Pt*2*(xn*(rn+ar*_i*o(rn)-cn)-_i*(_i-ar*cn))/(xn*xn))}nt=ie+ao(Qa,rn,Ae)*(b-ie)/ao(Qa,rn,b),Ze=at+ar,Ae=nt*o(Ze),Pe=nt*v(Ze)}return t.geoAzimuthalEquidistantRaw.invert(Ae,Pe)},Me}function ka(ie,se){return function(de){var ve=ie*o(de);return de<_&&(ve-=se),F(1+ve*ve)}}function ao(ie,se,de){for(var ve=50,Me=(de-se)/ve,Ae=ie(se)+ie(de),Pe=1,Ke=se;Pe<ve;++Pe)Ae+=2*ie(Ke+=Me);return Ae*.5*Me}function zs(){var ie=6,se=30*S,de=o(se),ve=v(se),Me=t.geoProjectionMutator(ho),Ae=Me(se,ie),Pe=Ae.stream,Ke=.01,nt=-o(Ke*S),Ze=v(Ke*S);return Ae.radius=function(at){return arguments.length?(de=o(se=at*S),ve=v(se),Me(se,ie)):se*E},Ae.lobes=function(at){return arguments.length?Me(se,ie=+at):ie},Ae.stream=function(at){var yt=Ae.rotate(),Pt=Pe(at),Ut=(Ae.rotate([0,0]),Pe(at));return Ae.rotate(yt),Pt.sphere=function(){Ut.polygonStart(),Ut.lineStart();for(var ar=0,Ar=2*b/ie,Vr=0;ar<ie;++ar,Vr-=Ar)Ut.point(a(Ze*o(Vr),nt)*E,k(Ze*v(Vr))*E),Ut.point(a(ve*o(Vr-Ar/2),de)*E,k(ve*v(Vr-Ar/2))*E);Ut.lineEnd(),Ut.polygonEnd()},Pt},Ae.rotate([90,-40]).scale(91.7095).clipAngle(180-.001)}function _a(ie,se,de,ve,Me,Ae,Pe,Ke){arguments.length<8&&(Ke=0);function nt(Ze,at){if(!at)return[ie*Ze/b,0];var yt=at*at,Pt=ie+yt*(se+yt*(de+yt*ve)),Ut=at*(Me-1+yt*(Ae-Ke+yt*Pe)),ar=(Pt*Pt+Ut*Ut)/(2*Ut),Ar=Ze*k(Pt/ar)/b;return[ar*v(Ar),at*(1+yt*Ke)+ar*(1-o(Ar))]}return nt.invert=function(Ze,at){var yt=b*Ze/ie,Pt=at,Ut,ar,Ar=50;do{var Vr=Pt*Pt,_i=ie+Vr*(se+Vr*(de+Vr*ve)),rn=Pt*(Me-1+Vr*(Ae-Ke+Vr*Pe)),cn=_i*_i+rn*rn,xn=2*rn,Dn=cn/xn,Qa=Dn*Dn,So=k(_i/Dn)/b,oa=yt*So,as=_i*_i,wl=(2*se+Vr*(4*de+Vr*6*ve))*Pt,Xu=Me+Vr*(3*Ae+Vr*5*Pe),jf=2*(_i*wl+rn*(Xu-1)),u0=2*(Xu-1),ou=(jf*xn-cn*u0)/(xn*xn),Ul=o(oa),$c=v(oa),$f=Dn*Ul,Wf=Dn*$c,Yf=yt/b*(1/F(1-as/Qa))*(wl*Dn-_i*ou)/Qa,Sh=Wf-Ze,gf=Pt*(1+Vr*Ke)+Dn-$f-at,c0=ou*$c+$f*Yf,Dp=$f*So,z=1+ou-(ou*Ul-Wf*Yf),N=Wf*So,Z=c0*N-z*Dp;if(!Z)break;yt-=Ut=(gf*c0-Sh*z)/Z,Pt-=ar=(Sh*N-gf*Dp)/Z}while((i(Ut)>g||i(ar)>g)&&--Ar>0);return[yt,Pt]},nt}var Xs=_a(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function _l(){return t.geoProjection(Xs).scale(149.995)}var yu=_a(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function ul(){return t.geoProjection(yu).scale(153.93)}var Le=_a(5/6*b,-.62636,-.0344,0,1.3493,-.05524,0,.045);function ot(){return t.geoProjection(Le).scale(130.945)}function lt(ie,se){var de=ie*ie,ve=se*se;return[ie*(1-.162388*ve)*(.87-952426e-9*de*de),se*(1+ve/12)]}lt.invert=function(ie,se){var de=ie,ve=se,Me=50,Ae;do{var Pe=ve*ve;ve-=Ae=(ve*(1+Pe/12)-se)/(1+Pe/4)}while(i(Ae)>g&&--Me>0);Me=50,ie/=1-.162388*Pe;do{var Ke=(Ke=de*de)*Ke;de-=Ae=(de*(.87-952426e-9*Ke)-ie)/(.87-.00476213*Ke)}while(i(Ae)>g&&--Me>0);return[de,ve]};function kt(){return t.geoProjection(lt).scale(131.747)}var Jt=_a(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Rt(){return t.geoProjection(Jt).scale(131.087)}function Tr(ie){var se=ie(_,0)[0]-ie(-_,0)[0];function de(ve,Me){var Ae=ve>0?-.5:.5,Pe=ie(ve+Ae*b,Me);return Pe[0]-=Ae*se,Pe}return ie.invert&&(de.invert=function(ve,Me){var Ae=ve>0?-.5:.5,Pe=ie.invert(ve+Ae*se,Me),Ke=Pe[0]-Ae*b;return Ke<-b?Ke+=2*b:Ke>b&&(Ke-=2*b),Pe[0]=Ke,Pe}),de}function Wt(ie,se){var de=p(ie),ve=p(se),Me=o(se),Ae=o(ie)*Me,Pe=v(ie)*Me,Ke=v(ve*se);ie=i(a(Pe,Ke)),se=k(Ae),i(ie-_)>g&&(ie%=_);var nt=br(ie>b/4?_-ie:ie,se);return ie>b/4&&(Ke=nt[0],nt[0]=-nt[1],nt[1]=-Ke),nt[0]*=de,nt[1]*=-ve,nt}Wt.invert=function(ie,se){i(ie)>1&&(ie=p(ie)*2-ie),i(se)>1&&(se=p(se)*2-se);var de=p(ie),ve=p(se),Me=-de*ie,Ae=-ve*se,Pe=Ae/Me<1,Ke=Xr(Pe?Ae:Me,Pe?Me:Ae),nt=Ke[0],Ze=Ke[1],at=o(Ze);return Pe&&(nt=-_-nt),[de*(a(v(nt)*at,-v(Ze))+b),ve*k(o(nt)*at)]};function br(ie,se){if(se===_)return[0,0];var de=v(se),ve=de*de,Me=ve*ve,Ae=1+Me,Pe=1+3*Me,Ke=1-Me,nt=k(1/F(Ae)),Ze=Ke+ve*Ae*nt,at=(1-de)/Ze,yt=F(at),Pt=at*Ae,Ut=F(Pt),ar=yt*Ke,Ar,Vr;if(ie===0)return[0,-(ar+ve*Ut)];var _i=o(se),rn=1/_i,cn=2*de*_i,xn=(-3*ve+nt*Pe)*cn,Dn=(-Ze*_i-(1-de)*xn)/(Ze*Ze),Qa=.5*Dn/yt,So=Ke*Qa-2*ve*yt*cn,oa=ve*Ae*Dn+at*Pe*cn,as=-rn*cn,wl=-rn*oa,Xu=-2*rn*So,jf=4*ie/b,u0;if(ie>.222*b||se<b/4&&ie>.175*b){if(Ar=(ar+ve*F(Pt*(1+Me)-ar*ar))/(1+Me),ie>b/4)return[Ar,Ar];var ou=Ar,Ul=.5*Ar;Ar=.5*(Ul+ou),Vr=50;do{var $c=F(Pt-Ar*Ar),$f=Ar*(Xu+as*$c)+wl*k(Ar/Ut)-jf;if(!$f)break;$f<0?Ul=Ar:ou=Ar,Ar=.5*(Ul+ou)}while(i(ou-Ul)>g&&--Vr>0)}else{Ar=g,Vr=25;do{var Wf=Ar*Ar,Yf=F(Pt-Wf),Sh=Xu+as*Yf,gf=Ar*Sh+wl*k(Ar/Ut)-jf,c0=Sh+(wl-as*Wf)/Yf;Ar-=u0=Yf?gf/c0:0}while(i(u0)>g&&--Vr>0)}return[Ar,-ar-ve*F(Pt-Ar*Ar)]}function Xr(ie,se){for(var de=0,ve=1,Me=.5,Ae=50;;){var Pe=Me*Me,Ke=F(Me),nt=k(1/F(1+Pe)),Ze=1-Pe+Me*(1+Pe)*nt,at=(1-Ke)/Ze,yt=F(at),Pt=at*(1+Pe),Ut=yt*(1-Pe),ar=Pt-ie*ie,Ar=F(ar),Vr=se+Ut+Me*Ar;if(i(ve-de)<w||--Ae===0||Vr===0)break;Vr>0?de=Me:ve=Me,Me=.5*(de+ve)}if(!Ae)return null;var _i=k(Ke),rn=o(_i),cn=1/rn,xn=2*Ke*rn,Dn=(-3*Me+nt*(1+3*Pe))*xn,Qa=(-Ze*rn-(1-Ke)*Dn)/(Ze*Ze),So=.5*Qa/yt,oa=(1-Pe)*So-2*Me*yt*xn,as=-2*cn*oa,wl=-cn*xn,Xu=-cn*(Me*(1+Pe)*Qa+at*(1+3*Pe)*xn);return[b/4*(ie*(as+wl*Ar)+Xu*k(ie/F(Pt))),_i]}function ti(){return t.geoProjection(Tr(Wt)).scale(239.75)}function Mi(ie,se,de){var ve,Me,Ae;return ie?(ve=an(ie,de),se?(Me=an(se,1-de),Ae=Me[1]*Me[1]+de*ve[0]*ve[0]*Me[0]*Me[0],[[ve[0]*Me[2]/Ae,ve[1]*ve[2]*Me[0]*Me[1]/Ae],[ve[1]*Me[1]/Ae,-ve[0]*ve[2]*Me[0]*Me[2]/Ae],[ve[2]*Me[1]*Me[2]/Ae,-de*ve[0]*ve[1]*Me[0]/Ae]]):[[ve[0],0],[ve[1],0],[ve[2],0]]):(Me=an(se,1-de),[[0,Me[0]/Me[1]],[1/Me[1],0],[Me[2]/Me[1],0]])}function an(ie,se){var de,ve,Me,Ae,Pe;if(se<g)return Ae=v(ie),ve=o(ie),de=se*(ie-Ae*ve)/4,[Ae-de*ve,ve+de*Ae,1-se*Ae*Ae/2,ie-de];if(se>=1-g)return de=(1-se)/4,ve=L(ie),Ae=P(ie),Me=1/ve,Pe=ve*R(ie),[Ae+de*(Pe-ie)/(ve*ve),Me-de*Ae*Me*(Pe-ie),Me+de*Ae*Me*(Pe+ie),2*n(s(ie))-_+de*(Pe-ie)/ve];var Ke=[1,0,0,0,0,0,0,0,0],nt=[F(se),0,0,0,0,0,0,0,0],Ze=0;for(ve=F(1-se),Pe=1;i(nt[Ze]/Ke[Ze])>g&&Ze<8;)de=Ke[Ze++],nt[Ze]=(de-ve)/2,Ke[Ze]=(de+ve)/2,ve=F(de*ve),Pe*=2;Me=Pe*Ke[Ze]*ie;do Ae=nt[Ze]*v(ve=Me)/Ke[Ze],Me=(k(Ae)+Me)/2;while(--Ze);return[v(Me),Ae=o(Me),Ae/o(Me-ve),Me]}function Gn(ie,se,de){var ve=i(ie),Me=i(se),Ae=R(Me);if(ve){var Pe=1/v(ve),Ke=1/(m(ve)*m(ve)),nt=-(Ke+de*(Ae*Ae*Pe*Pe)-1+de),Ze=(de-1)*Ke,at=(-nt+F(nt*nt-4*Ze))/2;return[yn(n(1/F(at)),de)*p(ie),yn(n(F((at/Ke-1)/de)),1-de)*p(se)]}return[0,yn(n(Ae),1-de)*p(se)]}function yn(ie,se){if(!se)return ie;if(se===1)return u(m(ie/2+M));for(var de=1,ve=F(1-se),Me=F(se),Ae=0;i(Me)>g;Ae++){if(ie%b){var Pe=n(ve*m(ie)/de);Pe<0&&(Pe+=b),ie+=Pe+~~(ie/b)*b}else ie+=ie;Me=(de+ve)/2,ve=F(de*ve),Me=((de=Me)-ve)/2}return ie/(h(2,Ae)*de)}function fa(ie,se){var de=(T-1)/(T+1),ve=F(1-de*de),Me=yn(_,ve*ve),Ae=-1,Pe=u(m(b/4+i(se)/2)),Ke=s(Ae*Pe)/F(de),nt=Wn(Ke*o(Ae*ie),Ke*v(Ae*ie)),Ze=Gn(nt[0],nt[1],ve*ve);return[-Ze[1],(se>=0?1:-1)*(.5*Me-Ze[0])]}function Wn(ie,se){var de=ie*ie,ve=se+1,Me=1-de-se*se;return[.5*((ie>=0?_:-_)-a(Me,2*ie)),-.25*u(Me*Me+4*de)+.5*u(ve*ve+de)]}function Ja(ie,se){var de=se[0]*se[0]+se[1]*se[1];return[(ie[0]*se[0]+ie[1]*se[1])/de,(ie[1]*se[0]-ie[0]*se[1])/de]}fa.invert=function(ie,se){var de=(T-1)/(T+1),ve=F(1-de*de),Me=yn(_,ve*ve),Ae=-1,Pe=Mi(.5*Me-se,-ie,ve*ve),Ke=Ja(Pe[0],Pe[1]),nt=a(Ke[1],Ke[0])/Ae;return[nt,2*n(s(.5/Ae*u(de*Ke[0]*Ke[0]+de*Ke[1]*Ke[1])))-_]};function oo(){return t.geoProjection(Tr(fa)).scale(151.496)}function Ao(ie){var se=v(ie),de=o(ie),ve=Io(ie);ve.invert=Io(-ie);function Me(Ae,Pe){var Ke=ve(Ae,Pe);Ae=Ke[0],Pe=Ke[1];var nt=v(Pe),Ze=o(Pe),at=o(Ae),yt=D(se*nt+de*Ze*at),Pt=v(yt),Ut=i(Pt)>g?yt/Pt:1;return[Ut*de*v(Ae),(i(Ae)>_?Ut:-Ut)*(se*Ze-de*nt*at)]}return Me.invert=function(Ae,Pe){var Ke=F(Ae*Ae+Pe*Pe),nt=-v(Ke),Ze=o(Ke),at=Ke*Ze,yt=-Pe*nt,Pt=Ke*se,Ut=F(at*at+yt*yt-Pt*Pt),ar=a(at*Pt+yt*Ut,yt*Pt-at*Ut),Ar=(Ke>_?-1:1)*a(Ae*nt,Ke*o(ar)*Ze+Pe*v(ar)*nt);return ve.invert(Ar,ar)},Me}function Io(ie){var se=v(ie),de=o(ie);return function(ve,Me){var Ae=o(Me),Pe=o(ve)*Ae,Ke=v(ve)*Ae,nt=v(Me);return[a(Ke,Pe*de-nt*se),k(nt*de+Pe*se)]}}function ps(){var ie=0,se=t.geoProjectionMutator(Ao),de=se(ie),ve=de.rotate,Me=de.stream,Ae=t.geoCircle();return de.parallel=function(Pe){if(!arguments.length)return ie*E;var Ke=de.rotate();return se(ie=Pe*S).rotate(Ke)},de.rotate=function(Pe){return arguments.length?(ve.call(de,[Pe[0],Pe[1]-ie*E]),Ae.center([-Pe[0],-Pe[1]]),de):(Pe=ve.call(de),Pe[1]+=ie*E,Pe)},de.stream=function(Pe){return Pe=Me(Pe),Pe.sphere=function(){Pe.polygonStart();var Ke=.01,nt=Ae.radius(90-Ke)().coordinates[0],Ze=nt.length-1,at=-1,yt;for(Pe.lineStart();++at<Ze;)Pe.point((yt=nt[at])[0],yt[1]);for(Pe.lineEnd(),nt=Ae.radius(90+Ke)().coordinates[0],Ze=nt.length-1,Pe.lineStart();--at>=0;)Pe.point((yt=nt[at])[0],yt[1]);Pe.lineEnd(),Pe.polygonEnd()},Pe},de.scale(79.4187).parallel(45).clipAngle(180-.001)}var rs=3,Mo=k(1-1/rs)*E,is=Vt(0);function Ro(ie){var se=Mo*S,de=Ge(b,se)[0]-Ge(-b,se)[0],ve=is(0,se)[1],Me=Ge(0,se)[1],Ae=A-Me,Pe=y/ie,Ke=4/y,nt=ve+Ae*Ae*4/y;function Ze(at,yt){var Pt,Ut=i(yt);if(Ut>se){var ar=f(ie-1,c(0,l((at+b)/Pe)));at+=b*(ie-1)/ie-ar*Pe,Pt=Ge(at,Ut),Pt[0]=Pt[0]*y/de-y*(ie-1)/(2*ie)+ar*y/ie,Pt[1]=ve+(Pt[1]-Me)*4*Ae/y,yt<0&&(Pt[1]=-Pt[1])}else Pt=is(at,yt);return Pt[0]*=Ke,Pt[1]/=nt,Pt}return Ze.invert=function(at,yt){at/=Ke,yt*=nt;var Pt=i(yt);if(Pt>ve){var Ut=f(ie-1,c(0,l((at+b)/Pe)));at=(at+b*(ie-1)/ie-Ut*Pe)*de/y;var ar=Ge.invert(at,.25*(Pt-ve)*y/Ae+Me);return ar[0]-=b*(ie-1)/ie-Ut*Pe,yt<0&&(ar[1]=-ar[1]),ar}return is.invert(at,yt)},Ze}function Uo(ie,se){return[ie,se&1?90-g:Mo]}function so(ie,se){return[ie,se&1?-90+g:-Mo]}function In(ie){return[ie[0]*(1-g),ie[1]]}function va(ie){var se=[].concat(r.range(-180,180+ie/2,ie).map(Uo),r.range(180,-180-ie/2,-ie).map(so));return{type:"Polygon",coordinates:[ie===180?se.map(In):se]}}function vs(){var ie=4,se=t.geoProjectionMutator(Ro),de=se(ie),ve=de.stream;return de.lobes=function(Me){return arguments.length?se(ie=+Me):ie},de.stream=function(Me){var Ae=de.rotate(),Pe=ve(Me),Ke=(de.rotate([0,0]),ve(Me));return de.rotate(Ae),Pe.sphere=function(){t.geoStream(va(180/ie),Ke)},Pe},de.scale(239.75)}function Zs(ie){var se=1+ie,de=v(1/se),ve=k(de),Me=2*F(b/(Ae=b+4*ve*se)),Ae,Pe=.5*Me*(se+F(ie*(2+ie))),Ke=ie*ie,nt=se*se;function Ze(at,yt){var Pt=1-v(yt),Ut,ar;if(Pt&&Pt<2){var Ar=_-yt,Vr=25,_i;do{var rn=v(Ar),cn=o(Ar),xn=ve+a(rn,se-cn),Dn=1+nt-2*se*cn;Ar-=_i=(Ar-Ke*ve-se*rn+Dn*xn-.5*Pt*Ae)/(2*se*rn*xn)}while(i(_i)>w&&--Vr>0);Ut=Me*F(Dn),ar=at*xn/b}else Ut=Me*(ie+Pt),ar=at*ve/b;return[Ut*v(ar),Pe-Ut*o(ar)]}return Ze.invert=function(at,yt){var Pt=at*at+(yt-=Pe)*yt,Ut=(1+nt-Pt/(Me*Me))/(2*se),ar=D(Ut),Ar=v(ar),Vr=ve+a(Ar,se-Ut);return[k(at/F(Pt))*b/Vr,k(1-2*(ar-Ke*ve-se*Ar+(1+nt-2*se*Ut)*Vr)/Ae)]},Ze}function Ks(){var ie=1,se=t.geoProjectionMutator(Zs),de=se(ie);return de.ratio=function(ve){return arguments.length?se(ie=+ve):ie},de.scale(167.774).center([0,18.67])}var Ol=.7109889596207567,Js=.0528035274542;function ru(ie,se){return se>-Ol?(ie=ee(ie,se),ie[1]+=Js,ie):Se(ie,se)}ru.invert=function(ie,se){return se>-Ol?ee.invert(ie,se-Js):Se.invert(ie,se)};function xu(){return t.geoProjection(ru).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function _u(ie,se){return i(se)>Ol?(ie=ee(ie,se),ie[1]-=se>0?Js:-Js,ie):Se(ie,se)}_u.invert=function(ie,se){return i(se)>Ol?ee.invert(ie,se+(se>0?Js:-Js)):Se.invert(ie,se)};function dc(){return t.geoProjection(_u).scale(152.63)}function Nl(ie,se,de,ve){var Me=F(4*b/(2*de+(1+ie-se/2)*v(2*de)+(ie+se)/2*v(4*de)+se/2*v(6*de))),Ae=F(ve*v(de)*F((1+ie*o(2*de)+se*o(4*de))/(1+ie+se))),Pe=de*nt(1);function Ke(yt){return F(1+ie*o(2*yt)+se*o(4*yt))}function nt(yt){var Pt=yt*de;return(2*Pt+(1+ie-se/2)*v(2*Pt)+(ie+se)/2*v(4*Pt)+se/2*v(6*Pt))/de}function Ze(yt){return Ke(yt)*v(yt)}var at=function(yt,Pt){var Ut=de*be(nt,Pe*v(Pt)/de,Pt/b);isNaN(Ut)&&(Ut=de*p(Pt));var ar=Me*Ke(Ut);return[ar*Ae*yt/b*o(Ut),ar/Ae*v(Ut)]};return at.invert=function(yt,Pt){var Ut=be(Ze,Pt*Ae/Me);return[yt*b/(o(Ut)*Me*Ae*Ke(Ut)),k(de*nt(Ut/de)/Pe)]},de===0&&(Me=F(ve/b),at=function(yt,Pt){return[yt*Me,v(Pt)/Me]},at.invert=function(yt,Pt){return[yt/Me,k(Pt*Me)]}),at}function ja(){var ie=1,se=0,de=45*S,ve=2,Me=t.geoProjectionMutator(Nl),Ae=Me(ie,se,de,ve);return Ae.a=function(Pe){return arguments.length?Me(ie=+Pe,se,de,ve):ie},Ae.b=function(Pe){return arguments.length?Me(ie,se=+Pe,de,ve):se},Ae.psiMax=function(Pe){return arguments.length?Me(ie,se,de=+Pe*S,ve):de*E},Ae.ratio=function(Pe){return arguments.length?Me(ie,se,de,ve=+Pe):ve},Ae.scale(180.739)}function bu(ie,se,de,ve,Me,Ae,Pe,Ke,nt,Ze,at){if(at.nanEncountered)return NaN;var yt,Pt,Ut,ar,Ar,Vr,_i,rn,cn,xn;if(yt=de-se,Pt=ie(se+yt*.25),Ut=ie(de-yt*.25),isNaN(Pt)){at.nanEncountered=!0;return}if(isNaN(Ut)){at.nanEncountered=!0;return}return ar=yt*(ve+4*Pt+Me)/12,Ar=yt*(Me+4*Ut+Ae)/12,Vr=ar+Ar,xn=(Vr-Pe)/15,Ze>nt?(at.maxDepthCount++,Vr+xn):Math.abs(xn)<Ke?Vr+xn:(_i=se+yt*.5,rn=bu(ie,se,_i,ve,Pt,Me,ar,Ke*.5,nt,Ze+1,at),isNaN(rn)?(at.nanEncountered=!0,NaN):(cn=bu(ie,_i,de,Me,Ut,Ae,Ar,Ke*.5,nt,Ze+1,at),isNaN(cn)?(at.nanEncountered=!0,NaN):rn+cn))}function Hu(ie,se,de,ve,Me){var Ae={maxDepthCount:0,nanEncountered:!1};ve===void 0&&(ve=1e-8),Me===void 0&&(Me=20);var Pe=ie(se),Ke=ie(.5*(se+de)),nt=ie(de),Ze=(Pe+4*Ke+nt)*(de-se)/6,at=bu(ie,se,de,Pe,Ke,nt,Ze,ve,Me,1,Ae);return at}function Ss(ie,se,de){function ve(Ut){return ie+(1-ie)*h(1-h(Ut,se),1/se)}function Me(Ut){return Hu(ve,0,Ut,1e-4)}for(var Ae=1/Me(1),Pe=1e3,Ke=(1+1e-8)*Ae,nt=[],Ze=0;Ze<=Pe;Ze++)nt.push(Me(Ze/Pe)*Ke);function at(Ut){var ar=0,Ar=Pe,Vr=Pe>>1;do nt[Vr]>Ut?Ar=Vr:ar=Vr,Vr=ar+Ar>>1;while(Vr>ar);var _i=nt[Vr+1]-nt[Vr];return _i&&(_i=(Ut-nt[Vr+1])/_i),(Vr+1+_i)/Pe}var yt=2*at(1)/b*Ae/de,Pt=function(Ut,ar){var Ar=at(i(v(ar))),Vr=ve(Ar)*Ut;return Ar/=yt,[Vr,ar>=0?Ar:-Ar]};return Pt.invert=function(Ut,ar){var Ar;return ar*=yt,i(ar)<1&&(Ar=p(ar)*k(Me(i(ar))*Ae)),[Ut/ve(i(ar)),Ar]},Pt}function iu(){var ie=0,se=2.5,de=1.183136,ve=t.geoProjectionMutator(Ss),Me=ve(ie,se,de);return Me.alpha=function(Ae){return arguments.length?ve(ie=+Ae,se,de):ie},Me.k=function(Ae){return arguments.length?ve(ie,se=+Ae,de):se},Me.gamma=function(Ae){return arguments.length?ve(ie,se,de=+Ae):de},Me.scale(152.63)}function ph(ie,se){return i(ie[0]-se[0])<g&&i(ie[1]-se[1])<g}function yo(ie,se){for(var de=-1,ve=ie.length,Me=ie[0],Ae,Pe,Ke,nt=[];++de<ve;){Ae=ie[de],Pe=(Ae[0]-Me[0])/se,Ke=(Ae[1]-Me[1])/se;for(var Ze=0;Ze<se;++Ze)nt.push([Me[0]+Ze*Pe,Me[1]+Ze*Ke]);Me=Ae}return nt.push(Ae),nt}function nu(ie){var se=[],de,ve,Me,Ae,Pe,Ke,nt,Ze=ie[0].length;for(nt=0;nt<Ze;++nt)de=ie[0][nt],ve=de[0][0],Me=de[0][1],Ae=de[1][1],Pe=de[2][0],Ke=de[2][1],se.push(yo([[ve+g,Me+g],[ve+g,Ae-g],[Pe-g,Ae-g],[Pe-g,Ke+g]],30));for(nt=ie[1].length-1;nt>=0;--nt)de=ie[1][nt],ve=de[0][0],Me=de[0][1],Ae=de[1][1],Pe=de[2][0],Ke=de[2][1],se.push(yo([[Pe-g,Ke-g],[Pe-g,Ae+g],[ve+g,Ae+g],[ve+g,Me-g]],30));return{type:"Polygon",coordinates:[r.merge(se)]}}function Zo(ie,se,de){var ve,Me;function Ae(nt,Ze){for(var at=Ze<0?-1:1,yt=se[+(Ze<0)],Pt=0,Ut=yt.length-1;Pt<Ut&&nt>yt[Pt][2][0];++Pt);var ar=ie(nt-yt[Pt][1][0],Ze);return ar[0]+=ie(yt[Pt][1][0],at*Ze>at*yt[Pt][0][1]?yt[Pt][0][1]:Ze)[0],ar}de?Ae.invert=de(Ae):ie.invert&&(Ae.invert=function(nt,Ze){for(var at=Me[+(Ze<0)],yt=se[+(Ze<0)],Pt=0,Ut=at.length;Pt<Ut;++Pt){var ar=at[Pt];if(ar[0][0]<=nt&&nt<ar[1][0]&&ar[0][1]<=Ze&&Ze<ar[1][1]){var Ar=ie.invert(nt-ie(yt[Pt][1][0],0)[0],Ze);return Ar[0]+=yt[Pt][1][0],ph(Ae(Ar[0],Ar[1]),[nt,Ze])?Ar:null}}});var Pe=t.geoProjection(Ae),Ke=Pe.stream;return Pe.stream=function(nt){var Ze=Pe.rotate(),at=Ke(nt),yt=(Pe.rotate([0,0]),Ke(nt));return Pe.rotate(Ze),at.sphere=function(){t.geoStream(ve,yt)},at},Pe.lobes=function(nt){return arguments.length?(ve=nu(nt),se=nt.map(function(Ze){return Ze.map(function(at){return[[at[0][0]*S,at[0][1]*S],[at[1][0]*S,at[1][1]*S],[at[2][0]*S,at[2][1]*S]]})}),Me=se.map(function(Ze){return Ze.map(function(at){var yt=ie(at[0][0],at[0][1])[0],Pt=ie(at[2][0],at[2][1])[0],Ut=ie(at[1][0],at[0][1])[1],ar=ie(at[1][0],at[1][1])[1],Ar;return Ut>ar&&(Ar=Ut,Ut=ar,ar=Ar),[[yt,Ut],[Pt,ar]]})}),Pe):se.map(function(Ze){return Ze.map(function(at){return[[at[0][0]*E,at[0][1]*E],[at[1][0]*E,at[1][1]*E],[at[2][0]*E,at[2][1]*E]]})})},se!=null&&Pe.lobes(se),Pe}var au=[[[[-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 Cv(){return Zo(pe,au).scale(160.857)}var Nc=[[[[-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 r0(){return Zo(_u,Nc).scale(152.63)}var Of=[[[[-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 vh(){return Zo(ee,Of).scale(169.529)}var Nf=[[[[-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 i0(){return Zo(ee,Nf).scale(169.529).rotate([20,0])}var Dv=[[[[-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 gh(){return Zo(ru,Dv,he).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var up=[[[[-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 n0(){return Zo(Se,up).scale(152.63).rotate([-20,0])}function j0(ie,se){return[3/y*ie*F(b*b/3-se*se),se]}j0.invert=function(ie,se){return[y/3*ie/F(b*b/3-se*se),se]};function $0(){return t.geoProjection(j0).scale(158.837)}function Fv(ie){function se(de,ve){if(i(i(ve)-_)<g)return[0,ve<0?-2:2];var Me=v(ve),Ae=h((1+Me)/(1-Me),ie/2),Pe=.5*(Ae+1/Ae)+o(de*=ie);return[2*v(de)/Pe,(Ae-1/Ae)/Pe]}return se.invert=function(de,ve){var Me=i(ve);if(i(Me-2)<g)return de?null:[0,p(ve)*_];if(Me>2)return null;de/=2,ve/=2;var Ae=de*de,Pe=ve*ve,Ke=2*ve/(1+Ae+Pe);return Ke=h((1+Ke)/(1-Ke),1/ie),[a(2*de,1-Ae-Pe)/ie,k((Ke-1)/(Ke+1))]},se}function Lv(){var ie=.5,se=t.geoProjectionMutator(Fv),de=se(ie);return de.spacing=function(ve){return arguments.length?se(ie=+ve):ie},de.scale(124.75)}var Uc=b/T;function cp(ie,se){return[ie*(1+F(o(se)))/2,se/(o(se/2)*o(ie/6))]}cp.invert=function(ie,se){var de=i(ie),ve=i(se),Me=g,Ae=_;ve<Uc?Ae*=ve/Uc:Me+=6*D(Uc/ve);for(var Pe=0;Pe<25;Pe++){var Ke=v(Ae),nt=F(o(Ae)),Ze=v(Ae/2),at=o(Ae/2),yt=v(Me/6),Pt=o(Me/6),Ut=.5*Me*(1+nt)-de,ar=Ae/(at*Pt)-ve,Ar=nt?-.25*Me*Ke/nt:0,Vr=.5*(1+nt),_i=(1+.5*Ae*Ze/at)/(at*Pt),rn=Ae/at*(yt/6)/(Pt*Pt),cn=Ar*rn-_i*Vr,xn=(Ut*rn-ar*Vr)/cn,Dn=(ar*Ar-Ut*_i)/cn;if(Ae-=xn,Me-=Dn,i(xn)<g&&i(Dn)<g)break}return[ie<0?-Me:Me,se<0?-Ae:Ae]};function mh(){return t.geoProjection(cp).scale(97.2672)}function ju(ie,se){var de=ie*ie,ve=se*se;return[ie*(.975534+ve*(-.119161+de*-.0143059+ve*-.0547009)),se*(1.00384+de*(.0802894+ve*-.02855+de*199025e-9)+ve*(.0998909+ve*-.0491032))]}ju.invert=function(ie,se){var de=p(ie)*b,ve=se/2,Me=50;do{var Ae=de*de,Pe=ve*ve,Ke=de*ve,nt=de*(.975534+Pe*(-.119161+Ae*-.0143059+Pe*-.0547009))-ie,Ze=ve*(1.00384+Ae*(.0802894+Pe*-.02855+Ae*199025e-9)+Pe*(.0998909+Pe*-.0491032))-se,at=.975534-Pe*(.119161+3*Ae*.0143059+Pe*.0547009),yt=-Ke*(2*.119161+4*.0547009*Pe+2*.0143059*Ae),Pt=Ke*(2*.0802894+4*199025e-9*Ae+2*-.02855*Pe),Ut=1.00384+Ae*(.0802894+199025e-9*Ae)+Pe*(3*(.0998909-.02855*Ae)-5*.0491032*Pe),ar=yt*Pt-Ut*at,Ar=(Ze*yt-nt*Ut)/ar,Vr=(nt*Pt-Ze*at)/ar;de-=Ar,ve-=Vr}while((i(Ar)>g||i(Vr)>g)&&--Me>0);return Me&&[de,ve]};function Es(){return t.geoProjection(ju).scale(139.98)}function Vo(ie,se){return[v(ie)/o(se),m(se)*o(ie)]}Vo.invert=function(ie,se){var de=ie*ie,ve=se*se,Me=ve+1,Ae=de+Me,Pe=ie?x*F((Ae-F(Ae*Ae-4*de))/de):1/F(Me);return[k(ie*Pe),p(se)*D(Pe)]};function wu(){return t.geoProjection(Vo).scale(144.049).clipAngle(90-.001)}function W0(ie){var se=o(ie),de=m(M+ie/2);function ve(Me,Ae){var Pe=Ae-ie,Ke=i(Pe)<g?Me*se:i(Ke=M+Ae/2)<g||i(i(Ke)-_)<g?0:Me*Pe/u(m(Ke)/de);return[Ke,Pe]}return ve.invert=function(Me,Ae){var Pe,Ke=Ae+ie;return[i(Ae)<g?Me/se:i(Pe=M+Ke/2)<g||i(i(Pe)-_)<g?0:Me*u(m(Pe)/de)/Ae,Ke]},ve}function yh(){return Fe(W0).parallel(40).scale(158.837)}function a0(ie,se){return[ie,1.25*u(m(M+.4*se))]}a0.invert=function(ie,se){return[ie,2.5*n(s(.8*se))-.625*b]};function Pv(){return t.geoProjection(a0).scale(108.318)}function ug(ie){var se=ie.length-1;function de(ve,Me){for(var Ae=o(Me),Pe=2/(1+Ae*o(ve)),Ke=Pe*Ae*v(ve),nt=Pe*v(Me),Ze=se,at=ie[Ze],yt=at[0],Pt=at[1],Ut;--Ze>=0;)at=ie[Ze],yt=at[0]+Ke*(Ut=yt)-nt*Pt,Pt=at[1]+Ke*Pt+nt*Ut;return yt=Ke*(Ut=yt)-nt*Pt,Pt=Ke*Pt+nt*Ut,[yt,Pt]}return de.invert=function(ve,Me){var Ae=20,Pe=ve,Ke=Me;do{for(var nt=se,Ze=ie[nt],at=Ze[0],yt=Ze[1],Pt=0,Ut=0,ar;--nt>=0;)Ze=ie[nt],Pt=at+Pe*(ar=Pt)-Ke*Ut,Ut=yt+Pe*Ut+Ke*ar,at=Ze[0]+Pe*(ar=at)-Ke*yt,yt=Ze[1]+Pe*yt+Ke*ar;Pt=at+Pe*(ar=Pt)-Ke*Ut,Ut=yt+Pe*Ut+Ke*ar,at=Pe*(ar=at)-Ke*yt-ve,yt=Pe*yt+Ke*ar-Me;var Ar=Pt*Pt+Ut*Ut,Vr,_i;Pe-=Vr=(at*Pt+yt*Ut)/Ar,Ke-=_i=(yt*Pt-at*Ut)/Ar}while(i(Vr)+i(_i)>g*g&&--Ae>0);if(Ae){var rn=F(Pe*Pe+Ke*Ke),cn=2*n(rn*.5),xn=v(cn);return[a(Pe*xn,rn*o(cn)),rn?k(Ke*xn/rn):0]}},de}var Wm=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Tx=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],xh=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Bs=[[.9245,0],[0,0],[.01943,0]],Iv=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Rv(){return hf(Wm,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function _h(){return hf(Tx,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function cg(){return hf(xh,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Y0(){return hf(Bs,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function fp(){return hf(Iv,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function hf(ie,se){var de=t.geoProjection(ug(ie)).rotate(se).clipAngle(90),ve=t.geoRotation(se),Me=de.center;return delete de.rotate,de.center=function(Ae){return arguments.length?Me(ve(Ae)):ve.invert(Me())},de}var zv=F(6),hp=F(7);function X0(ie,se){var de=k(7*v(se)/(3*zv));return[zv*ie*(2*o(2*de/3)-1)/hp,9*v(de/3)/hp]}X0.invert=function(ie,se){var de=3*k(se*hp/9);return[ie*hp/(zv*(2*o(2*de/3)-1)),k(v(de)*3*zv/7)]};function fg(){return t.geoProjection(X0).scale(164.859)}function hg(ie,se){for(var de=(1+x)*v(se),ve=se,Me=0,Ae;Me<25&&(ve-=Ae=(v(ve/2)+v(ve)-de)/(.5*o(ve/2)+o(ve)),!(i(Ae)<g));Me++);return[ie*(1+2*o(ve)/o(ve/2))/(3*T),2*F(3)*v(ve/2)/F(2+T)]}hg.invert=function(ie,se){var de=se*F(2+T)/(2*F(3)),ve=2*k(de);return[3*T*ie/(1+2*o(ve)/o(ve/2)),k((de+v(ve))/(1+x))]};function Ym(){return t.geoProjection(hg).scale(188.209)}function Uf(ie,se){for(var de=F(6/(4+b)),ve=(1+b/4)*v(se),Me=se/2,Ae=0,Pe;Ae<25&&(Me-=Pe=(Me/2+v(Me)-ve)/(.5+o(Me)),!(i(Pe)<g));Ae++);return[de*(.5+o(Me))*ie/1.5,de*Me]}Uf.invert=function(ie,se){var de=F(6/(4+b)),ve=se/de;return i(i(ve)-_)<g&&(ve=ve<0?-_:_),[1.5*ie/(de*(.5+o(ve))),k((ve/2+v(ve))/(1+b/4))]};function Bv(){return t.geoProjection(Uf).scale(166.518)}function Vf(ie,se){var de=se*se,ve=de*de,Me=de*ve;return[ie*(.84719-.13063*de+Me*Me*(-.04515+.05494*de-.02326*ve+.00331*Me)),se*(1.01183+ve*ve*(-.02625+.01926*de-.00396*ve))]}Vf.invert=function(ie,se){var de=se,ve=25,Me,Ae,Pe,Ke;do Ae=de*de,Pe=Ae*Ae,de-=Me=(de*(1.01183+Pe*Pe*(-.02625+.01926*Ae-.00396*Pe))-se)/(1.01183+Pe*Pe*(9*-.02625+11*.01926*Ae+13*-.00396*Pe));while(i(Me)>w&&--ve>0);return Ae=de*de,Pe=Ae*Ae,Ke=Ae*Pe,[ie/(.84719-.13063*Ae+Ke*Ke*(-.04515+.05494*Ae-.02326*Pe+.00331*Ke)),de]};function dp(){return t.geoProjection(Vf).scale(175.295)}function pc(ie,se){return[ie*(1+o(se))/2,2*(se-m(se/2))]}pc.invert=function(ie,se){for(var de=se/2,ve=0,Me=1/0;ve<10&&i(Me)>g;++ve){var Ae=o(se/2);se-=Me=(se-m(se/2)-de)/(1-.5/(Ae*Ae))}return[2*ie/(1+o(se)),se]};function Z0(){return t.geoProjection(pc).scale(152.63)}var Gf=[[[[-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 dg(){return Zo(ce(1/0),Gf).rotate([20,0]).scale(152.63)}function qv(ie,se){var de=v(se),ve=o(se),Me=p(ie);if(ie===0||i(se)===_)return[0,se];if(se===0)return[ie,0];if(i(ie)===_)return[ie*ve,_*de];var Ae=b/(2*ie)-2*ie/b,Pe=2*se/b,Ke=(1-Pe*Pe)/(de-Pe),nt=Ae*Ae,Ze=Ke*Ke,at=1+nt/Ze,yt=1+Ze/nt,Pt=(Ae*de/Ke-Ae/2)/at,Ut=(Ze*de/nt+Ke/2)/yt,ar=Pt*Pt+ve*ve/at,Ar=Ut*Ut-(Ze*de*de/nt+Ke*de-1)/yt;return[_*(Pt+F(ar)*Me),_*(Ut+F(Ar<0?0:Ar)*p(-se*Ae)*Me)]}qv.invert=function(ie,se){ie/=_,se/=_;var de=ie*ie,ve=se*se,Me=de+ve,Ae=b*b;return[ie?(Me-1+F((1-Me)*(1-Me)+4*de))/(2*ie)*_:0,be(function(Pe){return Me*(b*v(Pe)-2*Pe)*b+4*Pe*Pe*(se-v(Pe))+2*b*Pe-Ae*se},0)]};function pg(){return t.geoProjection(qv).scale(127.267)}var Ov=1.0148,pp=.23185,Nv=-.14499,Uv=.02406,Xm=Ov,$u=5*pp,Vc=7*Nv,vg=9*Uv,Tu=1.790857183;function vp(ie,se){var de=se*se;return[ie,se*(Ov+de*de*(pp+de*(Nv+Uv*de)))]}vp.invert=function(ie,se){se>Tu?se=Tu:se<-Tu&&(se=-Tu);var de=se,ve;do{var Me=de*de;de-=ve=(de*(Ov+Me*Me*(pp+Me*(Nv+Uv*Me)))-se)/(Xm+Me*Me*($u+Me*(Vc+vg*Me)))}while(i(ve)>g);return[ie,de]};function o0(){return t.geoProjection(vp).scale(139.319)}function bh(ie,se){if(i(se)<g)return[ie,0];var de=m(se),ve=ie*v(se);return[v(ve)/de,se+(1-o(ve))/de]}bh.invert=function(ie,se){if(i(se)<g)return[ie,0];var de=ie*ie+se*se,ve=se*.5,Me=10,Ae;do{var Pe=m(ve),Ke=1/o(ve),nt=de-2*se*ve+ve*ve;ve-=Ae=(Pe*nt+2*(ve-se))/(2+nt*Ke*Ke+2*(ve-se)*Pe)}while(i(Ae)>g&&--Me>0);return Pe=m(ve),[(i(se)<i(ve+1/Pe)?k(ie*Pe):p(se)*p(ie)*(D(i(ie*Pe))+_))/v(ve),ve]};function gg(){return t.geoProjection(bh).scale(103.74)}function Zm(ie,se){var de=pf(ie[1],ie[0]),ve=pf(se[1],se[0]),Me=Ax(de,ve),Ae=Wu(de)/Wu(ve);return df([1,0,ie[0][0],0,1,ie[0][1]],df([Ae,0,0,0,Ae,0],df([o(Me),v(Me),0,-v(Me),o(Me),0],[1,0,-se[0][0],0,1,-se[0][1]])))}function Km(ie){var se=1/(ie[0]*ie[4]-ie[1]*ie[3]);return[se*ie[4],-se*ie[1],se*(ie[1]*ie[5]-ie[2]*ie[4]),-se*ie[3],se*ie[0],se*(ie[2]*ie[3]-ie[0]*ie[5])]}function df(ie,se){return[ie[0]*se[0]+ie[1]*se[3],ie[0]*se[1]+ie[1]*se[4],ie[0]*se[2]+ie[1]*se[5]+ie[2],ie[3]*se[0]+ie[4]*se[3],ie[3]*se[1]+ie[4]*se[4],ie[3]*se[2]+ie[4]*se[5]+ie[5]]}function pf(ie,se){return[ie[0]-se[0],ie[1]-se[1]]}function Wu(ie){return F(ie[0]*ie[0]+ie[1]*ie[1])}function Ax(ie,se){return a(ie[0]*se[1]-ie[1]*se[0],ie[0]*se[0]+ie[1]*se[1])}function K0(ie,se,de){ve(ie,{transform:null});function ve(Ze,at){if(Ze.edges=gp(Ze.face),at.face){var yt=Ze.shared=Vv(Ze.face,at.face),Pt=Zm(yt.map(at.project),yt.map(Ze.project));Ze.transform=at.transform?df(at.transform,Pt):Pt;for(var Ut=at.edges,ar=0,Ar=Ut.length;ar<Ar;++ar)vc(yt[0],Ut[ar][1])&&vc(yt[1],Ut[ar][0])&&(Ut[ar]=Ze),vc(yt[0],Ut[ar][0])&&vc(yt[1],Ut[ar][1])&&(Ut[ar]=Ze);for(Ut=Ze.edges,ar=0,Ar=Ut.length;ar<Ar;++ar)vc(yt[0],Ut[ar][0])&&vc(yt[1],Ut[ar][1])&&(Ut[ar]=at),vc(yt[0],Ut[ar][1])&&vc(yt[1],Ut[ar][0])&&(Ut[ar]=at)}else Ze.transform=at.transform;return Ze.children&&Ze.children.forEach(function(Vr){ve(Vr,Ze)}),Ze}function Me(Ze,at){var yt=se(Ze,at),Pt=yt.project([Ze*E,at*E]),Ut;return(Ut=yt.transform)?[Ut[0]*Pt[0]+Ut[1]*Pt[1]+Ut[2],-(Ut[3]*Pt[0]+Ut[4]*Pt[1]+Ut[5])]:(Pt[1]=-Pt[1],Pt)}mp(ie)&&(Me.invert=function(Ze,at){var yt=Ae(ie,[Ze,-at]);return yt&&(yt[0]*=S,yt[1]*=S,yt)});function Ae(Ze,at){var yt=Ze.project.invert,Pt=Ze.transform,Ut=at;if(Pt&&(Pt=Km(Pt),Ut=[Pt[0]*Ut[0]+Pt[1]*Ut[1]+Pt[2],Pt[3]*Ut[0]+Pt[4]*Ut[1]+Pt[5]]),yt&&Ze===Pe(ar=yt(Ut)))return ar;for(var ar,Ar=Ze.children,Vr=0,_i=Ar&&Ar.length;Vr<_i;++Vr)if(ar=Ae(Ar[Vr],at))return ar}function Pe(Ze){return se(Ze[0]*S,Ze[1]*S)}var Ke=t.geoProjection(Me),nt=Ke.stream;return Ke.stream=function(Ze){var at=Ke.rotate(),yt=nt(Ze),Pt=(Ke.rotate([0,0]),nt(Ze));return Ke.rotate(at),yt.sphere=function(){Pt.polygonStart(),Pt.lineStart(),Jm(Pt,ie),Pt.lineEnd(),Pt.polygonEnd()},yt},Ke.angle(de==null?-30:de*E)}function Jm(ie,se,de){var ve,Me=se.edges,Ae=Me.length,Pe,Ke={type:"MultiPoint",coordinates:se.face},nt=se.face.filter(function(Ar){return i(Ar[1])!==90}),Ze=t.geoBounds({type:"MultiPoint",coordinates:nt}),at=!1,yt=-1,Pt=Ze[1][0]-Ze[0][0],Ut=Pt===180||Pt===360?[(Ze[0][0]+Ze[1][0])/2,(Ze[0][1]+Ze[1][1])/2]:t.geoCentroid(Ke);if(de)for(;++yt<Ae&&Me[yt]!==de;);++yt;for(var ar=0;ar<Ae;++ar)Pe=Me[(ar+yt)%Ae],Array.isArray(Pe)?(at||(ie.point((ve=t.geoInterpolate(Pe[0],Ut)(g))[0],ve[1]),at=!0),ie.point((ve=t.geoInterpolate(Pe[1],Ut)(g))[0],ve[1])):(at=!1,Pe!==de&&Jm(ie,Pe,se))}function vc(ie,se){return ie&&se&&ie[0]===se[0]&&ie[1]===se[1]}function Vv(ie,se){for(var de,ve,Me=ie.length,Ae=null,Pe=0;Pe<Me;++Pe){de=ie[Pe];for(var Ke=se.length;--Ke>=0;)if(ve=se[Ke],de[0]===ve[0]&&de[1]===ve[1]){if(Ae)return[Ae,de];Ae=de}}}function gp(ie){for(var se=ie.length,de=[],ve=ie[se-1],Me=0;Me<se;++Me)de.push([ve,ve=ie[Me]]);return de}function mp(ie){return ie.project.invert||ie.children&&ie.children.some(mp)}var Qm=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],yp=[[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(ie){return ie.map(function(se){return Qm[se]})});function wh(ie){ie=ie||function(de){var ve=t.geoCentroid({type:"MultiPoint",coordinates:de});return t.geoGnomonic().scale(1).translate([0,0]).rotate([-ve[0],-ve[1]])};var se=yp.map(function(de){return{face:de,project:ie(de)}});return[-1,0,0,1,0,1,4,5].forEach(function(de,ve){var Me=se[de];Me&&(Me.children||(Me.children=[])).push(se[ve])}),K0(se[0],function(de,ve){return se[de<-b/2?ve<0?6:4:de<0?ve<0?2:0:de<b/2?ve<0?3:1:ve<0?7:5]}).angle(-30).scale(101.858).center([0,45])}var J0=2/F(3);function xp(ie,se){var de=Ge(ie,se);return[de[0]*J0,de[1]]}xp.invert=function(ie,se){return Ge.invert(ie/J0,se)};function ey(ie){ie=ie||function(de){var ve=t.geoCentroid({type:"MultiPoint",coordinates:de});return t.geoProjection(xp).translate([0,0]).scale(1).rotate(ve[1]>0?[-ve[0],0]:[180-ve[0],180])};var se=yp.map(function(de){return{face:de,project:ie(de)}});return[-1,0,0,1,0,1,4,5].forEach(function(de,ve){var Me=se[de];Me&&(Me.children||(Me.children=[])).push(se[ve])}),K0(se[0],function(de,ve){return se[de<-b/2?ve<0?6:4:de<0?ve<0?2:0:de<b/2?ve<0?3:1:ve<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function _p(ie){ie=ie||function(Pe){var Ke=Pe.length===6?t.geoCentroid({type:"MultiPoint",coordinates:Pe}):Pe[0];return t.geoGnomonic().scale(1).translate([0,0]).rotate([-Ke[0],-Ke[1]])};var se=yp.map(function(Pe){for(var Ke=Pe.map(Q0),nt=Ke.length,Ze=Ke[nt-1],at,yt=[],Pt=0;Pt<nt;++Pt)at=Ke[Pt],yt.push(l0([Ze[0]*.9486832980505138+at[0]*.31622776601683794,Ze[1]*.9486832980505138+at[1]*.31622776601683794,Ze[2]*.9486832980505138+at[2]*.31622776601683794]),l0([at[0]*.9486832980505138+Ze[0]*.31622776601683794,at[1]*.9486832980505138+Ze[1]*.31622776601683794,at[2]*.9486832980505138+Ze[2]*.31622776601683794])),Ze=at;return yt}),de=[],ve=[-1,0,0,1,0,1,4,5];se.forEach(function(Pe,Ke){for(var nt=yp[Ke],Ze=nt.length,at=de[Ke]=[],yt=0;yt<Ze;++yt)se.push([nt[yt],Pe[(yt*2+2)%(2*Ze)],Pe[(yt*2+1)%(2*Ze)]]),ve.push(Ke),at.push(bp(Q0(Pe[(yt*2+2)%(2*Ze)]),Q0(Pe[(yt*2+1)%(2*Ze)])))});var Me=se.map(function(Pe){return{project:ie(Pe),face:Pe}});ve.forEach(function(Pe,Ke){var nt=Me[Pe];nt&&(nt.children||(nt.children=[])).push(Me[Ke])});function Ae(Pe,Ke){var nt=o(Ke),Ze=[nt*o(Pe),nt*v(Pe),v(Ke)],at=Pe<-b/2?Ke<0?6:4:Pe<0?Ke<0?2:0:Pe<b/2?Ke<0?3:1:Ke<0?7:5,yt=de[at];return Me[s0(yt[0],Ze)<0?8+3*at:s0(yt[1],Ze)<0?8+3*at+1:s0(yt[2],Ze)<0?8+3*at+2:at]}return K0(Me[0],Ae).angle(-30).scale(110.625).center([0,45])}function s0(ie,se){for(var de=0,ve=ie.length,Me=0;de<ve;++de)Me+=ie[de]*se[de];return Me}function bp(ie,se){return[ie[1]*se[2]-ie[2]*se[1],ie[2]*se[0]-ie[0]*se[2],ie[0]*se[1]-ie[1]*se[0]]}function l0(ie){return[a(ie[1],ie[0])*E,k(c(-1,f(1,ie[2])))*E]}function Q0(ie){var se=ie[0]*S,de=ie[1]*S,ve=o(de);return[ve*o(se),ve*v(se),v(de)]}function ed(){}function wp(ie){if((de=ie.length)<4)return!1;for(var se=0,de,ve=ie[de-1][1]*ie[0][0]-ie[de-1][0]*ie[0][1];++se<de;)ve+=ie[se-1][1]*ie[se][0]-ie[se-1][0]*ie[se][1];return ve<=0}function mg(ie,se){for(var de=se[0],ve=se[1],Me=!1,Ae=0,Pe=ie.length,Ke=Pe-1;Ae<Pe;Ke=Ae++){var nt=ie[Ae],Ze=nt[0],at=nt[1],yt=ie[Ke],Pt=yt[0],Ut=yt[1];at>ve^Ut>ve&&de<(Pt-Ze)*(ve-at)/(Ut-at)+Ze&&(Me=!Me)}return Me}function Gv(ie,se){var de=se.stream,ve;if(!de)throw new Error("invalid projection");switch(ie&&ie.type){case"Feature":ve=ry;break;case"FeatureCollection":ve=ty;break;default:ve=Hv;break}return ve(ie,de)}function ty(ie,se){return{type:"FeatureCollection",features:ie.features.map(function(de){return ry(de,se)})}}function ry(ie,se){return{type:"Feature",id:ie.id,properties:ie.properties,geometry:Hv(ie.geometry,se)}}function yg(ie,se){return{type:"GeometryCollection",geometries:ie.geometries.map(function(de){return Hv(de,se)})}}function Hv(ie,se){if(!ie)return null;if(ie.type==="GeometryCollection")return yg(ie,se);var de;switch(ie.type){case"Point":de=Tp;break;case"MultiPoint":de=Tp;break;case"LineString":de=xg;break;case"MultiLineString":de=xg;break;case"Polygon":de=Ap;break;case"MultiPolygon":de=Ap;break;case"Sphere":de=Ap;break;default:return null}return t.geoStream(ie,se(de)),de.result()}var cl=[],Gc=[],Tp={point:function(ie,se){cl.push([ie,se])},result:function(){var ie=cl.length?cl.length<2?{type:"Point",coordinates:cl[0]}:{type:"MultiPoint",coordinates:cl}:null;return cl=[],ie}},xg={lineStart:ed,point:function(ie,se){cl.push([ie,se])},lineEnd:function(){cl.length&&(Gc.push(cl),cl=[])},result:function(){var ie=Gc.length?Gc.length<2?{type:"LineString",coordinates:Gc[0]}:{type:"MultiLineString",coordinates:Gc}:null;return Gc=[],ie}},Ap={polygonStart:ed,lineStart:ed,point:function(ie,se){cl.push([ie,se])},lineEnd:function(){var ie=cl.length;if(ie){do cl.push(cl[0].slice());while(++ie<4);Gc.push(cl),cl=[]}},polygonEnd:ed,result:function(){if(!Gc.length)return null;var ie=[],se=[];return Gc.forEach(function(de){wp(de)?ie.push([de]):se.push(de)}),se.forEach(function(de){var ve=de[0];ie.some(function(Me){if(mg(Me[0],ve))return Me.push(de),!0})||ie.push([de])}),Gc=[],ie.length?ie.length>1?{type:"MultiPolygon",coordinates:ie}:{type:"Polygon",coordinates:ie[0]}:null}};function Mp(ie){var se=ie(_,0)[0]-ie(-_,0)[0];function de(ve,Me){var Ae=i(ve)<_,Pe=ie(Ae?ve:ve>0?ve-b:ve+b,Me),Ke=(Pe[0]-Pe[1])*x,nt=(Pe[0]+Pe[1])*x;if(Ae)return[Ke,nt];var Ze=se*x,at=Ke>0^nt>0?-1:1;return[at*Ke-p(nt)*Ze,at*nt-p(Ke)*Ze]}return ie.invert&&(de.invert=function(ve,Me){var Ae=(ve+Me)*x,Pe=(Me-ve)*x,Ke=i(Ae)<.5*se&&i(Pe)<.5*se;if(!Ke){var nt=se*x,Ze=Ae>0^Pe>0?-1:1,at=-Ze*ve+(Pe>0?1:-1)*nt,yt=-Ze*Me+(Ae>0?1:-1)*nt;Ae=(-at-yt)*x,Pe=(at-yt)*x}var Pt=ie.invert(Ae,Pe);return Ke||(Pt[0]+=Ae>0?b:-b),Pt}),t.geoProjection(de).rotate([-90,-90,45]).clipAngle(180-.001)}function Te(){return Mp(Wt).scale(176.423)}function qe(){return Mp(fa).scale(111.48)}function rt(ie,se){if(!(0<=(se=+se)&&se<=20))throw new Error("invalid digits");function de(Ze){var at=Ze.length,yt=2,Pt=new Array(at);for(Pt[0]=+Ze[0].toFixed(se),Pt[1]=+Ze[1].toFixed(se);yt<at;)Pt[yt]=Ze[yt],++yt;return Pt}function ve(Ze){return Ze.map(de)}function Me(Ze){for(var at=de(Ze[0]),yt=[at],Pt=1;Pt<Ze.length;Pt++){var Ut=de(Ze[Pt]);(Ut.length>2||Ut[0]!=at[0]||Ut[1]!=at[1])&&(yt.push(Ut),at=Ut)}return yt.length===1&&Ze.length>1&&yt.push(de(Ze[Ze.length-1])),yt}function Ae(Ze){return Ze.map(Me)}function Pe(Ze){if(Ze==null)return Ze;var at;switch(Ze.type){case"GeometryCollection":at={type:"GeometryCollection",geometries:Ze.geometries.map(Pe)};break;case"Point":at={type:"Point",coordinates:de(Ze.coordinates)};break;case"MultiPoint":at={type:Ze.type,coordinates:ve(Ze.coordinates)};break;case"LineString":at={type:Ze.type,coordinates:Me(Ze.coordinates)};break;case"MultiLineString":case"Polygon":at={type:Ze.type,coordinates:Ae(Ze.coordinates)};break;case"MultiPolygon":at={type:"MultiPolygon",coordinates:Ze.coordinates.map(Ae)};break;default:return Ze}return Ze.bbox!=null&&(at.bbox=Ze.bbox),at}function Ke(Ze){var at={type:"Feature",properties:Ze.properties,geometry:Pe(Ze.geometry)};return Ze.id!=null&&(at.id=Ze.id),Ze.bbox!=null&&(at.bbox=Ze.bbox),at}if(ie!=null)switch(ie.type){case"Feature":return Ke(ie);case"FeatureCollection":{var nt={type:"FeatureCollection",features:ie.features.map(Ke)};return ie.bbox!=null&&(nt.bbox=ie.bbox),nt}default:return Pe(ie)}return ie}function Ye(ie){var se=v(ie);function de(ve,Me){var Ae=se?m(ve*se/2)/se:ve/2;if(!Me)return[2*Ae,-ie];var Pe=2*n(Ae*v(Me)),Ke=1/m(Me);return[v(Pe)*Ke,Me+(1-o(Pe))*Ke-ie]}return de.invert=function(ve,Me){if(i(Me+=ie)<g)return[se?2*n(se*ve/2)/se:ve,0];var Ae=ve*ve+Me*Me,Pe=0,Ke=10,nt;do{var Ze=m(Pe),at=1/o(Pe),yt=Ae-2*Me*Pe+Pe*Pe;Pe-=nt=(Ze*yt+2*(Pe-Me))/(2+yt*at*at+2*(Pe-Me)*Ze)}while(i(nt)>g&&--Ke>0);var Pt=ve*(Ze=m(Pe)),Ut=m(i(Me)<i(Pe+1/Ze)?k(Pt)*.5:D(Pt)*.5+b/4)/v(Pe);return[se?2*n(se*Ut)/se:2*Ut,Pe]},de}function At(){return Fe(Ye).scale(131.215)}var Gt=[[.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]];Gt.forEach(function(ie){ie[1]*=1.0144});function Kt(ie,se){var de=f(18,i(se)*36/b),ve=l(de),Me=de-ve,Ae=(yt=Gt[ve])[0],Pe=yt[1],Ke=(yt=Gt[++ve])[0],nt=yt[1],Ze=(yt=Gt[f(19,++ve)])[0],at=yt[1],yt;return[ie*(Ke+Me*(Ze-Ae)/2+Me*Me*(Ze-2*Ke+Ae)/2),(se>0?_:-_)*(nt+Me*(at-Pe)/2+Me*Me*(at-2*nt+Pe)/2)]}Kt.invert=function(ie,se){var de=se/_,ve=de*90,Me=f(18,i(ve/5)),Ae=c(0,l(Me));do{var Pe=Gt[Ae][1],Ke=Gt[Ae+1][1],nt=Gt[f(19,Ae+2)][1],Ze=nt-Pe,at=nt-2*Ke+Pe,yt=2*(i(de)-Ke)/Ze,Pt=at/Ze,Ut=yt*(1-Pt*yt*(1-2*Pt*yt));if(Ut>=0||Ae===1){ve=(se>=0?5:-5)*(Ut+Me);var ar=50,Ar;do Me=f(18,i(ve)/5),Ae=l(Me),Ut=Me-Ae,Pe=Gt[Ae][1],Ke=Gt[Ae+1][1],nt=Gt[f(19,Ae+2)][1],ve-=(Ar=(se>=0?_:-_)*(Ke+Ut*(nt-Pe)/2+Ut*Ut*(nt-2*Ke+Pe)/2)-se)*E;while(i(Ar)>w&&--ar>0);break}}while(--Ae>=0);var Vr=Gt[Ae][0],_i=Gt[Ae+1][0],rn=Gt[f(19,Ae+2)][0];return[ie/(_i+Ut*(rn-Vr)/2+Ut*Ut*(rn-2*_i+Vr)/2),ve*S]};function cr(){return t.geoProjection(Kt).scale(152.63)}function mr(ie){function se(de,ve){var Me=o(ve),Ae=(ie-1)/(ie-Me*o(de));return[Ae*Me*v(de),Ae*v(ve)]}return se.invert=function(de,ve){var Me=de*de+ve*ve,Ae=F(Me),Pe=(ie-F(1-Me*(ie+1)/(ie-1)))/((ie-1)/Ae+Ae/(ie-1));return[a(de*Pe,Ae*F(1-Pe*Pe)),Ae?k(ve*Pe/Ae):0]},se}function Pr(ie,se){var de=mr(ie);if(!se)return de;var ve=o(se),Me=v(se);function Ae(Pe,Ke){var nt=de(Pe,Ke),Ze=nt[1],at=Ze*Me/(ie-1)+ve;return[nt[0]*ve/at,Ze/at]}return Ae.invert=function(Pe,Ke){var nt=(ie-1)/(ie-1-Ke*Me);return de.invert(nt*Pe,nt*Ke*ve)},Ae}function rr(){var ie=2,se=0,de=t.geoProjectionMutator(Pr),ve=de(ie,se);return ve.distance=function(Me){return arguments.length?de(ie=+Me,se):ie},ve.tilt=function(Me){return arguments.length?de(ie,se=Me*S):se*E},ve.scale(432.147).clipAngle(D(1/ie)*E-1e-6)}var fr=1e-4,pr=1e4,Dr=-180,Hr=Dr+fr,zi=180,ki=zi-fr,Vi=-90,Xi=Vi+fr,Yr=90,ai=Yr-fr;function on(ie){return ie.length>0}function En(ie){return Math.floor(ie*pr)/pr}function ga(ie){return ie===Vi||ie===Yr?[0,ie]:[Dr,En(ie)]}function $a(ie){var se=ie[0],de=ie[1],ve=!1;return se<=Hr?(se=Dr,ve=!0):se>=ki&&(se=zi,ve=!0),de<=Xi?(de=Vi,ve=!0):de>=ai&&(de=Yr,ve=!0),ve?[se,de]:ie}function Ca(ie){return ie.map($a)}function xo(ie,se,de){for(var ve=0,Me=ie.length;ve<Me;++ve){var Ae=ie[ve].slice();de.push({index:-1,polygon:se,ring:Ae});for(var Pe=0,Ke=Ae.length;Pe<Ke;++Pe){var nt=Ae[Pe],Ze=nt[0],at=nt[1];if(Ze<=Hr||Ze>=ki||at<=Xi||at>=ai){Ae[Pe]=$a(nt);for(var yt=Pe+1;yt<Ke;++yt){var Pt=Ae[yt],Ut=Pt[0],ar=Pt[1];if(Ut>Hr&&Ut<ki&&ar>Xi&&ar<ai)break}if(yt===Pe+1)continue;if(Pe){var Ar={index:-1,polygon:se,ring:Ae.slice(0,Pe+1)};Ar.ring[Ar.ring.length-1]=ga(at),de[de.length-1]=Ar}else de.pop();if(yt>=Ke)break;de.push({index:-1,polygon:se,ring:Ae=Ae.slice(yt-1)}),Ae[0]=ga(Ae[0][1]),Pe=-1,Ke=Ae.length}}}}function aa(ie){var se,de=ie.length,ve={},Me={},Ae,Pe,Ke,nt,Ze;for(se=0;se<de;++se){if(Ae=ie[se],Pe=Ae.ring[0],nt=Ae.ring[Ae.ring.length-1],Pe[0]===nt[0]&&Pe[1]===nt[1]){Ae.polygon.push(Ae.ring),ie[se]=null;continue}Ae.index=se,ve[Pe]=Me[nt]=Ae}for(se=0;se<de;++se)if(Ae=ie[se],Ae){if(Pe=Ae.ring[0],nt=Ae.ring[Ae.ring.length-1],Ke=Me[Pe],Ze=ve[nt],delete ve[Pe],delete Me[nt],Pe[0]===nt[0]&&Pe[1]===nt[1]){Ae.polygon.push(Ae.ring);continue}Ke?(delete Me[Pe],delete ve[Ke.ring[0]],Ke.ring.pop(),ie[Ke.index]=null,Ae={index:-1,polygon:Ke.polygon,ring:Ke.ring.concat(Ae.ring)},Ke===Ze?Ae.polygon.push(Ae.ring):(Ae.index=de++,ie.push(ve[Ae.ring[0]]=Me[Ae.ring[Ae.ring.length-1]]=Ae))):Ze?(delete ve[nt],delete Me[Ze.ring[Ze.ring.length-1]],Ae.ring.pop(),Ae={index:de++,polygon:Ze.polygon,ring:Ae.ring.concat(Ze.ring)},ie[Ze.index]=null,ie.push(ve[Ae.ring[0]]=Me[Ae.ring[Ae.ring.length-1]]=Ae)):(Ae.ring.push(Ae.ring[0]),Ae.polygon.push(Ae.ring))}}function fl(ie){var se={type:"Feature",geometry:ns(ie.geometry)};return ie.id!=null&&(se.id=ie.id),ie.bbox!=null&&(se.bbox=ie.bbox),ie.properties!=null&&(se.properties=ie.properties),se}function ns(ie){if(ie==null)return ie;var se,de,ve,Me;switch(ie.type){case"GeometryCollection":se={type:"GeometryCollection",geometries:ie.geometries.map(ns)};break;case"Point":se={type:"Point",coordinates:$a(ie.coordinates)};break;case"MultiPoint":case"LineString":se={type:ie.type,coordinates:Ca(ie.coordinates)};break;case"MultiLineString":se={type:"MultiLineString",coordinates:ie.coordinates.map(Ca)};break;case"Polygon":{var Ae=[];xo(ie.coordinates,Ae,de=[]),aa(de),se={type:"Polygon",coordinates:Ae};break}case"MultiPolygon":{de=[],ve=-1,Me=ie.coordinates.length;for(var Pe=new Array(Me);++ve<Me;)xo(ie.coordinates[ve],Pe[ve]=[],de);aa(de),se={type:"MultiPolygon",coordinates:Pe.filter(on)};break}default:return ie}return ie.bbox!=null&&(se.bbox=ie.bbox),se}function po(ie){if(ie==null)return ie;switch(ie.type){case"Feature":return fl(ie);case"FeatureCollection":{var se={type:"FeatureCollection",features:ie.features.map(fl)};return ie.bbox!=null&&(se.bbox=ie.bbox),se}default:return ns(ie)}}function di(ie,se){var de=m(se/2),ve=v(M*de);return[ie*(.74482-.34588*ve*ve),1.70711*de]}di.invert=function(ie,se){var de=se/1.70711,ve=v(M*de);return[ie/(.74482-.34588*ve*ve),2*n(de)]};function Sa(){return t.geoProjection(di).scale(146.153)}function ks(ie,se,de){var ve=t.geoInterpolate(se,de),Me=ve(.5),Ae=t.geoRotation([-Me[0],-Me[1]])(se),Pe=ve.distance/2,Ke=-k(v(Ae[1]*S)/v(Pe)),nt=[-Me[0],-Me[1],-(Ae[0]>0?b-Ke:Ke)*E],Ze=t.geoProjection(ie(Pe)).rotate(nt),at=t.geoRotation(nt),yt=Ze.center;return delete Ze.rotate,Ze.center=function(Pt){return arguments.length?yt(at(Pt)):at.invert(yt())},Ze.clipAngle(90)}function bl(ie){var se=o(ie);function de(ve,Me){var Ae=t.geoGnomonicRaw(ve,Me);return Ae[0]*=se,Ae}return de.invert=function(ve,Me){return t.geoGnomonicRaw.invert(ve/se,Me)},de}function Au(){return vf([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function vf(ie,se){return ks(bl,ie,se)}function Hc(ie){if(!(ie*=2))return t.geoAzimuthalEquidistantRaw;var se=-ie/2,de=-se,ve=ie*ie,Me=m(de),Ae=.5/v(de);function Pe(Ke,nt){var Ze=D(o(nt)*o(Ke-se)),at=D(o(nt)*o(Ke-de)),yt=nt<0?-1:1;return Ze*=Ze,at*=at,[(Ze-at)/(2*ie),yt*F(4*ve*at-(ve-Ze+at)*(ve-Ze+at))/(2*ie)]}return Pe.invert=function(Ke,nt){var Ze=nt*nt,at=o(F(Ze+(Pt=Ke+se)*Pt)),yt=o(F(Ze+(Pt=Ke+de)*Pt)),Pt,Ut;return[a(Ut=at-yt,Pt=(at+yt)*Me),(nt<0?-1:1)*D(F(Pt*Pt+Ut*Ut)*Ae)]},Pe}function Hf(){return Yu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Yu(ie,se){return ks(Hc,ie,se)}function Th(ie,se){if(i(se)<g)return[ie,0];var de=i(se/_),ve=k(de);if(i(ie)<g||i(i(se)-_)<g)return[0,p(se)*b*m(ve/2)];var Me=o(ve),Ae=i(b/ie-ie/b)/2,Pe=Ae*Ae,Ke=Me/(de+Me-1),nt=Ke*(2/de-1),Ze=nt*nt,at=Ze+Pe,yt=Ke-Ze,Pt=Pe+Ke;return[p(ie)*b*(Ae*yt+F(Pe*yt*yt-at*(Ke*Ke-Ze)))/at,p(se)*b*(nt*Pt-Ae*F((Pe+1)*at-Pt*Pt))/at]}Th.invert=function(ie,se){if(i(se)<g)return[ie,0];if(i(ie)<g)return[0,_*v(2*n(se/b))];var de=(ie/=b)*ie,ve=(se/=b)*se,Me=de+ve,Ae=Me*Me,Pe=-i(se)*(1+Me),Ke=Pe-2*ve+de,nt=-2*Pe+1+2*ve+Ae,Ze=ve/nt+(2*Ke*Ke*Ke/(nt*nt*nt)-9*Pe*Ke/(nt*nt))/27,at=(Pe-Ke*Ke/(3*nt))/nt,yt=2*F(-at/3),Pt=D(3*Ze/(at*yt))/3;return[b*(Me-1+F(1+2*(de-ve)+Ae))/(2*ie),p(se)*b*(-yt*o(Pt+b/3)-Ke/(3*nt))]};function Ah(){return t.geoProjection(Th).scale(79.4183)}function Sp(ie,se){if(i(se)<g)return[ie,0];var de=i(se/_),ve=k(de);if(i(ie)<g||i(i(se)-_)<g)return[0,p(se)*b*m(ve/2)];var Me=o(ve),Ae=i(b/ie-ie/b)/2,Pe=Ae*Ae,Ke=Me*(F(1+Pe)-Ae*Me)/(1+Pe*de*de);return[p(ie)*b*Ke,p(se)*b*F(1-Ke*(2*Ae+Ke))]}Sp.invert=function(ie,se){if(!ie)return[0,_*v(2*n(se/b))];var de=i(ie/b),ve=(1-de*de-(se/=b)*se)/(2*de),Me=ve*ve,Ae=F(Me+1);return[p(ie)*b*(Ae-ve),p(se)*_*v(2*a(F((1-2*ve*de)*(ve+Ae)-de),F(Ae+ve+de)))]};function _g(){return t.geoProjection(Sp).scale(79.4183)}function jv(ie,se){if(i(se)<g)return[ie,0];var de=se/_,ve=k(de);if(i(ie)<g||i(i(se)-_)<g)return[0,b*m(ve/2)];var Me=(b/ie-ie/b)/2,Ae=de/(1+o(ve));return[b*(p(ie)*F(Me*Me+1-Ae*Ae)-Me),b*Ae]}jv.invert=function(ie,se){if(!se)return[ie,0];var de=se/b,ve=(b*b*(1-de*de)-ie*ie)/(2*b*ie);return[ie?b*(p(ie)*F(ve*ve+1)-ve):0,_*v(2*n(de))]};function Mx(){return t.geoProjection(jv).scale(79.4183)}function $v(ie,se){if(!se)return[ie,0];var de=i(se);if(!ie||de===_)return[0,se];var ve=de/_,Me=ve*ve,Ae=(8*ve-Me*(Me+2)-5)/(2*Me*(ve-1)),Pe=Ae*Ae,Ke=ve*Ae,nt=Me+Pe+2*Ke,Ze=ve+3*Ae,at=ie/_,yt=at+1/at,Pt=p(i(ie)-_)*F(yt*yt-4),Ut=Pt*Pt,ar=nt*(Me+Pe*Ut-1)+(1-Me)*(Me*(Ze*Ze+4*Pe)+12*Ke*Pe+4*Pe*Pe),Ar=(Pt*(nt+Pe-1)+2*F(ar))/(4*nt+Ut);return[p(ie)*_*Ar,p(se)*_*F(1+Pt*i(Ar)-Ar*Ar)]}$v.invert=function(ie,se){var de;if(!ie||!se)return[ie,se];se/=b;var ve=p(ie)*ie/_,Me=(ve*ve-1+4*se*se)/i(ve),Ae=Me*Me,Pe=2*se,Ke=50;do{var nt=Pe*Pe,Ze=(8*Pe-nt*(nt+2)-5)/(2*nt*(Pe-1)),at=(3*Pe-nt*Pe-10)/(2*nt*Pe),yt=Ze*Ze,Pt=Pe*Ze,Ut=Pe+Ze,ar=Ut*Ut,Ar=Pe+3*Ze,Vr=ar*(nt+yt*Ae-1)+(1-nt)*(nt*(Ar*Ar+4*yt)+yt*(12*Pt+4*yt)),_i=-2*Ut*(4*Pt*yt+(1-4*nt+3*nt*nt)*(1+at)+yt*(-6+14*nt-Ae+(-8+8*nt-2*Ae)*at)+Pt*(-8+12*nt+(-10+10*nt-Ae)*at)),rn=F(Vr),cn=Me*(ar+yt-1)+2*rn-ve*(4*ar+Ae),xn=Me*(2*Ze*at+2*Ut*(1+at))+_i/rn-8*Ut*(Me*(-1+yt+ar)+2*rn)*(1+at)/(Ae+4*ar);Pe-=de=cn/xn}while(de>g&&--Ke>0);return[p(ie)*(F(Me*Me+4)+Me)*b/4,_*Pe]};function jc(){return t.geoProjection($v).scale(127.16)}function iy(ie,se,de,ve,Me){function Ae(Pe,Ke){var nt=de*v(ve*Ke),Ze=F(1-nt*nt),at=F(2/(1+Ze*o(Pe*=Me)));return[ie*Ze*at*v(Pe),se*nt*at]}return Ae.invert=function(Pe,Ke){var nt=Pe/ie,Ze=Ke/se,at=F(nt*nt+Ze*Ze),yt=2*k(at/2);return[a(Pe*m(yt),ie*at)/Me,at&&k(Ke*v(yt)/(se*de*at))/ve]},Ae}function Wv(ie,se,de,ve){var Me=b/3;ie=c(ie,g),se=c(se,g),ie=f(ie,_),se=f(se,b-g),de=c(de,0),de=f(de,100-g),ve=c(ve,g);var Ae=de/100+1,Pe=ve/100,Ke=D(Ae*o(Me))/Me,nt=v(ie)/v(Ke*_),Ze=se/b,at=F(Pe*v(ie/2)/v(se/2)),yt=at/F(Ze*nt*Ke),Pt=1/(at*F(Ze*nt*Ke));return iy(yt,Pt,nt,Ke,Ze)}function bg(){var ie=65*S,se=60*S,de=20,ve=200,Me=t.geoProjectionMutator(Wv),Ae=Me(ie,se,de,ve);return Ae.poleline=function(Pe){return arguments.length?Me(ie=+Pe*S,se,de,ve):ie*E},Ae.parallels=function(Pe){return arguments.length?Me(ie,se=+Pe*S,de,ve):se*E},Ae.inflation=function(Pe){return arguments.length?Me(ie,se,de=+Pe,ve):de},Ae.ratio=function(Pe){return arguments.length?Me(ie,se,de,ve=+Pe):ve},Ae.scale(163.775)}function Yv(){return bg().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Mh=4*b+3*F(3),wg=2*F(2*b*F(3)/Mh),Ep=ue(wg*F(3)/b,wg,Mh/6);function kp(){return t.geoProjection(Ep).scale(176.84)}function td(ie,se){return[ie*F(1-3*se*se/(b*b)),se]}td.invert=function(ie,se){return[ie/F(1-3*se*se/(b*b)),se]};function Cp(){return t.geoProjection(td).scale(152.63)}function rd(ie,se){var de=o(se),ve=o(ie)*de,Me=1-ve,Ae=o(ie=a(v(ie)*de,-v(se))),Pe=v(ie);return de=F(1-ve*ve),[Pe*de-Ae*Me,-Ae*de-Pe*Me]}rd.invert=function(ie,se){var de=(ie*ie+se*se)/-2,ve=F(-de*(2+de)),Me=se*de+ie*ve,Ae=ie*de-se*ve,Pe=F(Ae*Ae+Me*Me);return[a(ve*Me,Pe*(1+de)),Pe?-k(ve*Ae/Pe):0]};function Xv(){return t.geoProjection(rd).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function Tg(ie,se){var de=Y(ie,se);return[(de[0]+ie/_)/2,(de[1]+se)/2]}Tg.invert=function(ie,se){var de=ie,ve=se,Me=25;do{var Ae=o(ve),Pe=v(ve),Ke=v(2*ve),nt=Pe*Pe,Ze=Ae*Ae,at=v(de),yt=o(de/2),Pt=v(de/2),Ut=Pt*Pt,ar=1-Ze*yt*yt,Ar=ar?D(Ae*yt)*F(Vr=1/ar):Vr=0,Vr,_i=.5*(2*Ar*Ae*Pt+de/_)-ie,rn=.5*(Ar*Pe+ve)-se,cn=.5*Vr*(Ze*Ut+Ar*Ae*yt*nt)+.5/_,xn=Vr*(at*Ke/4-Ar*Pe*Pt),Dn=.125*Vr*(Ke*Pt-Ar*Pe*Ze*at),Qa=.5*Vr*(nt*yt+Ar*Ut*Ae)+.5,So=xn*Dn-Qa*cn,oa=(rn*xn-_i*Qa)/So,as=(_i*Dn-rn*cn)/So;de-=oa,ve-=as}while((i(oa)>g||i(as)>g)&&--Me>0);return[de,ve]};function gc(){return t.geoProjection(Tg).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=$,e.geoAiryRaw=O,e.geoAitoff=K,e.geoAitoffRaw=Y,e.geoArmadillo=q,e.geoArmadilloRaw=j,e.geoAugust=U,e.geoAugustRaw=J,e.geoBaker=G,e.geoBakerRaw=H,e.geoBerghaus=te,e.geoBerghausRaw=Q,e.geoBertin1953=Ee,e.geoBertin1953Raw=oe,e.geoBoggs=we,e.geoBoggsRaw=pe,e.geoBonne=Ie,e.geoBonneRaw=_e,e.geoBottomley=Qe,e.geoBottomleyRaw=Oe,e.geoBromley=_t,e.geoBromleyRaw=et,e.geoChamberlin=Ue,e.geoChamberlinRaw=mt,e.geoChamberlinAfrica=Ne,e.geoCollignon=je,e.geoCollignonRaw=Ge,e.geoCraig=Ve,e.geoCraigRaw=Re,e.geoCraster=Xt,e.geoCrasterRaw=Tt,e.geoCylindricalEqualArea=lr,e.geoCylindricalEqualAreaRaw=Vt,e.geoCylindricalStereographic=Bt,e.geoCylindricalStereographicRaw=ur,e.geoEckert1=kr,e.geoEckert1Raw=Zt,e.geoEckert2=tt,e.geoEckert2Raw=$e,e.geoEckert3=xt,e.geoEckert3Raw=st,e.geoEckert4=Ct,e.geoEckert4Raw=Je,e.geoEckert5=hr,e.geoEckert5Raw=ir,e.geoEckert6=si,e.geoEckert6Raw=Ur,e.geoEisenlohr=$i,e.geoEisenlohrRaw=Lr,e.geoFahey=ta,e.geoFaheyRaw=hn,e.geoFoucaut=dn,e.geoFoucautRaw=ca,e.geoFoucautSinusoidal=ra,e.geoFoucautSinusoidalRaw=Vn,e.geoGilbert=Rs,e.geoGingery=zs,e.geoGingeryRaw=ho,e.geoGinzburg4=_l,e.geoGinzburg4Raw=Xs,e.geoGinzburg5=ul,e.geoGinzburg5Raw=yu,e.geoGinzburg6=ot,e.geoGinzburg6Raw=Le,e.geoGinzburg8=kt,e.geoGinzburg8Raw=lt,e.geoGinzburg9=Rt,e.geoGinzburg9Raw=Jt,e.geoGringorten=ti,e.geoGringortenRaw=Wt,e.geoGuyou=oo,e.geoGuyouRaw=fa,e.geoHammer=Ce,e.geoHammerRaw=ce,e.geoHammerRetroazimuthal=ps,e.geoHammerRetroazimuthalRaw=Ao,e.geoHealpix=vs,e.geoHealpixRaw=Ro,e.geoHill=Ks,e.geoHillRaw=Zs,e.geoHomolosine=dc,e.geoHomolosineRaw=_u,e.geoHufnagel=ja,e.geoHufnagelRaw=Nl,e.geoHyperelliptical=iu,e.geoHyperellipticalRaw=Ss,e.geoInterrupt=Zo,e.geoInterruptedBoggs=Cv,e.geoInterruptedHomolosine=r0,e.geoInterruptedMollweide=vh,e.geoInterruptedMollweideHemispheres=i0,e.geoInterruptedSinuMollweide=gh,e.geoInterruptedSinusoidal=n0,e.geoKavrayskiy7=$0,e.geoKavrayskiy7Raw=j0,e.geoLagrange=Lv,e.geoLagrangeRaw=Fv,e.geoLarrivee=mh,e.geoLarriveeRaw=cp,e.geoLaskowski=Es,e.geoLaskowskiRaw=ju,e.geoLittrow=wu,e.geoLittrowRaw=Vo,e.geoLoximuthal=yh,e.geoLoximuthalRaw=W0,e.geoMiller=Pv,e.geoMillerRaw=a0,e.geoModifiedStereographic=hf,e.geoModifiedStereographicRaw=ug,e.geoModifiedStereographicAlaska=Rv,e.geoModifiedStereographicGs48=_h,e.geoModifiedStereographicGs50=cg,e.geoModifiedStereographicMiller=Y0,e.geoModifiedStereographicLee=fp,e.geoMollweide=ae,e.geoMollweideRaw=ee,e.geoMtFlatPolarParabolic=fg,e.geoMtFlatPolarParabolicRaw=X0,e.geoMtFlatPolarQuartic=Ym,e.geoMtFlatPolarQuarticRaw=hg,e.geoMtFlatPolarSinusoidal=Bv,e.geoMtFlatPolarSinusoidalRaw=Uf,e.geoNaturalEarth2=dp,e.geoNaturalEarth2Raw=Vf,e.geoNellHammer=Z0,e.geoNellHammerRaw=pc,e.geoInterruptedQuarticAuthalic=dg,e.geoNicolosi=pg,e.geoNicolosiRaw=qv,e.geoPatterson=o0,e.geoPattersonRaw=vp,e.geoPolyconic=gg,e.geoPolyconicRaw=bh,e.geoPolyhedral=K0,e.geoPolyhedralButterfly=wh,e.geoPolyhedralCollignon=ey,e.geoPolyhedralWaterman=_p,e.geoProject=Gv,e.geoGringortenQuincuncial=Te,e.geoPeirceQuincuncial=qe,e.geoPierceQuincuncial=qe,e.geoQuantize=rt,e.geoQuincuncial=Mp,e.geoRectangularPolyconic=At,e.geoRectangularPolyconicRaw=Ye,e.geoRobinson=cr,e.geoRobinsonRaw=Kt,e.geoSatellite=rr,e.geoSatelliteRaw=Pr,e.geoSinuMollweide=xu,e.geoSinuMollweideRaw=ru,e.geoSinusoidal=ke,e.geoSinusoidalRaw=Se,e.geoStitch=po,e.geoTimes=Sa,e.geoTimesRaw=di,e.geoTwoPointAzimuthal=vf,e.geoTwoPointAzimuthalRaw=bl,e.geoTwoPointAzimuthalUsa=Au,e.geoTwoPointEquidistant=Yu,e.geoTwoPointEquidistantRaw=Hc,e.geoTwoPointEquidistantUsa=Hf,e.geoVanDerGrinten=Ah,e.geoVanDerGrintenRaw=Th,e.geoVanDerGrinten2=_g,e.geoVanDerGrinten2Raw=Sp,e.geoVanDerGrinten3=Mx,e.geoVanDerGrinten3Raw=jv,e.geoVanDerGrinten4=jc,e.geoVanDerGrinten4Raw=$v,e.geoWagner=bg,e.geoWagner7=Yv,e.geoWagnerRaw=Wv,e.geoWagner4=kp,e.geoWagner4Raw=Ep,e.geoWagner6=Cp,e.geoWagner6Raw=td,e.geoWiechel=Xv,e.geoWiechelRaw=rd,e.geoWinkel3=gc,e.geoWinkel3Raw=Tg,Object.defineProperty(e,"__esModule",{value:!0})}))});var kVe=W((zjr,EVe)=>{"use strict";var nl=vi(),uQ=it(),$rr=yi(),R4=Math.PI/180,Tb=180/Math.PI,fQ={cursor:"pointer"},hQ={cursor:"auto"};function Wrr(e,t){var r=e.projection,i;return t._isScoped?i=Yrr:t._isClipped?i=Zrr:i=Xrr,i(e,r)}EVe.exports=Wrr;function dQ(e,t){return nl.behavior.zoom().translate(t.translate()).scaleExtent(t.scaleExtent()).scale(t.scale())}function pQ(e,t,r){var i=e.id,n=e.graphDiv,a=n.layout,o=a[i],s=n._fullLayout,l=s[i],u={},c={};function f(h,d){u[i+"."+h]=uQ.nestedProperty(o,h).get(),$rr.call("_storeDirectGUIEdit",a,s._preGUI,u);var p=uQ.nestedProperty(l,h);p.get()!==d&&(p.set(d),uQ.nestedProperty(o,h).set(d),c[i+"."+h]=d)}r(f),f("projection.scale",t.scale()/e.fitScale),f("fitbounds",!1),n.emit("plotly_relayout",c)}function Yrr(e,t){var r=dQ(e,t);function i(){nl.select(this).style(fQ)}function n(){t.scale(nl.event.scale).translate(nl.event.translate),e.render(!0);var s=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":s[0],"geo.center.lat":s[1]})}function a(s){var l=t.invert(e.midPt);s("center.lon",l[0]),s("center.lat",l[1])}function o(){nl.select(this).style(hQ),pQ(e,t,a)}return r.on("zoomstart",i).on("zoom",n).on("zoomend",o),r}function Xrr(e,t){var r=dQ(e,t),i=2,n,a,o,s,l,u,c,f,h;function d(b){return t.invert(b)}function p(b){var _=d(b);if(!_)return!0;var M=t(_);return Math.abs(M[0]-b[0])>i||Math.abs(M[1]-b[1])>i}function v(){nl.select(this).style(fQ);let{x:b,y:_,width:M,height:x}=this.getBBox();n=nl.event.sourceEvent?nl.mouse(this):[b+M/2,_+x/2],a=t.rotate(),o=t.translate(),s=a,l=d(n)}function m(){let{x:b,y:_,width:M,height:x}=this.getBBox();if(u=nl.event.sourceEvent?nl.mouse(this):[b+M/2,_+x/2],p(n)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(nl.event.scale),t.translate([o[0],nl.event.translate[1]]),l?d(u)&&(f=d(u),c=[s[0]+(f[0]-l[0]),a[1],a[2]],t.rotate(c),s=c):(n=u,l=d(n)),h=!0,e.render(!0);var T=t.rotate(),A=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":A[0],"geo.center.lat":A[1],"geo.projection.rotation.lon":-T[0]})}function g(){nl.select(this).style(hQ),h&&pQ(e,t,w)}function w(b){var _=t.rotate(),M=t.invert(e.midPt);b("projection.rotation.lon",-_[0]),b("center.lon",M[0]),b("center.lat",M[1])}return r.on("zoomstart",v).on("zoom",m).on("zoomend",g),r}function Zrr(e,t){var r={r:t.rotate(),k:t.scale()},i=dQ(e,t),n=nir(i,"zoomstart","zoom","zoomend"),a=0,o=i.on,s;i.on("zoomstart",function(){nl.select(this).style(fQ);let{x:h,y:d,width:p,height:v}=this.getBBox(),m=nl.event.sourceEvent?nl.mouse(this):[h+p/2,d+v/2],g=t.rotate(),w=g,b=t.translate(),_=Krr(g);s=JI(t,m),o.call(i,"zoom",function(){let{x:M,y:x,width:T,height:A}=this.getBBox(),y=nl.event.sourceEvent?nl.mouse(this):[M+T/2,x+A/2];if(t.scale(r.k=nl.event.scale),!s)m=y,s=JI(t,m);else if(JI(t,y)){t.rotate(g).translate(b);var E=JI(t,y),S=Qrr(s,E),C=tir(Jrr(_,S)),k=r.r=eir(C,s,w);(!isFinite(k[0])||!isFinite(k[1])||!isFinite(k[2]))&&(k=w),t.rotate(k),w=k}u(n.of(this,arguments))}),l(n.of(this,arguments))}).on("zoomend",function(){nl.select(this).style(hQ),o.call(i,"zoom",null),c(n.of(this,arguments)),pQ(e,t,f)}).on("zoom.redraw",function(){e.render(!0);var h=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-h[0],"geo.projection.rotation.lat":-h[1]})});function l(h){a++||h({type:"zoomstart"})}function u(h){h({type:"zoom"})}function c(h){--a||h({type:"zoomend"})}function f(h){var d=t.rotate();h("projection.rotation.lon",-d[0]),h("projection.rotation.lat",-d[1])}return nl.rebind(i,n,"on")}function JI(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&rir(r)}function Krr(e){var t=.5*e[0]*R4,r=.5*e[1]*R4,i=.5*e[2]*R4,n=Math.sin(t),a=Math.cos(t),o=Math.sin(r),s=Math.cos(r),l=Math.sin(i),u=Math.cos(i);return[a*s*u+n*o*l,n*s*u-a*o*l,a*o*u+n*s*l,a*s*l-n*o*u]}function Jrr(e,t){var r=e[0],i=e[1],n=e[2],a=e[3],o=t[0],s=t[1],l=t[2],u=t[3];return[r*o-i*s-n*l-a*u,r*s+i*o+n*u-a*l,r*l-i*u+n*o+a*s,r*u+i*l-n*s+a*o]}function Qrr(e,t){if(!(!e||!t)){var r=iir(e,t),i=Math.sqrt(SVe(r,r)),n=.5*Math.acos(Math.max(-1,Math.min(1,SVe(e,t)))),a=Math.sin(n)/i;return i&&[Math.cos(n),r[2]*a,-r[1]*a,r[0]*a]}}function eir(e,t,r){var i=cQ(t,2,e[0]);i=cQ(i,1,e[1]),i=cQ(i,0,e[2]-r[2]);var n=t[0],a=t[1],o=t[2],s=i[0],l=i[1],u=i[2],c=Math.atan2(a,n)*Tb,f=Math.sqrt(n*n+a*a),h,d;Math.abs(l)>f?(d=(l>0?90:-90)-c,h=0):(d=Math.asin(l/f)*Tb-c,h=Math.sqrt(f*f-l*l));var p=180-d-2*c,v=(Math.atan2(u,s)-Math.atan2(o,h))*Tb,m=(Math.atan2(u,s)-Math.atan2(o,-h))*Tb,g=AVe(r[0],r[1],d,v),w=AVe(r[0],r[1],p,m);return g<=w?[d,v,r[2]]:[p,m,r[2]]}function AVe(e,t,r,i){var n=MVe(r-e),a=MVe(i-t);return Math.sqrt(n*n+a*a)}function MVe(e){return(e%360+540)%360-180}function cQ(e,t,r){var i=r*R4,n=e.slice(),a=t===0?1:0,o=t===2?1:2,s=Math.cos(i),l=Math.sin(i);return n[a]=e[a]*s-e[o]*l,n[o]=e[o]*s+e[a]*l,n}function tir(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*Tb,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*Tb,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*Tb]}function rir(e){var t=e[0]*R4,r=e[1]*R4,i=Math.cos(r);return[i*Math.cos(t),i*Math.sin(t),Math.sin(r)]}function SVe(e,t){for(var r=0,i=0,n=e.length;i<n;++i)r+=e[i]*t[i];return r}function iir(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function nir(e){for(var t=0,r=arguments.length,i=[];++t<r;)i.push(arguments[t]);var n=nl.dispatch.apply(null,i);return n.of=function(a,o){return function(s){var l;try{l=s.sourceEvent=nl.event,s.target=e,nl.event=s,n[s.type].apply(a,o)}finally{nl.event=l}}},n}});var zVe=W((Bjr,RVe)=>{"use strict";var q1=vi(),mQ=HI(),air=mQ.geoPath,oir=mQ.geoDistance,sir=TVe(),lir=yi(),mE=it(),uir=mE.strTranslate,QI=ni(),gE=Ji(),CVe=Ds(),cir=Ko(),gQ=ji(),{concatExtremes:fir,getAutoRange:DVe,makePadFn:FVe}=Op(),vQ=bf(),hir=cu().prepSelect,dir=cu().clearOutline,pir=cu().selectOnClick,vir=kVe(),oh=fE(),yQ=cm(),{unwrapLonRange:gir}=yQ,PVe=II(),mir=GJ().feature;function IVe(e){this.id=e.id,this.graphDiv=e.graphDiv,this.container=e.container,this.topojsonURL=e.topojsonURL,this.isStatic=e.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var dv=IVe.prototype;RVe.exports=function(t){return new IVe(t)};dv.plot=function(e,t,r,i){var n=this;if(i)return n.update(e,t,!0);n._geoCalcData=e,n._fullLayout=t;var a=t[this.id],o=[],s=!1;for(var l in oh.layerNameToAdjective)if(l!=="frame"&&a["show"+l]){s=!0;break}for(var u=!1,c=0;c<e.length;c++){var f=e[0][0].trace;f._geo=n,f.locationmode&&(s=!0);var h=f.marker;if(h){var d=h.angle,p=h.angleref;(d||p==="north"||p==="previous")&&(u=!0)}}if(this._hasMarkerAngles=u,s){var v=PVe.getTopojsonName(a);(n.topojson===null||v!==n.topojsonName)&&(n.topojsonName=v,PlotlyGeoAssets.topojson[n.topojsonName]===void 0&&o.push(n.fetchTopojson()))}o=o.concat(yQ.fetchTraceGeoData(e)),r.push(new Promise(function(m,g){Promise.all(o).then(function(){n.topojson=PlotlyGeoAssets.topojson[n.topojsonName],n.update(e,t),m()}).catch(g)}))};dv.fetchTopojson=function(){var e=this,t=PVe.getTopojsonPath(e.topojsonURL,e.topojsonName);return new Promise(function(r,i){q1.json(t,function(n,a){if(n)return n.status===404?i(new Error(["plotly.js could not find topojson file at",t+".","Make sure the *topojsonURL* plot config option","is set properly."].join(" "))):i(new Error(["unexpected error while fetching topojson file at",t].join(" ")));PlotlyGeoAssets.topojson[e.topojsonName]=a,r()})})};dv.update=function(e,t,r){var i=t[this.id];this.hasChoropleth=!1;for(var n=0;n<e.length;n++){var a=e[n],o=a[0].trace;o.type==="choropleth"&&(this.hasChoropleth=!0),o.visible===!0&&o._length>0&&o._module.calcGeoJSON(a,t)}if(!r){var s=this.updateProjection(e,t);if(s)return;(!this.viewInitial||this.scope!==i.scope)&&this.saveViewInitial(i)}this.scope=i.scope,this.updateBaseLayers(t,i),this.updateDims(t,i),this.updateFx(t,i),cir.generalUpdatePerTraceModule(this.graphDiv,this,e,i);var l=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=l.selectAll(".point"),this.dataPoints.text=l.selectAll("text"),this.dataPaths.line=l.selectAll(".js-line");var u=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=u.selectAll("path"),this._render()};dv.updateProjection=function(e,t){var r=this.graphDiv,i=t[this.id],n=t._size,a=i.domain,o=i.projection,s=i.lonaxis,l=i.lataxis,u=s._ax,c=l._ax,f=this.projection=yir(i),h=[[n.l+n.w*a.x[0],n.t+n.h*(1-a.y[1])],[n.l+n.w*a.x[1],n.t+n.h*(1-a.y[0])]],d=i.center||{},p=o.rotation||{},v=s.range||[],m=l.range||[];if(i.fitbounds){u._length=h[1][0]-h[0][0],c._length=h[1][1]-h[0][1],u.range=DVe(r,u),c.range=DVe(r,c);let F=[];for(let j of e){let q=j[0].trace;q.visible===!0&&q._module.fitCoords&&F.push(q._module.fitCoords(j,i))}let P=fir(r,u),R=P.min.reduce((j,{val:q})=>Math.min(j,q),1/0),I=P.max.reduce((j,{val:q})=>Math.max(j,q),-1/0)-R,B=yQ.boundsOfCoords(F.flat()),[O,,$]=B||[],Y=$-O;if(!!B&&(I>360||I<360&&Y<I)){let j=FVe(t,u,0),q=FVe(t,u,1),J=P.min.reduce((G,Q)=>Math.max(G,j(Q)),0),U=P.max.reduce((G,Q)=>Math.max(G,q(Q)),0),V=u._length-J-U,X=V>u._length/10?Y*u._length/V:Y,H=(O+$)/2;u.range=[H-X/2,H+X/2]}var g=(u.range[0]+u.range[1])/2,w=(c.range[0]+c.range[1])/2;if(i._isScoped)d={lon:g,lat:w};else if(i._isClipped){d={lon:g,lat:w},p={lon:g,lat:w,roll:p.roll};var b=o.type,_=oh.lonaxisSpan[b]/2||180,M=oh.lataxisSpan[b]/2||90;v=[g-_,g+_],m=[w-M,w+M]}else d={lon:g,lat:w},p={lon:g,lat:p.lat,roll:p.roll}}f.center([d.lon-p.lon,d.lat-p.lat]).rotate([-p.lon,-p.lat,p.roll]).parallels(o.parallels);var x=LVe(v,m);f.fitExtent(h,x);var T=this.bounds=f.getBounds(x),A=this.fitScale=f.scale(),y=f.translate();if(f.scaleExtent=()=>{var R;let{minscale:F}=o,P=(R=o.maxscale)!=null?R:1/0;return[A*Math.min(F,P),A*Math.max(F,P)]},i.fitbounds){var E=f.getBounds(LVe(u.range,c.range)),S=Math.min((T[1][0]-T[0][0])/(E[1][0]-E[0][0]),(T[1][1]-T[0][1])/(E[1][1]-E[0][1]));isFinite(S)?f.scale(S*A):mE.warn("Something went wrong during"+this.id+"fitbounds computations.")}else f.scale(o.scale*A);var C=this.midPt=[(T[0][0]+T[1][0])/2,(T[0][1]+T[1][1])/2];if(f.translate([y[0]+(C[0]-y[0]),y[1]+(C[1]-y[1])]).clipExtent(T),i._isAlbersUsa){var k=f([d.lon,d.lat]);if(k){var D=f.translate();f.translate([D[0]-(k[0]-D[0]),D[1]-(k[1]-D[1])])}}};dv.updateBaseLayers=function(e,t){var r=this,i=r.topojson,n=r.layers,a=r.basePaths;function o(h){return h==="lonaxis"||h==="lataxis"}function s(h){return!!oh.lineLayers[h]}function l(h){return!!oh.fillLayers[h]}var u=this.hasChoropleth?oh.layersForChoropleth:oh.layers,c=u.filter(function(h){return s(h)||l(h)?t["show"+h]:o(h)?t[h].showgrid:!0}),f=r.framework.selectAll(".layer").data(c,String);f.exit().each(function(h){delete n[h],delete a[h],q1.select(this).remove()}),f.enter().append("g").attr("class",function(h){return"layer "+h}).each(function(h){var d=n[h]=q1.select(this);h==="bg"?r.bgRect=d.append("rect").style("pointer-events","all"):o(h)?a[h]=d.append("path").style("fill","none"):h==="backplot"?d.append("g").classed("choroplethlayer",!0):h==="frontplot"?d.append("g").classed("scatterlayer",!0):s(h)?a[h]=d.append("path").style("fill","none").style("stroke-miterlimit",2):l(h)&&(a[h]=d.append("path").style("stroke","none"))}),f.order(),f.each(function(h){var d=a[h],p=oh.layerNameToAdjective[h];h==="frame"?d.datum(oh.sphereSVG):s(h)||l(h)?d.datum(mir(i,i.objects[h])):o(h)&&d.datum(xir(h,t,e)).call(QI.stroke,t[h].gridcolor).call(gE.dashLine,t[h].griddash,t[h].gridwidth),s(h)?d.call(QI.stroke,t[p+"color"]).call(gE.dashLine,"",t[p+"width"]):l(h)&&d.call(QI.fill,t[p+"color"])})};dv.updateDims=function(e,t){var r=this.bounds,i=(t.framewidth||0)/2,n=r[0][0]-i,a=r[0][1]-i,o=r[1][0]-n+i,s=r[1][1]-a+i;gE.setRect(this.clipRect,n,a,o,s),this.bgRect.call(gE.setRect,n,a,o,s).call(QI.fill,t.bgcolor),this.xaxis._offset=n,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=s};dv.updateFx=function(e,t){var r=this,i=r.graphDiv,n=r.bgRect,a=e.dragmode,o=e.clickmode;if(r.isStatic)return;function s(){var f=r.viewInitial,h={};for(var d in f)h[r.id+"."+d]=f[d];lir.call("_guiRelayout",i,h),i.emit("plotly_doubleclick",null)}function l(f){return r.projection.invert([f[0]+r.xaxis._offset,f[1]+r.yaxis._offset])}var u=function(f,h){if(h.isRect){var d=f.range={};d[r.id]=[l([h.xmin,h.ymin]),l([h.xmax,h.ymax])]}else{var p=f.lassoPoints={};p[r.id]=h.map(l)}},c={element:r.bgRect.node(),gd:i,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:u},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(f){f===2&&dir(i)}};if(a==="pan"){n.node().onmousedown=null;let f=vir(r,t);if(n.call(f),!q1.event){let h=r.projection.scale(),[d,p]=r.projection.scaleExtent();(h<d||h>p)&&f.event(n)}n.on("dblclick.zoom",s),i._context._scrollZoom.geo||n.on("wheel.zoom",null)}else(a==="select"||a==="lasso")&&(n.on(".zoom",null),c.prepFn=function(f,h,d){hir(f,h,d,c,a)},vQ.init(c));n.on("mousemove",function(){var f=r.projection.invert(mE.getPositionFromD3Event());if(!f)return vQ.unhover(i,q1.event);r.xaxis.p2c=function(){return f[0]},r.yaxis.p2c=function(){return f[1]},CVe.hover(i,q1.event,r.id)}),n.on("mouseout",function(){i._dragging||vQ.unhover(i,q1.event)}),n.on("click",function(){a!=="select"&&a!=="lasso"&&(o.indexOf("select")>-1&&pir(q1.event,i,[r.xaxis],[r.yaxis],r.id,c),o.indexOf("event")>-1&&CVe.click(i,q1.event))})};dv.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,i="clip"+r._uid+e.id;e.clipDef=r._clips.append("clipPath").attr("id",i),e.clipRect=e.clipDef.append("rect"),e.framework=q1.select(e.container).append("g").attr("class","geo "+e.id).call(gE.setClipUrl,i,t),e.project=function(n){var a=e.projection(n);return a?[a[0]-e.xaxis._offset,a[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(n){return e.project(n)[0]}},e.yaxis={_id:"y",c2p:function(n){return e.project(n)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},gQ.setConvert(e.mockAxis,r)};dv.saveViewInitial=function(e){var t=e.center||{},r=e.projection,i=r.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":r.scale};var n;e._isScoped?n={"center.lon":t.lon,"center.lat":t.lat}:e._isClipped?n={"projection.rotation.lon":i.lon,"projection.rotation.lat":i.lat,"center.lon":t.lon,"center.lat":t.lat}:n={"center.lon":t.lon,"center.lat":t.lat,"projection.rotation.lon":i.lon},mE.extendFlat(this.viewInitial,n)};dv.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};dv._render=function(){var e=this.projection,t=e.getPath(),r;function i(a){var o=e(a.lonlat);return o?uir(o[0],o[1]):null}function n(a){return e.isLonLatOverEdges(a.lonlat)?"none":null}for(r in this.basePaths)this.basePaths[r].attr("d",t);for(r in this.dataPaths)this.dataPaths[r].attr("d",function(a){return t(a.geojson)});for(r in this.dataPoints)this.dataPoints[r].attr("display",n).attr("transform",i)};function yir(e){var t=e.projection,r=t.type,i=oh.projNames[r];i="geo"+mE.titleCase(i);for(var n=mQ[i]||sir[i],a=n(),o=e._isSatellite?Math.acos(1/t.distance)*180/Math.PI:e._isClipped?oh.lonaxisSpan[r]/2:null,s=["center","rotate","parallels","clipExtent"],l=function(f){return f?a:[]},u=0;u<s.length;u++){var c=s[u];typeof a[c]!="function"&&(a[c]=l)}return a.isLonLatOverEdges=function(f){if(a(f)===null)return!0;if(o){var h=a.rotate(),d=oir(f,[-h[0],-h[1]]),p=o*Math.PI/180;return d>p}else return!1},a.getPath=function(){return air().projection(a)},a.getBounds=function(f){return a.getPath().bounds(f)},a.precision(oh.precision),e._isSatellite&&a.tilt(t.tilt).distance(t.distance),o&&a.clipAngle(o-oh.clipPad),a}function xir(e,t,r){var i=1e-6,n=2.5,a=t[e],o=oh.scopeDefaults[t.scope],s,l,u;e==="lonaxis"?(s=o.lonaxisRange,l=o.lataxisRange,u=function(w,b){return[w,b]}):e==="lataxis"&&(s=o.lataxisRange,l=o.lonaxisRange,u=function(w,b){return[b,w]});var c={type:"linear",range:[s[0],s[1]-i],tick0:a.tick0,dtick:a.dtick};gQ.setConvert(c,r);var f=gQ.calcTicks(c);!t.isScoped&&e==="lonaxis"&&f.pop();for(var h=f.length,d=new Array(h),p=0;p<h;p++)for(var v=f[p].x,m=d[p]=[],g=l[0];g<l[1]+n;g+=n)m.push(u(v,g));return{type:"MultiLineString",coordinates:d}}function LVe(e,t){var r=oh.clipPad;let[i,n]=gir([e[0]+r,e[1]-r]);var a=t[0]+r,o=t[1]-r,s=(n-i)/4;return{type:"Polygon",coordinates:[[[i,a],[i,o],[i+s,o],[i+2*s,o],[i+3*s,o],[n,o],[n,a],[n-s,a],[n-2*s,a],[n-3*s,a],[i,a]]]}}});var xQ=W((qjr,OVe)=>{"use strict";var B4=Vl(),_ir=us().attributes,bir=Du().dash,z4=fE(),wir=ls().overrideAll,BVe=(qx(),Go(Bx)).default,qVe={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:B4.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:bir},Tir=OVe.exports=wir({domain:_ir({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:"locations",editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:BVe(z4.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:BVe(z4.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1},minscale:{valType:"number",min:0,dflt:0},maxscale:{valType:"number",min:0,dflt:null}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:B4.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:z4.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:z4.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:z4.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:z4.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:B4.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:B4.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:B4.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:B4.background},lonaxis:qVe,lataxis:qVe},"plot","from-root");Tir.uirevision={valType:"any",editType:"none"}});var VVe=W((Ojr,UVe)=>{"use strict";var eR=it(),Air=q_(),Mir=_c().getSubplotData,{unwrapLonRange:Sir}=cm(),yE=fE(),Eir=xQ(),NVe=yE.axesNames;UVe.exports=function(t,r,i){Air(t,r,i,{type:"geo",attributes:Eir,handleDefaults:kir,fullData:i,partition:"y"})};function kir(e,t,r,i){var n=Mir(i.fullData,"geo",i.id),a=n.map(function(B){return B.index}),o=r("resolution"),s=r("scope"),l=yE.scopeDefaults[s],u=r("projection.type",l.projType),c=t._isAlbersUsa=u==="albers usa";c&&(s=t.scope="usa");var f=t._isScoped=s!=="world",h=t._isSatellite=u==="satellite",d=t._isConic=u.indexOf("conic")!==-1||u==="albers",p=t._isClipped=!!yE.lonaxisSpan[u];if(e.visible===!1){var v=eR.extendDeep({},t._template);v.showcoastlines=!1,v.showcountries=!1,v.showframe=!1,v.showlakes=!1,v.showland=!1,v.showocean=!1,v.showrivers=!1,v.showsubunits=!1,v.lonaxis&&(v.lonaxis.showgrid=!1),v.lataxis&&(v.lataxis.showgrid=!1),t._template=v}for(var m=r("visible"),g,w=0;w<NVe.length;w++){var b=NVe[w],_=[30,10][w],M;if(f)M=l[b+"Range"];else{var x=yE[b+"Span"],T=(x[u]||x["*"])/2,A=r("projection.rotation."+b.slice(0,3),l.projRotate[w]);M=[A-T,A+T]}var y=r(b+".range",M);r(b+".tick0"),r(b+".dtick",_),g=r(b+".showgrid",m?void 0:!1),g&&(r(b+".gridcolor"),r(b+".gridwidth"),r(b+".griddash")),t[b]._ax={type:"linear",_id:b.slice(0,3),_traceIndices:a,setScale:eR.identity,c2l:eR.identity,r2l:eR.identity,autorange:!0,range:y.slice(),_m:1,_input:{}}}var E=t.lonaxis.range,S=t.lataxis.range;let[C,k]=Sir(E);var D=(C+k)/2,F;if(!c){var P=f?l.projRotate:[D,0,0];F=r("projection.rotation.lon",P[0]),r("projection.rotation.lat",P[1]),r("projection.rotation.roll",P[2]),g=r("showcoastlines",!f&&m),g&&(r("coastlinecolor"),r("coastlinewidth")),g=r("showocean",m?void 0:!1),g&&r("oceancolor")}var R,L;if(c?(R=-96.6,L=38.7):(R=f?D:F,L=(S[0]+S[1])/2),r("center.lon",R),r("center.lat",L),h&&(r("projection.tilt"),r("projection.distance")),d){var I=l.projParallels||[0,60];r("projection.parallels",I)}if(r("projection.scale"),r("projection.minscale"),r("projection.maxscale"),g=r("showland",m?void 0:!1),g&&r("landcolor"),g=r("showlakes",m?void 0:!1),g&&r("lakecolor"),g=r("showrivers",m?void 0:!1),g&&(r("rivercolor"),r("riverwidth")),g=r("showcountries",f&&s!=="usa"&&m),g&&(r("countrycolor"),r("countrywidth")),(s==="usa"||s==="north america"&&o===50)&&(r("showsubunits",m),r("subunitcolor"),r("subunitwidth")),f||(g=r("showframe",m),g&&(r("framecolor"),r("framewidth"))),r("bgcolor"),r("fitbounds"),t.fitbounds){let B=e.center||{},O=e.projection||{},$=O.rotation||{},Y=e.lonaxis||{},K=e.lataxis||{},j=[{dst:t.center,key:"lon",src:B},{dst:t.center,key:"lat",src:B},{dst:t.projection,key:"scale",src:O}];f||(p?j.push({dst:t.projection.rotation,key:"lon",src:$},{dst:t.projection.rotation,key:"lat",src:$},{dst:t.lonaxis,key:"range",src:Y},{dst:t.lataxis,key:"range",src:K}):j.push({dst:t.projection.rotation,key:"lon",src:$})),p||j.push({key:"range",src:Y},{key:"range",src:K}),j.some(({src:J,key:U})=>J[U]!=null)||yE.fitboundsIncompatible.has(u)?t.fitbounds=!1:j.forEach(({dst:J,key:U})=>J&&(J[U]=null))}}});var _Q=W((Njr,jVe)=>{"use strict";var Cir=_c().getSubplotCalcData,Dir=it().counterRegex,Fir=zVe(),O1="geo",GVe=Dir(O1),HVe={};HVe[O1]={valType:"subplotid",dflt:O1,editType:"calc"};function Lir(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots[O1],n=0;n<i.length;n++){var a=i[n],o=Cir(r,O1,a),s=t[a],l=s._subplot;l||(l=Fir({id:a,graphDiv:e,container:t._geolayer.node(),topojsonURL:e._context.topojsonURL,staticPlot:e._context.staticPlot}),t[a]._subplot=l),l.plot(o,t,e._promises)}}function Pir(e,t,r,i){for(var n=i._subplots[O1]||[],a=0;a<n.length;a++){var o=n[a],s=i[o]._subplot;!t[o]&&s&&(s.framework.remove(),s.clipDef.remove())}}function Iir(e){for(var t=e._fullLayout,r=t._subplots[O1],i=0;i<r.length;i++){var n=t[r[i]],a=n._subplot;a.updateFx(t,n)}}jVe.exports={attr:O1,name:O1,idRoot:O1,idRegex:GVe,attrRegex:GVe,attributes:HVe,layoutAttributes:xQ(),supplyLayoutDefaults:VVe(),plot:Lir,updateFx:Iir,clean:Pir}});var WVe=W((Ujr,$Ve)=>{"use strict";$Ve.exports={attributes:I4(),supplyDefaults:xUe(),colorbar:Ac(),formatLabels:wUe(),calc:VJ(),calcGeoJSON:XI().calcGeoJSON,fitCoords:XI().fitCoords,plot:XI().plot,style:aQ(),styleOnSelect:th().styleOnSelect,hoverPoints:pVe(),eventData:gVe(),selectPoints:xVe(),moduleType:"trace",name:"scattergeo",basePlotModule:_Q(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var XVe=W((Vjr,YVe)=>{"use strict";YVe.exports=WVe()});var xE=W((Gjr,JVe)=>{"use strict";var{hovertemplateAttrs:Rir,templatefallbackAttrs:zir}=Ga(),k2=I4(),Bir=Eo(),ZVe=Wa(),qir=Vl().defaultLine,E2=tn().extendFlat,KVe=k2.marker.line;JVe.exports=E2({locations:{valType:"data_array",editType:"calc"},locationmode:k2.locationmode,z:{valType:"data_array",editType:"calc"},geojson:E2({},k2.geojson,{}),featureidkey:k2.featureidkey,text:E2({},k2.text,{}),hovertext:E2({},k2.hovertext,{}),marker:{line:{color:E2({},KVe.color,{dflt:qir}),width:E2({},KVe.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:k2.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:k2.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:E2({},ZVe.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:Rir(),hovertemplatefallback:zir(),showlegend:E2({},ZVe.showlegend,{dflt:!1})},Bir("",{cLetter:"z",editTypeOverride:"calc"}))});var eGe=W((Hjr,QVe)=>{"use strict";var tR=it(),Oir=Fu(),Nir=xE();QVe.exports=function(t,r,i,n){function a(h,d){return tR.coerce(t,r,Nir,h,d)}var o=a("locations"),s=a("z");if(!(o&&o.length&&tR.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(o.length,s.length);var l=a("geojson"),u;(typeof l=="string"&&l!==""||tR.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="geojson-id"&&a("featureidkey"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f=a("marker.line.width");f&&a("marker.line.color"),a("marker.opacity"),Oir(t,r,n,a,{prefix:"",cLetter:"z"}),tR.coerceSelectionMarkerOpacity(r,a)}});var bQ=W((jjr,iGe)=>{"use strict";var tGe=sn(),Uir=Kn().BADNUM,Vir=Zc(),Gir=x1(),Hir=w0();function rGe(e){return e&&typeof e=="string"}iGe.exports=function(t,r){var i=r._length,n=new Array(i),a;r.geojson?a=function(c){return rGe(c)||tGe(c)}:a=rGe;for(var o=0;o<i;o++){var s=n[o]={},l=r.locations[o],u=r.z[o];a(l)&&tGe(u)?(s.loc=l,s.z=u):(s.loc=null,s.z=Uir),s.index=o}return Gir(n,r),Vir(t,r,{vals:r.z,containerStr:"",cLetter:"z"}),Hir(n,r),n}});var rR=W(($jr,aGe)=>{"use strict";var jir=vi(),$ir=ni(),wQ=Ji(),Wir=Jo();function Yir(e,t){t&&nGe(e,t)}function nGe(e,t){var r=t[0].trace,i=t[0].node3,n=i.selectAll(".choroplethlocation"),a=r.marker||{},o=a.line||{},s=Wir.makeColorScaleFuncFromTrace(r);n.each(function(l){jir.select(this).attr("fill",s(l.z)).call($ir.stroke,l.mlc||o.color).call(wQ.dashLine,"",l.mlw||o.width||0).style("opacity",a.opacity)}),wQ.selectedPointStyle(n,r)}function Xir(e,t){var r=t[0].node3,i=t[0].trace;i.selectedpoints?wQ.selectedPointStyle(r.selectAll(".choroplethlocation"),i):nGe(e,t)}aGe.exports={style:Yir,styleOnSelect:Xir}});var iR=W((Wjr,lGe)=>{"use strict";var Zir=vi(),oGe=it(),Ab=cm(),Kir=II().getTopojsonFeatures,sGe=Op().findExtremes,Jir=rR().style;function Qir(e,t,r){var i=t.layers.backplot.select(".choroplethlayer");oGe.makeTraceGroups(i,r,"trace choropleth").each(function(n){var a=Zir.select(this),o=a.selectAll("path.choroplethlocation").data(oGe.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),Jir(e,n)})}function enr(e,t){var r=e[0].trace,i=t[r.geo],n=i._subplot,a=r.locationmode,o=r._length,s=a==="geojson-id"?Ab.extractTraceFeature(e):Kir(r,n.topojson);let l=Ab.fitGeojsonBbox(r,i);for(var u=[],c=[],f=0;f<o;f++){var h=e[f],d=a==="geojson-id"?h.fOut:Ab.locationToFeature(a,h.loc,s);if(d){if(h.geojson=d,h.ct=d.properties.ct,h._polygons=Ab.feature2polygons(d),!l){let v=Ab.computeBbox(d);if(v){let[m,g,w,b]=v;u.push(m,w),c.push(g,b)}}}else h.geojson=null}if(l){let[v,m,g,w]=l;u=[v,g],c=[m,w]}var p={padded:!0};r._extremes.lon=sGe(i.lonaxis._ax,u,p),r._extremes.lat=sGe(i.lataxis._ax,c,p)}function tnr(e,t){let r=Ab.fitGeojsonCoords(e[0].trace,t);if(r.length)return r;let i=[];for(let n of e)n.geojson&&i.push(Ab.coordsOf(n.geojson));return i.flat()}lGe.exports={calcGeoJSON:enr,fitCoords:tnr,plot:Qir}});var TQ=W((Yjr,uGe)=>{"use strict";var rnr=ji(),inr=xE(),nnr=it().fillText,{ANTIMERIDIAN_LON_SHIFT:anr}=cm();uGe.exports=function(t,r,i){var n=t.cd,a=n[0].trace,o=t.subplot,s,l,u,c,f=[r,i];let h=[r+anr,i];for(l=0;l<n.length;l++)if(s=n[l],c=!1,s._polygons){for(u=0;u<s._polygons.length;u++)s._polygons[u].contains(f)&&(c=!c),s._polygons[u].contains(h)&&(c=!c);if(c)break}if(!(!c||!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=rnr.tickText(o.mockAxis,o.mockAxis.c2l(s.z),"hover").text,t.hovertemplate=s.hovertemplate,onr(t,a,s),[t]};function onr(e,t,r){if(!t.hovertemplate){var i=r.hi||t.hoverinfo,n=String(r.loc),a=i==="all"?inr.hoverinfo.flags:i.split("+"),o=a.indexOf("name")!==-1,s=a.indexOf("location")!==-1,l=a.indexOf("z")!==-1,u=a.indexOf("text")!==-1,c=!o&&s,f=[];c?e.nameOverride=n:(o&&(e.nameOverride=t.name),s&&f.push(n)),l&&f.push(e.zLabel),u&&nnr(r,t,f),e.extraText=f.join("<br>")}}});var AQ=W((Xjr,cGe)=>{"use strict";cGe.exports=function(t,r,i,n,a){t.location=r.location,t.z=r.z;var o=n[a];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t.ct=o.ct,t}});var MQ=W((Zjr,fGe)=>{"use strict";fGe.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=[],s,l,u,c,f;if(r===!1)for(s=0;s<i.length;s++)i[s].selected=0;else for(s=0;s<i.length;s++)l=i[s],u=l.ct,u&&(c=n.c2p(u),f=a.c2p(u),r.contains([c,f],null,s,t)?(o.push({pointNumber:s,lon:u[0],lat:u[1]}),l.selected=1):l.selected=0);return o}});var dGe=W((Kjr,hGe)=>{"use strict";hGe.exports={attributes:xE(),supplyDefaults:eGe(),colorbar:x5(),calc:bQ(),calcGeoJSON:iR().calcGeoJSON,fitCoords:iR().fitCoords,plot:iR().plot,style:rR().style,styleOnSelect:rR().styleOnSelect,hoverPoints:TQ(),eventData:AQ(),selectPoints:MQ(),moduleType:"trace",name:"choropleth",basePlotModule:_Q(),categories:["geo","noOpacity","showLegend"],meta:{}}});var vGe=W((Jjr,pGe)=>{"use strict";pGe.exports=dGe()});var nR=W((Qjr,mGe)=>{"use strict";var snr=yi(),L0=it(),lnr=Xw(),unr=Ji();function cnr(e,t,r,i){var n=e.cd,a=n[0].t,o=n[0].trace,s=e.xa,l=e.ya,u=a.x,c=a.y,f=s.c2p(t),h=l.c2p(r),d=e.distance,p;if(a.tree){var v=s.p2c(f-d),m=s.p2c(f+d),g=l.p2c(h-d),w=l.p2c(h+d);i==="x"?p=a.tree.range(Math.min(v,m),Math.min(l._rl[0],l._rl[1]),Math.max(v,m),Math.max(l._rl[0],l._rl[1])):p=a.tree.range(Math.min(v,m),Math.min(g,w),Math.max(v,m),Math.max(g,w))}else p=a.ids;var b,_,M,x,T,A,y,E,S,C=d;if(i==="x"){var k=!!o.xperiodalignment,D=!!o.yperiodalignment;for(T=0;T<p.length;T++){if(b=p[T],M=u[b],A=Math.abs(s.c2p(M)-f),k){var F=s.c2p(o._xStarts[b]),P=s.c2p(o._xEnds[b]);A=f>=Math.min(F,P)&&f<=Math.max(F,P)?0:1/0}if(A<C){if(C=A,x=c[b],y=l.c2p(x)-h,D){var R=l.c2p(o._yStarts[b]),L=l.c2p(o._yEnds[b]);y=h>=Math.min(R,L)&&h<=Math.max(R,L)?0:1/0}S=Math.sqrt(A*A+y*y),_=p[T]}}}else for(T=p.length-1;T>-1;T--)b=p[T],M=u[b],x=c[b],A=s.c2p(M)-f,y=l.c2p(x)-h,E=Math.sqrt(A*A+y*y),E<C&&(C=S=E,_=b);return e.index=_,e.distance=C,e.dxy=S,_===void 0?[e]:[gGe(e,u,c,o)]}function gGe(e,t,r,i){var n=e.xa,a=e.ya,o=e.distance,s=e.dxy,l=e.index,u={pointNumber:l,x:t[l],y:r[l]};u.tx=L0.isArrayOrTypedArray(i.text)?i.text[l]:i.text,u.htx=Array.isArray(i.hovertext)?i.hovertext[l]:i.hovertext,u.data=Array.isArray(i.customdata)?i.customdata[l]:i.customdata,u.tp=Array.isArray(i.textposition)?i.textposition[l]:i.textposition;var c=i.textfont;c&&(u.ts=L0.isArrayOrTypedArray(c.size)?c.size[l]:c.size,u.tc=L0.isArrayOrTypedArray(c.color)?c.color[l]:c.color,u.tf=Array.isArray(c.family)?c.family[l]:c.family,u.tw=Array.isArray(c.weight)?c.weight[l]:c.weight,u.ty=Array.isArray(c.style)?c.style[l]:c.style,u.tv=Array.isArray(c.variant)?c.variant[l]:c.variant);var f=i.marker;f&&(u.ms=L0.isArrayOrTypedArray(f.size)?f.size[l]:f.size,u.mo=L0.isArrayOrTypedArray(f.opacity)?f.opacity[l]:f.opacity,u.mx=L0.isArrayOrTypedArray(f.symbol)?f.symbol[l]:f.symbol,u.ma=L0.isArrayOrTypedArray(f.angle)?f.angle[l]:f.angle,u.mc=L0.isArrayOrTypedArray(f.color)?f.color[l]:f.color,u.mcc=unr.tryColorscale(f,"")(u.mc));var h=f&&f.line;h&&(u.mlc=Array.isArray(h.color)?h.color[l]:h.color,u.mlw=L0.isArrayOrTypedArray(h.width)?h.width[l]:h.width);var d=f&&f.gradient;d&&d.type!=="none"&&(u.mgt=Array.isArray(d.type)?d.type[l]:d.type,u.mgc=Array.isArray(d.color)?d.color[l]:d.color);var p=n.c2p(u.x,!0),v=a.c2p(u.y,!0),m=u.mrc||1,g=i.hoverlabel;g&&(u.hbg=Array.isArray(g.bgcolor)?g.bgcolor[l]:g.bgcolor,u.hbc=Array.isArray(g.bordercolor)?g.bordercolor[l]:g.bordercolor,u.hts=L0.isArrayOrTypedArray(g.font.size)?g.font.size[l]:g.font.size,u.htc=Array.isArray(g.font.color)?g.font.color[l]:g.font.color,u.htf=Array.isArray(g.font.family)?g.font.family[l]:g.font.family,u.hnl=L0.isArrayOrTypedArray(g.namelength)?g.namelength[l]:g.namelength);var w=i.hoverinfo;w&&(u.hi=Array.isArray(w)?w[l]:w);var b=i.hovertemplate;b&&(u.ht=Array.isArray(b)?b[l]:b);var _={};_[e.index]=u;var M=i._origX,x=i._origY,T=L0.extendFlat({},e,{color:lnr(i,u),x0:p-m,x1:p+m,xLabelVal:M?M[l]:u.x,y0:v-m,y1:v+m,yLabelVal:x?x[l]:u.y,cd:_,distance:o,spikeDistance:s,hovertemplate:u.ht});return u.htx?T.text=u.htx:u.tx?T.text=u.tx:i.text&&(T.text=i.text),L0.fillText(u,i,T),snr.getComponentMethod("errorbars","hoverInfo")(u,i,T),T}mGe.exports={hoverPoints:cnr,calcHover:gGe}});var C2=W((e$r,xGe)=>{"use strict";var yGe=20;xGe.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:yGe,SYMBOL_STROKE:yGe/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}});var _E=W((t$r,TGe)=>{"use strict";var fnr=Wa(),hnr=Ho(),dnr=g1(),Ls=Ns(),_Ge=_s().axisHoverFormat,bGe=Eo(),pnr=(qx(),Go(Bx)).default,SQ=tn().extendFlat,vnr=ls().overrideAll,gnr=C2().DASHES,wGe=Ls.line,fm=Ls.marker,mnr=fm.line,D2=TGe.exports=vnr({x:Ls.x,x0:Ls.x0,dx:Ls.dx,y:Ls.y,y0:Ls.y0,dy:Ls.dy,xperiod:Ls.xperiod,yperiod:Ls.yperiod,xperiod0:Ls.xperiod0,yperiod0:Ls.yperiod0,xperiodalignment:Ls.xperiodalignment,yperiodalignment:Ls.yperiodalignment,xhoverformat:_Ge("x"),yhoverformat:_Ge("y"),text:Ls.text,hovertext:Ls.hovertext,textposition:Ls.textposition,textfont:hnr({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:wGe.color,width:wGe.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:pnr(gnr),dflt:"solid"}},marker:SQ({},bGe("marker"),{symbol:fm.symbol,angle:fm.angle,size:fm.size,sizeref:fm.sizeref,sizemin:fm.sizemin,sizemode:fm.sizemode,opacity:fm.opacity,colorbar:fm.colorbar,line:SQ({},bGe("marker.line"),{width:mnr.width})}),connectgaps:Ls.connectgaps,fill:SQ({},Ls.fill,{dflt:"none"}),fillcolor:dnr(),selected:{marker:Ls.selected.marker,textfont:Ls.selected.textfont},unselected:{marker:Ls.unselected.marker,textfont:Ls.unselected.textfont},opacity:fnr.opacity},"calc","nested");D2.x.editType=D2.y.editType=D2.x0.editType=D2.y0.editType="calc+clearAxisTypes";D2.hovertemplate=Ls.hovertemplate;D2.hovertemplatefallback=Ls.hovertemplatefallback;D2.texttemplate=Ls.texttemplate;D2.texttemplatefallback=Ls.texttemplatefallback});var aR=W(EQ=>{"use strict";var AGe=C2();EQ.isOpenSymbol=function(e){return typeof e=="string"?AGe.OPEN_RE.test(e):e%200>100};EQ.isDotSymbol=function(e){return typeof e=="string"?AGe.DOT_RE.test(e):e>200}});var EGe=W((i$r,SGe)=>{"use strict";var MGe=it(),ynr=yi(),xnr=aR(),_nr=_E(),bnr=v1(),oR=$o(),wnr=x_(),Tnr=Hp(),Anr=bd(),Mnr=jp(),Snr=y1(),Enr=$p();SGe.exports=function(t,r,i,n){function a(d,p){return MGe.coerce(t,r,_nr,d,p)}var o=t.marker?xnr.isOpenSymbol(t.marker.symbol):!1,s=oR.isBubble(t),l=wnr(t,r,n,a);if(!l){r.visible=!1;return}Tnr(t,r,n,a),a("xhoverformat"),a("yhoverformat");var u=l<bnr.PTS_LINESONLY?"lines+markers":"lines";a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode",u),oR.hasMarkers(r)&&(Anr(t,r,i,n,a,{noAngleRef:!0,noLineDash:!0,noStandOff:!0}),a("marker.line.width",o||s?1:0)),oR.hasLines(r)&&(a("connectgaps"),Mnr(t,r,i,n,a),a("line.shape")),oR.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),Enr(t,r,n,a,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var c=(r.line||{}).color,f=(r.marker||{}).color;a("fill"),r.fill!=="none"&&Snr(t,r,i,a);var h=ynr.getComponentMethod("errorbars","supplyDefaults");h(t,r,c||f||i,{axis:"y"}),h(t,r,c||f||i,{axis:"x",inherit:"y"}),MGe.coerceSelectionMarkerOpacity(r,a)}});var CGe=W((n$r,kGe)=>{"use strict";var knr=mF();kGe.exports=function(t,r,i){var n=t.i;return"x"in t||(t.x=r._x[n]),"y"in t||(t.y=r._y[n]),knr(t,r,i)}});var FGe=W((a$r,DGe)=>{"use strict";function Cnr(e,t,r,i,n){for(var a=n+1;i<=n;){var o=i+n>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>=0?(a=o,n=o-1):i=o+1}return a}function Dnr(e,t,r,i,n){for(var a=n+1;i<=n;){var o=i+n>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>0?(a=o,n=o-1):i=o+1}return a}function Fnr(e,t,r,i,n){for(var a=i-1;i<=n;){var o=i+n>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<0?(a=o,i=o+1):n=o-1}return a}function Lnr(e,t,r,i,n){for(var a=i-1;i<=n;){var o=i+n>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<=0?(a=o,i=o+1):n=o-1}return a}function Pnr(e,t,r,i,n){for(;i<=n;){var a=i+n>>>1,o=e[a],s=r!==void 0?r(o,t):o-t;if(s===0)return a;s<=0?i=a+1:n=a-1}return-1}function bE(e,t,r,i,n,a){return typeof r=="function"?a(e,t,r,i===void 0?0:i|0,n===void 0?e.length-1:n|0):a(e,t,void 0,r===void 0?0:r|0,i===void 0?e.length-1:i|0)}DGe.exports={ge:function(e,t,r,i,n){return bE(e,t,r,i,n,Cnr)},gt:function(e,t,r,i,n){return bE(e,t,r,i,n,Dnr)},lt:function(e,t,r,i,n){return bE(e,t,r,i,n,Fnr)},le:function(e,t,r,i,n){return bE(e,t,r,i,n,Lnr)},eq:function(e,t,r,i,n){return bE(e,t,r,i,n,Pnr)}}});var kQ=W((o$r,LGe)=>{LGe.exports=Inr;function Inr(e,t,r){return t<r?e<t?t:e>r?r:e:e<r?r:e>t?t:e}});var N1=W((s$r,IGe)=>{"use strict";IGe.exports=function(t,r,i){var n={},a,o;if(typeof r=="string"&&(r=PGe(r)),Array.isArray(r)){var s={};for(o=0;o<r.length;o++)s[r[o]]=!0;r=s}for(a in r)r[a]=PGe(r[a]);var l={};for(a in r){var u=r[a];if(Array.isArray(u))for(o=0;o<u.length;o++){var c=u[o];if(i&&(l[c]=!0),c in t){if(n[a]=t[c],i)for(var f=o;f<u.length;f++)l[u[f]]=!0;break}}else a in t&&(r[a]&&(n[a]=t[a]),i&&(l[a]=!0))}if(i)for(a in t)l[a]||(n[a]=t[a]);return n};var CQ={};function PGe(e){return CQ[e]?CQ[e]:(typeof e=="string"&&(e=CQ[e]=e.split(/\s*,\s*|\s+/)),e)}});var q4=W((l$r,RGe)=>{"use strict";var Rnr=N1();RGe.exports=znr;function znr(e){var t;return arguments.length>1&&(e=arguments),typeof e=="string"?e=e.split(/\s/).map(parseFloat):typeof e=="number"&&(e=[e]),e.length&&typeof e[0]=="number"?e.length===1?t={width:e[0],height:e[0],x:0,y:0}:e.length===2?t={width:e[0],height:e[1],x:0,y:0}:t={x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(e=Rnr(e,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),t={x:e.left||0,y:e.top||0},e.width==null?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,e.height==null?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}});var Mb=W((u$r,zGe)=>{"use strict";zGe.exports=Bnr;function Bnr(e,t){if(!e||e.length==null)throw Error("Argument should be an array");t==null?t=1:t=Math.floor(t);for(var r=Array(t*2),i=0;i<t;i++){for(var n=-1/0,a=1/0,o=i,s=e.length;o<s;o+=t)e[o]>n&&(n=e[o]),e[o]<a&&(a=e[o]);r[i]=a,r[t+i]=n}return r}});var qGe=W((c$r,BGe)=>{"use strict";BGe.exports=function(){for(var t=0;t<arguments.length;t++)if(typeof arguments[t]!="undefined")return arguments[t]}});var sR=W((f$r,OGe)=>{OGe.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}});var Sb=W((h$r,UGe)=>{var NGe=sR();UGe.exports=qnr;function qnr(e,t,r){if(!e)throw new TypeError("must specify data as first parameter");if(r=+(r||0)|0,Array.isArray(e)&&e[0]&&typeof e[0][0]=="number"){var i=e[0].length,n=e.length*i,a,o,s,l;(!t||typeof t=="string")&&(t=new(NGe(t||"float32"))(n+r));var u=t.length-r;if(n!==u)throw new Error("source length "+n+" ("+i+"x"+e.length+") does not match destination length "+u);for(a=0,s=r;a<e.length;a++)for(o=0;o<i;o++)t[s++]=e[a][o]===null?NaN:e[a][o]}else if(!t||typeof t=="string"){var c=NGe(t||"float32");if(Array.isArray(e)||t==="array")for(t=new c(e.length+r),a=0,s=r,l=t.length;s<l;s++,a++)t[s]=e[a]===null?NaN:e[a];else r===0?t=new c(e):(t=new c(e.length+r),t.set(e,r))}else t.set(e,r);return t}});var GGe=W((d$r,VGe)=>{"use strict";VGe.exports=function(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}});var jGe=W((p$r,HGe)=>{"use strict";HGe.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var JGe=W((v$r,KGe)=>{"use strict";var $Ge=FGe(),WGe=kQ(),Onr=q4(),Nnr=Mb(),YGe=N1(),DQ=qGe(),Unr=Sb(),Vnr=GGe(),Gnr=sR(),XGe=jGe(),Hnr=1073741824;KGe.exports=function(t,r){r||(r={}),t=Unr(t,"float64"),r=YGe(r,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let i=DQ(r.maxDepth,255),n=DQ(r.bounds,Nnr(t,2));n[0]===n[2]&&n[2]++,n[1]===n[3]&&n[3]++;let a=ZGe(t,n),o=t.length>>>1,s;r.dtype||(r.dtype="array"),typeof r.dtype=="string"?s=new(Gnr(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let g=0;g<o;++g)s[g]=g;let l=[],u=[],c=[],f=[];d(0,0,1,s,0,1);let h=0;for(let g=0;g<l.length;g++){let w=l[g];if(s.set)s.set(w,h);else for(let _=0,M=w.length;_<M;_++)s[_+h]=w[_];let b=h+l[g].length;f[g]=[h,b],h=b}return s.range=p,s;function d(g,w,b,_,M,x){if(!_.length)return null;let T=l[M]||(l[M]=[]),A=c[M]||(c[M]=[]),y=u[M]||(u[M]=[]),E=T.length;if(M++,M>i||x>Hnr){for(let L=0;L<_.length;L++)T.push(_[L]),A.push(x),y.push(null,null,null,null);return E}if(T.push(_[0]),A.push(x),_.length<=1)return y.push(null,null,null,null),E;let S=b*.5,C=g+S,k=w+S,D=[],F=[],P=[],R=[];for(let L=1,I=_.length;L<I;L++){let B=_[L],O=a[B*2],$=a[B*2+1];O<C?$<k?D.push(B):F.push(B):$<k?P.push(B):R.push(B)}return x<<=2,y.push(d(g,w,S,D,M,x),d(g,k,S,F,M,x+1),d(C,w,S,P,M,x+2),d(C,k,S,R,M,x+3)),E}function p(...g){let w;if(Vnr(g[g.length-1])){let P=g.pop();!g.length&&(P.x!=null||P.l!=null||P.left!=null)&&(g=[P],w={}),w=YGe(P,{level:"level maxLevel",d:"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize",lod:"lod details ranges offsets"})}else w={};g.length||(g=n);let b=Onr(...g),[_,M,x,T]=[Math.min(b.x,b.x+b.width),Math.min(b.y,b.y+b.height),Math.max(b.x,b.x+b.width),Math.max(b.y,b.y+b.height)],[A,y,E,S]=ZGe([_,M,x,T],n),C=DQ(w.level,l.length);if(w.d!=null){let P;typeof w.d=="number"?P=[w.d,w.d]:w.d.length&&(P=w.d),C=Math.min(Math.max(Math.ceil(-XGe(Math.abs(P[0])/(n[2]-n[0]))),Math.ceil(-XGe(Math.abs(P[1])/(n[3]-n[1])))),C)}if(C=Math.min(C,l.length),w.lod)return v(A,y,E,S,C);let k=[];D(0,0,1,0,0,1);function D(P,R,L,I,B,O){if(B===null||O===null)return;let $=P+L,Y=R+L;if(A>$||y>Y||E<P||S<R||I>=C||B===O)return;let K=l[I];O===void 0&&(O=K.length);for(let Q=B;Q<O;Q++){let te=K[Q],ce=t[te*2],ge=t[te*2+1];ce>=_&&ce<=x&&ge>=M&&ge<=T&&k.push(te)}let j=u[I],q=j[B*4+0],J=j[B*4+1],U=j[B*4+2],V=j[B*4+3],X=F(j,B+1),H=L*.5,G=I+1;D(P,R,H,G,q,J||U||V||X),D(P,R+H,H,G,J,U||V||X),D(P+H,R,H,G,U,V||X),D(P+H,R+H,H,G,V,X)}function F(P,R){let L=null,I=0;for(;L===null;)if(L=P[R*4+I],I++,I>P.length)return null;return L}return k}function v(g,w,b,_,M){let x=[];for(let T=0;T<M;T++){let A=c[T],y=f[T][0],E=m(g,w,T),S=m(b,_,T),C=$Ge.ge(A,E),k=$Ge.gt(A,S,C,A.length-1);x[T]=[C+y,k+y]}return x}function m(g,w,b){let _=1,M=.5,x=.5,T=.5;for(let A=0;A<b;A++)_<<=2,_+=g<M?w<x?0:1:w<x?2:3,T*=.5,M+=g<M?-T:T,x+=w<x?-T:T;return _}};function ZGe(e,t){let[r,i,n,a]=t,o=1/(n-r),s=1/(a-i),l=new Array(e.length);for(let u=0,c=e.length/2;u<c;u++)l[2*u]=WGe((e[2*u]-r)*o,0,1),l[2*u+1]=WGe((e[2*u+1]-i)*s,0,1);return l}});var lR=W((g$r,QGe)=>{"use strict";QGe.exports=JGe()});var tHe=W((m$r,eHe)=>{eHe.exports=$nr;var FQ={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},jnr=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function $nr(e){var t=[];return e.replace(jnr,function(r,i,n){var a=i.toLowerCase();for(n=Ynr(n),a=="m"&&n.length>2&&(t.push([i].concat(n.splice(0,2))),a="l",i=i=="m"?"l":"L");;){if(n.length==FQ[a])return n.unshift(i),t.push(n);if(n.length<FQ[a])throw new Error("malformed path data");t.push([i].concat(n.splice(0,FQ[a])))}}),t}var Wnr=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function Ynr(e){var t=e.match(Wnr);return t?t.map(Number):[]}});var iHe=W((y$r,rHe)=>{rHe.exports=Xnr;function Xnr(e){var t=0,r=0,i=0,n=0;return e.map(function(a){a=a.slice();var o=a[0],s=o.toUpperCase();if(o!=s)switch(a[0]=s,o){case"a":a[6]+=i,a[7]+=n;break;case"v":a[1]+=n;break;case"h":a[1]+=i;break;default:for(var l=1;l<a.length;)a[l++]+=i,a[l++]+=n}switch(s){case"Z":i=t,n=r;break;case"H":i=a[1];break;case"V":n=a[1];break;case"M":i=t=a[1],n=r=a[2];break;default:i=a[a.length-2],n=a[a.length-1]}return a})}});var oHe=W((uR,aHe)=>{"use strict";Object.defineProperty(uR,"__esModule",{value:!0});var Znr=(function(){function e(t,r){var i=[],n=!0,a=!1,o=void 0;try{for(var s=t[Symbol.iterator](),l;!(n=(l=s.next()).done)&&(i.push(l.value),!(r&&i.length===r));n=!0);}catch(u){a=!0,o=u}finally{try{!n&&s.return&&s.return()}finally{if(a)throw o}}return i}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),wE=Math.PI*2,LQ=function(t,r,i,n,a,o,s){var l=t.x,u=t.y;l*=r,u*=i;var c=n*l-a*u,f=a*l+n*u;return{x:c+o,y:f+s}},Knr=function(t,r){var i=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),n=Math.cos(t),a=Math.sin(t),o=Math.cos(t+r),s=Math.sin(t+r);return[{x:n-a*i,y:a+n*i},{x:o+s*i,y:s-o*i},{x:o,y:s}]},nHe=function(t,r,i,n){var a=t*n-r*i<0?-1:1,o=t*i+r*n;return o>1&&(o=1),o<-1&&(o=-1),a*Math.acos(o)},Jnr=function(t,r,i,n,a,o,s,l,u,c,f,h){var d=Math.pow(a,2),p=Math.pow(o,2),v=Math.pow(f,2),m=Math.pow(h,2),g=d*p-d*m-p*v;g<0&&(g=0),g/=d*m+p*v,g=Math.sqrt(g)*(s===l?-1:1);var w=g*a/o*h,b=g*-o/a*f,_=c*w-u*b+(t+i)/2,M=u*w+c*b+(r+n)/2,x=(f-w)/a,T=(h-b)/o,A=(-f-w)/a,y=(-h-b)/o,E=nHe(1,0,x,T),S=nHe(x,T,A,y);return l===0&&S>0&&(S-=wE),l===1&&S<0&&(S+=wE),[_,M,E,S]},Qnr=function(t){var r=t.px,i=t.py,n=t.cx,a=t.cy,o=t.rx,s=t.ry,l=t.xAxisRotation,u=l===void 0?0:l,c=t.largeArcFlag,f=c===void 0?0:c,h=t.sweepFlag,d=h===void 0?0:h,p=[];if(o===0||s===0)return[];var v=Math.sin(u*wE/360),m=Math.cos(u*wE/360),g=m*(r-n)/2+v*(i-a)/2,w=-v*(r-n)/2+m*(i-a)/2;if(g===0&&w===0)return[];o=Math.abs(o),s=Math.abs(s);var b=Math.pow(g,2)/Math.pow(o,2)+Math.pow(w,2)/Math.pow(s,2);b>1&&(o*=Math.sqrt(b),s*=Math.sqrt(b));var _=Jnr(r,i,n,a,o,s,f,d,v,m,g,w),M=Znr(_,4),x=M[0],T=M[1],A=M[2],y=M[3],E=Math.abs(y)/(wE/4);Math.abs(1-E)<1e-7&&(E=1);var S=Math.max(Math.ceil(E),1);y/=S;for(var C=0;C<S;C++)p.push(Knr(A,y)),A+=y;return p.map(function(k){var D=LQ(k[0],o,s,m,v,x,T),F=D.x,P=D.y,R=LQ(k[1],o,s,m,v,x,T),L=R.x,I=R.y,B=LQ(k[2],o,s,m,v,x,T),O=B.x,$=B.y;return{x1:F,y1:P,x2:L,y2:I,x:O,y:$}})};uR.default=Qnr;aHe.exports=uR.default});var uHe=W((x$r,lHe)=>{"use strict";lHe.exports=tar;var ear=oHe();function tar(e){for(var t,r=[],i=0,n=0,a=0,o=0,s=null,l=null,u=0,c=0,f=0,h=e.length;f<h;f++){var d=e[f],p=d[0];switch(p){case"M":a=d[1],o=d[2];break;case"A":var v=ear({px:u,py:c,cx:d[6],cy:d[7],rx:d[1],ry:d[2],xAxisRotation:d[3],largeArcFlag:d[4],sweepFlag:d[5]});if(!v.length)continue;for(var m=0,g;m<v.length;m++)g=v[m],d=["C",g.x1,g.y1,g.x2,g.y2,g.x,g.y],m<v.length-1&&r.push(d);break;case"S":var w=u,b=c;(t=="C"||t=="S")&&(w+=w-i,b+=b-n),d=["C",w,b,d[1],d[2],d[3],d[4]];break;case"T":t=="Q"||t=="T"?(s=u*2-s,l=c*2-l):(s=u,l=c),d=sHe(u,c,s,l,d[1],d[2]);break;case"Q":s=d[1],l=d[2],d=sHe(u,c,d[1],d[2],d[3],d[4]);break;case"L":d=cR(u,c,d[1],d[2]);break;case"H":d=cR(u,c,d[1],c);break;case"V":d=cR(u,c,u,d[1]);break;case"Z":d=cR(u,c,a,o);break}t=p,u=d[d.length-2],c=d[d.length-1],d.length>4?(i=d[d.length-4],n=d[d.length-3]):(i=u,n=c),r.push(d)}return r}function cR(e,t,r,i){return["C",e,t,r,i,r,i]}function sHe(e,t,r,i,n,a){return["C",e/3+2/3*r,t/3+2/3*i,n/3+2/3*r,a/3+2/3*i,n,a]}});var PQ=W((_$r,cHe)=>{"use strict";cHe.exports=function(t){return typeof t!="string"?!1:(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}});var hHe=W((b$r,fHe)=>{"use strict";var rar=tHe(),iar=iHe(),nar=uHe(),aar=PQ();fHe.exports=oar;function oar(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"){if(!aar(e))throw Error("String is not an SVG path.");e=rar(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(e=iar(e),e=nar(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],r=0,i=e.length;r<i;r++)for(var n=e[r].slice(1),a=0;a<n.length;a+=2)n[a+0]<t[0]&&(t[0]=n[a+0]),n[a+1]<t[1]&&(t[1]=n[a+1]),n[a+0]>t[2]&&(t[2]=n[a+0]),n[a+1]>t[3]&&(t[3]=n[a+1]);return t}});var gHe=W((w$r,vHe)=>{"use strict";vHe.exports=sar;var TE=1e20;function sar(e,t){t||(t={});var r=t.cutoff==null?.25:t.cutoff,i=t.radius==null?8:t.radius,n=t.channel||0,a,o,s,l,u,c,f,h,d,p,v;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");a=t.width,o=t.height,l=e,t.stride?c=t.stride:c=Math.floor(e.length/a/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=e,f=h.getContext("2d"),a=h.width,o=h.height,d=f.getImageData(0,0,a,o),l=d.data,c=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(h=e.canvas,f=e,a=h.width,o=h.height,d=f.getImageData(0,0,a,o),l=d.data,c=4):window.ImageData&&e instanceof window.ImageData&&(d=e,a=e.width,o=e.height,l=d.data,c=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(a*o),p=0,v=Math.floor(u.length/c);p<v;p++)l[p]=u[p*c+n]/255;else if(c!==1)throw Error("Raw data can have only 1 value per pixel");var m=Array(a*o),g=Array(a*o),w=Array(s),b=Array(s),_=Array(s+1),M=Array(s);for(p=0,v=a*o;p<v;p++){var x=l[p];m[p]=x===1?0:x===0?TE:Math.pow(Math.max(0,.5-x),2),g[p]=x===1?TE:x===0?0:Math.pow(Math.max(0,x-.5),2)}dHe(m,a,o,w,b,M,_),dHe(g,a,o,w,b,M,_);var T=window.Float32Array?new Float32Array(a*o):new Array(a*o);for(p=0,v=a*o;p<v;p++)T[p]=Math.min(Math.max(1-((m[p]-g[p])/i+r),0),1);return T}function dHe(e,t,r,i,n,a,o){for(var s=0;s<t;s++){for(var l=0;l<r;l++)i[l]=e[l*t+s];for(pHe(i,n,a,o,r),l=0;l<r;l++)e[l*t+s]=n[l]}for(l=0;l<r;l++){for(s=0;s<t;s++)i[s]=e[l*t+s];for(pHe(i,n,a,o,t),s=0;s<t;s++)e[l*t+s]=Math.sqrt(n[s])}}function pHe(e,t,r,i,n){r[0]=0,i[0]=-TE,i[1]=+TE;for(var a=1,o=0;a<n;a++){for(var s=(e[a]+a*a-(e[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);s<=i[o];)o--,s=(e[a]+a*a-(e[r[o]]+r[o]*r[o]))/(2*a-2*r[o]);o++,r[o]=a,i[o]=s,i[o+1]=+TE}for(a=0,o=0;a<n;a++){for(;i[o+1]<a;)o++;t[a]=(a-r[o])*(a-r[o])+e[r[o]]}}});var bHe={};Fp(bHe,{default:()=>_He});function _He(e,t={}){if(!(0,yHe.default)(e))throw Error("Invalid SVG path");let r,i;t.shape||Array.isArray(t)?[r,i]=t.shape||t:(r=IQ.width=t.width||t.w||200,i=IQ.height=t.height||t.h||200);let n=Math.min(r,i),a=t.stroke||0,o=t.viewbox||t.viewBox||(0,mHe.default)(e),s=[r/(o[2]-o[0]),i/(o[3]-o[1])],l=Math.min(s[0]||0,s[1]||0)/2;pv.fillStyle="black",pv.fillRect(0,0,r,i),pv.fillStyle="white",a&&(typeof a!="number"&&(a=1),pv.strokeStyle=a>0?"white":"black",pv.lineWidth=Math.abs(a)),pv.translate(r*.5,i*.5),pv.scale(l,l);let u=new Path2D(e);return pv.fill(u),a&&pv.stroke(u),pv.setTransform(1,0,0,1,0,0),(0,xHe.default)(pv,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:n*.5})}var mHe,yHe,xHe,IQ,pv,wHe=Ea(()=>{mHe=nd(hHe()),yHe=nd(PQ()),xHe=nd(gHe()),IQ=document.createElement("canvas"),pv=IQ.getContext("2d",{willReadFrequently:!0})});var kb=W((T$r,PHe)=>{"use strict";var hR=sn(),lar=(wHe(),Go(bHe)).default,{normalize:fR}=ni(),uar=yi(),U4=it(),Rl=U4.isArrayOrTypedArray,O4=Ji(),THe=Cs(),AHe=sm().formatColor,N4=$o(),car=fA(),zQ=aR(),AE=C2(),far=kg().DESELECTDIM,MHe={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},har=Kf().appendArrayPointValue;function dar(e,t){var r,i={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},n=e._context.plotGlPixelRatio;if(t.visible!==!0)return i;if(N4.hasText(t)&&(i.text=LHe(e,t),i.textSel=EHe(e,t,t.selected),i.textUnsel=EHe(e,t,t.unselected)),N4.hasMarkers(t)&&(i.marker=qQ(e,t),i.markerSel=BQ(e,t,t.selected),i.markerUnsel=BQ(e,t,t.unselected),!t.unselected&&Rl(t.marker.opacity))){var a=t.marker.opacity;for(i.markerUnsel.opacity=new Array(a.length),r=0;r<a.length;r++)i.markerUnsel.opacity[r]=far*a[r]}if(N4.hasLines(t)){i.line={overlay:!0,thickness:t.line.width*n,color:t.line.color,opacity:t.opacity};var o=(AE.DASHES[t.line.dash]||[1]).slice();for(r=0;r<o.length;++r)o[r]*=t.line.width*n;i.line.dashes=o}return t.error_x&&t.error_x.visible&&(i.errorX=kHe(t,t.error_x,n)),t.error_y&&t.error_y.visible&&(i.errorY=kHe(t,t.error_y,n)),t.fill&&t.fill!=="none"&&(i.fill={closed:!0,fill:t.fillcolor,thickness:0}),i}function LHe(e,t){var r=e._fullLayout,i=t._length,n=t.textfont,a=t.textposition,o=Rl(a)?a:[a],s=n.color,l=n.size,u=n.family,c=n.weight,f=n.style,h=n.variant,d={},p,v=e._context.plotGlPixelRatio,m=t.texttemplate;if(m){d.text=[];var g=r._d3locale,w=Array.isArray(m),b=w?Math.min(m.length,i):i,_=w?function(E){return m[E]}:function(){return m};for(p=0;p<b;p++){var M={i:p},x=t._module.formatLabels(M,t,r),T={};har(T,t,p),d.text.push(U4.texttemplateString({data:[T,M,t._meta],fallback:t.texttemplatefallback,labels:x,locale:g,template:_(p)}))}}else Rl(t.text)&&t.text.length<i?d.text=t.text.slice():d.text=t.text;if(Rl(d.text))for(p=d.text.length;p<i;p++)d.text[p]="";for(d.opacity=t.opacity,d.font={},d.align=[],d.baseline=[],p=0;p<o.length;p++){var A=o[p].split(/\s+/);switch(A[1]){case"left":d.align.push("right");break;case"right":d.align.push("left");break;default:d.align.push(A[1])}switch(A[0]){case"top":d.baseline.push("bottom");break;case"bottom":d.baseline.push("top");break;default:d.baseline.push(A[0])}}if(Rl(s))for(d.color=new Array(i),p=0;p<i;p++)d.color[p]=s[p];else d.color=s;if(Rl(l)||Array.isArray(u)||Rl(c)||Array.isArray(f)||Array.isArray(h))for(d.font=new Array(i),p=0;p<i;p++){var y=d.font[p]={};y.size=(U4.isTypedArray(l)?l[p]:Rl(l)?hR(l[p])?l[p]:0:l)*v,y.family=Array.isArray(u)?u[p]:u,y.weight=SHe(Rl(c)?c[p]:c),y.style=Array.isArray(f)?f[p]:f,y.variant=Array.isArray(h)?h[p]:h}else d.font={size:l*v,family:u,weight:SHe(c),style:f,variant:h};return d}function SHe(e){return e<=1e3?e>500?"bold":"normal":e}function qQ(e,t){var r=t._length,i=t.marker,n={},a,o=Rl(i.symbol),s=Rl(i.angle),l=Rl(i.color),u=Rl(i.line.color),c=Rl(i.opacity),f=Rl(i.size),h=Rl(i.line.width),d;if(o||(d=zQ.isOpenSymbol(i.symbol)),o||l||u||c||s){n.symbols=new Array(r),n.angles=new Array(r),n.colors=new Array(r),n.borderColors=new Array(r);var p=i.symbol,v=i.angle,m=AHe(i,i.opacity,r),g=AHe(i.line,i.opacity,r);if(!Rl(g[0])){var w=g;for(g=Array(r),a=0;a<r;a++)g[a]=w}if(!Rl(m[0])){var b=m;for(m=Array(r),a=0;a<r;a++)m[a]=b}if(!Rl(p)){var _=p;for(p=Array(r),a=0;a<r;a++)p[a]=_}if(!Rl(v)){var M=v;for(v=Array(r),a=0;a<r;a++)v[a]=M}for(n.symbols=p,n.angles=v,n.colors=m,n.borderColors=g,a=0;a<r;a++)o&&(d=zQ.isOpenSymbol(i.symbol[a])),d&&(g[a]=m[a].slice(),m[a]=m[a].slice(),m[a][3]=0);for(n.opacity=t.opacity,n.markers=new Array(r),a=0;a<r;a++)n.markers[a]=FHe({mx:n.symbols[a],ma:n.angles[a]},t)}else d?(n.color=fR(i.color,"uint8"),n.color[3]=0,n.borderColor=fR(i.color,"uint8")):(n.color=fR(i.color,"uint8"),n.borderColor=fR(i.line.color,"uint8")),n.opacity=t.opacity*i.opacity,n.marker=FHe({mx:i.symbol,ma:i.angle},t);var x=1,T=car(t,x),A;if(f||h){var y=n.sizes=new Array(r),E=n.borderSizes=new Array(r),S=0,C;if(f){for(a=0;a<r;a++)y[a]=T(i.size[a]),S+=y[a];C=S/r}else for(A=T(i.size),a=0;a<r;a++)y[a]=A;if(h)for(a=0;a<r;a++)E[a]=i.line.width[a];else for(A=i.line.width,a=0;a<r;a++)E[a]=A;n.sizeAvg=C}else n.size=T(i&&i.size||10),n.borderSizes=T(i.line.width);return n}function BQ(e,t,r){var i=t.marker,n={};return r&&(r.marker&&r.marker.symbol?n=qQ(e,U4.extendFlat({},i,r.marker)):r.marker&&(r.marker.size&&(n.size=r.marker.size),r.marker.color&&(n.colors=r.marker.color),r.marker.opacity!==void 0&&(n.opacity=r.marker.opacity))),n}function EHe(e,t,r){var i={};if(!r)return i;if(r.textfont){var n={opacity:1,text:t.text,texttemplate:t.texttemplate,textposition:t.textposition,textfont:U4.extendFlat({},t.textfont)};r.textfont&&U4.extendFlat(n.textfont,r.textfont),i=LHe(e,n)}return i}function kHe(e,t,r){var i={capSize:t.width*2*r,lineWidth:t.thickness*r,color:t.color};return t.copy_ystyle&&(i=e.error_y),i}var CHe=AE.SYMBOL_SDF_SIZE,Eb=AE.SYMBOL_SIZE,DHe=AE.SYMBOL_STROKE,RQ={},par=O4.symbolFuncs[0](Eb*.05);function FHe(e,t){var r=e.mx;if(r==="circle")return null;var i,n,a=O4.symbolNumber(r),o=O4.symbolFuncs[a%100],s=!!O4.symbolNoDot[a%100],l=!!O4.symbolNoFill[a%100],u=zQ.isDotSymbol(r);if(e.ma&&(r+="_"+e.ma),RQ[r])return RQ[r];var c=O4.getMarkerAngle(e,t);return u&&!s?i=o(Eb*1.1,c)+par:i=o(Eb,c),n=lar(i,{w:CHe,h:CHe,viewBox:[-Eb,-Eb,Eb,Eb],stroke:l?DHe:-DHe}),RQ[r]=n,n||null}function gar(e,t,r){var i=r.length,n=i/2,a,o;if(N4.hasLines(t)&&n)if(t.line.shape==="hv"){for(a=[],o=0;o<n-1;o++)isNaN(r[o*2])||isNaN(r[o*2+1])?a.push(NaN,NaN,NaN,NaN):(a.push(r[o*2],r[o*2+1]),!isNaN(r[o*2+2])&&!isNaN(r[o*2+3])?a.push(r[o*2+2],r[o*2+1]):a.push(NaN,NaN));a.push(r[i-2],r[i-1])}else if(t.line.shape==="hvh"){for(a=[],o=0;o<n-1;o++)if(isNaN(r[o*2])||isNaN(r[o*2+1])||isNaN(r[o*2+2])||isNaN(r[o*2+3]))!isNaN(r[o*2])&&!isNaN(r[o*2+1])?a.push(r[o*2],r[o*2+1]):a.push(NaN,NaN),a.push(NaN,NaN);else{var s=(r[o*2]+r[o*2+2])/2;a.push(r[o*2],r[o*2+1],s,r[o*2+1],s,r[o*2+3])}a.push(r[i-2],r[i-1])}else if(t.line.shape==="vhv"){for(a=[],o=0;o<n-1;o++)if(isNaN(r[o*2])||isNaN(r[o*2+1])||isNaN(r[o*2+2])||isNaN(r[o*2+3]))!isNaN(r[o*2])&&!isNaN(r[o*2+1])?a.push(r[o*2],r[o*2+1]):a.push(NaN,NaN),a.push(NaN,NaN);else{var l=(r[o*2+1]+r[o*2+3])/2;a.push(r[o*2],r[o*2+1],r[o*2],l,r[o*2+2],l)}a.push(r[i-2],r[i-1])}else if(t.line.shape==="vh"){for(a=[],o=0;o<n-1;o++)isNaN(r[o*2])||isNaN(r[o*2+1])?a.push(NaN,NaN,NaN,NaN):(a.push(r[o*2],r[o*2+1]),!isNaN(r[o*2+2])&&!isNaN(r[o*2+3])?a.push(r[o*2],r[o*2+3]):a.push(NaN,NaN));a.push(r[i-2],r[i-1])}else a=r;var u=!1;for(o=0;o<a.length;o++)if(isNaN(a[o])){u=!0;break}var c=u||a.length>AE.TOO_MANY_POINTS||N4.hasMarkers(t)?"rect":"round";if(u&&t.connectgaps){var f=a[0],h=a[1];for(o=0;o<a.length;o+=2)isNaN(a[o])||isNaN(a[o+1])?(a[o]=f,a[o+1]=h):(f=a[o],h=a[o+1])}return{join:c,positions:a}}function mar(e,t,r,i,n){var a=uar.getComponentMethod("errorbars","makeComputeError"),o=THe.getFromId(e,t.xaxis,"x"),s=THe.getFromId(e,t.yaxis,"y"),l=r.length/2,u={};function c(f,h){var d=h._id.charAt(0),p=t["error_"+d];if(p&&p.visible&&(h.type==="linear"||h.type==="log")){for(var v=a(p),m={x:0,y:1}[d],g={x:[0,1,2,3],y:[2,3,0,1]}[d],w=new Float64Array(4*l),b=1/0,_=-1/0,M=0,x=0;M<l;M++,x+=4){var T=f[M];if(hR(T)){var A=r[M*2+m],y=v(T,M),E=y[0],S=y[1];if(hR(E)&&hR(S)){var C=T-E,k=T+S;w[x+g[0]]=A-h.c2l(C),w[x+g[1]]=h.c2l(k)-A,w[x+g[2]]=0,w[x+g[3]]=0,b=Math.min(b,T-E),_=Math.max(_,T+S)}}}u[d]={positions:r,errors:w,_bnds:[b,_]}}}return c(i,o),c(n,s),u}function yar(e,t,r,i){var n=t._length,a={},o;if(N4.hasMarkers(t)){var s=r.font,l=r.align,u=r.baseline;for(a.offset=new Array(n),o=0;o<n;o++){var c=i.sizes?i.sizes[o]:i.size,f=Rl(s)?s[o].size:s.size,h=Rl(l)?l.length>1?l[o]:l[0]:l,d=Rl(u)?u.length>1?u[o]:u[0]:u,p=MHe[h],v=MHe[d],m=c?c/.8+1:0,g=-v*m-v*.5;a.offset[o]=[p*m/f,g/f]}}return a}PHe.exports={style:dar,markerStyle:qQ,markerSelection:BQ,linePositions:gar,errorBarPositions:mar,textPosition:yar}});var OQ=W((A$r,IHe)=>{"use strict";var dR=it();IHe.exports=function(t,r){var i=r._scene,n={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},a={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return r._scene||(i=r._scene={},i.init=function(){dR.extendFlat(i,a,n)},i.init(),i.update=function(s){var l=dR.repeat(s,i.count);if(i.fill2d&&i.fill2d.update(l),i.scatter2d&&i.scatter2d.update(l),i.line2d&&i.line2d.update(l),i.error2d&&i.error2d.update(l.concat(l)),i.select2d&&i.select2d.update(l),i.glText)for(var u=0;u<i.count;u++)i.glText[u].update(s)},i.draw=function(){for(var s=i.count,l=i.fill2d,u=i.error2d,c=i.line2d,f=i.scatter2d,h=i.glText,d=i.select2d,p=i.selectBatch,v=i.unselectBatch,m=0;m<s;m++){if(l&&i.fillOrder[m]&&l.draw(i.fillOrder[m]),c&&i.lineOptions[m]&&c.draw(m),u&&(i.errorXOptions[m]&&u.draw(m),i.errorYOptions[m]&&u.draw(m+s)),f&&i.markerOptions[m])if(v[m].length){var g=dR.repeat([],i.count);g[m]=v[m],f.draw(g)}else p[m].length||f.draw(m);h[m]&&i.textOptions[m]&&h[m].render()}d&&d.draw(p),i.dirty=!1},i.destroy=function(){i.fill2d&&i.fill2d.destroy&&i.fill2d.destroy(),i.scatter2d&&i.scatter2d.destroy&&i.scatter2d.destroy(),i.error2d&&i.error2d.destroy&&i.error2d.destroy(),i.line2d&&i.line2d.destroy&&i.line2d.destroy(),i.select2d&&i.select2d.destroy&&i.select2d.destroy(),i.glText&&i.glText.forEach(function(s){s.destroy&&s.destroy()}),i.lineOptions=null,i.fillOptions=null,i.markerOptions=null,i.markerSelectedOptions=null,i.markerUnselectedOptions=null,i.errorXOptions=null,i.errorYOptions=null,i.textOptions=null,i.textSelectedOptions=null,i.textUnselectedOptions=null,i.selectBatch=null,i.unselectBatch=null,r._scene=null}),i.dirty||dR.extendFlat(i,n),i}});var NHe=W((M$r,OHe)=>{"use strict";var xar=lR(),V4=it(),RHe=Cs(),_ar=Op().findExtremes,zHe=Wp(),NQ=Td(),bar=NQ.calcMarkerSize,war=NQ.calcAxisExpansion,Tar=NQ.setFirstScatter,Aar=wd(),G4=kb(),Mar=OQ(),BHe=Kn().BADNUM,Sar=C2().TOO_MANY_POINTS;OHe.exports=function(t,r){var i=t._fullLayout,n=r._xA=RHe.getFromId(t,r.xaxis,"x"),a=r._yA=RHe.getFromId(t,r.yaxis,"y"),o=i._plots[r.xaxis+r.yaxis],s=r._length,l=s>=Sar,u=s*2,c={},f,h=n.makeCalcdata(r,"x"),d=a.makeCalcdata(r,"y"),p=zHe(r,n,"x",h),v=zHe(r,a,"y",d),m=p.vals,g=v.vals;r._x=m,r._y=g,r.xperiodalignment&&(r._origX=h,r._xStarts=p.starts,r._xEnds=p.ends),r.yperiodalignment&&(r._origY=d,r._yStarts=v.starts,r._yEnds=v.ends);var w=new Array(u),b=new Array(s);for(f=0;f<s;f++)w[f*2]=m[f]===BHe?NaN:m[f],w[f*2+1]=g[f]===BHe?NaN:g[f],b[f]=f;if(n.type==="log")for(f=0;f<u;f+=2)w[f]=n.c2l(w[f]);if(a.type==="log")for(f=1;f<u;f+=2)w[f]=a.c2l(w[f]);l&&n.type!=="log"&&a.type!=="log"?c.tree=xar(w):c.ids=b,Aar(t,r);var _=Ear(t,o,r,w,m,g),M=Mar(t,o);Tar(i,r);var x;return l?_.marker&&(x=_.marker.sizeAvg||Math.max(_.marker.size,3)):x=bar(r,s),war(t,r,n,a,m,g,x),_.errorX&&qHe(r,n,_.errorX),_.errorY&&qHe(r,a,_.errorY),_.fill&&!M.fill2d&&(M.fill2d=!0),_.marker&&!M.scatter2d&&(M.scatter2d=!0),_.line&&!M.line2d&&(M.line2d=!0),(_.errorX||_.errorY)&&!M.error2d&&(M.error2d=!0),_.text&&!M.glText&&(M.glText=!0),_.marker&&(_.marker.snap=s),M.lineOptions.push(_.line),M.errorXOptions.push(_.errorX),M.errorYOptions.push(_.errorY),M.fillOptions.push(_.fill),M.markerOptions.push(_.marker),M.markerSelectedOptions.push(_.markerSel),M.markerUnselectedOptions.push(_.markerUnsel),M.textOptions.push(_.text),M.textSelectedOptions.push(_.textSel),M.textUnselectedOptions.push(_.textUnsel),M.selectBatch.push([]),M.unselectBatch.push([]),c._scene=M,c.index=M.count,c.x=m,c.y=g,c.positions=w,M.count++,[{x:!1,y:!1,t:c,trace:r}]};function qHe(e,t,r){var i=e._extremes[t._id],n=_ar(t,r._bnds,{padded:!0});i.min=i.min.concat(n.min),i.max=i.max.concat(n.max)}function Ear(e,t,r,i,n,a){var o=G4.style(e,r);if(o.marker&&(o.marker.positions=i),o.line&&i.length>1&&V4.extendFlat(o.line,G4.linePositions(e,r,i)),o.errorX||o.errorY){var s=G4.errorBarPositions(e,r,i,n,a);o.errorX&&V4.extendFlat(o.errorX,s.x),o.errorY&&V4.extendFlat(o.errorY,s.y)}return o.text&&(V4.extendFlat(o.text,{positions:i},G4.textPosition(e,r,o.text,o.marker)),V4.extendFlat(o.textSel,{positions:i},G4.textPosition(e,r,o.text,o.markerSel)),V4.extendFlat(o.textUnsel,{positions:i},G4.textPosition(e,r,o.text,o.markerUnsel))),o}});var UQ=W((S$r,VHe)=>{"use strict";var UHe=it(),kar=ni(),Car=kg().DESELECTDIM;function Dar(e){var t=e[0],r=t.trace,i=t.t,n=i._scene,a=i.index,o=n.selectBatch[a],s=n.unselectBatch[a],l=n.textOptions[a],u=n.textSelectedOptions[a]||{},c=n.textUnselectedOptions[a]||{},f=UHe.extendFlat({},l),h,d;if(o.length||s.length){var p=u.color,v=c.color,m=l.color,g=UHe.isArrayOrTypedArray(m);for(f.color=new Array(r._length),h=0;h<o.length;h++)d=o[h],f.color[d]=p||(g?m[d]:m);for(h=0;h<s.length;h++){d=s[h];var w=g?m[d]:m;f.color[d]=v||(p?w:kar.addOpacity(w,Car))}}n.glText[a].update(f)}VHe.exports={styleTextSelection:Dar}});var VQ=W((E$r,HHe)=>{"use strict";var GHe=$o(),Far=UQ().styleTextSelection;HHe.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=[],s=i[0].trace,l=i[0].t,u=s._length,c=l.x,f=l.y,h=l._scene,d=l.index;if(!h)return o;var p=GHe.hasText(s),v=GHe.hasMarkers(s),m=!v&&!p;if(s.visible!==!0||m)return o;var g=[],w=[];if(r!==!1&&!r.degenerate)for(var b=0;b<u;b++)r.contains([l.xpx[b],l.ypx[b]],!1,b,t)?(g.push(b),o.push({pointNumber:b,x:n.c2d(c[b]),y:a.c2d(f[b])})):w.push(b);if(v){var _=h.scatter2d;if(!g.length&&!w.length){var M=new Array(h.count);M[d]=h.markerOptions[d],_.update.apply(_,M)}else if(!h.selectBatch[d].length&&!h.unselectBatch[d].length){var x=new Array(h.count);x[d]=h.markerUnselectedOptions[d],_.update.apply(_,x)}}return h.selectBatch[d]=g,h.unselectBatch[d]=w,p&&Far(i),o}});var $He=W((k$r,jHe)=>{"use strict";var Lar=nR();jHe.exports={moduleType:"trace",name:"scattergl",basePlotModule:dl(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:_E(),supplyDefaults:EGe(),crossTraceDefaults:Dj(),colorbar:Ac(),formatLabels:CGe(),calc:NHe(),hoverPoints:Lar.hoverPoints,selectPoints:VQ(),meta:{}}});var YHe=W((C$r,WHe)=>{"use strict";WHe.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var JHe=W((D$r,KHe)=>{"use strict";var XHe=YHe();KHe.exports=Par;var ZHe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Par(e){var t,r=[],i=1,n;if(typeof e=="string")if(e=e.toLowerCase(),XHe[e])r=XHe[e].slice(),n="rgb";else if(e==="transparent")i=0,n="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var a=e.slice(1),o=a.length,s=o<=4;i=1,s?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],o===4&&(i=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],o===8&&(i=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),n="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],u=l==="rgb",a=l.replace(/a$/,"");n=a;var o=a==="cmyk"?4:a==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(h,d){if(/%$/.test(h))return d===o?parseFloat(h)/100:a==="rgb"?parseFloat(h)*255/100:parseFloat(h);if(a[d]==="h"){if(/deg$/.test(h))return parseFloat(h);if(ZHe[h]!==void 0)return ZHe[h]}return parseFloat(h)}),l===a&&r.push(1),i=u||r[o]===void 0?1:r[o],r=r.slice(0,o)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),n=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],n="rgb",i=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(n="rgb",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(n="hsl",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),i=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(i/=100)):(n="rgb",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:n,values:r,alpha:i}}});var eje=W((F$r,QHe)=>{"use strict";var Iar=JHe();QHe.exports=function(t){Array.isArray(t)&&t.raw&&(t=String.raw.apply(null,arguments));var r,i,n,a=Iar(t);if(!a.space)return[];var o=[0,0,0],s=a.space[0]==="h"?[360,100,100]:[255,255,255];return r=Array(3),r[0]=Math.min(Math.max(a.values[0],o[0]),s[0]),r[1]=Math.min(Math.max(a.values[1],o[1]),s[1]),r[2]=Math.min(Math.max(a.values[2],o[2]),s[2]),a.space[0]==="h"&&(r=Rar(r)),r.push(Math.min(Math.max(a.alpha,0),1)),r};function Rar(e){var t=e[0]/360,r=e[1]/100,i=e[2]/100,n,a,o,s,l,u=0;if(r===0)return l=i*255,[l,l,l];for(a=i<.5?i*(1+r):i+r-i*r,n=2*i-a,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?n+(a-n)*6*o:2*o<1?a:3*o<2?n+(a-n)*(2/3-o)*6:n,s[u++]=l*255;return s}});var ME=W((L$r,tje)=>{"use strict";var zar=eje(),Bar=sR();tje.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var i=Bar(r),n=new i(4),a=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=zar(t),t[0]/=255,t[1]/=255,t[2]/=255),qar(t)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3]!=null?t[3]:255,a&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(a?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3]!=null?t[3]:1):(n[0]=Math.min(Math.max(Math.floor(t[0]*255),0),255),n[1]=Math.min(Math.max(Math.floor(t[1]*255),0),255),n[2]=Math.min(Math.max(Math.floor(t[2]*255),0),255),n[3]=t[3]==null?255:Math.min(Math.max(Math.floor(t[3]*255),0),255)),n)};function qar(e){return!!(e instanceof Uint8Array||e instanceof Uint8ClampedArray||Array.isArray(e)&&(e[0]>1||e[0]===0)&&(e[1]>1||e[1]===0)&&(e[2]>1||e[2]===0)&&(!e[3]||e[3]>1))}});var ije=W((P$r,vR)=>{"use strict";var pR=kQ();vR.exports=rje;vR.exports.to=rje;vR.exports.from=Oar;function rje(e,t){t==null&&(t=!0);var r=e[0],i=e[1],n=e[2],a=e[3];a==null&&(a=t?1:255),t&&(r*=255,i*=255,n*=255,a*=255),r=pR(r,0,255)&255,i=pR(i,0,255)&255,n=pR(n,0,255)&255,a=pR(a,0,255)&255;var o=r*16777216+(i<<16)+(n<<8)+a;return o}function Oar(e,t){e=+e;var r=e>>>24,i=(e&16711680)>>>16,n=(e&65280)>>>8,a=e&255;return t===!1?[r,i,n,a]:[r/255,i/255,n/255,a/255]}});var aje=W((I$r,nje)=>{nje.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],i=0;i<e.length-1;i++)r.push(e[i],t[i]||"");return r.push(e[i]),r.join("")}});var GQ=W((R$r,oje)=>{"use strict";oje.exports=function(t,r,i){Array.isArray(i)||(i=[].slice.call(arguments,2));for(var n=0,a=i.length;n<a;n++){var o=i[n];for(var s in o)if(!(r[s]!==void 0&&!Array.isArray(r[s])&&t[s]===r[s])&&s in r){var l;if(o[s]===!0)l=r[s];else{if(o[s]===!1)continue;if(typeof o[s]=="function"&&(l=o[s](r[s],t,r),l===void 0))continue}t[s]=l}}return t}});var gR=W((z$r,H4)=>{"use strict";H4.exports=SE;H4.exports.float32=H4.exports.float=SE;H4.exports.fract32=H4.exports.fract=Nar;var sje=new Float32Array(1);function Nar(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=SE(e));for(var r=0,i=t.length;r<i;r++)t[r]=e[r]-t[r];return t}return SE(e-SE(e))}function SE(e){return e.length?e instanceof Float32Array?e:new Float32Array(e):(sje[0]=e,sje[0])}});var HQ=W((B$r,lje)=>{"use strict";var Uar=ME(),Var=Mb(),Gar=ije(),Har=lR(),mR=aje(),jar=N1(),$ar=GQ(),War=Sb(),yR=gR(),Yar=q4(),Xar=Fc;function Fc(e,t){if(!(this instanceof Fc))return new Fc(e,t);typeof e=="function"?(t||(t={}),t.regl=e):(t=e,e=null),t&&t.length&&(t.positions=t),e=t.regl;let r=e._gl,i,n=[],a={},o=[],s=[null],l=[null],u=255,c=100;this.tooManyColors=!1,i=e.texture({data:new Uint8Array(u*4),width:u,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),Object.assign(this,{regl:e,gl:r,groups:o,markerCache:l,markerTextures:s,palette:n,paletteIds:a,paletteTexture:i,maxColors:u,maxSize:c,canvas:r.canvas}),this.update(t);let f={uniforms:{constPointSize:!!t.constPointSize,opacity:e.prop("opacity"),paletteSize:(p,v)=>[this.tooManyColors?0:u,i.height],pixelRatio:e.context("pixelRatio"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translate:e.prop("translate"),translateFract:e.prop("translateFract"),markerTexture:e.prop("markerTexture"),paletteTexture:i},attributes:{x:(p,v)=>v.xAttr||{buffer:v.positionBuffer,stride:8,offset:0},y:(p,v)=>v.yAttr||{buffer:v.positionBuffer,stride:8,offset:4},xFract:(p,v)=>v.xAttr?{constant:[0,0]}:{buffer:v.positionFractBuffer,stride:8,offset:0},yFract:(p,v)=>v.yAttr?{constant:[0,0]}:{buffer:v.positionFractBuffer,stride:8,offset:4},size:(p,v)=>v.size.length?{buffer:v.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(v.size*255/this.maxSize)]},borderSize:(p,v)=>v.borderSize.length?{buffer:v.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(v.borderSize*255/this.maxSize)]},colorId:(p,v)=>v.color.length?{buffer:v.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?n.slice(v.color*4,v.color*4+4):[v.color]},borderColorId:(p,v)=>v.borderColor.length?{buffer:v.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?n.slice(v.borderColor*4,v.borderColor*4+4):[v.borderColor]},isActive:(p,v)=>v.activation===!0?{constant:[1]}:v.activation?v.activation:{constant:[0]}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:e.prop("elements"),count:e.prop("count"),offset:e.prop("offset"),primitive:"points"},h=Object.assign({},f);h.frag=mR([`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;
}
}
`]),h.vert=mR([`precision highp float;
#define GLSLIFY 1
attribute float x, y, xFract, yFract;
attribute float size, borderSize;
attribute vec4 colorId, borderColorId;
attribute float isActive;
// \`invariant\` effectively turns off optimizations for the position.
// We need this because -fast-math on M1 Macs is re-ordering
// floating point operations in a way that causes floating point
// precision limits to put points in the wrong locations.
invariant gl_Position;
uniform bool constPointSize;
uniform float pixelRatio;
uniform vec2 scale, scaleFract, translate, translateFract, paletteSize;
uniform sampler2D paletteTexture;
const float maxSize = 100.;
const float borderLevel = .5;
varying vec4 fragColor, fragBorderColor;
varying float fragPointSize, fragBorderRadius, fragWidth, fragBorderColorLevel, fragColorLevel;
float pointSizeScale = (constPointSize) ? 2. : pixelRatio;
bool isDirect = (paletteSize.x < 1.);
vec4 getColor(vec4 id) {
return isDirect ? id / 255. : texture2D(paletteTexture,
vec2(
(id.x + .5) / paletteSize.x,
(id.y + .5) / paletteSize.y
)
);
}
void main() {
// ignore inactive points
if (isActive == 0.) return;
vec2 position = vec2(x, y);
vec2 positionFract = vec2(xFract, yFract);
vec4 color = getColor(colorId);
vec4 borderColor = getColor(borderColorId);
float size = size * maxSize / 255.;
float borderSize = borderSize * maxSize / 255.;
gl_PointSize = 2. * size * pointSizeScale;
fragPointSize = size * pixelRatio;
vec2 pos = (position + translate) * scale
+ (positionFract + translateFract) * scale
+ (position + translate) * scaleFract
+ (positionFract + translateFract) * scaleFract;
gl_Position = vec4(pos * 2. - 1., 0., 1.);
fragColor = color;
fragBorderColor = borderColor;
fragWidth = 1. / gl_PointSize;
fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.);
fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.);
}
`]),this.drawMarker=e(h);let d=Object.assign({},f);d.frag=mR([`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;
}
`]),d.vert=mR([`precision highp float;
#define GLSLIFY 1
attribute float x, y, xFract, yFract;
attribute float size, borderSize;
attribute vec4 colorId, borderColorId;
attribute float isActive;
// \`invariant\` effectively turns off optimizations for the position.
// We need this because -fast-math on M1 Macs is re-ordering
// floating point operations in a way that causes floating point
// precision limits to put points in the wrong locations.
invariant gl_Position;
uniform bool constPointSize;
uniform float pixelRatio;
uniform vec2 paletteSize, scale, scaleFract, translate, translateFract;
uniform sampler2D paletteTexture;
const float maxSize = 100.;
varying vec4 fragColor, fragBorderColor;
varying float fragBorderRadius, fragWidth;
float pointSizeScale = (constPointSize) ? 2. : pixelRatio;
bool isDirect = (paletteSize.x < 1.);
vec4 getColor(vec4 id) {
return isDirect ? id / 255. : texture2D(paletteTexture,
vec2(
(id.x + .5) / paletteSize.x,
(id.y + .5) / paletteSize.y
)
);
}
void main() {
// ignore inactive points
if (isActive == 0.) return;
vec2 position = vec2(x, y);
vec2 positionFract = vec2(xFract, yFract);
vec4 color = getColor(colorId);
vec4 borderColor = getColor(borderColorId);
float size = size * maxSize / 255.;
float borderSize = borderSize * maxSize / 255.;
gl_PointSize = (size + borderSize) * pointSizeScale;
vec2 pos = (position + translate) * scale
+ (positionFract + translateFract) * scale
+ (position + translate) * scaleFract
+ (positionFract + translateFract) * scaleFract;
gl_Position = vec4(pos * 2. - 1., 0., 1.);
fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);
fragColor = color;
fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;
fragWidth = 1. / gl_PointSize;
}
`]),this.drawCircle=e(d)}Fc.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};Fc.prototype.render=function(){return arguments.length&&this.update(...arguments),this.draw(),this};Fc.prototype.draw=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];let{groups:i}=this;if(t.length===1&&Array.isArray(t[0])&&(t[0][0]===null||Array.isArray(t[0][0]))&&(t=t[0]),this.regl._refresh(),t.length)for(let n=0;n<t.length;n++)this.drawItem(n,t[n]);else i.forEach((n,a)=>{this.drawItem(a)});return this};Fc.prototype.drawItem=function(e,t){let{groups:r}=this,i=r[e];if(typeof t=="number"&&(e=t,i=r[t],t=null),!(i&&i.count&&i.opacity))return;i.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,i,t));let n=[];for(let a=1;a<i.activation.length;a++)!i.activation[a]||i.activation[a]!==!0&&!i.activation[a].data.length||n.push(...this.getMarkerDrawOptions(a,i,t));n.length&&this.drawMarker(n)};Fc.prototype.getMarkerDrawOptions=function(e,t,r){let{range:i,tree:n,viewport:a,activation:o,selectionBuffer:s,count:l}=t;if(!n)return r?[Object.assign({},t,{markerTexture:this.markerTextures[e],activation:o[e],count:r.length,elements:r,offset:0})]:[Object.assign({},t,{markerTexture:this.markerTextures[e],activation:o[e],offset:0})];let u=[],c=n.range(i,{lod:!0,px:[(i[2]-i[0])/a.width,(i[3]-i[1])/a.height]});if(r){let h=o[e].data,d=new Uint8Array(l);for(let p=0;p<r.length;p++){let v=r[p];d[v]=h?h[v]:1}s.subdata(d)}for(let f=c.length;f--;){let[h,d]=c[f];u.push(Object.assign({},t,{markerTexture:this.markerTextures[e],activation:r?s:o[e],offset:h,count:d-h}))}return u};Fc.prototype.update=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!t.length)return;t.length===1&&Array.isArray(t[0])&&(t=t[0]);let{groups:i,gl:n,regl:a,maxSize:o,maxColors:s,palette:l}=this;this.groups=i=t.map((u,c)=>{let f=i[c];if(u===void 0)return f;u===null?u={positions:null}:typeof u=="function"?u={ondraw:u}:typeof u[0]=="number"&&(u={positions:u}),u=jar(u,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),u.positions===null&&(u.positions=[]),u.tooManyColors!=null&&(this.tooManyColors=u.tooManyColors),f||(i[c]=f={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:a.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:a.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:a.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:a.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:a.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},u=Object.assign({},Fc.defaults,u)),u.positions&&!("marker"in u)&&(u.marker=f.marker,delete f.marker),u.marker&&!("positions"in u)&&(u.positions=f.positions,delete f.positions);let h=0,d=0;if($ar(f,u,[{snap:!0,size:(p,v)=>(p==null&&(p=Fc.defaults.size),h+=p&&p.length?1:0,p),borderSize:(p,v)=>(p==null&&(p=Fc.defaults.borderSize),h+=p&&p.length?1:0,p),opacity:parseFloat,color:(p,v)=>(p==null&&(p=Fc.defaults.color),p=this.updateColor(p),d++,p),borderColor:(p,v)=>(p==null&&(p=Fc.defaults.borderColor),p=this.updateColor(p),d++,p),bounds:(p,v,m)=>("range"in m||(m.range=null),p),positions:(p,v,m)=>{let{snap:g}=v,{positionBuffer:w,positionFractBuffer:b,selectionBuffer:_}=v;if(p.x||p.y)return p.x.length?v.xAttr={buffer:a.buffer(p.x),offset:0,stride:4,count:p.x.length}:v.xAttr={buffer:p.x.buffer,offset:p.x.offset*4||0,stride:(p.x.stride||1)*4,count:p.x.count},p.y.length?v.yAttr={buffer:a.buffer(p.y),offset:0,stride:4,count:p.y.length}:v.yAttr={buffer:p.y.buffer,offset:p.y.offset*4||0,stride:(p.y.stride||1)*4,count:p.y.count},v.count=Math.max(v.xAttr.count,v.yAttr.count),p;p=War(p,"float64");let M=v.count=Math.floor(p.length/2),x=v.bounds=M?Var(p,2):null;if(!m.range&&!v.range&&(delete v.range,m.range=x),!m.marker&&!v.marker&&(delete v.marker,m.marker=null),g&&(g===!0||M>g)?v.tree=Har(p,{bounds:x}):g&&g.length&&(v.tree=g),v.tree){let y={primitive:"points",usage:"static",data:v.tree,type:"uint32"};v.elements?v.elements(y):v.elements=a.elements(y)}var T=yR.float32(p);w({data:T,usage:"dynamic"});var A=yR.fract32(p,T);return b({data:A,usage:"dynamic"}),_({data:new Uint8Array(M),type:"uint8",usage:"stream"}),p}},{marker:(p,v,m)=>{let{activation:g}=v;if(g.forEach(w=>w&&w.destroy&&w.destroy()),g.length=0,!p||typeof p[0]=="number"){let w=this.addMarker(p);g[w]=!0}else{let w=[];for(let b=0,_=Math.min(p.length,v.count);b<_;b++){let M=this.addMarker(p[b]);w[M]||(w[M]=new Uint8Array(v.count)),w[M][b]=1}for(let b=0;b<w.length;b++){if(!w[b])continue;let _={data:w[b],type:"uint8",usage:"static"};g[b]?g[b](_):g[b]=a.buffer(_),g[b].data=w[b]}}return p},range:(p,v,m)=>{let g=v.bounds;if(g)return p||(p=g),v.scale=[1/(p[2]-p[0]),1/(p[3]-p[1])],v.translate=[-p[0],-p[1]],v.scaleFract=yR.fract(v.scale),v.translateFract=yR.fract(v.translate),p},viewport:p=>Yar(p||[n.drawingBufferWidth,n.drawingBufferHeight])}]),h){let{count:p,size:v,borderSize:m,sizeBuffer:g}=f,w=new Uint8Array(p*2);if(v.length||m.length)for(let b=0;b<p;b++)w[b*2]=Math.round((v[b]==null?v:v[b])*255/o),w[b*2+1]=Math.round((m[b]==null?m:m[b])*255/o);g({data:w,usage:"dynamic"})}if(d){let{count:p,color:v,borderColor:m,colorBuffer:g}=f,w;if(this.tooManyColors){if(v.length||m.length){w=new Uint8Array(p*8);for(let b=0;b<p;b++){let _=v[b];w[b*8]=l[_*4],w[b*8+1]=l[_*4+1],w[b*8+2]=l[_*4+2],w[b*8+3]=l[_*4+3];let M=m[b];w[b*8+4]=l[M*4],w[b*8+5]=l[M*4+1],w[b*8+6]=l[M*4+2],w[b*8+7]=l[M*4+3]}}}else if(v.length||m.length){w=new Uint8Array(p*4+2);for(let b=0;b<p;b++)v[b]!=null&&(w[b*4]=v[b]%s,w[b*4+1]=Math.floor(v[b]/s)),m[b]!=null&&(w[b*4+2]=m[b]%s,w[b*4+3]=Math.floor(m[b]/s))}g({data:w||new Uint8Array(0),type:"uint8",usage:"dynamic"})}return f})};Fc.prototype.addMarker=function(e){let{markerTextures:t,regl:r,markerCache:i}=this,n=e==null?0:i.indexOf(e);if(n>=0)return n;let a;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)a=e;else{a=new Uint8Array(e.length);for(let s=0,l=e.length;s<l;s++)a[s]=e[s]*255}let o=Math.floor(Math.sqrt(a.length));return n=t.length,i.push(e),t.push(r.texture({channels:1,data:a,radius:o,mag:"linear",min:"linear"})),n};Fc.prototype.updateColor=function(e){let{paletteIds:t,palette:r,maxColors:i}=this;Array.isArray(e)||(e=[e]);let n=[];if(typeof e[0]=="number"){let a=[];if(Array.isArray(e))for(let o=0;o<e.length;o+=4)a.push(e.slice(o,o+4));else for(let o=0;o<e.length;o+=4)a.push(e.subarray(o,o+4));e=a}for(let a=0;a<e.length;a++){let o=e[a];o=Uar(o,"uint8");let s=Gar(o,!1);if(t[s]==null){let l=r.length;t[s]=Math.floor(l/4),r[l]=o[0],r[l+1]=o[1],r[l+2]=o[2],r[l+3]=o[3]}n[a]=t[s]}return!this.tooManyColors&&r.length>i*4&&(this.tooManyColors=!0),this.updatePalette(r),n.length===1?n[0]:n};Fc.prototype.updatePalette=function(e){if(this.tooManyColors)return;let{maxColors:t,paletteTexture:r}=this,i=Math.ceil(e.length*.25/t);if(i>1){e=e.slice();for(let n=e.length*.25%t;n<i*t;n++)e.push(0,0,0,0)}r.height<i&&r.resize(t,i),r.subimage({width:Math.min(e.length*.25,t),height:i,data:e},0,0)};Fc.prototype.destroy=function(){return this.groups.forEach(e=>{e.sizeBuffer.destroy(),e.positionBuffer.destroy(),e.positionFractBuffer.destroy(),e.colorBuffer.destroy(),e.activation.forEach(t=>t&&t.destroy&&t.destroy()),e.selectionBuffer.destroy(),e.elements&&e.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(e=>e&&e.destroy&&e.destroy()),this};var Zar=function(e,t){var r=new Xar(e,t),i=r.render.bind(r);return Object.assign(i,{render:i,update:r.update.bind(r),draw:r.draw.bind(r),destroy:r.destroy.bind(r),regl:r.regl,gl:r.gl,canvas:r.gl.canvas,groups:r.groups,markers:r.markerCache,palette:r.palette}),i};lje.exports=Zar});var qu=W((q$r,cje)=>{"use strict";var uje=Object.getOwnPropertySymbols,Kar=Object.prototype.hasOwnProperty,Jar=Object.prototype.propertyIsEnumerable;function Qar(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function eor(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var i=Object.getOwnPropertyNames(t).map(function(a){return t[a]});if(i.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(a){n[a]=a}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch(a){return!1}}cje.exports=eor()?Object.assign:function(e,t){for(var r,i=Qar(e),n,a=1;a<arguments.length;a++){r=Object(arguments[a]);for(var o in r)Kar.call(r,o)&&(i[o]=r[o]);if(uje){n=uje(r);for(var s=0;s<n.length;s++)Jar.call(r,n[s])&&(i[n[s]]=r[n[s]])}}return i}});var vje=W((O$r,YQ)=>{"use strict";YQ.exports=bR;YQ.exports.default=bR;function bR(e,t,r){r=r||2;var i=t&&t.length,n=i?t[0]*r:e.length,a=hje(e,0,n,r,!0),o=[];if(!a||a.next===a.prev)return o;var s,l,u,c,f,h,d;if(i&&(a=aor(e,t,a,r)),e.length>80*r){s=u=e[0],l=c=e[1];for(var p=r;p<n;p+=r)f=e[p],h=e[p+1],f<s&&(s=f),h<l&&(l=h),f>u&&(u=f),h>c&&(c=h);d=Math.max(u-s,c-l),d=d!==0?32767/d:0}return EE(a,o,r,s,l,d,0),o}function hje(e,t,r,i,n){var a,o;if(n===WQ(e,t,r,i)>0)for(a=t;a<r;a+=i)o=fje(a,e[a],e[a+1],o);else for(a=r-i;a>=t;a-=i)o=fje(a,e[a],e[a+1],o);return o&&wR(o,o.next)&&(CE(o),o=o.next),o}function Cb(e,t){if(!e)return e;t||(t=e);var r=e,i;do if(i=!1,!r.steiner&&(wR(r,r.next)||zl(r.prev,r,r.next)===0)){if(CE(r),r=t=r.prev,r===r.next)break;i=!0}else r=r.next;while(i||r!==t);return t}function EE(e,t,r,i,n,a,o){if(e){!o&&a&&cor(e,i,n,a);for(var s=e,l,u;e.prev!==e.next;){if(l=e.prev,u=e.next,a?ror(e,i,n,a):tor(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(u.i/r|0),CE(e),e=u.next,s=u.next;continue}if(e=u,e===s){o?o===1?(e=ior(Cb(e),t,r),EE(e,t,r,i,n,a,2)):o===2&&nor(e,t,r,i,n,a):EE(Cb(e),t,r,i,n,a,1);break}}}}function tor(e){var t=e.prev,r=e,i=e.next;if(zl(t,r,i)>=0)return!1;for(var n=t.x,a=r.x,o=i.x,s=t.y,l=r.y,u=i.y,c=n<a?n<o?n:o:a<o?a:o,f=s<l?s<u?s:u:l<u?l:u,h=n>a?n>o?n:o:a>o?a:o,d=s>l?s>u?s:u:l>u?l:u,p=i.next;p!==t;){if(p.x>=c&&p.x<=h&&p.y>=f&&p.y<=d&&j4(n,s,a,l,o,u,p.x,p.y)&&zl(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function ror(e,t,r,i){var n=e.prev,a=e,o=e.next;if(zl(n,a,o)>=0)return!1;for(var s=n.x,l=a.x,u=o.x,c=n.y,f=a.y,h=o.y,d=s<l?s<u?s:u:l<u?l:u,p=c<f?c<h?c:h:f<h?f:h,v=s>l?s>u?s:u:l>u?l:u,m=c>f?c>h?c:h:f>h?f:h,g=jQ(d,p,t,r,i),w=jQ(v,m,t,r,i),b=e.prevZ,_=e.nextZ;b&&b.z>=g&&_&&_.z<=w;){if(b.x>=d&&b.x<=v&&b.y>=p&&b.y<=m&&b!==n&&b!==o&&j4(s,c,l,f,u,h,b.x,b.y)&&zl(b.prev,b,b.next)>=0||(b=b.prevZ,_.x>=d&&_.x<=v&&_.y>=p&&_.y<=m&&_!==n&&_!==o&&j4(s,c,l,f,u,h,_.x,_.y)&&zl(_.prev,_,_.next)>=0))return!1;_=_.nextZ}for(;b&&b.z>=g;){if(b.x>=d&&b.x<=v&&b.y>=p&&b.y<=m&&b!==n&&b!==o&&j4(s,c,l,f,u,h,b.x,b.y)&&zl(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;_&&_.z<=w;){if(_.x>=d&&_.x<=v&&_.y>=p&&_.y<=m&&_!==n&&_!==o&&j4(s,c,l,f,u,h,_.x,_.y)&&zl(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}function ior(e,t,r){var i=e;do{var n=i.prev,a=i.next.next;!wR(n,a)&&dje(n,i,i.next,a)&&kE(n,a)&&kE(a,n)&&(t.push(n.i/r|0),t.push(i.i/r|0),t.push(a.i/r|0),CE(i),CE(i.next),i=e=a),i=i.next}while(i!==e);return Cb(i)}function nor(e,t,r,i,n,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&por(o,s)){var l=pje(o,s);o=Cb(o,o.next),l=Cb(l,l.next),EE(o,t,r,i,n,a,0),EE(l,t,r,i,n,a,0);return}s=s.next}o=o.next}while(o!==e)}function aor(e,t,r,i){var n=[],a,o,s,l,u;for(a=0,o=t.length;a<o;a++)s=t[a]*i,l=a<o-1?t[a+1]*i:e.length,u=hje(e,s,l,i,!1),u===u.next&&(u.steiner=!0),n.push(dor(u));for(n.sort(oor),a=0;a<n.length;a++)r=sor(n[a],r);return r}function oor(e,t){return e.x-t.x}function sor(e,t){var r=lor(e,t);if(!r)return t;var i=pje(r,e);return Cb(i,i.next),Cb(r,r.next)}function lor(e,t){var r=t,i=e.x,n=e.y,a=-1/0,o;do{if(n<=r.y&&n>=r.next.y&&r.next.y!==r.y){var s=r.x+(n-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a&&(a=s,o=r.x<r.next.x?r:r.next,s===i))return o}r=r.next}while(r!==t);if(!o)return null;var l=o,u=o.x,c=o.y,f=1/0,h;r=o;do i>=r.x&&r.x>=u&&i!==r.x&&j4(n<c?i:a,n,u,c,n<c?a:i,n,r.x,r.y)&&(h=Math.abs(n-r.y)/(i-r.x),kE(r,e)&&(h<f||h===f&&(r.x>o.x||r.x===o.x&&uor(o,r)))&&(o=r,f=h)),r=r.next;while(r!==l);return o}function uor(e,t){return zl(e.prev,e,t.prev)<0&&zl(t.next,e,e.next)<0}function cor(e,t,r,i){var n=e;do n.z===0&&(n.z=jQ(n.x,n.y,t,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==e);n.prevZ.nextZ=null,n.prevZ=null,hor(n)}function hor(e){var t,r,i,n,a,o,s,l,u=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,i=r,s=0,t=0;t<u&&(s++,i=i.nextZ,!!i);t++);for(l=u;s>0||l>0&&i;)s!==0&&(l===0||!i||r.z<=i.z)?(n=r,r=r.nextZ,s--):(n=i,i=i.nextZ,l--),a?a.nextZ=n:e=n,n.prevZ=a,a=n;r=i}a.nextZ=null,u*=2}while(o>1);return e}function jQ(e,t,r,i,n){return e=(e-r)*n|0,t=(t-i)*n|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function dor(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function j4(e,t,r,i,n,a,o,s){return(n-o)*(t-s)>=(e-o)*(a-s)&&(e-o)*(i-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(n-o)*(i-s)}function por(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!vor(e,t)&&(kE(e,t)&&kE(t,e)&&gor(e,t)&&(zl(e.prev,e,t.prev)||zl(e,t.prev,t))||wR(e,t)&&zl(e.prev,e,e.next)>0&&zl(t.prev,t,t.next)>0)}function zl(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function wR(e,t){return e.x===t.x&&e.y===t.y}function dje(e,t,r,i){var n=_R(zl(e,t,r)),a=_R(zl(e,t,i)),o=_R(zl(r,i,e)),s=_R(zl(r,i,t));return!!(n!==a&&o!==s||n===0&&xR(e,r,t)||a===0&&xR(e,i,t)||o===0&&xR(r,e,i)||s===0&&xR(r,t,i))}function xR(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function _R(e){return e>0?1:e<0?-1:0}function vor(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&dje(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function kE(e,t){return zl(e.prev,e,e.next)<0?zl(e,t,e.next)>=0&&zl(e,e.prev,t)>=0:zl(e,t,e.prev)<0||zl(e,e.next,t)<0}function gor(e,t){var r=e,i=!1,n=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&n<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next;while(r!==e);return i}function pje(e,t){var r=new $Q(e.i,e.x,e.y),i=new $Q(t.i,t.x,t.y),n=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=n,n.prev=r,i.next=r,r.prev=i,a.next=i,i.prev=a,i}function fje(e,t,r,i){var n=new $Q(e,t,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function CE(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function $Q(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}bR.deviation=function(e,t,r,i){var n=t&&t.length,a=n?t[0]*r:e.length,o=Math.abs(WQ(e,0,a,r));if(n)for(var s=0,l=t.length;s<l;s++){var u=t[s]*r,c=s<l-1?t[s+1]*r:e.length;o-=Math.abs(WQ(e,u,c,r))}var f=0;for(s=0;s<i.length;s+=3){var h=i[s]*r,d=i[s+1]*r,p=i[s+2]*r;f+=Math.abs((e[h]-e[p])*(e[d+1]-e[h+1])-(e[h]-e[d])*(e[p+1]-e[h+1]))}return o===0&&f===0?0:Math.abs((f-o)/o)};function WQ(e,t,r,i){for(var n=0,a=t,o=r-i;a<r;a+=i)n+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return n}bR.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},i=0,n=0;n<e.length;n++){for(var a=0;a<e[n].length;a++)for(var o=0;o<t;o++)r.vertices.push(e[n][a][o]);n>0&&(i+=e[n-1].length,r.holes.push(i))}return r}});var mje=W((N$r,gje)=>{"use strict";var mor=Mb();gje.exports=yor;function yor(e,t,r){if(!e||e.length==null)throw Error("Argument should be an array");t==null&&(t=1),r==null&&(r=mor(e,t));for(var i=0;i<t;i++){var n=r[t+i],a=r[i],o=i,s=e.length;if(n===1/0&&a===-1/0)for(o=i;o<s;o+=t)e[o]=e[o]===n?1:e[o]===a?0:.5;else if(n===1/0)for(o=i;o<s;o+=t)e[o]=e[o]===n?1:0;else if(a===-1/0)for(o=i;o<s;o+=t)e[o]=e[o]===a?0:1;else{var l=n-a;for(o=i;o<s;o+=t)isNaN(e[o])||(e[o]=l===0?.5:(e[o]-a)/l)}}return e}});var xje=W((U$r,yje)=>{"use strict";yje.exports=function(){var e,t;if(typeof WeakMap!="function")return!1;try{e=new WeakMap([[t={},"one"],[{},"two"],[{},"three"]])}catch(r){return!1}return!(String(e)!=="[object WeakMap]"||typeof e.set!="function"||e.set({},1)!==e||typeof e.delete!="function"||typeof e.has!="function"||e.get(t)!=="one")}});var bje=W((V$r,_je)=>{"use strict";_je.exports=function(){}});var F2=W((G$r,wje)=>{"use strict";var xor=bje()();wje.exports=function(e){return e!==xor&&e!==null}});var XQ=W((H$r,Aje)=>{"use strict";var _or=Object.create,bor=Object.getPrototypeOf,Tje={};Aje.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||_or;return typeof e!="function"?!1:bor(e(t(null),Tje))===Tje}});var ZQ=W((j$r,Mje)=>{"use strict";var wor=F2(),Tor={function:!0,object:!0};Mje.exports=function(e){return wor(e)&&Tor[typeof e]||!1}});var hm=W(($$r,Sje)=>{"use strict";var Aor=F2();Sje.exports=function(e){if(!Aor(e))throw new TypeError("Cannot use null or undefined");return e}});var kje=W((W$r,Eje)=>{"use strict";var KQ=Object.create,TR;XQ()()||(TR=JQ());Eje.exports=(function(){var e,t,r;return!TR||TR.level!==1?KQ:(e={},t={},r={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(i){if(i==="__proto__"){t[i]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}t[i]=r}),Object.defineProperties(e,t),Object.defineProperty(TR,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(i,n){return KQ(i===null?e:i,n)})})()});var JQ=W((Y$r,Cje)=>{"use strict";var Mor=ZQ(),Sor=hm(),Eor=Object.prototype.isPrototypeOf,kor=Object.defineProperty,Cor={configurable:!0,enumerable:!1,writable:!0,value:void 0},AR;AR=function(e,t){if(Sor(e),t===null||Mor(t))return e;throw new TypeError("Prototype must be null or an object")};Cje.exports=(function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(i,n){return r.call(AR(i,n),n),i}):t=function(i,n){return AR(i,n).__proto__=n,i}:t=function i(n,a){var o;return AR(n,a),o=Eor.call(i.nullPolyfill,n),o&&delete i.nullPolyfill.__proto__,a===null&&(a=i.nullPolyfill),n.__proto__=a,o&&kor(i.nullPolyfill,"__proto__",Cor),n},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null})((function(){var e=Object.create(null),t={},r,i=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(i){try{r=i.set,r.call(e,t)}catch(n){}if(Object.getPrototypeOf(e)===t)return{set:r,level:2}}return e.__proto__=t,Object.getPrototypeOf(e)===t?{level:2}:(e={},e.__proto__=t,Object.getPrototypeOf(e)===t?{level:1}:!1)})());kje()});var MR=W((X$r,Dje)=>{"use strict";Dje.exports=XQ()()?Object.setPrototypeOf:JQ()});var Lje=W((Z$r,Fje)=>{"use strict";var Dor=ZQ();Fje.exports=function(e){if(!Dor(e))throw new TypeError(e+" is not an Object");return e}});var Ije=W((K$r,Pje)=>{"use strict";var For=Object.create(null),Lor=Math.random;Pje.exports=function(){var e;do e=Lor().toString(36).slice(2);while(For[e]);return e}});var Db=W((J$r,Rje)=>{"use strict";var Por=void 0;Rje.exports=function(e){return e!==Por&&e!==null}});var QQ=W((Q$r,zje)=>{"use strict";var Ior=Db(),Ror={object:!0,function:!0,undefined:!0};zje.exports=function(e){return Ior(e)?hasOwnProperty.call(Ror,typeof e):!1}});var qje=W((eWr,Bje)=>{"use strict";var zor=QQ();Bje.exports=function(e){if(!zor(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var Nje=W((tWr,Oje)=>{"use strict";var Bor=qje();Oje.exports=function(e){if(typeof e!="function"||!hasOwnProperty.call(e,"length"))return!1;try{if(typeof e.length!="number"||typeof e.call!="function"||typeof e.apply!="function")return!1}catch(t){return!1}return!Bor(e)}});var eee=W((rWr,Uje)=>{"use strict";var qor=Nje(),Oor=/^\s*class[\s{/}]/,Nor=Function.prototype.toString;Uje.exports=function(e){return!(!qor(e)||Oor.test(Nor.call(e)))}});var Gje=W((iWr,Vje)=>{"use strict";Vje.exports=function(){var e=Object.assign,t;return typeof e!="function"?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}});var jje=W((nWr,Hje)=>{"use strict";Hje.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var Wje=W((aWr,$je)=>{"use strict";var Uor=F2(),Vor=Object.keys;$je.exports=function(e){return Vor(Uor(e)?Object(e):e)}});var Xje=W((oWr,Yje)=>{"use strict";Yje.exports=jje()()?Object.keys:Wje()});var Kje=W((sWr,Zje)=>{"use strict";var Gor=Xje(),Hor=hm(),jor=Math.max;Zje.exports=function(e,t){var r,i,n=jor(arguments.length,2),a;for(e=Object(Hor(e)),a=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},i=1;i<n;++i)t=arguments[i],Gor(t).forEach(a);if(r!==void 0)throw r;return e}});var SR=W((lWr,Jje)=>{"use strict";Jje.exports=Gje()()?Object.assign:Kje()});var tee=W((uWr,Qje)=>{"use strict";var $or=F2(),Wor=Array.prototype.forEach,Yor=Object.create,Xor=function(e,t){var r;for(r in e)t[r]=e[r]};Qje.exports=function(e){var t=Yor(null);return Wor.call(arguments,function(r){$or(r)&&Xor(Object(r),t)}),t}});var t$e=W((cWr,e$e)=>{"use strict";var ree="razdwatrzy";e$e.exports=function(){return typeof ree.contains!="function"?!1:ree.contains("dwa")===!0&&ree.contains("foo")===!1}});var i$e=W((fWr,r$e)=>{"use strict";var Zor=String.prototype.indexOf;r$e.exports=function(e){return Zor.call(this,e,arguments[1])>-1}});var iee=W((hWr,n$e)=>{"use strict";n$e.exports=t$e()()?String.prototype.contains:i$e()});var dm=W((dWr,l$e)=>{"use strict";var ER=Db(),a$e=eee(),o$e=SR(),s$e=tee(),DE=iee(),Kor=l$e.exports=function(e,t){var r,i,n,a,o;return arguments.length<2||typeof e!="string"?(a=t,t=e,e=null):a=arguments[2],ER(e)?(r=DE.call(e,"c"),i=DE.call(e,"e"),n=DE.call(e,"w")):(r=n=!0,i=!1),o={value:t,configurable:r,enumerable:i,writable:n},a?o$e(s$e(a),o):o};Kor.gs=function(e,t,r){var i,n,a,o;return typeof e!="string"?(a=r,r=t,t=e,e=null):a=arguments[3],ER(t)?a$e(t)?ER(r)?a$e(r)||(a=r,r=void 0):r=void 0:(a=t,t=r=void 0):t=void 0,ER(e)?(i=DE.call(e,"c"),n=DE.call(e,"e")):(i=!0,n=!1),o={get:t,set:r,configurable:i,enumerable:n},a?o$e(s$e(a),o):o}});var FE=W((pWr,c$e)=>{"use strict";var u$e=Object.prototype.toString,Jor=u$e.call((function(){return arguments})());c$e.exports=function(e){return u$e.call(e)===Jor}});var LE=W((vWr,h$e)=>{"use strict";var f$e=Object.prototype.toString,Qor=f$e.call("");h$e.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||f$e.call(e)===Qor)||!1}});var p$e=W((gWr,d$e)=>{"use strict";d$e.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var m$e=W((mWr,g$e)=>{var v$e=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};g$e.exports=(function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return v$e()}try{return __global__||v$e()}finally{delete Object.prototype.__global__}})()});var PE=W((yWr,y$e)=>{"use strict";y$e.exports=p$e()()?globalThis:m$e()});var _$e=W((xWr,x$e)=>{"use strict";var esr=PE(),nee={object:!0,symbol:!0};x$e.exports=function(){var e=esr.Symbol,t;if(typeof e!="function")return!1;t=e("test symbol");try{String(t)}catch(r){return!1}return!(!nee[typeof e.iterator]||!nee[typeof e.toPrimitive]||!nee[typeof e.toStringTag])}});var w$e=W((_Wr,b$e)=>{"use strict";b$e.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var aee=W((bWr,T$e)=>{"use strict";var tsr=w$e();T$e.exports=function(e){if(!tsr(e))throw new TypeError(e+" is not a symbol");return e}});var k$e=W((wWr,E$e)=>{"use strict";var A$e=dm(),rsr=Object.create,M$e=Object.defineProperty,isr=Object.prototype,S$e=rsr(null);E$e.exports=function(e){for(var t=0,r,i;S$e[e+(t||"")];)++t;return e+=t||"",S$e[e]=!0,r="@@"+e,M$e(isr,r,A$e.gs(null,function(n){i||(i=!0,M$e(this,r,A$e(n)),i=!1)})),r}});var D$e=W((TWr,C$e)=>{"use strict";var vv=dm(),Xl=PE().Symbol;C$e.exports=function(e){return Object.defineProperties(e,{hasInstance:vv("",Xl&&Xl.hasInstance||e("hasInstance")),isConcatSpreadable:vv("",Xl&&Xl.isConcatSpreadable||e("isConcatSpreadable")),iterator:vv("",Xl&&Xl.iterator||e("iterator")),match:vv("",Xl&&Xl.match||e("match")),replace:vv("",Xl&&Xl.replace||e("replace")),search:vv("",Xl&&Xl.search||e("search")),species:vv("",Xl&&Xl.species||e("species")),split:vv("",Xl&&Xl.split||e("split")),toPrimitive:vv("",Xl&&Xl.toPrimitive||e("toPrimitive")),toStringTag:vv("",Xl&&Xl.toStringTag||e("toStringTag")),unscopables:vv("",Xl&&Xl.unscopables||e("unscopables"))})}});var P$e=W((AWr,L$e)=>{"use strict";var F$e=dm(),nsr=aee(),IE=Object.create(null);L$e.exports=function(e){return Object.defineProperties(e,{for:F$e(function(t){return IE[t]?IE[t]:IE[t]=e(String(t))}),keyFor:F$e(function(t){var r;nsr(t);for(r in IE)if(IE[r]===t)return r})})}});var z$e=W((MWr,R$e)=>{"use strict";var U1=dm(),oee=aee(),kR=PE().Symbol,asr=k$e(),osr=D$e(),ssr=P$e(),lsr=Object.create,see=Object.defineProperties,CR=Object.defineProperty,Ff,$4,I$e;if(typeof kR=="function")try{String(kR()),I$e=!0}catch(e){}else kR=null;$4=function(t){if(this instanceof $4)throw new TypeError("Symbol is not a constructor");return Ff(t)};R$e.exports=Ff=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return I$e?kR(t):(r=lsr($4.prototype),t=t===void 0?"":String(t),see(r,{__description__:U1("",t),__name__:U1("",asr(t))}))};osr(Ff);ssr(Ff);see($4.prototype,{constructor:U1(Ff),toString:U1("",function(){return this.__name__})});see(Ff.prototype,{toString:U1(function(){return"Symbol ("+oee(this).__description__+")"}),valueOf:U1(function(){return oee(this)})});CR(Ff.prototype,Ff.toPrimitive,U1("",function(){var e=oee(this);return typeof e=="symbol"?e:e.toString()}));CR(Ff.prototype,Ff.toStringTag,U1("c","Symbol"));CR($4.prototype,Ff.toStringTag,U1("c",Ff.prototype[Ff.toStringTag]));CR($4.prototype,Ff.toPrimitive,U1("c",Ff.prototype[Ff.toPrimitive]))});var L2=W((SWr,B$e)=>{"use strict";B$e.exports=_$e()()?PE().Symbol:z$e()});var O$e=W((EWr,q$e)=>{"use strict";var usr=hm();q$e.exports=function(){return usr(this).length=0,this}});var W4=W((kWr,N$e)=>{"use strict";N$e.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var V$e=W((CWr,U$e)=>{"use strict";var csr=Db(),fsr=QQ(),hsr=Object.prototype.toString;U$e.exports=function(e){if(!csr(e))return null;if(fsr(e)){var t=e.toString;if(typeof t!="function"||t===hsr)return null}try{return""+e}catch(r){return null}}});var H$e=W((DWr,G$e)=>{"use strict";G$e.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var $$e=W((FWr,j$e)=>{"use strict";var dsr=H$e(),psr=/[\n\r\u2028\u2029]/g;j$e.exports=function(e){var t=dsr(e);return t===null?"<Non-coercible to string value>":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace(psr,function(r){switch(r){case`
`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),t)}});var Y$e=W((LWr,W$e)=>{"use strict";var vsr=V$e(),gsr=$$e();W$e.exports=function(e,t,r){r&&r.errorMessage&&(e=vsr(r.errorMessage));var i=e.indexOf("%v"),n=i>-1?gsr(t):null;if(r&&r.name){var a=e.indexOf("%n");if(a>-1){if(i>-1){var o,s,l,u;return a>i?(o=n,l=i,s=r.name,u=a):(o=r.name,l=a,s=n,u=i),e.slice(0,l)+o+e.slice(l+2,u)+s+e.slice(u+2)}return e.slice(0,a)+r.name+e.slice(a+2)}}return i>-1?e.slice(0,i)+n+e.slice(i+2):e}});var lee=W((PWr,X$e)=>{"use strict";var msr=Db(),ysr=Y$e();X$e.exports=function(e,t,r){if(r&&!msr(e)){if("default"in r)return r.default;if(r.isOptional)return null}var i=r&&r.Error||TypeError,n=new i(ysr(t,e,r));throw r&&r.errorCode&&(n.code=r.errorCode),n}});var K$e=W((IWr,Z$e)=>{"use strict";var xsr=lee(),_sr=Db();Z$e.exports=function(e){if(_sr(e))return e;var t=arguments[1],r=t&&t.name?"Expected a value for %n, received %v":"Cannot use %v";return xsr(e,r,t)}});var Q$e=W((RWr,J$e)=>{"use strict";var bsr=lee(),wsr=eee();J$e.exports=function(e){if(wsr(e))return e;var t=arguments[1],r=t&&t.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return bsr(e,r,t)}});var tWe=W((zWr,eWe)=>{"use strict";eWe.exports=function(){var e=Array.from,t,r;return typeof e!="function"?!1:(t=["raz","dwa"],r=e(t),!!(r&&r!==t&&r[1]==="dwa"))}});var iWe=W((BWr,rWe)=>{"use strict";var Tsr=Object.prototype.toString,Asr=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);rWe.exports=function(e){return typeof e=="function"&&Asr(Tsr.call(e))}});var aWe=W((qWr,nWe)=>{"use strict";nWe.exports=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1}});var sWe=W((OWr,oWe)=>{"use strict";oWe.exports=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}});var uWe=W((NWr,lWe)=>{"use strict";lWe.exports=aWe()()?Math.sign:sWe()});var fWe=W((UWr,cWe)=>{"use strict";var Msr=uWe(),Ssr=Math.abs,Esr=Math.floor;cWe.exports=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:Msr(e)*Esr(Ssr(e)))}});var dWe=W((VWr,hWe)=>{"use strict";var ksr=fWe(),Csr=Math.max;hWe.exports=function(e){return Csr(0,ksr(e))}});var mWe=W((GWr,gWe)=>{"use strict";var Dsr=L2().iterator,Fsr=FE(),Lsr=iWe(),Psr=dWe(),pWe=W4(),Isr=hm(),Rsr=F2(),zsr=LE(),vWe=Array.isArray,uee=Function.prototype.call,Fb={configurable:!0,enumerable:!0,writable:!0,value:null},cee=Object.defineProperty;gWe.exports=function(e){var t=arguments[1],r=arguments[2],i,n,a,o,s,l,u,c,f,h;if(e=Object(Isr(e)),Rsr(t)&&pWe(t),!this||this===Array||!Lsr(this)){if(!t){if(Fsr(e))return s=e.length,s!==1?Array.apply(null,e):(o=new Array(1),o[0]=e[0],o);if(vWe(e)){for(o=new Array(s=e.length),n=0;n<s;++n)o[n]=e[n];return o}}o=[]}else i=this;if(!vWe(e)){if((f=e[Dsr])!==void 0){for(u=pWe(f).call(e),i&&(o=new i),c=u.next(),n=0;!c.done;)h=t?uee.call(t,r,c.value,n):c.value,i?(Fb.value=h,cee(o,n,Fb)):o[n]=h,c=u.next(),++n;s=n}else if(zsr(e)){for(s=e.length,i&&(o=new i),n=0,a=0;n<s;++n)h=e[n],n+1<s&&(l=h.charCodeAt(0),l>=55296&&l<=56319&&(h+=e[++n])),h=t?uee.call(t,r,h,a):h,i?(Fb.value=h,cee(o,a,Fb)):o[a]=h,++a;s=a}}if(s===void 0)for(s=Psr(e.length),i&&(o=new i(s)),n=0;n<s;++n)h=t?uee.call(t,r,e[n],n):e[n],i?(Fb.value=h,cee(o,n,Fb)):o[n]=h;return i&&(Fb.value=null,o.length=s),o}});var xWe=W((HWr,yWe)=>{"use strict";yWe.exports=tWe()()?Array.from:mWe()});var bWe=W((jWr,_We)=>{"use strict";var Bsr=xWe(),qsr=SR(),Osr=hm();_We.exports=function(e){var t=Object(Osr(e)),r=arguments[1],i=Object(arguments[2]);if(t!==e&&!r)return t;var n={};return r?Bsr(r,function(a){(i.ensure||a in e)&&(n[a]=e[a])}):qsr(n,e),n}});var AWe=W(($Wr,TWe)=>{"use strict";var Nsr=W4(),Usr=hm(),Vsr=Function.prototype.bind,wWe=Function.prototype.call,Gsr=Object.keys,Hsr=Object.prototype.propertyIsEnumerable;TWe.exports=function(e,t){return function(r,i){var n,a=arguments[2],o=arguments[3];return r=Object(Usr(r)),Nsr(i),n=Gsr(r),o&&n.sort(typeof o=="function"?Vsr.call(o,r):void 0),typeof e!="function"&&(e=n[e]),wWe.call(e,n,function(s,l){return Hsr.call(r,s)?wWe.call(i,a,r[s],s,r,l):t})}}});var SWe=W((WWr,MWe)=>{"use strict";MWe.exports=AWe()("forEach")});var kWe=W((YWr,EWe)=>{"use strict";var jsr=W4(),$sr=SWe(),Wsr=Function.prototype.call;EWe.exports=function(e,t){var r={},i=arguments[2];return jsr(t),$sr(e,function(n,a,o,s){r[a]=Wsr.call(t,i,n,a,o,s)}),r}});var LWe=W((XWr,FWe)=>{"use strict";var Ysr=Db(),Xsr=K$e(),CWe=Q$e(),Zsr=bWe(),Ksr=tee(),Jsr=kWe(),Qsr=Function.prototype.bind,elr=Object.defineProperty,tlr=Object.prototype.hasOwnProperty,DWe;DWe=function(e,t,r){var i=Xsr(t)&&CWe(t.value),n;return n=Zsr(t),delete n.writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&tlr.call(this,e)?i:(t.value=Qsr.call(i,r.resolveContext?r.resolveContext(this):this),elr(this,e,t),this[e])},n};FWe.exports=function(e){var t=Ksr(arguments[1]);return Ysr(t.resolveContext)&&CWe(t.resolveContext),Jsr(e,function(r,i){return DWe(i,r,t)})}});var fee=W((ZWr,zWe)=>{"use strict";var rlr=O$e(),ilr=SR(),nlr=W4(),alr=hm(),Yh=dm(),olr=LWe(),PWe=L2(),IWe=Object.defineProperty,RWe=Object.defineProperties,RE;zWe.exports=RE=function(e,t){if(!(this instanceof RE))throw new TypeError("Constructor requires 'new'");RWe(this,{__list__:Yh("w",alr(e)),__context__:Yh("w",t),__nextIndex__:Yh("w",0)}),t&&(nlr(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))};delete RE.prototype.constructor;RWe(RE.prototype,ilr({_next:Yh(function(){var e;if(this.__list__){if(this.__redo__&&(e=this.__redo__.shift(),e!==void 0))return e;if(this.__nextIndex__<this.__list__.length)return this.__nextIndex__++;this._unBind()}}),next:Yh(function(){return this._createResult(this._next())}),_createResult:Yh(function(e){return e===void 0?{done:!0,value:void 0}:{done:!1,value:this._resolve(e)}}),_resolve:Yh(function(e){return this.__list__[e]}),_unBind:Yh(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:Yh(function(){return"[object "+(this[PWe.toStringTag]||"Object")+"]"})},olr({_onAdd:Yh(function(e){if(!(e>=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){IWe(this,"__redo__",Yh("c",[e]));return}this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:Yh(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(e),t!==-1&&this.__redo__.splice(t,1),this.__redo__.forEach(function(r,i){r>e&&(this.__redo__[i]=--r)},this)))}),_onClear:Yh(function(){this.__redo__&&rlr.call(this.__redo__),this.__nextIndex__=0})})));IWe(RE.prototype,PWe.iterator,Yh(function(){return this}))});var UWe=W((KWr,NWe)=>{"use strict";var BWe=MR(),qWe=iee(),hee=dm(),slr=L2(),dee=fee(),OWe=Object.defineProperty,Y4;Y4=NWe.exports=function(e,t){if(!(this instanceof Y4))throw new TypeError("Constructor requires 'new'");dee.call(this,e),t?qWe.call(t,"key+value")?t="key+value":qWe.call(t,"key")?t="key":t="value":t="value",OWe(this,"__kind__",hee("",t))};BWe&&BWe(Y4,dee);delete Y4.prototype.constructor;Y4.prototype=Object.create(dee.prototype,{_resolve:hee(function(e){return this.__kind__==="value"?this.__list__[e]:this.__kind__==="key+value"?[e,this.__list__[e]]:e})});OWe(Y4.prototype,slr.toStringTag,hee("c","Array Iterator"))});var jWe=W((JWr,HWe)=>{"use strict";var VWe=MR(),DR=dm(),llr=L2(),pee=fee(),GWe=Object.defineProperty,X4;X4=HWe.exports=function(e){if(!(this instanceof X4))throw new TypeError("Constructor requires 'new'");e=String(e),pee.call(this,e),GWe(this,"__length__",DR("",e.length))};VWe&&VWe(X4,pee);delete X4.prototype.constructor;X4.prototype=Object.create(pee.prototype,{_next:DR(function(){if(this.__list__){if(this.__nextIndex__<this.__length__)return this.__nextIndex__++;this._unBind()}}),_resolve:DR(function(e){var t=this.__list__[e],r;return this.__nextIndex__===this.__length__?t:(r=t.charCodeAt(0),r>=55296&&r<=56319?t+this.__list__[this.__nextIndex__++]:t)})});GWe(X4.prototype,llr.toStringTag,DR("c","String Iterator"))});var WWe=W((QWr,$We)=>{"use strict";var ulr=FE(),clr=F2(),flr=LE(),hlr=L2().iterator,dlr=Array.isArray;$We.exports=function(e){return clr(e)?dlr(e)||flr(e)||ulr(e)?!0:typeof e[hlr]=="function":!1}});var XWe=W((eYr,YWe)=>{"use strict";var plr=WWe();YWe.exports=function(e){if(!plr(e))throw new TypeError(e+" is not iterable");return e}});var vee=W((tYr,JWe)=>{"use strict";var vlr=FE(),glr=LE(),ZWe=UWe(),mlr=jWe(),ylr=XWe(),KWe=L2().iterator;JWe.exports=function(e){return typeof ylr(e)[KWe]=="function"?e[KWe]():vlr(e)?new ZWe(e):glr(e)?new mlr(e):new ZWe(e)}});var eYe=W((rYr,QWe)=>{"use strict";var xlr=FE(),_lr=W4(),blr=LE(),wlr=vee(),Tlr=Array.isArray,gee=Function.prototype.call,Alr=Array.prototype.some;QWe.exports=function(e,t){var r,i=arguments[2],n,a,o,s,l,u,c;if(Tlr(e)||xlr(e)?r="array":blr(e)?r="string":e=wlr(e),_lr(t),a=function(){o=!0},r==="array"){Alr.call(e,function(f){return gee.call(t,i,f,a),o});return}if(r==="string"){for(l=e.length,s=0;s<l&&(u=e[s],s+1<l&&(c=u.charCodeAt(0),c>=55296&&c<=56319&&(u+=e[++s])),gee.call(t,i,u,a),!o);++s);return}for(n=e.next();!n.done;){if(gee.call(t,i,n.value,a),o)return;n=e.next()}}});var rYe=W((iYr,tYe)=>{"use strict";tYe.exports=(function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"})()});var aYe=W((nYr,nYe)=>{"use strict";var Mlr=F2(),LR=MR(),FR=Lje(),Slr=hm(),Elr=Ije(),pm=dm(),klr=vee(),Clr=eYe(),Dlr=L2().toStringTag,iYe=rYe(),Flr=Array.isArray,yee=Object.defineProperty,mee=Object.prototype.hasOwnProperty,Llr=Object.getPrototypeOf,P2;nYe.exports=P2=function(){var e=arguments[0],t;if(!(this instanceof P2))throw new TypeError("Constructor requires 'new'");return t=iYe&&LR&&WeakMap!==P2?LR(new WeakMap,Llr(this)):this,Mlr(e)&&(Flr(e)||(e=klr(e))),yee(t,"__weakMapData__",pm("c","$weakMap$"+Elr())),e&&Clr(e,function(r){Slr(r),t.set(r[0],r[1])}),t};iYe&&(LR&&LR(P2,WeakMap),P2.prototype=Object.create(WeakMap.prototype,{constructor:pm(P2)}));Object.defineProperties(P2.prototype,{delete:pm(function(e){return mee.call(FR(e),this.__weakMapData__)?(delete e[this.__weakMapData__],!0):!1}),get:pm(function(e){if(mee.call(FR(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:pm(function(e){return mee.call(FR(e),this.__weakMapData__)}),set:pm(function(e,t){return yee(FR(e),this.__weakMapData__,pm("c",t)),this}),toString:pm(function(){return"[object WeakMap]"})});yee(P2.prototype,Dlr,pm("c","WeakMap"))});var xee=W((aYr,oYe)=>{"use strict";oYe.exports=xje()()?WeakMap:aYe()});var lYe=W((oYr,sYe)=>{"use strict";sYe.exports=function(e,t,r){if(typeof Array.prototype.findIndex=="function")return e.findIndex(t,r);if(typeof t!="function")throw new TypeError("predicate must be a function");var i=Object(e),n=i.length;if(n===0)return-1;for(var a=0;a<n;a++)if(t.call(r,i[a],a,i))return a;return-1}});var wee=W((sYr,fYe)=>{"use strict";var PR=ME(),Plr=Mb(),bee=qu(),Ilr=N1(),Rlr=Sb(),uYe=vje(),zlr=mje(),{float32:Blr,fract32:_ee}=gR(),qlr=xee(),cYe=q4(),Olr=lYe(),Nlr=`
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.;
}
`,Ulr=`
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;
}
`,Vlr=`
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;
}
`,Glr=`
precision highp float;
varying vec4 fragColor;
void main() {
gl_FragColor = fragColor;
}
`,Hlr=`
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;
}
}
}
`,jlr=`
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;
}
`;fYe.exports=fs;function fs(e,t){if(!(this instanceof fs))return new fs(e,t);if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=e._gl,this.regl=e,this.passes=[],this.shaders=fs.shaders.has(e)?fs.shaders.get(e):fs.shaders.set(e,fs.createShaders(e)).get(e),this.update(t)}fs.dashMult=2;fs.maxPatternLength=256;fs.precisionThreshold=3e6;fs.maxPoints=1e4;fs.maxLines=2048;fs.shaders=new qlr;fs.createShaders=function(e){let t=e.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),r={primitive:"triangle strip",instances:e.prop("count"),count:4,offset:0,uniforms:{miterMode:(o,s)=>s.join==="round"?2:1,miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashTexture:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashLength:e.prop("dashLength"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight],depth:e.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(o,s)=>!s.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},i=e(bee({vert:Nlr,frag:Ulr,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},r)),n;try{n=e(bee({cull:{enable:!0,face:"back"},vert:Hlr,frag:jlr,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},r))}catch(o){n=i}return{fill:e({primitive:"triangle",elements:(o,s)=>s.triangles,offset:0,vert:Vlr,frag:Glr,uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight]},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:i,miter:n}};fs.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};fs.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};fs.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((t,r)=>{if(t&&Array.isArray(t))return this.draw(...t);typeof t=="number"&&(t=this.passes[t]),t&&t.count>1&&t.opacity&&(this.regl._refresh(),t.fill&&t.triangles&&t.triangles.length>2&&this.shaders.fill(t),t.thickness&&(t.scale[0]*t.viewport.width>fs.precisionThreshold||t.scale[1]*t.viewport.height>fs.precisionThreshold?this.shaders.rect(t):t.join==="rect"||!t.join&&(t.thickness<=2||t.count>=fs.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};fs.prototype.update=function(e){if(!e)return;e.length!=null?typeof e[0]=="number"&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:r}=this;if(e.forEach((n,a)=>{let o=this.passes[a];if(n!==void 0){if(n===null){this.passes[a]=null;return}if(typeof n[0]=="number"&&(n={positions:n}),n=Ilr(n,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),o||(this.passes[a]=o={id:a,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},n=bee({},fs.defaults,n)),n.thickness!=null&&(o.thickness=parseFloat(n.thickness)),n.opacity!=null&&(o.opacity=parseFloat(n.opacity)),n.miterLimit!=null&&(o.miterLimit=parseFloat(n.miterLimit)),n.overlay!=null&&(o.overlay=!!n.overlay,a<fs.maxLines&&(o.depth=2*(fs.maxLines-1-a%fs.maxLines)/fs.maxLines-1)),n.join!=null&&(o.join=n.join),n.hole!=null&&(o.hole=n.hole),n.fill!=null&&(o.fill=n.fill?PR(n.fill,"uint8"):null),n.viewport!=null&&(o.viewport=cYe(n.viewport)),o.viewport||(o.viewport=cYe([r.drawingBufferWidth,r.drawingBufferHeight])),n.close!=null&&(o.close=n.close),n.positions===null&&(n.positions=[]),n.positions){let u,c;if(n.positions.x&&n.positions.y){let p=n.positions.x,v=n.positions.y;c=o.count=Math.max(p.length,v.length),u=new Float64Array(c*2);for(let m=0;m<c;m++)u[m*2]=p[m],u[m*2+1]=v[m]}else u=Rlr(n.positions,"float64"),c=o.count=Math.floor(u.length/2);let f=o.bounds=Plr(u,2);if(o.fill){let p=[],v={},m=0;for(let g=0,w=0,b=o.count;g<b;g++){let _=u[g*2],M=u[g*2+1];isNaN(_)||isNaN(M)||_==null||M==null?(_=u[m*2],M=u[m*2+1],v[g]=m):m=g,p[w++]=_,p[w++]=M}if(n.splitNull){o.count-1 in v||(v[o.count]=o.count-1);let g=Object.keys(v).map(Number).sort((M,x)=>M-x),w=[],b=0,_=o.hole!=null?o.hole[0]:null;if(_!=null){let M=Olr(g,x=>x>=_);g=g.slice(0,M),g.push(_)}for(let M=0;M<g.length;M++){let x=p.slice(b*2,g[M]*2).concat(_?p.slice(_*2):[]),T=(o.hole||[]).map(y=>y-_+(g[M]-b)),A=uYe(x,T);A=A.map(y=>y+b+(y+b<g[M]?0:_-g[M])),w.push(...A),b=g[M]+1}for(let M=0,x=w.length;M<x;M++)v[w[M]]!=null&&(w[M]=v[w[M]]);o.triangles=w}else{let g=uYe(p,o.hole||[]);for(let w=0,b=g.length;w<b;w++)v[g[w]]!=null&&(g[w]=v[g[w]]);o.triangles=g}}let h=new Float64Array(u);zlr(h,2,f);let d=new Float64Array(c*2+6);o.close?u[0]===u[c*2-2]&&u[1]===u[c*2-1]?(d[0]=h[c*2-4],d[1]=h[c*2-3]):(d[0]=h[c*2-2],d[1]=h[c*2-1]):(d[0]=h[0],d[1]=h[1]),d.set(h,2),o.close?u[0]===u[c*2-2]&&u[1]===u[c*2-1]?(d[c*2+2]=h[2],d[c*2+3]=h[3],o.count-=1):(d[c*2+2]=h[0],d[c*2+3]=h[1],d[c*2+4]=h[2],d[c*2+5]=h[3]):(d[c*2+2]=h[c*2-2],d[c*2+3]=h[c*2-1],d[c*2+4]=h[c*2-2],d[c*2+5]=h[c*2-1]);var s=Blr(d);o.positionBuffer(s);var l=_ee(d,s);o.positionFractBuffer(l)}if(n.range?o.range=n.range:o.range||(o.range=o.bounds),(n.range||n.positions)&&o.count){let u=o.bounds,c=u[2]-u[0],f=u[3]-u[1],h=o.range[2]-o.range[0],d=o.range[3]-o.range[1];o.scale=[c/h,f/d],o.translate=[-o.range[0]/h+u[0]/h||0,-o.range[1]/d+u[1]/d||0],o.scaleFract=_ee(o.scale),o.translateFract=_ee(o.translate)}if(n.dashes){let u=0,c;if(!n.dashes||n.dashes.length<2)u=1,c=new Uint8Array([255,255,255,255,255,255,255,255]);else{u=0;for(let d=0;d<n.dashes.length;++d)u+=n.dashes[d];c=new Uint8Array(u*fs.dashMult);let f=0,h=255;for(let d=0;d<2;d++)for(let p=0;p<n.dashes.length;++p){for(let v=0,m=n.dashes[p]*fs.dashMult*.5;v<m;++v)c[f++]=h;h^=255}}o.dashLength=u,o.dashTexture({channels:1,data:c,width:c.length,height:1,mag:"linear",min:"linear"},0,0)}if(n.color){let u=o.count,c=n.color;c||(c="transparent");let f=new Uint8Array(u*4+4);if(!Array.isArray(c)||typeof c[0]=="number"){let h=PR(c,"uint8");for(let d=0;d<u+1;d++)f.set(h,d*4)}else{for(let h=0;h<u;h++){let d=PR(c[h],"uint8");f.set(d,h*4)}f.set(PR(c[0],"uint8"),u*4)}o.colorBuffer({usage:"dynamic",type:"uint8",data:f})}}}),e.length<this.passes.length){for(let n=e.length;n<this.passes.length;n++){let a=this.passes[n];a&&(a.colorBuffer.destroy(),a.positionBuffer.destroy(),a.dashTexture.destroy())}this.passes.length=e.length}let i=[];for(let n=0;n<this.passes.length;n++)this.passes[n]!==null&&i.push(this.passes[n]);return this.passes=i,this};fs.prototype.destroy=function(){return this.passes.forEach(e=>{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var gYe=W((lYr,vYe)=>{"use strict";var $lr=Mb(),Wlr=ME(),Ylr=GQ(),Xlr=N1(),hYe=qu(),dYe=Sb(),{float32:Zlr,fract32:Tee}=gR();vYe.exports=Klr;var pYe=[[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 Klr(e,t){if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let r=e._gl,i,n,a,o,s,l,u={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},c=[];return o=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),n=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),a=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),s=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),l=e.buffer({usage:"static",type:"float",data:pYe}),p(t),i=e({vert:`
precision highp float;
attribute vec2 position, positionFract;
attribute vec4 error;
attribute vec4 color;
attribute vec2 direction, lineOffset, capOffset;
uniform vec4 viewport;
uniform float lineWidth, capSize;
uniform vec2 scale, scaleFract, translate, translateFract;
varying vec4 fragColor;
void main() {
fragColor = color / 255.;
vec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;
vec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;
vec2 position = position + dxy;
vec2 pos = (position + translate) * scale
+ (positionFract + translateFract) * scale
+ (position + translate) * scaleFract
+ (positionFract + translateFract) * scaleFract;
pos += pixelOffset / viewport.zw;
gl_Position = vec4(pos * 2. - 1., 0, 1);
}
`,frag:`
precision highp float;
varying vec4 fragColor;
uniform float opacity;
void main() {
gl_FragColor = fragColor;
gl_FragColor.a *= opacity;
}
`,uniforms:{range:e.prop("range"),lineWidth:e.prop("lineWidth"),capSize:e.prop("capSize"),opacity:e.prop("opacity"),scale:e.prop("scale"),translate:e.prop("translate"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),viewport:(m,g)=>[g.viewport.x,g.viewport.y,m.viewportWidth,m.viewportHeight]},attributes:{color:{buffer:o,offset:(m,g)=>g.offset*4,divisor:1},position:{buffer:n,offset:(m,g)=>g.offset*8,divisor:1},positionFract:{buffer:a,offset:(m,g)=>g.offset*8,divisor:1},error:{buffer:s,offset:(m,g)=>g.offset*16,divisor:1},direction:{buffer:l,stride:24,offset:0},lineOffset:{buffer:l,stride:24,offset:8},capOffset:{buffer:l,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:pYe.length}),hYe(f,{update:p,draw:h,destroy:v,regl:e,gl:r,canvas:r.canvas,groups:c}),f;function f(m){m?p(m):m===null&&v(),h()}function h(m){if(typeof m=="number")return d(m);m&&!Array.isArray(m)&&(m=[m]),e._refresh(),c.forEach((g,w)=>{if(g){if(m&&(m[w]?g.draw=!0:g.draw=!1),!g.draw){g.draw=!0;return}d(w)}})}function d(m){typeof m=="number"&&(m=c[m]),m!=null&&m&&m.count&&m.color&&m.opacity&&m.positions&&m.positions.length>1&&(m.scaleRatio=[m.scale[0]*m.viewport.width,m.scale[1]*m.viewport.height],i(m),m.after&&m.after(m))}function p(m){if(!m)return;m.length!=null?typeof m[0]=="number"&&(m=[{positions:m}]):Array.isArray(m)||(m=[m]);let g=0,w=0;if(f.groups=c=m.map((M,x)=>{let T=c[x];if(M)typeof M=="function"?M={after:M}:typeof M[0]=="number"&&(M={positions:M});else return T;return M=Xlr(M,{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"}),T||(c[x]=T={id:x,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},M=hYe({},u,M)),Ylr(T,M,[{lineWidth:A=>+A*.5,capSize:A=>+A*.5,opacity:parseFloat,errors:A=>(A=dYe(A),w+=A.length,A),positions:(A,y)=>(A=dYe(A,"float64"),y.count=Math.floor(A.length/2),y.bounds=$lr(A,2),y.offset=g,g+=y.count,A)},{color:(A,y)=>{let E=y.count;if(A||(A="transparent"),!Array.isArray(A)||typeof A[0]=="number"){let C=A;A=Array(E);for(let k=0;k<E;k++)A[k]=C}if(A.length<E)throw Error("Not enough colors");let S=new Uint8Array(E*4);for(let C=0;C<E;C++){let k=Wlr(A[C],"uint8");S.set(k,C*4)}return S},range:(A,y,E)=>{let S=y.bounds;return A||(A=S),y.scale=[1/(A[2]-A[0]),1/(A[3]-A[1])],y.translate=[-A[0],-A[1]],y.scaleFract=Tee(y.scale),y.translateFract=Tee(y.translate),A},viewport:A=>{let y;return Array.isArray(A)?y={x:A[0],y:A[1],width:A[2]-A[0],height:A[3]-A[1]}:A?(y={x:A.x||A.left||0,y:A.y||A.top||0},A.right?y.width=A.right-y.x:y.width=A.w||A.width||0,A.bottom?y.height=A.bottom-y.y:y.height=A.h||A.height||0):y={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},y}}]),T}),g||w){let M=c.reduce((y,E,S)=>y+(E?E.count:0),0),x=new Float64Array(M*2),T=new Uint8Array(M*4),A=new Float32Array(M*4);c.forEach((y,E)=>{if(!y)return;let{positions:S,count:C,offset:k,color:D,errors:F}=y;C&&(T.set(D,k*4),A.set(F,k*4),x.set(S,k*2))});var b=Zlr(x);n(b);var _=Tee(x,b);a(_),o(T),s(A)}}function v(){n.destroy(),a.destroy(),o.destroy(),s.destroy(),l.destroy()}}});var xYe=W((uYr,yYe)=>{var mYe=/[\'\"]/;yYe.exports=function(t){return t?(mYe.test(t.charAt(0))&&(t=t.substr(1)),mYe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}});var Aee=W((cYr,Jlr)=>{Jlr.exports=["inherit","initial","unset"]});var Mee=W((fYr,Qlr)=>{Qlr.exports=["caption","icon","menu","message-box","small-caption","status-bar"]});var See=W((hYr,eur)=>{eur.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]});var Eee=W((dYr,tur)=>{tur.exports=["normal","italic","oblique"]});var kee=W((pYr,rur)=>{rur.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]});var TYe=W((vYr,wYe)=>{"use strict";function _Ye(e,t){if(typeof e!="string")return[e];var r=[e];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var i=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],n=t.escape||"___",a=!!t.flat;i.forEach(function(l){var u=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),c=[];function f(h,d,p){var v=r.push(h.slice(l[0].length,-l[1].length))-1;return c.push(v),n+v+n}r.forEach(function(h,d){for(var p,v=0;h!=p;)if(p=h,h=h.replace(u,f),v++>1e4)throw Error("References have circular dependency. Please, check them.");r[d]=h}),c=c.reverse(),r=r.map(function(h){return c.forEach(function(d){h=h.replace(new RegExp("(\\"+n+d+"\\"+n+")","g"),l[0]+"$1"+l[1])}),h})});var o=new RegExp("\\"+n+"([0-9]+)\\"+n);function s(l,u,c){for(var f=[],h,d=0;h=o.exec(l);){if(d++>1e4)throw Error("Circular references in parenthesis");f.push(l.slice(0,h.index)),f.push(s(u[h[1]],u)),l=l.slice(h.index+h[0].length)}return f.push(l),f}return a?r:s(r[0],r)}function bYe(e,t){if(t&&t.flat){var r=t&&t.escape||"___",i=e[0],n;if(!i)return"";for(var a=new RegExp("\\"+r+"([0-9]+)\\"+r),o=0;i!=n;){if(o++>1e4)throw Error("Circular references in "+e);n=i,i=i.replace(a,s)}return i}return e.reduce(function l(u,c){return Array.isArray(c)&&(c=c.reduce(l,"")),u+c},"");function s(l,u){if(e[u]==null)throw Error("Reference "+u+"is undefined");return e[u]}}function Cee(e,t){return Array.isArray(e)?bYe(e,t):_Ye(e,t)}Cee.parse=_Ye;Cee.stringify=bYe;wYe.exports=Cee});var SYe=W((gYr,MYe)=>{"use strict";var AYe=TYe();MYe.exports=function(t,r,i){if(t==null)throw Error("First argument should be a string");if(r==null)throw Error("Separator should be a string or a RegExp");i?(typeof i=="string"||Array.isArray(i))&&(i={ignore:i}):i={},i.escape==null&&(i.escape=!0),i.ignore==null?i.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof i.ignore=="string"&&(i.ignore=[i.ignore]),i.ignore=i.ignore.map(function(f){return f.length===1&&(f=f+f),f}));var n=AYe.parse(t,{flat:!0,brackets:i.ignore}),a=n[0],o=a.split(r);if(i.escape){for(var s=[],l=0;l<o.length;l++){var u=o[l],c=o[l+1];u[u.length-1]==="\\"&&u[u.length-2]!=="\\"?(s.push(u+r+c),l++):s.push(u)}o=s}for(var l=0;l<o.length;l++)n[0]=o[l],o[l]=AYe.stringify(n,{flat:!0});return o}});var EYe=W((mYr,iur)=>{iur.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]});var Dee=W((yYr,kYe)=>{"use strict";var nur=EYe();kYe.exports={isSize:function(t){return/^[\d\.]/.test(t)||t.indexOf("/")!==-1||nur.indexOf(t)!==-1}}});var LYe=W((xYr,FYe)=>{"use strict";var aur=xYe(),our=Aee(),sur=Mee(),lur=See(),uur=Eee(),cur=kee(),Fee=SYe(),fur=Dee().isSize;FYe.exports=DYe;var zE=DYe.cache={};function DYe(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(zE[e])return zE[e];if(e==="")throw new Error("Cannot parse an empty string.");if(sur.indexOf(e)!==-1)return zE[e]={system:e};for(var t={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},r=Fee(e,/\s+/),i;i=r.shift();){if(our.indexOf(i)!==-1)return["style","variant","weight","stretch"].forEach(function(a){t[a]=i}),zE[e]=t;if(uur.indexOf(i)!==-1){t.style=i;continue}if(i==="normal"||i==="small-caps"){t.variant=i;continue}if(cur.indexOf(i)!==-1){t.stretch=i;continue}if(lur.indexOf(i)!==-1){t.weight=i;continue}if(fur(i)){var n=Fee(i,"/");if(t.size=n[0],n[1]!=null?t.lineHeight=CYe(n[1]):r[0]==="/"&&(r.shift(),t.lineHeight=CYe(r.shift())),!r.length)throw new Error("Missing required font-family.");return t.family=Fee(r.join(" "),/\s*,\s*/).map(aur),zE[e]=t}throw new Error("Unknown or unsupported font token: "+i)}throw new Error("Missing required font-size.")}function CYe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var Pee=W((_Yr,PYe)=>{"use strict";var hur=N1(),dur=Dee().isSize,pur=qE(Aee()),vur=qE(Mee()),gur=qE(See()),mur=qE(Eee()),yur=qE(kee()),xur={normal:1,"small-caps":1},_ur={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},Lee={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};PYe.exports=function(t){if(t=hur(t,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),t.system)return t.system&&BE(t.system,vur),t.system;if(BE(t.style,mur),BE(t.variant,xur),BE(t.weight,gur),BE(t.stretch,yur),t.size==null&&(t.size=Lee.size),typeof t.size=="number"&&(t.size+="px"),!dur)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=Lee.family),Array.isArray(t.family)&&(t.family.length||(t.family=[Lee.family]),t.family=t.family.map(function(i){return _ur[i]?i:'"'+i+'"'}).join(", "));var r=[];return r.push(t.style),t.variant!==t.style&&r.push(t.variant),t.weight!==t.variant&&t.weight!==t.style&&r.push(t.weight),t.stretch!==t.weight&&t.stretch!==t.variant&&t.stretch!==t.style&&r.push(t.stretch),r.push(t.size+(t.lineHeight==null||t.lineHeight==="normal"||t.lineHeight+""=="1"?"":"/"+t.lineHeight)),r.push(t.family),r.filter(Boolean).join(" ")};function BE(e,t){if(e&&!t[e]&&!pur[e])throw Error("Unknown keyword `"+e+"`");return e}function qE(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=1;return t}});var RYe=W((bYr,IYe)=>{"use strict";IYe.exports={parse:LYe(),stringify:Pee()}});var zee=W((Iee,Ree)=>{(function(e,t){typeof Iee=="object"&&typeof Ree!="undefined"?Ree.exports=t():e.createREGL=t()})(Iee,(function(){"use strict";var e=function(Be,gt){for(var Mt=Object.keys(gt),or=0;or<Mt.length;++or)Be[Mt[or]]=gt[Mt[or]];return Be},t=0,r=0,i=5,n=6;function a(Be,gt){this.id=t++,this.type=Be,this.data=gt}function o(Be){return Be.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function s(Be){if(Be.length===0)return[];var gt=Be.charAt(0),Mt=Be.charAt(Be.length-1);if(Be.length>1&&gt===Mt&&(gt==='"'||gt==="'"))return['"'+o(Be.substr(1,Be.length-2))+'"'];var or=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Be);if(or)return s(Be.substr(0,or.index)).concat(s(or[1])).concat(s(Be.substr(or.index+or[0].length)));var vr=Be.split(".");if(vr.length===1)return['"'+o(Be)+'"'];for(var wr=[],dr=0;dr<vr.length;++dr)wr=wr.concat(s(vr[dr]));return wr}function l(Be){return"["+s(Be).join("][")+"]"}function u(Be,gt){return new a(Be,l(gt+""))}function c(Be){return typeof Be=="function"&&!Be._reglType||Be instanceof a}function f(Be,gt){if(typeof Be=="function")return new a(r,Be);if(typeof Be=="number"||typeof Be=="boolean")return new a(i,Be);if(Array.isArray(Be))return new a(n,Be.map(function(Mt,or){return f(Mt,gt+"["+or+"]")}));if(Be instanceof a)return Be}var h={DynamicVariable:a,define:u,isDynamic:c,unbox:f,accessor:l},d={next:typeof requestAnimationFrame=="function"?function(Be){return requestAnimationFrame(Be)}:function(Be){return setTimeout(Be,16)},cancel:typeof cancelAnimationFrame=="function"?function(Be){return cancelAnimationFrame(Be)}:clearTimeout},p=typeof performance!="undefined"&&performance.now?function(){return performance.now()}:function(){return+new Date};function v(){var Be={"":0},gt=[""];return{id:function(Mt){var or=Be[Mt];return or||(or=Be[Mt]=gt.length,gt.push(Mt),or)},str:function(Mt){return gt[Mt]}}}function m(Be,gt,Mt){var or=document.createElement("canvas");e(or.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),Be.appendChild(or),Be===document.body&&(or.style.position="absolute",e(Be.style,{margin:0,padding:0}));function vr(){var Br=window.innerWidth,Zr=window.innerHeight;if(Be!==document.body){var Kr=or.getBoundingClientRect();Br=Kr.right-Kr.left,Zr=Kr.bottom-Kr.top}or.width=Mt*Br,or.height=Mt*Zr}var wr;Be!==document.body&&typeof ResizeObserver=="function"?(wr=new ResizeObserver(function(){setTimeout(vr)}),wr.observe(Be)):window.addEventListener("resize",vr,!1);function dr(){wr?wr.disconnect():window.removeEventListener("resize",vr),Be.removeChild(or)}return vr(),{canvas:or,onDestroy:dr}}function g(Be,gt){function Mt(or){try{return Be.getContext(or,gt)}catch(vr){return null}}return Mt("webgl")||Mt("experimental-webgl")||Mt("webgl-experimental")}function w(Be){return typeof Be.nodeName=="string"&&typeof Be.appendChild=="function"&&typeof Be.getBoundingClientRect=="function"}function b(Be){return typeof Be.drawArrays=="function"||typeof Be.drawElements=="function"}function _(Be){return typeof Be=="string"?Be.split():Be}function M(Be){return typeof Be=="string"?document.querySelector(Be):Be}function x(Be){var gt=Be||{},Mt,or,vr,wr,dr={},Br=[],Zr=[],Kr=typeof window=="undefined"?1:window.devicePixelRatio,Jr=!1,un={},Oi=function(Qt){},mi=function(){};if(typeof gt=="string"?Mt=document.querySelector(gt):typeof gt=="object"&&(w(gt)?Mt=gt:b(gt)?(wr=gt,vr=wr.canvas):("gl"in gt?wr=gt.gl:"canvas"in gt?vr=M(gt.canvas):"container"in gt&&(or=M(gt.container)),"attributes"in gt&&(dr=gt.attributes),"extensions"in gt&&(Br=_(gt.extensions)),"optionalExtensions"in gt&&(Zr=_(gt.optionalExtensions)),"onDone"in gt&&(Oi=gt.onDone),"profile"in gt&&(Jr=!!gt.profile),"pixelRatio"in gt&&(Kr=+gt.pixelRatio),"cachedCode"in gt&&(un=gt.cachedCode))),Mt&&(Mt.nodeName.toLowerCase()==="canvas"?vr=Mt:or=Mt),!wr){if(!vr){var Fr=m(or||document.body,Oi,Kr);if(!Fr)return null;vr=Fr.canvas,mi=Fr.onDestroy}dr.premultipliedAlpha===void 0&&(dr.premultipliedAlpha=!0),wr=g(vr,dr)}return wr?{gl:wr,canvas:vr,container:or,extensions:Br,optionalExtensions:Zr,pixelRatio:Kr,profile:Jr,cachedCode:un,onDone:Oi,onDestroy:mi}:(mi(),Oi("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function T(Be,gt){var Mt={};function or(dr){var Br=dr.toLowerCase(),Zr;try{Zr=Mt[Br]=Be.getExtension(Br)}catch(Kr){}return!!Zr}for(var vr=0;vr<gt.extensions.length;++vr){var wr=gt.extensions[vr];if(!or(wr))return gt.onDestroy(),gt.onDone('"'+wr+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return gt.optionalExtensions.forEach(or),{extensions:Mt,restore:function(){Object.keys(Mt).forEach(function(dr){if(Mt[dr]&&!or(dr))throw new Error("(regl): error restoring extension "+dr)})}}}function A(Be,gt){for(var Mt=Array(Be),or=0;or<Be;++or)Mt[or]=gt(or);return Mt}var y=5120,E=5121,S=5122,C=5123,k=5124,D=5125,F=5126;function P(Be){for(var gt=16;gt<=1<<28;gt*=16)if(Be<=gt)return gt;return 0}function R(Be){var gt,Mt;return gt=(Be>65535)<<4,Be>>>=gt,Mt=(Be>255)<<3,Be>>>=Mt,gt|=Mt,Mt=(Be>15)<<2,Be>>>=Mt,gt|=Mt,Mt=(Be>3)<<1,Be>>>=Mt,gt|=Mt,gt|Be>>1}function L(){var Be=A(8,function(){return[]});function gt(wr){var dr=P(wr),Br=Be[R(dr)>>2];return Br.length>0?Br.pop():new ArrayBuffer(dr)}function Mt(wr){Be[R(wr.byteLength)>>2].push(wr)}function or(wr,dr){var Br=null;switch(wr){case y:Br=new Int8Array(gt(dr),0,dr);break;case E:Br=new Uint8Array(gt(dr),0,dr);break;case S:Br=new Int16Array(gt(2*dr),0,dr);break;case C:Br=new Uint16Array(gt(2*dr),0,dr);break;case k:Br=new Int32Array(gt(4*dr),0,dr);break;case D:Br=new Uint32Array(gt(4*dr),0,dr);break;case F:Br=new Float32Array(gt(4*dr),0,dr);break;default:return null}return Br.length!==dr?Br.subarray(0,dr):Br}function vr(wr){Mt(wr.buffer)}return{alloc:gt,free:Mt,allocType:or,freeType:vr}}var I=L();I.zero=L();var B=3408,O=3410,$=3411,Y=3412,K=3413,j=3414,q=3415,J=33901,U=33902,V=3379,X=3386,H=34921,G=36347,Q=36348,te=35661,ce=35660,ge=34930,Ce=36349,be=34076,he=34024,oe=7936,Ee=7937,ye=7938,ue=35724,ee=34047,ae=36063,xe=34852,re=3553,pe=34067,we=34069,Fe=33984,Se=6408,ke=5126,_e=5121,Ie=36160,Oe=36053,Qe=36064,et=16384,_t=function(Be,gt){var Mt=1;gt.ext_texture_filter_anisotropic&&(Mt=Be.getParameter(ee));var or=1,vr=1;gt.webgl_draw_buffers&&(or=Be.getParameter(xe),vr=Be.getParameter(ae));var wr=!!gt.oes_texture_float;if(wr){var dr=Be.createTexture();Be.bindTexture(re,dr),Be.texImage2D(re,0,Se,1,1,0,Se,ke,null);var Br=Be.createFramebuffer();if(Be.bindFramebuffer(Ie,Br),Be.framebufferTexture2D(Ie,Qe,re,dr,0),Be.bindTexture(re,null),Be.checkFramebufferStatus(Ie)!==Oe)wr=!1;else{Be.viewport(0,0,1,1),Be.clearColor(1,0,0,1),Be.clear(et);var Zr=I.allocType(ke,4);Be.readPixels(0,0,1,1,Se,ke,Zr),Be.getError()?wr=!1:(Be.deleteFramebuffer(Br),Be.deleteTexture(dr),wr=Zr[0]===1),I.freeType(Zr)}}var Kr=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Jr=!0;if(!Kr){var un=Be.createTexture(),Oi=I.allocType(_e,36);Be.activeTexture(Fe),Be.bindTexture(pe,un),Be.texImage2D(we,0,Se,3,3,0,Se,_e,Oi),I.freeType(Oi),Be.bindTexture(pe,null),Be.deleteTexture(un),Jr=!Be.getError()}return{colorBits:[Be.getParameter(O),Be.getParameter($),Be.getParameter(Y),Be.getParameter(K)],depthBits:Be.getParameter(j),stencilBits:Be.getParameter(q),subpixelBits:Be.getParameter(B),extensions:Object.keys(gt).filter(function(mi){return!!gt[mi]}),maxAnisotropic:Mt,maxDrawbuffers:or,maxColorAttachments:vr,pointSizeDims:Be.getParameter(J),lineWidthDims:Be.getParameter(U),maxViewportDims:Be.getParameter(X),maxCombinedTextureUnits:Be.getParameter(te),maxCubeMapSize:Be.getParameter(be),maxRenderbufferSize:Be.getParameter(he),maxTextureUnits:Be.getParameter(ge),maxTextureSize:Be.getParameter(V),maxAttributes:Be.getParameter(H),maxVertexUniforms:Be.getParameter(G),maxVertexTextureUnits:Be.getParameter(ce),maxVaryingVectors:Be.getParameter(Q),maxFragmentUniforms:Be.getParameter(Ce),glsl:Be.getParameter(ue),renderer:Be.getParameter(Ee),vendor:Be.getParameter(oe),version:Be.getParameter(ye),readFloat:wr,npotTextureCube:Jr}},ut=function(Be){return Be instanceof Uint8Array||Be instanceof Uint16Array||Be instanceof Uint32Array||Be instanceof Int8Array||Be instanceof Int16Array||Be instanceof Int32Array||Be instanceof Float32Array||Be instanceof Float64Array||Be instanceof Uint8ClampedArray};function vt(Be){return!!Be&&typeof Be=="object"&&Array.isArray(Be.shape)&&Array.isArray(Be.stride)&&typeof Be.offset=="number"&&Be.shape.length===Be.stride.length&&(Array.isArray(Be.data)||ut(Be.data))}var Xe=function(Be){return Object.keys(Be).map(function(gt){return Be[gt]})},mt={shape:Re,flatten:je};function bt(Be,gt,Mt){for(var or=0;or<gt;++or)Mt[or]=Be[or]}function Ne(Be,gt,Mt,or){for(var vr=0,wr=0;wr<gt;++wr)for(var dr=Be[wr],Br=0;Br<Mt;++Br)or[vr++]=dr[Br]}function Ue(Be,gt,Mt,or,vr,wr){for(var dr=wr,Br=0;Br<gt;++Br)for(var Zr=Be[Br],Kr=0;Kr<Mt;++Kr)for(var Jr=Zr[Kr],un=0;un<or;++un)vr[dr++]=Jr[un]}function Ge(Be,gt,Mt,or,vr){for(var wr=1,dr=Mt+1;dr<gt.length;++dr)wr*=gt[dr];var Br=gt[Mt];if(gt.length-Mt===4){var Zr=gt[Mt+1],Kr=gt[Mt+2],Jr=gt[Mt+3];for(dr=0;dr<Br;++dr)Ue(Be[dr],Zr,Kr,Jr,or,vr),vr+=wr}else for(dr=0;dr<Br;++dr)Ge(Be[dr],gt,Mt+1,or,vr),vr+=wr}function je(Be,gt,Mt,or){var vr=1;if(gt.length)for(var wr=0;wr<gt.length;++wr)vr*=gt[wr];else vr=0;var dr=or||I.allocType(Mt,vr);switch(gt.length){case 0:break;case 1:bt(Be,gt[0],dr);break;case 2:Ne(Be,gt[0],gt[1],dr);break;case 3:Ue(Be,gt[0],gt[1],gt[2],dr,0);break;default:Ge(Be,gt,0,dr,0)}return dr}function Re(Be){for(var gt=[],Mt=Be;Mt.length;Mt=Mt[0])gt.push(Mt.length);return gt}var Ve={"[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},ct=5120,Tt=5122,Xt=5124,Vt=5121,lr=5123,ur=5125,Bt=5126,Zt=5126,kr={int8:ct,int16:Tt,int32:Xt,uint8:Vt,uint16:lr,uint32:ur,float:Bt,float32:Zt},$e=35048,tt=35040,st={dynamic:$e,stream:tt,static:35044},xt=mt.flatten,Je=mt.shape,Ct=35044,ir=35040,hr=5121,Ur=5126,si=[];si[5120]=1,si[5122]=2,si[5124]=4,si[5121]=1,si[5123]=2,si[5125]=4,si[5126]=4;function ei(Be){return Ve[Object.prototype.toString.call(Be)]|0}function Lr(Be,gt){for(var Mt=0;Mt<gt.length;++Mt)Be[Mt]=gt[Mt]}function $i(Be,gt,Mt,or,vr,wr,dr){for(var Br=0,Zr=0;Zr<Mt;++Zr)for(var Kr=0;Kr<or;++Kr)Be[Br++]=gt[vr*Zr+wr*Kr+dr]}function Tn(Be,gt,Mt,or){var vr=0,wr={};function dr(Qt){this.id=vr++,this.buffer=Be.createBuffer(),this.type=Qt,this.usage=Ct,this.byteLength=0,this.dimension=1,this.dtype=hr,this.persistentData=null,Mt.profile&&(this.stats={size:0})}dr.prototype.bind=function(){Be.bindBuffer(this.type,this.buffer)},dr.prototype.destroy=function(){Oi(this)};var Br=[];function Zr(Qt,Sr){var jr=Br.pop();return jr||(jr=new dr(Qt)),jr.bind(),un(jr,Sr,ir,0,1,!1),jr}function Kr(Qt){Br.push(Qt)}function Jr(Qt,Sr,jr){Qt.byteLength=Sr.byteLength,Be.bufferData(Qt.type,Sr,jr)}function un(Qt,Sr,jr,ii,Nr,Ai){var xi;if(Qt.usage=jr,Array.isArray(Sr)){if(Qt.dtype=ii||Ur,Sr.length>0){var pn;if(Array.isArray(Sr[0])){xi=Je(Sr);for(var qr=1,Ir=1;Ir<xi.length;++Ir)qr*=xi[Ir];Qt.dimension=qr,pn=xt(Sr,xi,Qt.dtype),Jr(Qt,pn,jr),Ai?Qt.persistentData=pn:I.freeType(pn)}else if(typeof Sr[0]=="number"){Qt.dimension=Nr;var Ii=I.allocType(Qt.dtype,Sr.length);Lr(Ii,Sr),Jr(Qt,Ii,jr),Ai?Qt.persistentData=Ii:I.freeType(Ii)}else ut(Sr[0])&&(Qt.dimension=Sr[0].length,Qt.dtype=ii||ei(Sr[0])||Ur,pn=xt(Sr,[Sr.length,Sr[0].length],Qt.dtype),Jr(Qt,pn,jr),Ai?Qt.persistentData=pn:I.freeType(pn))}}else if(ut(Sr))Qt.dtype=ii||ei(Sr),Qt.dimension=Nr,Jr(Qt,Sr,jr),Ai&&(Qt.persistentData=new Uint8Array(new Uint8Array(Sr.buffer)));else if(vt(Sr)){xi=Sr.shape;var gi=Sr.stride,li=Sr.offset,hi=0,Ri=0,vn=0,Hn=0;xi.length===1?(hi=xi[0],Ri=1,vn=gi[0],Hn=0):xi.length===2&&(hi=xi[0],Ri=xi[1],vn=gi[0],Hn=gi[1]),Qt.dtype=ii||ei(Sr.data)||Ur,Qt.dimension=Ri;var wi=I.allocType(Qt.dtype,hi*Ri);$i(wi,Sr.data,hi,Ri,vn,Hn,li),Jr(Qt,wi,jr),Ai?Qt.persistentData=wi:I.freeType(wi)}else Sr instanceof ArrayBuffer&&(Qt.dtype=hr,Qt.dimension=Nr,Jr(Qt,Sr,jr),Ai&&(Qt.persistentData=new Uint8Array(new Uint8Array(Sr))))}function Oi(Qt){gt.bufferCount--,or(Qt);var Sr=Qt.buffer;Be.deleteBuffer(Sr),Qt.buffer=null,delete wr[Qt.id]}function mi(Qt,Sr,jr,ii){gt.bufferCount++;var Nr=new dr(Sr);wr[Nr.id]=Nr;function Ai(qr){var Ir=Ct,Ii=null,gi=0,li=0,hi=1;return Array.isArray(qr)||ut(qr)||vt(qr)||qr instanceof ArrayBuffer?Ii=qr:typeof qr=="number"?gi=qr|0:qr&&("data"in qr&&(Ii=qr.data),"usage"in qr&&(Ir=st[qr.usage]),"type"in qr&&(li=kr[qr.type]),"dimension"in qr&&(hi=qr.dimension|0),"length"in qr&&(gi=qr.length|0)),Nr.bind(),Ii?un(Nr,Ii,Ir,li,hi,ii):(gi&&Be.bufferData(Nr.type,gi,Ir),Nr.dtype=li||hr,Nr.usage=Ir,Nr.dimension=hi,Nr.byteLength=gi),Mt.profile&&(Nr.stats.size=Nr.byteLength*si[Nr.dtype]),Ai}function xi(qr,Ir){Be.bufferSubData(Nr.type,Ir,qr)}function pn(qr,Ir){var Ii=(Ir||0)|0,gi;if(Nr.bind(),ut(qr)||qr instanceof ArrayBuffer)xi(qr,Ii);else if(Array.isArray(qr)){if(qr.length>0){if(typeof qr[0]=="number"){var li=I.allocType(Nr.dtype,qr.length);Lr(li,qr),xi(li,Ii),I.freeType(li)}else if(Array.isArray(qr[0])||ut(qr[0])){gi=Je(qr);var hi=xt(qr,gi,Nr.dtype);xi(hi,Ii),I.freeType(hi)}}}else if(vt(qr)){gi=qr.shape;var Ri=qr.stride,vn=0,Hn=0,wi=0,Hi=0;gi.length===1?(vn=gi[0],Hn=1,wi=Ri[0],Hi=0):gi.length===2&&(vn=gi[0],Hn=gi[1],wi=Ri[0],Hi=Ri[1]);var Bn=Array.isArray(qr.data)?Nr.dtype:ei(qr.data),qn=I.allocType(Bn,vn*Hn);$i(qn,qr.data,vn,Hn,wi,Hi,qr.offset),xi(qn,Ii),I.freeType(qn)}return Ai}return jr||Ai(Qt),Ai._reglType="buffer",Ai._buffer=Nr,Ai.subdata=pn,Mt.profile&&(Ai.stats=Nr.stats),Ai.destroy=function(){Oi(Nr)},Ai}function Fr(){Xe(wr).forEach(function(Qt){Qt.buffer=Be.createBuffer(),Be.bindBuffer(Qt.type,Qt.buffer),Be.bufferData(Qt.type,Qt.persistentData||Qt.byteLength,Qt.usage)})}return Mt.profile&&(gt.getTotalBufferSize=function(){var Qt=0;return Object.keys(wr).forEach(function(Sr){Qt+=wr[Sr].stats.size}),Qt}),{create:mi,createStream:Zr,destroyStream:Kr,clear:function(){Xe(wr).forEach(Oi),Br.forEach(Oi)},getBuffer:function(Qt){return Qt&&Qt._buffer instanceof dr?Qt._buffer:null},restore:Fr,_initBuffer:un}}var hn=0,ta=0,ca=1,dn=1,Vn=4,ra=4,ds={points:hn,point:ta,lines:ca,line:dn,triangles:Vn,triangle:ra,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},mo=0,Rs=1,ho=4,ka=5120,ao=5121,zs=5122,_a=5123,Xs=5124,_l=5125,yu=34963,ul=35040,Le=35044;function ot(Be,gt,Mt,or){var vr={},wr=0,dr={uint8:ao,uint16:_a};gt.oes_element_index_uint&&(dr.uint32=_l);function Br(Fr){this.id=wr++,vr[this.id]=this,this.buffer=Fr,this.primType=ho,this.vertCount=0,this.type=0}Br.prototype.bind=function(){this.buffer.bind()};var Zr=[];function Kr(Fr){var Qt=Zr.pop();return Qt||(Qt=new Br(Mt.create(null,yu,!0,!1)._buffer)),un(Qt,Fr,ul,-1,-1,0,0),Qt}function Jr(Fr){Zr.push(Fr)}function un(Fr,Qt,Sr,jr,ii,Nr,Ai){Fr.buffer.bind();var xi;if(Qt){var pn=Ai;!Ai&&(!ut(Qt)||vt(Qt)&&!ut(Qt.data))&&(pn=gt.oes_element_index_uint?_l:_a),Mt._initBuffer(Fr.buffer,Qt,Sr,pn,3)}else Be.bufferData(yu,Nr,Sr),Fr.buffer.dtype=xi||ao,Fr.buffer.usage=Sr,Fr.buffer.dimension=3,Fr.buffer.byteLength=Nr;if(xi=Ai,!Ai){switch(Fr.buffer.dtype){case ao:case ka:xi=ao;break;case _a:case zs:xi=_a;break;case _l:case Xs:xi=_l;break;default:}Fr.buffer.dtype=xi}Fr.type=xi;var qr=ii;qr<0&&(qr=Fr.buffer.byteLength,xi===_a?qr>>=1:xi===_l&&(qr>>=2)),Fr.vertCount=qr;var Ir=jr;if(jr<0){Ir=ho;var Ii=Fr.buffer.dimension;Ii===1&&(Ir=mo),Ii===2&&(Ir=Rs),Ii===3&&(Ir=ho)}Fr.primType=Ir}function Oi(Fr){or.elementsCount--,delete vr[Fr.id],Fr.buffer.destroy(),Fr.buffer=null}function mi(Fr,Qt){var Sr=Mt.create(null,yu,!0),jr=new Br(Sr._buffer);or.elementsCount++;function ii(Nr){if(!Nr)Sr(),jr.primType=ho,jr.vertCount=0,jr.type=ao;else if(typeof Nr=="number")Sr(Nr),jr.primType=ho,jr.vertCount=Nr|0,jr.type=ao;else{var Ai=null,xi=Le,pn=-1,qr=-1,Ir=0,Ii=0;Array.isArray(Nr)||ut(Nr)||vt(Nr)?Ai=Nr:("data"in Nr&&(Ai=Nr.data),"usage"in Nr&&(xi=st[Nr.usage]),"primitive"in Nr&&(pn=ds[Nr.primitive]),"count"in Nr&&(qr=Nr.count|0),"type"in Nr&&(Ii=dr[Nr.type]),"length"in Nr?Ir=Nr.length|0:(Ir=qr,Ii===_a||Ii===zs?Ir*=2:(Ii===_l||Ii===Xs)&&(Ir*=4))),un(jr,Ai,xi,pn,qr,Ir,Ii)}return ii}return ii(Fr),ii._reglType="elements",ii._elements=jr,ii.subdata=function(Nr,Ai){return Sr.subdata(Nr,Ai),ii},ii.destroy=function(){Oi(jr)},ii}return{create:mi,createStream:Kr,destroyStream:Jr,getElements:function(Fr){return typeof Fr=="function"&&Fr._elements instanceof Br?Fr._elements:null},clear:function(){Xe(vr).forEach(Oi)}}}var lt=new Float32Array(1),kt=new Uint32Array(lt.buffer),Jt=5123;function Rt(Be){for(var gt=I.allocType(Jt,Be.length),Mt=0;Mt<Be.length;++Mt)if(isNaN(Be[Mt]))gt[Mt]=65535;else if(Be[Mt]===1/0)gt[Mt]=31744;else if(Be[Mt]===-1/0)gt[Mt]=64512;else{lt[0]=Be[Mt];var or=kt[0],vr=or>>>31<<15,wr=(or<<1>>>24)-127,dr=or>>13&1023;if(wr<-24)gt[Mt]=vr;else if(wr<-14){var Br=-14-wr;gt[Mt]=vr+(dr+1024>>Br)}else wr>15?gt[Mt]=vr+31744:gt[Mt]=vr+(wr+15<<10)+dr}return gt}function Tr(Be){return Array.isArray(Be)||ut(Be)}var Wt=34467,br=3553,Xr=34067,ti=34069,Mi=6408,an=6406,Gn=6407,yn=6409,fa=6410,Wn=32854,Ja=32855,oo=36194,Ao=32819,Io=32820,ps=33635,rs=34042,Mo=6402,is=34041,Ro=35904,Uo=35906,so=36193,In=33776,va=33777,vs=33778,Zs=33779,Ks=35986,Ol=35987,Js=34798,ru=35840,xu=35841,_u=35842,dc=35843,Nl=36196,ja=5121,bu=5123,Hu=5125,Ss=5126,iu=10242,ph=10243,yo=10497,nu=33071,Zo=33648,au=10240,Cv=10241,Nc=9728,r0=9729,Of=9984,vh=9985,Nf=9986,i0=9987,Dv=33170,gh=4352,up=4353,n0=4354,j0=34046,$0=3317,Fv=37440,Lv=37441,Uc=37443,cp=37444,mh=33984,ju=[Of,Nf,vh,i0],Es=[0,yn,fa,Gn,Mi],Vo={};Vo[yn]=Vo[an]=Vo[Mo]=1,Vo[is]=Vo[fa]=2,Vo[Gn]=Vo[Ro]=3,Vo[Mi]=Vo[Uo]=4;function wu(Be){return"[object "+Be+"]"}var W0=wu("HTMLCanvasElement"),yh=wu("OffscreenCanvas"),a0=wu("CanvasRenderingContext2D"),Pv=wu("ImageBitmap"),ug=wu("HTMLImageElement"),Wm=wu("HTMLVideoElement"),Tx=Object.keys(Ve).concat([W0,yh,a0,Pv,ug,Wm]),xh=[];xh[ja]=1,xh[Ss]=4,xh[so]=2,xh[bu]=2,xh[Hu]=4;var Bs=[];Bs[Wn]=2,Bs[Ja]=2,Bs[oo]=2,Bs[is]=4,Bs[In]=.5,Bs[va]=.5,Bs[vs]=1,Bs[Zs]=1,Bs[Ks]=.5,Bs[Ol]=1,Bs[Js]=1,Bs[ru]=.5,Bs[xu]=.25,Bs[_u]=.5,Bs[dc]=.25,Bs[Nl]=.5;function Iv(Be){return Array.isArray(Be)&&(Be.length===0||typeof Be[0]=="number")}function Rv(Be){if(!Array.isArray(Be))return!1;var gt=Be.length;return!(gt===0||!Tr(Be[0]))}function _h(Be){return Object.prototype.toString.call(Be)}function cg(Be){return _h(Be)===W0}function Y0(Be){return _h(Be)===yh}function fp(Be){return _h(Be)===a0}function hf(Be){return _h(Be)===Pv}function zv(Be){return _h(Be)===ug}function hp(Be){return _h(Be)===Wm}function X0(Be){if(!Be)return!1;var gt=_h(Be);return Tx.indexOf(gt)>=0?!0:Iv(Be)||Rv(Be)||vt(Be)}function fg(Be){return Ve[Object.prototype.toString.call(Be)]|0}function hg(Be,gt){var Mt=gt.length;switch(Be.type){case ja:case bu:case Hu:case Ss:var or=I.allocType(Be.type,Mt);or.set(gt),Be.data=or;break;case so:Be.data=Rt(gt);break;default:}}function Ym(Be,gt){return I.allocType(Be.type===so?Ss:Be.type,gt)}function Uf(Be,gt){Be.type===so?(Be.data=Rt(gt),I.freeType(gt)):Be.data=gt}function Bv(Be,gt,Mt,or,vr,wr){for(var dr=Be.width,Br=Be.height,Zr=Be.channels,Kr=dr*Br*Zr,Jr=Ym(Be,Kr),un=0,Oi=0;Oi<Br;++Oi)for(var mi=0;mi<dr;++mi)for(var Fr=0;Fr<Zr;++Fr)Jr[un++]=gt[Mt*mi+or*Oi+vr*Fr+wr];Uf(Be,Jr)}function Vf(Be,gt,Mt,or,vr,wr){var dr;if(typeof Bs[Be]!="undefined"?dr=Bs[Be]:dr=Vo[Be]*xh[gt],wr&&(dr*=6),vr){for(var Br=0,Zr=Mt;Zr>=1;)Br+=dr*Zr*Zr,Zr/=2;return Br}else return dr*Mt*or}function dp(Be,gt,Mt,or,vr,wr,dr){var Br={"don't care":gh,"dont care":gh,nice:n0,fast:up},Zr={repeat:yo,clamp:nu,mirror:Zo},Kr={nearest:Nc,linear:r0},Jr=e({mipmap:i0,"nearest mipmap nearest":Of,"linear mipmap nearest":vh,"nearest mipmap linear":Nf,"linear mipmap linear":i0},Kr),un={none:0,browser:cp},Oi={uint8:ja,rgba4:Ao,rgb565:ps,"rgb5 a1":Io},mi={alpha:an,luminance:yn,"luminance alpha":fa,rgb:Gn,rgba:Mi,rgba4:Wn,"rgb5 a1":Ja,rgb565:oo},Fr={};gt.ext_srgb&&(mi.srgb=Ro,mi.srgba=Uo),gt.oes_texture_float&&(Oi.float32=Oi.float=Ss),gt.oes_texture_half_float&&(Oi.float16=Oi["half float"]=so),gt.webgl_depth_texture&&(e(mi,{depth:Mo,"depth stencil":is}),e(Oi,{uint16:bu,uint32:Hu,"depth stencil":rs})),gt.webgl_compressed_texture_s3tc&&e(Fr,{"rgb s3tc dxt1":In,"rgba s3tc dxt1":va,"rgba s3tc dxt3":vs,"rgba s3tc dxt5":Zs}),gt.webgl_compressed_texture_atc&&e(Fr,{"rgb atc":Ks,"rgba atc explicit alpha":Ol,"rgba atc interpolated alpha":Js}),gt.webgl_compressed_texture_pvrtc&&e(Fr,{"rgb pvrtc 4bppv1":ru,"rgb pvrtc 2bppv1":xu,"rgba pvrtc 4bppv1":_u,"rgba pvrtc 2bppv1":dc}),gt.webgl_compressed_texture_etc1&&(Fr["rgb etc1"]=Nl);var Qt=Array.prototype.slice.call(Be.getParameter(Wt));Object.keys(Fr).forEach(function(wt){var yr=Fr[wt];Qt.indexOf(yr)>=0&&(mi[wt]=yr)});var Sr=Object.keys(mi);Mt.textureFormats=Sr;var jr=[];Object.keys(mi).forEach(function(wt){var yr=mi[wt];jr[yr]=wt});var ii=[];Object.keys(Oi).forEach(function(wt){var yr=Oi[wt];ii[yr]=wt});var Nr=[];Object.keys(Kr).forEach(function(wt){var yr=Kr[wt];Nr[yr]=wt});var Ai=[];Object.keys(Jr).forEach(function(wt){var yr=Jr[wt];Ai[yr]=wt});var xi=[];Object.keys(Zr).forEach(function(wt){var yr=Zr[wt];xi[yr]=wt});var pn=Sr.reduce(function(wt,yr){var xr=mi[yr];return xr===yn||xr===an||xr===yn||xr===fa||xr===Mo||xr===is||gt.ext_srgb&&(xr===Ro||xr===Uo)?wt[xr]=xr:xr===Ja||yr.indexOf("rgba")>=0?wt[xr]=Mi:wt[xr]=Gn,wt},{});function qr(){this.internalformat=Mi,this.format=Mi,this.type=ja,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=cp,this.width=0,this.height=0,this.channels=0}function Ir(wt,yr){wt.internalformat=yr.internalformat,wt.format=yr.format,wt.type=yr.type,wt.compressed=yr.compressed,wt.premultiplyAlpha=yr.premultiplyAlpha,wt.flipY=yr.flipY,wt.unpackAlignment=yr.unpackAlignment,wt.colorSpace=yr.colorSpace,wt.width=yr.width,wt.height=yr.height,wt.channels=yr.channels}function Ii(wt,yr){if(!(typeof yr!="object"||!yr)){if("premultiplyAlpha"in yr&&(wt.premultiplyAlpha=yr.premultiplyAlpha),"flipY"in yr&&(wt.flipY=yr.flipY),"alignment"in yr&&(wt.unpackAlignment=yr.alignment),"colorSpace"in yr&&(wt.colorSpace=un[yr.colorSpace]),"type"in yr){var xr=yr.type;wt.type=Oi[xr]}var Zi=wt.width,Oa=wt.height,ss=wt.channels,Wi=!1;"shape"in yr?(Zi=yr.shape[0],Oa=yr.shape[1],yr.shape.length===3&&(ss=yr.shape[2],Wi=!0)):("radius"in yr&&(Zi=Oa=yr.radius),"width"in yr&&(Zi=yr.width),"height"in yr&&(Oa=yr.height),"channels"in yr&&(ss=yr.channels,Wi=!0)),wt.width=Zi|0,wt.height=Oa|0,wt.channels=ss|0;var dt=!1;if("format"in yr){var St=yr.format,It=wt.internalformat=mi[St];wt.format=pn[It],St in Oi&&("type"in yr||(wt.type=Oi[St])),St in Fr&&(wt.compressed=!0),dt=!0}!Wi&&dt?wt.channels=Vo[wt.format]:Wi&&!dt&&wt.channels!==Es[wt.format]&&(wt.format=wt.internalformat=Es[wt.channels])}}function gi(wt){Be.pixelStorei(Fv,wt.flipY),Be.pixelStorei(Lv,wt.premultiplyAlpha),Be.pixelStorei(Uc,wt.colorSpace),Be.pixelStorei($0,wt.unpackAlignment)}function li(){qr.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function hi(wt,yr){var xr=null;if(X0(yr)?xr=yr:yr&&(Ii(wt,yr),"x"in yr&&(wt.xOffset=yr.x|0),"y"in yr&&(wt.yOffset=yr.y|0),X0(yr.data)&&(xr=yr.data)),yr.copy){var Zi=vr.viewportWidth,Oa=vr.viewportHeight;wt.width=wt.width||Zi-wt.xOffset,wt.height=wt.height||Oa-wt.yOffset,wt.needsCopy=!0}else if(!xr)wt.width=wt.width||1,wt.height=wt.height||1,wt.channels=wt.channels||4;else if(ut(xr))wt.channels=wt.channels||4,wt.data=xr,!("type"in yr)&&wt.type===ja&&(wt.type=fg(xr));else if(Iv(xr))wt.channels=wt.channels||4,hg(wt,xr),wt.alignment=1,wt.needsFree=!0;else if(vt(xr)){var ss=xr.data;!Array.isArray(ss)&&wt.type===ja&&(wt.type=fg(ss));var Wi=xr.shape,dt=xr.stride,St,It,gr,Mr,nr,er;Wi.length===3?(gr=Wi[2],er=dt[2]):(gr=1,er=1),St=Wi[0],It=Wi[1],Mr=dt[0],nr=dt[1],wt.alignment=1,wt.width=St,wt.height=It,wt.channels=gr,wt.format=wt.internalformat=Es[gr],wt.needsFree=!0,Bv(wt,ss,Mr,nr,er,xr.offset)}else if(cg(xr)||Y0(xr)||fp(xr))cg(xr)||Y0(xr)?wt.element=xr:wt.element=xr.canvas,wt.width=wt.element.width,wt.height=wt.element.height,wt.channels=4;else if(hf(xr))wt.element=xr,wt.width=xr.width,wt.height=xr.height,wt.channels=4;else if(zv(xr))wt.element=xr,wt.width=xr.naturalWidth,wt.height=xr.naturalHeight,wt.channels=4;else if(hp(xr))wt.element=xr,wt.width=xr.videoWidth,wt.height=xr.videoHeight,wt.channels=4;else if(Rv(xr)){var Ht=wt.width||xr[0].length,Ft=wt.height||xr.length,Nt=wt.channels;Tr(xr[0][0])?Nt=Nt||xr[0][0].length:Nt=Nt||1;for(var Et=mt.shape(xr),sr=1,Er=0;Er<Et.length;++Er)sr*=Et[Er];var Wr=Ym(wt,sr);mt.flatten(xr,Et,"",Wr),Uf(wt,Wr),wt.alignment=1,wt.width=Ht,wt.height=Ft,wt.channels=Nt,wt.format=wt.internalformat=Es[Nt],wt.needsFree=!0}wt.type===Ss||wt.type}function Ri(wt,yr,xr){var Zi=wt.element,Oa=wt.data,ss=wt.internalformat,Wi=wt.format,dt=wt.type,St=wt.width,It=wt.height;gi(wt),Zi?Be.texImage2D(yr,xr,Wi,Wi,dt,Zi):wt.compressed?Be.compressedTexImage2D(yr,xr,ss,St,It,0,Oa):wt.needsCopy?(or(),Be.copyTexImage2D(yr,xr,Wi,wt.xOffset,wt.yOffset,St,It,0)):Be.texImage2D(yr,xr,Wi,St,It,0,Wi,dt,Oa||null)}function vn(wt,yr,xr,Zi,Oa){var ss=wt.element,Wi=wt.data,dt=wt.internalformat,St=wt.format,It=wt.type,gr=wt.width,Mr=wt.height;gi(wt),ss?Be.texSubImage2D(yr,Oa,xr,Zi,St,It,ss):wt.compressed?Be.compressedTexSubImage2D(yr,Oa,xr,Zi,dt,gr,Mr,Wi):wt.needsCopy?(or(),Be.copyTexSubImage2D(yr,Oa,xr,Zi,wt.xOffset,wt.yOffset,gr,Mr)):Be.texSubImage2D(yr,Oa,xr,Zi,gr,Mr,St,It,Wi)}var Hn=[];function wi(){return Hn.pop()||new li}function Hi(wt){wt.needsFree&&I.freeType(wt.data),li.call(wt),Hn.push(wt)}function Bn(){qr.call(this),this.genMipmaps=!1,this.mipmapHint=gh,this.mipmask=0,this.images=Array(16)}function qn(wt,yr,xr){var Zi=wt.images[0]=wi();wt.mipmask=1,Zi.width=wt.width=yr,Zi.height=wt.height=xr,Zi.channels=wt.channels=4}function ba(wt,yr){var xr=null;if(X0(yr))xr=wt.images[0]=wi(),Ir(xr,wt),hi(xr,yr),wt.mipmask=1;else if(Ii(wt,yr),Array.isArray(yr.mipmap))for(var Zi=yr.mipmap,Oa=0;Oa<Zi.length;++Oa)xr=wt.images[Oa]=wi(),Ir(xr,wt),xr.width>>=Oa,xr.height>>=Oa,hi(xr,Zi[Oa]),wt.mipmask|=1<<Oa;else xr=wt.images[0]=wi(),Ir(xr,wt),hi(xr,yr),wt.mipmask=1;Ir(wt,wt.images[0]),wt.compressed&&(wt.internalformat===In||wt.internalformat===va||wt.internalformat===vs||wt.internalformat)}function Al(wt,yr){for(var xr=wt.images,Zi=0;Zi<xr.length;++Zi){if(!xr[Zi])return;Ri(xr[Zi],yr,Zi)}}var Ku=[];function Pa(){var wt=Ku.pop()||new Bn;qr.call(wt),wt.mipmask=0;for(var yr=0;yr<16;++yr)wt.images[yr]=null;return wt}function Eh(wt){for(var yr=wt.images,xr=0;xr<yr.length;++xr)yr[xr]&&Hi(yr[xr]),yr[xr]=null;Ku.push(wt)}function os(){this.minFilter=Nc,this.magFilter=Nc,this.wrapS=nu,this.wrapT=nu,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=gh}function mf(wt,yr){if("min"in yr){var xr=yr.min;wt.minFilter=Jr[xr],ju.indexOf(wt.minFilter)>=0&&!("faces"in yr)&&(wt.genMipmaps=!0)}if("mag"in yr){var Zi=yr.mag;wt.magFilter=Kr[Zi]}var Oa=wt.wrapS,ss=wt.wrapT;if("wrap"in yr){var Wi=yr.wrap;typeof Wi=="string"?Oa=ss=Zr[Wi]:Array.isArray(Wi)&&(Oa=Zr[Wi[0]],ss=Zr[Wi[1]])}else{if("wrapS"in yr){var dt=yr.wrapS;Oa=Zr[dt]}if("wrapT"in yr){var St=yr.wrapT;ss=Zr[St]}}if(wt.wrapS=Oa,wt.wrapT=ss,"anisotropic"in yr){var It=yr.anisotropic;wt.anisotropic=yr.anisotropic}if("mipmap"in yr){var gr=!1;switch(typeof yr.mipmap){case"string":wt.mipmapHint=Br[yr.mipmap],wt.genMipmaps=!0,gr=!0;break;case"boolean":gr=wt.genMipmaps=yr.mipmap;break;case"object":wt.genMipmaps=!1,gr=!0;break;default:}gr&&!("min"in yr)&&(wt.minFilter=Of)}}function Xf(wt,yr){Be.texParameteri(yr,Cv,wt.minFilter),Be.texParameteri(yr,au,wt.magFilter),Be.texParameteri(yr,iu,wt.wrapS),Be.texParameteri(yr,ph,wt.wrapT),gt.ext_texture_filter_anisotropic&&Be.texParameteri(yr,j0,wt.anisotropic),wt.genMipmaps&&(Be.hint(Dv,wt.mipmapHint),Be.generateMipmap(yr))}var kh=0,Su={},Eu=Mt.maxTextureUnits,Ju=Array(Eu).map(function(){return null});function sa(wt){qr.call(this),this.mipmask=0,this.internalformat=Mi,this.id=kh++,this.refCount=1,this.target=wt,this.texture=Be.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new os,dr.profile&&(this.stats={size:0})}function mc(wt){Be.activeTexture(mh),Be.bindTexture(wt.target,wt.texture)}function ms(){var wt=Ju[0];wt?Be.bindTexture(wt.target,wt.texture):Be.bindTexture(br,null)}function Zf(wt){var yr=wt.texture,xr=wt.unit,Zi=wt.target;xr>=0&&(Be.activeTexture(mh+xr),Be.bindTexture(Zi,null),Ju[xr]=null),Be.deleteTexture(yr),wt.texture=null,wt.params=null,wt.pixels=null,wt.refCount=0,delete Su[wt.id],wr.textureCount--}e(sa.prototype,{bind:function(){var wt=this;wt.bindCount+=1;var yr=wt.unit;if(yr<0){for(var xr=0;xr<Eu;++xr){var Zi=Ju[xr];if(Zi){if(Zi.bindCount>0)continue;Zi.unit=-1}Ju[xr]=wt,yr=xr;break}yr>=Eu,dr.profile&&wr.maxTextureUnits<yr+1&&(wr.maxTextureUnits=yr+1),wt.unit=yr,Be.activeTexture(mh+yr),Be.bindTexture(wt.target,wt.texture)}return yr},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&Zf(this)}});function Ch(wt,yr){var xr=new sa(br);Su[xr.id]=xr,wr.textureCount++;function Zi(Wi,dt){var St=xr.texInfo;os.call(St);var It=Pa();return typeof Wi=="number"?typeof dt=="number"?qn(It,Wi|0,dt|0):qn(It,Wi|0,Wi|0):Wi?(mf(St,Wi),ba(It,Wi)):qn(It,1,1),St.genMipmaps&&(It.mipmask=(It.width<<1)-1),xr.mipmask=It.mipmask,Ir(xr,It),xr.internalformat=It.internalformat,Zi.width=It.width,Zi.height=It.height,mc(xr),Al(It,br),Xf(St,br),ms(),Eh(It),dr.profile&&(xr.stats.size=Vf(xr.internalformat,xr.type,It.width,It.height,St.genMipmaps,!1)),Zi.format=jr[xr.internalformat],Zi.type=ii[xr.type],Zi.mag=Nr[St.magFilter],Zi.min=Ai[St.minFilter],Zi.wrapS=xi[St.wrapS],Zi.wrapT=xi[St.wrapT],Zi}function Oa(Wi,dt,St,It){var gr=dt|0,Mr=St|0,nr=It|0,er=wi();return Ir(er,xr),er.width=0,er.height=0,hi(er,Wi),er.width=er.width||(xr.width>>nr)-gr,er.height=er.height||(xr.height>>nr)-Mr,mc(xr),vn(er,br,gr,Mr,nr),ms(),Hi(er),Zi}function ss(Wi,dt){var St=Wi|0,It=dt|0||St;if(St===xr.width&&It===xr.height)return Zi;Zi.width=xr.width=St,Zi.height=xr.height=It,mc(xr);for(var gr=0;xr.mipmask>>gr;++gr){var Mr=St>>gr,nr=It>>gr;if(!Mr||!nr)break;Be.texImage2D(br,gr,xr.format,Mr,nr,0,xr.format,xr.type,null)}return ms(),dr.profile&&(xr.stats.size=Vf(xr.internalformat,xr.type,St,It,!1,!1)),Zi}return Zi(wt,yr),Zi.subimage=Oa,Zi.resize=ss,Zi._reglType="texture2d",Zi._texture=xr,dr.profile&&(Zi.stats=xr.stats),Zi.destroy=function(){xr.decRef()},Zi}function Dh(wt,yr,xr,Zi,Oa,ss){var Wi=new sa(Xr);Su[Wi.id]=Wi,wr.cubeCount++;var dt=new Array(6);function St(Mr,nr,er,Ht,Ft,Nt){var Et,sr=Wi.texInfo;for(os.call(sr),Et=0;Et<6;++Et)dt[Et]=Pa();if(typeof Mr=="number"||!Mr){var Er=Mr|0||1;for(Et=0;Et<6;++Et)qn(dt[Et],Er,Er)}else if(typeof Mr=="object")if(nr)ba(dt[0],Mr),ba(dt[1],nr),ba(dt[2],er),ba(dt[3],Ht),ba(dt[4],Ft),ba(dt[5],Nt);else if(mf(sr,Mr),Ii(Wi,Mr),"faces"in Mr){var Wr=Mr.faces;for(Et=0;Et<6;++Et)Ir(dt[Et],Wi),ba(dt[Et],Wr[Et])}else for(Et=0;Et<6;++Et)ba(dt[Et],Mr);for(Ir(Wi,dt[0]),sr.genMipmaps?Wi.mipmask=(dt[0].width<<1)-1:Wi.mipmask=dt[0].mipmask,Wi.internalformat=dt[0].internalformat,St.width=dt[0].width,St.height=dt[0].height,mc(Wi),Et=0;Et<6;++Et)Al(dt[Et],ti+Et);for(Xf(sr,Xr),ms(),dr.profile&&(Wi.stats.size=Vf(Wi.internalformat,Wi.type,St.width,St.height,sr.genMipmaps,!0)),St.format=jr[Wi.internalformat],St.type=ii[Wi.type],St.mag=Nr[sr.magFilter],St.min=Ai[sr.minFilter],St.wrapS=xi[sr.wrapS],St.wrapT=xi[sr.wrapT],Et=0;Et<6;++Et)Eh(dt[Et]);return St}function It(Mr,nr,er,Ht,Ft){var Nt=er|0,Et=Ht|0,sr=Ft|0,Er=wi();return Ir(Er,Wi),Er.width=0,Er.height=0,hi(Er,nr),Er.width=Er.width||(Wi.width>>sr)-Nt,Er.height=Er.height||(Wi.height>>sr)-Et,mc(Wi),vn(Er,ti+Mr,Nt,Et,sr),ms(),Hi(Er),St}function gr(Mr){var nr=Mr|0;if(nr!==Wi.width){St.width=Wi.width=nr,St.height=Wi.height=nr,mc(Wi);for(var er=0;er<6;++er)for(var Ht=0;Wi.mipmask>>Ht;++Ht)Be.texImage2D(ti+er,Ht,Wi.format,nr>>Ht,nr>>Ht,0,Wi.format,Wi.type,null);return ms(),dr.profile&&(Wi.stats.size=Vf(Wi.internalformat,Wi.type,St.width,St.height,!1,!0)),St}}return St(wt,yr,xr,Zi,Oa,ss),St.subimage=It,St.resize=gr,St._reglType="textureCube",St._texture=Wi,dr.profile&&(St.stats=Wi.stats),St.destroy=function(){Wi.decRef()},St}function Zn(){for(var wt=0;wt<Eu;++wt)Be.activeTexture(mh+wt),Be.bindTexture(br,null),Ju[wt]=null;Xe(Su).forEach(Zf),wr.cubeCount=0,wr.textureCount=0}dr.profile&&(wr.getTotalTextureSize=function(){var wt=0;return Object.keys(Su).forEach(function(yr){wt+=Su[yr].stats.size}),wt});function Va(){for(var wt=0;wt<Eu;++wt){var yr=Ju[wt];yr&&(yr.bindCount=0,yr.unit=-1,Ju[wt]=null)}Xe(Su).forEach(function(xr){xr.texture=Be.createTexture(),Be.bindTexture(xr.target,xr.texture);for(var Zi=0;Zi<32;++Zi)if((xr.mipmask&1<<Zi)!==0)if(xr.target===br)Be.texImage2D(br,Zi,xr.internalformat,xr.width>>Zi,xr.height>>Zi,0,xr.internalformat,xr.type,null);else for(var Oa=0;Oa<6;++Oa)Be.texImage2D(ti+Oa,Zi,xr.internalformat,xr.width>>Zi,xr.height>>Zi,0,xr.internalformat,xr.type,null);Xf(xr.texInfo,xr.target)})}function qs(){for(var wt=0;wt<Eu;++wt){var yr=Ju[wt];yr&&(yr.bindCount=0,yr.unit=-1,Ju[wt]=null),Be.activeTexture(mh+wt),Be.bindTexture(br,null),Be.bindTexture(Xr,null)}}return{create2D:Ch,createCube:Dh,clear:Zn,getTexture:function(wt){return null},restore:Va,refresh:qs}}var pc=36161,Z0=32854,Gf=32855,dg=36194,qv=33189,pg=36168,Ov=34041,pp=35907,Nv=34836,Uv=34842,Xm=34843,$u=[];$u[Z0]=2,$u[Gf]=2,$u[dg]=2,$u[qv]=2,$u[pg]=1,$u[Ov]=4,$u[pp]=4,$u[Nv]=16,$u[Uv]=8,$u[Xm]=6;function Vc(Be,gt,Mt){return $u[Be]*gt*Mt}var vg=function(Be,gt,Mt,or,vr){var wr={rgba4:Z0,rgb565:dg,"rgb5 a1":Gf,depth:qv,stencil:pg,"depth stencil":Ov};gt.ext_srgb&&(wr.srgba=pp),gt.ext_color_buffer_half_float&&(wr.rgba16f=Uv,wr.rgb16f=Xm),gt.webgl_color_buffer_float&&(wr.rgba32f=Nv);var dr=[];Object.keys(wr).forEach(function(mi){var Fr=wr[mi];dr[Fr]=mi});var Br=0,Zr={};function Kr(mi){this.id=Br++,this.refCount=1,this.renderbuffer=mi,this.format=Z0,this.width=0,this.height=0,vr.profile&&(this.stats={size:0})}Kr.prototype.decRef=function(){--this.refCount<=0&&Jr(this)};function Jr(mi){var Fr=mi.renderbuffer;Be.bindRenderbuffer(pc,null),Be.deleteRenderbuffer(Fr),mi.renderbuffer=null,mi.refCount=0,delete Zr[mi.id],or.renderbufferCount--}function un(mi,Fr){var Qt=new Kr(Be.createRenderbuffer());Zr[Qt.id]=Qt,or.renderbufferCount++;function Sr(ii,Nr){var Ai=0,xi=0,pn=Z0;if(typeof ii=="object"&&ii){var qr=ii;if("shape"in qr){var Ir=qr.shape;Ai=Ir[0]|0,xi=Ir[1]|0}else"radius"in qr&&(Ai=xi=qr.radius|0),"width"in qr&&(Ai=qr.width|0),"height"in qr&&(xi=qr.height|0);"format"in qr&&(pn=wr[qr.format])}else typeof ii=="number"?(Ai=ii|0,typeof Nr=="number"?xi=Nr|0:xi=Ai):ii||(Ai=xi=1);if(!(Ai===Qt.width&&xi===Qt.height&&pn===Qt.format))return Sr.width=Qt.width=Ai,Sr.height=Qt.height=xi,Qt.format=pn,Be.bindRenderbuffer(pc,Qt.renderbuffer),Be.renderbufferStorage(pc,pn,Ai,xi),vr.profile&&(Qt.stats.size=Vc(Qt.format,Qt.width,Qt.height)),Sr.format=dr[Qt.format],Sr}function jr(ii,Nr){var Ai=ii|0,xi=Nr|0||Ai;return Ai===Qt.width&&xi===Qt.height||(Sr.width=Qt.width=Ai,Sr.height=Qt.height=xi,Be.bindRenderbuffer(pc,Qt.renderbuffer),Be.renderbufferStorage(pc,Qt.format,Ai,xi),vr.profile&&(Qt.stats.size=Vc(Qt.format,Qt.width,Qt.height))),Sr}return Sr(mi,Fr),Sr.resize=jr,Sr._reglType="renderbuffer",Sr._renderbuffer=Qt,vr.profile&&(Sr.stats=Qt.stats),Sr.destroy=function(){Qt.decRef()},Sr}vr.profile&&(or.getTotalRenderbufferSize=function(){var mi=0;return Object.keys(Zr).forEach(function(Fr){mi+=Zr[Fr].stats.size}),mi});function Oi(){Xe(Zr).forEach(function(mi){mi.renderbuffer=Be.createRenderbuffer(),Be.bindRenderbuffer(pc,mi.renderbuffer),Be.renderbufferStorage(pc,mi.format,mi.width,mi.height)}),Be.bindRenderbuffer(pc,null)}return{create:un,clear:function(){Xe(Zr).forEach(Jr)},restore:Oi}},Tu=36160,vp=36161,o0=3553,bh=34069,gg=36064,Zm=36096,Km=36128,df=33306,pf=36053,Wu=36193,Ax=5121,K0=5126,Jm=6407,vc=6408,Vv=[];Vv[vc]=4,Vv[Jm]=3;var gp=[];gp[Ax]=1,gp[K0]=4,gp[Wu]=2;function mp(Be,gt,Mt,or,vr,wr){var dr={cur:null,next:null,dirty:!1,setFBO:null},Br=["rgba"],Zr=["rgba4","rgb565","rgb5 a1"];gt.ext_srgb&&Zr.push("srgba"),gt.ext_color_buffer_half_float&&Zr.push("rgba16f","rgb16f"),gt.webgl_color_buffer_float&&Zr.push("rgba32f");var Kr=["uint8"];gt.oes_texture_half_float&&Kr.push("half float","float16"),gt.oes_texture_float&&Kr.push("float","float32");function Jr(li,hi,Ri){this.target=li,this.texture=hi,this.renderbuffer=Ri;var vn=0,Hn=0;hi?(vn=hi.width,Hn=hi.height):Ri&&(vn=Ri.width,Hn=Ri.height),this.width=vn,this.height=Hn}function un(li){li&&(li.texture&&li.texture._texture.decRef(),li.renderbuffer&&li.renderbuffer._renderbuffer.decRef())}function Oi(li,hi,Ri){if(li)if(li.texture){var vn=li.texture._texture,Hn=Math.max(1,vn.width),wi=Math.max(1,vn.height);vn.refCount+=1}else{var Hi=li.renderbuffer._renderbuffer;Hi.refCount+=1}}function mi(li,hi){hi&&(hi.texture?Be.framebufferTexture2D(Tu,li,hi.target,hi.texture._texture.texture,0):Be.framebufferRenderbuffer(Tu,li,vp,hi.renderbuffer._renderbuffer.renderbuffer))}function Fr(li){var hi=o0,Ri=null,vn=null,Hn=li;typeof li=="object"&&(Hn=li.data,"target"in li&&(hi=li.target|0));var wi=Hn._reglType;return wi==="texture2d"||wi==="textureCube"?Ri=Hn:wi==="renderbuffer"&&(vn=Hn,hi=vp),new Jr(hi,Ri,vn)}function Qt(li,hi,Ri,vn,Hn){if(Ri){var wi=or.create2D({width:li,height:hi,format:vn,type:Hn});return wi._texture.refCount=0,new Jr(o0,wi,null)}else{var Hi=vr.create({width:li,height:hi,format:vn});return Hi._renderbuffer.refCount=0,new Jr(vp,null,Hi)}}function Sr(li){return li&&(li.texture||li.renderbuffer)}function jr(li,hi,Ri){li&&(li.texture?li.texture.resize(hi,Ri):li.renderbuffer&&li.renderbuffer.resize(hi,Ri),li.width=hi,li.height=Ri)}var ii=0,Nr={};function Ai(){this.id=ii++,Nr[this.id]=this,this.framebuffer=Be.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function xi(li){li.colorAttachments.forEach(un),un(li.depthAttachment),un(li.stencilAttachment),un(li.depthStencilAttachment)}function pn(li){var hi=li.framebuffer;Be.deleteFramebuffer(hi),li.framebuffer=null,wr.framebufferCount--,delete Nr[li.id]}function qr(li){var hi;Be.bindFramebuffer(Tu,li.framebuffer);var Ri=li.colorAttachments;for(hi=0;hi<Ri.length;++hi)mi(gg+hi,Ri[hi]);for(hi=Ri.length;hi<Mt.maxColorAttachments;++hi)Be.framebufferTexture2D(Tu,gg+hi,o0,null,0);Be.framebufferTexture2D(Tu,df,o0,null,0),Be.framebufferTexture2D(Tu,Zm,o0,null,0),Be.framebufferTexture2D(Tu,Km,o0,null,0),mi(Zm,li.depthAttachment),mi(Km,li.stencilAttachment),mi(df,li.depthStencilAttachment);var vn=Be.checkFramebufferStatus(Tu);Be.isContextLost(),Be.bindFramebuffer(Tu,dr.next?dr.next.framebuffer:null),dr.cur=dr.next,Be.getError()}function Ir(li,hi){var Ri=new Ai;wr.framebufferCount++;function vn(wi,Hi){var Bn,qn=0,ba=0,Al=!0,Ku=!0,Pa=null,Eh=!0,os="rgba",mf="uint8",Xf=1,kh=null,Su=null,Eu=null,Ju=!1;if(typeof wi=="number")qn=wi|0,ba=Hi|0||qn;else if(!wi)qn=ba=1;else{var sa=wi;if("shape"in sa){var mc=sa.shape;qn=mc[0],ba=mc[1]}else"radius"in sa&&(qn=ba=sa.radius),"width"in sa&&(qn=sa.width),"height"in sa&&(ba=sa.height);("color"in sa||"colors"in sa)&&(Pa=sa.color||sa.colors,Array.isArray(Pa)),Pa||("colorCount"in sa&&(Xf=sa.colorCount|0),"colorTexture"in sa&&(Eh=!!sa.colorTexture,os="rgba4"),"colorType"in sa&&(mf=sa.colorType,Eh||(mf==="half float"||mf==="float16"?os="rgba16f":(mf==="float"||mf==="float32")&&(os="rgba32f"))),"colorFormat"in sa&&(os=sa.colorFormat,Br.indexOf(os)>=0?Eh=!0:Zr.indexOf(os)>=0&&(Eh=!1))),("depthTexture"in sa||"depthStencilTexture"in sa)&&(Ju=!!(sa.depthTexture||sa.depthStencilTexture)),"depth"in sa&&(typeof sa.depth=="boolean"?Al=sa.depth:(kh=sa.depth,Ku=!1)),"stencil"in sa&&(typeof sa.stencil=="boolean"?Ku=sa.stencil:(Su=sa.stencil,Al=!1)),"depthStencil"in sa&&(typeof sa.depthStencil=="boolean"?Al=Ku=sa.depthStencil:(Eu=sa.depthStencil,Al=!1,Ku=!1))}var ms=null,Zf=null,Ch=null,Dh=null;if(Array.isArray(Pa))ms=Pa.map(Fr);else if(Pa)ms=[Fr(Pa)];else for(ms=new Array(Xf),Bn=0;Bn<Xf;++Bn)ms[Bn]=Qt(qn,ba,Eh,os,mf);qn=qn||ms[0].width,ba=ba||ms[0].height,kh?Zf=Fr(kh):Al&&!Ku&&(Zf=Qt(qn,ba,Ju,"depth","uint32")),Su?Ch=Fr(Su):Ku&&!Al&&(Ch=Qt(qn,ba,!1,"stencil","uint8")),Eu?Dh=Fr(Eu):!kh&&!Su&&Ku&&Al&&(Dh=Qt(qn,ba,Ju,"depth stencil","depth stencil"));var Zn=null;for(Bn=0;Bn<ms.length;++Bn)if(Oi(ms[Bn],qn,ba),ms[Bn]&&ms[Bn].texture){var Va=Vv[ms[Bn].texture._texture.format]*gp[ms[Bn].texture._texture.type];Zn===null&&(Zn=Va)}return Oi(Zf,qn,ba),Oi(Ch,qn,ba),Oi(Dh,qn,ba),xi(Ri),Ri.width=qn,Ri.height=ba,Ri.colorAttachments=ms,Ri.depthAttachment=Zf,Ri.stencilAttachment=Ch,Ri.depthStencilAttachment=Dh,vn.color=ms.map(Sr),vn.depth=Sr(Zf),vn.stencil=Sr(Ch),vn.depthStencil=Sr(Dh),vn.width=Ri.width,vn.height=Ri.height,qr(Ri),vn}function Hn(wi,Hi){var Bn=Math.max(wi|0,1),qn=Math.max(Hi|0||Bn,1);if(Bn===Ri.width&&qn===Ri.height)return vn;for(var ba=Ri.colorAttachments,Al=0;Al<ba.length;++Al)jr(ba[Al],Bn,qn);return jr(Ri.depthAttachment,Bn,qn),jr(Ri.stencilAttachment,Bn,qn),jr(Ri.depthStencilAttachment,Bn,qn),Ri.width=vn.width=Bn,Ri.height=vn.height=qn,qr(Ri),vn}return vn(li,hi),e(vn,{resize:Hn,_reglType:"framebuffer",_framebuffer:Ri,destroy:function(){pn(Ri),xi(Ri)},use:function(wi){dr.setFBO({framebuffer:vn},wi)}})}function Ii(li){var hi=Array(6);function Ri(Hn){var wi,Hi={color:null},Bn=0,qn=null,ba="rgba",Al="uint8",Ku=1;if(typeof Hn=="number")Bn=Hn|0;else if(!Hn)Bn=1;else{var Pa=Hn;if("shape"in Pa){var Eh=Pa.shape;Bn=Eh[0]}else"radius"in Pa&&(Bn=Pa.radius|0),"width"in Pa?(Bn=Pa.width|0,"height"in Pa):"height"in Pa&&(Bn=Pa.height|0);("color"in Pa||"colors"in Pa)&&(qn=Pa.color||Pa.colors,Array.isArray(qn)),qn||("colorCount"in Pa&&(Ku=Pa.colorCount|0),"colorType"in Pa&&(Al=Pa.colorType),"colorFormat"in Pa&&(ba=Pa.colorFormat)),"depth"in Pa&&(Hi.depth=Pa.depth),"stencil"in Pa&&(Hi.stencil=Pa.stencil),"depthStencil"in Pa&&(Hi.depthStencil=Pa.depthStencil)}var os;if(qn)if(Array.isArray(qn))for(os=[],wi=0;wi<qn.length;++wi)os[wi]=qn[wi];else os=[qn];else{os=Array(Ku);var mf={radius:Bn,format:ba,type:Al};for(wi=0;wi<Ku;++wi)os[wi]=or.createCube(mf)}for(Hi.color=Array(os.length),wi=0;wi<os.length;++wi){var Xf=os[wi];Bn=Bn||Xf.width,Hi.color[wi]={target:bh,data:os[wi]}}for(wi=0;wi<6;++wi){for(var kh=0;kh<os.length;++kh)Hi.color[kh].target=bh+wi;wi>0&&(Hi.depth=hi[0].depth,Hi.stencil=hi[0].stencil,Hi.depthStencil=hi[0].depthStencil),hi[wi]?hi[wi](Hi):hi[wi]=Ir(Hi)}return e(Ri,{width:Bn,height:Bn,color:os})}function vn(Hn){var wi,Hi=Hn|0;if(Hi===Ri.width)return Ri;var Bn=Ri.color;for(wi=0;wi<Bn.length;++wi)Bn[wi].resize(Hi);for(wi=0;wi<6;++wi)hi[wi].resize(Hi);return Ri.width=Ri.height=Hi,Ri}return Ri(li),e(Ri,{faces:hi,resize:vn,_reglType:"framebufferCube",destroy:function(){hi.forEach(function(Hn){Hn.destroy()})}})}function gi(){dr.cur=null,dr.next=null,dr.dirty=!0,Xe(Nr).forEach(function(li){li.framebuffer=Be.createFramebuffer(),qr(li)})}return e(dr,{getFramebuffer:function(li){if(typeof li=="function"&&li._reglType==="framebuffer"){var hi=li._framebuffer;if(hi instanceof Ai)return hi}return null},create:Ir,createCube:Ii,clear:function(){Xe(Nr).forEach(pn)},restore:gi})}var Qm=5126,yp=34962,wh=34963;function J0(){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=Qm,this.offset=0,this.stride=0,this.divisor=0}function xp(Be,gt,Mt,or,vr,wr,dr){for(var Br=Mt.maxAttributes,Zr=new Array(Br),Kr=0;Kr<Br;++Kr)Zr[Kr]=new J0;var Jr=0,un={},Oi={Record:J0,scope:{},state:Zr,currentVAO:null,targetVAO:null,restore:Fr()?xi:function(){},createVAO:pn,getVAO:Sr,destroyBuffer:mi,setVAO:Fr()?jr:ii,clear:Fr()?Nr:function(){}};function mi(qr){for(var Ir=0;Ir<Zr.length;++Ir){var Ii=Zr[Ir];Ii.buffer===qr&&(Be.disableVertexAttribArray(Ir),Ii.buffer=null)}}function Fr(){return gt.oes_vertex_array_object}function Qt(){return gt.angle_instanced_arrays}function Sr(qr){return typeof qr=="function"&&qr._vao?qr._vao:null}function jr(qr){if(qr!==Oi.currentVAO){var Ir=Fr();qr?Ir.bindVertexArrayOES(qr.vao):Ir.bindVertexArrayOES(null),Oi.currentVAO=qr}}function ii(qr){if(qr!==Oi.currentVAO){if(qr)qr.bindAttrs();else{for(var Ir=Qt(),Ii=0;Ii<Zr.length;++Ii){var gi=Zr[Ii];gi.buffer?(Be.enableVertexAttribArray(Ii),gi.buffer.bind(),Be.vertexAttribPointer(Ii,gi.size,gi.type,gi.normalized,gi.stride,gi.offfset),Ir&&gi.divisor&&Ir.vertexAttribDivisorANGLE(Ii,gi.divisor)):(Be.disableVertexAttribArray(Ii),Be.vertexAttrib4f(Ii,gi.x,gi.y,gi.z,gi.w))}dr.elements?Be.bindBuffer(wh,dr.elements.buffer.buffer):Be.bindBuffer(wh,null)}Oi.currentVAO=qr}}function Nr(){Xe(un).forEach(function(qr){qr.destroy()})}function Ai(){this.id=++Jr,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var qr=Fr();qr?this.vao=qr.createVertexArrayOES():this.vao=null,un[this.id]=this,this.buffers=[]}Ai.prototype.bindAttrs=function(){for(var qr=Qt(),Ir=this.attributes,Ii=0;Ii<Ir.length;++Ii){var gi=Ir[Ii];gi.buffer?(Be.enableVertexAttribArray(Ii),Be.bindBuffer(yp,gi.buffer.buffer),Be.vertexAttribPointer(Ii,gi.size,gi.type,gi.normalized,gi.stride,gi.offset),qr&&gi.divisor&&qr.vertexAttribDivisorANGLE(Ii,gi.divisor)):(Be.disableVertexAttribArray(Ii),Be.vertexAttrib4f(Ii,gi.x,gi.y,gi.z,gi.w))}for(var li=Ir.length;li<Br;++li)Be.disableVertexAttribArray(li);var hi=wr.getElements(this.elements);hi?Be.bindBuffer(wh,hi.buffer.buffer):Be.bindBuffer(wh,null)},Ai.prototype.refresh=function(){var qr=Fr();qr&&(qr.bindVertexArrayOES(this.vao),this.bindAttrs(),Oi.currentVAO=null,qr.bindVertexArrayOES(null))},Ai.prototype.destroy=function(){if(this.vao){var qr=Fr();this===Oi.currentVAO&&(Oi.currentVAO=null,qr.bindVertexArrayOES(null)),qr.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),un[this.id]&&(delete un[this.id],or.vaoCount-=1)};function xi(){var qr=Fr();qr&&Xe(un).forEach(function(Ir){Ir.refresh()})}function pn(qr){var Ir=new Ai;or.vaoCount+=1;function Ii(gi){var li;if(Array.isArray(gi))li=gi,Ir.elements&&Ir.ownsElements&&Ir.elements.destroy(),Ir.elements=null,Ir.ownsElements=!1,Ir.offset=0,Ir.count=0,Ir.instances=-1,Ir.primitive=4;else{if(gi.elements){var hi=gi.elements;Ir.ownsElements?typeof hi=="function"&&hi._reglType==="elements"?(Ir.elements.destroy(),Ir.ownsElements=!1):(Ir.elements(hi),Ir.ownsElements=!1):wr.getElements(gi.elements)?(Ir.elements=gi.elements,Ir.ownsElements=!1):(Ir.elements=wr.create(gi.elements),Ir.ownsElements=!0)}else Ir.elements=null,Ir.ownsElements=!1;li=gi.attributes,Ir.offset=0,Ir.count=-1,Ir.instances=-1,Ir.primitive=4,Ir.elements&&(Ir.count=Ir.elements._elements.vertCount,Ir.primitive=Ir.elements._elements.primType),"offset"in gi&&(Ir.offset=gi.offset|0),"count"in gi&&(Ir.count=gi.count|0),"instances"in gi&&(Ir.instances=gi.instances|0),"primitive"in gi&&(Ir.primitive=ds[gi.primitive])}var Ri={},vn=Ir.attributes;vn.length=li.length;for(var Hn=0;Hn<li.length;++Hn){var wi=li[Hn],Hi=vn[Hn]=new J0,Bn=wi.data||wi;if(Array.isArray(Bn)||ut(Bn)||vt(Bn)){var qn;Ir.buffers[Hn]&&(qn=Ir.buffers[Hn],ut(Bn)&&qn._buffer.byteLength>=Bn.byteLength?qn.subdata(Bn):(qn.destroy(),Ir.buffers[Hn]=null)),Ir.buffers[Hn]||(qn=Ir.buffers[Hn]=vr.create(wi,yp,!1,!0)),Hi.buffer=vr.getBuffer(qn),Hi.size=Hi.buffer.dimension|0,Hi.normalized=!1,Hi.type=Hi.buffer.dtype,Hi.offset=0,Hi.stride=0,Hi.divisor=0,Hi.state=1,Ri[Hn]=1}else vr.getBuffer(wi)?(Hi.buffer=vr.getBuffer(wi),Hi.size=Hi.buffer.dimension|0,Hi.normalized=!1,Hi.type=Hi.buffer.dtype,Hi.offset=0,Hi.stride=0,Hi.divisor=0,Hi.state=1):vr.getBuffer(wi.buffer)?(Hi.buffer=vr.getBuffer(wi.buffer),Hi.size=(+wi.size||Hi.buffer.dimension)|0,Hi.normalized=!!wi.normalized||!1,"type"in wi?Hi.type=kr[wi.type]:Hi.type=Hi.buffer.dtype,Hi.offset=(wi.offset||0)|0,Hi.stride=(wi.stride||0)|0,Hi.divisor=(wi.divisor||0)|0,Hi.state=1):"x"in wi&&(Hi.x=+wi.x||0,Hi.y=+wi.y||0,Hi.z=+wi.z||0,Hi.w=+wi.w||0,Hi.state=2)}for(var ba=0;ba<Ir.buffers.length;++ba)!Ri[ba]&&Ir.buffers[ba]&&(Ir.buffers[ba].destroy(),Ir.buffers[ba]=null);return Ir.refresh(),Ii}return Ii.destroy=function(){for(var gi=0;gi<Ir.buffers.length;++gi)Ir.buffers[gi]&&Ir.buffers[gi].destroy();Ir.buffers.length=0,Ir.ownsElements&&(Ir.elements.destroy(),Ir.elements=null,Ir.ownsElements=!1),Ir.destroy()},Ii._vao=Ir,Ii._reglType="vao",Ii(qr)}return Oi}var ey=35632,_p=35633,s0=35718,bp=35721;function l0(Be,gt,Mt,or){var vr={},wr={};function dr(Qt,Sr,jr,ii){this.name=Qt,this.id=Sr,this.location=jr,this.info=ii}function Br(Qt,Sr){for(var jr=0;jr<Qt.length;++jr)if(Qt[jr].id===Sr.id){Qt[jr].location=Sr.location;return}Qt.push(Sr)}function Zr(Qt,Sr,jr){var ii=Qt===ey?vr:wr,Nr=ii[Sr];if(!Nr){var Ai=gt.str(Sr);Nr=Be.createShader(Qt),Be.shaderSource(Nr,Ai),Be.compileShader(Nr),ii[Sr]=Nr}return Nr}var Kr={},Jr=[],un=0;function Oi(Qt,Sr){this.id=un++,this.fragId=Qt,this.vertId=Sr,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,or.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function mi(Qt,Sr,jr){var ii,Nr,Ai=Zr(ey,Qt.fragId),xi=Zr(_p,Qt.vertId),pn=Qt.program=Be.createProgram();if(Be.attachShader(pn,Ai),Be.attachShader(pn,xi),jr)for(ii=0;ii<jr.length;++ii){var qr=jr[ii];Be.bindAttribLocation(pn,qr[0],qr[1])}Be.linkProgram(pn);var Ir=Be.getProgramParameter(pn,s0);or.profile&&(Qt.stats.uniformsCount=Ir);var Ii=Qt.uniforms;for(ii=0;ii<Ir;++ii)if(Nr=Be.getActiveUniform(pn,ii),Nr)if(Nr.size>1)for(var gi=0;gi<Nr.size;++gi){var li=Nr.name.replace("[0]","["+gi+"]");Br(Ii,new dr(li,gt.id(li),Be.getUniformLocation(pn,li),Nr))}else Br(Ii,new dr(Nr.name,gt.id(Nr.name),Be.getUniformLocation(pn,Nr.name),Nr));var hi=Be.getProgramParameter(pn,bp);or.profile&&(Qt.stats.attributesCount=hi);var Ri=Qt.attributes;for(ii=0;ii<hi;++ii)Nr=Be.getActiveAttrib(pn,ii),Nr&&Br(Ri,new dr(Nr.name,gt.id(Nr.name),Be.getAttribLocation(pn,Nr.name),Nr))}or.profile&&(Mt.getMaxUniformsCount=function(){var Qt=0;return Jr.forEach(function(Sr){Sr.stats.uniformsCount>Qt&&(Qt=Sr.stats.uniformsCount)}),Qt},Mt.getMaxAttributesCount=function(){var Qt=0;return Jr.forEach(function(Sr){Sr.stats.attributesCount>Qt&&(Qt=Sr.stats.attributesCount)}),Qt});function Fr(){vr={},wr={};for(var Qt=0;Qt<Jr.length;++Qt)mi(Jr[Qt],null,Jr[Qt].attributes.map(function(Sr){return[Sr.location,Sr.name]}))}return{clear:function(){var Qt=Be.deleteShader.bind(Be);Xe(vr).forEach(Qt),vr={},Xe(wr).forEach(Qt),wr={},Jr.forEach(function(Sr){Be.deleteProgram(Sr.program)}),Jr.length=0,Kr={},Mt.shaderCount=0},program:function(Qt,Sr,jr,ii){var Nr=Kr[Sr];Nr||(Nr=Kr[Sr]={});var Ai=Nr[Qt];if(Ai&&(Ai.refCount++,!ii))return Ai;var xi=new Oi(Sr,Qt);return Mt.shaderCount++,mi(xi,jr,ii),Ai||(Nr[Qt]=xi),Jr.push(xi),e(xi,{destroy:function(){if(xi.refCount--,xi.refCount<=0){Be.deleteProgram(xi.program);var pn=Jr.indexOf(xi);Jr.splice(pn,1),Mt.shaderCount--}Nr[xi.vertId].refCount<=0&&(Be.deleteShader(wr[xi.vertId]),delete wr[xi.vertId],delete Kr[xi.fragId][xi.vertId]),Object.keys(Kr[xi.fragId]).length||(Be.deleteShader(vr[xi.fragId]),delete vr[xi.fragId],delete Kr[xi.fragId])}})},restore:Fr,shader:Zr,frag:-1,vert:-1}}var Q0=6408,ed=5121,wp=3333,mg=5126;function Gv(Be,gt,Mt,or,vr,wr,dr){function Br(Jr){var un;gt.next===null?un=ed:un=gt.next.colorAttachments[0].texture._texture.type;var Oi=0,mi=0,Fr=or.framebufferWidth,Qt=or.framebufferHeight,Sr=null;ut(Jr)?Sr=Jr:Jr&&(Oi=Jr.x|0,mi=Jr.y|0,Fr=(Jr.width||or.framebufferWidth-Oi)|0,Qt=(Jr.height||or.framebufferHeight-mi)|0,Sr=Jr.data||null),Mt();var jr=Fr*Qt*4;return Sr||(un===ed?Sr=new Uint8Array(jr):un===mg&&(Sr=Sr||new Float32Array(jr))),Be.pixelStorei(wp,4),Be.readPixels(Oi,mi,Fr,Qt,Q0,un,Sr),Sr}function Zr(Jr){var un;return gt.setFBO({framebuffer:Jr.framebuffer},function(){un=Br(Jr)}),un}function Kr(Jr){return!Jr||!("framebuffer"in Jr)?Br(Jr):Zr(Jr)}return Kr}var ty=0,ry="";function yg(Be){return Gc(Hv(Ap(Be)))}function Hv(Be){return Te(rr(Mp(Be),Be.length*8))}function cl(Be,gt){var Mt=Mp(Be);Mt.length>16&&(Mt=rr(Mt,Be.length*8));for(var or=Array(16),vr=Array(16),wr=0;wr<16;wr++)or[wr]=Mt[wr]^909522486,vr[wr]=Mt[wr]^1549556828;var dr=rr(or.concat(Mp(gt)),512+gt.length*8);return Te(rr(vr.concat(dr),768))}function Gc(Be){for(var gt=ty?"0123456789ABCDEF":"0123456789abcdef",Mt="",or,vr=0;vr<Be.length;vr++)or=Be.charCodeAt(vr),Mt+=gt.charAt(or>>>4&15)+gt.charAt(or&15);return Mt}function Tp(Be){for(var gt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mt="",or=Be.length,vr=0;vr<or;vr+=3)for(var wr=Be.charCodeAt(vr)<<16|(vr+1<or?Be.charCodeAt(vr+1)<<8:0)|(vr+2<or?Be.charCodeAt(vr+2):0),dr=0;dr<4;dr++)vr*8+dr*6>Be.length*8?Mt+=ry:Mt+=gt.charAt(wr>>>6*(3-dr)&63);return Mt}function xg(Be,gt){var Mt=gt.length,or=Array(),vr,wr,dr,Br,Zr=Array(Math.ceil(Be.length/2));for(vr=0;vr<Zr.length;vr++)Zr[vr]=Be.charCodeAt(vr*2)<<8|Be.charCodeAt(vr*2+1);for(;Zr.length>0;){for(Br=Array(),dr=0,vr=0;vr<Zr.length;vr++)dr=(dr<<16)+Zr[vr],wr=Math.floor(dr/Mt),dr-=wr*Mt,(Br.length>0||wr>0)&&(Br[Br.length]=wr);or[or.length]=dr,Zr=Br}var Kr="";for(vr=or.length-1;vr>=0;vr--)Kr+=gt.charAt(or[vr]);var Jr=Math.ceil(Be.length*8/(Math.log(gt.length)/Math.log(2)));for(vr=Kr.length;vr<Jr;vr++)Kr=gt[0]+Kr;return Kr}function Ap(Be){for(var gt="",Mt=-1,or,vr;++Mt<Be.length;)or=Be.charCodeAt(Mt),vr=Mt+1<Be.length?Be.charCodeAt(Mt+1):0,55296<=or&&or<=56319&&56320<=vr&&vr<=57343&&(or=65536+((or&1023)<<10)+(vr&1023),Mt++),or<=127?gt+=String.fromCharCode(or):or<=2047?gt+=String.fromCharCode(192|or>>>6&31,128|or&63):or<=65535?gt+=String.fromCharCode(224|or>>>12&15,128|or>>>6&63,128|or&63):or<=2097151&&(gt+=String.fromCharCode(240|or>>>18&7,128|or>>>12&63,128|or>>>6&63,128|or&63));return gt}function Mp(Be){for(var gt=Array(Be.length>>2),Mt=0;Mt<gt.length;Mt++)gt[Mt]=0;for(var Mt=0;Mt<Be.length*8;Mt+=8)gt[Mt>>5]|=(Be.charCodeAt(Mt/8)&255)<<24-Mt%32;return gt}function Te(Be){for(var gt="",Mt=0;Mt<Be.length*32;Mt+=8)gt+=String.fromCharCode(Be[Mt>>5]>>>24-Mt%32&255);return gt}function qe(Be,gt){return Be>>>gt|Be<<32-gt}function rt(Be,gt){return Be>>>gt}function Ye(Be,gt,Mt){return Be&gt^~Be&Mt}function At(Be,gt,Mt){return Be&gt^Be&Mt^gt&Mt}function Gt(Be){return qe(Be,2)^qe(Be,13)^qe(Be,22)}function Kt(Be){return qe(Be,6)^qe(Be,11)^qe(Be,25)}function cr(Be){return qe(Be,7)^qe(Be,18)^rt(Be,3)}function mr(Be){return qe(Be,17)^qe(Be,19)^rt(Be,10)}var Pr=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 rr(Be,gt){var Mt=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),or=new Array(64),vr,wr,dr,Br,Zr,Kr,Jr,un,Oi,mi,Fr,Qt;for(Be[gt>>5]|=128<<24-gt%32,Be[(gt+64>>9<<4)+15]=gt,Oi=0;Oi<Be.length;Oi+=16){for(vr=Mt[0],wr=Mt[1],dr=Mt[2],Br=Mt[3],Zr=Mt[4],Kr=Mt[5],Jr=Mt[6],un=Mt[7],mi=0;mi<64;mi++)mi<16?or[mi]=Be[mi+Oi]:or[mi]=fr(fr(fr(mr(or[mi-2]),or[mi-7]),cr(or[mi-15])),or[mi-16]),Fr=fr(fr(fr(fr(un,Kt(Zr)),Ye(Zr,Kr,Jr)),Pr[mi]),or[mi]),Qt=fr(Gt(vr),At(vr,wr,dr)),un=Jr,Jr=Kr,Kr=Zr,Zr=fr(Br,Fr),Br=dr,dr=wr,wr=vr,vr=fr(Fr,Qt);Mt[0]=fr(vr,Mt[0]),Mt[1]=fr(wr,Mt[1]),Mt[2]=fr(dr,Mt[2]),Mt[3]=fr(Br,Mt[3]),Mt[4]=fr(Zr,Mt[4]),Mt[5]=fr(Kr,Mt[5]),Mt[6]=fr(Jr,Mt[6]),Mt[7]=fr(un,Mt[7])}return Mt}function fr(Be,gt){var Mt=(Be&65535)+(gt&65535),or=(Be>>16)+(gt>>16)+(Mt>>16);return or<<16|Mt&65535}function pr(Be){return Array.prototype.slice.call(Be)}function Dr(Be){return pr(Be).join("")}function Hr(Be){var gt=Be&&Be.cache,Mt=0,or=[],vr=[],wr=[];function dr(Fr,Qt){var Sr=Qt&&Qt.stable;if(!Sr){for(var jr=0;jr<vr.length;++jr)if(vr[jr]===Fr&&!wr[jr])return or[jr]}var ii="g"+Mt++;return or.push(ii),vr.push(Fr),wr.push(Sr),ii}function Br(){var Fr=[];function Qt(){Fr.push.apply(Fr,pr(arguments))}var Sr=[];function jr(){var ii="v"+Mt++;return Sr.push(ii),arguments.length>0&&(Fr.push(ii,"="),Fr.push.apply(Fr,pr(arguments)),Fr.push(";")),ii}return e(Qt,{def:jr,toString:function(){return Dr([Sr.length>0?"var "+Sr.join(",")+";":"",Dr(Fr)])}})}function Zr(){var Fr=Br(),Qt=Br(),Sr=Fr.toString,jr=Qt.toString;function ii(Nr,Ai){Qt(Nr,Ai,"=",Fr.def(Nr,Ai),";")}return e(function(){Fr.apply(Fr,pr(arguments))},{def:Fr.def,entry:Fr,exit:Qt,save:ii,set:function(Nr,Ai,xi){ii(Nr,Ai),Fr(Nr,Ai,"=",xi,";")},toString:function(){return Sr()+jr()}})}function Kr(){var Fr=Dr(arguments),Qt=Zr(),Sr=Zr(),jr=Qt.toString,ii=Sr.toString;return e(Qt,{then:function(){return Qt.apply(Qt,pr(arguments)),this},else:function(){return Sr.apply(Sr,pr(arguments)),this},toString:function(){var Nr=ii();return Nr&&(Nr="else{"+Nr+"}"),Dr(["if(",Fr,"){",jr(),"}",Nr])}})}var Jr=Br(),un={};function Oi(Fr,Qt){var Sr=[];function jr(){var pn="a"+Sr.length;return Sr.push(pn),pn}Qt=Qt||0;for(var ii=0;ii<Qt;++ii)jr();var Nr=Zr(),Ai=Nr.toString,xi=un[Fr]=e(Nr,{arg:jr,toString:function(){return Dr(["function(",Sr.join(),"){",Ai(),"}"])}});return xi}function mi(){var Fr=['"use strict";',Jr,"return {"];Object.keys(un).forEach(function(ii){Fr.push('"',ii,'":',un[ii].toString(),",")}),Fr.push("}");var Qt=Dr(Fr).replace(/;/g,`;
`).replace(/}/g,`}
`).replace(/{/g,`{
`),Sr;if(gt&&(Sr=yg(Qt),gt[Sr]))return gt[Sr].apply(null,vr);var jr=Function.apply(null,or.concat(Qt));return gt&&(gt[Sr]=jr),jr.apply(null,vr)}return{global:Jr,link:dr,block:Br,proc:Oi,scope:Zr,cond:Kr,compile:mi}}var zi="xyzw".split(""),ki=5121,Vi=1,Xi=2,Yr=0,ai=1,on=2,En=3,ga=4,$a=5,Ca=6,xo="dither",aa="blend.enable",fl="blend.color",ns="blend.equation",po="blend.func",di="depth.enable",Sa="depth.func",ks="depth.range",bl="depth.mask",Au="colorMask",vf="cull.enable",Hc="cull.face",Hf="frontFace",Yu="lineWidth",Th="polygonOffset.enable",Ah="polygonOffset.offset",Sp="sample.alpha",_g="sample.enable",jv="sample.coverage",Mx="stencil.enable",$v="stencil.mask",jc="stencil.func",iy="stencil.opFront",Wv="stencil.opBack",bg="scissor.enable",Yv="scissor.box",Mh="viewport",wg="profile",Ep="framebuffer",kp="vert",td="frag",Cp="elements",rd="primitive",Xv="count",Tg="offset",gc="instances",ie="vao",se="Width",de="Height",ve=Ep+se,Me=Ep+de,Ae=Mh+se,Pe=Mh+de,Ke="drawingBuffer",nt=Ke+se,Ze=Ke+de,at=[po,ns,jc,iy,Wv,jv,Mh,Yv,Ah],yt=34962,Pt=34963,Ut=2884,ar=3042,Ar=3024,Vr=2960,_i=2929,rn=3089,cn=32823,xn=32926,Dn=32928,Qa=5126,So=35664,oa=35665,as=35666,wl=5124,Xu=35667,jf=35668,u0=35669,ou=35670,Ul=35671,$c=35672,$f=35673,Wf=35674,Yf=35675,Sh=35676,gf=35678,c0=35680,Dp=4,z=1028,N=1029,Z=2304,ne=2305,le=32775,fe=32776,De=519,me=7680,ze=0,He=1,We=32774,ft=513,ht=36160,Ot=36064,jt={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},pt={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},Dt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},zt={cw:Z,ccw:ne};function $t(Be){return Array.isArray(Be)||ut(Be)||vt(Be)}function Yt(Be){return Be.sort(function(gt,Mt){return gt===Mh?-1:Mt===Mh?1:gt<Mt?-1:1})}function Lt(Be,gt,Mt,or){this.thisDep=Be,this.contextDep=gt,this.propDep=Mt,this.append=or}function Cr(Be){return Be&&!(Be.thisDep||Be.contextDep||Be.propDep)}function Gr(Be){return new Lt(!1,!1,!1,Be)}function ri(Be,gt){var Mt=Be.type;if(Mt===Yr){var or=Be.data.length;return new Lt(!0,or>=1,or>=2,gt)}else if(Mt===ga){var vr=Be.data;return new Lt(vr.thisDep,vr.contextDep,vr.propDep,gt)}else{if(Mt===$a)return new Lt(!1,!1,!1,gt);if(Mt===Ca){for(var wr=!1,dr=!1,Br=!1,Zr=0;Zr<Be.data.length;++Zr){var Kr=Be.data[Zr];if(Kr.type===ai)Br=!0;else if(Kr.type===on)dr=!0;else if(Kr.type===En)wr=!0;else if(Kr.type===Yr){wr=!0;var Jr=Kr.data;Jr>=1&&(dr=!0),Jr>=2&&(Br=!0)}else Kr.type===ga&&(wr=wr||Kr.data.thisDep,dr=dr||Kr.data.contextDep,Br=Br||Kr.data.propDep)}return new Lt(wr,dr,Br,gt)}else return new Lt(Mt===En,Mt===on,Mt===ai,gt)}}var pi=new Lt(!1,!1,!1,function(){});function Li(Be,gt,Mt,or,vr,wr,dr,Br,Zr,Kr,Jr,un,Oi,mi,Fr,Qt){var Sr=Kr.Record,jr={add:32774,subtract:32778,"reverse subtract":32779};Mt.ext_blend_minmax&&(jr.min=le,jr.max=fe);var ii=Mt.angle_instanced_arrays,Nr=Mt.webgl_draw_buffers,Ai=Mt.oes_vertex_array_object,xi={dirty:!0,profile:Qt.profile},pn={},qr=[],Ir={},Ii={};function gi(dt){return dt.replace(".","_")}function li(dt,St,It){var gr=gi(dt);qr.push(dt),pn[gr]=xi[gr]=!!It,Ir[gr]=St}function hi(dt,St,It){var gr=gi(dt);qr.push(dt),Array.isArray(It)?(xi[gr]=It.slice(),pn[gr]=It.slice()):xi[gr]=pn[gr]=It,Ii[gr]=St}function Ri(dt){return!!isNaN(dt)}li(xo,Ar),li(aa,ar),hi(fl,"blendColor",[0,0,0,0]),hi(ns,"blendEquationSeparate",[We,We]),hi(po,"blendFuncSeparate",[He,ze,He,ze]),li(di,_i,!0),hi(Sa,"depthFunc",ft),hi(ks,"depthRange",[0,1]),hi(bl,"depthMask",!0),hi(Au,Au,[!0,!0,!0,!0]),li(vf,Ut),hi(Hc,"cullFace",N),hi(Hf,Hf,ne),hi(Yu,Yu,1),li(Th,cn),hi(Ah,"polygonOffset",[0,0]),li(Sp,xn),li(_g,Dn),hi(jv,"sampleCoverage",[1,!1]),li(Mx,Vr),hi($v,"stencilMask",-1),hi(jc,"stencilFunc",[De,0,-1]),hi(iy,"stencilOpSeparate",[z,me,me,me]),hi(Wv,"stencilOpSeparate",[N,me,me,me]),li(bg,rn),hi(Yv,"scissor",[0,0,Be.drawingBufferWidth,Be.drawingBufferHeight]),hi(Mh,Mh,[0,0,Be.drawingBufferWidth,Be.drawingBufferHeight]);var vn={gl:Be,context:Oi,strings:gt,next:pn,current:xi,draw:un,elements:wr,buffer:vr,shader:Jr,attributes:Kr.state,vao:Kr,uniforms:Zr,framebuffer:Br,extensions:Mt,timer:mi,isBufferArgs:$t},Hn={primTypes:ds,compareFuncs:pt,blendFuncs:jt,blendEquations:jr,stencilOps:Dt,glTypes:kr,orientationType:zt};Nr&&(Hn.backBuffer=[N],Hn.drawBuffer=A(or.maxDrawbuffers,function(dt){return dt===0?[0]:A(dt,function(St){return Ot+St})}));var wi=0;function Hi(){var dt=Hr({cache:Fr}),St=dt.link,It=dt.global;dt.id=wi++,dt.batchId="0";var gr=St(vn),Mr=dt.shared={props:"a0"};Object.keys(vn).forEach(function(Nt){Mr[Nt]=It.def(gr,".",Nt)});var nr=dt.next={},er=dt.current={};Object.keys(Ii).forEach(function(Nt){Array.isArray(xi[Nt])&&(nr[Nt]=It.def(Mr.next,".",Nt),er[Nt]=It.def(Mr.current,".",Nt))});var Ht=dt.constants={};Object.keys(Hn).forEach(function(Nt){Ht[Nt]=It.def(JSON.stringify(Hn[Nt]))}),dt.invoke=function(Nt,Et){switch(Et.type){case Yr:var sr=["this",Mr.context,Mr.props,dt.batchId];return Nt.def(St(Et.data),".call(",sr.slice(0,Math.max(Et.data.length+1,4)),")");case ai:return Nt.def(Mr.props,Et.data);case on:return Nt.def(Mr.context,Et.data);case En:return Nt.def("this",Et.data);case ga:return Et.data.append(dt,Nt),Et.data.ref;case $a:return Et.data.toString();case Ca:return Et.data.map(function(Er){return dt.invoke(Nt,Er)})}},dt.attribCache={};var Ft={};return dt.scopeAttrib=function(Nt){var Et=gt.id(Nt);if(Et in Ft)return Ft[Et];var sr=Kr.scope[Et];sr||(sr=Kr.scope[Et]=new Sr);var Er=Ft[Et]=St(sr);return Er},dt}function Bn(dt){var St=dt.static,It=dt.dynamic,gr;if(wg in St){var Mr=!!St[wg];gr=Gr(function(er,Ht){return Mr}),gr.enable=Mr}else if(wg in It){var nr=It[wg];gr=ri(nr,function(er,Ht){return er.invoke(Ht,nr)})}return gr}function qn(dt,St){var It=dt.static,gr=dt.dynamic;if(Ep in It){var Mr=It[Ep];return Mr?(Mr=Br.getFramebuffer(Mr),Gr(function(er,Ht){var Ft=er.link(Mr),Nt=er.shared;Ht.set(Nt.framebuffer,".next",Ft);var Et=Nt.context;return Ht.set(Et,"."+ve,Ft+".width"),Ht.set(Et,"."+Me,Ft+".height"),Ft})):Gr(function(er,Ht){var Ft=er.shared;Ht.set(Ft.framebuffer,".next","null");var Nt=Ft.context;return Ht.set(Nt,"."+ve,Nt+"."+nt),Ht.set(Nt,"."+Me,Nt+"."+Ze),"null"})}else if(Ep in gr){var nr=gr[Ep];return ri(nr,function(er,Ht){var Ft=er.invoke(Ht,nr),Nt=er.shared,Et=Nt.framebuffer,sr=Ht.def(Et,".getFramebuffer(",Ft,")");Ht.set(Et,".next",sr);var Er=Nt.context;return Ht.set(Er,"."+ve,sr+"?"+sr+".width:"+Er+"."+nt),Ht.set(Er,"."+Me,sr+"?"+sr+".height:"+Er+"."+Ze),sr})}else return null}function ba(dt,St,It){var gr=dt.static,Mr=dt.dynamic;function nr(Ft){if(Ft in gr){var Nt=gr[Ft],Et=!0,sr=Nt.x|0,Er=Nt.y|0,Wr,_n;return"width"in Nt?Wr=Nt.width|0:Et=!1,"height"in Nt?_n=Nt.height|0:Et=!1,new Lt(!Et&&St&&St.thisDep,!Et&&St&&St.contextDep,!Et&&St&&St.propDep,function(gn,nn){var en=gn.shared.context,Di=Wr;"width"in Nt||(Di=nn.def(en,".",ve,"-",sr));var Yi=_n;return"height"in Nt||(Yi=nn.def(en,".",Me,"-",Er)),[sr,Er,Di,Yi]})}else if(Ft in Mr){var Bi=Mr[Ft],Ci=ri(Bi,function(gn,nn){var en=gn.invoke(nn,Bi),Di=gn.shared.context,Yi=nn.def(en,".x|0"),Qi=nn.def(en,".y|0"),jn=nn.def('"width" in ',en,"?",en,".width|0:","(",Di,".",ve,"-",Yi,")"),Os=nn.def('"height" in ',en,"?",en,".height|0:","(",Di,".",Me,"-",Qi,")");return[Yi,Qi,jn,Os]});return St&&(Ci.thisDep=Ci.thisDep||St.thisDep,Ci.contextDep=Ci.contextDep||St.contextDep,Ci.propDep=Ci.propDep||St.propDep),Ci}else return St?new Lt(St.thisDep,St.contextDep,St.propDep,function(gn,nn){var en=gn.shared.context;return[0,0,nn.def(en,".",ve),nn.def(en,".",Me)]}):null}var er=nr(Mh);if(er){var Ht=er;er=new Lt(er.thisDep,er.contextDep,er.propDep,function(Ft,Nt){var Et=Ht.append(Ft,Nt),sr=Ft.shared.context;return Nt.set(sr,"."+Ae,Et[2]),Nt.set(sr,"."+Pe,Et[3]),Et})}return{viewport:er,scissor_box:nr(Yv)}}function Al(dt,St){var It=dt.static,gr=typeof It[td]=="string"&&typeof It[kp]=="string";if(gr){if(Object.keys(St.dynamic).length>0)return null;var Mr=St.static,nr=Object.keys(Mr);if(nr.length>0&&typeof Mr[nr[0]]=="number"){for(var er=[],Ht=0;Ht<nr.length;++Ht)er.push([Mr[nr[Ht]]|0,nr[Ht]]);return er}}return null}function Ku(dt,St,It){var gr=dt.static,Mr=dt.dynamic;function nr(Et){if(Et in gr){var sr=gt.id(gr[Et]),Er=Gr(function(){return sr});return Er.id=sr,Er}else if(Et in Mr){var Wr=Mr[Et];return ri(Wr,function(_n,Bi){var Ci=_n.invoke(Bi,Wr),gn=Bi.def(_n.shared.strings,".id(",Ci,")");return gn})}return null}var er=nr(td),Ht=nr(kp),Ft=null,Nt;return Cr(er)&&Cr(Ht)?(Ft=Jr.program(Ht.id,er.id,null,It),Nt=Gr(function(Et,sr){return Et.link(Ft)})):Nt=new Lt(er&&er.thisDep||Ht&&Ht.thisDep,er&&er.contextDep||Ht&&Ht.contextDep,er&&er.propDep||Ht&&Ht.propDep,function(Et,sr){var Er=Et.shared.shader,Wr;er?Wr=er.append(Et,sr):Wr=sr.def(Er,".",td);var _n;Ht?_n=Ht.append(Et,sr):_n=sr.def(Er,".",kp);var Bi=Er+".program("+_n+","+Wr;return sr.def(Bi+")")}),{frag:er,vert:Ht,progVar:Nt,program:Ft}}function Pa(dt,St){var It=dt.static,gr=dt.dynamic,Mr={},nr=!1;function er(){if(ie in It){var nn=It[ie];return nn!==null&&Kr.getVAO(nn)===null&&(nn=Kr.createVAO(nn)),nr=!0,Mr.vao=nn,Gr(function(Di){var Yi=Kr.getVAO(nn);return Yi?Di.link(Yi):"null"})}else if(ie in gr){nr=!0;var en=gr[ie];return ri(en,function(Di,Yi){var Qi=Di.invoke(Yi,en);return Yi.def(Di.shared.vao+".getVAO("+Qi+")")})}return null}var Ht=er(),Ft=!1;function Nt(){if(Cp in It){var nn=It[Cp];if(Mr.elements=nn,$t(nn)){var en=Mr.elements=wr.create(nn,!0);nn=wr.getElements(en),Ft=!0}else nn&&(nn=wr.getElements(nn),Ft=!0);var Di=Gr(function(Qi,jn){if(nn){var Os=Qi.link(nn);return Qi.ELEMENTS=Os,Os}return Qi.ELEMENTS=null,null});return Di.value=nn,Di}else if(Cp in gr){Ft=!0;var Yi=gr[Cp];return ri(Yi,function(Qi,jn){var Os=Qi.shared,Fh=Os.isBufferArgs,Ag=Os.elements,ny=Qi.invoke(jn,Yi),ay=jn.def("null"),id=jn.def(Fh,"(",ny,")"),M6=Qi.cond(id).then(ay,"=",Ag,".createStream(",ny,");").else(ay,"=",Ag,".getElements(",ny,");");return jn.entry(M6),jn.exit(Qi.cond(id).then(Ag,".destroyStream(",ay,");")),Qi.ELEMENTS=ay,ay})}else if(nr)return new Lt(Ht.thisDep,Ht.contextDep,Ht.propDep,function(Qi,jn){return jn.def(Qi.shared.vao+".currentVAO?"+Qi.shared.elements+".getElements("+Qi.shared.vao+".currentVAO.elements):null")});return null}var Et=Nt();function sr(){if(rd in It){var nn=It[rd];return Mr.primitive=nn,Gr(function(Di,Yi){return ds[nn]})}else if(rd in gr){var en=gr[rd];return ri(en,function(Di,Yi){var Qi=Di.constants.primTypes,jn=Di.invoke(Yi,en);return Yi.def(Qi,"[",jn,"]")})}else{if(Ft)return Cr(Et)?Et.value?Gr(function(Di,Yi){return Yi.def(Di.ELEMENTS,".primType")}):Gr(function(){return Dp}):new Lt(Et.thisDep,Et.contextDep,Et.propDep,function(Di,Yi){var Qi=Di.ELEMENTS;return Yi.def(Qi,"?",Qi,".primType:",Dp)});if(nr)return new Lt(Ht.thisDep,Ht.contextDep,Ht.propDep,function(Di,Yi){return Yi.def(Di.shared.vao+".currentVAO?"+Di.shared.vao+".currentVAO.primitive:"+Dp)})}return null}function Er(nn,en){if(nn in It){var Di=It[nn]|0;return en?Mr.offset=Di:Mr.instances=Di,Gr(function(Qi,jn){return en&&(Qi.OFFSET=Di),Di})}else if(nn in gr){var Yi=gr[nn];return ri(Yi,function(Qi,jn){var Os=Qi.invoke(jn,Yi);return en&&(Qi.OFFSET=Os),Os})}else if(en){if(Ft)return Gr(function(Qi,jn){return Qi.OFFSET=0,0});if(nr)return new Lt(Ht.thisDep,Ht.contextDep,Ht.propDep,function(Qi,jn){return jn.def(Qi.shared.vao+".currentVAO?"+Qi.shared.vao+".currentVAO.offset:0")})}else if(nr)return new Lt(Ht.thisDep,Ht.contextDep,Ht.propDep,function(Qi,jn){return jn.def(Qi.shared.vao+".currentVAO?"+Qi.shared.vao+".currentVAO.instances:-1")});return null}var Wr=Er(Tg,!0);function _n(){if(Xv in It){var nn=It[Xv]|0;return Mr.count=nn,Gr(function(){return nn})}else if(Xv in gr){var en=gr[Xv];return ri(en,function(jn,Os){var Fh=jn.invoke(Os,en);return Fh})}else if(Ft)if(Cr(Et)){if(Et)return Wr?new Lt(Wr.thisDep,Wr.contextDep,Wr.propDep,function(jn,Os){var Fh=Os.def(jn.ELEMENTS,".vertCount-",jn.OFFSET);return Fh}):Gr(function(jn,Os){return Os.def(jn.ELEMENTS,".vertCount")});var Di=Gr(function(){return-1});return Di}else{var Yi=new Lt(Et.thisDep||Wr.thisDep,Et.contextDep||Wr.contextDep,Et.propDep||Wr.propDep,function(jn,Os){var Fh=jn.ELEMENTS;return jn.OFFSET?Os.def(Fh,"?",Fh,".vertCount-",jn.OFFSET,":-1"):Os.def(Fh,"?",Fh,".vertCount:-1")});return Yi}else if(nr){var Qi=new Lt(Ht.thisDep,Ht.contextDep,Ht.propDep,function(jn,Os){return Os.def(jn.shared.vao,".currentVAO?",jn.shared.vao,".currentVAO.count:-1")});return Qi}return null}var Bi=sr(),Ci=_n(),gn=Er(gc,!1);return{elements:Et,primitive:Bi,count:Ci,instances:gn,offset:Wr,vao:Ht,vaoActive:nr,elementsActive:Ft,static:Mr}}function Eh(dt,St){var It=dt.static,gr=dt.dynamic,Mr={};return qr.forEach(function(nr){var er=gi(nr);function Ht(Ft,Nt){if(nr in It){var Et=Ft(It[nr]);Mr[er]=Gr(function(){return Et})}else if(nr in gr){var sr=gr[nr];Mr[er]=ri(sr,function(Er,Wr){return Nt(Er,Wr,Er.invoke(Wr,sr))})}}switch(nr){case vf:case aa:case xo:case Mx:case di:case bg:case Th:case Sp:case _g:case bl:return Ht(function(Ft){return Ft},function(Ft,Nt,Et){return Et});case Sa:return Ht(function(Ft){return pt[Ft]},function(Ft,Nt,Et){var sr=Ft.constants.compareFuncs;return Nt.def(sr,"[",Et,"]")});case ks:return Ht(function(Ft){return Ft},function(Ft,Nt,Et){var sr=Nt.def("+",Et,"[0]"),Er=Nt.def("+",Et,"[1]");return[sr,Er]});case po:return Ht(function(Ft){var Nt="srcRGB"in Ft?Ft.srcRGB:Ft.src,Et="srcAlpha"in Ft?Ft.srcAlpha:Ft.src,sr="dstRGB"in Ft?Ft.dstRGB:Ft.dst,Er="dstAlpha"in Ft?Ft.dstAlpha:Ft.dst;return[jt[Nt],jt[sr],jt[Et],jt[Er]]},function(Ft,Nt,Et){var sr=Ft.constants.blendFuncs;function Er(en,Di){var Yi=Nt.def('"',en,Di,'" in ',Et,"?",Et,".",en,Di,":",Et,".",en);return Yi}var Wr=Er("src","RGB"),_n=Er("dst","RGB"),Bi=Nt.def(sr,"[",Wr,"]"),Ci=Nt.def(sr,"[",Er("src","Alpha"),"]"),gn=Nt.def(sr,"[",_n,"]"),nn=Nt.def(sr,"[",Er("dst","Alpha"),"]");return[Bi,gn,Ci,nn]});case ns:return Ht(function(Ft){if(typeof Ft=="string")return[jr[Ft],jr[Ft]];if(typeof Ft=="object")return[jr[Ft.rgb],jr[Ft.alpha]]},function(Ft,Nt,Et){var sr=Ft.constants.blendEquations,Er=Nt.def(),Wr=Nt.def(),_n=Ft.cond("typeof ",Et,'==="string"');return _n.then(Er,"=",Wr,"=",sr,"[",Et,"];"),_n.else(Er,"=",sr,"[",Et,".rgb];",Wr,"=",sr,"[",Et,".alpha];"),Nt(_n),[Er,Wr]});case fl:return Ht(function(Ft){return A(4,function(Nt){return+Ft[Nt]})},function(Ft,Nt,Et){return A(4,function(sr){return Nt.def("+",Et,"[",sr,"]")})});case $v:return Ht(function(Ft){return Ft|0},function(Ft,Nt,Et){return Nt.def(Et,"|0")});case jc:return Ht(function(Ft){var Nt=Ft.cmp||"keep",Et=Ft.ref||0,sr="mask"in Ft?Ft.mask:-1;return[pt[Nt],Et,sr]},function(Ft,Nt,Et){var sr=Ft.constants.compareFuncs,Er=Nt.def('"cmp" in ',Et,"?",sr,"[",Et,".cmp]",":",me),Wr=Nt.def(Et,".ref|0"),_n=Nt.def('"mask" in ',Et,"?",Et,".mask|0:-1");return[Er,Wr,_n]});case iy:case Wv:return Ht(function(Ft){var Nt=Ft.fail||"keep",Et=Ft.zfail||"keep",sr=Ft.zpass||"keep";return[nr===Wv?N:z,Dt[Nt],Dt[Et],Dt[sr]]},function(Ft,Nt,Et){var sr=Ft.constants.stencilOps;function Er(Wr){return Nt.def('"',Wr,'" in ',Et,"?",sr,"[",Et,".",Wr,"]:",me)}return[nr===Wv?N:z,Er("fail"),Er("zfail"),Er("zpass")]});case Ah:return Ht(function(Ft){var Nt=Ft.factor|0,Et=Ft.units|0;return[Nt,Et]},function(Ft,Nt,Et){var sr=Nt.def(Et,".factor|0"),Er=Nt.def(Et,".units|0");return[sr,Er]});case Hc:return Ht(function(Ft){var Nt=0;return Ft==="front"?Nt=z:Ft==="back"&&(Nt=N),Nt},function(Ft,Nt,Et){return Nt.def(Et,'==="front"?',z,":",N)});case Yu:return Ht(function(Ft){return Ft},function(Ft,Nt,Et){return Et});case Hf:return Ht(function(Ft){return zt[Ft]},function(Ft,Nt,Et){return Nt.def(Et+'==="cw"?'+Z+":"+ne)});case Au:return Ht(function(Ft){return Ft.map(function(Nt){return!!Nt})},function(Ft,Nt,Et){return A(4,function(sr){return"!!"+Et+"["+sr+"]"})});case jv:return Ht(function(Ft){var Nt="value"in Ft?Ft.value:1,Et=!!Ft.invert;return[Nt,Et]},function(Ft,Nt,Et){var sr=Nt.def('"value" in ',Et,"?+",Et,".value:1"),Er=Nt.def("!!",Et,".invert");return[sr,Er]})}}),Mr}function os(dt,St){var It=dt.static,gr=dt.dynamic,Mr={};return Object.keys(It).forEach(function(nr){var er=It[nr],Ht;if(typeof er=="number"||typeof er=="boolean")Ht=Gr(function(){return er});else if(typeof er=="function"){var Ft=er._reglType;Ft==="texture2d"||Ft==="textureCube"?Ht=Gr(function(Nt){return Nt.link(er)}):(Ft==="framebuffer"||Ft==="framebufferCube")&&(Ht=Gr(function(Nt){return Nt.link(er.color[0])}))}else Tr(er)&&(Ht=Gr(function(Nt){var Et=Nt.global.def("[",A(er.length,function(sr){return er[sr]}),"]");return Et}));Ht.value=er,Mr[nr]=Ht}),Object.keys(gr).forEach(function(nr){var er=gr[nr];Mr[nr]=ri(er,function(Ht,Ft){return Ht.invoke(Ft,er)})}),Mr}function mf(dt,St){var It=dt.static,gr=dt.dynamic,Mr={};return Object.keys(It).forEach(function(nr){var er=It[nr],Ht=gt.id(nr),Ft=new Sr;if($t(er))Ft.state=Vi,Ft.buffer=vr.getBuffer(vr.create(er,yt,!1,!0)),Ft.type=0;else{var Nt=vr.getBuffer(er);if(Nt)Ft.state=Vi,Ft.buffer=Nt,Ft.type=0;else if("constant"in er){var Et=er.constant;Ft.buffer="null",Ft.state=Xi,typeof Et=="number"?Ft.x=Et:zi.forEach(function(gn,nn){nn<Et.length&&(Ft[gn]=Et[nn])})}else{$t(er.buffer)?Nt=vr.getBuffer(vr.create(er.buffer,yt,!1,!0)):Nt=vr.getBuffer(er.buffer);var sr=er.offset|0,Er=er.stride|0,Wr=er.size|0,_n=!!er.normalized,Bi=0;"type"in er&&(Bi=kr[er.type]);var Ci=er.divisor|0;Ft.buffer=Nt,Ft.state=Vi,Ft.size=Wr,Ft.normalized=_n,Ft.type=Bi||Nt.dtype,Ft.offset=sr,Ft.stride=Er,Ft.divisor=Ci}}Mr[nr]=Gr(function(gn,nn){var en=gn.attribCache;if(Ht in en)return en[Ht];var Di={isStream:!1};return Object.keys(Ft).forEach(function(Yi){Di[Yi]=Ft[Yi]}),Ft.buffer&&(Di.buffer=gn.link(Ft.buffer),Di.type=Di.type||Di.buffer+".dtype"),en[Ht]=Di,Di})}),Object.keys(gr).forEach(function(nr){var er=gr[nr];function Ht(Ft,Nt){var Et=Ft.invoke(Nt,er),sr=Ft.shared,Er=Ft.constants,Wr=sr.isBufferArgs,_n=sr.buffer,Bi={isStream:Nt.def(!1)},Ci=new Sr;Ci.state=Vi,Object.keys(Ci).forEach(function(Di){Bi[Di]=Nt.def(""+Ci[Di])});var gn=Bi.buffer,nn=Bi.type;Nt("if(",Wr,"(",Et,")){",Bi.isStream,"=true;",gn,"=",_n,".createStream(",yt,",",Et,");",nn,"=",gn,".dtype;","}else{",gn,"=",_n,".getBuffer(",Et,");","if(",gn,"){",nn,"=",gn,".dtype;",'}else if("constant" in ',Et,"){",Bi.state,"=",Xi,";","if(typeof "+Et+'.constant === "number"){',Bi[zi[0]],"=",Et,".constant;",zi.slice(1).map(function(Di){return Bi[Di]}).join("="),"=0;","}else{",zi.map(function(Di,Yi){return Bi[Di]+"="+Et+".constant.length>"+Yi+"?"+Et+".constant["+Yi+"]:0;"}).join(""),"}}else{","if(",Wr,"(",Et,".buffer)){",gn,"=",_n,".createStream(",yt,",",Et,".buffer);","}else{",gn,"=",_n,".getBuffer(",Et,".buffer);","}",nn,'="type" in ',Et,"?",Er.glTypes,"[",Et,".type]:",gn,".dtype;",Bi.normalized,"=!!",Et,".normalized;");function en(Di){Nt(Bi[Di],"=",Et,".",Di,"|0;")}return en("size"),en("offset"),en("stride"),en("divisor"),Nt("}}"),Nt.exit("if(",Bi.isStream,"){",_n,".destroyStream(",gn,");","}"),Bi}Mr[nr]=ri(er,Ht)}),Mr}function Xf(dt){var St=dt.static,It=dt.dynamic,gr={};return Object.keys(St).forEach(function(Mr){var nr=St[Mr];gr[Mr]=Gr(function(er,Ht){return typeof nr=="number"||typeof nr=="boolean"?""+nr:er.link(nr)})}),Object.keys(It).forEach(function(Mr){var nr=It[Mr];gr[Mr]=ri(nr,function(er,Ht){return er.invoke(Ht,nr)})}),gr}function kh(dt,St,It,gr,Mr){var nr=dt.static,er=dt.dynamic,Ht=Al(dt,St),Ft=qn(dt,Mr),Nt=ba(dt,Ft,Mr),Et=Pa(dt,Mr),sr=Eh(dt,Mr),Er=Ku(dt,Mr,Ht);function Wr(en){var Di=Nt[en];Di&&(sr[en]=Di)}Wr(Mh),Wr(gi(Yv));var _n=Object.keys(sr).length>0,Bi={framebuffer:Ft,draw:Et,shader:Er,state:sr,dirty:_n,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Bi.profile=Bn(dt,Mr),Bi.uniforms=os(It,Mr),Bi.drawVAO=Bi.scopeVAO=Et.vao,!Bi.drawVAO&&Er.program&&!Ht&&Mt.angle_instanced_arrays&&Et.static.elements){var Ci=!0,gn=Er.program.attributes.map(function(en){var Di=St.static[en];return Ci=Ci&&!!Di,Di});if(Ci&&gn.length>0){var nn=Kr.getVAO(Kr.createVAO({attributes:gn,elements:Et.static.elements}));Bi.drawVAO=new Lt(null,null,null,function(en,Di){return en.link(nn)}),Bi.useVAO=!0}}return Ht?Bi.useVAO=!0:Bi.attributes=mf(St,Mr),Bi.context=Xf(gr,Mr),Bi}function Su(dt,St,It){var gr=dt.shared,Mr=gr.context,nr=dt.scope();Object.keys(It).forEach(function(er){St.save(Mr,"."+er);var Ht=It[er],Ft=Ht.append(dt,St);Array.isArray(Ft)?nr(Mr,".",er,"=[",Ft.join(),"];"):nr(Mr,".",er,"=",Ft,";")}),St(nr)}function Eu(dt,St,It,gr){var Mr=dt.shared,nr=Mr.gl,er=Mr.framebuffer,Ht;Nr&&(Ht=St.def(Mr.extensions,".webgl_draw_buffers"));var Ft=dt.constants,Nt=Ft.drawBuffer,Et=Ft.backBuffer,sr;It?sr=It.append(dt,St):sr=St.def(er,".next"),gr||St("if(",sr,"!==",er,".cur){"),St("if(",sr,"){",nr,".bindFramebuffer(",ht,",",sr,".framebuffer);"),Nr&&St(Ht,".drawBuffersWEBGL(",Nt,"[",sr,".colorAttachments.length]);"),St("}else{",nr,".bindFramebuffer(",ht,",null);"),Nr&&St(Ht,".drawBuffersWEBGL(",Et,");"),St("}",er,".cur=",sr,";"),gr||St("}")}function Ju(dt,St,It){var gr=dt.shared,Mr=gr.gl,nr=dt.current,er=dt.next,Ht=gr.current,Ft=gr.next,Nt=dt.cond(Ht,".dirty");qr.forEach(function(Et){var sr=gi(Et);if(!(sr in It.state)){var Er,Wr;if(sr in er){Er=er[sr],Wr=nr[sr];var _n=A(xi[sr].length,function(Ci){return Nt.def(Er,"[",Ci,"]")});Nt(dt.cond(_n.map(function(Ci,gn){return Ci+"!=="+Wr+"["+gn+"]"}).join("||")).then(Mr,".",Ii[sr],"(",_n,");",_n.map(function(Ci,gn){return Wr+"["+gn+"]="+Ci}).join(";"),";"))}else{Er=Nt.def(Ft,".",sr);var Bi=dt.cond(Er,"!==",Ht,".",sr);Nt(Bi),sr in Ir?Bi(dt.cond(Er).then(Mr,".enable(",Ir[sr],");").else(Mr,".disable(",Ir[sr],");"),Ht,".",sr,"=",Er,";"):Bi(Mr,".",Ii[sr],"(",Er,");",Ht,".",sr,"=",Er,";")}}}),Object.keys(It.state).length===0&&Nt(Ht,".dirty=false;"),St(Nt)}function sa(dt,St,It,gr){var Mr=dt.shared,nr=dt.current,er=Mr.current,Ht=Mr.gl,Ft;Yt(Object.keys(It)).forEach(function(Nt){var Et=It[Nt];if(!(gr&&!gr(Et))){var sr=Et.append(dt,St);if(Ir[Nt]){var Er=Ir[Nt];Cr(Et)?(Ft=dt.link(sr,{stable:!0}),St(dt.cond(Ft).then(Ht,".enable(",Er,");").else(Ht,".disable(",Er,");")),St(er,".",Nt,"=",Ft,";")):(St(dt.cond(sr).then(Ht,".enable(",Er,");").else(Ht,".disable(",Er,");")),St(er,".",Nt,"=",sr,";"))}else if(Tr(sr)){var Wr=nr[Nt];St(Ht,".",Ii[Nt],"(",sr,");",sr.map(function(_n,Bi){return Wr+"["+Bi+"]="+_n}).join(";"),";")}else Cr(Et)?(Ft=dt.link(sr,{stable:!0}),St(Ht,".",Ii[Nt],"(",Ft,");",er,".",Nt,"=",Ft,";")):St(Ht,".",Ii[Nt],"(",sr,");",er,".",Nt,"=",sr,";")}})}function mc(dt,St){ii&&(dt.instancing=St.def(dt.shared.extensions,".angle_instanced_arrays"))}function ms(dt,St,It,gr,Mr){var nr=dt.shared,er=dt.stats,Ht=nr.current,Ft=nr.timer,Nt=It.profile;function Et(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var sr,Er;function Wr(en){sr=St.def(),en(sr,"=",Et(),";"),typeof Mr=="string"?en(er,".count+=",Mr,";"):en(er,".count++;"),mi&&(gr?(Er=St.def(),en(Er,"=",Ft,".getNumPendingQueries();")):en(Ft,".beginQuery(",er,");"))}function _n(en){en(er,".cpuTime+=",Et(),"-",sr,";"),mi&&(gr?en(Ft,".pushScopeStats(",Er,",",Ft,".getNumPendingQueries(),",er,");"):en(Ft,".endQuery();"))}function Bi(en){var Di=St.def(Ht,".profile");St(Ht,".profile=",en,";"),St.exit(Ht,".profile=",Di,";")}var Ci;if(Nt){if(Cr(Nt)){Nt.enable?(Wr(St),_n(St.exit),Bi("true")):Bi("false");return}Ci=Nt.append(dt,St),Bi(Ci)}else Ci=St.def(Ht,".profile");var gn=dt.block();Wr(gn),St("if(",Ci,"){",gn,"}");var nn=dt.block();_n(nn),St.exit("if(",Ci,"){",nn,"}")}function Zf(dt,St,It,gr,Mr){var nr=dt.shared;function er(Ft){switch(Ft){case So:case Xu:case Ul:return 2;case oa:case jf:case $c:return 3;case as:case u0:case $f:return 4;default:return 1}}function Ht(Ft,Nt,Et){var sr=nr.gl,Er=St.def(Ft,".location"),Wr=St.def(nr.attributes,"[",Er,"]"),_n=Et.state,Bi=Et.buffer,Ci=[Et.x,Et.y,Et.z,Et.w],gn=["buffer","normalized","offset","stride"];function nn(){St("if(!",Wr,".buffer){",sr,".enableVertexAttribArray(",Er,");}");var Di=Et.type,Yi;if(Et.size?Yi=St.def(Et.size,"||",Nt):Yi=Nt,St("if(",Wr,".type!==",Di,"||",Wr,".size!==",Yi,"||",gn.map(function(jn){return Wr+"."+jn+"!=="+Et[jn]}).join("||"),"){",sr,".bindBuffer(",yt,",",Bi,".buffer);",sr,".vertexAttribPointer(",[Er,Yi,Di,Et.normalized,Et.stride,Et.offset],");",Wr,".type=",Di,";",Wr,".size=",Yi,";",gn.map(function(jn){return Wr+"."+jn+"="+Et[jn]+";"}).join(""),"}"),ii){var Qi=Et.divisor;St("if(",Wr,".divisor!==",Qi,"){",dt.instancing,".vertexAttribDivisorANGLE(",[Er,Qi],");",Wr,".divisor=",Qi,";}")}}function en(){St("if(",Wr,".buffer){",sr,".disableVertexAttribArray(",Er,");",Wr,".buffer=null;","}if(",zi.map(function(Di,Yi){return Wr+"."+Di+"!=="+Ci[Yi]}).join("||"),"){",sr,".vertexAttrib4f(",Er,",",Ci,");",zi.map(function(Di,Yi){return Wr+"."+Di+"="+Ci[Yi]+";"}).join(""),"}")}_n===Vi?nn():_n===Xi?en():(St("if(",_n,"===",Vi,"){"),nn(),St("}else{"),en(),St("}"))}gr.forEach(function(Ft){var Nt=Ft.name,Et=It.attributes[Nt],sr;if(Et){if(!Mr(Et))return;sr=Et.append(dt,St)}else{if(!Mr(pi))return;var Er=dt.scopeAttrib(Nt);sr={},Object.keys(new Sr).forEach(function(Wr){sr[Wr]=St.def(Er,".",Wr)})}Ht(dt.link(Ft),er(Ft.info.type),sr)})}function Ch(dt,St,It,gr,Mr,nr){for(var er=dt.shared,Ht=er.gl,Ft,Nt=0;Nt<gr.length;++Nt){var Et=gr[Nt],sr=Et.name,Er=Et.info.type,Wr=It.uniforms[sr],_n=dt.link(Et),Bi=_n+".location",Ci;if(Wr){if(!Mr(Wr))continue;if(Cr(Wr)){var gn=Wr.value;if(Er===gf||Er===c0){var nn=dt.link(gn._texture||gn.color[0]._texture);St(Ht,".uniform1i(",Bi,",",nn+".bind());"),St.exit(nn,".unbind();")}else if(Er===Wf||Er===Yf||Er===Sh){var en=dt.global.def("new Float32Array(["+Array.prototype.slice.call(gn)+"])"),Di=2;Er===Yf?Di=3:Er===Sh&&(Di=4),St(Ht,".uniformMatrix",Di,"fv(",Bi,",false,",en,");")}else{switch(Er){case Qa:Ft="1f";break;case So:Ft="2f";break;case oa:Ft="3f";break;case as:Ft="4f";break;case ou:Ft="1i";break;case wl:Ft="1i";break;case Ul:Ft="2i";break;case Xu:Ft="2i";break;case $c:Ft="3i";break;case jf:Ft="3i";break;case $f:Ft="4i";break;case u0:Ft="4i";break}St(Ht,".uniform",Ft,"(",Bi,",",Tr(gn)?Array.prototype.slice.call(gn):gn,");")}continue}else Ci=Wr.append(dt,St)}else{if(!Mr(pi))continue;Ci=St.def(er.uniforms,"[",gt.id(sr),"]")}Er===gf?St("if(",Ci,"&&",Ci,'._reglType==="framebuffer"){',Ci,"=",Ci,".color[0];","}"):Er===c0&&St("if(",Ci,"&&",Ci,'._reglType==="framebufferCube"){',Ci,"=",Ci,".color[0];","}");var Yi=1;switch(Er){case gf:case c0:var Qi=St.def(Ci,"._texture");St(Ht,".uniform1i(",Bi,",",Qi,".bind());"),St.exit(Qi,".unbind();");continue;case wl:case ou:Ft="1i";break;case Xu:case Ul:Ft="2i",Yi=2;break;case jf:case $c:Ft="3i",Yi=3;break;case u0:case $f:Ft="4i",Yi=4;break;case Qa:Ft="1f";break;case So:Ft="2f",Yi=2;break;case oa:Ft="3f",Yi=3;break;case as:Ft="4f",Yi=4;break;case Wf:Ft="Matrix2fv";break;case Yf:Ft="Matrix3fv";break;case Sh:Ft="Matrix4fv";break}if(Ft.charAt(0)==="M"){St(Ht,".uniform",Ft,"(",Bi,",");var jn=Math.pow(Er-Wf+2,2),Os=dt.global.def("new Float32Array(",jn,")");Array.isArray(Ci)?St("false,(",A(jn,function(id){return Os+"["+id+"]="+Ci[id]}),",",Os,")"):St("false,(Array.isArray(",Ci,")||",Ci," instanceof Float32Array)?",Ci,":(",A(jn,function(id){return Os+"["+id+"]="+Ci+"["+id+"]"}),",",Os,")"),St(");")}else if(Yi>1){for(var Fh=[],Ag=[],ny=0;ny<Yi;++ny)Array.isArray(Ci)?Ag.push(Ci[ny]):Ag.push(St.def(Ci+"["+ny+"]")),nr&&Fh.push(St.def());nr&&St("if(!",dt.batchId,"||",Fh.map(function(id,M6){return id+"!=="+Ag[M6]}).join("||"),"){",Fh.map(function(id,M6){return id+"="+Ag[M6]+";"}).join("")),St(Ht,".uniform",Ft,"(",Bi,",",Ag.join(","),");"),nr&&St("}")}else{if(nr){var ay=St.def();St("if(!",dt.batchId,"||",ay,"!==",Ci,"){",ay,"=",Ci,";")}St(Ht,".uniform",Ft,"(",Bi,",",Ci,");"),nr&&St("}")}}}function Dh(dt,St,It,gr){var Mr=dt.shared,nr=Mr.gl,er=Mr.draw,Ht=gr.draw;function Ft(){var Yi=Ht.elements,Qi,jn=St;return Yi?((Yi.contextDep&&gr.contextDynamic||Yi.propDep)&&(jn=It),Qi=Yi.append(dt,jn),Ht.elementsActive&&jn("if("+Qi+")"+nr+".bindBuffer("+Pt+","+Qi+".buffer.buffer);")):(Qi=jn.def(),jn(Qi,"=",er,".",Cp,";","if(",Qi,"){",nr,".bindBuffer(",Pt,",",Qi,".buffer.buffer);}","else if(",Mr.vao,".currentVAO){",Qi,"=",dt.shared.elements+".getElements("+Mr.vao,".currentVAO.elements);",Ai?"":"if("+Qi+")"+nr+".bindBuffer("+Pt+","+Qi+".buffer.buffer);","}")),Qi}function Nt(){var Yi=Ht.count,Qi,jn=St;return Yi?((Yi.contextDep&&gr.contextDynamic||Yi.propDep)&&(jn=It),Qi=Yi.append(dt,jn)):Qi=jn.def(er,".",Xv),Qi}var Et=Ft();function sr(Yi){var Qi=Ht[Yi];return Qi?Qi.contextDep&&gr.contextDynamic||Qi.propDep?Qi.append(dt,It):Qi.append(dt,St):St.def(er,".",Yi)}var Er=sr(rd),Wr=sr(Tg),_n=Nt();if(typeof _n=="number"){if(_n===0)return}else It("if(",_n,"){"),It.exit("}");var Bi,Ci;ii&&(Bi=sr(gc),Ci=dt.instancing);var gn=Et+".type",nn=Ht.elements&&Cr(Ht.elements)&&!Ht.vaoActive;function en(){function Yi(){It(Ci,".drawElementsInstancedANGLE(",[Er,_n,gn,Wr+"<<(("+gn+"-"+ki+")>>1)",Bi],");")}function Qi(){It(Ci,".drawArraysInstancedANGLE(",[Er,Wr,_n,Bi],");")}Et&&Et!=="null"?nn?Yi():(It("if(",Et,"){"),Yi(),It("}else{"),Qi(),It("}")):Qi()}function Di(){function Yi(){It(nr+".drawElements("+[Er,_n,gn,Wr+"<<(("+gn+"-"+ki+")>>1)"]+");")}function Qi(){It(nr+".drawArrays("+[Er,Wr,_n]+");")}Et&&Et!=="null"?nn?Yi():(It("if(",Et,"){"),Yi(),It("}else{"),Qi(),It("}")):Qi()}ii&&(typeof Bi!="number"||Bi>=0)?typeof Bi=="string"?(It("if(",Bi,">0){"),en(),It("}else if(",Bi,"<0){"),Di(),It("}")):en():Di()}function Zn(dt,St,It,gr,Mr){var nr=Hi(),er=nr.proc("body",Mr);return ii&&(nr.instancing=er.def(nr.shared.extensions,".angle_instanced_arrays")),dt(nr,er,It,gr),nr.compile().body}function Va(dt,St,It,gr){mc(dt,St),It.useVAO?It.drawVAO?St(dt.shared.vao,".setVAO(",It.drawVAO.append(dt,St),");"):St(dt.shared.vao,".setVAO(",dt.shared.vao,".targetVAO);"):(St(dt.shared.vao,".setVAO(null);"),Zf(dt,St,It,gr.attributes,function(){return!0})),Ch(dt,St,It,gr.uniforms,function(){return!0},!1),Dh(dt,St,St,It)}function qs(dt,St){var It=dt.proc("draw",1);mc(dt,It),Su(dt,It,St.context),Eu(dt,It,St.framebuffer),Ju(dt,It,St),sa(dt,It,St.state),ms(dt,It,St,!1,!0);var gr=St.shader.progVar.append(dt,It);if(It(dt.shared.gl,".useProgram(",gr,".program);"),St.shader.program)Va(dt,It,St,St.shader.program);else{It(dt.shared.vao,".setVAO(null);");var Mr=dt.global.def("{}"),nr=It.def(gr,".id"),er=It.def(Mr,"[",nr,"]");It(dt.cond(er).then(er,".call(this,a0);").else(er,"=",Mr,"[",nr,"]=",dt.link(function(Ht){return Zn(Va,dt,St,Ht,1)}),"(",gr,");",er,".call(this,a0);"))}Object.keys(St.state).length>0&&It(dt.shared.current,".dirty=true;"),dt.shared.vao&&It(dt.shared.vao,".setVAO(null);")}function wt(dt,St,It,gr){dt.batchId="a1",mc(dt,St);function Mr(){return!0}Zf(dt,St,It,gr.attributes,Mr),Ch(dt,St,It,gr.uniforms,Mr,!1),Dh(dt,St,St,It)}function yr(dt,St,It,gr){mc(dt,St);var Mr=It.contextDep,nr=St.def(),er="a0",Ht="a1",Ft=St.def();dt.shared.props=Ft,dt.batchId=nr;var Nt=dt.scope(),Et=dt.scope();St(Nt.entry,"for(",nr,"=0;",nr,"<",Ht,";++",nr,"){",Ft,"=",er,"[",nr,"];",Et,"}",Nt.exit);function sr(gn){return gn.contextDep&&Mr||gn.propDep}function Er(gn){return!sr(gn)}if(It.needsContext&&Su(dt,Et,It.context),It.needsFramebuffer&&Eu(dt,Et,It.framebuffer),sa(dt,Et,It.state,sr),It.profile&&sr(It.profile)&&ms(dt,Et,It,!1,!0),gr)It.useVAO?It.drawVAO?sr(It.drawVAO)?Et(dt.shared.vao,".setVAO(",It.drawVAO.append(dt,Et),");"):Nt(dt.shared.vao,".setVAO(",It.drawVAO.append(dt,Nt),");"):Nt(dt.shared.vao,".setVAO(",dt.shared.vao,".targetVAO);"):(Nt(dt.shared.vao,".setVAO(null);"),Zf(dt,Nt,It,gr.attributes,Er),Zf(dt,Et,It,gr.attributes,sr)),Ch(dt,Nt,It,gr.uniforms,Er,!1),Ch(dt,Et,It,gr.uniforms,sr,!0),Dh(dt,Nt,Et,It);else{var Wr=dt.global.def("{}"),_n=It.shader.progVar.append(dt,Et),Bi=Et.def(_n,".id"),Ci=Et.def(Wr,"[",Bi,"]");Et(dt.shared.gl,".useProgram(",_n,".program);","if(!",Ci,"){",Ci,"=",Wr,"[",Bi,"]=",dt.link(function(gn){return Zn(wt,dt,It,gn,2)}),"(",_n,");}",Ci,".call(this,a0[",nr,"],",nr,");")}}function xr(dt,St){var It=dt.proc("batch",2);dt.batchId="0",mc(dt,It);var gr=!1,Mr=!0;Object.keys(St.context).forEach(function(Wr){gr=gr||St.context[Wr].propDep}),gr||(Su(dt,It,St.context),Mr=!1);var nr=St.framebuffer,er=!1;nr?(nr.propDep?gr=er=!0:nr.contextDep&&gr&&(er=!0),er||Eu(dt,It,nr)):Eu(dt,It,null),St.state.viewport&&St.state.viewport.propDep&&(gr=!0);function Ht(Wr){return Wr.contextDep&&gr||Wr.propDep}Ju(dt,It,St),sa(dt,It,St.state,function(Wr){return!Ht(Wr)}),(!St.profile||!Ht(St.profile))&&ms(dt,It,St,!1,"a1"),St.contextDep=gr,St.needsContext=Mr,St.needsFramebuffer=er;var Ft=St.shader.progVar;if(Ft.contextDep&&gr||Ft.propDep)yr(dt,It,St,null);else{var Nt=Ft.append(dt,It);if(It(dt.shared.gl,".useProgram(",Nt,".program);"),St.shader.program)yr(dt,It,St,St.shader.program);else{It(dt.shared.vao,".setVAO(null);");var Et=dt.global.def("{}"),sr=It.def(Nt,".id"),Er=It.def(Et,"[",sr,"]");It(dt.cond(Er).then(Er,".call(this,a0,a1);").else(Er,"=",Et,"[",sr,"]=",dt.link(function(Wr){return Zn(yr,dt,St,Wr,2)}),"(",Nt,");",Er,".call(this,a0,a1);"))}}Object.keys(St.state).length>0&&It(dt.shared.current,".dirty=true;"),dt.shared.vao&&It(dt.shared.vao,".setVAO(null);")}function Zi(dt,St){var It=dt.proc("scope",3);dt.batchId="a2";var gr=dt.shared,Mr=gr.current;if(Su(dt,It,St.context),St.framebuffer&&St.framebuffer.append(dt,It),Yt(Object.keys(St.state)).forEach(function(Ht){var Ft=St.state[Ht],Nt=Ft.append(dt,It);Tr(Nt)?Nt.forEach(function(Et,sr){Ri(Et)?It.set(dt.next[Ht],"["+sr+"]",Et):It.set(dt.next[Ht],"["+sr+"]",dt.link(Et,{stable:!0}))}):Cr(Ft)?It.set(gr.next,"."+Ht,dt.link(Nt,{stable:!0})):It.set(gr.next,"."+Ht,Nt)}),ms(dt,It,St,!0,!0),[Cp,Tg,Xv,gc,rd].forEach(function(Ht){var Ft=St.draw[Ht];if(Ft){var Nt=Ft.append(dt,It);Ri(Nt)?It.set(gr.draw,"."+Ht,Nt):It.set(gr.draw,"."+Ht,dt.link(Nt),{stable:!0})}}),Object.keys(St.uniforms).forEach(function(Ht){var Ft=St.uniforms[Ht].append(dt,It);Array.isArray(Ft)&&(Ft="["+Ft.map(function(Nt){return Ri(Nt)?Nt:dt.link(Nt,{stable:!0})})+"]"),It.set(gr.uniforms,"["+dt.link(gt.id(Ht),{stable:!0})+"]",Ft)}),Object.keys(St.attributes).forEach(function(Ht){var Ft=St.attributes[Ht].append(dt,It),Nt=dt.scopeAttrib(Ht);Object.keys(new Sr).forEach(function(Et){It.set(Nt,"."+Et,Ft[Et])})}),St.scopeVAO){var nr=St.scopeVAO.append(dt,It);Ri(nr)?It.set(gr.vao,".targetVAO",nr):It.set(gr.vao,".targetVAO",dt.link(nr,{stable:!0}))}function er(Ht){var Ft=St.shader[Ht];if(Ft){var Nt=Ft.append(dt,It);Ri(Nt)?It.set(gr.shader,"."+Ht,Nt):It.set(gr.shader,"."+Ht,dt.link(Nt,{stable:!0}))}}er(kp),er(td),Object.keys(St.state).length>0&&(It(Mr,".dirty=true;"),It.exit(Mr,".dirty=true;")),It("a1(",dt.shared.context,",a0,",dt.batchId,");")}function Oa(dt){if(!(typeof dt!="object"||Tr(dt))){for(var St=Object.keys(dt),It=0;It<St.length;++It)if(h.isDynamic(dt[St[It]]))return!0;return!1}}function ss(dt,St,It){var gr=St.static[It];if(!gr||!Oa(gr))return;var Mr=dt.global,nr=Object.keys(gr),er=!1,Ht=!1,Ft=!1,Nt=dt.global.def("{}");nr.forEach(function(sr){var Er=gr[sr];if(h.isDynamic(Er)){typeof Er=="function"&&(Er=gr[sr]=h.unbox(Er));var Wr=ri(Er,null);er=er||Wr.thisDep,Ft=Ft||Wr.propDep,Ht=Ht||Wr.contextDep}else{switch(Mr(Nt,".",sr,"="),typeof Er){case"number":Mr(Er);break;case"string":Mr('"',Er,'"');break;case"object":Array.isArray(Er)&&Mr("[",Er.join(),"]");break;default:Mr(dt.link(Er));break}Mr(";")}});function Et(sr,Er){nr.forEach(function(Wr){var _n=gr[Wr];if(h.isDynamic(_n)){var Bi=sr.invoke(Er,_n);Er(Nt,".",Wr,"=",Bi,";")}})}St.dynamic[It]=new h.DynamicVariable(ga,{thisDep:er,contextDep:Ht,propDep:Ft,ref:Nt,append:Et}),delete St.static[It]}function Wi(dt,St,It,gr,Mr){var nr=Hi();nr.stats=nr.link(Mr),Object.keys(St.static).forEach(function(Ht){ss(nr,St,Ht)}),at.forEach(function(Ht){ss(nr,dt,Ht)});var er=kh(dt,St,It,gr,nr);return er.shader.program&&(er.shader.program.attributes.sort(function(Ht,Ft){return Ht.name<Ft.name?-1:1}),er.shader.program.uniforms.sort(function(Ht,Ft){return Ht.name<Ft.name?-1:1})),qs(nr,er),Zi(nr,er),xr(nr,er),e(nr.compile(),{destroy:function(){er.shader.program.destroy()}})}return{next:pn,current:xi,procs:(function(){var dt=Hi(),St=dt.proc("poll"),It=dt.proc("refresh"),gr=dt.block();St(gr),It(gr);var Mr=dt.shared,nr=Mr.gl,er=Mr.next,Ht=Mr.current;gr(Ht,".dirty=false;"),Eu(dt,St),Eu(dt,It,null,!0);var Ft;ii&&(Ft=dt.link(ii)),Mt.oes_vertex_array_object&&It(dt.link(Mt.oes_vertex_array_object),".bindVertexArrayOES(null);");var Nt=It.def(Mr.attributes),Et=It.def(0),sr=dt.cond(Et,".buffer");sr.then(nr,".enableVertexAttribArray(i);",nr,".bindBuffer(",yt,",",Et,".buffer.buffer);",nr,".vertexAttribPointer(i,",Et,".size,",Et,".type,",Et,".normalized,",Et,".stride,",Et,".offset);").else(nr,".disableVertexAttribArray(i);",nr,".vertexAttrib4f(i,",Et,".x,",Et,".y,",Et,".z,",Et,".w);",Et,".buffer=null;");var Er=dt.link(or.maxAttributes,{stable:!0});return It("for(var i=0;i<",Er,";++i){",Et,"=",Nt,"[i];",sr,"}"),ii&&It("for(var i=0;i<",Er,";++i){",Ft,".vertexAttribDivisorANGLE(i,",Nt,"[i].divisor);","}"),It(dt.shared.vao,".currentVAO=null;",dt.shared.vao,".setVAO(",dt.shared.vao,".targetVAO);"),Object.keys(Ir).forEach(function(Wr){var _n=Ir[Wr],Bi=gr.def(er,".",Wr),Ci=dt.block();Ci("if(",Bi,"){",nr,".enable(",_n,")}else{",nr,".disable(",_n,")}",Ht,".",Wr,"=",Bi,";"),It(Ci),St("if(",Bi,"!==",Ht,".",Wr,"){",Ci,"}")}),Object.keys(Ii).forEach(function(Wr){var _n=Ii[Wr],Bi=xi[Wr],Ci,gn,nn=dt.block();if(nn(nr,".",_n,"("),Tr(Bi)){var en=Bi.length;Ci=dt.global.def(er,".",Wr),gn=dt.global.def(Ht,".",Wr),nn(A(en,function(Di){return Ci+"["+Di+"]"}),");",A(en,function(Di){return gn+"["+Di+"]="+Ci+"["+Di+"];"}).join("")),St("if(",A(en,function(Di){return Ci+"["+Di+"]!=="+gn+"["+Di+"]"}).join("||"),"){",nn,"}")}else Ci=gr.def(er,".",Wr),gn=gr.def(Ht,".",Wr),nn(Ci,");",Ht,".",Wr,"=",Ci,";"),St("if(",Ci,"!==",gn,"){",nn,"}");It(nn)}),dt.compile()})(),compile:Wi}}function Pi(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var Rn=34918,Gi=34919,kn=35007,Ua=function(Be,gt){if(!gt.ext_disjoint_timer_query)return null;var Mt=[];function or(){return Mt.pop()||gt.ext_disjoint_timer_query.createQueryEXT()}function vr(jr){Mt.push(jr)}var wr=[];function dr(jr){var ii=or();gt.ext_disjoint_timer_query.beginQueryEXT(kn,ii),wr.push(ii),mi(wr.length-1,wr.length,jr)}function Br(){gt.ext_disjoint_timer_query.endQueryEXT(kn)}function Zr(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var Kr=[];function Jr(){return Kr.pop()||new Zr}function un(jr){Kr.push(jr)}var Oi=[];function mi(jr,ii,Nr){var Ai=Jr();Ai.startQueryIndex=jr,Ai.endQueryIndex=ii,Ai.sum=0,Ai.stats=Nr,Oi.push(Ai)}var Fr=[],Qt=[];function Sr(){var jr,ii,Nr=wr.length;if(Nr!==0){Qt.length=Math.max(Qt.length,Nr+1),Fr.length=Math.max(Fr.length,Nr+1),Fr[0]=0,Qt[0]=0;var Ai=0;for(jr=0,ii=0;ii<wr.length;++ii){var xi=wr[ii];gt.ext_disjoint_timer_query.getQueryObjectEXT(xi,Gi)?(Ai+=gt.ext_disjoint_timer_query.getQueryObjectEXT(xi,Rn),vr(xi)):wr[jr++]=xi,Fr[ii+1]=Ai,Qt[ii+1]=jr}for(wr.length=jr,jr=0,ii=0;ii<Oi.length;++ii){var pn=Oi[ii],qr=pn.startQueryIndex,Ir=pn.endQueryIndex;pn.sum+=Fr[Ir]-Fr[qr];var Ii=Qt[qr],gi=Qt[Ir];gi===Ii?(pn.stats.gpuTime+=pn.sum/1e6,un(pn)):(pn.startQueryIndex=Ii,pn.endQueryIndex=gi,Oi[jr++]=pn)}Oi.length=jr}}return{beginQuery:dr,endQuery:Br,pushScopeStats:mi,update:Sr,getNumPendingQueries:function(){return wr.length},clear:function(){Mt.push.apply(Mt,wr);for(var jr=0;jr<Mt.length;jr++)gt.ext_disjoint_timer_query.deleteQueryEXT(Mt[jr]);wr.length=0,Mt.length=0},restore:function(){wr.length=0,Mt.length=0}}},Qs=16384,lo=256,oi=1024,zn=34962,Yn="webglcontextlost",qa="webglcontextrestored",gs=1,Tl=2,Mu=3;function Zu(Be,gt){for(var Mt=0;Mt<Be.length;++Mt)if(Be[Mt]===gt)return Mt;return-1}function Wc(Be){var gt=x(Be);if(!gt)return null;var Mt=gt.gl,or=Mt.getContextAttributes(),vr=Mt.isContextLost(),wr=T(Mt,gt);if(!wr)return null;var dr=v(),Br=Pi(),Zr=gt.cachedCode||{},Kr=wr.extensions,Jr=Ua(Mt,Kr),un=p(),Oi=Mt.drawingBufferWidth,mi=Mt.drawingBufferHeight,Fr={tick:0,time:0,viewportWidth:Oi,viewportHeight:mi,framebufferWidth:Oi,framebufferHeight:mi,drawingBufferWidth:Oi,drawingBufferHeight:mi,pixelRatio:gt.pixelRatio},Qt={},Sr={elements:null,primitive:4,count:-1,offset:0,instances:-1},jr=_t(Mt,Kr),ii=Tn(Mt,Br,gt,xi),Nr=ot(Mt,Kr,ii,Br),Ai=xp(Mt,Kr,jr,Br,ii,Nr,Sr);function xi(Zn){return Ai.destroyBuffer(Zn)}var pn=l0(Mt,dr,Br,gt),qr=dp(Mt,Kr,jr,function(){gi.procs.poll()},Fr,Br,gt),Ir=vg(Mt,Kr,jr,Br,gt),Ii=mp(Mt,Kr,jr,qr,Ir,Br),gi=Li(Mt,dr,Kr,jr,ii,Nr,qr,Ii,Qt,Ai,pn,Sr,Fr,Jr,Zr,gt),li=Gv(Mt,Ii,gi.procs.poll,Fr,or,Kr,jr),hi=gi.next,Ri=Mt.canvas,vn=[],Hn=[],wi=[],Hi=[gt.onDestroy],Bn=null;function qn(){if(vn.length===0){Jr&&Jr.update(),Bn=null;return}Bn=d.next(qn),Ju();for(var Zn=vn.length-1;Zn>=0;--Zn){var Va=vn[Zn];Va&&Va(Fr,null,0)}Mt.flush(),Jr&&Jr.update()}function ba(){!Bn&&vn.length>0&&(Bn=d.next(qn))}function Al(){Bn&&(d.cancel(qn),Bn=null)}function Ku(Zn){Zn.preventDefault(),vr=!0,Al(),Hn.forEach(function(Va){Va()})}function Pa(Zn){Mt.getError(),vr=!1,wr.restore(),pn.restore(),ii.restore(),qr.restore(),Ir.restore(),Ii.restore(),Ai.restore(),Jr&&Jr.restore(),gi.procs.refresh(),ba(),wi.forEach(function(Va){Va()})}Ri&&(Ri.addEventListener(Yn,Ku,!1),Ri.addEventListener(qa,Pa,!1));function Eh(){vn.length=0,Al(),Ri&&(Ri.removeEventListener(Yn,Ku),Ri.removeEventListener(qa,Pa)),pn.clear(),Ii.clear(),Ir.clear(),Ai.clear(),qr.clear(),Nr.clear(),ii.clear(),Jr&&Jr.clear(),Hi.forEach(function(Zn){Zn()})}function os(Zn){function Va(nr){var er=e({},nr);delete er.uniforms,delete er.attributes,delete er.context,delete er.vao,"stencil"in er&&er.stencil.op&&(er.stencil.opBack=er.stencil.opFront=er.stencil.op,delete er.stencil.op);function Ht(Ft){if(Ft in er){var Nt=er[Ft];delete er[Ft],Object.keys(Nt).forEach(function(Et){er[Ft+"."+Et]=Nt[Et]})}}return Ht("blend"),Ht("depth"),Ht("cull"),Ht("stencil"),Ht("polygonOffset"),Ht("scissor"),Ht("sample"),"vao"in nr&&(er.vao=nr.vao),er}function qs(nr,er){var Ht={},Ft={};return Object.keys(nr).forEach(function(Nt){var Et=nr[Nt];if(h.isDynamic(Et)){Ft[Nt]=h.unbox(Et,Nt);return}else if(er&&Array.isArray(Et)){for(var sr=0;sr<Et.length;++sr)if(h.isDynamic(Et[sr])){Ft[Nt]=h.unbox(Et,Nt);return}}Ht[Nt]=Et}),{dynamic:Ft,static:Ht}}var wt=qs(Zn.context||{},!0),yr=qs(Zn.uniforms||{},!0),xr=qs(Zn.attributes||{},!1),Zi=qs(Va(Zn),!1),Oa={gpuTime:0,cpuTime:0,count:0},ss=gi.compile(Zi,xr,yr,wt,Oa),Wi=ss.draw,dt=ss.batch,St=ss.scope,It=[];function gr(nr){for(;It.length<nr;)It.push(null);return It}function Mr(nr,er){var Ht;if(typeof nr=="function")return St.call(this,null,nr,0);if(typeof er=="function")if(typeof nr=="number")for(Ht=0;Ht<nr;++Ht)St.call(this,null,er,Ht);else if(Array.isArray(nr))for(Ht=0;Ht<nr.length;++Ht)St.call(this,nr[Ht],er,Ht);else return St.call(this,nr,er,0);else if(typeof nr=="number"){if(nr>0)return dt.call(this,gr(nr|0),nr|0)}else if(Array.isArray(nr)){if(nr.length)return dt.call(this,nr,nr.length)}else return Wi.call(this,nr)}return e(Mr,{stats:Oa,destroy:function(){ss.destroy()}})}var mf=Ii.setFBO=os({framebuffer:h.define.call(null,gs,"framebuffer")});function Xf(Zn,Va){var qs=0;gi.procs.poll();var wt=Va.color;wt&&(Mt.clearColor(+wt[0]||0,+wt[1]||0,+wt[2]||0,+wt[3]||0),qs|=Qs),"depth"in Va&&(Mt.clearDepth(+Va.depth),qs|=lo),"stencil"in Va&&(Mt.clearStencil(Va.stencil|0),qs|=oi),Mt.clear(qs)}function kh(Zn){if("framebuffer"in Zn)if(Zn.framebuffer&&Zn.framebuffer_reglType==="framebufferCube")for(var Va=0;Va<6;++Va)mf(e({framebuffer:Zn.framebuffer.faces[Va]},Zn),Xf);else mf(Zn,Xf);else Xf(null,Zn)}function Su(Zn){vn.push(Zn);function Va(){var qs=Zu(vn,Zn);function wt(){var yr=Zu(vn,wt);vn[yr]=vn[vn.length-1],vn.length-=1,vn.length<=0&&Al()}vn[qs]=wt}return ba(),{cancel:Va}}function Eu(){var Zn=hi.viewport,Va=hi.scissor_box;Zn[0]=Zn[1]=Va[0]=Va[1]=0,Fr.viewportWidth=Fr.framebufferWidth=Fr.drawingBufferWidth=Zn[2]=Va[2]=Mt.drawingBufferWidth,Fr.viewportHeight=Fr.framebufferHeight=Fr.drawingBufferHeight=Zn[3]=Va[3]=Mt.drawingBufferHeight}function Ju(){Fr.tick+=1,Fr.time=mc(),Eu(),gi.procs.poll()}function sa(){qr.refresh(),Eu(),gi.procs.refresh(),Jr&&Jr.update()}function mc(){return(p()-un)/1e3}sa();function ms(Zn,Va){var qs;switch(Zn){case"frame":return Su(Va);case"lost":qs=Hn;break;case"restore":qs=wi;break;case"destroy":qs=Hi;break;default:}return qs.push(Va),{cancel:function(){for(var wt=0;wt<qs.length;++wt)if(qs[wt]===Va){qs[wt]=qs[qs.length-1],qs.pop();return}}}}function Zf(){return Zr}function Ch(Zn){Object.entries(Zn).forEach(function(Va){Zr[Va[0]]=Va[1]})}var Dh=e(os,{clear:kh,prop:h.define.bind(null,gs),context:h.define.bind(null,Tl),this:h.define.bind(null,Mu),draw:os({}),buffer:function(Zn){return ii.create(Zn,zn,!1,!1)},elements:function(Zn){return Nr.create(Zn,!1)},texture:qr.create2D,cube:qr.createCube,renderbuffer:Ir.create,framebuffer:Ii.create,framebufferCube:Ii.createCube,vao:Ai.createVAO,attributes:or,frame:Su,on:ms,limits:jr,hasExtension:function(Zn){return jr.extensions.indexOf(Zn.toLowerCase())>=0},read:li,destroy:Eh,_gl:Mt,_refresh:sa,poll:function(){Ju(),Jr&&Jr.update()},now:mc,stats:Br,getCachedCode:Zf,preloadCachedCode:Ch});return gt.onDone(null,Dh),Dh}return Wc}))});var NYe=W((wYr,OYe)=>{"use strict";var bur=N1();OYe.exports=function(t){if(t?typeof t=="string"&&(t={container:t}):t={},BYe(t)?t={container:t}:wur(t)?t={container:t}:Tur(t)?t={gl:t}:t=bur(t,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),t.pixelRatio||(t.pixelRatio=window.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(typeof t.container=="string"){var r=document.querySelector(t.container);if(!r)throw Error("Element "+t.container+" is not found");t.container=r}BYe(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=qYe(),t.container.appendChild(t.canvas),zYe(t))}else if(!t.canvas)if(typeof document!="undefined")t.container=document.body||document.documentElement,t.canvas=qYe(),t.container.appendChild(t.canvas),zYe(t);else throw Error("Not DOM environment. Use headless-gl.");return t.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(i){try{t.gl=t.canvas.getContext(i,t.attrs)}catch(n){}return t.gl}),t.gl};function zYe(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*window.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*window.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function BYe(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function wur(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function Tur(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function qYe(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var VYe=W((TYr,UYe)=>{"use strict";var Aur=Pee(),Mur=[32,126];UYe.exports=Sur;function Sur(e){e=e||{};var t=e.shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],r=e.canvas||document.createElement("canvas"),i=e.font,n=typeof e.step=="number"?[e.step,e.step]:e.step||[32,32],a=e.chars||Mur;if(i&&typeof i!="string"&&(i=Aur(i)),!Array.isArray(a))a=String(a).split("");else if(a.length===2&&typeof a[0]=="number"&&typeof a[1]=="number"){for(var o=[],s=a[0],l=0;s<=a[1];s++)o[l++]=String.fromCharCode(s);a=o}t=t.slice(),r.width=t[0],r.height=t[1];var u=r.getContext("2d");u.fillStyle="#000",u.fillRect(0,0,r.width,r.height),u.font=i,u.textAlign="center",u.textBaseline="middle",u.fillStyle="#fff";for(var c=n[0]/2,f=n[1]/2,s=0;s<a.length;s++)u.fillText(a[s],c,f),(c+=n[0])>t[0]-n[0]/2&&(c=n[0]/2,f+=n[1]);return r}});var qee=W(Zl=>{"use strict";"use restrict";var Bee=32;Zl.INT_BITS=Bee;Zl.INT_MAX=2147483647;Zl.INT_MIN=-1<<Bee-1;Zl.sign=function(e){return(e>0)-(e<0)};Zl.abs=function(e){var t=e>>Bee-1;return(e^t)-t};Zl.min=function(e,t){return t^(e^t)&-(e<t)};Zl.max=function(e,t){return e^(e^t)&-(e<t)};Zl.isPow2=function(e){return!(e&e-1)&&!!e};Zl.log2=function(e){var t,r;return t=(e>65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,t|=r,t|e>>1};Zl.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0};Zl.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function GYe(e){var t=32;return e&=-e,e&&t--,e&65535&&(t-=16),e&16711935&&(t-=8),e&252645135&&(t-=4),e&858993459&&(t-=2),e&1431655765&&(t-=1),t}Zl.countTrailingZeros=GYe;Zl.nextPow2=function(e){return e+=e===0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1};Zl.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};Zl.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var OE=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,i=t,n=7;for(r>>>=1;r;r>>>=1)i<<=1,i|=r&1,--n;e[t]=i<<n&255}})(OE);Zl.reverse=function(e){return OE[e&255]<<24|OE[e>>>8&255]<<16|OE[e>>>16&255]<<8|OE[e>>>24&255]};Zl.interleave2=function(e,t){return e&=65535,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t&=65535,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1};Zl.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=(e|e>>>1)&858993459,e=(e|e>>>2)&252645135,e=(e|e>>>4)&16711935,e=(e|e>>>16)&65535,e<<16>>16};Zl.interleave3=function(e,t,r){return e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,e|=t<<1,r&=1023,r=(r|r<<16)&4278190335,r=(r|r<<8)&251719695,r=(r|r<<4)&3272356035,r=(r|r<<2)&1227133513,e|r<<2};Zl.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=(e|e>>>2)&3272356035,e=(e|e>>>4)&251719695,e=(e|e>>>8)&4278190335,e=(e|e>>>16)&1023,e<<22>>22};Zl.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>GYe(e)+1}});var $Ye=W((MYr,jYe)=>{"use strict";function HYe(e,t,r){var i=e[r]|0;if(i<=0)return[];var n=new Array(i),a;if(r===e.length-1)for(a=0;a<i;++a)n[a]=t;else for(a=0;a<i;++a)n[a]=HYe(e,t,r+1);return n}function Eur(e,t){var r,i;for(r=new Array(e),i=0;i<e;++i)r[i]=t;return r}function kur(e,t){switch(typeof t=="undefined"&&(t=0),typeof e){case"number":if(e>0)return Eur(e|0,t);break;case"object":if(typeof e.length=="number")return HYe(e,t,0);break}return[]}jYe.exports=kur});var sXe=W(co=>{"use strict";var I2=qee(),of=$Ye(),WYe=V_().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:of([32,0]),UINT16:of([32,0]),UINT32:of([32,0]),BIGUINT64:of([32,0]),INT8:of([32,0]),INT16:of([32,0]),INT32:of([32,0]),BIGINT64:of([32,0]),FLOAT:of([32,0]),DOUBLE:of([32,0]),DATA:of([32,0]),UINT8C:of([32,0]),BUFFER:of([32,0])});var Cur=typeof Uint8ClampedArray!="undefined",Dur=typeof BigUint64Array!="undefined",Fur=typeof BigInt64Array!="undefined",du=window.__TYPEDARRAY_POOL;du.UINT8C||(du.UINT8C=of([32,0]));du.BIGUINT64||(du.BIGUINT64=of([32,0]));du.BIGINT64||(du.BIGINT64=of([32,0]));du.BUFFER||(du.BUFFER=of([32,0]));var IR=du.DATA,RR=du.BUFFER;co.free=function(t){if(WYe.isBuffer(t))RR[I2.log2(t.length)].push(t);else{if(Object.prototype.toString.call(t)!=="[object ArrayBuffer]"&&(t=t.buffer),!t)return;var r=t.length||t.byteLength,i=I2.log2(r)|0;IR[i].push(t)}};function YYe(e){if(e){var t=e.length||e.byteLength,r=I2.log2(t);IR[r].push(e)}}function Lur(e){YYe(e.buffer)}co.freeUint8=co.freeUint16=co.freeUint32=co.freeBigUint64=co.freeInt8=co.freeInt16=co.freeInt32=co.freeBigInt64=co.freeFloat32=co.freeFloat=co.freeFloat64=co.freeDouble=co.freeUint8Clamped=co.freeDataView=Lur;co.freeArrayBuffer=YYe;co.freeBuffer=function(t){RR[I2.log2(t.length)].push(t)};co.malloc=function(t,r){if(r===void 0||r==="arraybuffer")return Xh(t);switch(r){case"uint8":return Oee(t);case"uint16":return XYe(t);case"uint32":return ZYe(t);case"int8":return KYe(t);case"int16":return JYe(t);case"int32":return QYe(t);case"float":case"float32":return eXe(t);case"double":case"float64":return tXe(t);case"uint8_clamped":return rXe(t);case"bigint64":return nXe(t);case"biguint64":return iXe(t);case"buffer":return oXe(t);case"data":case"dataview":return aXe(t);default:return null}return null};function Xh(t){var t=I2.nextPow2(t),r=I2.log2(t),i=IR[r];return i.length>0?i.pop():new ArrayBuffer(t)}co.mallocArrayBuffer=Xh;function Oee(e){return new Uint8Array(Xh(e),0,e)}co.mallocUint8=Oee;function XYe(e){return new Uint16Array(Xh(2*e),0,e)}co.mallocUint16=XYe;function ZYe(e){return new Uint32Array(Xh(4*e),0,e)}co.mallocUint32=ZYe;function KYe(e){return new Int8Array(Xh(e),0,e)}co.mallocInt8=KYe;function JYe(e){return new Int16Array(Xh(2*e),0,e)}co.mallocInt16=JYe;function QYe(e){return new Int32Array(Xh(4*e),0,e)}co.mallocInt32=QYe;function eXe(e){return new Float32Array(Xh(4*e),0,e)}co.mallocFloat32=co.mallocFloat=eXe;function tXe(e){return new Float64Array(Xh(8*e),0,e)}co.mallocFloat64=co.mallocDouble=tXe;function rXe(e){return Cur?new Uint8ClampedArray(Xh(e),0,e):Oee(e)}co.mallocUint8Clamped=rXe;function iXe(e){return Dur?new BigUint64Array(Xh(8*e),0,e):null}co.mallocBigUint64=iXe;function nXe(e){return Fur?new BigInt64Array(Xh(8*e),0,e):null}co.mallocBigInt64=nXe;function aXe(e){return new DataView(Xh(e),0,e)}co.mallocDataView=aXe;function oXe(e){e=I2.nextPow2(e);var t=I2.log2(e),r=RR[t];return r.length>0?r.pop():new WYe(e)}co.mallocBuffer=oXe;co.clearCache=function(){for(var t=0;t<32;++t)du.UINT8[t].length=0,du.UINT16[t].length=0,du.UINT32[t].length=0,du.INT8[t].length=0,du.INT16[t].length=0,du.INT32[t].length=0,du.FLOAT[t].length=0,du.DOUBLE[t].length=0,du.BIGUINT64[t].length=0,du.BIGINT64[t].length=0,du.UINT8C[t].length=0,IR[t].length=0,RR[t].length=0}});var uXe=W((EYr,lXe)=>{"use strict";var Pur=Object.prototype.toString;lXe.exports=function(e){var t;return Pur.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var Nee=W((kYr,cXe)=>{cXe.exports=function(t,r){r||(r=[0,""]),t=String(t);var i=parseFloat(t,10);return r[0]=i,r[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",r}});var dXe=W((CYr,hXe)=>{"use strict";var Iur=Nee();hXe.exports=fXe;var NE=96;function Uee(e,t){var r=Iur(getComputedStyle(e).getPropertyValue(t));return r[0]*fXe(r[1],e)}function Rur(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var i=Uee(r,"font-size")/128;return t.removeChild(r),i}function fXe(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return Rur(e,t);case"em":return Uee(t,"font-size");case"rem":return Uee(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 NE;case"cm":return NE/2.54;case"mm":return NE/25.4;case"pt":return NE/72;case"pc":return NE/6}return 1}});var gXe=W((DYr,vXe)=>{"use strict";vXe.exports=qR;var zur=qR.canvas=document.createElement("canvas"),zR=zur.getContext("2d"),pXe=BR([32,126]);qR.createPairs=BR;qR.ascii=pXe;function qR(e,t){Array.isArray(e)&&(e=e.join(", "));var r={},i,n=16,a=.05;t&&(t.length===2&&typeof t[0]=="number"?i=BR(t):Array.isArray(t)?i=t:(t.o?i=BR(t.o):t.pairs&&(i=t.pairs),t.fontSize&&(n=t.fontSize),t.threshold!=null&&(a=t.threshold))),i||(i=pXe),zR.font=n+"px "+e;for(var o=0;o<i.length;o++){var s=i[o],l=zR.measureText(s[0]).width+zR.measureText(s[1]).width,u=zR.measureText(s).width;if(Math.abs(l-u)>n*a){var c=(u-l)/n;r[s]=c*1e3}}return r}function BR(e){for(var t=[],r=e[0];r<=e[1];r++)for(var i=String.fromCharCode(r),n=e[0];n<e[1];n++){var a=String.fromCharCode(n),o=i+a;t.push(o)}return t}});var _Xe=W((FYr,xXe)=>{"use strict";xXe.exports=R2;R2.canvas=document.createElement("canvas");R2.cache={};function R2(o,t){t||(t={}),(typeof o=="string"||Array.isArray(o))&&(t.family=o);var r=Array.isArray(t.family)?t.family.join(", "):t.family;if(!r)throw Error("`family` must be defined");var i=t.size||t.fontSize||t.em||48,n=t.weight||t.fontWeight||"",a=t.style||t.fontStyle||"",o=[a,n,i].join(" ")+"px "+r,s=t.origin||"top";if(R2.cache[r]&&i<=R2.cache[r].em)return mXe(R2.cache[r],s);var l=t.canvas||R2.canvas,u=l.getContext("2d"),c={upper:t.upper!==void 0?t.upper:"H",lower:t.lower!==void 0?t.lower:"x",descent:t.descent!==void 0?t.descent:"p",ascent:t.ascent!==void 0?t.ascent:"h",tittle:t.tittle!==void 0?t.tittle:"i",overshoot:t.overshoot!==void 0?t.overshoot:"O"},f=Math.ceil(i*1.5);l.height=f,l.width=f*.5,u.font=o;var h="H",d={top:0};u.clearRect(0,0,f,f),u.textBaseline="top",u.fillStyle="black",u.fillText(h,0,0);var p=V1(u.getImageData(0,0,f,f));u.clearRect(0,0,f,f),u.textBaseline="bottom",u.fillText(h,0,f);var v=V1(u.getImageData(0,0,f,f));d.lineHeight=d.bottom=f-v+p,u.clearRect(0,0,f,f),u.textBaseline="alphabetic",u.fillText(h,0,f);var m=V1(u.getImageData(0,0,f,f)),g=f-m-1+p;d.baseline=d.alphabetic=g,u.clearRect(0,0,f,f),u.textBaseline="middle",u.fillText(h,0,f*.5);var w=V1(u.getImageData(0,0,f,f));d.median=d.middle=f-w-1+p-f*.5,u.clearRect(0,0,f,f),u.textBaseline="hanging",u.fillText(h,0,f*.5);var b=V1(u.getImageData(0,0,f,f));d.hanging=f-b-1+p-f*.5,u.clearRect(0,0,f,f),u.textBaseline="ideographic",u.fillText(h,0,f);var _=V1(u.getImageData(0,0,f,f));if(d.ideographic=f-_-1+p,c.upper&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.upper,0,0),d.upper=V1(u.getImageData(0,0,f,f)),d.capHeight=d.baseline-d.upper),c.lower&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.lower,0,0),d.lower=V1(u.getImageData(0,0,f,f)),d.xHeight=d.baseline-d.lower),c.tittle&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.tittle,0,0),d.tittle=V1(u.getImageData(0,0,f,f))),c.ascent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.ascent,0,0),d.ascent=V1(u.getImageData(0,0,f,f))),c.descent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.descent,0,0),d.descent=yXe(u.getImageData(0,0,f,f))),c.overshoot){u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.overshoot,0,0);var M=yXe(u.getImageData(0,0,f,f));d.overshoot=M-g}for(var x in d)d[x]/=i;return d.em=i,R2.cache[r]=d,mXe(d,s)}function mXe(e,t){var r={};typeof t=="string"&&(t=e[t]);for(var i in e)i!=="em"&&(r[i]=e[i]-t);return r}function V1(e){for(var t=e.height,r=e.data,i=3;i<r.length;i+=4)if(r[i]!==0)return Math.floor((i-3)*.25/t)}function yXe(e){for(var t=e.height,r=e.data,i=r.length-1;i>0;i-=4)if(r[i]!==0)return Math.floor((i-3)*.25/t)}});var AXe=W((LYr,TXe)=>{"use strict";var Z4=RYe(),Bur=N1(),qur=zee(),Our=NYe(),Nur=xee(),Vee=ME(),Uur=VYe(),z2=sXe(),Vur=q4(),Gur=uXe(),Hur=Nee(),jur=dXe(),$ur=gXe(),Wur=qu(),Yur=_Xe(),Xur=Sb(),Zur=qee(),bXe=Zur.nextPow2,wXe=new Nur,NR=!1;document.body&&(OR=document.body.appendChild(document.createElement("div")),OR.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(OR).fontStretch&&(NR=!0),document.body.removeChild(OR));var OR,Xo=function(t){Kur(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=Our(t),this.shader=wXe.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||qur({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(),wXe.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(Gur(t)?t:{})};Xo.prototype.createShader=function(){var t=this.regl,r=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop("count"),offset:t.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this("sizeBuffer")},width:{offset:0,stride:8,buffer:t.this("sizeBuffer")},char:t.this("charBuffer"),position:t.this("position")},uniforms:{atlasSize:function(n,a){return[a.atlas.width,a.atlas.height]},atlasDim:function(n,a){return[a.atlas.cols,a.atlas.rows]},atlas:function(n,a){return a.atlas.texture},charStep:function(n,a){return a.atlas.step},em:function(n,a){return a.atlas.em},color:t.prop("color"),opacity:t.prop("opacity"),viewport:t.this("viewportArray"),scale:t.this("scale"),align:t.prop("align"),baseline:t.prop("baseline"),translate:t.this("translate"),positionOffset:t.prop("positionOffset")},primitive:"points",viewport:t.this("viewport"),vert:`
precision highp float;
attribute float width, charOffset, char;
attribute vec2 position;
uniform float fontSize, charStep, em, align, baseline;
uniform vec4 viewport;
uniform vec4 color;
uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;
varying vec2 charCoord, charId;
varying float charWidth;
varying vec4 fontColor;
void main () {
vec2 offset = floor(em * (vec2(align + charOffset, baseline)
+ vec2(positionOffset.x, -positionOffset.y)))
/ (viewport.zw * scale.xy);
vec2 position = (position + translate) * scale;
position += offset * scale;
charCoord = position * viewport.zw + viewport.xy;
gl_Position = vec4(position * 2. - 1., 0, 1);
gl_PointSize = charStep;
charId.x = mod(char, atlasDim.x);
charId.y = floor(char / atlasDim.x);
charWidth = width * em;
fontColor = color / 255.;
}`,frag:`
precision highp float;
uniform float fontSize, charStep, opacity;
uniform vec2 atlasSize;
uniform vec4 viewport;
uniform sampler2D atlas;
varying vec4 fontColor;
varying vec2 charCoord, charId;
varying float charWidth;
float lightness(vec4 color) {
return color.r * 0.299 + color.g * 0.587 + color.b * 0.114;
}
void main () {
vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;
float halfCharStep = floor(charStep * .5 + .5);
// invert y and shift by 1px (FF expecially needs that)
uv.y = charStep - uv.y;
// ignore points outside of character bounding box
float halfCharWidth = ceil(charWidth * .5);
if (floor(uv.x) > halfCharStep + halfCharWidth ||
floor(uv.x) < halfCharStep - halfCharWidth) return;
uv += charId * charStep;
uv = uv / atlasSize;
vec4 color = fontColor;
vec4 mask = texture2D(atlas, uv);
float maskY = lightness(mask);
// float colorY = lightness(color);
color.a *= maskY;
color.a *= opacity;
// color.a += .1;
// antialiasing, see yiq color space y-channel formula
// color.rgb += (1. - color.rgb) * (1. - mask.rgb);
gl_FragColor = color;
}`}),i={};return{regl:t,draw:r,atlas:i}};Xo.prototype.update=function(t){var r=this;if(typeof t=="string")t={text:t};else if(!t)return;t=Bur(t,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0),t.opacity!=null&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map(function(K){return parseFloat(K)}):this.opacity=parseFloat(t.opacity)),t.viewport!=null&&(this.viewport=Vur(t.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),t.kerning!=null&&(this.kerning=t.kerning),t.offset!=null&&(typeof t.offset=="number"&&(t.offset=[t.offset,0]),this.positionOffset=Xur(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!t.font&&(t.font=Xo.baseFontSize+"px sans-serif");var i=!1,n=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(K,j){if(typeof K=="string")try{K=Z4.parse(K)}catch(ce){K=Z4.parse(Xo.baseFontSize+"px "+K)}else{var q=K.style,J=K.weight,U=K.stretch,V=K.variant;K=Z4.parse(Z4.stringify(K)),q&&(K.style=q),J&&(K.weight=J),U&&(K.stretch=U),V&&(K.variant=V)}var X=Z4.stringify({size:Xo.baseFontSize,family:K.family,stretch:NR?K.stretch:void 0,variant:K.variant,weight:K.weight,style:K.style}),H=Hur(K.size),G=Math.round(H[0]*jur(H[1]));if(G!==r.fontSize[j]&&(n=!0,r.fontSize[j]=G),(!r.font[j]||X!=r.font[j].baseString)&&(i=!0,r.font[j]=Xo.fonts[X],!r.font[j])){var Q=K.family.join(", "),te=[K.style];K.style!=K.variant&&te.push(K.variant),K.variant!=K.weight&&te.push(K.weight),NR&&K.weight!=K.stretch&&te.push(K.stretch),r.font[j]={baseString:X,family:Q,weight:K.weight,stretch:K.stretch,style:K.style,variant:K.variant,width:{},kerning:{},metrics:Yur(Q,{origin:"top",fontSize:Xo.baseFontSize,fontStyle:te.join(" ")})},Xo.fonts[X]=r.font[j]}}),(i||n)&&this.font.forEach(function(K,j){var q=Z4.stringify({size:r.fontSize[j],family:K.family,stretch:NR?K.stretch:void 0,variant:K.variant,weight:K.weight,style:K.style});if(r.fontAtlas[j]=r.shader.atlas[q],!r.fontAtlas[j]){var J=K.metrics;r.shader.atlas[q]=r.fontAtlas[j]={fontString:q,step:Math.ceil(r.fontSize[j]*J.bottom*.5)*2,em:r.fontSize[j],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:r.regl.texture()}}t.text==null&&(t.text=r.text)}),typeof t.text=="string"&&t.position&&t.position.length>2){for(var a=Array(t.position.length*.5),o=0;o<a.length;o++)a[o]=t.text;t.text=a}var s;if(t.text!=null||i){if(this.textOffsets=[0],Array.isArray(t.text)){this.count=t.text[0].length,this.counts=[this.count];for(var l=1;l<t.text.length;l++)this.textOffsets[l]=this.textOffsets[l-1]+t.text[l-1].length,this.count+=t.text[l].length,this.counts.push(t.text[l].length);this.text=t.text.join("")}else this.text=t.text,this.count=this.text.length,this.counts=[this.count];s=[],this.font.forEach(function(K,j){Xo.atlasContext.font=K.baseString;for(var q=r.fontAtlas[j],J=0;J<r.text.length;J++){var U=r.text.charAt(J);if(q.ids[U]==null&&(q.ids[U]=q.chars.length,q.chars.push(U),s.push(U)),K.width[U]==null&&(K.width[U]=Xo.atlasContext.measureText(U).width/Xo.baseFontSize,r.kerning)){var V=[];for(var X in K.width)V.push(X+U,U+X);Wur(K.kerning,$ur(K.family,{pairs:V}))}}})}if(t.position)if(t.position.length>2){for(var u=!t.position[0].length,c=z2.mallocFloat(this.count*2),f=0,h=0;f<this.counts.length;f++){var d=this.counts[f];if(u)for(var p=0;p<d;p++)c[h++]=t.position[f*2],c[h++]=t.position[f*2+1];else for(var v=0;v<d;v++)c[h++]=t.position[f][0],c[h++]=t.position[f][1]}this.position.call?this.position({type:"float",data:c}):this.position=this.regl.buffer({type:"float",data:c}),z2.freeFloat(c)}else this.position.destroy&&this.position.destroy(),this.position={constant:t.position};if(t.text||i){var m=z2.mallocUint8(this.count),g=z2.mallocFloat(this.count*2);this.textWidth=[];for(var w=0,b=0;w<this.counts.length;w++){for(var _=this.counts[w],M=this.font[w]||this.font[0],x=this.fontAtlas[w]||this.fontAtlas[0],T=0;T<_;T++){var A=this.text.charAt(b),y=this.text.charAt(b-1);if(m[b]=x.ids[A],g[b*2]=M.width[A],T){var E=g[b*2-2],S=g[b*2],C=g[b*2-1],k=C+E*.5+S*.5;if(this.kerning){var D=M.kerning[y+A];D&&(k+=D*.001)}g[b*2+1]=k}else g[b*2+1]=g[b*2]*.5;b++}this.textWidth.push(g.length?g[b*2-2]*.5+g[b*2-1]:0)}t.align||(t.align=this.align),this.charBuffer({data:m,type:"uint8",usage:"stream"}),this.sizeBuffer({data:g,type:"float",usage:"stream"}),z2.freeUint8(m),z2.freeFloat(g),s.length&&this.font.forEach(function(K,j){var q=r.fontAtlas[j],J=q.step,U=Math.floor(Xo.maxAtlasSize/J),V=Math.min(U,q.chars.length),X=Math.ceil(q.chars.length/V),H=bXe(V*J),G=bXe(X*J);q.width=H,q.height=G,q.rows=X,q.cols=V,q.em&&q.texture({data:Uur({canvas:Xo.atlasCanvas,font:q.fontString,chars:q.chars,shape:[H,G],step:[J,J]})})})}if(t.align&&(this.align=t.align,this.alignOffset=this.textWidth.map(function(K,j){var q=Array.isArray(r.align)?r.align.length>1?r.align[j]:r.align[0]:r.align;if(typeof q=="number")return q;switch(q){case"right":case"end":return-K;case"center":case"centre":case"middle":return-K*.5}return 0})),this.baseline==null&&t.baseline==null&&(t.baseline=0),t.baseline!=null&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(K,j){var q=(r.font[j]||r.font[0]).metrics,J=0;return J+=q.bottom*.5,typeof K=="number"?J+=K-q.baseline:J+=-q[K],J*=-1,J})),t.color!=null)if(t.color||(t.color="transparent"),typeof t.color=="string"||!isNaN(t.color))this.color=Vee(t.color,"uint8");else{var F;if(typeof t.color[0]=="number"&&t.color.length>this.counts.length){var P=t.color.length;F=z2.mallocUint8(P);for(var R=(t.color.subarray||t.color.slice).bind(t.color),L=0;L<P;L+=4)F.set(Vee(R(L,L+4),"uint8"),L)}else{var I=t.color.length;F=z2.mallocUint8(I*4);for(var B=0;B<I;B++)F.set(Vee(t.color[B]||0,"uint8"),B*4)}this.color=F}if(t.position||t.text||t.color||t.baseline||t.align||t.font||t.offset||t.opacity){var O=this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(O){var $=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($);for(var Y=0;Y<this.batch.length;Y++)this.batch[Y]={count:this.counts.length>1?this.counts[Y]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Y]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Y*4,Y*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Y]:this.opacity,baseline:this.baselineOffset[Y]!=null?this.baselineOffset[Y]:this.baselineOffset[0],align:this.align?this.alignOffset[Y]!=null?this.alignOffset[Y]:this.alignOffset[0]:0,atlas:this.fontAtlas[Y]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Y*2,Y*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=[]}};Xo.prototype.destroy=function(){};Xo.prototype.kerning=!0;Xo.prototype.position={constant:new Float32Array(2)};Xo.prototype.translate=null;Xo.prototype.scale=null;Xo.prototype.font=null;Xo.prototype.text="";Xo.prototype.positionOffset=[0,0];Xo.prototype.opacity=1;Xo.prototype.color=new Uint8Array([0,0,0,255]);Xo.prototype.alignOffset=[0,0];Xo.maxAtlasSize=1024;Xo.atlasCanvas=document.createElement("canvas");Xo.atlasContext=Xo.atlasCanvas.getContext("2d",{alpha:!1});Xo.baseFontSize=64;Xo.fonts={};function Kur(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}TXe.exports=Xo});var UR=W((PYr,MXe)=>{"use strict";var Jur=JK(),Qur=zee();MXe.exports=function(t,r,i){var n=t._fullLayout,a=!0;return n._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(i);return}if(!(o.pick&&!n._has("parcoords"))){try{o.regl=Qur({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||window.devicePixelRatio,extensions:r||[],cachedCode:i||{}})}catch(s){a=!1}o.regl||(a=!1),a&&this.addEventListener("webglcontextlost",function(s){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:s,layer:o.key})},!1)}}),a||Jur({container:n._glcontainer.node()}),a}});var Hee=W((Gee,FXe)=>{"use strict";var SXe=HQ(),EXe=wee(),ecr=gYe(),kXe=AXe(),CXe=it(),tcr=u1().selectMode,rcr=UR(),icr=$o(),ncr=jj(),acr=UQ().styleTextSelection,DXe={};function ocr(e,t,r,i){var n=e._size,a=e.width*i,o=e.height*i,s=n.l*i,l=n.b*i,u=n.r*i,c=n.t*i,f=n.w*i,h=n.h*i;return[s+t.domain[0]*f,l+r.domain[0]*h,a-u-(1-t.domain[1])*f,o-c-(1-r.domain[1])*h]}var Gee=FXe.exports=function(t,r,i){if(i.length){var n=t._fullLayout,a=r._scene,o=r.xaxis,s=r.yaxis,l,u;if(a){var c=rcr(t,["ANGLE_instanced_arrays","OES_element_index_uint"],DXe);if(!c){a.init();return}var f=a.count,h=n._glcanvas.data()[0].regl;if(ncr(t,r,i),a.dirty){if((a.line2d||a.error2d)&&!(a.scatter2d||a.fill2d||a.glText)&&h.clear({color:!0,depth:!0}),a.error2d===!0&&(a.error2d=ecr(h)),a.line2d===!0&&(a.line2d=EXe(h)),a.scatter2d===!0&&(a.scatter2d=SXe(h)),a.fill2d===!0&&(a.fill2d=EXe(h)),a.glText===!0)for(a.glText=new Array(f),l=0;l<f;l++)a.glText[l]=new kXe(h);if(a.glText){if(f>a.glText.length){var d=f-a.glText.length;for(l=0;l<d;l++)a.glText.push(new kXe(h))}else if(f<a.glText.length){var p=a.glText.length-f,v=a.glText.splice(f,p);v.forEach(function(L){L.destroy()})}for(l=0;l<f;l++)a.glText[l].update(a.textOptions[l])}if(a.line2d&&(a.line2d.update(a.lineOptions),a.lineOptions=a.lineOptions.map(function(L){if(L&&L.positions){for(var I=L.positions,B=0;B<I.length&&(isNaN(I[B])||isNaN(I[B+1]));)B+=2;for(var O=I.length-2;O>B&&(isNaN(I[O])||isNaN(I[O+1]));)O-=2;L.positions=I.slice(B,O+2)}return L}),a.line2d.update(a.lineOptions)),a.error2d){var m=(a.errorXOptions||[]).concat(a.errorYOptions||[]).map(function(L){return L||{positions:[],errors:[]}});a.error2d.update(m)}a.scatter2d&&a.scatter2d.update(a.markerOptions),a.fillOrder=CXe.repeat(null,f),a.fill2d&&(a.fillOptions=a.fillOptions.map(function(L,I){var B=i[I];if(!(!L||!B||!B[0]||!B[0].trace)){var O=B[0],$=O.trace,Y=O.t,K=a.lineOptions[I],j,q,J=[];$._ownfill&&J.push(I),$._nexttrace&&J.push(I+1),J.length&&(a.fillOrder[I]=J);var U=[],V=K&&K.positions||Y.positions,X,H;if($.fill==="tozeroy"){for(X=0;X<V.length&&isNaN(V[X+1]);)X+=2;for(H=V.length-2;H>X&&isNaN(V[H+1]);)H-=2;V[X+1]!==0&&(U=[V[X],0]),U=U.concat(V.slice(X,H+2)),V[H+1]!==0&&(U=U.concat([V[H],0]))}else if($.fill==="tozerox"){for(X=0;X<V.length&&isNaN(V[X]);)X+=2;for(H=V.length-2;H>X&&isNaN(V[H]);)H-=2;V[X]!==0&&(U=[0,V[X+1]]),U=U.concat(V.slice(X,H+2)),V[H]!==0&&(U=U.concat([0,V[H+1]]))}else if($.fill==="toself"||$.fill==="tonext"){for(U=[],j=0,L.splitNull=!0,q=0;q<V.length;q+=2)(isNaN(V[q])||isNaN(V[q+1]))&&(U=U.concat(V.slice(j,q)),U.push(V[j],V[j+1]),U.push(null,null),j=q+2);U=U.concat(V.slice(j)),j&&U.push(V[j],V[j+1])}else{var G=$._nexttrace;if(G){var Q=a.lineOptions[I+1];if(Q){var te=Q.positions;if($.fill==="tonexty"){for(U=V.slice(),I=Math.floor(te.length/2);I--;){var ce=te[I*2],ge=te[I*2+1];isNaN(ce)||isNaN(ge)||U.push(ce,ge)}L.fill=G.fillcolor}}}}if($._prevtrace&&$._prevtrace.fill==="tonext"){var Ce=a.lineOptions[I-1].positions,be=U.length/2;j=be;var he=[j];for(q=0;q<Ce.length;q+=2)(isNaN(Ce[q])||isNaN(Ce[q+1]))&&(he.push(q/2+be+1),j=q+2);U=U.concat(Ce),L.hole=he}return L.fillmode=$.fill,L.opacity=$.opacity,L.positions=U,L}}),a.fill2d.update(a.fillOptions))}var g=n.dragmode,w=tcr(g),b=n.clickmode.indexOf("select")>-1;for(let[L]of i)if(L){var _=L.trace,M=L.t,x=M.index,T=_._length,A=M.x,y=M.y;if(_.selectedpoints||w||b){if(w||(w=!0),_.selectedpoints){var E=a.selectBatch[x]=_.selectedpoints,S={};for(u=0;u<E.length;u++)S[E[u]]=1;var C=[];for(u=0;u<T;u++)S[u]||C.push(u);a.unselectBatch[x]=C}var k=M.xpx=new Array(T),D=M.ypx=new Array(T);for(u=0;u<T;u++)k[u]=o.c2p(A[u]),D[u]=s.c2p(y[u])}else M.xpx=M.ypx=null}if(w){if(a.select2d||(a.select2d=SXe(n._glcanvas.data()[1].regl)),a.scatter2d){var F=new Array(f);for(l=0;l<f;l++)F[l]=a.selectBatch[l].length||a.unselectBatch[l].length?a.markerUnselectedOptions[l]:{};a.scatter2d.update(F)}a.select2d&&(a.select2d.update(a.markerOptions),a.select2d.update(a.markerSelectedOptions)),a.glText&&i.forEach(function(L){var I=((L||[])[0]||{}).trace||{};icr.hasText(I)&&acr(L)})}else a.scatter2d&&a.scatter2d.update(a.markerOptions);var P={viewport:ocr(n,o,s,t._context.plotGlPixelRatio),range:[(o._rl||o.range)[0],(s._rl||s.range)[0],(o._rl||o.range)[1],(s._rl||s.range)[1]]},R=CXe.repeat(P,a.count);a.fill2d&&a.fill2d.update(R),a.line2d&&a.line2d.update(R),a.error2d&&a.error2d.update(R.concat(R)),a.scatter2d&&a.scatter2d.update(R),a.select2d&&a.select2d.update(R),a.glText&&a.glText.forEach(function(L){L.update(P)})}}};Gee.reglPrecompiled=DXe});var IXe=W((IYr,PXe)=>{"use strict";var LXe=$He();LXe.plot=Hee();PXe.exports=LXe});var zXe=W((RYr,RXe)=>{"use strict";RXe.exports=IXe()});var jee=W((zYr,NXe)=>{"use strict";var scr=Ns(),OXe=Eo(),BXe=_s().axisHoverFormat,{hovertemplateAttrs:lcr,templatefallbackAttrs:ucr}=Ga(),UE=_E(),ccr=Gl().idRegex,fcr=Da().templatedArray,K4=tn().extendFlat,vm=scr.marker,hcr=vm.line,dcr=K4(OXe("marker.line",{editTypeOverride:"calc"}),{width:K4({},hcr.width,{editType:"calc"}),editType:"calc"}),VR=K4(OXe("marker"),{symbol:vm.symbol,angle:vm.angle,size:K4({},vm.size,{editType:"markerSize"}),sizeref:vm.sizeref,sizemin:vm.sizemin,sizemode:vm.sizemode,opacity:vm.opacity,colorbar:vm.colorbar,line:dcr,editType:"calc"});VR.color.editType=VR.cmin.editType=VR.cmax.editType="style";function qXe(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:ccr[e],editType:"plot"}}}NXe.exports={dimensions:fcr("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:K4({},UE.text,{}),hovertext:K4({},UE.hovertext,{}),hovertemplate:lcr(),hovertemplatefallback:ucr(),xhoverformat:BXe("x"),yhoverformat:BXe("y"),marker:VR,xaxes:qXe("x"),yaxes:qXe("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:UE.selected.marker,editType:"calc"},unselected:{marker:UE.unselected.marker,editType:"calc"},opacity:UE.opacity}});var GR=W((BYr,UXe)=>{"use strict";UXe.exports=function(e,t,r,i){i||(i=1/0);var n,a;for(n=0;n<t.length;n++)a=t[n],a.visible&&(i=Math.min(i,a[r].length));for(i===1/0&&(i=0),e._length=i,n=0;n<t.length;n++)a=t[n],a.visible&&(a._length=i);return i}});var HXe=W((qYr,GXe)=>{"use strict";var $ee=it(),pcr=Xc(),VXe=jee(),vcr=$o(),gcr=bd(),mcr=GR(),ycr=aR().isOpenSymbol;GXe.exports=function(t,r,i,n){function a(d,p){return $ee.coerce(t,r,VXe,d,p)}var o=pcr(t,r,{name:"dimensions",handleItemDefaults:xcr}),s=a("diagonal.visible"),l=a("showupperhalf"),u=a("showlowerhalf"),c=mcr(r,o,"values");if(!c||!s&&!l&&!u){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),gcr(t,r,i,n,a,{noAngleRef:!0,noLineDash:!0,noStandOff:!0});var f=ycr(r.marker.symbol),h=vcr.isBubble(r);a("marker.line.width",f||h?1:0),_cr(t,r,n,a),$ee.coerceSelectionMarkerOpacity(r,a)};function xcr(e,t){function r(n,a){return $ee.coerce(e,t,VXe.dimensions,n,a)}r("label");var i=r("values");i&&i.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}function _cr(e,t,r,i){var n=t.dimensions,a=n.length,o=t.showupperhalf,s=t.showlowerhalf,l=t.diagonal.visible,u,c,f=new Array(a),h=new Array(a);for(u=0;u<a;u++){var d=u?u+1:"";f[u]="x"+d,h[u]="y"+d}var p=i("xaxes",f),v=i("yaxes",h),m=t._diag=new Array(a);t._xaxes={},t._yaxes={};var g=[],w=[];function b(C,k,D,F){if(C){var P=C.charAt(0),R=r._splomAxes[P];if(t["_"+P+"axes"][C]=1,F.push(C),!(C in R)){var L=R[C]={};D&&(L.label=D.label||"",D.visible&&D.axis&&(D.axis.type&&(L.type=D.axis.type),D.axis.matches&&(L.matches=k)))}}}var _=!l&&!s,M=!l&&!o;for(t._axesDim={},u=0;u<a;u++){var x=n[u],T=u===0,A=u===a-1,y=T&&_||A&&M?void 0:p[u],E=T&&M||A&&_?void 0:v[u];b(y,E,x,g),b(E,y,x,w),m[u]=[y,E],t._axesDim[y]=u,t._axesDim[E]=u}for(u=0;u<g.length;u++)for(c=0;c<w.length;c++){var S=g[u]+w[c];(u>c&&o||u<c&&s||u===c&&(l||!s||!o))&&(r._splomSubplots[S]=1)}(!s||!l&&o&&s)&&(r._splomGridDflt.xside="bottom",r._splomGridDflt.yside="left")}});var WXe=W((OYr,$Xe)=>{"use strict";var jXe=it();$Xe.exports=function(t,r){var i=t._fullLayout,n=r.uid,a=i._splomScenes;a||(a=i._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},s={matrix:!1,selectBatch:[],unselectBatch:[]},l=a[r.uid];return l||(l=a[n]=jXe.extendFlat({},o,s),l.draw=function(){l.matrix&&l.matrix.draw&&(l.selectBatch.length||l.unselectBatch.length?l.matrix.draw(l.unselectBatch,l.selectBatch):l.matrix.draw()),l.dirty=!1},l.destroy=function(){l.matrix&&l.matrix.destroy&&l.matrix.destroy(),l.matrixOptions=null,l.selectBatch=null,l.unselectBatch=null,l=null}),l.dirty||jXe.extendFlat(l,o),l}});var ZXe=W((NYr,XXe)=>{"use strict";var Wee=it(),HR=Cs(),bcr=Td().calcMarkerSize,wcr=Td().calcAxisExpansion,Tcr=wd(),YXe=kb().markerSelection,Acr=kb().markerStyle,Mcr=WXe(),Scr=Kn().BADNUM,Ecr=C2().TOO_MANY_POINTS;XXe.exports=function(t,r){var i=r.dimensions,n=r._length,a={},o=a.cdata=[],s=a.data=[],l=r._visibleDims=[],u,c,f,h,d;function p(b,_){for(var M=b.makeCalcdata({v:_.values,vcalendar:r.calendar},"v"),x=0;x<M.length;x++)M[x]=M[x]===Scr?NaN:M[x];o.push(M),s.push(b.type==="log"?Wee.simpleMap(M,b.c2l):M)}for(u=0;u<i.length;u++)if(f=i[u],f.visible){if(h=HR.getFromId(t,r._diag[u][0]),d=HR.getFromId(t,r._diag[u][1]),h&&d&&h.type!==d.type){Wee.log("Skipping splom dimension "+u+" with conflicting axis types");continue}h?(p(h,f),d&&d.type==="category"&&(d._categories=h._categories.slice())):p(d,f),l.push(u)}Tcr(t,r),Wee.extendFlat(a,Acr(t,r));var v=o.length,m=v*n>Ecr,g;for(m?g=a.sizeAvg||Math.max(a.size,3):g=bcr(r,n),c=0;c<l.length;c++)u=l[c],f=i[u],h=HR.getFromId(t,r._diag[u][0])||{},d=HR.getFromId(t,r._diag[u][1])||{},wcr(t,r,h,d,o[c],o[c],g);var w=Mcr(t,r);return w.matrix||(w.matrix=!0),w.matrixOptions=a,w.selectedOptions=YXe(t,r,r.selected),w.unselectedOptions=YXe(t,r,r.unselected),[{x:!1,y:!1,t:{},trace:r}]}});var JXe=W((KXe,VE)=>{(function(){var e,t,r,i,n,a;typeof performance!="undefined"&&performance!==null&&performance.now?VE.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(VE.exports=function(){return(e()-n)/1e6},t=process.hrtime,e=function(){var o;return o=t(),o[0]*1e9+o[1]},i=e(),a=process.uptime()*1e9,n=i-a):Date.now?(VE.exports=function(){return Date.now()-r},r=Date.now()):(VE.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(KXe)});var eZe=W((UYr,WR)=>{var kcr=JXe(),gm=window,jR=["moz","webkit"],Q4="AnimationFrame",eT=gm["request"+Q4],GE=gm["cancel"+Q4]||gm["cancelRequest"+Q4];for(J4=0;!eT&&J4<jR.length;J4++)eT=gm[jR[J4]+"Request"+Q4],GE=gm[jR[J4]+"Cancel"+Q4]||gm[jR[J4]+"CancelRequest"+Q4];var J4;(!eT||!GE)&&($R=0,Yee=0,B2=[],QXe=1e3/60,eT=function(e){if(B2.length===0){var t=kcr(),r=Math.max(0,QXe-(t-$R));$R=r+t,setTimeout(function(){var i=B2.slice(0);B2.length=0;for(var n=0;n<i.length;n++)if(!i[n].cancelled)try{i[n].callback($R)}catch(a){setTimeout(function(){throw a},0)}},Math.round(r))}return B2.push({handle:++Yee,callback:e,cancelled:!1}),Yee},GE=function(e){for(var t=0;t<B2.length;t++)B2[t].handle===e&&(B2[t].cancelled=!0)});var $R,Yee,B2,QXe;WR.exports=function(e){return eT.call(gm,e)};WR.exports.cancel=function(){GE.apply(gm,arguments)};WR.exports.polyfill=function(e){e||(e=gm),e.requestAnimationFrame=eT,e.cancelAnimationFrame=GE}});var rZe=W((VYr,tZe)=>{tZe.exports=function(t,r){var i=typeof t=="number",n=typeof r=="number";i&&!n?(r=t,t=0):!i&&!n&&(t=0,r=0),t=t|0,r=r|0;var a=r-t;if(a<0)throw new Error("array length must be positive");for(var o=new Array(a),s=0,l=t;s<a;s++,l++)o[s]=l;return o}});var oZe=W((GYr,aZe)=>{"use strict";var Ccr=HQ(),Dcr=N1(),Fcr=Mb(),iZe=eZe(),Lcr=rZe(),Xee=q4(),Pcr=Sb();aZe.exports=q2;function q2(e,t){if(!(this instanceof q2))return new q2(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=Ccr(e),this.canvas=this.scatter.canvas}q2.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=iZe(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,iZe(()=>{this.dirty=!1})),this)};q2.prototype.update=function(...e){if(!e.length)return;for(let i=0;i<e.length;i++)this.updateItem(i,e[i]);this.traces=this.traces.filter(Boolean);let t=[],r=0;for(let i=0;i<this.traces.length;i++){let n=this.traces[i],a=this.traces[i].passes;for(let o=0;o<a.length;o++)t.push(this.passes[a[o]]);n.passOffset=r,r+=n.passes.length}return this.scatter.update(...t),this};q2.prototype.updateItem=function(e,t){let{regl:r}=this;if(t===null)return this.traces[e]=null,this;if(!t)return this;let i=Dcr(t,{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"}),n=this.traces[e]||(this.traces[e]={id:e,buffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),color:"black",marker:null,size:12,borderColor:"transparent",borderSize:1,viewport:Xee([r._gl.drawingBufferWidth,r._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(i.color!=null&&(n.color=i.color),i.size!=null&&(n.size=i.size),i.marker!=null&&(n.marker=i.marker),i.borderColor!=null&&(n.borderColor=i.borderColor),i.borderSize!=null&&(n.borderSize=i.borderSize),i.opacity!=null&&(n.opacity=i.opacity),i.viewport&&(n.viewport=Xee(i.viewport)),i.diagonal!=null&&(n.diagonal=i.diagonal),i.upper!=null&&(n.upper=i.upper),i.lower!=null&&(n.lower=i.lower),i.data){n.buffer(Pcr(i.data)),n.columns=i.data.length,n.count=i.data[0].length,n.bounds=[];for(let v=0;v<n.columns;v++)n.bounds[v]=Fcr(i.data[v],1)}let a;i.range&&(n.range=i.range,a=n.range&&typeof n.range[0]!="number"),i.domain&&(n.domain=i.domain);let o=!1;i.padding!=null&&(Array.isArray(i.padding)&&i.padding.length===n.columns&&typeof i.padding[i.padding.length-1]=="number"?(n.padding=i.padding.map(nZe),o=!0):n.padding=nZe(i.padding));let s=n.columns,l=n.count,u=n.viewport.width,c=n.viewport.height,f=n.viewport.x,h=n.viewport.y,d=u/s,p=c/s;n.passes=[];for(let v=0;v<s;v++)for(let m=0;m<s;m++){if(!n.diagonal&&m===v||!n.upper&&v>m||!n.lower&&v<m)continue;let g=Icr(n.id,v,m),w=this.passes[g]||(this.passes[g]={});if(i.data&&(i.transpose?w.positions={x:{buffer:n.buffer,offset:m,count:l,stride:s},y:{buffer:n.buffer,offset:v,count:l,stride:s}}:w.positions={x:{buffer:n.buffer,offset:m*l,count:l},y:{buffer:n.buffer,offset:v*l,count:l}},w.bounds=YR(n.bounds,v,m)),i.domain||i.viewport||i.data){let b=o?YR(n.padding,v,m):n.padding;if(n.domain){let[_,M,x,T]=YR(n.domain,v,m);w.viewport=[f+_*u+b[0],h+M*c+b[1],f+x*u-b[2],h+T*c-b[3]]}else w.viewport=[f+m*d+d*b[0],h+v*p+p*b[1],f+(m+1)*d-d*b[2],h+(v+1)*p-p*b[3]]}i.color&&(w.color=n.color),i.size&&(w.size=n.size),i.marker&&(w.marker=n.marker),i.borderSize&&(w.borderSize=n.borderSize),i.borderColor&&(w.borderColor=n.borderColor),i.opacity&&(w.opacity=n.opacity),i.range&&(w.range=a?YR(n.range,v,m):n.range||w.bounds),n.passes.push(g)}return this};q2.prototype.draw=function(...e){if(!e.length)this.scatter.draw();else{let t=[];for(let r=0;r<e.length;r++)if(typeof e[r]=="number"){let{passes:i,passOffset:n}=this.traces[e[r]];t.push(...Lcr(n,n+i.length))}else if(e[r].length){let i=e[r],{passes:n,passOffset:a}=this.traces[r];n=n.map((o,s)=>{t[a+s]=i})}this.scatter.draw(...t)}return this};q2.prototype.destroy=function(){return this.traces.forEach(e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function Icr(e,t,r){let i=e.id!=null?e.id:e,n=t,a=r;return i<<16|(n&255)<<8|a&255}function YR(e,t,r){let i,n,a,o,s,l,u,c,f=e[t],h=e[r];return f.length>2?(i=f[0],a=f[2],n=f[1],o=f[3]):f.length?(i=n=f[0],a=o=f[1]):(i=f.x,n=f.y,a=f.x+f.width,o=f.y+f.height),h.length>2?(s=h[0],u=h[2],l=h[1],c=h[3]):h.length?(s=l=h[0],u=c=h[1]):(s=h.x,l=h.y,u=h.x+h.width,c=h.y+h.height),[s,n,u,o]}function nZe(e){if(typeof e=="number")return[e,e,e,e];if(e.length===2)return[e[0],e[1],e[0],e[1]];{let t=Xee(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var lZe=W((HYr,sZe)=>{"use strict";var Rcr=oZe(),Zee=it(),XR=Cs(),zcr=u1().selectMode;sZe.exports=function(t,r,i){if(i.length)for(var n=0;n<i.length;n++)Bcr(t,i[n][0])};function Bcr(e,t){var r=e._fullLayout,i=r._size,n=t.trace,a=t.t,o=r._splomScenes[n.uid],s=o.matrixOptions,l=s.cdata,u=r._glcanvas.data()[0].regl,c=r.dragmode,f,h,d,p,v;if(l.length!==0){s.lower=n.showupperhalf,s.upper=n.showlowerhalf,s.diagonal=n.diagonal.visible;var m=n._visibleDims,g=l.length,w=o.viewOpts={};for(w.ranges=new Array(g),w.domains=new Array(g),v=0;v<m.length;v++){d=m[v];var b=w.ranges[v]=new Array(4),_=w.domains[v]=new Array(4);f=XR.getFromId(e,n._diag[d][0]),f&&(b[0]=f._rl[0],b[2]=f._rl[1],_[0]=f.domain[0],_[2]=f.domain[1]),h=XR.getFromId(e,n._diag[d][1]),h&&(b[1]=h._rl[0],b[3]=h._rl[1],_[1]=h.domain[0],_[3]=h.domain[1])}var M=e._context.plotGlPixelRatio,x=i.l*M,T=i.b*M,A=i.w*M,y=i.h*M;w.viewport=[x,T,A+x,y+T],o.matrix===!0&&(o.matrix=Rcr(u));var E=r.clickmode.indexOf("select")>-1,S=zcr(c)||!!n.selectedpoints||E,C=!0;if(S){var k=n._length;if(n.selectedpoints){o.selectBatch=n.selectedpoints;var D=n.selectedpoints,F={};for(d=0;d<D.length;d++)F[D[d]]=!0;var P=[];for(d=0;d<k;d++)F[d]||P.push(d);o.unselectBatch=P}var R=a.xpx=new Array(g),L=a.ypx=new Array(g);for(v=0;v<m.length;v++){if(d=m[v],f=XR.getFromId(e,n._diag[d][0]),f)for(R[v]=new Array(k),p=0;p<k;p++)R[v][p]=f.c2p(l[v][p]);if(h=XR.getFromId(e,n._diag[d][1]),h)for(L[v]=new Array(k),p=0;p<k;p++)L[v][p]=h.c2p(l[v][p])}if(o.selectBatch.length||o.unselectBatch.length){var I=Zee.extendFlat({},s,o.unselectedOptions,w),B=Zee.extendFlat({},s,o.selectedOptions,w);o.matrix.update(I,B),C=!1}}else a.xpx=a.ypx=null;if(C){var O=Zee.extendFlat({},s,w);o.matrix.update(O,null)}}}});var Kee=W(uZe=>{"use strict";uZe.getDimIndex=function(t,r){for(var i=r._id,n=i.charAt(0),a={x:0,y:1}[n],o=t._visibleDims,s=0;s<o.length;s++){var l=o[s];if(t._diag[l][a]===i)return s}return!1}});var pZe=W(($Yr,dZe)=>{"use strict";var cZe=Kee(),qcr=nR().calcHover,fZe=ji().getFromId,Ocr=tn().extendFlat;function Ncr(e,t,r,i,n){n||(n={});var a=(i||"").charAt(0)==="x",o=(i||"").charAt(0)==="y",s=hZe(e,t,r);if((a||o)&&n.hoversubplots==="axis"&&s[0])for(var l=(a?e.xa:e.ya)._subplotsWith,u=n.gd,c=Ocr({},e),f=0;f<l.length;f++){var h=l[f];if(h!==e.xa._id+e.ya._id){o?c.xa=fZe(u,h,"x"):c.ya=fZe(u,h,"y");var d=a||o,p=hZe(c,t,r,d);s=s.concat(p)}}return s}function hZe(e,t,r,i){var n=e.cd,a=n[0].trace,o=e.scene,s=o.matrixOptions.cdata,l=e.xa,u=e.ya,c=l.c2p(t),f=u.c2p(r),h=e.distance,d=cZe.getDimIndex(a,l),p=cZe.getDimIndex(a,u);if(d===!1||p===!1)return[e];for(var v=s[d],m=s[p],g,w,b=h,_=0;_<v.length;_++)if(!(i&&_!==e.index)){var M=v[_],x=m[_],T=l.c2p(M)-c,A=u.c2p(x)-f,y=Math.sqrt(T*T+A*A);(i||y<b)&&(b=w=y,g=_)}return e.index=g,e.distance=b,e.dxy=w,g===void 0?[e]:[qcr(e,v,m,a)]}dZe.exports={hoverPoints:Ncr}});var _Ze=W((WYr,xZe)=>{"use strict";var yZe=it(),vZe=yZe.pushUnique,gZe=$o(),mZe=Kee();xZe.exports=function(t,r){var i=t.cd,n=i[0].trace,a=i[0].t,o=t.scene,s=o.matrixOptions.cdata,l=t.xaxis,u=t.yaxis,c=[];if(!o)return c;var f=!gZe.hasMarkers(n)&&!gZe.hasText(n);if(n.visible!==!0||f)return c;var h=mZe.getDimIndex(n,l),d=mZe.getDimIndex(n,u);if(h===!1||d===!1)return c;var p=a.xpx[h],v=a.ypx[d],m=s[h],g=s[d],w=(t.scene.selectBatch||[]).slice(),b=[];if(r!==!1&&!r.degenerate)for(var _=0;_<m.length;_++)r.contains([p[_],v[_]],null,_,t)?(c.push({pointNumber:_,x:m[_],y:g[_]}),vZe(w,_)):w.indexOf(_)!==-1?vZe(w,_):b.push(_);var M=o.matrixOptions;return!w.length&&!b.length?o.matrix.update(M,null):!o.selectBatch.length&&!o.unselectBatch.length&&o.matrix.update(o.unselectedOptions,yZe.extendFlat({},M,o.selectedOptions,o.viewOpts)),o.selectBatch=w,o.unselectBatch=b,c}});var TZe=W((YYr,wZe)=>{"use strict";var bZe=it(),Ucr=wd(),Vcr=kb().markerStyle;wZe.exports=function(t,r){var i=r.trace,n=t._fullLayout._splomScenes[i.uid];if(n){Ucr(t,i),bZe.extendFlat(n.matrixOptions,Vcr(t,i));var a=bZe.extendFlat({},n.matrixOptions,n.viewOpts);n.matrix.update(a,null)}}});var MZe=W((XYr,AZe)=>{"use strict";var Gcr=yi(),Hcr=q$();AZe.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:jee(),supplyDefaults:HXe(),colorbar:Ac(),calc:ZXe(),plot:lZe(),hoverPoints:pZe().hoverPoints,selectPoints:_Ze(),editStyle:TZe(),meta:{}};Gcr.register(Hcr)});var FZe=W((ZYr,DZe)=>{"use strict";var jcr=wee(),$cr=yi(),Wcr=UR(),Ycr=_c().getModuleCalcData,O2=dl(),SZe=Cs().getFromId,EZe=ji().shouldShowZeroLine,kZe="splom",CZe={};function Xcr(e){var t=e._fullLayout,r=$cr.getModule(kZe),i=Ycr(e.calcdata,r)[0],n=Wcr(e,["ANGLE_instanced_arrays","OES_element_index_uint"],CZe);n&&(t._hasOnlyLargeSploms&&Jee(e),r.plot(e,{},i))}function Zcr(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&Jee(e);for(var i=0;i<t.length;i++){var n=t[i][0],a=n.trace,o=r._splomScenes[a.uid];a.type==="splom"&&o&&o.matrix&&Kcr(e,a,o)}}function Kcr(e,t,r){for(var i=r.matrixOptions.data.length,n=t._visibleDims,a=r.viewOpts.ranges=new Array(i),o=0;o<n.length;o++){var s=n[o],l=a[o]=new Array(4),u=SZe(e,t._diag[s][0]);u&&(l[0]=u.r2l(u.range[0]),l[2]=u.r2l(u.range[1]));var c=SZe(e,t._diag[s][1]);c&&(l[1]=c.r2l(c.range[0]),l[3]=c.r2l(c.range[1]))}r.selectBatch.length||r.unselectBatch.length?r.matrix.update({ranges:a},{ranges:a}):r.matrix.update({ranges:a})}function Jee(e){var t=e._fullLayout,r=t._glcanvas.data()[0].regl,i=t._splomGrid;i||(i=t._splomGrid=jcr(r)),i.update(Jcr(e))}function Jcr(e){var t=e._context.plotGlPixelRatio,r=e._fullLayout,i=r._size,n=[0,0,r.width*t,r.height*t],a={},o;function s(x,T,A,y,E,S){A*=t,y*=t,E*=t,S*=t;var C=T[x+"color"],k=T[x+"width"],D=String(C+k);D in a?a[D].data.push(NaN,NaN,A,y,E,S):a[D]={data:[A,y,E,S],join:"rect",thickness:k*t,color:C,viewport:n,range:n,overlay:!1}}for(o in r._splomSubplots){var l=r._plots[o],u=l.xaxis,c=l.yaxis,f=u._gridVals,h=c._gridVals,d=u._offset,p=u._length,v=c._length,m=i.b+c.domain[0]*i.h,g=-c._m,w=-g*c.r2l(c.range[0],c.calendar),b,_;if(u.showgrid)for(o=0;o<f.length;o++)b=d+u.l2p(f[o].x),s("grid",u,b,m,b,m+v);if(c.showgrid)for(o=0;o<h.length;o++)_=m+w+g*h[o].x,s("grid",c,d,_,d+p,_);EZe(e,u,c)&&(b=d+u.l2p(0),s("zeroline",u,b,m,b,m+v)),EZe(e,c,u)&&(_=m+w+0,s("zeroline",c,d,_,d+p,_))}var M=[];for(o in a)M.push(a[o]);return M}function Qcr(e,t,r,i){var n={},a;if(i._splomScenes){for(a=0;a<e.length;a++){var o=e[a];o.type==="splom"&&(n[o.uid]=1)}for(a=0;a<r.length;a++){var s=r[a];if(!n[s.uid]){var l=i._splomScenes[s.uid];l&&l.destroy&&l.destroy(),i._splomScenes[s.uid]=null,delete i._splomScenes[s.uid]}}}Object.keys(i._splomScenes||{}).length===0&&delete i._splomScenes,i._splomGrid&&!t._hasOnlyLargeSploms&&i._hasOnlyLargeSploms&&(i._splomGrid.destroy(),i._splomGrid=null,delete i._splomGrid),O2.clean(e,t,r,i)}DZe.exports={name:kZe,attr:O2.attr,attrRegex:O2.attrRegex,layoutAttributes:O2.layoutAttributes,supplyLayoutDefaults:O2.supplyLayoutDefaults,drawFramework:O2.drawFramework,plot:Xcr,drag:Zcr,updateGrid:Jee,clean:Qcr,updateFx:O2.updateFx,toSVG:O2.toSVG,reglPrecompiled:CZe}});var IZe=W((KYr,PZe)=>{"use strict";var LZe=MZe();LZe.basePlotModule=FZe(),PZe.exports=LZe});var zZe=W((JYr,RZe)=>{"use strict";RZe.exports=IZe()});var tte=W((QYr,BZe)=>{"use strict";var efr=Eo(),Qee=ec(),ete=Ho(),tfr=us().attributes,ZR=tn().extendFlat,rfr=Da().templatedArray;BZe.exports={domain:tfr({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:ete({editType:"plot"}),tickfont:ete({autoShadowDflt:!0,editType:"plot"}),rangefont:ete({editType:"plot"}),dimensions:rfr("dimension",{label:{valType:"string",editType:"plot"},tickvals:ZR({},Qee.tickvals,{editType:"plot"}),ticktext:ZR({},Qee.ticktext,{editType:"plot"}),tickformat:ZR({},Qee.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:ZR({editType:"calc"},efr("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}});var HE=W((eXr,qZe)=>{"use strict";qZe.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}});var G1=W((tXr,NZe)=>{"use strict";var ifr=tA();function OZe(e){return[e]}NZe.exports={keyFun:function(e){return e.key},repeat:OZe,descend:ifr,wrap:OZe,unwrap:function(e){return e[0]}}});var nte=W((rXr,KZe)=>{"use strict";var Bl=HE(),gv=vi(),nfr=G1().keyFun,KR=G1().repeat,tT=it().sorterAsc,afr=it().strTranslate,UZe=Bl.bar.snapRatio;function VZe(e,t){return e*(1-UZe)+t*UZe}var GZe=Bl.bar.snapClose;function ofr(e,t){return e*(1-GZe)+t*GZe}function QR(e,t,r,i){if(sfr(r,i))return r;var n=e?-1:1,a=0,o=t.length-1;if(n<0){var s=a;a=o,o=s}for(var l=t[a],u=l,c=a;n*c<n*o;c+=n){var f=c+n,h=t[f];if(n*r<n*ofr(l,h))return VZe(l,u);if(n*r<n*h||f===o)return VZe(h,l);u=l,l=h}}function sfr(e,t){for(var r=0;r<t.length;r++)if(e>=t[r][0]&&e<=t[r][1])return!0;return!1}function lfr(e){e.attr("x",-Bl.bar.captureWidth/2).attr("width",Bl.bar.captureWidth)}function ufr(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function cfr(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t=HZe(e.brush.filter.getConsolidated(),e.height),r=[0],i,n,a,o=t.length?t[0][0]:null,s=0;s<t.length;s++)i=t[s],n=i[1]-i[0],r.push(o),r.push(n),a=s+1,a<t.length&&(o=t[a][0]-i[1]);return r.push(e.height),r}function HZe(e,t){return e.map(function(r){return r.map(function(i){return Math.max(0,i*t)}).sort(tT)})}function ffr(e,t){var r=Bl.bar.handleHeight;if(!(t>e[1]+r||t<e[0]-r))return t>=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}function jZe(){gv.select(document.body).style("cursor",null)}function ite(e){e.attr("stroke-dasharray",cfr)}function JR(e,t){var r=gv.select(e).selectAll(".highlight, .highlight-shadow"),i=t?r.transition().duration(Bl.bar.snapDuration).each("end",t):r;ite(i)}function $Ze(e,t){var r=e.brush,i=r.filterSpecified,n=NaN,a={},o;if(i){var s=e.height,l=r.filter.getConsolidated(),u=HZe(l,s),c=NaN,f=NaN,h=NaN;for(o=0;o<=u.length;o++){var d=u[o];if(d&&d[0]<=t&&t<=d[1]){c=o;break}else if(f=o?o-1:NaN,d&&d[0]>t){h=o;break}}if(n=c,isNaN(n)&&(isNaN(f)||isNaN(h)?n=isNaN(f)?h:f:n=t-u[f][1]<u[h][0]-t?f:h),!isNaN(n)){var p=u[n],v=ffr(p,t);v&&(a.interval=l[n],a.intervalPix=p,a.region=v)}}if(e.ordinal&&!a.region){var m=e.unitTickvals,g=e.unitToPaddedPx.invert(t);for(o=0;o<m.length;o++){var w=[m[Math.max(o-1,0)]*.25+m[o]*.75,m[Math.min(o+1,m.length-1)]*.25+m[o]*.75];if(g>=w[0]&&g<=w[1]){a.clickableOrdinalRange=w;break}}}return a}function hfr(e,t){gv.event.sourceEvent.stopPropagation();var r=t.height-gv.mouse(e)[1]-2*Bl.verticalPadding,i=t.unitToPaddedPx.invert(r),n=t.brush,a=$Ze(t,r),o=a.interval,s=n.svgBrush;if(s.wasDragged=!1,s.grabbingBar=a.region==="ns",s.grabbingBar){var l=o.map(t.unitToPaddedPx);s.grabPoint=r-l[0]-Bl.verticalPadding,s.barLength=l[1]-l[0]}s.clickableOrdinalRange=a.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&n.filterSpecified?n.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(u){return u[0]!==o[0]&&u[1]!==o[1]})),s.startExtent=a.region?o[a.region==="s"?1:0]:i,t.parent.inBrushDrag=!0,s.brushStartCallback()}function WZe(e,t){gv.event.sourceEvent.stopPropagation();var r=t.height-gv.mouse(e)[1]-2*Bl.verticalPadding,i=t.brush.svgBrush;i.wasDragged=!0,i._dragging=!0,i.grabbingBar?i.newExtent=[r-i.grabPoint,r+i.barLength-i.grabPoint].map(t.unitToPaddedPx.invert):i.newExtent=[i.startExtent,t.unitToPaddedPx.invert(r)].sort(tT),t.brush.filterSpecified=!0,i.extent=i.stayingIntervals.concat([i.newExtent]),i.brushCallback(t),JR(e.parentNode)}function dfr(e,t){var r=t.brush,i=r.filter,n=r.svgBrush;n._dragging||(YZe(e,t),WZe(e,t),t.brush.svgBrush.wasDragged=!1),n._dragging=!1;var a=gv.event;a.sourceEvent.stopPropagation();var o=n.grabbingBar;if(n.grabbingBar=!1,n.grabLocation=void 0,t.parent.inBrushDrag=!1,jZe(),!n.wasDragged){n.wasDragged=void 0,n.clickableOrdinalRange?r.filterSpecified&&t.multiselect?n.extent.push(n.clickableOrdinalRange):(n.extent=[n.clickableOrdinalRange],r.filterSpecified=!0):o?(n.extent=n.stayingIntervals,n.extent.length===0&&rte(r)):rte(r),n.brushCallback(t),JR(e.parentNode),n.brushEndCallback(r.filterSpecified?i.getConsolidated():[]);return}var s=function(){i.set(i.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]<l[0]&&l.reverse(),n.newExtent=[QR(0,l,n.newExtent[0],n.stayingIntervals),QR(1,l,n.newExtent[1],n.stayingIntervals)];var u=n.newExtent[1]>n.newExtent[0];n.extent=n.stayingIntervals.concat(u?[n.newExtent]:[]),n.extent.length||rte(r),n.brushCallback(t),u?JR(e.parentNode,s):(s(),JR(e.parentNode))}else s();n.brushEndCallback(r.filterSpecified?i.getConsolidated():[])}function YZe(e,t){var r=t.height-gv.mouse(e)[1]-2*Bl.verticalPadding,i=$Ze(t,r),n="crosshair";i.clickableOrdinalRange?n="pointer":i.region&&(n=i.region+"-resize"),gv.select(document.body).style("cursor",n)}function pfr(e){e.on("mousemove",function(t){gv.event.preventDefault(),t.parent.inBrushDrag||YZe(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||jZe()}).call(gv.behavior.drag().on("dragstart",function(t){hfr(this,t)}).on("drag",function(t){WZe(this,t)}).on("dragend",function(t){dfr(this,t)}))}function XZe(e,t){return e[0]-t[0]}function vfr(e,t,r){var i=r._context.staticPlot,n=e.selectAll(".background").data(KR);n.enter().append("rect").classed("background",!0).call(lfr).call(ufr).style("pointer-events",i?"none":"auto").attr("transform",afr(0,Bl.verticalPadding)),n.call(pfr).attr("height",function(s){return s.height-Bl.verticalPadding});var a=e.selectAll(".highlight-shadow").data(KR);a.enter().append("line").classed("highlight-shadow",!0).attr("x",-Bl.bar.width/2).attr("stroke-width",Bl.bar.width+Bl.bar.strokeWidth).attr("stroke",t).attr("opacity",Bl.bar.strokeOpacity).attr("stroke-linecap","butt"),a.attr("y1",function(s){return s.height}).call(ite);var o=e.selectAll(".highlight").data(KR);o.enter().append("line").classed("highlight",!0).attr("x",-Bl.bar.width/2).attr("stroke-width",Bl.bar.width-Bl.bar.strokeWidth).attr("stroke",Bl.bar.fillColor).attr("opacity",Bl.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(s){return s.height}).call(ite)}function gfr(e,t,r){var i=e.selectAll("."+Bl.cn.axisBrush).data(KR,nfr);i.enter().append("g").classed(Bl.cn.axisBrush,!0),vfr(i,t,r)}function mfr(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function rte(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function yfr(e){return function(r){var i=r.brush,n=mfr(i),a=n.slice();i.filter.set(a),e()}}function ZZe(e){for(var t=e.slice(),r=[],i,n=t.shift();n;){for(i=n.slice();(n=t.shift())&&n[0]<=i[1];)i[1]=Math.max(i[1],n[1]);r.push(i)}return r.length===1&&r[0][0]>r[0][1]&&(r=[]),r}function xfr(){var e=[],t,r;return{set:function(i){e=i.map(function(n){return n.slice().sort(tT)}).sort(XZe),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=ZZe(e),r=e.reduce(function(n,a){return[Math.min(n[0],a[0]),Math.max(n[1],a[1])]},[1/0,-1/0])},get:function(){return e.slice()},getConsolidated:function(){return t},getBounds:function(){return r}}}function _fr(e,t,r,i,n,a){var o=xfr();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:i,brushCallback:yfr(n),brushEndCallback:a}}}function bfr(e,t){if(Array.isArray(e[0])?(e=e.map(function(i){return i.sort(tT)}),t.multiselect?e=ZZe(e.sort(XZe)):e=[e[0]]):e=[e.sort(tT)],t.tickvals){var r=t.tickvals.slice().sort(tT);if(e=e.map(function(i){var n=[QR(0,r,i[0],[]),QR(1,r,i[1],[])];if(n[1]>n[0])return n}).filter(function(i){return i}),!e.length)return}return e.length>1?e:e[0]}KZe.exports={makeBrush:_fr,ensureAxisBrush:gfr,cleanRanges:bfr}});var eKe=W((iXr,QZe)=>{"use strict";var N2=it(),wfr=bc().hasColorscale,Tfr=Fu(),Afr=us().defaults,Mfr=Xc(),Sfr=ji(),JZe=tte(),Efr=nte(),ate=HE().maxDimensionCount,kfr=GR();function Cfr(e,t,r,i,n){var a=n("line.color",r);if(wfr(e,"line")&&N2.isArrayOrTypedArray(a)){if(a.length)return n("line.colorscale"),Tfr(e,t,i,n,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function Dfr(e,t,r,i){function n(u,c){return N2.coerce(e,t,JZe.dimensions,u,c)}var a=n("values"),o=n("visible");if(a&&a.length||(o=t.visible=!1),o){n("label"),n("tickvals"),n("ticktext"),n("tickformat");var s=n("range");t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:s},Sfr.setConvert(t._ax,i.layout),n("multiselect");var l=n("constraintrange");l&&(t.constraintrange=Efr.cleanRanges(l,t))}}QZe.exports=function(t,r,i,n){function a(c,f){return N2.coerce(t,r,JZe,c,f)}var o=t.dimensions;Array.isArray(o)&&o.length>ate&&(N2.log("parcoords traces support up to "+ate+" dimensions at the moment"),o.splice(ate));var s=Mfr(t,r,{name:"dimensions",layout:n,handleItemDefaults:Dfr}),l=Cfr(t,r,i,n,a);Afr(r,n,a),(!Array.isArray(s)||!s.length)&&(r.visible=!1),kfr(r,s,"values",l);var u=N2.extendFlat({},n.font,{size:Math.round(n.font.size/1.2)});N2.coerceFont(a,"labelfont",u),N2.coerceFont(a,"tickfont",u,{autoShadowDflt:!0}),N2.coerceFont(a,"rangefont",u),a("labelangle"),a("labelside"),a("unselected.line.color"),a("unselected.line.opacity")}});var rKe=W((nXr,tKe)=>{"use strict";var Ffr=it().isArrayOrTypedArray,ote=Jo(),Lfr=G1().wrap;tKe.exports=function(t,r){var i,n;return ote.hasColorscale(r,"line")&&Ffr(r.line.color)?(i=r.line.color,n=ote.extractOpts(r.line).colorscale,ote.calc(t,r,{vals:i,containerStr:"line",cLetter:"c"})):(i=Pfr(r._length),n=[[0,r.line.color],[1,r.line.color]]),Lfr({lineColor:i,cscale:n})};function Pfr(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=.5;return t}});var ste=W(ez=>{"use strict";var Ifr=it().isTypedArray;ez.convertTypedArray=function(e){return Ifr(e)?Array.prototype.slice.call(e):e};ez.isOrdinal=function(e){return!!e.tickvals};ez.isVisible=function(e){return e.visible||!("visible"in e)}});var hKe=W((oXr,fKe)=>{"use strict";var Rfr=["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(`
`),zfr=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(`
`),jE=HE().maxDimensionCount,lKe=it(),iKe=1e-6,tz=2048,Bfr=new Uint8Array(4),nKe=new Uint8Array(4),aKe={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function qfr(e){e.read({x:0,y:0,width:1,height:1,data:Bfr})}function uKe(e,t,r,i,n){var a=e._gl;a.enable(a.SCISSOR_TEST),a.scissor(t,r,i,n),e.clear({color:[0,0,0,0],depth:1})}function Ofr(e,t,r,i,n,a){var o=a.key;function s(l){var u=Math.min(i,n-l*i);l===0&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],uKe(e,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),!r.clearOnly&&(a.count=2*u,a.offset=2*l*i,t(a),l*i+u<n&&(r.currentRafs[o]=window.requestAnimationFrame(function(){s(l+1)})),r.drawCompleted=!1)}r.drawCompleted||(qfr(e),r.drawCompleted=!0),s(0)}function Nfr(e){return Math.max(iKe,Math.min(1-iKe,e))}function Ufr(e,t){for(var r=new Array(256),i=0;i<256;i++)r[i]=e(i/255).concat(t);return r}function lte(e,t){return(e>>>8*t)%256/255}function Vfr(e,t,r){for(var i=new Array(e*(jE+4)),n=0,a=0;a<e;a++){for(var o=0;o<jE;o++)i[n++]=o<t.length?t[o].paddedUnitValues[a]:.5;i[n++]=lte(a,2),i[n++]=lte(a,1),i[n++]=lte(a,0),i[n++]=Nfr(r[a])}return i}function Gfr(e,t,r){for(var i=new Array(t*8),n=0,a=0;a<t;a++)for(var o=0;o<2;o++)for(var s=0;s<4;s++){var l=e*4+s,u=r[a*64+l];l===63&&o===0&&(u*=-1),i[n++]=u}return i}function oKe(e){var t="0"+e;return t.slice(-2)}function cKe(e){return e<jE?"p"+oKe(e+1)+"_"+oKe(e+4):"colors"}function Hfr(e,t,r){for(var i=0;i<=jE;i+=4)e[cKe(i)](Gfr(i/4,t,r))}function jfr(e){for(var t={},r=0;r<=jE;r+=4)t[cKe(r)]=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)});return t}function $fr(e,t,r,i,n,a,o,s,l,u,c,f,h,d){for(var p=[[],[]],v=0;v<64;v++)p[0][v]=v===n?1:0,p[1][v]=v===a?1:0;o*=d,s*=d,l*=d,u*=d;var m=e.lines.canvasOverdrag*d,g=e.domain,w=e.canvasWidth*d,b=e.canvasHeight*d,_=e.pad.l*d,M=e.pad.b*d,x=e.layoutHeight*d,T=e.layoutWidth*d,A=e.deselectedLines.color,y=e.deselectedLines.opacity,E=lKe.extendFlat({key:c,resolution:[w,b],viewBoxPos:[o+m,s],viewBoxSize:[l,u],i0:n,i1:a,dim0A:p[0].slice(0,16),dim0B:p[0].slice(16,32),dim0C:p[0].slice(32,48),dim0D:p[0].slice(48,64),dim1A:p[1].slice(0,16),dim1B:p[1].slice(16,32),dim1C:p[1].slice(32,48),dim1D:p[1].slice(48,64),drwLayer:f,contextColor:[A[0],A[1],A[2],y!=="auto"?A[3]*y:Math.max(1/255,Math.pow(1/e.lines.color.length,1/3))],scissorX:(i===t?0:o+m)+(_-m)+T*g.x[0],scissorWidth:(i===r?w-o+m:l+.5)+(i===t?o+m:0),scissorY:s+M+x*g.y[0],scissorHeight:u,viewportX:_-m+T*g.x[0],viewportY:M+x*g.y[0],viewportWidth:w,viewportHeight:b},h);return E}function sKe(e){var t=tz-1,r=Math.max(0,Math.floor(e[0]*t),0),i=Math.min(t,Math.ceil(e[1]*t),t);return[Math.min(r,i),Math.max(r,i)]}fKe.exports=function(e,t){var r=t.context,i=t.pick,n=t.regl,a=n._gl,o=a.getParameter(a.ALIASED_LINE_WIDTH_RANGE),s=Math.max(o[0],Math.min(o[1],t.viewModel.plotGlPixelRatio)),l={currentRafs:{},drawCompleted:!0,clearOnly:!1},u,c,f,h,d=jfr(n),p,v=n.texture(aKe),m=[];w(t);var g=n({profile:!1,blend:{enable:r,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:!r,mask:!0,func:"less",range:[0,1]},cull:{enable:!0,face:"back"},scissor:{enable:!0,box:{x:n.prop("scissorX"),y:n.prop("scissorY"),width:n.prop("scissorWidth"),height:n.prop("scissorHeight")}},viewport:{x:n.prop("viewportX"),y:n.prop("viewportY"),width:n.prop("viewportWidth"),height:n.prop("viewportHeight")},dither:!1,vert:Rfr,frag:zfr,primitive:"lines",lineWidth:s,attributes:d,uniforms:{resolution:n.prop("resolution"),viewBoxPos:n.prop("viewBoxPos"),viewBoxSize:n.prop("viewBoxSize"),dim0A:n.prop("dim0A"),dim1A:n.prop("dim1A"),dim0B:n.prop("dim0B"),dim1B:n.prop("dim1B"),dim0C:n.prop("dim0C"),dim1C:n.prop("dim1C"),dim0D:n.prop("dim0D"),dim1D:n.prop("dim1D"),loA:n.prop("loA"),hiA:n.prop("hiA"),loB:n.prop("loB"),hiB:n.prop("hiB"),loC:n.prop("loC"),hiC:n.prop("hiC"),loD:n.prop("loD"),hiD:n.prop("hiD"),palette:v,contextColor:n.prop("contextColor"),maskTexture:n.prop("maskTexture"),drwLayer:n.prop("drwLayer"),maskHeight:n.prop("maskHeight")},offset:n.prop("offset"),count:n.prop("count")});function w(A){u=A.model,c=A.viewModel,f=c.dimensions.slice(),h=f[0]?f[0].values.length:0;var y=u.lines,E=i?y.color.map(function(C,k){return k/y.color.length}):y.color,S=Vfr(h,f,E);Hfr(d,h,S),!r&&!i&&(v=n.texture(lKe.extendFlat({data:Ufr(u.unitToColor,255)},aKe)))}function b(A){var y,E,S,C=[[],[]];for(S=0;S<64;S++){var k=!A&&S<f.length?f[S].brush.filter.getBounds():[-1/0,1/0];C[0][S]=k[0],C[1][S]=k[1]}var D=tz*8,F=new Array(D);for(y=0;y<D;y++)F[y]=255;if(!A)for(y=0;y<f.length;y++){var P=y%8,R=(y-P)/8,L=Math.pow(2,P),I=f[y],B=I.brush.filter.get();if(!(B.length<2)){var O=sKe(B[0])[1];for(E=1;E<B.length;E++){var $=sKe(B[E]);for(S=O+1;S<$[0];S++)F[S*8+R]&=~L;O=Math.max(O,$[1])}}}var Y={shape:[8,tz],format:"alpha",type:"uint8",mag:"nearest",min:"nearest",data:F};return p?p(Y):p=n.texture(Y),{maskTexture:p,maskHeight:tz,loA:C[0].slice(0,16),loB:C[0].slice(16,32),loC:C[0].slice(32,48),loD:C[0].slice(48,64),hiA:C[1].slice(0,16),hiB:C[1].slice(16,32),hiC:C[1].slice(32,48),hiD:C[1].slice(48,64)}}function _(A,y,E){var S=A.length,C,k,D,F=1/0,P=-1/0;for(C=0;C<S;C++)A[C].dim0.canvasX<F&&(F=A[C].dim0.canvasX,k=C),A[C].dim1.canvasX>P&&(P=A[C].dim1.canvasX,D=C);S===0&&uKe(n,0,0,u.canvasWidth,u.canvasHeight);var R=b(r);for(C=0;C<S;C++){var L=A[C],I=L.dim0.crossfilterDimensionIndex,B=L.dim1.crossfilterDimensionIndex,O=L.canvasX,$=L.canvasY,Y=O+L.panelSizeX,K=L.plotGlPixelRatio;if(y||!m[I]||m[I][0]!==O||m[I][1]!==Y){m[I]=[O,Y];var j=$fr(u,k,D,C,I,B,O,$,L.panelSizeX,L.panelSizeY,L.dim0.crossfilterDimensionIndex,r?0:i?2:1,R,K);l.clearOnly=E;var q=y?u.lines.blockLineCount:h;Ofr(n,g,l,q,h,j)}}}function M(A,y){return n.read({x:A,y,width:1,height:1,data:nKe}),nKe}function x(A,y,E,S){var C=new Uint8Array(4*E*S);return n.read({x:A,y,width:E,height:S,data:C}),C}function T(){e.style["pointer-events"]="none",v.destroy(),p&&p.destroy();for(var A in d)d[A].destroy()}return{render:_,readPixel:M,readPixels:x,destroy:T,update:w}}});var SKe=W((sXr,MKe)=>{"use strict";var oc=vi(),mm=it(),ute=mm.isArrayOrTypedArray,yKe=mm.numberFormat,xKe=ni(),_Ke=ji(),Wfr=mm.strRotate,H1=mm.strTranslate,Yfr=uo(),rz=Ji(),dKe=Jo(),hte=G1(),Vd=hte.keyFun,j1=hte.repeat,bKe=hte.unwrap,rT=ste(),Ra=HE(),wKe=nte(),Xfr=hKe();function pKe(e,t,r){return mm.aggNums(e,null,t,r)}function TKe(e,t){return dte(pKe(Math.min,e,t),pKe(Math.max,e,t))}function iz(e){var t=e.range;return t?dte(t[0],t[1]):TKe(e.values,e._length)}function dte(e,t){return(isNaN(e)||!isFinite(e))&&(e=0),(isNaN(t)||!isFinite(t))&&(t=0),e===t&&(e===0?(e-=1,t+=1):(e*=.9,t*=1.1)),[e,t]}function Zfr(e,t){return t?function(r,i){var n=t[i];return n==null?e(r):n}:e}function Kfr(e,t,r,i,n){var a=iz(r);return i?oc.scale.ordinal().domain(i.map(Zfr(yKe(r.tickformat),n))).range(i.map(function(o){var s=(o-a[0])/(a[1]-a[0]);return e-t+s*(2*t-e)})):oc.scale.linear().domain(a).range([e-t,t])}function Jfr(e,t){return oc.scale.linear().range([t,e-t])}function Qfr(e,t){return oc.scale.linear().domain(iz(e)).range([t,1-t])}function ehr(e){if(e.tickvals){var t=iz(e);return oc.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function thr(e){var t=e.map(function(a){return a[0]}),r=e.map(function(a){let[o,s,l]=xKe.rgbaArray(a[1]);return oc.rgb(o,s,l)}),i=function(a){return function(o){return o[a]}},n="rgb".split("").map(function(a){return oc.scale.linear().clamp(!0).domain(t).range(r.map(i(a)))});return function(a){return n.map(function(o){return o(a)})}}function fte(e){return e.dimensions.some(function(t){return t.brush.filterSpecified})}function rhr(e,t,r){var i=bKe(t),n=i.trace,a=rT.convertTypedArray(i.lineColor),o=n.line,s={color:xKe.normalize(n.unselected.line.color),opacity:n.unselected.line.opacity},l=dKe.extractOpts(o),u=l.reversescale?dKe.flipScale(i.cscale):i.cscale,c=n.domain,f=n.dimensions,h=e.width,d=n.labelangle,p=n.labelside,v=n.labelfont,m=n.tickfont,g=n.rangefont,w=mm.extendDeepNoArrays({},o,{color:a.map(oc.scale.linear().domain(iz({values:a,range:[l.min,l.max],_length:n._length}))),blockLineCount:Ra.blockLineCount,canvasOverdrag:Ra.overdrag*Ra.canvasPixelRatio}),b=Math.floor(h*(c.x[1]-c.x[0])),_=Math.floor(e.height*(c.y[1]-c.y[0])),M=e.margin||{l:80,r:80,t:100,b:80},x=b,T=_;return{key:r,colCount:f.filter(rT.isVisible).length,dimensions:f,tickDistance:Ra.tickDistance,unitToColor:thr(u),lines:w,deselectedLines:s,labelAngle:d,labelSide:p,labelFont:v,tickFont:m,rangeFont:g,layoutWidth:h,layoutHeight:e.height,domain:c,translateX:c.x[0]*h,translateY:e.height-c.y[1]*e.height,pad:M,canvasWidth:x*Ra.canvasPixelRatio+2*w.canvasOverdrag,canvasHeight:T*Ra.canvasPixelRatio,width:x,height:T,canvasPixelRatio:Ra.canvasPixelRatio}}function ihr(e,t,r){var i=r.width,n=r.height,a=r.dimensions,o=r.canvasPixelRatio,s=function(h){return i*h/Math.max(1,r.colCount-1)},l=Ra.verticalPadding/n,u=Jfr(n,Ra.verticalPadding),c={key:r.key,xScale:s,model:r,inBrushDrag:!1},f={};return c.dimensions=a.filter(rT.isVisible).map(function(h,d){var p=Qfr(h,l),v=f[h.label];f[h.label]=(v||0)+1;var m=h.label+(v?"__"+v:""),g=h.constraintrange,w=g&&g.length;w&&!ute(g[0])&&(g=[g]);var b=w?g.map(function(k){return k.map(p)}):[[-1/0,1/0]],_=function(){var k=c;k.focusLayer&&k.focusLayer.render(k.panels,!0);var D=fte(k);!e.contextShown()&&D?(k.contextLayer&&k.contextLayer.render(k.panels,!0),e.contextShown(!0)):e.contextShown()&&!D&&(k.contextLayer&&k.contextLayer.render(k.panels,!0,!0),e.contextShown(!1))},M=h.values;M.length>h._length&&(M=M.slice(0,h._length));var x=h.tickvals,T;function A(k,D){return{val:k,text:T[D]}}function y(k,D){return k.val-D.val}if(ute(x)&&x.length){mm.isTypedArray(x)&&(x=Array.from(x)),T=h.ticktext,!ute(T)||!T.length?T=x.map(yKe(h.tickformat)):T.length>x.length?T=T.slice(0,x.length):x.length>T.length&&(x=x.slice(0,T.length));for(var E=1;E<x.length;E++)if(x[E]<x[E-1]){for(var S=x.map(A).sort(y),C=0;C<x.length;C++)x[C]=S[C].val,T[C]=S[C].text;break}}else x=void 0;return M=rT.convertTypedArray(M),{key:m,label:h.label,tickFormat:h.tickformat,tickvals:x,ticktext:T,ordinal:rT.isOrdinal(h),multiselect:h.multiselect,xIndex:d,crossfilterDimensionIndex:d,visibleIndex:h._index,height:n,values:M,paddedUnitValues:M.map(p),unitTickvals:x&&x.map(p),xScale:s,x:s(d),canvasX:s(d)*o,unitToPaddedPx:u,domainScale:Kfr(n,Ra.verticalPadding,h,x,T),ordinalScale:ehr(h),parent:c,model:r,brush:wKe.makeBrush(e,w,b,function(){e.linePickActive(!1)},_,function(k){if(c.focusLayer.render(c.panels,!0),c.pickLayer&&c.pickLayer.render(c.panels,!0),e.linePickActive(!0),t&&t.filterChanged){var D=p.invert,F=k.map(function(P){return P.map(D).sort(mm.sorterAsc)}).sort(function(P,R){return P[0]-R[0]});t.filterChanged(c.key,h._index,F)}})}}),c}function vKe(e){e.classed(Ra.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function nhr(){var e=!0,t=!1;return{linePickActive:function(r){return arguments.length?e=!!r:e},contextShown:function(r){return arguments.length?t=!!r:t}}}function gKe(e,t){var r=t==="top"?1:-1,i=e*Math.PI/180,n=Math.sin(i),a=Math.cos(i);return{dir:r,dx:n,dy:a,degrees:e}}function cte(e,t,r){for(var i=t.panels||(t.panels=[]),n=e.data(),a=0;a<n.length-1;a++){var o=i[a]||(i[a]={}),s=n[a],l=n[a+1];o.dim0=s,o.dim1=l,o.canvasX=s.canvasX,o.panelSizeX=l.canvasX-s.canvasX,o.panelSizeY=t.model.canvasHeight,o.y=0,o.canvasY=0,o.plotGlPixelRatio=r}}function ahr(e){for(var t=0;t<e.length;t++)for(var r=0;r<e[t].length;r++)for(var i=e[t][r].trace,n=i.dimensions,a=0;a<n.length;a++){var o=n[a].values,s=n[a]._ax;s&&(s.range?s.range=dte(s.range[0],s.range[1]):s.range=TKe(o,i._length),s.dtick||(s.dtick=.01*(Math.abs(s.range[1]-s.range[0])||1)),s.tickformat=n[a].tickformat,_Ke.calcTicks(s),s.cleanRange())}}function AKe(e,t){return _Ke.tickText(e._ax,t,!1).text}function mKe(e,t){if(e.ordinal)return"";var r=e.domainScale.domain(),i=r[t?r.length-1:0];return AKe(e.model.dimensions[e.visibleIndex],i)}MKe.exports=function(t,r,i,n){var a=t._context.staticPlot,o=t._fullLayout,s=o._toppaper,l=o._glcontainer,u=t._context.plotGlPixelRatio,c=t._fullLayout.paper_bgcolor;ahr(r);var f=nhr(),h=r.filter(function(C){return bKe(C).trace.visible}).map(rhr.bind(0,i)).map(ihr.bind(0,f,n));l.each(function(C,k){return mm.extendFlat(C,h[k])});var d=l.selectAll(".gl-canvas").each(function(C){C.viewModel=h[0],C.viewModel.plotGlPixelRatio=u,C.viewModel.paperColor=c,C.model=C.viewModel?C.viewModel.model:null}),p=null,v=d.filter(function(C){return C.pick});v.style("pointer-events",a?"none":"auto").on("mousemove",function(C){if(f.linePickActive()&&C.lineLayer&&n&&n.hover){var k=oc.event,D=this.width,F=this.height,P=oc.mouse(this),R=P[0],L=P[1];if(R<0||L<0||R>=D||L>=F)return;var I=C.lineLayer.readPixel(R,F-1-L),B=I[3]!==0,O=B?I[2]+256*(I[1]+256*I[0]):null,$={x:R,y:L,clientX:k.clientX,clientY:k.clientY,dataIndex:C.model.key,curveNumber:O};O!==p&&(B?n.hover($):n.unhover&&n.unhover($),p=O)}}),d.style("opacity",function(C){return C.pick?0:1}),s.style("background","rgba(255, 255, 255, 0)");var m=s.selectAll("."+Ra.cn.parcoords).data(h,Vd);m.exit().remove(),m.enter().append("g").classed(Ra.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),m.attr("transform",function(C){return H1(C.model.translateX,C.model.translateY)});var g=m.selectAll("."+Ra.cn.parcoordsControlView).data(j1,Vd);g.enter().append("g").classed(Ra.cn.parcoordsControlView,!0),g.attr("transform",function(C){return H1(C.model.pad.l,C.model.pad.t)});var w=g.selectAll("."+Ra.cn.yAxis).data(function(C){return C.dimensions},Vd);w.enter().append("g").classed(Ra.cn.yAxis,!0),g.each(function(C){cte(w,C,u)}),d.each(function(C){if(C.viewModel){!C.lineLayer||n?C.lineLayer=Xfr(this,C):C.lineLayer.update(C),(C.key||C.key===0)&&(C.viewModel[C.key]=C.lineLayer);var k=!C.context||n;C.lineLayer.render(C.viewModel.panels,k)}}),w.attr("transform",function(C){return H1(C.xScale(C.xIndex),0)}),w.call(oc.behavior.drag().origin(function(C){return C}).on("drag",function(C){var k=C.parent;f.linePickActive(!1),C.x=Math.max(-Ra.overdrag,Math.min(C.model.width+Ra.overdrag,oc.event.x)),C.canvasX=C.x*C.model.canvasPixelRatio,w.sort(function(D,F){return D.x-F.x}).each(function(D,F){D.xIndex=F,D.x=C===D?D.x:D.xScale(D.xIndex),D.canvasX=D.x*D.model.canvasPixelRatio}),cte(w,k,u),w.filter(function(D){return Math.abs(C.xIndex-D.xIndex)!==0}).attr("transform",function(D){return H1(D.xScale(D.xIndex),0)}),oc.select(this).attr("transform",H1(C.x,0)),w.each(function(D,F,P){P===C.parent.key&&(k.dimensions[F]=D)}),k.contextLayer&&k.contextLayer.render(k.panels,!1,!fte(k)),k.focusLayer.render&&k.focusLayer.render(k.panels)}).on("dragend",function(C){var k=C.parent;C.x=C.xScale(C.xIndex),C.canvasX=C.x*C.model.canvasPixelRatio,cte(w,k,u),oc.select(this).attr("transform",function(D){return H1(D.x,0)}),k.contextLayer&&k.contextLayer.render(k.panels,!1,!fte(k)),k.focusLayer&&k.focusLayer.render(k.panels),k.pickLayer&&k.pickLayer.render(k.panels,!0),f.linePickActive(!0),n&&n.axesMoved&&n.axesMoved(k.key,k.dimensions.map(function(D){return D.crossfilterDimensionIndex}))})),w.exit().remove();var b=w.selectAll("."+Ra.cn.axisOverlays).data(j1,Vd);b.enter().append("g").classed(Ra.cn.axisOverlays,!0),b.selectAll("."+Ra.cn.axis).remove();var _=b.selectAll("."+Ra.cn.axis).data(j1,Vd);_.enter().append("g").classed(Ra.cn.axis,!0),_.each(function(C){var k=C.model.height/C.model.tickDistance,D=C.domainScale,F=D.domain();oc.select(this).call(oc.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(k,C.tickFormat).tickValues(C.ordinal?F:null).tickFormat(function(P){return rT.isOrdinal(C)?P:AKe(C.model.dimensions[C.visibleIndex],P)}).scale(D)),rz.font(_.selectAll("text"),C.model.tickFont)}),_.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),_.selectAll("text").style("cursor","default");var M=b.selectAll("."+Ra.cn.axisHeading).data(j1,Vd);M.enter().append("g").classed(Ra.cn.axisHeading,!0);var x=M.selectAll("."+Ra.cn.axisTitle).data(j1,Vd);x.enter().append("text").classed(Ra.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",a?"none":"auto"),x.text(function(C){return C.label}).each(function(C){var k=oc.select(this);rz.font(k,C.model.labelFont),Yfr.convertToTspans(k,t)}).attr("transform",function(C){var k=gKe(C.model.labelAngle,C.model.labelSide),D=Ra.axisTitleOffset;return(k.dir>0?"":H1(0,2*D+C.model.height))+Wfr(k.degrees)+H1(-D*k.dx,-D*k.dy)}).attr("text-anchor",function(C){var k=gKe(C.model.labelAngle,C.model.labelSide),D=Math.abs(k.dx),F=Math.abs(k.dy);return 2*D>F?k.dir*k.dx<0?"start":"end":"middle"});var T=b.selectAll("."+Ra.cn.axisExtent).data(j1,Vd);T.enter().append("g").classed(Ra.cn.axisExtent,!0);var A=T.selectAll("."+Ra.cn.axisExtentTop).data(j1,Vd);A.enter().append("g").classed(Ra.cn.axisExtentTop,!0),A.attr("transform",H1(0,-Ra.axisExtentOffset));var y=A.selectAll("."+Ra.cn.axisExtentTopText).data(j1,Vd);y.enter().append("text").classed(Ra.cn.axisExtentTopText,!0).call(vKe),y.text(function(C){return mKe(C,!0)}).each(function(C){rz.font(oc.select(this),C.model.rangeFont)});var E=T.selectAll("."+Ra.cn.axisExtentBottom).data(j1,Vd);E.enter().append("g").classed(Ra.cn.axisExtentBottom,!0),E.attr("transform",function(C){return H1(0,C.model.height+Ra.axisExtentOffset)});var S=E.selectAll("."+Ra.cn.axisExtentBottomText).data(j1,Vd);S.enter().append("text").classed(Ra.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(vKe),S.text(function(C){return mKe(C,!1)}).each(function(C){rz.font(oc.select(this),C.model.rangeFont)}),wKe.ensureAxisBrush(b,c,t)}});var vte=W((pte,DKe)=>{"use strict";var ohr=SKe(),shr=UR(),EKe=ste().isVisible,CKe={};function kKe(e,t,r){var i=t.indexOf(r),n=e.indexOf(i);return n===-1&&(n+=t.length),n}function lhr(e,t){return function(i,n){return kKe(e,t,i)-kKe(e,t,n)}}var pte=DKe.exports=function(t,r){var i=t._fullLayout,n=shr(t,[],CKe);if(n){var a={},o={},s={},l=i._size;r.forEach(function(d,p){var v=d[0].trace,m=s[p]=v.index;a[p]=t.data[m].dimensions,o[p]=t.data[m].dimensions.slice()});var u=function(d,p,v){var m=o[d][p],g=v.map(function(T){return T.slice()}),w="dimensions["+p+"].constraintrange",b=i._tracePreGUI[t._fullData[s[d]].uid];if(b[w]===void 0){var _=m.constraintrange;b[w]=_||null}var M=t._fullData[s[d]].dimensions[p];g.length?(g.length===1&&(g=g[0]),m.constraintrange=g,M.constraintrange=g.slice(),g=[g]):(delete m.constraintrange,delete M.constraintrange,g=null);var x={};x[w]=g,t.emit("plotly_restyle",[x,[s[d]]])},c=function(d){t.emit("plotly_hover",d)},f=function(d){t.emit("plotly_unhover",d)},h=function(d,p){var v=lhr(p,o[d].filter(EKe));a[d].sort(v),o[d].filter(function(m){return!EKe(m)}).sort(function(m){return o[d].indexOf(m)}).forEach(function(m){a[d].splice(a[d].indexOf(m),1),a[d].splice(o[d].indexOf(m),0,m)}),t.emit("plotly_restyle",[{dimensions:[a[d]]},[s[d]]])};ohr(t,r,{width:l.w,height:l.h,margin:{t:l.t,r:l.r,b:l.b,l:l.l}},{filterChanged:u,hover:c,unhover:f,axesMoved:h})}};pte.reglPrecompiled=CKe});var LKe=W($E=>{"use strict";var FKe=vi(),uhr=_c().getModuleCalcData,chr=vte(),fhr=sd();$E.name="parcoords";$E.plot=function(e){var t=uhr(e.calcdata,"parcoords")[0];t.length&&chr(e,t)};$E.clean=function(e,t,r,i){var n=i._has&&i._has("parcoords"),a=t._has&&t._has("parcoords");n&&!a&&(i._paperdiv.selectAll(".parcoords").remove(),i._glimages.selectAll("*").remove())};$E.toSVG=function(e){var t=e._fullLayout._glimages,r=FKe.select(e).selectAll(".svg-container"),i=r.filter(function(a,o){return o===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function n(){var a=this,o=a.toDataURL("image/png"),s=t.append("svg:image");s.attr({xmlns:fhr.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}i.each(n),window.setTimeout(function(){FKe.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var IKe=W((uXr,PKe)=>{"use strict";PKe.exports={attributes:tte(),supplyDefaults:eKe(),calc:rKe(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:LKe(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var BKe=W((cXr,zKe)=>{"use strict";var RKe=IKe();RKe.plot=vte();zKe.exports=RKe});var OKe=W((fXr,qKe)=>{"use strict";qKe.exports=BKe()});var gte=W((hXr,HKe)=>{"use strict";var UKe=tn().extendFlat,hhr=Wa(),NKe=Ho(),dhr=Eo(),{hovertemplateAttrs:VKe,templatefallbackAttrs:GKe}=Ga(),phr=us().attributes,vhr=UKe({editType:"calc"},dhr("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:VKe({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:GKe({editType:"plot"})});HKe.exports={domain:phr({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:UKe({},hhr.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:VKe({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:GKe({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:NKe({editType:"calc"}),tickfont:NKe({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:vhr,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}});var WKe=W((dXr,$Ke)=>{"use strict";var iT=it(),ghr=bc().hasColorscale,mhr=Fu(),yhr=us().defaults,xhr=Xc(),jKe=gte(),_hr=GR(),bhr=yc().isTypedArraySpec;function whr(e,t,r,i,n){n("line.shape"),n("line.hovertemplate"),n("line.hovertemplatefallback");var a=n("line.color",i.colorway[0]);if(ghr(e,"line")&&iT.isArrayOrTypedArray(a)){if(a.length)return n("line.colorscale"),mhr(e,t,i,n,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function Thr(e,t){function r(u,c){return iT.coerce(e,t,jKe.dimensions,u,c)}var i=r("values"),n=r("visible");if(i&&i.length||(n=t.visible=!1),n){r("label"),r("displayindex",t._index);var a=e.categoryarray,o=iT.isArrayOrTypedArray(a)&&a.length>0||bhr(a),s;o&&(s="array");var l=r("categoryorder",s);l==="array"?(r("categoryarray"),r("ticktext")):(delete e.categoryarray,delete e.ticktext),!o&&l==="array"&&(t.categoryorder="trace")}}$Ke.exports=function(t,r,i,n){function a(u,c){return iT.coerce(t,r,jKe,u,c)}var o=xhr(t,r,{name:"dimensions",handleItemDefaults:Thr}),s=whr(t,r,i,n,a);yhr(r,n,a),(!Array.isArray(o)||!o.length)&&(r.visible=!1),_hr(r,o,"values",s),a("hoveron"),a("hovertemplate"),a("hovertemplatefallback"),a("arrangement"),a("bundlecolors"),a("sortpaths"),a("counts");var l=n.font;iT.coerceFont(a,"labelfont",l,{overrideDflt:{size:Math.round(l.size)}}),iT.coerceFont(a,"tickfont",l,{autoShadowDflt:!0,overrideDflt:{size:Math.round(l.size/1.2)}})}});var XKe=W((pXr,YKe)=>{"use strict";var Ahr=G1().wrap,Mhr=bc().hasColorscale,Shr=Zc(),Ehr=mV(),khr=Ji(),WE=it(),Chr=sn();YKe.exports=function(t,r){var i=WE.filterVisible(r.dimensions);if(i.length===0)return[];var n=i.map(function(y){var E;if(y.categoryorder==="trace")E=null;else if(y.categoryorder==="array")E=y.categoryarray;else{E=Ehr(y.values);for(var S=!0,C=0;C<E.length;C++)if(!Chr(E[C])){S=!1;break}E.sort(S?WE.sorterAsc:void 0),y.categoryorder==="category descending"&&(E=E.reverse())}return zhr(y.values,E)}),a,o,s;WE.isArrayOrTypedArray(r.counts)?a=r.counts:a=[r.counts],Bhr(i),i.forEach(function(y,E){qhr(y,n[E])});var l=r.line,u;l?(Mhr(r,"line")&&Shr(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),u=khr.tryColorscale(l)):u=WE.identity;function c(y){var E,S;return WE.isArrayOrTypedArray(l.color)?(E=l.color[y%l.color.length],S=E):E=l.color,{color:u(E),rawColor:S}}var f=i[0].values.length,h={},d=n.map(function(y){return y.inds});s=0;var p,v;for(p=0;p<f;p++){var m=[];for(v=0;v<d.length;v++)m.push(d[v][p]);o=a[p%a.length],s+=o;var g=c(p),w=m+"-"+g.rawColor;h[w]===void 0&&(h[w]=Ihr(m,g.color,g.rawColor)),Rhr(h[w],p,o)}var b=i.map(function(y,E){return Fhr(E,y._index,y._displayindex,y.label,s)});for(p=0;p<f;p++)for(o=a[p%a.length],v=0;v<b.length;v++){var _=b[v].containerInd,M=n[v].inds[p],x=b[v].categories;if(x[M]===void 0){var T=r.dimensions[_]._categoryarray[M],A=r.dimensions[_]._ticktext[M];x[M]=Lhr(v,M,T,A)}Phr(x[M],p,o)}return Ahr(Dhr(b,h,s))};function Dhr(e,t,r){var i=e.map(function(n){return n.categories.length}).reduce(function(n,a){return Math.max(n,a)});return{dimensions:e,paths:t,trace:void 0,maxCats:i,count:r}}function Fhr(e,t,r,i,n){return{dimensionInd:e,containerInd:t,displayInd:r,dimensionLabel:i,count:n,categories:[],dragX:null}}function Lhr(e,t,r,i){return{dimensionInd:e,categoryInd:t,categoryValue:r,displayInd:t,categoryLabel:i,valueInds:[],count:0,dragY:null}}function Phr(e,t,r){e.valueInds.push(t),e.count+=r}function Ihr(e,t,r){return{categoryInds:e,color:t,rawColor:r,valueInds:[],count:0}}function Rhr(e,t,r){e.valueInds.push(t),e.count+=r}function zhr(e,t){t==null?t=[]:t=t.map(function(u){return u});var r={},i={},n=[];t.forEach(function(u,c){r[u]=0,i[u]=c});for(var a=0;a<e.length;a++){var o=e[a],s;r[o]===void 0?(r[o]=1,s=t.push(o)-1,i[o]=s):(r[o]++,s=i[o]),n.push(s)}var l=t.map(function(u){return r[u]});return{uniqueValues:t,uniqueCounts:l,inds:n}}function Bhr(e){var t=e.map(function(i){return i.displayindex}),r;if(Ohr(t))for(r=0;r<e.length;r++)e[r]._displayindex=e[r].displayindex;else for(r=0;r<e.length;r++)e[r]._displayindex=r}function qhr(e,t){e._categoryarray=t.uniqueValues,e.ticktext===null||e.ticktext===void 0?e._ticktext=[]:e._ticktext=e.ticktext.slice();for(var r=e._ticktext.length;r<t.uniqueValues.length;r++)e._ticktext.push(t.uniqueValues[r])}function Ohr(e){for(var t=new Array(e.length),r=0;r<e.length;r++){if(e[r]<0||e[r]>=e.length||t[e[r]]!==void 0)return!1;t[e[r]]=!0}return!0}});var nJe=W((vXr,iJe)=>{"use strict";var za=vi(),Nhr=(db(),Go(hb)).interpolateNumber,Uhr=rF(),mte=ni(),ZE=Ds(),U2=it(),YE=U2.strTranslate,ZKe=Ji(),Vhr=uo();function Ghr(e,t,r,i){var n=t._context.staticPlot,a=e.map(a0r.bind(0,t,r)),o=i.selectAll("g.parcatslayer").data([null]);o.enter().append("g").attr("class","parcatslayer").style("pointer-events",n?"none":"all");var s=o.selectAll("g.trace.parcats").data(a,ym),l=s.enter().append("g").attr("class","trace parcats");s.attr("transform",function(w){return YE(w.x,w.y)}),l.append("g").attr("class","paths");var u=s.select("g.paths"),c=u.selectAll("path.path").data(function(w){return w.paths},ym);c.attr("fill",function(w){return w.model.color});var f=c.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(w){return w.model.color}).attr("fill-opacity",0);_te(f),c.attr("d",function(w){return w.svgD}),f.empty()||c.sort(yte),c.exit().remove(),c.on("mouseover",jhr).on("mouseout",$hr).on("click",Whr),l.append("g").attr("class","dimensions");var h=s.select("g.dimensions"),d=h.selectAll("g.dimension").data(function(w){return w.dimensions},ym);d.enter().append("g").attr("class","dimension"),d.attr("transform",function(w){return YE(w.x,0)}),d.exit().remove();var p=d.selectAll("g.category").data(function(w){return w.categories},ym),v=p.enter().append("g").attr("class","category");p.attr("transform",function(w){return YE(0,w.y)}),v.append("rect").attr("class","catrect").attr("pointer-events","none"),p.select("rect.catrect").attr("fill","none").attr("width",function(w){return w.width}).attr("height",function(w){return w.height}),JKe(v);var m=p.selectAll("rect.bandrect").data(function(w){return w.bands},ym);m.each(function(){U2.raiseToTop(this)}),m.attr("fill",function(w){return w.color});var g=m.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(w){return w.color}).attr("fill-opacity",0);m.attr("fill",function(w){return w.color}).attr("width",function(w){return w.width}).attr("height",function(w){return w.height}).attr("y",function(w){return w.y}).attr("cursor",function(w){return w.parcatsViewModel.arrangement==="fixed"?"default":w.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),wte(g),m.exit().remove(),v.append("text").attr("class","catlabel").attr("pointer-events","none"),p.select("text.catlabel").attr("text-anchor",function(w){return XE(w)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(w){return XE(w)?w.width+5:-5}).attr("y",function(w){return w.height/2}).text(function(w){return w.model.categoryLabel}).each(function(w){ZKe.font(za.select(this),w.parcatsViewModel.categorylabelfont),Vhr.convertToTspans(za.select(this),t)}),v.append("text").attr("class","dimlabel"),p.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(w){return w.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(w){return w.width/2}).attr("y",-5).text(function(w,b){return b===0?w.parcatsViewModel.model.dimensions[w.model.dimensionInd].dimensionLabel:null}).each(function(w){ZKe.font(za.select(this),w.parcatsViewModel.labelfont)}),p.selectAll("rect.bandrect").on("mouseover",e0r).on("mouseout",t0r),p.exit().remove(),d.call(za.behavior.drag().origin(function(w){return{x:w.x,y:0}}).on("dragstart",r0r).on("drag",i0r).on("dragend",n0r)),s.each(function(w){w.traceSelection=za.select(this),w.pathSelection=za.select(this).selectAll("g.paths").selectAll("path.path"),w.dimensionSelection=za.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),s.exit().remove()}iJe.exports=function(e,t,r,i){Ghr(r,e,i,t)};function ym(e){return e.key}function XE(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function yte(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor<t.model.rawColor?-1:0}function Hhr(e,t){for(var r=0;r<Math.min(e.length,t.length);r++){var i=e[r],n=t[r];if(i<n)return-1;if(i>n)return 1;if(i!==n){var a=isNaN(i),o=isNaN(n);if(a!==o)return a?1:-1}}return e.length-t.length}function jhr(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){U2.raiseToTop(this),bte(za.select(this));var t=KE(e),r=xte(e);if(e.parcatsViewModel.graphDiv.emit("plotly_hover",{points:t,event:za.event,constraints:r}),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var i=za.mouse(this)[0],n=e.parcatsViewModel.graphDiv,a=e.parcatsViewModel.trace,o=n._fullLayout,s=o._paperdiv.node().getBoundingClientRect(),l=e.parcatsViewModel.graphDiv.getBoundingClientRect(),u,c,f;for(f=0;f<e.leftXs.length-1;f++)if(e.leftXs[f]+e.dimWidths[f]-2<=i&&i<=e.leftXs[f+1]+2){var h=e.parcatsViewModel.dimensions[f],d=e.parcatsViewModel.dimensions[f+1];u=(h.x+h.width+d.x)/2,c=(e.topYs[f]+e.topYs[f+1]+e.height)/2;break}var p=e.parcatsViewModel.x+u,v=e.parcatsViewModel.y+c,m=mte.mostReadable(e.model.color),g=e.model.count,w=g/e.parcatsViewModel.model.count,b={countLabel:g,probabilityLabel:w.toFixed(3)},_=[];e.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&_.push(["Count:",b.countLabel].join(" ")),e.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&_.push(["P:",b.probabilityLabel].join(" "));var M=_.join("<br>"),x=za.mouse(n)[0];ZE.loneHover({trace:a,x:p-s.left+l.left,y:v-s.top+l.top,text:M,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:m,idealAlign:x<p?"right":"left",hovertemplate:(a.line||{}).hovertemplate,hovertemplateLabels:b,eventData:[{data:a._input,fullData:a,count:g,probability:w}]},{container:o._hoverlayer.node(),outerContainer:o._paper.node(),gd:n})}}}function $hr(e){if(!e.parcatsViewModel.dragDimension&&(_te(za.select(this)),ZE.loneUnhover(e.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),e.parcatsViewModel.pathSelection.sort(yte),e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var t=KE(e),r=xte(e);e.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:t,event:za.event,constraints:r})}}function KE(e){for(var t=[],r=eJe(e.parcatsViewModel),i=0;i<e.model.valueInds.length;i++){var n=e.model.valueInds[i];t.push({curveNumber:r,pointNumber:n})}return t}function xte(e){for(var t={},r=e.parcatsViewModel.model.dimensions,i=0;i<r.length;i++){var n=r[i],a=n.categories[e.model.categoryInds[i]];t[n.containerInd]=a.categoryValue}return e.model.rawColor!==void 0&&(t.color=e.model.rawColor),t}function Whr(e){if(e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=KE(e),r=xte(e);e.parcatsViewModel.graphDiv.emit("plotly_click",{points:t,event:za.event,constraints:r})}}function _te(e){e.attr("fill",function(t){return t.model.color}).attr("fill-opacity",.6).attr("stroke","lightgray").attr("stroke-width",.2).attr("stroke-opacity",1)}function bte(e){e.attr("fill-opacity",.8).attr("stroke",t=>mte.mostReadable(t.model.color)).attr("stroke-width",.3)}function Yhr(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function JKe(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function Xhr(e){e.attr("stroke","black").attr("stroke-width",1.5)}function wte(e){e.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function nz(e){var t=e.parcatsViewModel.pathSelection,r=e.categoryViewModel.model.dimensionInd,i=e.categoryViewModel.model.categoryInd;return t.filter(function(n){return n.model.categoryInds[r]===i&&n.model.color===e.color})}function Zhr(e){var t=za.select(e.parentNode).selectAll("rect.bandrect");t.each(function(r){var i=nz(r);bte(i),i.each(function(){U2.raiseToTop(this)})}),Yhr(za.select(e.parentNode))}function Khr(e){var t=za.select(e).datum(),r=nz(t);bte(r),r.each(function(){U2.raiseToTop(this)}),za.select(e.parentNode).selectAll("rect.bandrect").filter(function(i){return i.color===t.color}).each(function(){U2.raiseToTop(this),Xhr(za.select(this))})}function Tte(e,t,r){var i=za.select(e).datum(),n=i.categoryViewModel.model,a=i.parcatsViewModel.graphDiv,o=za.select(e.parentNode).selectAll("rect.bandrect"),s=[];o.each(function(u){var c=nz(u);c.each(function(f){Array.prototype.push.apply(s,KE(f))})});var l={};l[n.dimensionInd]=n.categoryValue,a.emit(t,{points:s,event:r,constraints:l})}function Ate(e,t,r){var i=za.select(e).datum(),n=i.categoryViewModel.model,a=i.parcatsViewModel.graphDiv,o=nz(i),s=[];o.each(function(u){Array.prototype.push.apply(s,KE(u))});var l={};l[n.dimensionInd]=n.categoryValue,i.rawColor!==void 0&&(l.color=i.rawColor),a.emit(t,{points:s,event:r,constraints:l})}function QKe(e,t,r){e._fullLayout._calcInverseTransform(e);var i=e._fullLayout._invScaleX,n=e._fullLayout._invScaleY,a=za.select(r.parentNode).select("rect.catrect"),o=a.node().getBoundingClientRect(),s=a.datum(),l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=o.top+o.height/2,h,d;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(h=o.left,d="left"):(h=o.left+o.width,d="right");var p=s.model.count,v=s.model.categoryLabel,m=p/s.parcatsViewModel.model.count,g={countLabel:p,categoryLabel:v,probabilityLabel:m.toFixed(3)},w=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&w.push(["Count:",g.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&w.push(["P("+g.categoryLabel+"):",g.probabilityLabel].join(" "));var b=w.join("<br>");return{trace:c,x:i*(h-t.left),y:n*(f-t.top),text:b,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:g,eventData:[{data:c._input,fullData:c,count:p,category:v,probability:m}]}}function Jhr(e,t,r){var i=[];return za.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var n=this;i.push(QKe(e,t,n))}),i}function Qhr(e,t,r){e._fullLayout._calcInverseTransform(e);var i=e._fullLayout._invScaleX,n=e._fullLayout._invScaleY,a=r.getBoundingClientRect(),o=za.select(r).datum(),s=o.categoryViewModel,l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=a.y+a.height/2,h,d;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(h=a.left,d="left"):(h=a.left+a.width,d="right");var p=s.model.categoryLabel,v=o.parcatsViewModel.model.count,m=0;o.categoryViewModel.bands.forEach(function(E){E.color===o.color&&(m+=E.count)});var g=s.model.count,w=0;l.pathSelection.each(function(E){E.model.color===o.color&&(w+=E.model.count)});var b=m/v,_=m/w,M=m/g,x={countLabel:m,categoryLabel:p,probabilityLabel:b.toFixed(3)},T=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&T.push(["Count:",x.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(T.push("P(color \u2229 "+p+"): "+x.probabilityLabel),T.push("P("+p+" | color): "+_.toFixed(3)),T.push("P(color | "+p+"): "+M.toFixed(3)));var A=T.join("<br>"),y=mte.mostReadable(o.color);return{trace:c,x:i*(h-t.left),y:n*(f-t.top),text:A,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:y,fontSize:10,idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:x,eventData:[{data:c._input,fullData:c,category:p,count:v,probability:b,categorycount:g,colorcount:w,bandcolorcount:m}]}}function e0r(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=za.mouse(this)[1];if(t<-1)return;var r=e.parcatsViewModel.graphDiv,i=r._fullLayout,n=i._paperdiv.node().getBoundingClientRect(),a=e.parcatsViewModel.hoveron,o=this;if(a==="color"?(Khr(o),Ate(o,"plotly_hover",za.event)):(Zhr(o),Tte(o,"plotly_hover",za.event)),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var s;a==="category"?s=QKe(r,n,o):a==="color"?s=Qhr(r,n,o):a==="dimension"&&(s=Jhr(r,n,o)),s&&ZE.loneHover(s,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r})}}}function t0r(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(_te(t.pathSelection),JKe(t.dimensionSelection.selectAll("g.category")),wte(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),ZE.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(yte),t.hoverinfoItems.indexOf("skip")===-1)){var r=e.parcatsViewModel.hoveron,i=this;r==="color"?Ate(i,"plotly_unhover",za.event):Tte(i,"plotly_unhover",za.event)}}function r0r(e){e.parcatsViewModel.arrangement!=="fixed"&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,za.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var r=za.mouse(this)[0],i=za.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=i&&i<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map(function(n){return n.displayInd}),t.model.dragY=t.y,U2.raiseToTop(this.parentNode),za.select(this.parentNode).selectAll("rect.bandrect").each(function(n){n.y<i&&i<=n.y+n.height&&(e.potentialClickBand=this)}))}),e.parcatsViewModel.dragDimension=e,ZE.loneUnhover(e.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function i0r(e){if(e.parcatsViewModel.arrangement!=="fixed"&&(e.dragHasMoved=!0,e.dragDimensionDisplayInd!==null)){var t=e.dragDimensionDisplayInd,r=t-1,i=t+1,n=e.parcatsViewModel.dimensions[t];if(e.dragCategoryDisplayInd!==null){var a=n.categories[e.dragCategoryDisplayInd];a.model.dragY+=za.event.dy;var o=a.model.dragY,s=a.model.displayInd,l=n.categories,u=l[s-1],c=l[s+1];u!==void 0&&o<u.y+u.height/2&&(a.model.displayInd=u.model.displayInd,u.model.displayInd=s),c!==void 0&&o+a.height>c.y+c.height/2&&(a.model.displayInd=c.model.displayInd,c.model.displayInd=s),e.dragCategoryDisplayInd=a.model.displayInd}if(e.dragCategoryDisplayInd===null||e.parcatsViewModel.arrangement==="freeform"){n.model.dragX=za.event.x;var f=e.parcatsViewModel.dimensions[r],h=e.parcatsViewModel.dimensions[i];f!==void 0&&n.model.dragX<f.x+f.width&&(n.model.displayInd=f.model.displayInd,f.model.displayInd=t),h!==void 0&&n.model.dragX+n.width>h.x&&(n.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=n.model.displayInd}Ste(e.parcatsViewModel),Mte(e.parcatsViewModel),rJe(e.parcatsViewModel),tJe(e.parcatsViewModel)}}function n0r(e){if(e.parcatsViewModel.arrangement!=="fixed"&&e.dragDimensionDisplayInd!==null){za.select(this).selectAll("text").attr("font-weight","normal");var t={},r=eJe(e.parcatsViewModel),i=e.parcatsViewModel.model.dimensions.map(function(h){return h.displayInd}),n=e.initialDragDimensionDisplayInds.some(function(h,d){return h!==i[d]});n&&i.forEach(function(h,d){var p=e.parcatsViewModel.model.dimensions[d].containerInd;t["dimensions["+p+"].displayindex"]=h});var a=!1;if(e.dragCategoryDisplayInd!==null){var o=e.model.categories.map(function(h){return h.displayInd});if(a=e.initialDragCategoryDisplayInds.some(function(h,d){return h!==o[d]}),a){var s=e.model.categories.slice().sort(function(h,d){return h.displayInd-d.displayInd}),l=s.map(function(h){return h.categoryValue}),u=s.map(function(h){return h.categoryLabel});t["dimensions["+e.model.containerInd+"].categoryarray"]=[l],t["dimensions["+e.model.containerInd+"].ticktext"]=[u],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}if(e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!e.dragHasMoved&&e.potentialClickBand&&(e.parcatsViewModel.hoveron==="color"?Ate(e.potentialClickBand,"plotly_click",za.event.sourceEvent):Tte(e.potentialClickBand,"plotly_click",za.event.sourceEvent)),e.model.dragX=null,e.dragCategoryDisplayInd!==null){var c=e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd];c.model.dragY=null,e.dragCategoryDisplayInd=null}e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,Ste(e.parcatsViewModel),Mte(e.parcatsViewModel);var f=za.transition().duration(300).ease("cubic-in-out");f.each(function(){rJe(e.parcatsViewModel,!0),tJe(e.parcatsViewModel,!0)}).each("end",function(){(n||a)&&Uhr.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function eJe(e){for(var t,r=e.graphDiv._fullData,i=0;i<r.length;i++)if(e.key===r[i].uid){t=i;break}return t}function tJe(e,t){t===void 0&&(t=!1);function r(i){return t?i.transition():i}e.pathSelection.data(function(i){return i.paths},ym),r(e.pathSelection).attr("d",function(i){return i.svgD})}function rJe(e,t){t===void 0&&(t=!1);function r(l){return t?l.transition():l}e.dimensionSelection.data(function(l){return l.dimensions},ym);var i=e.dimensionSelection.selectAll("g.category").data(function(l){return l.categories},ym);r(e.dimensionSelection).attr("transform",function(l){return YE(l.x,0)}),r(i).attr("transform",function(l){return YE(0,l.y)});var n=i.select(".dimlabel");n.text(function(l,u){return u===0?l.parcatsViewModel.model.dimensions[l.model.dimensionInd].dimensionLabel:null});var a=i.select(".catlabel");a.attr("text-anchor",function(l){return XE(l)?"start":"end"}).attr("x",function(l){return XE(l)?l.width+5:-5}).each(function(l){var u,c;XE(l)?(u=l.width+5,c="start"):(u=-5,c="end"),za.select(this).selectAll("tspan").attr("x",u).attr("text-anchor",c)});var o=i.selectAll("rect.bandrect").data(function(l){return l.bands},ym),s=o.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",function(l){return l.color}).attr("fill-opacity",0);o.attr("fill",function(l){return l.color}).attr("width",function(l){return l.width}).attr("height",function(l){return l.height}).attr("y",function(l){return l.y}),wte(s),o.each(function(){U2.raiseToTop(this)}),o.exit().remove()}function a0r(e,t,r){var i=r[0],n=t.margin||{l:80,r:80,t:100,b:80},a=i.trace,o=a.domain,s=t.width,l=t.height,u=Math.floor(s*(o.x[1]-o.x[0])),c=Math.floor(l*(o.y[1]-o.y[0])),f=o.x[0]*s+n.l,h=t.height-o.y[1]*t.height+n.t,d=a.line.shape,p;a.hoverinfo==="all"?p=["count","probability"]:p=(a.hoverinfo||"").split("+");var v={trace:a,key:a.uid,model:i,x:f,y:h,width:u,height:c,hoveron:a.hoveron,hoverinfoItems:p,arrangement:a.arrangement,bundlecolors:a.bundlecolors,sortpaths:a.sortpaths,labelfont:a.labelfont,categorylabelfont:a.tickfont,pathShape:d,dragDimension:null,margin:n,paths:[],dimensions:[],graphDiv:e,traceSelection:null,pathSelection:null,dimensionSelection:null};return i.dimensions&&(Ste(v),Mte(v)),v}function KKe(e,t,r,i,n){var a=[],o=[],s,l;for(l=0;l<r.length-1;l++)s=Nhr(r[l]+e[l],e[l+1]),a.push(s(n)),o.push(s(1-n));var u="M "+e[0]+","+t[0];for(u+="l"+r[0]+",0 ",l=1;l<r.length;l++)u+="C"+a[l-1]+","+t[l-1]+" "+o[l-1]+","+t[l]+" "+e[l]+","+t[l],u+="l"+r[l]+",0 ";for(u+="l0,"+i+" ",u+="l -"+r[r.length-1]+",0 ",l=r.length-2;l>=0;l--)u+="C"+o[l]+","+(t[l+1]+i)+" "+a[l]+","+(t[l]+i)+" "+(e[l]+r[l])+","+(t[l]+i),u+="l-"+r[l]+",0 ";return u+="Z",u}function Mte(e){var t=e.dimensions,r=e.model,i=t.map(function(k){return k.categories.map(function(D){return D.y})}),n=e.model.dimensions.map(function(k){return k.categories.map(function(D){return D.displayInd})}),a=e.model.dimensions.map(function(k){return k.displayInd}),o=e.dimensions.map(function(k){return k.model.dimensionInd}),s=t.map(function(k){return k.x}),l=t.map(function(k){return k.width}),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(k){var D=k.categoryInds.map(function(P,R){return n[R][P]}),F=o.map(function(P){return D[P]});return F}u.sort(function(k,D){var F=f(k),P=f(D);return e.sortpaths==="backward"&&(F.reverse(),P.reverse()),F.push(k.valueInds[0]),P.push(D.valueInds[0]),e.bundlecolors&&(F.unshift(k.rawColor),P.unshift(D.rawColor)),Hhr(F,P)});for(var h=new Array(u.length),d=t[0].model.count,p=t[0].categories.map(function(k){return k.height}).reduce(function(k,D){return k+D}),v=0;v<u.length;v++){var m=u[v],g;d>0?g=p*(m.count/d):g=0;for(var w=new Array(i.length),b=0;b<m.categoryInds.length;b++){var _=m.categoryInds[b],M=n[b][_],x=a[b];w[x]=i[x][M],i[x][M]+=g;var T=e.dimensions[x].categories[M],A=T.bands.length,y=T.bands[A-1];if(y===void 0||m.rawColor!==y.rawColor){var E=y===void 0?0:y.y+y.height;T.bands.push({key:E,color:m.color,rawColor:m.rawColor,height:g,width:T.width,count:m.count,y:E,categoryViewModel:T,parcatsViewModel:e})}else{var S=T.bands[A-1];S.height+=g,S.count+=m.count}}var C;e.pathShape==="hspline"?C=KKe(s,w,l,g,.5):C=KKe(s,w,l,g,0),h[v]={key:m.valueInds[0],model:m,height:g,leftXs:s,topYs:w,dimWidths:l,svgD:C,parcatsViewModel:e}}e.paths=h}function Ste(e){var t=e.model.dimensions.map(function(o){return{displayInd:o.displayInd,dimensionInd:o.dimensionInd}});t.sort(function(o,s){return o.displayInd-s.displayInd});var r=[];for(var i in t){var n=t[i].dimensionInd,a=e.model.dimensions[n];r.push(o0r(e,a))}e.dimensions=r}function o0r(e,t){var r=40,i=16,n=e.model.dimensions.length,a=t.displayInd,o,s,l;n>1?o=(e.width-2*r-i)/(n-1):o=0,s=r,l=s+o*a;var u=[],c=e.model.maxCats,f=t.categories.length,h=8,d=t.count,p=e.height-h*(c-1),v,m,g,w,b,_=(c-f)*h/2,M=t.categories.map(function(x){return{displayInd:x.displayInd,categoryInd:x.categoryInd}});for(M.sort(function(x,T){return x.displayInd-T.displayInd}),b=0;b<f;b++)w=M[b].categoryInd,m=t.categories[w],d>0?v=m.count/d*p:v=0,g={key:m.valueInds[0],model:m,width:i,height:v,y:m.dragY!==null?m.dragY:_,bands:[],parcatsViewModel:e},_=_+v+h,u.push(g);return{key:t.dimensionInd,x:t.dragX!==null?t.dragX:l,y:0,width:i,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}});var Ete=W((gXr,aJe)=>{"use strict";var s0r=nJe();aJe.exports=function(t,r,i,n){var a=t._fullLayout,o=a._paper,s=a._size;s0r(t,o,r,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},i,n)}});var sJe=W(az=>{"use strict";var l0r=_c().getModuleCalcData,u0r=Ete(),oJe="parcats";az.name=oJe;az.plot=function(e,t,r,i){var n=l0r(e.calcdata,oJe);if(n.length){var a=n[0];u0r(e,a,r,i)}};az.clean=function(e,t,r,i){var n=i._has&&i._has("parcats"),a=t._has&&t._has("parcats");n&&!a&&i._paperdiv.selectAll(".parcats").remove()}});var uJe=W((yXr,lJe)=>{"use strict";lJe.exports={attributes:gte(),supplyDefaults:WKe(),calc:XKe(),plot:Ete(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:sJe(),categories:["noOpacity"],meta:{}}});var fJe=W((xXr,cJe)=>{"use strict";cJe.exports=uJe()});var dJe=W((_Xr,hJe)=>{"use strict";hJe.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"}});var vJe=W((bXr,pJe)=>{"use strict";pJe.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"}}]}});var V2=W((wXr,_Je)=>{"use strict";var c0r=(qx(),Go(Bx)).default,f0r=dJe(),h0r=vJe(),d0r='\xA9 <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',gJe="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",mJe="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",oz="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",p0r="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",v0r="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",g0r="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",xJe={basic:oz,streets:oz,outdoors:oz,light:gJe,dark:mJe,satellite:h0r,"satellite-streets":f0r,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:d0r,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":gJe,"carto-darkmatter":mJe,"carto-voyager":oz,"carto-positron-nolabels":p0r,"carto-darkmatter-nolabels":v0r,"carto-voyager-nolabels":g0r},yJe=c0r(xJe);_Je.exports={styleValueDflt:"basic",stylesMap:xJe,styleValuesMap:yJe,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",yJe.join(", "),"or use a tile service."].join(`
`),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}});var JE=W((TXr,MJe)=>{"use strict";var bJe=it(),wJe=ni().defaultLine,m0r=us().attributes,y0r=Ho(),x0r=Ns().textposition,_0r=ls().overrideAll,b0r=Da().templatedArray,TJe=V2(),AJe=y0r({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});AJe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var w0r=MJe.exports=_0r({_arrayAttrRegexps:[bJe.counterRegex("map",".layers",!0)],domain:m0r({name:"map"}),style:{valType:"any",values:TJe.styleValuesMap,dflt:TJe.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},fitbounds:{valType:"enumerated",values:[!1,"locations"],dflt:"locations"},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:b0r("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:wJe},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:wJe}},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:AJe,textposition:bJe.extendFlat({},x0r,{arrayOk:!1})}})},"plot","from-root");w0r.uirevision={valType:"any",editType:"none"}});var sz=W((AXr,CJe)=>{"use strict";var{hovertemplateAttrs:T0r,texttemplateAttrs:A0r,templatefallbackAttrs:SJe}=Ga(),M0r=g1(),QE=I4(),nT=Ns(),EJe=JE(),S0r=Wa(),E0r=Eo(),Lb=tn().extendFlat,k0r=ls().overrideAll,C0r=JE(),kJe=QE.line,aT=QE.marker;CJe.exports=k0r({lon:QE.lon,lat:QE.lat,cluster:{enabled:{valType:"boolean"},maxzoom:Lb({},C0r.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:Lb({},aT.opacity,{dflt:1})},mode:Lb({},nT.mode,{dflt:"markers"}),text:Lb({},nT.text,{}),texttemplate:A0r({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:SJe({editType:"plot"}),hovertext:Lb({},nT.hovertext,{}),line:{color:kJe.color,width:kJe.width},connectgaps:nT.connectgaps,marker:Lb({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:aT.opacity,size:aT.size,sizeref:aT.sizeref,sizemin:aT.sizemin,sizemode:aT.sizemode},E0r("marker")),fill:QE.fill,fillcolor:M0r(),textfont:EJe.layers.symbol.textfont,textposition:EJe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:nT.selected.marker},unselected:{marker:nT.unselected.marker},hoverinfo:Lb({},S0r.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:T0r(),hovertemplatefallback:SJe()},"calc","nested")});var kte=W((MXr,DJe)=>{"use strict";var D0r=["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"];DJe.exports={isSupportedFont:function(e){return D0r.indexOf(e)!==-1}}});var PJe=W((SXr,LJe)=>{"use strict";var ek=it(),Cte=$o(),F0r=bd(),L0r=jp(),P0r=$p(),I0r=y1(),FJe=sz(),R0r=kte().isSupportedFont;LJe.exports=function(t,r,i,n){function a(g,w){return ek.coerce(t,r,FJe,g,w)}function o(g,w){return ek.coerce2(t,r,FJe,g,w)}var s=z0r(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("texttemplatefallback"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode"),a("below"),Cte.hasMarkers(r)){F0r(t,r,i,n,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var l=r.marker;l.symbol!=="circle"&&(ek.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),ek.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}Cte.hasLines(r)&&(L0r(t,r,i,n,a,{noDash:!0}),a("connectgaps"));var u=o("cluster.maxzoom"),c=o("cluster.step"),f=o("cluster.color",r.marker&&r.marker.color||i),h=o("cluster.size"),d=o("cluster.opacity"),p=u!==!1||c!==!1||f!==!1||h!==!1||d!==!1,v=a("cluster.enabled",p);if(v||Cte.hasText(r)){var m=n.font.family;P0r(t,r,n,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:R0r(m)?m:"Open Sans Regular",weight:n.font.weight,style:n.font.style,size:n.font.size,color:n.font.color}})}a("fill"),r.fill!=="none"&&I0r(t,r,i,a),ek.coerceSelectionMarkerOpacity(r,a)};function z0r(e,t,r){var i=r("lon")||[],n=r("lat")||[],a=Math.min(i.length,n.length);return t._length=a,a}});var Dte=W((EXr,RJe)=>{"use strict";var IJe=ji();RJe.exports=function(t,r,i){var n={},a=i[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return n.lonLabel=IJe.tickText(o,o.c2l(s[0]),!0).text,n.latLabel=IJe.tickText(o,o.c2l(s[1]),!0).text,n}});var Fte=W((kXr,BJe)=>{"use strict";var zJe=it();BJe.exports=function(t,r){var i=t.split(" "),n=i[0],a=i[1],o=zJe.isArrayOrTypedArray(r)?zJe.mean(r):r,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(n){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l;break}switch(a){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join("-"):u[0]?f=u[0]:u[1]?f=u[1]:f="center",{anchor:f,offset:c}}});var GJe=W((CXr,VJe)=>{"use strict";var NJe=sn(),Lc=it(),B0r=Kn().BADNUM,uz=dE(),qJe=Jo(),q0r=Ji(),O0r=fA(),cz=$o(),N0r=kte().isSupportedFont,U0r=Fte(),V0r=Kf().appendArrayPointValue,G0r=uo().NEWLINES,H0r=uo().BR_TAG_ALL;VJe.exports=function(t,r){var i=r[0].trace,n=i.visible===!0&&i._length!==0,a=i.fill!=="none",o=cz.hasLines(i),s=cz.hasMarkers(i),l=cz.hasText(i),u=s&&i.marker.symbol==="circle",c=s&&i.marker.symbol!=="circle",f=i.cluster&&i.cluster.enabled,h=lz("fill"),d=lz("line"),p=lz("circle"),v=lz("symbol"),m={fill:h,line:d,circle:p,symbol:v};if(!n)return m;var g;if((a||o)&&(g=uz.calcTraceToLineCoords(r)),a&&(h.geojson=uz.makePolygon(g),h.layout.visibility="visible",Lc.extendFlat(h.paint,{"fill-color":i.fillcolor})),o&&(d.geojson=uz.makeLine(g),d.layout.visibility="visible",Lc.extendFlat(d.paint,{"line-width":i.line.width,"line-color":i.line.color,"line-opacity":i.opacity})),u){var w=j0r(r);p.geojson=w.geojson,p.layout.visibility="visible",f&&(p.filter=["!",["has","point_count"]],m.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":Pte(i.cluster.color,i.cluster.step),"circle-radius":Pte(i.cluster.size,i.cluster.step),"circle-opacity":Pte(i.cluster.opacity,i.cluster.step)}},m.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":OJe(i),"text-size":12}}),Lc.extendFlat(p.paint,{"circle-color":w.mcc,"circle-radius":w.mrc,"circle-opacity":w.mo})}if(u&&f&&(p.filter=["!",["has","point_count"]]),(c||l)&&(v.geojson=$0r(r,t),Lc.extendFlat(v.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),c&&(Lc.extendFlat(v.layout,{"icon-size":i.marker.size/10}),"angle"in i.marker&&i.marker.angle!=="auto"&&Lc.extendFlat(v.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),v.layout["icon-allow-overlap"]=i.marker.allowoverlap,Lc.extendFlat(v.paint,{"icon-opacity":i.opacity*i.marker.opacity,"icon-color":i.marker.color,"icon-halo-color":i.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),l)){var b=(i.marker||{}).size,_=U0r(i.textposition,b);Lc.extendFlat(v.layout,{"text-size":i.textfont.size,"text-anchor":_.anchor,"text-offset":_.offset,"text-font":OJe(i)}),Lc.extendFlat(v.paint,{"text-color":i.textfont.color,"text-opacity":i.opacity})}return m};function lz(e){return{type:e,geojson:uz.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function j0r(e){var t=e[0].trace,r=t.marker,i=t.selectedpoints,n=Lc.isArrayOrTypedArray(r.color),a=Lc.isArrayOrTypedArray(r.size),o=Lc.isArrayOrTypedArray(r.opacity),s;function l(b){return t.opacity*b}function u(b){return b/2}var c;n&&(qJe.hasColorscale(t,"marker")?c=qJe.makeColorScaleFuncFromTrace(r):c=Lc.identity);var f;a&&(f=O0r(t));var h;o&&(h=function(b){var _=NJe(b)?+Lc.constrain(b,0,1):0;return l(_)});var d=[];for(s=0;s<e.length;s++){var p=e[s],v=p.lonlat;if(!UJe(v)){var m={};c&&(m.mcc=p.mcc=c(p.mc)),f&&(m.mrc=p.mrc=f(p.ms)),h&&(m.mo=h(p.mo)),i&&(m.selected=p.selected||0),d.push({type:"Feature",id:s+1,geometry:{type:"Point",coordinates:v},properties:m})}}var g;if(i)for(g=q0r.makeSelectedPointStyleFns(t),s=0;s<d.length;s++){var w=d[s].properties;g.selectedOpacityFn&&(w.mo=l(g.selectedOpacityFn(w))),g.selectedColorFn&&(w.mcc=g.selectedColorFn(w)),g.selectedSizeFn&&(w.mrc=g.selectedSizeFn(w))}return{geojson:{type:"FeatureCollection",features:d},mcc:n||g&&g.selectedColorFn?{type:"identity",property:"mcc"}:r.color,mrc:a||g&&g.selectedSizeFn?{type:"identity",property:"mrc"}:u(r.size),mo:o||g&&g.selectedOpacityFn?{type:"identity",property:"mo"}:l(r.opacity)}}function $0r(e,t){for(var r=t._fullLayout,i=e[0].trace,n=i.marker||{},a=n.symbol,o=n.angle,s=a!=="circle"?Lte(a):fz,l=o!=="auto"?Lte(o,!0):fz,u=cz.hasText(i)?Lte(i.text):fz,c=[],f=0;f<e.length;f++){var h=e[f];if(!UJe(h.lonlat)){var d=i.texttemplate,p;if(d){var v=Array.isArray(d)?d[f]||"":d,m=i._module.formatLabels(h,i,r),g={};V0r(g,i,h.i),p=Lc.texttemplateString({data:[g,h,i._meta],fallback:i.texttemplatefallback,labels:m,locale:r._d3locale,template:v})}else p=u(f);p&&(p=p.replace(G0r,"").replace(H0r,`
`)),c.push({type:"Feature",geometry:{type:"Point",coordinates:h.lonlat},properties:{symbol:s(f),angle:l(f),text:p}})}}return{type:"FeatureCollection",features:c}}function Lte(e,t){return Lc.isArrayOrTypedArray(e)?t?function(r){return NJe(e[r])?+e[r]:0}:function(r){return e[r]}:e?function(){return e}:fz}function fz(){return""}function UJe(e){return e[0]===B0r}function Pte(e,t){var r;if(Lc.isArrayOrTypedArray(e)&&Lc.isArrayOrTypedArray(t)){r=["step",["get","point_count"],e[0]];for(var i=1;i<e.length;i++)r.push(t[i-1],e[i])}else r=e;return r}function OJe(e){var t=e.textfont,r=t.family,i=t.style,n=t.weight,a=r.split(" "),o=a[a.length-1]==="Italic";o&&a.pop(),o=o||i==="italic";var s=a.join(" ");n==="bold"&&a.indexOf("Bold")===-1?s+=" Bold":n<=1e3&&(a[0]==="Metropolis"?(s="Metropolis",n>850?s+=" Black":n>750?s+=" Extra Bold":n>650?s+=" Bold":n>550?s+=" Semi Bold":n>450?s+=" Medium":n>350?s+=" Regular":n>250?s+=" Light":n>150?s+=" Extra Light":s+=" Thin"):a.slice(0,2).join(" ")==="Open Sans"?(s="Open Sans",n>750?s+=" Extrabold":n>650?s+=" Bold":n>550?s+=" Semibold":n>350?s+=" Regular":s+=" Light"):a.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(s="Klokantech Noto Sans",a[3]==="CJK"&&(s+=" CJK"),s+=n>500?" Bold":" Regular")),o&&(s+=" Italic"),s==="Open Sans Regular Italic"?s="Open Sans Italic":s==="Open Sans Regular Bold"?s="Open Sans Bold":s==="Open Sans Regular Bold Italic"?s="Open Sans Bold Italic":s==="Klokantech Noto Sans Regular Italic"&&(s="Klokantech Noto Sans Italic"),N0r(s)||(s=r);var l=s.split(", ");return l}});var WJe=W((DXr,$Je)=>{"use strict";var W0r=it(),HJe=GJe(),oT=V2().traceLayerPrefix,Gd={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function jJe(e,t,r,i){this.type="scattermap",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=i,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:oT+t+"-fill",line:oT+t+"-line",circle:oT+t+"-circle",symbol:oT+t+"-symbol",cluster:oT+t+"-cluster",clusterCount:oT+t+"-cluster-count"},this.below=null}var tk=jJe.prototype;tk.addSource=function(e,t,r){var i={type:"geojson",data:t.geojson};r&&r.enabled&&W0r.extendFlat(i,{cluster:!0,clusterMaxZoom:r.maxzoom});var n=this.subplot.map.getSource(this.sourceIds[e]);n?n.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],i)};tk.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};tk.addLayer=function(e,t,r){var i={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(i.filter=t.filter);for(var n=this.layerIds[e],a,o=this.subplot.getMapLayers(),s=0;s<o.length;s++)if(o[s].id===n){a=!0;break}a?(this.subplot.setOptions(n,"setLayoutProperty",i.layout),i.layout.visibility==="visible"&&this.subplot.setOptions(n,"setPaintProperty",i.paint)):this.subplot.addLayer(i,r)};tk.update=function(t){var r=t[0].trace,i=this.subplot,n=i.map,a=HJe(i.gd,t),o=i.belowLookup["trace-"+this.uid],s=!!(r.cluster&&r.cluster.enabled),l=!!this.clusterEnabled,u=this;function c(b){b||u.addSource("circle",a.circle,r.cluster);for(var _=Gd.cluster,M=0;M<_.length;M++){var x=_[M],T=a[x];u.addLayer(x,T,o)}}function f(b){for(var _=Gd.cluster,M=_.length-1;M>=0;M--){var x=_[M];n.removeLayer(u.layerIds[x])}b||n.removeSource(u.sourceIds.circle)}function h(b){for(var _=Gd.nonCluster,M=0;M<_.length;M++){var x=_[M],T=a[x];b||u.addSource(x,T),u.addLayer(x,T,o)}}function d(b){for(var _=Gd.nonCluster,M=_.length-1;M>=0;M--){var x=_[M];n.removeLayer(u.layerIds[x]),b||n.removeSource(u.sourceIds[x])}}function p(b){l?f(b):d(b)}function v(b){s?c(b):h(b)}function m(){for(var b=s?Gd.cluster:Gd.nonCluster,_=0;_<b.length;_++){var M=b[_],x=a[M];x&&(i.setOptions(u.layerIds[M],"setLayoutProperty",x.layout),x.layout.visibility==="visible"&&(M!=="cluster"&&u.setSourceData(M,x),i.setOptions(u.layerIds[M],"setPaintProperty",x.paint)))}}var g=this.isHidden,w=r.visible!==!0;w?g||p():g?w||v():l!==s?(p(),v()):(this.below!==o&&(p(!0),v(!0)),m()),this.clusterEnabled=s,this.isHidden=w,this.below=o,t[0].trace._glTrace=this};tk.dispose=function(){for(var t=this.subplot.map,r=this.clusterEnabled?Gd.cluster:Gd.nonCluster,i=r.length-1;i>=0;i--){var n=r[i];t.removeLayer(this.layerIds[n]),t.removeSource(this.sourceIds[n])}};$Je.exports=function(t,r){var i=r[0].trace,n=i.cluster&&i.cluster.enabled,a=i.visible!==!0,o=new jJe(t,i.uid,n,a),s=HJe(t.gd,r),l=o.below=t.belowLookup["trace-"+i.uid],u,c,f;if(n)for(o.addSource("circle",s.circle,i.cluster),u=0;u<Gd.cluster.length;u++)c=Gd.cluster[u],f=s[c],o.addLayer(c,f,l);else for(u=0;u<Gd.nonCluster.length;u++)c=Gd.nonCluster[u],f=s[c],o.addSource(c,f,i.cluster),o.addLayer(c,f,l);return r[0].trace._glTrace=o,o}});var hz=W((FXr,XJe)=>{"use strict";var Y0r=Ds(),Ite=it(),X0r=Xw(),Z0r=Ite.fillText,K0r=Kn().BADNUM,J0r=V2().traceLayerPrefix;function Q0r(e,t,r){var i=e.cd,n=i[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=J0r+n.uid+"-circle",c=n.cluster&&n.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(A){return A.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,p=t-d;function v(A){var y=A.lonlat;if(y[0]===K0r||c&&l.indexOf(A.i+1)===-1)return 1/0;var E=Ite.modHalf(y[0],360),S=y[1],C=s.project([E,S]),k=C.x-a.c2p([p,S]),D=C.y-o.c2p([E,r]),F=Math.max(3,A.mrc||0);return Math.max(Math.sqrt(k*k+D*D)-F,1-3/F)}if(Y0r.getClosest(i,v,e),e.index!==!1){var m=i[e.index],g=m.lonlat,w=[Ite.modHalf(g[0],360)+d,g[1]],b=a.c2p(w),_=o.c2p(w),M=m.mrc||1;e.x0=b-M,e.x1=b+M,e.y0=_-M,e.y1=_+M;var x={};x[n.subplot]={_subplot:s};var T=n._module.formatLabels(m,n,x);return e.lonLabel=T.lonLabel,e.latLabel=T.latLabel,e.color=X0r(n,m),e.extraText=YJe(n,m,i[0].t.labels),e.hovertemplate=n.hovertemplate,[e]}}function YJe(e,t,r){if(e.hovertemplate)return;var i=t.hi||e.hoverinfo,n=i.split("+"),a=n.indexOf("all")!==-1,o=n.indexOf("lon")!==-1,s=n.indexOf("lat")!==-1,l=t.lonlat,u=[];function c(f){return f+"\xB0"}return a||o&&s?u.push("("+c(l[1])+", "+c(l[0])+")"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(a||n.indexOf("text")!==-1)&&Z0r(t,e,u),u.join("<br>")}XJe.exports={hoverPoints:Q0r,getExtraText:YJe}});var KJe=W((LXr,ZJe)=>{"use strict";ZJe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var QJe=W((PXr,JJe)=>{"use strict";var edr=it(),tdr=$o(),{BADNUM:rdr}=Kn(),dz=360,Rte=.001,pz=(e,t,r,i)=>[e.c2p([r,i]),t.c2p([r,i])];function idr(e,t,r,i,n){let a=pz(e,t,r+dz,i),o=pz(e,t,r-dz,i),s=a[0]-n[0],l=a[1]-n[1],u=Math.abs(s-(n[0]-o[0]))<Rte&&Math.abs(l-(n[1]-o[1]))<Rte;return{dx:s,dy:l,uniform:u}}function ndr(e,t,r){let i=-1/0,n=1/0,a=(o,s,l)=>{if(Math.abs(o)<Rte)return;let u=s/o,c=l/o;i=Math.max(i,Math.min(u,c)),n=Math.min(n,Math.max(u,c))};return a(e.dx,r.xmin-t[0],r.xmax-t[0]),a(e.dy,r.ymin-t[1],r.ymax-t[1]),!isFinite(i)||!isFinite(n)||i>n?null:[Math.floor(i)-1,Math.ceil(n)+1]}JJe.exports=function(t,r){var c;let{cd:i,xaxis:n,yaxis:a}=t,{trace:o}=i[0];if(!tdr.hasMarkers(o))return[];if(r===!1){for(let f of i)f.selected=0;return[]}let s=(c=n._subplot)==null?void 0:c.map,l=!!(s!=null&&s.getRenderWorldCopies())&&r.xmax>r.xmin,u=[];for(let f=0;f<i.length;f++){let h=i[f],[d,p]=h.lonlat;if(d===rdr)continue;let v=edr.modHalf(d,dz),m=pz(n,a,v,p),g=!1;if(l){let w=idr(n,a,v,p,m),b=ndr(w,m,r);for(let _=b?b[0]:0;b&&_<=b[1]&&!g;_++){let M=w.uniform?[m[0]+_*w.dx,m[1]+_*w.dy]:pz(n,a,v+_*dz,p);g=r.contains(M,null,f,t)}}else g=r.contains(m,null,f,t);g?(u.push({pointNumber:f,lon:d,lat:p}),h.selected=1):h.selected=0}return u}});function tr(e,t){this.x=e,this.y=t}function fdr(e,t,r,i){let n=3*e,a=3*(r-e)-n,o=1-n-a,s=3*t,l=3*(i-t)-s,u=1-s-l;return function(c,f=1e-6){if(c<=0)return 0;if(c>=1)return 1;let h=c;for(let v=0;v<8;v++){let m=((o*h+a)*h+n)*h-c;if(Math.abs(m)<f)return((u*h+l)*h+s)*h;let g=(3*o*h+2*a)*h+n;if(Math.abs(g)<1e-6)break;h-=m/g}let d=0,p=1;h=c;for(let v=0;v<20;v++){let m=((o*h+a)*h+n)*h;if(Math.abs(m-c)<f)break;c>m?d=h:p=h,h=(d+p)*.5}return((u*h+l)*h+s)*h}}function nB(){return vz!=null||(vz=typeof OffscreenCanvas<"u"&&!!new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),vz}function fie(){if(gz==null&&(gz=!1,nB())){let e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let r=0;r<25;r++){let i=r*4;e.fillStyle=`rgb(${i},${i+1},${i+2})`,e.fillRect(r%5,Math.floor(r/5),1,1)}let t=e.getImageData(0,0,5,5).data;for(let r=0;r<100;r++)if(r%4!=3&&t[r]!==r){gz=!0;break}}}return gz||!1}function hie(){var e=new Nu(9);return Nu!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function hdr(e){var t=e[0],r=e[1],i=e[2],n=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8];return t*(u*a-o*l)+r*(-u*n+o*s)+i*(l*n-a*s)}function Det(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=0,e[3]=-r,e[4]=i,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function ddr(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=r+r,s=i+i,l=n+n,u=r*o,c=i*o,f=i*s,h=n*o,d=n*s,p=n*l,v=a*o,m=a*s,g=a*l;return e[0]=1-f-p,e[3]=c-g,e[6]=h+m,e[1]=c+g,e[4]=1-u-p,e[7]=d-v,e[2]=h-m,e[5]=d+v,e[8]=1-u-f,e}function Em(){var e=new Nu(16);return Nu!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function aB(e){var t=new Nu(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function Fet(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Qd(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Bk(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],p=t[12],v=t[13],m=t[14],g=t[15],w=r*s-i*o,b=r*l-n*o,_=r*u-a*o,M=i*l-n*s,x=i*u-a*s,T=n*u-a*l,A=c*v-f*p,y=c*m-h*p,E=c*g-d*p,S=f*m-h*v,C=f*g-d*v,k=h*g-d*m,D=w*k-b*C+_*S+M*E-x*y+T*A;return D?(D=1/D,e[0]=(s*k-l*C+u*S)*D,e[1]=(n*C-i*k-a*S)*D,e[2]=(v*T-m*x+g*M)*D,e[3]=(h*x-f*T-d*M)*D,e[4]=(l*E-o*k-u*y)*D,e[5]=(r*k-n*E+a*y)*D,e[6]=(m*_-p*T-g*b)*D,e[7]=(c*T-h*_+d*b)*D,e[8]=(o*C-s*E+u*A)*D,e[9]=(i*E-r*C-a*A)*D,e[10]=(p*x-v*_+g*w)*D,e[11]=(f*_-c*x-d*w)*D,e[12]=(s*y-o*S-l*A)*D,e[13]=(r*S-i*y+n*A)*D,e[14]=(v*b-p*M-m*w)*D,e[15]=(c*M-f*b+h*w)*D,e):null}function Yb(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],h=t[9],d=t[10],p=t[11],v=t[12],m=t[13],g=t[14],w=t[15],b=r[0],_=r[1],M=r[2],x=r[3];return e[0]=b*i+_*s+M*f+x*v,e[1]=b*n+_*l+M*h+x*m,e[2]=b*a+_*u+M*d+x*g,e[3]=b*o+_*c+M*p+x*w,b=r[4],_=r[5],M=r[6],x=r[7],e[4]=b*i+_*s+M*f+x*v,e[5]=b*n+_*l+M*h+x*m,e[6]=b*a+_*u+M*d+x*g,e[7]=b*o+_*c+M*p+x*w,b=r[8],_=r[9],M=r[10],x=r[11],e[8]=b*i+_*s+M*f+x*v,e[9]=b*n+_*l+M*h+x*m,e[10]=b*a+_*u+M*d+x*g,e[11]=b*o+_*c+M*p+x*w,b=r[12],_=r[13],M=r[14],x=r[15],e[12]=b*i+_*s+M*f+x*v,e[13]=b*n+_*l+M*h+x*m,e[14]=b*a+_*u+M*d+x*g,e[15]=b*o+_*c+M*p+x*w,e}function eu(e,t,r){var i=r[0],n=r[1],a=r[2],o,s,l,u,c,f,h,d,p,v,m,g;return t===e?(e[12]=t[0]*i+t[4]*n+t[8]*a+t[12],e[13]=t[1]*i+t[5]*n+t[9]*a+t[13],e[14]=t[2]*i+t[6]*n+t[10]*a+t[14],e[15]=t[3]*i+t[7]*n+t[11]*a+t[15]):(o=t[0],s=t[1],l=t[2],u=t[3],c=t[4],f=t[5],h=t[6],d=t[7],p=t[8],v=t[9],m=t[10],g=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=h,e[7]=d,e[8]=p,e[9]=v,e[10]=m,e[11]=g,e[12]=o*i+c*n+p*a+t[12],e[13]=s*i+f*n+v*a+t[13],e[14]=l*i+h*n+m*a+t[14],e[15]=u*i+d*n+g*a+t[15]),e}function Rc(e,t,r){var i=r[0],n=r[1],a=r[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Xb(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*n+u*i,e[5]=o*n+c*i,e[6]=s*n+f*i,e[7]=l*n+h*i,e[8]=u*n-a*i,e[9]=c*n-o*i,e[10]=f*n-s*i,e[11]=h*n-l*i,e}function die(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n-u*i,e[1]=o*n-c*i,e[2]=s*n-f*i,e[3]=l*n-h*i,e[8]=a*i+u*n,e[9]=o*i+c*n,e[10]=s*i+f*n,e[11]=l*i+h*n,e}function km(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],h=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n+u*i,e[1]=o*n+c*i,e[2]=s*n+f*i,e[3]=l*n+h*i,e[4]=u*n-a*i,e[5]=c*n-o*i,e[6]=f*n-s*i,e[7]=h*n-l*i,e}function Let(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function pdr(e,t,r,i,n){var a=1/Math.tan(t/2);if(e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,n!=null&&n!==1/0){var o=1/(i-n);e[10]=(n+i)*o,e[14]=2*n*i*o}else e[10]=-1,e[14]=-2*i;return e}function vdr(e,t,r,i,n,a,o){var s=1/(t-r),l=1/(i-n),u=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(n+i)*l,e[14]=(o+a)*u,e[15]=1,e}function Pet(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function Iet(e,t){var r=e[0],i=e[1],n=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=e[9],h=e[10],d=e[11],p=e[12],v=e[13],m=e[14],g=e[15],w=t[0],b=t[1],_=t[2],M=t[3],x=t[4],T=t[5],A=t[6],y=t[7],E=t[8],S=t[9],C=t[10],k=t[11],D=t[12],F=t[13],P=t[14],R=t[15];return Math.abs(r-w)<=1e-6*Math.max(1,Math.abs(r),Math.abs(w))&&Math.abs(i-b)<=1e-6*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(n-_)<=1e-6*Math.max(1,Math.abs(n),Math.abs(_))&&Math.abs(a-M)<=1e-6*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(o-x)<=1e-6*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(s-T)<=1e-6*Math.max(1,Math.abs(s),Math.abs(T))&&Math.abs(l-A)<=1e-6*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(u-y)<=1e-6*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(c-E)<=1e-6*Math.max(1,Math.abs(c),Math.abs(E))&&Math.abs(f-S)<=1e-6*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-C)<=1e-6*Math.max(1,Math.abs(h),Math.abs(C))&&Math.abs(d-k)<=1e-6*Math.max(1,Math.abs(d),Math.abs(k))&&Math.abs(p-D)<=1e-6*Math.max(1,Math.abs(p),Math.abs(D))&&Math.abs(v-F)<=1e-6*Math.max(1,Math.abs(v),Math.abs(F))&&Math.abs(m-P)<=1e-6*Math.max(1,Math.abs(m),Math.abs(P))&&Math.abs(g-R)<=1e-6*Math.max(1,Math.abs(g),Math.abs(R))}function Ret(){var e=new Nu(3);return Nu!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function sB(e){var t=new Nu(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function K1(e){var t=e[0],r=e[1],i=e[2];return Math.sqrt(t*t+r*r+i*i)}function eQe(e,t,r){var i=new Nu(3);return i[0]=e,i[1]=t,i[2]=r,i}function R0(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function pie(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function Ps(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function qk(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e}function zet(e,t){var r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+i*i+n*n)}function Bet(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function Pf(e,t){var r=t[0],i=t[1],n=t[2],a=r*r+i*i+n*n;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e}function gu(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function uh(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[0],s=r[1],l=r[2];return e[0]=n*l-a*s,e[1]=a*o-i*l,e[2]=i*s-n*o,e}function qet(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[3]*i+r[7]*n+r[11]*a+r[15];return o||(o=1),e[0]=(r[0]*i+r[4]*n+r[8]*a+r[12])/o,e[1]=(r[1]*i+r[5]*n+r[9]*a+r[13])/o,e[2]=(r[2]*i+r[6]*n+r[10]*a+r[14])/o,e}function Oet(e,t,r){var i=t[0],n=t[1],a=t[2];return e[0]=i*r[0]+n*r[3]+a*r[6],e[1]=i*r[1]+n*r[4]+a*r[7],e[2]=i*r[2]+n*r[5]+a*r[8],e}function lB(e,t,r){var i=r[0],n=r[1],a=r[2],o=r[3],s=t[0],l=t[1],u=t[2],c=n*u-a*l,f=a*s-i*u,h=i*l-n*s;return c+=c,f+=f,h+=h,e[0]=s+o*c+n*h-a*f,e[1]=l+o*f+a*c-i*h,e[2]=u+o*h+i*f-n*c,e}function PT(e,t,r,i){var n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[0],a[1]=n[1]*Math.cos(i)-n[2]*Math.sin(i),a[2]=n[1]*Math.sin(i)+n[2]*Math.cos(i),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function Zb(e,t,r,i){var n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[2]*Math.sin(i)+n[0]*Math.cos(i),a[1]=n[1],a[2]=n[2]*Math.cos(i)-n[0]*Math.sin(i),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function uB(e,t,r,i){var n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[0]*Math.cos(i)-n[1]*Math.sin(i),a[1]=n[0]*Math.sin(i)+n[1]*Math.cos(i),a[2]=n[2],e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function Net(e){return e[0]=0,e[1]=0,e[2]=0,e}function gdr(){var e=new Nu(4);return Nu!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function mdr(e,t,r,i){var n=new Nu(4);return n[0]=e,n[1]=t,n[2]=r,n[3]=i,n}function ydr(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function Uet(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function xdr(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=r*r+i*i+n*n+a*a;return o>0&&(o=1/Math.sqrt(o)),e[0]=r*o,e[1]=i*o,e[2]=n*o,e[3]=a*o,e}function Uu(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3];return e[0]=r[0]*i+r[4]*n+r[8]*a+r[12]*o,e[1]=r[1]*i+r[5]*n+r[9]*a+r[13]*o,e[2]=r[2]*i+r[6]*n+r[10]*a+r[14]*o,e[3]=r[3]*i+r[7]*n+r[11]*a+r[15]*o,e}function tQe(){var e=new Nu(4);return Nu!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function _dr(e,t,r){r*=.5;var i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function Get(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=r[0],l=r[1],u=r[2],c=r[3];return e[0]=i*c+o*s+n*u-a*l,e[1]=n*c+o*l+a*s-i*u,e[2]=a*c+o*u+i*l-n*s,e[3]=o*c-i*s-n*l-a*u,e}function vk(e,t,r,i){var n=t[0],a=t[1],o=t[2],s=t[3],l=r[0],u=r[1],c=r[2],f=r[3],h,d=n*l+a*u+o*c+s*f,p,v,m;return d<0&&(d=-d,l=-l,u=-u,c=-c,f=-f),1-d>1e-6?(h=Math.acos(d),p=Math.sin(h),v=Math.sin((1-i)*h)/p,m=Math.sin(i*h)/p):(v=1-i,m=i),e[0]=v*n+m*l,e[1]=v*a+m*u,e[2]=v*o+m*c,e[3]=v*s+m*f,e}function bdr(e,t){var r=t[0]+t[4]+t[8],i;if(r>0)i=Math.sqrt(r+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{var n=0;t[4]>t[0]&&(n=1),t[8]>t[n*3+n]&&(n=2);var a=(n+1)%3,o=(n+2)%3;i=Math.sqrt(t[n*3+n]-t[a*3+a]-t[o*3+o]+1),e[n]=.5*i,i=.5/i,e[3]=(t[a*3+o]-t[o*3+a])*i,e[a]=(t[a*3+n]+t[n*3+a])*i,e[o]=(t[o*3+n]+t[n*3+o])*i}return e}function cB(e,t,r,i){var n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",a=Math.PI/360;t*=a,i*=a,r*=a;var o=Math.sin(t),s=Math.cos(t),l=Math.sin(r),u=Math.cos(r),c=Math.sin(i),f=Math.cos(i);switch(n){case"xyz":e[0]=o*u*f+s*l*c,e[1]=s*l*f-o*u*c,e[2]=s*u*c+o*l*f,e[3]=s*u*f-o*l*c;break;case"xzy":e[0]=o*u*f-s*l*c,e[1]=s*l*f-o*u*c,e[2]=s*u*c+o*l*f,e[3]=s*u*f+o*l*c;break;case"yxz":e[0]=o*u*f+s*l*c,e[1]=s*l*f-o*u*c,e[2]=s*u*c-o*l*f,e[3]=s*u*f+o*l*c;break;case"yzx":e[0]=o*u*f+s*l*c,e[1]=s*l*f+o*u*c,e[2]=s*u*c-o*l*f,e[3]=s*u*f-o*l*c;break;case"zxy":e[0]=o*u*f-s*l*c,e[1]=s*l*f+o*u*c,e[2]=s*u*c+o*l*f,e[3]=s*u*f-o*l*c;break;case"zyx":e[0]=o*u*f-s*l*c,e[1]=s*l*f+o*u*c,e[2]=s*u*c-o*l*f,e[3]=s*u*f+o*l*c;break;default:throw Error("Unknown angle order "+n)}return e}function fB(){var e=new Nu(2);return Nu!=Float32Array&&(e[0]=0,e[1]=0),e}function iQe(e,t){var r=new Nu(2);return r[0]=e,r[1]=t,r}function gie(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function mie(e){var t=e[0],r=e[1];return Math.sqrt(t*t+r*r)}function wdr(e){var t=e[0],r=e[1];return t*t+r*r}function Tdr(e,t){return e[0]*t[0]+e[1]*t[1]}function yie(e){return e[0]=0,e[1]=0,e}function Zh(e,t,r){return t*(zr/(e.tileSize*2**(r-e.tileID.overscaledZ)))}function Ic(e){return e instanceof Error?e:Error(typeof e=="string"?e:String(e))}function Cm(){return new Float64Array(4)}function Do(){return new Float64Array(3)}function Q2(){return new Float64Array(16)}function Nk(){let e=new Float64Array(16);return Qd(e),e}function xie(){let e=new Float32Array(16);return Qd(e),e}function Dm(e,t,r,i,n=!1){if(!r[0]&&!r[1])return[0,0];let a=n?i==="map"?-e.bearingInRadians:0:i==="viewport"?e.bearingInRadians:0;if(a){let o=Math.sin(a),s=Math.cos(a);r=[r[0]*s-r[1]*o,r[0]*o+r[1]*s]}return[n?r[0]:Zh(t,r[0],e.zoom),n?r[1]:Zh(t,r[1],e.zoom)]}function hB(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]}function z0(e,t,r){let i=hdr([e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2]]);if(i===0)return null;let n=uh([],[t[0],t[1],t[2]],[r[0],r[1],r[2]]),a=uh([],[r[0],r[1],r[2]],[e[0],e[1],e[2]]),o=uh([],[e[0],e[1],e[2]],[t[0],t[1],t[2]]),s=Ps([],n,-e[3]);return R0(s,s,Ps([],a,-t[3])),R0(s,s,Ps([],o,-r[3])),Ps(s,s,1/i),s}function jet(e,t,r){let i=e[0]*r[0]+e[1]*r[1]+e[2]*r[2],n=t[0]*r[0]+t[1]*r[1]+t[2]*r[2];return n===0?null:(-i-r[3])/n}function Uk(e,t,r,i){let n=Math.sqrt(e*e+t*t),a=Math.sqrt(r*r+i*i);e/=n,t/=n,r/=a,i/=a;let o=e*r+t*i,s=Math.acos(o);return-t*r+e*i>0?s:-s}function Kh(e,t){let r=K2(e,360),i=K2(t,360),n=i-r,a=i>r?n-360:n+360;return Math.abs(n)<Math.abs(a)?n:a}function Vk(e,t){let r=K2(e,Math.PI*2),i=K2(t,Math.PI*2);return Math.min(Math.abs(r-i),Math.abs(r-i+Math.PI*2),Math.abs(r-i-Math.PI*2))}function K2(e,t){return(e%t+t)%t}function Gk(e,t,r,i,n){return Kb(i,n,Jn((e-t)/(r-t),0,1))}function Kb(e,t,r){return e*(1-r)+t*r}function $et(e){let t=1/0,r=1/0,i=-1/0,n=-1/0;for(let a of e)t=Math.min(t,a.x),r=Math.min(r,a.y),i=Math.max(i,a.x),n=Math.max(n,a.y);return[t,r,i,n]}function Wet(e){if(!e.length)return new Set;let t=Math.max(...e.map(l=>l.canonical.z)),r=1/0,i=-1/0,n=1/0,a=-1/0,o=[];for(let l of e){let{x:u,y:c,z:f}=l.canonical,h=2**(t-f),d=u*h,p=c*h;o.push({id:l,x:d,y:p}),d<r&&(r=d),d>i&&(i=d),p<n&&(n=p),p>a&&(a=p)}let s=new Set;for(let l of o)(l.x===r||l.x===i||l.y===n||l.y===a)&&s.add(l.id);return s}function Adr(e){if(e<=0)return 0;if(e>=1)return 1;let t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function dB(e,t,r,i){return fdr(e,t,r,i)}function Jn(e,t,r){return Math.min(r,Math.max(t,e))}function B0(e,t,r){let i=r-t,n=((e-t)%i+i)%i+t;return n===t?r:n}function ln(e,...t){for(let r of t)for(let i in r)e[i]=r[i];return e}function IT(e,t){let r={};for(let i of t)i in e&&(r[i]=e[i]);return r}function _ie(){return Mdr++}function Sdr(e){return Math.log(e)/Math.LN2%1==0}function Yet(e){return e<=1?1:2**Math.ceil(Math.log(e)/Math.LN2)}function If(e){return 2**e}function zc(e){return Math.log(e)/Math.LN2}function Jh(e,t,r){if(t<=0)return e;let i=1/t;return r===void 0||Math.abs(r)<1e-10?Math.round(e*i)/i:(r>0?Math.ceil(e*i-1e-9):Math.floor(e*i+1e-10))/i}function vB(e,t,r){let i={};for(let n in e)i[n]=t.call(r||this,e[n],n,e);return i}function bie(e,t,r){let i={};for(let n in e)t.call(r||this,e[n],n,e)&&(i[n]=e[n]);return i}function _v(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!_v(e[r],t[r]))return!1;return!0}if(typeof e=="object"&&e&&t!==null){if(typeof t!="object"||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(!_v(e[r],t[r]))return!1;return!0}return e===t}function lh(e){return Array.isArray(e)?e.map(lh):typeof e=="object"&&e?vB(e,lh):e}function Ma(e){nQe[e]||(typeof console<"u"&&console.warn(e),nQe[e]=!0)}function Y2(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function Xet(e,t,r,i){let n=t.y-e.y,a=t.x-e.x,o=i.y-r.y,s=i.x-r.x,l=o*a-s*n;if(l===0)return null;let u=e.y-r.y,c=e.x-r.x,f=(s*u-o*c)/l;return new tr(e.x+f*a,e.y+f*n)}function Zet([e,t,r]){return t+=90,t*=Math.PI/180,r*=Math.PI/180,[e*Math.cos(t)*Math.sin(r),e*Math.sin(t)*Math.sin(r),e*Math.cos(r)]}function Hb(e){return typeof WorkerGlobalScope<"u"&&e!==void 0&&e instanceof WorkerGlobalScope}function Ket(e){let t=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,r={};if(e.replace(t,(i,n,a,o)=>{let s=a||o;return r[n]=!s||s.toLowerCase(),""}),r["max-age"]){let i=parseInt(r["max-age"],10);isNaN(i)?delete r["max-age"]:r["max-age"]=i}return r}function Jet(e){if(zte==null){let t=e.navigator?e.navigator.userAgent:null;zte=!!e.safari||!!(t&&(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return zte}function ex(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap}function Edr(e,t,r,i,n){let a=Math.max(-t,0)*4,o=(Math.max(0,r)-r)*i*4+a,s=i*4,l=Math.max(0,t),u=Math.max(0,r),c=Math.min(e.width,t+i),f=Math.min(e.height,r+n);return{rect:{x:l,y:u,width:c-l,height:f-u},layout:[{offset:o,stride:s}]}}function ttt(e,t,r,i,n){return Ki(this,null,function*(){if(typeof VideoFrame>"u")throw Error("VideoFrame not supported");let a=new VideoFrame(e,{timestamp:0});try{let o=a==null?void 0:a.format;if(!o||!(o.startsWith("BGR")||o.startsWith("RGB")))throw Error(`Unrecognized format ${o}`);let s=o.startsWith("BGR"),l=new Uint8ClampedArray(i*n*4);if(yield a.copyTo(l,Edr(e,t,r,i,n)),s)for(let u=0;u<l.length;u+=4){let c=l[u];l[u]=l[u+2],l[u+2]=c}return l}finally{a.close()}})}function Nz(e,t,r,i){return e.addEventListener(t,r,i),{unsubscribe:()=>{e.removeEventListener(t,r,i)}}}function js(e){return e*Math.PI/180}function yv(e){return e/Math.PI*180}function wie(e,t){return e.roll==t.roll&&e.pitch==t.pitch&&e.bearing==t.bearing}function rtt(e){let t=new Float64Array(9);ddr(t,e);let r=yv(-Math.asin(Jn(t[2],-1,1))),i,n;return Math.hypot(t[5],t[8])<.001?(i=0,n=-yv(Math.atan2(t[3],t[4]))):(i=yv(t[5]===0&&t[8]===0?0:Math.atan2(t[5],t[8])),n=yv(t[1]===0&&t[0]===0?0:Math.atan2(t[1],t[0]))),{roll:i,pitch:r+90,bearing:n}}function Tie(e,t,r){let i=iQe(t.x-r.x,t.y-r.y),n=iQe(e.x-r.x,e.y-r.y),a=i[0]*n[1]-i[1]*n[0];return yv(Math.atan2(a,Tdr(i,n)))}function Aie(e,t,r){let i=new Float64Array(4);return cB(i,e,t-90,r),i}function att(e,t){return itt[t]&&"touches"in e}function ott(e,t){var n,a;if(!ntt[t])return!1;let r=e,i=((a=(n=r==null?void 0:r.target)==null?void 0:n.ownerDocument)==null?void 0:a.defaultView)||window;return r instanceof i.MouseEvent||r instanceof i.WheelEvent}function stt(e){return itt[e]||ntt[e]}function Fm(e){return e instanceof Error&&e.name==="AbortError"}function gB(e){if(e.aborted)throw new RT(e.reason)}function Mie(e){return Qh.REGISTERED_PROTOCOLS[e.substring(0,e.indexOf("://"))]}function ltt(e,t){Qh.REGISTERED_PROTOCOLS[e]=t}function utt(e){delete Qh.REGISTERED_PROTOCOLS[e]}function mB(){var e;if(Hb(self))return(e=self.worker)==null?void 0:e.referrer;if(window.location.protocol==="blob:")try{return window.parent.location.href}catch(t){}return window.location.href}function Cdr(e,t){return Ki(this,null,function*(){let r=new Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,cache:e.cache,referrer:mB(),referrerPolicy:e.referrerPolicy,signal:t.signal});e.type==="json"&&!r.headers.has("Accept")&&r.headers.set("Accept","application/json");let i;try{i=yield fetch(r)}catch(o){throw Fm(o)?o:new TT(0,Ic(o).message,e.url,new Blob)}if(!i.ok){let o=yield i.blob();throw new TT(i.status,i.statusText,e.url,o)}let n;n=e.type==="arrayBuffer"||e.type==="image"?i.arrayBuffer():e.type==="json"?i.json():i.text();let a=yield n;return gB(t.signal),{data:a,cacheControl:i.headers.get("Cache-Control"),expires:i.headers.get("Expires"),etag:i.headers.get("ETag")}})}function Ddr(e,t){return new Promise((r,i)=>{var a;let n=new XMLHttpRequest;n.open(e.method||"GET",e.url,!0),(e.type==="arrayBuffer"||e.type==="image")&&(n.responseType="arraybuffer");for(let o in e.headers)n.setRequestHeader(o,e.headers[o]);e.type==="json"&&(n.responseType="text",(a=e.headers)!=null&&a.Accept||n.setRequestHeader("Accept","application/json")),n.withCredentials=e.credentials==="include",n.onerror=()=>{i(Error(n.statusText))},n.onload=()=>{if(!t.signal.aborted)if((n.status>=200&&n.status<300||n.status===0)&&n.response!==null){let o=n.response;if(e.type==="json")try{o=JSON.parse(n.response)}catch(s){i(s);return}r({data:o,cacheControl:n.getResponseHeader("Cache-Control"),expires:n.getResponseHeader("Expires"),etag:n.getResponseHeader("ETag")})}else{let o=new Blob([n.response],{type:n.getResponseHeader("Content-Type")});i(new TT(n.status,n.statusText,e.url,o))}},t.signal.addEventListener("abort",()=>{n.abort(),i(new RT(t.signal.reason))}),n.send(e.body)})}function Eie(e){if(!e||e.startsWith("data:image/"))return!0;if(e.startsWith("blob:")&&(e=e.slice(5),e.startsWith("null")))return!1;if(e.indexOf("://")<=0)return!0;let t=new URL(e),r=window.location;return t.protocol===r.protocol&&t.host===r.host}function oQe(e,t,r){var i;(i=r[e])!=null&&i.includes(t)||(r[e]||(r[e]=[]),r[e].push(t))}function Bte(e,t,r){if(r!=null&&r[e]){let i=r[e].indexOf(t);i!==-1&&r[e].splice(i,1)}}function Lf(e,t){return{kind:"array",itemType:e,N:t}}function ml(e){if(e.kind==="array"){let t=ml(e.itemType);return typeof e.N=="number"?`array<${t}, ${e.N}>`:e.itemType.kind==="value"?"array":`array<${t}>`}return e.kind}function Tk(e,t){if(t.kind==="error")return null;if(e.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!Tk(e.itemType,t.itemType))&&(typeof e.N!="number"||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if(e.kind==="value"){for(let r of Ldr)if(!Tk(r,t))return null}}return`Expected ${ml(e)} but found ${ml(t)} instead.`}function kie(e,t){return t.some(r=>r.kind===e.kind)}function Ub(e,t){return t.some(r=>r==="null"?e===null:r==="array"?Array.isArray(e):r==="object"?e&&!Array.isArray(e)&&typeof e=="object":r===typeof e)}function G2(e,t){return e.kind==="array"&&t.kind==="array"?e.itemType.kind===t.itemType.kind&&typeof e.N=="number":e.kind===t.kind}function mtt(e){return e%=360,e<0&&(e+=360),e}function ytt([e,t,r,i]){e=qte(e),t=qte(t),r=qte(r);let n,a,o=Ote((.2225045*e+.7168786*t+.0606169*r)/1);e===t&&t===r?n=a=o:(n=Ote((.4360747*e+.3850649*t+.1430804*r)/dtt),a=Ote((.0139322*e+.0971045*t+.7141733*r)/ptt));let s=116*o-16;return[s<0?0:s,500*(n-o),200*(o-a),i]}function qte(e){return e<=.04045?e/12.92:((e+.055)/1.055)**2.4}function Ote(e){return e>.008856451679035631?e**(1/3):e/gtt+vtt}function xtt([e,t,r,i]){let n=(e+16)/116,a=isNaN(t)?n:n+t/500,o=isNaN(r)?n:n-r/200;return n=1*Ute(n),a=dtt*Ute(a),o=ptt*Ute(o),[Nte(3.1338561*a-1.6168667*n-.4906146*o),Nte(-.9787684*a+1.9161415*n+.033454*o),Nte(.0719453*a-.2289914*n+1.4052427*o),i]}function Nte(e){return e=e<=.00304?12.92*e:1.055*e**(1/2.4)-.055,e<0?0:e>1?1:e}function Ute(e){return e>Qte?e*e*e:gtt*(e-vtt)}function Rdr(e){let[t,r,i,n]=ytt(e),a=Math.sqrt(r*r+i*i);return[Math.round(a*1e4)?mtt(Math.atan2(i,r)*Idr):NaN,a,t,n]}function zdr([e,t,r,i]){return e=isNaN(e)?0:e*Pdr,xtt([r,Math.cos(e)*t,Math.sin(e)*t,i])}function Bdr([e,t,r,i]){e=mtt(e),t/=100,r/=100;function n(a){let o=(a+e/30)%12,s=t*Math.min(r,1-r);return r-s*Math.max(-1,Math.min(o-3,9-o,1))}return[n(0),n(8),n(4),i]}function gk(e,t){return qdr(e,t)?e[t]:void 0}function Odr(e){if(e=e.toLowerCase().trim(),e==="transparent")return[0,0,0,0];let t=gk(Ndr,e);if(t){let[i,n,a]=t;return[i/255,n/255,a/255,1]}if(e.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(e)){let i=e.length<6?1:2,n=1;return[mz(e.slice(n,n+=i)),mz(e.slice(n,n+=i)),mz(e.slice(n,n+=i)),mz(e.slice(n,n+i)||"ff")]}if(e.startsWith("rgb")){let i=e.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(i){let[n,a,o,s,l,u,c,f,h,d,p,v]=i,m=[s||" ",c||" ",d].join("");if(m===" "||m===" /"||m===",,"||m===",,,"){let g=[o,u,h].join(""),w=g==="%%%"?100:g===""?255:0;if(w){let b=[uT(+a/w,0,1),uT(+l/w,0,1),uT(+f/w,0,1),p?sQe(+p,v):1];if(lQe(b))return b}}return}}let r=e.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(r){let[i,n,a,o,s,l,u,c,f]=r,h=[a||" ",s||" ",u].join("");if(h===" "||h===" /"||h===",,"||h===",,,"){let d=[+n,uT(+o,0,100),uT(+l,0,100),c?sQe(+c,f):1];if(lQe(d))return Bdr(d)}}}function mz(e){return parseInt(e.padEnd(2,e),16)/255}function sQe(e,t){return uT(t?e/100:e,0,1)}function uT(e,t,r){return Math.min(Math.max(t,e),r)}function lQe(e){return!e.some(Number.isNaN)}function X2(e,t,r){return e+r*(t-e)}function AT(e,t,r){return e.map((i,n)=>X2(i,t[n],r))}function Udr(e){return e==="rgb"||e==="hcl"||e==="lab"}function btt(e,t,r,i){return typeof e=="number"&&e>=0&&e<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof r=="number"&&r>=0&&r<=255?i===void 0||typeof i=="number"&&i>=0&&i<=1?null:`Invalid rgba value [${[e,t,r,i].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof i=="number"?[e,t,r,i]:[e,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function MT(e){if(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||e instanceof Lm||e instanceof ea||e instanceof Cie||e instanceof Mm||e instanceof Q1||e instanceof eg||e instanceof Xd||e instanceof X1||e instanceof Z1)return!0;if(Array.isArray(e)){for(let t of e)if(!MT(t))return!1;return!0}if(typeof e=="object"){for(let t in e)if(!MT(e[t]))return!1;return!0}return!1}function Ql(e){if(e===null)return $k;if(typeof e=="string")return la;if(typeof e=="boolean")return La;if(typeof e=="number")return Ei;if(e instanceof ea)return xv;if(e instanceof Lm)return yB;if(e instanceof Cie)return xB;if(e instanceof Mm)return Wk;if(e instanceof Q1)return _B;if(e instanceof eg)return bB;if(e instanceof Xd)return wk;if(e instanceof X1)return wB;if(e instanceof Z1)return Yk;if(Array.isArray(e)){let t=e.length,r;for(let i of e){let n=Ql(i);if(!r)r=n;else{if(r===n)continue;r=ha;break}}return Lf(r||ha,t)}return Nb}function mk(e){let t=typeof e;return e===null?"":t==="string"||t==="number"||t==="boolean"?String(e):e instanceof ea||e instanceof Lm||e instanceof Mm||e instanceof Q1||e instanceof eg||e instanceof Xd||e instanceof X1||e instanceof Z1?e.toString():JSON.stringify(e)}function TB(e,t,r){let i=e.length-1,n=0,a=i,o=0,s,l;for(;n<=a;)if(o=Math.floor((n+a)/2),s=e[o],l=e[o+1],s<=t){if(o===i||t<l)return o;n=o+1}else if(s>t)a=o-1;else throw new al("Input is not a number.",r);return 0}function jdr(e,t,r,i){let n=3*e,a=3*(r-e)-n,o=1-n-a,s=3*t,l=3*(i-t)-s,u=1-s-l;return function(c,f=1e-6){if(c<=0)return 0;if(c>=1)return 1;let h=c;for(let v=0;v<8;v++){let m=((o*h+a)*h+n)*h-c;if(Math.abs(m)<f)return((u*h+l)*h+s)*h;let g=(3*o*h+2*a)*h+n;if(Math.abs(g)<1e-6)break;h-=m/g}let d=0,p=1;h=c;for(let v=0;v<20;v++){let m=((o*h+a)*h+n)*h;if(Math.abs(m-c)<f)break;c>m?d=h:p=h,h=(d+p)*.5}return((u*h+l)*h+s)*h}}function Vte(e,t,r,i){let n=i-r,a=e-r;return n===0?0:t===1?a/n:(t**+a-1)/(t**+n-1)}function Ett(e,t,r=0,i=e.length-1,n=$dr){for(;i>r;){if(i-r>600){let l=i-r+1,u=t-r+1,c=Math.log(l),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1);Ett(e,t,Math.max(r,Math.floor(t-u*f/l+h)),Math.min(i,Math.floor(t+(l-u)*f/l+h)),n)}let a=e[t],o=r,s=i;for(rk(e,r,t),n(e[i],a)>0&&rk(e,r,i);o<s;){for(rk(e,o,s),o++,s--;n(e[o],a)<0;)o++;for(;n(e[s],a)>0;)s--}n(e[r],a)===0?rk(e,r,s):(s++,rk(e,s,i)),s<=t&&(r=s+1),t<=s&&(i=s-1)}}function rk(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function $dr(e,t){return e<t?-1:+(e>t)}function AB(e,t){if(e.length<=1)return[e];let r=[],i,n;for(let a of e){let o=Ydr(a);o!==0&&(a.area=Math.abs(o),n===void 0&&(n=o<0),n===o<0?(i&&r.push(i),i=[a]):i.push(a))}if(i&&r.push(i),t>1)for(let a=0;a<r.length;a++)r[a].length<=t||(Ett(r[a],t,1,r[a].length-1,Wdr),r[a]=r[a].slice(0,t));return r}function Wdr(e,t){return t.area-e.area}function Ydr(e){let t=0;for(let r=0,i=e.length,n=i-1,a,o;r<i;n=r++)a=e[r],o=e[n],t+=(o.x-a.x)*(a.y+o.y);return t}function cQe(e,t){return e==="=="||e==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function tpr(e,t,r){return t===r}function rpr(e,t,r){return t!==r}function ipr(e,t,r){return t<r}function npr(e,t,r){return t>r}function apr(e,t,r){return t<=r}function opr(e,t,r){return t>=r}function Ott(e,t,r,i){return i.compare(t,r)===0}function spr(e,t,r,i){return!Ott(e,t,r,i)}function lpr(e,t,r,i){return i.compare(t,r)<0}function upr(e,t,r,i){return i.compare(t,r)>0}function cpr(e,t,r,i){return i.compare(t,r)<=0}function fpr(e,t,r,i){return i.compare(t,r)>=0}function zT(e,t,r){let i=e!=="=="&&e!=="!=";return class Ntt{constructor(a,o,s,l){this.lhs=a,this.rhs=o,this.key=s,this.collator=l,this.type=La,this.hasUntypedArgument=a.type.kind==="value"||o.type.kind==="value"}static parse(a,o){if(a.length!==3&&a.length!==4)return o.error("Expected two or three arguments.");let s=a[0],l=o.parse(a[1],1,ha);if(!l)return null;if(!cQe(s,l.type))return o.concat(1).error(`"${s}" comparisons are not supported for type '${ml(l.type)}'.`);let u=o.parse(a[2],2,ha);if(!u)return null;if(!cQe(s,u.type))return o.concat(2).error(`"${s}" comparisons are not supported for type '${ml(u.type)}'.`);if(l.type.kind!==u.type.kind&&l.type.kind!=="value"&&u.type.kind!=="value")return o.error(`Cannot compare types '${ml(l.type)}' and '${ml(u.type)}'.`);i&&(l.type.kind==="value"&&u.type.kind!=="value"?l=new _m(u.type,[l],o.key):l.type.kind!=="value"&&u.type.kind==="value"&&(u=new _m(l.type,[u],o.key)));let c=null;if(a.length===4){if(l.type.kind!=="string"&&u.type.kind!=="string"&&l.type.kind!=="value"&&u.type.kind!=="value")return o.error("Cannot use collator to compare non-string types.");if(c=o.parse(a[3],3,xB),!c)return null}return new Ntt(l,u,o.key,c)}evaluate(a){let o=this.lhs.evaluate(a),s=this.rhs.evaluate(a);if(i&&this.hasUntypedArgument){let l=Ql(o),u=Ql(s);if(l.kind!==u.kind||l.kind!=="string"&&l.kind!=="number")throw new al(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${l.kind}, ${u.kind}) instead.`,this.key)}if(this.collator&&!i&&this.hasUntypedArgument){let l=Ql(o),u=Ql(s);if(l.kind!=="string"||u.kind!=="string")return t(a,o,s)}return this.collator?r(a,o,s,this.collator.evaluate(a)):t(a,o,s)}eachChild(a){a(this.lhs),a(this.rhs),this.collator&&a(this.collator)}outputDefined(){return!0}}}function bpr(e,t){let r=wpr(e[0]),i=Apr(e[1]),n=2**t.z;return[Math.round(r*n*Y1),Math.round(i*n*Y1)]}function Fie(e,t){let r=2**t.z,i=(e[0]/Y1+t.x)/r,n=(e[1]/Y1+t.y)/r;return[Tpr(i),Mpr(n)]}function wpr(e){return(180+e)/360}function Tpr(e){return e*360-180}function Apr(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Mpr(e){return 360/Math.PI*Math.atan(Math.exp((180-e*360)*Math.PI/180))-90}function Xk(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function Ak(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function Spr(e,t,r){return t[1]>e[1]!=r[1]>e[1]&&e[0]<(r[0]-t[0])*(e[1]-t[1])/(r[1]-t[1])+t[0]}function Epr(e,t,r){let i=e[0]-t[0],n=e[1]-t[1],a=e[0]-r[0],o=e[1]-r[1];return i*o-a*n===0&&i*a<=0&&n*o<=0}function MB(e,t,r,i){let n=[t[0]-e[0],t[1]-e[1]];return Fpr([i[0]-r[0],i[1]-r[1]],n)!==0&&!!(fQe(e,t,r,i)&&fQe(r,i,e,t))}function kpr(e,t,r){for(let i of r)for(let n=0;n<i.length-1;++n)if(MB(e,t,i[n],i[n+1]))return!0;return!1}function BT(e,t,r=!1){let i=!1;for(let n of t)for(let a=0;a<n.length-1;a++){if(Epr(e,n[a],n[a+1]))return r;Spr(e,n[a],n[a+1])&&(i=!i)}return i}function Cpr(e,t){for(let r of t)if(BT(e,r))return!0;return!1}function $tt(e,t){for(let r of e)if(!BT(r,t))return!1;for(let r=0;r<e.length-1;++r)if(kpr(e[r],e[r+1],t))return!1;return!0}function Dpr(e,t){for(let r of t)if($tt(e,r))return!0;return!1}function Fpr(e,t){return e[0]*t[1]-e[1]*t[0]}function fQe(e,t,r,i){let n=e[0]-r[0],a=e[1]-r[1],o=t[0]-r[0],s=t[1]-r[1],l=i[0]-r[0],u=i[1]-r[1],c=n*u-l*a,f=o*u-l*s;return c>0&&f<0||c<0&&f>0}function Lie(e,t,r){let i=[];for(let n=0;n<e.length;n++){let a=[];for(let o=0;o<e[n].length;o++){let s=bpr(e[n][o],r);Xk(t,s),a.push(s)}i.push(a)}return i}function Wtt(e,t,r){let i=[];for(let n=0;n<e.length;n++){let a=Lie(e[n],t,r);i.push(a)}return i}function Ytt(e,t,r,i){if(e[0]<r[0]||e[0]>r[2]){let n=i*.5,a=e[0]-r[0]>n?-i:r[0]-e[0]>n?i:0;a===0&&(a=e[0]-r[2]>n?-i:r[2]-e[0]>n?i:0),e[0]+=a}Xk(t,e)}function Lpr(e){e[0]=e[1]=1/0,e[2]=e[3]=-1/0}function hQe(e,t,r,i){let n=2**i.z*Y1,a=[i.x*Y1,i.y*Y1],o=[];for(let s of e)for(let l of s){let u=[l.x+a[0],l.y+a[1]];Ytt(u,t,r,n),o.push(u)}return o}function dQe(e,t,r,i){let n=2**i.z*Y1,a=[i.x*Y1,i.y*Y1],o=[];for(let s of e){let l=[];for(let u of s){let c=[u.x+a[0],u.y+a[1]];Xk(t,c),l.push(c)}o.push(l)}if(t[2]-t[0]<=n/2){Lpr(t);for(let s of o)for(let l of s)Ytt(l,t,r,n)}return o}function Ppr(e,t){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=e.canonicalID();if(t.type==="Polygon"){let a=Lie(t.coordinates,i,n),o=hQe(e.geometry(),r,i,n);if(!Ak(r,i))return!1;for(let s of o)if(!BT(s,a))return!1}if(t.type==="MultiPolygon"){let a=Wtt(t.coordinates,i,n),o=hQe(e.geometry(),r,i,n);if(!Ak(r,i))return!1;for(let s of o)if(!Cpr(s,a))return!1}return!0}function Ipr(e,t){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=e.canonicalID();if(t.type==="Polygon"){let a=Lie(t.coordinates,i,n),o=dQe(e.geometry(),r,i,n);if(!Ak(r,i))return!1;for(let s of o)if(!$tt(s,a))return!1}if(t.type==="MultiPolygon"){let a=Wtt(t.coordinates,i,n),o=dQe(e.geometry(),r,i,n);if(!Ak(r,i))return!1;for(let s of o)if(!Dpr(s,a))return!1}return!0}function Ztt(e,t){return t[0]-e[0]}function Vz(e){return e[1]-e[0]+1}function Sm(e,t){return e[1]>=e[0]&&e[1]<t}function are(e,t){if(e[0]>e[1])return[null,null];let r=Vz(e);if(t){if(r===2)return[e,null];let n=Math.floor(r/2);return[[e[0],e[0]+n],[e[0]+n,e[1]]]}if(r===1)return[e,null];let i=Math.floor(r/2)-1;return[[e[0],e[0]+i],[e[0]+i+1,e[1]]]}function ore(e,t){if(!Sm(t,e.length))return[1/0,1/0,-1/0,-1/0];let r=[1/0,1/0,-1/0,-1/0];for(let i=t[0];i<=t[1];++i)Xk(r,e[i]);return r}function sre(e){let t=[1/0,1/0,-1/0,-1/0];for(let r of e)for(let i of r)Xk(t,i);return t}function vQe(e){return e[0]!==-1/0&&e[1]!==-1/0&&e[2]!==1/0&&e[3]!==1/0}function Rie(e,t,r){if(!vQe(e)||!vQe(t))return NaN;let i=0,n=0;return e[2]<t[0]&&(i=t[0]-e[2]),e[0]>t[2]&&(i=e[0]-t[2]),e[1]>t[3]&&(n=e[1]-t[3]),e[3]<t[1]&&(n=t[1]-e[3]),r.distance([0,0],[i,n])}function Bb(e,t,r){let i=r.pointOnLine(t,e);return r.distance(e,i.point)}function zie(e,t,r,i,n){let a=Math.min(Bb(e,[r,i],n),Bb(t,[r,i],n)),o=Math.min(Bb(r,[e,t],n),Bb(i,[e,t],n));return Math.min(a,o)}function Rpr(e,t,r,i,n){if(!(Sm(t,e.length)&&Sm(i,r.length)))return 1/0;let a=1/0;for(let o=t[0];o<t[1];++o){let s=e[o],l=e[o+1];for(let u=i[0];u<i[1];++u){let c=r[u],f=r[u+1];if(MB(s,l,c,f))return 0;a=Math.min(a,zie(s,l,c,f,n))}}return a}function zpr(e,t,r,i,n){if(!(Sm(t,e.length)&&Sm(i,r.length)))return NaN;let a=1/0;for(let o=t[0];o<=t[1];++o)for(let s=i[0];s<=i[1];++s)if(a=Math.min(a,n.distance(e[o],r[s])),a===0)return a;return a}function Bpr(e,t,r){if(BT(e,t,!0))return 0;let i=1/0;for(let n of t){let a=n[0],o=n[n.length-1];if(a!==o&&(i=Math.min(i,Bb(e,[o,a],r)),i===0))return i;let s=r.pointOnLine(n,e);if(i=Math.min(i,r.distance(e,s.point)),i===0)return i}return i}function qpr(e,t,r,i){if(!Sm(t,e.length))return NaN;for(let a=t[0];a<=t[1];++a)if(BT(e[a],r,!0))return 0;let n=1/0;for(let a=t[0];a<t[1];++a){let o=e[a],s=e[a+1];for(let l of r)for(let u=0,c=l.length,f=c-1;u<c;f=u++){let h=l[f],d=l[u];if(MB(o,s,h,d))return 0;n=Math.min(n,zie(o,s,h,d,i))}}return n}function gQe(e,t){for(let r of e)for(let i of r)if(BT(i,t,!0))return!0;return!1}function Opr(e,t,r,i=1/0){let n=sre(e),a=sre(t);if(i!==1/0&&Rie(n,a,r)>=i)return i;if(Ak(n,a)){if(gQe(e,t))return 0}else if(gQe(t,e))return 0;let o=1/0;for(let s of e)for(let l=0,u=s.length,c=u-1;l<u;c=l++){let f=s[c],h=s[l];for(let d of t)for(let p=0,v=d.length,m=v-1;p<v;m=p++){let g=d[m],w=d[p];if(MB(f,h,g,w))return 0;o=Math.min(o,zie(f,h,g,w,r))}}return o}function mQe(e,t,r,i,n,a){if(!a)return;let o=Rie(ore(i,a),n,r);o<t&&e.push([o,a,[0,0]])}function xz(e,t,r,i,n,a,o){if(!a||!o)return;let s=Rie(ore(i,a),ore(n,o),r);s<t&&e.push([s,a,o])}function Gz(e,t,r,i,n=1/0){let a=Math.min(i.distance(e[0],r[0][0]),n);if(a===0)return a;let o=new Xtt([[0,[0,e.length-1],[0,0]]],Ztt),s=sre(r);for(;o.length>0;){let l=o.pop();if(l[0]>=a)continue;let u=l[1],c=t?50:100;if(Vz(u)<=c){if(!Sm(u,e.length))return NaN;if(t){let f=qpr(e,u,r,i);if(isNaN(f)||f===0)return f;a=Math.min(a,f)}else for(let f=u[0];f<=u[1];++f){let h=Bpr(e[f],r,i);if(a=Math.min(a,h),a===0)return 0}}else{let f=are(u,t);mQe(o,a,i,e,s,f[0]),mQe(o,a,i,e,s,f[1])}}return a}function Hz(e,t,r,i,n,a=1/0){let o=Math.min(a,n.distance(e[0],r[0]));if(o===0)return o;let s=new Xtt([[0,[0,e.length-1],[0,r.length-1]]],Ztt);for(;s.length>0;){let l=s.pop();if(l[0]>=o)continue;let u=l[1],c=l[2],f=t?50:100,h=i?50:100;if(Vz(u)<=f&&Vz(c)<=h){if(!Sm(u,e.length)&&Sm(c,r.length))return NaN;let d;if(t&&i)d=Rpr(e,u,r,c,n),o=Math.min(o,d);else if(t&&!i){let p=e.slice(u[0],u[1]+1);for(let v=c[0];v<=c[1];++v)if(d=Bb(r[v],p,n),o=Math.min(o,d),o===0)return o}else if(!t&&i){let p=r.slice(c[0],c[1]+1);for(let v=u[0];v<=u[1];++v)if(d=Bb(e[v],p,n),o=Math.min(o,d),o===0)return o}else d=zpr(e,u,r,c,n),o=Math.min(o,d)}else{let d=are(u,t),p=are(c,i);xz(s,o,n,e,r,d[0],p[0]),xz(s,o,n,e,r,d[0],p[1]),xz(s,o,n,e,r,d[1],p[0]),xz(s,o,n,e,r,d[1],p[1])}}return o}function Npr(e,t){let r=e.geometry(),i=r.flat().map(o=>Fie([o.x,o.y],e.canonical));if(r.length===0)return NaN;let n=new Iie(i[0][1]),a=1/0;for(let o of t){switch(o.type){case"Point":a=Math.min(a,Hz(i,!1,[o.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,Hz(i,!1,o.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,Gz(i,!1,o.coordinates,n,a))}if(a===0)return a}return a}function Upr(e,t){let r=e.geometry(),i=r.flat().map(o=>Fie([o.x,o.y],e.canonical));if(r.length===0)return NaN;let n=new Iie(i[0][1]),a=1/0;for(let o of t){switch(o.type){case"Point":a=Math.min(a,Hz(i,!0,[o.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,Hz(i,!0,o.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,Gz(i,!0,o.coordinates,n,a))}if(a===0)return a}return a}function Vpr(e,t){let r=e.geometry();if(r.length===0||r[0].length===0)return NaN;let i=AB(r,0).map(o=>o.map(s=>s.map(l=>Fie([l.x,l.y],e.canonical)))),n=new Iie(i[0][0][0][1]),a=1/0;for(let o of t)for(let s of i){switch(o.type){case"Point":a=Math.min(a,Gz([o.coordinates],!1,s,n,a));break;case"LineString":a=Math.min(a,Gz(o.coordinates,!0,s,n,a));break;case"Polygon":a=Math.min(a,Opr(s,o.coordinates,n,a))}if(a===0)return a}return a}function Gte(e){return e.type==="MultiPolygon"?e.coordinates.map(t=>({type:"Polygon",coordinates:t})):e.type==="MultiLineString"?e.coordinates.map(t=>({type:"LineString",coordinates:t})):e.type==="MultiPoint"?e.coordinates.map(t=>({type:"Point",coordinates:t})):[e]}function yQe(e,[t,r,i,n],a){t=t.evaluate(e),r=r.evaluate(e),i=i.evaluate(e);let o=n?n.evaluate(e):1,s=btt(t,r,i,o);if(s)throw new al(s,a);return new ea(t/255,r/255,i/255,o,!1)}function xQe(e,t){return e in t&&t[e]!==void 0}function Hte(e,t){let r=t[e];return r===void 0?null:r}function jpr(e,t,r,i){for(;r<=i;){let n=r+i>>1;if(t[n]===e)return!0;t[n]>e?i=n-1:r=n+1}return!1}function Pb(e){return{type:e}}function $pr(e){return Array.isArray(e)?`(${e.map(ml).join(", ")})`:`(${ml(e.type)}...)`}function jz(e){if(e instanceof Ltt)return jz(e.boundExpression);if(e instanceof Jb&&e.name==="error"||e instanceof Utt||e instanceof Pie||e instanceof Bie||e instanceof qie)return!1;let t=e instanceof pT||e instanceof _m,r=!0;return e.eachChild(i=>{r&&(r=t?jz(i):i instanceof ST)}),r?SB(e)&&EB(e,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"]):!1}function SB(e){if(e instanceof Jb&&(e.name==="get"&&e.args.length===1||e.name==="feature-state"||e.name==="has"&&e.args.length===1||e.name==="properties"||e.name==="geometry-type"||e.name==="id"||/^filter-/.test(e.name))||e instanceof Pie||e instanceof Bie)return!1;let t=!0;return e.eachChild(r=>{t&&!SB(r)&&(t=!1)}),t}function Mk(e){if(e instanceof Jb&&e.name==="feature-state")return!1;let t=!0;return e.eachChild(r=>{t&&!Mk(r)&&(t=!1)}),t}function EB(e,t){if(e instanceof Jb&&t.indexOf(e.name)>=0)return!1;let r=!0;return e.eachChild(i=>{r&&!EB(i,t)&&(r=!1)}),r}function ET(e){return e["property-type"]==="data-driven"||e["property-type"]==="cross-faded-data-driven"}function rrt(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function Oie(e){return!!e.expression&&e.expression.interpolated}function Sk(e,...t){for(let r of t)for(let i in r)e[i]=r[i];return e}function Aa(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":e===null?"null":typeof e}function kB(e){return typeof e=="object"&&!!e&&!Array.isArray(e)&&Ql(e)===Nb}function Wpr(e){return e}function Ypr(e){switch(e.type){case"color":return ea.parse;case"padding":return Q1.parse;case"numberArray":return eg.parse;case"colorArray":return Xd.parse;default:return null}}function Xpr(e){switch(e){case"exponential":return nrt;case"interval":return Kpr;case"categorical":return Zpr;case"identity":return Jpr;default:throw Error(`Unknown function type "${e}"`)}}function irt(e,t){let r=e.stops&&typeof e.stops[0][0]=="object",i=r||e.property!==void 0,n=r||!i,a=e.type||(Oie(t)?"exponential":"interval"),o=Ypr(t);if(o&&(e=Sk({},e),e.stops&&(e.stops=e.stops.map(c=>[c[0],o(c[1])])),e.default?e.default=o(e.default):e.default=o(t.default)),e.colorSpace&&!Udr(e.colorSpace))throw Error(`Unknown color space: "${e.colorSpace}"`);let s=Xpr(a),l,u;if(a==="categorical"){l=Object.create(null);for(let c of e.stops)l[c[0]]=c[1];u=typeof e.stops[0][0]}if(r){let c={},f=[];for(let p=0;p<e.stops.length;p++){let v=e.stops[p],m=v[0].zoom;c[m]===void 0&&(c[m]={zoom:m,type:e.type,property:e.property,default:e.default,stops:[]},f.push(m)),c[m].stops.push([v[0].value,v[1]])}let h=[];for(let p of f)h.push([c[p].zoom,irt(c[p],t)]);let d={name:"linear"};return{kind:"composite",interpolationType:d,interpolationFactor:Zd.interpolationFactor.bind(void 0,d),zoomStops:h.map(p=>p[0]),evaluate({zoom:p},v){return nrt({stops:h,base:e.base},t,p).evaluate(p,v)}}}if(n){let c=a==="exponential"?{name:"exponential",base:e.base===void 0?1:e.base}:null;return{kind:"camera",interpolationType:c,interpolationFactor:Zd.interpolationFactor.bind(void 0,c),zoomStops:e.stops.map(f=>f[0]),evaluate:({zoom:f})=>s(e,t,f,l,u)}}return{kind:"source",evaluate(c,f){let h=f&&f.properties?f.properties[e.property]:void 0;return h===void 0?Zk(e.default,t.default):s(e,t,h,l,u)}}}function Zk(e,t,r){if(e!==void 0)return e;if(t!==void 0)return t;if(r!==void 0)return r}function Zpr(e,t,r,i,n){return Zk(typeof r===n?i[r]:void 0,e.default,t.default)}function Kpr(e,t,r){if(Aa(r)!=="number")return Zk(e.default,t.default);let i=e.stops.length;if(i===1||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[i-1][0])return e.stops[i-1][1];let n=TB(e.stops.map(a=>a[0]),r,"");return e.stops[n][1]}function nrt(e,t,r){let i=e.base===void 0?1:e.base;if(Aa(r)!=="number")return Zk(e.default,t.default);let n=e.stops.length;if(n===1||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[n-1][0])return e.stops[n-1][1];let a=TB(e.stops.map(c=>c[0]),r,""),o=Qpr(r,i,e.stops[a][0],e.stops[a+1][0]),s=e.stops[a][1],l=e.stops[a+1][1],u=$s[t.type]||Wpr;return typeof s.evaluate=="function"?{evaluate(...c){let f=s.evaluate.apply(void 0,c),h=l.evaluate.apply(void 0,c);if(f!==void 0&&h!==void 0)return u(f,h,o,e.colorSpace)}}:u(s,l,o,e.colorSpace)}function Jpr(e,t,r){switch(t.type){case"color":r=ea.parse(r);break;case"formatted":r=Mm.fromString(r.toString());break;case"resolvedImage":r=Z1.fromString(r.toString());break;case"padding":r=Q1.parse(r);break;case"colorArray":r=Xd.parse(r);break;case"numberArray":r=eg.parse(r);break;default:Aa(r)!==t.type&&(t.type!=="enum"||!t.values[r])&&(r=void 0)}return Zk(r,e.default,t.default)}function Qpr(e,t,r,i){let n=i-r,a=e-r;return n===0?0:t===1?a/n:(t**+a-1)/(t**+n-1)}function lre(e){return{result:"success",value:e}}function fT(e){return{result:"error",value:e}}function art(e,t,r,i){return`${e}${t}: ${r}${i==null?"":` Falling back to ${String(i)}.`}`}function ort(e){if(!e)throw Error('rootKey must identify the location of the expression in the style JSON, e.g. "layers[3].paint.line-width".')}function CB(e){return Array.isArray(e)&&e.length>0&&typeof e[0]=="string"&&e[0]in mT}function DB(e,t,r,i){ort(t);let n=new ert(mT,jz,[],r?rvr(r):void 0),a=n.parse(e,void 0,void 0,void 0,r&&r.type==="string"?{typeAnnotation:"coerce"}:void 0);return a?lre(new Uie(a,t,r,i)):fT(n.errors)}function evr(e){return e._styleExpression!==void 0}function srt(e,t,r,i){let n=DB(e,t,r,i);if(n.result==="error")return n;let a=n.value.expression,o=SB(a);if(!o&&!ET(r))return fT([new $1("","data expressions not supported")]);let s=EB(a,["zoom"]);if(!s&&!rrt(r))return fT([new $1("","zoom expressions not supported")]);let l=qz(a);if(!l&&!s)return fT([new $1("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(l instanceof $1)return fT([l]);if(l instanceof Zd&&!Oie(r))return fT([new $1("",'"interpolate" expressions cannot be used with this property')]);if(!l)return lre(o?new Ek("constant",n.value,i):new Ek("source",n.value,i));let u=l instanceof Zd?l.interpolation:void 0;return lre(o?new $z("camera",n.value,l.labels,u,i):new $z("composite",n.value,l.labels,u,i))}function tvr(e,t,r,i){if(kB(e))return new lrt(e,t,r);if(CB(e)){let n=srt(e,t,r,i);if(n.result==="error")throw Error(n.value.map(a=>`${a.key}: ${a.message}`).join(", "));return n.value}{let n=e;return r.type==="color"&&typeof e=="string"?n=ea.parse(e):r.type==="padding"&&(typeof e=="number"||Array.isArray(e))?n=Q1.parse(e):r.type==="numberArray"&&(typeof e=="number"||Array.isArray(e))?n=eg.parse(e):r.type==="colorArray"&&(typeof e=="string"||Array.isArray(e))?n=Xd.parse(e):r.type==="variableAnchorOffsetCollection"&&Array.isArray(e)?n=X1.parse(e):r.type==="projectionDefinition"&&typeof e=="string"&&(n=Lm.parse(e)),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>n}}}function qz(e){let t=null;if(e instanceof Dtt)t=qz(e.result);else if(e instanceof qtt){for(let r of e.args)if(t=qz(r),t)break}else(e instanceof Die||e instanceof Zd)&&e.input instanceof Jb&&e.input.name==="zoom"&&(t=e);return t instanceof $1||e.eachChild(r=>{let i=qz(r);i instanceof $1?t=i:!t&&i?t=new $1("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&i&&t!==i&&(t=new $1("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function Kk(e,t=new Set){return e instanceof qie&&t.add(e.key),e.eachChild(r=>{Kk(r,t)}),t}function rvr(e){let t={color:xv,string:la,number:Ei,enum:la,boolean:La,formatted:Wk,padding:_B,numberArray:bB,colorArray:wk,projectionDefinition:yB,resolvedImage:Yk,variableAnchorOffsetCollection:wB};return e.type==="array"?Lf(t[e.value]||ha,e.length):t[e.type]}function crt(e){if(e.type==="color"&&kB(e.default))return new ea(0,0,0,0);switch(e.type){case"color":return ea.parse(e.default)||null;case"padding":return Q1.parse(e.default)||null;case"numberArray":return eg.parse(e.default)||null;case"colorArray":return Xd.parse(e.default)||null;case"variableAnchorOffsetCollection":return X1.parse(e.default)||null;case"projectionDefinition":return Lm.parse(e.default)||null;default:return e.default===void 0?null:e.default}}function kT(e,t){let{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:o,accumulated:s}=e!=null?e:{};return{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:o,accumulated:s,globalState:t}}function ivr(e){let t=!1;for(let r of e){let i=frt(r);if(i==="expression")return"expression";i==="legacy"&&(t=!0)}return t?"legacy":"neutral"}function frt(e){if(typeof e=="boolean")return"neutral";if(!Array.isArray(e)||e.length===0)return"legacy";switch(e[0]){case"has":return e.length<2||e[1]==="$id"||e[1]==="$type"?"legacy":e.length===2?"neutral":"expression";case"in":return e.length>=3&&(typeof e[1]!="string"||Array.isArray(e[2]))?"expression":"legacy";case"!in":case"!has":return"legacy";case"==":case"!=":case">":case">=":case"<":case"<=":return e.length!==3||Array.isArray(e[1])||Array.isArray(e[2])?"expression":"legacy";case"none":return"legacy";case"any":case"all":return ivr(e.slice(1));default:return"expression"}}function Vie(e){return frt(e)!=="legacy"}function _Qe(e){return e==="$type"?["geometry-type"]:e==="$id"?["id"]:["get",e]}function nvr(e){switch(e[0]){case"==":case"!=":case"<":case"<=":case">":case">=":return e.length!==3||typeof e[1]!="string"?null:[e[0],_Qe(e[1]),e[2]];case"in":case"!in":{if(e.length<2||typeof e[1]!="string")return null;let t=["in",_Qe(e[1]),["literal",e.slice(2)]];return e[0]==="!in"?["!",t]:t}case"has":case"!has":{if(e.length!==2||typeof e[1]!="string"||e[1]==="$type"||e[1]==="$id")return null;let t=["has",e[1]];return e[0]==="!has"?["!",t]:t}default:return null}}function hrt(e){if((e[0]==="<"||e[0]==="<="||e[0]===">"||e[0]===">=")&&e[1]==="$type")return`"$type" cannot be use with operator "${e[0]}"`;let t=nvr(e);return t?`Mixing deprecated filter syntax with expression syntax is not supported. Replace ${JSON.stringify(e)} with ${JSON.stringify(t)}.`:`Mixing deprecated filter syntax with expression syntax is not supported. Convert ${JSON.stringify(e)} to expression syntax.`}function jte(e,t,r){let i=r[e];return Array.isArray(i)?Vie(i)?Gie(i,t.concat(e)):{path:t.concat(e),legacyFilter:i}:null}function Gie(e,t=[]){if(!Array.isArray(e)||e.length<1)return null;switch(e[0]){case"all":case"any":case"none":for(let r=1;r<e.length;r++){let i=jte(r,t,e);if(i)return i}break;case"!":{let r=jte(1,t,e);if(r)return r;break}case"case":for(let r=1;r<e.length-1;r+=2){let i=jte(r,t,e);if(i)return i}}return null}function avr(e,t){let r=Gie(e);if(!r||typeof console>"u")return;let i=r.path.map(n=>`[${n}]`).join("");console.warn(`${t}${i}: ${hrt(r.legacyFilter)}`)}function CT(e,t,r){if(e==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Vie(e)?avr(e,t):e=Wz(e);let i=DB(e,t,ovr,r);if(i.result==="error")throw Error(i.value.map(n=>`${n.key}: ${n.message}`).join(", "));return{filter:(n,a,o)=>i.value.evaluate(n,a,{},o),needGeometry:drt(e),getGlobalStateRefs:()=>Kk(i.value.expression)}}function svr(e,t){return e<t?-1:+(e>t)}function drt(e){if(!Array.isArray(e))return!1;if(e[0]==="within"||e[0]==="distance")return!0;for(let t=1;t<e.length;t++)if(drt(e[t]))return!0;return!1}function Wz(e){if(!e)return!0;let t=e[0];return e.length<=1?t!=="any":t==="=="?$te(e[1],e[2],"=="):t==="!="?_z($te(e[1],e[2],"==")):t==="<"||t===">"||t==="<="||t===">="?$te(e[1],e[2],t):t==="any"?lvr(e.slice(1)):t==="all"?["all"].concat(e.slice(1).map(Wz)):t==="none"?["all"].concat(e.slice(1).map(Wz).map(_z)):t==="in"?bQe(e[1],e.slice(2)):t==="!in"?_z(bQe(e[1],e.slice(2))):t==="has"?wQe(e[1]):t!=="!has"||_z(wQe(e[1]))}function $te(e,t,r){switch(e){case"$type":return[`filter-type-${r}`,t];case"$id":return[`filter-id-${r}`,t];default:return[`filter-${r}`,e,t]}}function lvr(e){return["any"].concat(e.map(Wz))}function bQe(e,t){if(t.length===0)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(r=>typeof r!=typeof t[0])?["filter-in-large",e,["literal",t.sort(svr)]]:["filter-in-small",e,["literal",t]]}}function wQe(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function _z(e){return["!",e]}function prt(e){let t=e.key,r=e.value;return r?[new Qr(t,r,"constants have been deprecated as of v8")]:[]}function Jl(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function jb(e){if(Array.isArray(e))return e.map(jb);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){let t={};for(let r in e)t[r]=jb(e[r]);return t}return Jl(e)}function I0(e){let t=e.key,r=e.value,i=e.valueSpec||{},n=e.objectElementValidators||{},a=e.style,o=e.styleSpec,s=e.validateSpec,l=[],u=Aa(r);if(u!=="object")return[new Qr(t,r,`object expected, ${u} found`)];for(let c in r){let f=c.split(".")[0],h=gk(i,f)||i["*"],d;if(gk(n,f))d=n[f];else if(gk(i,f)){if(r[c]===void 0)continue;d=s}else if(n["*"])d=n["*"];else if(i["*"])d=s;else{l.push(new Qr(t,r[c],`unknown property "${c}"`));continue}l=l.concat(d({key:(t&&`${t}.`)+c,value:r[c],valueSpec:h,style:a,styleSpec:o,object:r,objectKey:c,validateSpec:s},r))}for(let c in i)n[c]||i[c].required&&i[c].default===void 0&&r[c]===void 0&&l.push(new Qr(t,r,`missing required property "${c}"`));return l}function Hie(e){let t=e.value,r=e.valueSpec,i=e.validateSpec,n=e.style,a=e.styleSpec,o=e.key,s=e.arrayElementValidator||i;if(Aa(t)!=="array")return[new Qr(o,t,`array expected, ${Aa(t)} found`)];if(r.length&&t.length!==r.length)return[new Qr(o,t,`array length ${r.length} expected, length ${t.length} found`)];let l={type:r.value,values:r.values};a.$version<7&&(l.function=r.function),Aa(r.value)==="object"&&(l=r.value);let u=[];for(let c=0;c<t.length;c++)u=u.concat(s({array:t,arrayIndex:c,value:t[c],valueSpec:l,validateSpec:e.validateSpec,style:n,styleSpec:a,key:`${o}[${c}]`}));return u}function FB(e){let t=e.key,r=e.value,i=e.valueSpec,n=Aa(r);return n==="number"&&r!==r&&(n="NaN"),n==="number"?"minimum"in i&&r<i.minimum?[new Qr(t,r,`${r} is less than the minimum value ${i.minimum}`)]:"maximum"in i&&r>i.maximum?[new Qr(t,r,`${r} is greater than the maximum value ${i.maximum}`)]:[]:[new Qr(t,r,`number expected, ${n} found`)]}function vrt(e){let t=e.valueSpec,r=Jl(e.value.type),i,n={},a,o,s=r!=="categorical"&&e.value.property===void 0,l=!s,u=Aa(e.value.stops)==="array"&&Aa(e.value.stops[0])==="array"&&Aa(e.value.stops[0][0])==="object",c=I0({key:e.key,value:e.value,valueSpec:e.styleSpec.function,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:f,default:p}});return r==="identity"&&s&&c.push(new Qr(e.key,e.value,'missing required property "property"')),r!=="identity"&&!e.value.stops&&c.push(new Qr(e.key,e.value,'missing required property "stops"')),r==="exponential"&&e.valueSpec.expression&&!Oie(e.valueSpec)&&c.push(new Qr(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!ET(e.valueSpec)?c.push(new Qr(e.key,e.value,"property functions not supported")):s&&!rrt(e.valueSpec)&&c.push(new Qr(e.key,e.value,"zoom functions not supported"))),(r==="categorical"||u)&&e.value.property===void 0&&c.push(new Qr(e.key,e.value,'"property" property is required')),c;function f(v){if(r==="identity")return[new Qr(v.key,v.value,'identity function may not have a "stops" property')];let m=[],g=v.value;return m=m.concat(Hie({key:v.key,value:g,valueSpec:v.valueSpec,validateSpec:v.validateSpec,style:v.style,styleSpec:v.styleSpec,arrayElementValidator:h})),Aa(g)==="array"&&g.length===0&&m.push(new Qr(v.key,g,"array must have at least one stop")),m}function h(v){let m=[],g=v.value,w=v.key;if(Aa(g)!=="array")return[new Qr(w,g,`array expected, ${Aa(g)} found`)];if(g.length!==2)return[new Qr(w,g,`array length 2 expected, length ${g.length} found`)];if(u){if(Aa(g[0])!=="object")return[new Qr(w,g,`object expected, ${Aa(g[0])} found`)];if(g[0].zoom===void 0)return[new Qr(w,g,"object stop key must have zoom")];if(g[0].value===void 0)return[new Qr(w,g,"object stop key must have value")];if(o&&o>Jl(g[0].zoom))return[new Qr(w,g[0].zoom,"stop zoom values must appear in ascending order")];Jl(g[0].zoom)!==o&&(o=Jl(g[0].zoom),a=void 0,n={}),m=m.concat(I0({key:`${w}[0]`,value:g[0],valueSpec:{zoom:{}},validateSpec:v.validateSpec,style:v.style,styleSpec:v.styleSpec,objectElementValidators:{zoom:FB,value:d}}))}else m=m.concat(d({key:`${w}[0]`,value:g[0],valueSpec:{},validateSpec:v.validateSpec,style:v.style,styleSpec:v.styleSpec},g));return CB(jb(g[1]))?m.concat([new Qr(`${w}[1]`,g[1],"expressions are not allowed in function stops.")]):m.concat(v.validateSpec({key:`${w}[1]`,value:g[1],valueSpec:t,validateSpec:v.validateSpec,style:v.style,styleSpec:v.styleSpec}))}function d(v,m){let g=Aa(v.value),w=Jl(v.value),b=v.value===null?m:v.value;if(!i)i=g;else if(g!==i)return[new Qr(v.key,b,`${g} stop domain type must match previous stop domain type ${i}`)];if(g!=="number"&&g!=="string"&&g!=="boolean")return[new Qr(v.key,b,"stop domain value must be a number, string, or boolean")];if(g!=="number"&&r!=="categorical"){let _=`number expected, ${g} found`;return ET(t)&&r===void 0&&(_+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Qr(v.key,b,_)]}return r==="categorical"&&g==="number"&&(!isFinite(w)||Math.floor(w)!==w)?[new Qr(v.key,b,`integer expected, found ${w}`)]:r!=="categorical"&&g==="number"&&a!==void 0&&w<a?[new Qr(v.key,b,"stop domain values must appear in ascending order")]:(a=w,r==="categorical"&&w in n?[new Qr(v.key,b,"stop domain values must be unique")]:(n[w]=!0,[]))}function p(v){return v.validateSpec({key:v.key,value:v.value,valueSpec:t,validateSpec:v.validateSpec,style:v.style,styleSpec:v.styleSpec})}}function DT(e){let t=(e.expressionContext==="property"?srt:DB)(jb(e.value),e.key,e.valueSpec);if(t.result==="error")return t.value.map(i=>new Qr(`${e.key}${i.key}`,e.value,i.message));let r=t.value.expression||t.value._styleExpression.expression;if(e.expressionContext==="property"&&e.propertyKey==="text-font"&&!r.outputDefined())return[new Qr(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if(e.expressionContext==="property"&&e.propertyType==="layout"&&!Mk(r))return[new Qr(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if(e.expressionContext==="filter"&&!Mk(r))return[new Qr(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&e.expressionContext.indexOf("cluster")===0){if(!EB(r,["zoom","feature-state"]))return[new Qr(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(e.expressionContext==="cluster-initial"&&!SB(r))return[new Qr(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function uvr(e){let t=e.value,r=e.key,i=Aa(t);return i==="boolean"?[]:[new Qr(r,t,`boolean expected, ${i} found`)]}function ure(e){let t=e.key,r=e.value,i=Aa(r);return i==="string"?ea.parse(String(r))?[]:[new Qr(t,r,`color expected, "${r}" found`)]:[new Qr(t,r,`color expected, ${i} found`)]}function kk(e){let t=e.key,r=e.value,i=e.valueSpec,n=[];return Array.isArray(i.values)?i.values.indexOf(Jl(r))===-1&&n.push(new Qr(t,r,`expected one of [${i.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(i.values).indexOf(Jl(r))===-1&&n.push(new Qr(t,r,`expected one of [${Object.keys(i.values).join(", ")}], ${JSON.stringify(r)} found`)),n}function cvr(e,t){let r=e;for(let i of t)r=r[i];return r}function fvr(e,t){let r=Gie(t);return r?[new Qr(`${e.key}${r.path.map(i=>`[${i}]`).join("")}`,cvr(e.value,r.path),hrt(r.legacyFilter),null,"warning")]:[]}function jie(e){let t=jb(e.value);return Vie(t)?[...fvr(e,t),...DT(Sk({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}}))]:grt(e)}function grt(e){let t=e.value,r=e.key;if(Aa(t)!=="array")return[new Qr(r,t,`array expected, ${Aa(t)} found`)];let i=e.styleSpec,n,a=[];if(t.length<1)return[new Qr(r,t,"filter array must have at least 1 element")];switch(a=a.concat(kk({key:`${r}[0]`,value:t[0],valueSpec:i.filter_operator,style:e.style,styleSpec:e.styleSpec})),Jl(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&Jl(t[1])==="$type"&&a.push(new Qr(r,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":t.length!==3&&a.push(new Qr(r,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(n=Aa(t[1]),n!=="string"&&a.push(new Qr(`${r}[1]`,t[1],`string expected, ${n} found`)));for(let o=2;o<t.length;o++)n=Aa(t[o]),Jl(t[1])==="$type"?a=a.concat(kk({key:`${r}[${o}]`,value:t[o],valueSpec:i.geometry_type,style:e.style,styleSpec:e.styleSpec})):n!=="string"&&n!=="number"&&n!=="boolean"&&a.push(new Qr(`${r}[${o}]`,t[o],`string, number, or boolean expected, ${n} found`));break;case"any":case"all":case"none":for(let o=1;o<t.length;o++)a=a.concat(grt({key:`${r}[${o}]`,value:t[o],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":n=Aa(t[1]),t.length===2?n!=="string"&&a.push(new Qr(`${r}[1]`,t[1],`string expected, ${n} found`)):a.push(new Qr(r,t,`filter array for "${t[0]}" operator must have 2 elements`))}return a}function mrt(e,t){let r=e.key,i=e.validateSpec,n=e.style,a=e.styleSpec,o=e.value,s=e.objectKey,l=a[`${t}_${e.layerType}`];if(!l)return[];let u=s.match(Nie);if(t==="paint"&&u&&l[u[1]]&&l[u[1]].transition)return i({key:r,value:o,valueSpec:a.transition,style:n,styleSpec:a});let c=e.valueSpec||l[s];if(!c)return[new Qr(r,o,`unknown property "${s}"`)];let f;if(Aa(o)==="string"&&ET(c)&&!c.tokens&&(f=/^{([^}]+)}$/.exec(o)))return[new Qr(r,o,`"${s}" does not support interpolation syntax
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(f[1])} }\`.`)];let h=[];return e.layerType==="symbol"&&s==="text-font"&&kB(jb(o))&&Jl(o.type)==="identity"&&h.push(new Qr(r,o,'"text-font" does not support identity functions')),h.concat(i({key:e.key,value:o,valueSpec:c,style:n,styleSpec:a,expressionContext:"property",propertyType:t,propertyKey:s}))}function yrt(e){return mrt(e,"paint")}function xrt(e){return mrt(e,"layout")}function _rt(e){var l,u;let t=[],r=e.value,i=e.key,n=e.style,a=e.styleSpec;if(Aa(r)!=="object")return[new Qr(i,r,`object expected, ${Aa(r)} found`)];!r.type&&!r.ref&&t.push(new Qr(i,r,'either "type" or "ref" is required'));let o=Jl(r.type),s=Jl(r.ref);if(r.id){let c=Jl(r.id);for(let f=0;f<e.arrayIndex;f++){let h=n.layers[f];Jl(h.id)===c&&t.push(new Qr(i,r.id,`duplicate layer id "${r.id}", previously used at line ${h.id.__line__}`))}}if("ref"in r){["type","source","source-layer","filter","layout"].forEach(f=>{f in r&&t.push(new Qr(i,r[f],`"${f}" is prohibited for ref layers`))});let c;n.layers.forEach(f=>{Jl(f.id)===s&&(c=f)}),c?c.ref?t.push(new Qr(i,r.ref,"ref cannot reference another ref layer")):o=Jl(c.type):t.push(new Qr(i,r.ref,`ref layer "${s}" not found`))}else if(o!=="background")if(!r.source)t.push(new Qr(i,r,'missing required property "source"'));else{let c=n.sources&&n.sources[r.source],f=c&&Jl(c.type);c?f==="vector"&&o==="raster"?t.push(new Qr(i,r.source,`layer "${r.id}" requires a raster source`)):f!=="raster-dem"&&o==="hillshade"||f!=="raster-dem"&&o==="color-relief"?t.push(new Qr(i,r.source,`layer "${r.id}" requires a raster-dem source`)):f==="raster"&&o!=="raster"?t.push(new Qr(i,r.source,`layer "${r.id}" requires a vector source`)):f==="vector"&&!r["source-layer"]?t.push(new Qr(i,r,`layer "${r.id}" must specify a "source-layer"`)):f==="raster-dem"&&o!=="hillshade"&&o!=="color-relief"?t.push(new Qr(i,r.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):o==="line"&&r.paint&&r.paint["line-gradient"]&&(f!=="geojson"||!c.lineMetrics)&&t.push(new Qr(i,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new Qr(i,r.source,`source "${r.source}" not found`))}return o==="raster"&&((l=r.paint)!=null&&l.resampling)&&((u=r.paint)!=null&&u["raster-resampling"])&&t.push(new Qr(i,r.paint,`layer "${r.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),t=t.concat(I0({key:i,value:r,valueSpec:a.layer,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*"(){return[]},type(){return e.validateSpec({key:`${i}.type`,value:r.type,valueSpec:a.layer.type,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,object:r,objectKey:"type"})},filter:jie,layout(c){return I0({layer:r,key:c.key,value:c.value,style:c.style,styleSpec:c.styleSpec,validateSpec:c.validateSpec,objectElementValidators:{"*"(f){return xrt(Sk({layerType:o},f))}}})},paint(c){return I0({layer:r,key:c.key,value:c.value,style:c.style,styleSpec:c.styleSpec,validateSpec:c.validateSpec,objectElementValidators:{"*"(f){return yrt(Sk({layerType:o},f))}}})}}})),t}function J2(e){let t=e.value,r=e.key,i=Aa(t);return i==="string"?[]:[new Qr(r,t,`string expected, ${i} found`)]}function hvr(e){var f;let t=(f=e.sourceName)!=null?f:"",r=e.value,i=e.styleSpec,n=i.source_raster_dem,a=e.style,o=[],s=Aa(r);if(r===void 0)return o;if(s!=="object")return o.push(new Qr("source_raster_dem",r,`object expected, ${s} found`)),o;let l=Jl(r.encoding)==="custom",u=["redFactor","greenFactor","blueFactor","baseShift"],c=e.value.encoding?`"${e.value.encoding}"`:"Default";for(let h in r)!l&&u.includes(h)?o.push(new Qr(h,r[h],`In "${t}": "${h}" is only valid when "encoding" is set to "custom". ${c} encoding found`)):n[h]?o=o.concat(e.validateSpec({key:h,value:r[h],valueSpec:n[h],validateSpec:e.validateSpec,style:a,styleSpec:i})):o.push(new Qr(h,r[h],`unknown property "${h}"`));return o}function brt(e){let t=e.value,r=e.key,i=e.styleSpec,n=e.style,a=e.validateSpec;if(!t.type)return[new Qr(r,t,'"type" is required')];let o=Jl(t.type),s;switch(o){case"vector":case"raster":return s=I0({key:r,value:t,valueSpec:i[`source_${o.replace("-","_")}`],style:e.style,styleSpec:i,objectElementValidators:TQe,validateSpec:a}),s;case"raster-dem":return s=hvr({sourceName:r,value:t,style:e.style,styleSpec:i,validateSpec:a}),s;case"geojson":if(s=I0({key:r,value:t,valueSpec:i.source_geojson,style:n,styleSpec:i,validateSpec:a,objectElementValidators:TQe}),t.cluster)for(let l in t.clusterProperties){let[u,c]=t.clusterProperties[l],f=typeof u=="string"?[u,["accumulated"],["get",l]]:u;s.push(...DT({key:`${r}.${l}.map`,value:c,validateSpec:a,expressionContext:"cluster-map"})),s.push(...DT({key:`${r}.${l}.reduce`,value:f,validateSpec:a,expressionContext:"cluster-reduce"}))}return s;case"video":return I0({key:r,value:t,valueSpec:i.source_video,style:n,validateSpec:a,styleSpec:i});case"image":return I0({key:r,value:t,valueSpec:i.source_image,style:n,validateSpec:a,styleSpec:i});case"canvas":return[new Qr(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return kk({key:`${r}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:n,validateSpec:a,styleSpec:i})}}function dvr({key:e,value:t}){if(Aa(t)==="string")return J2({key:e,value:t});{let r=[];for(let i in t)r.push(...J2({key:`${e}.${i}`,value:t[i]}));return r}}function wrt(e){let t=e.value,r=e.styleSpec,i=r.light,n=e.style,a=[],o=Aa(t);if(t===void 0)return a;if(o!=="object")return a=a.concat([new Qr("light",t,`object expected, ${o} found`)]),a;for(let s in t){let l=s.match(Nie);a=l&&i[l[1]]&&i[l[1]].transition?a.concat(e.validateSpec({key:s,value:t[s],valueSpec:r.transition,validateSpec:e.validateSpec,style:n,styleSpec:r})):i[s]?a.concat(e.validateSpec({key:s,value:t[s],valueSpec:i[s],validateSpec:e.validateSpec,style:n,styleSpec:r})):a.concat([new Qr(s,t[s],`unknown property "${s}"`)])}return a}function Trt(e){let t=e.value,r=e.styleSpec,i=r.sky,n=e.style,a=Aa(t);if(t===void 0)return[];if(a!=="object")return[new Qr("sky",t,`object expected, ${a} found`)];let o=[];for(let s in t){let l=s.match(Nie);o=l&&i[l[1]]&&i[l[1]].transition?o.concat(e.validateSpec({key:s,value:t[s],valueSpec:r.transition,style:n,styleSpec:r})):i[s]?o.concat(e.validateSpec({key:s,value:t[s],valueSpec:i[s],style:n,styleSpec:r})):o.concat([new Qr(s,t[s],`unknown property "${s}"`)])}return o}function Art(e){let t=e.value,r=e.styleSpec,i=r.terrain,n=e.style,a=[],o=Aa(t);if(t===void 0)return a;if(o!=="object")return a=a.concat([new Qr("terrain",t,`object expected, ${o} found`)]),a;for(let s in t)a=i[s]?a.concat(e.validateSpec({key:s,value:t[s],valueSpec:i[s],validateSpec:e.validateSpec,style:n,styleSpec:r})):a.concat([new Qr(s,t[s],`unknown property "${s}"`)]);return a}function pvr(e){return J2(e).length===0?[]:DT(e)}function vvr(e){return J2(e).length===0?[]:DT(e)}function gvr(e){let t=e.key,r=e.value;if(Aa(r)==="array"){if(r.length<1||r.length>4)return[new Qr(t,r,`padding requires 1 to 4 values; ${r.length} values found`)];let i={type:"number"},n=[];for(let a=0;a<r.length;a++)n=n.concat(e.validateSpec({key:`${t}[${a}]`,value:r[a],validateSpec:e.validateSpec,valueSpec:i}));return n}return FB({key:t,value:r,valueSpec:{}})}function mvr(e){let t=e.key,r=e.value;if(Aa(r)==="array"){let i={type:"number"};if(r.length<1)return[new Qr(t,r,"array length at least 1 expected, length 0 found")];let n=[];for(let a=0;a<r.length;a++)n=n.concat(e.validateSpec({key:`${t}[${a}]`,value:r[a],validateSpec:e.validateSpec,valueSpec:i}));return n}return FB({key:t,value:r,valueSpec:{}})}function yvr(e){let t=e.key,r=e.value;if(Aa(r)==="array"){if(r.length<1)return[new Qr(t,r,"array length at least 1 expected, length 0 found")];let i=[];for(let n=0;n<r.length;n++)i=i.concat(ure({key:`${t}[${n}]`,value:r[n],valueSpec:{}}));return i}return ure({key:t,value:r,valueSpec:{}})}function xvr(e){let t=e.key,r=e.value,i=Aa(r),n=e.styleSpec;if(i!=="array"||r.length<1||r.length%2!=0)return[new Qr(t,r,"variableAnchorOffsetCollection requires a non-empty array of even length")];let a=[];for(let o=0;o<r.length;o+=2)a=a.concat(kk({key:`${t}[${o}]`,value:r[o],valueSpec:n.layout_symbol["text-anchor"]})),a=a.concat(Hie({key:`${t}[${o+1}]`,value:r[o+1],valueSpec:{length:2,value:"number"},validateSpec:e.validateSpec,style:e.style,styleSpec:n}));return a}function Mrt(e){let t=[],r=e.value,i=e.key;if(Array.isArray(r)){let n=[],a=[];for(let o in r)r[o].id&&n.includes(r[o].id)&&t.push(new Qr(i,r,`all the sprites' ids must be unique, but ${r[o].id} is duplicated`)),n.push(r[o].id),r[o].url&&a.includes(r[o].url)&&t.push(new Qr(i,r,`all the sprites' URLs must be unique, but ${r[o].url} is duplicated`)),a.push(r[o].url),t=t.concat(I0({key:`${i}[${o}]`,value:r[o],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:e.validateSpec}));return t}return J2({key:i,value:r})}function _vr(e){let t=e.value,r=e.styleSpec,i=r.projection,n=e.style,a=Aa(t);if(t===void 0)return[];if(a!=="object")return[new Qr("projection",t,`object expected, ${a} found`)];let o=[];for(let s in t)o=i[s]?o.concat(e.validateSpec({key:s,value:t[s],valueSpec:i[s],style:n,styleSpec:r})):o.concat([new Qr(s,t[s],`unknown property "${s}"`)]);return o}function bvr(e){let t=e.key,r=e.value;r=r instanceof String?r.valueOf():r;let i=Aa(r);return i==="array"&&!Tvr(r)&&!wvr(r)?[new Qr(t,r,`projection expected, invalid array ${JSON.stringify(r)} found`)]:["array","string"].includes(i)?[]:[new Qr(t,r,`projection expected, invalid type "${i}" found`)]}function wvr(e){return!!["interpolate","step","literal"].includes(e[0])}function Tvr(e){return Array.isArray(e)&&e.length===3&&typeof e[0]=="string"&&typeof e[1]=="string"&&typeof e[2]=="number"}function cre(e){return!!e&&e.constructor===Object}function Srt(e){return cre(e.value)?[]:[new Qr(e.key,e.value,`object expected, ${Aa(e.value)} found`)]}function Mvr(e,t){if(Aa(t)!=="string")return[];let r=`${t}`,i=()=>[new Qr(e,t,'invalid unicode range, expected a value such as "U+26", "U+0-10FFFF" or "U+4??"')],n=r.match(Avr);if(!n)return i();let[,a,o,s]=n;if(s!==void 0)return s.length>6?i():[];let l=parseInt(a,16),u=o===void 0?l:parseInt(o,16);return l>AQe||u>AQe?[new Qr(e,t,"unicode range is out of bounds, the maximum code point is U+10FFFF")]:l>u?[new Qr(e,t,`unicode range start must not be greater than its end, but ${r} is`)]:[]}function Ert(e){var s,l;let t=(s=e.key)!=null?s:"font-faces",r=e.value,i=e.validateSpec,n=(l=e.styleSpec)!=null?l:ftt,a=e.style;if(!cre(r))return[new Qr(t,r,`object expected, ${Aa(r)} found`)];let o=[];for(let u in r){let c=r[u],f=Aa(c);if(f==="string")o.push(...J2({key:`${t}.${u}`,value:c}));else if(f==="array"){let h={url:{type:"string",required:!0},"unicode-range":{type:"array",value:"string"}};for(let[d,p]of c.entries()){let v=`${t}.${u}[${d}]`;o.push(...I0({key:v,value:p,valueSpec:h,styleSpec:n,style:a,validateSpec:i}));let m=cre(p)?p["unicode-range"]:void 0;if(Aa(m)==="array")for(let[g,w]of m.entries())o.push(...Mvr(`${v}.unicode-range[${g}]`,w))}}else o.push(new Qr(`${t}.${u}`,c,`string or array expected, ${f} found`))}return o}function yk(e){let t=e.value,r=e.valueSpec,i=e.styleSpec;return e.validateSpec=yk,r.expression&&kB(Jl(t))?vrt(e):r.expression&&CB(jb(t))?DT(e):r.type&&MQe[r.type]?MQe[r.type](e):I0(Sk({},e,{valueSpec:r.type?i[r.type]:r}))}function krt(e){let t=e.value,r=e.key,i=J2(e);return i.length||(t.indexOf("{fontstack}")===-1&&i.push(new Qr(r,t,'"glyphs" url must include a "{fontstack}" token')),t.indexOf("{range}")===-1&&i.push(new Qr(r,t,'"glyphs" url must include a "{range}" token'))),i}function P0(e,t=_r){let r=[];return r=r.concat(yk({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,validateSpec:yk,objectElementValidators:{glyphs:krt,"*"(){return[]}}})),e.constants&&(r=r.concat(prt({key:"constants",value:e.constants,style:e,styleSpec:t,validateSpec:yk}))),Crt(r)}function Hd(e){return function(t){return e(Object.assign({},t,{validateSpec:yk}))}}function Crt(e){return[].concat(e).sort((t,r)=>t.line-r.line)}function jd(e){return function(...t){return Crt(e.apply(this,t))}}function kvr(e,t,r){return new Evr(e,t,r)}function Cvr(e){var t;return Object.entries((t=e.sources)!=null?t:{}).filter(([,r])=>!$ie.has(r.type)).map(([r])=>`sources.${r}`)}function Wie(e,t){let r=Cvr(t);return LB(e,ch(t).filter(({message:i})=>!r.some(n=>i.startsWith(`${n}:`)||i.startsWith(`${n}.`))))}function LB(e,t){let r=!1;for(let i of t){if(i.severity==="warning"){Ma(i.message);continue}e.fire(new An(Error(i.message))),r=!0}return r}function qT(e,t,r,i){return(i==null?void 0:i.validate)!==!1&&LB(e,t(fn({styleSpec:_r},r)))}function Ui(e,t,r={}){if(bm[e])throw Error(`${e} is already registered.`);Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),bm[e]={klass:t,omit:r.omit||[],shallow:r.shallow||[]}}function Frt(e){var t;return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||((t=e.constructor)==null?void 0:t.name)==="ArrayBuffer")}function Yie(e){let t=e.constructor;return e.$name||t._classRegistryKey}function Dvr(e){if(typeof e!="object"||!e)return!1;let t=Yie(e);return t&&t!=="Object"}function Lrt(e){return!Dvr(e)&&(e==null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof Blob||e instanceof Error||Frt(e)||ex(e)||ArrayBuffer.isView(e)||e instanceof ImageData)}function xk(e,t){if(Lrt(e))return(Frt(e)||ex(e))&&t&&t.push(e),ArrayBuffer.isView(e)&&t&&t.push(e.buffer),e instanceof ImageData&&t&&t.push(e.data.buffer),e;if(Array.isArray(e)){let a=[];for(let o of e)a.push(xk(o,t));return a}if(typeof e!="object")throw Error(`can't serialize object of type ${typeof e}`);let r=Yie(e);if(!r)throw Error(`can't serialize object of unregistered class ${e.constructor.name}`);if(!bm[r])throw Error(`${r} is not registered.`);let{klass:i}=bm[r],n=i.serialize?i.serialize(e,t):{};if(i.serialize){if(n===(t==null?void 0:t[t.length-1]))throw Error("statically serialized object won't survive transfer of $name property")}else{for(let a in e){if(!e.hasOwnProperty(a)||bm[r].omit.includes(a))continue;let o=e[a];o!==void 0&&(n[a]=bm[r].shallow.includes(a)?o:xk(o,t))}e instanceof Error&&(n.message=e.message)}if(n.$name)throw Error("$name property is reserved for worker serialization logic.");return r!=="Object"&&(n.$name=r),n}function _k(e){if(Lrt(e))return e;if(Array.isArray(e))return e.map(_k);if(typeof e!="object")throw Error(`can't deserialize object of type ${typeof e}`);let t=Yie(e)||"Object";if(!bm[t])throw Error(`can't deserialize unregistered class ${t}`);let{klass:r}=bm[t];if(!r)throw Error(`can't deserialize unregistered class ${t}`);if(r.deserialize)return r.deserialize(e);let i=Object.create(r.prototype);for(let n of Object.keys(e)){if(n==="$name")continue;let a=e[n];i[n]=bm[t].shallow.includes(n)?a:_k(a)}return i}function kQe(e){if(Array.isArray(e))return e.length;let t=e==null?void 0:e.values;return Array.isArray(t)?t.length:void 0}function Prt(e,t){let r=kQe(e),i=kQe(t);return r!==void 0&&i!==void 0&&r!==i}function ol(e,t=1){let r=0,i=0;return{members:e.map(n=>{let a=Bvr(n.type),o=r=DQe(r,Math.max(t,a)),s=n.components||1;return i=Math.max(i,a),r+=a*s,{name:n.name,type:n.type,components:s,offset:o}}),size:DQe(r,Math.max(i,t)),alignment:t}}function Bvr(e){return zvr[e].BYTES_PER_ELEMENT}function DQe(e,t){return Math.ceil(e/t)*t}function PQe(e,t){return e=Jn(Math.floor(e),0,255),t=Jn(Math.floor(t),0,255),256*e+t}function IQe(e){let t=+e;return!isNaN(t)&&t<=2**53-1?t:(0,Ire.default)(String(e))}function Rre(e,t,r,i){for(;r<i;){let n=e[r+i>>1],a=r-1,o=i+1;for(;;){do a++;while(e[a]<n);do o--;while(e[o]>n);if(a>=o)break;bz(e,a,o),bz(t,3*a,3*o),bz(t,3*a+1,3*o+1),bz(t,3*a+2,3*o+2)}o-r<i-o?(Rre(e,t,r,o),r=o+1):(Rre(e,t,o+1,i),i=o)}}function bz(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function zre(e){return[PQe(255*e.r,255*e.g),PQe(255*e.b,255*e.a)]}function Qvr(e,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[e]||[e.replace(`${t}-`,"").replace(/-/g,"_")]}function e1r(e){return{"line-pattern":{source:sT,composite:sT},"fill-pattern":{source:sT,composite:sT},"fill-extrusion-pattern":{source:sT,composite:sT},"line-dasharray":{source:FQe,composite:FQe}}[e]}function RQe(e,t,r){var n;let i={color:{source:Fk,composite:Fre},number:{source:Kz,composite:Fk}};return((n=e1r(e))==null?void 0:n[r])||i[t][r]}function Qb(e){let t=zr/e.extent,r=e.loadGeometry();for(let i of r)for(let n of i){let a=Math.round(n.x*t),o=Math.round(n.y*t);n.x=Jn(a,zQe,Bre),n.y=Jn(o,zQe,Bre),(a<n.x||a>n.x+1||o<n.y||o>n.y+1)&&Ma("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function tx(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?Qb(e):[]}}function t1r(e,t,r,i,n){e.emplaceBack(BQe+t*8+i,BQe+r*8+n)}function Qie(e,t){for(let r of e)if(FT(t,r))return!0;for(let r of t)if(FT(e,r))return!0;return ene(e,t)}function qB(e,t,r){return FT(e,t)?!0:qre(t,e,r)}function rit(e,t){if(e.length===1)return qQe(t,e[0]);for(let r of t)for(let i of r)if(FT(e,i))return!0;for(let r of e)if(qQe(t,r))return!0;for(let r of t)if(ene(e,r))return!0;return!1}function r1r(e,t,r){for(let i of t){if(e.length>=3){for(let n of i)if(FT(e,n))return!0}if(i1r(e,i,r))return!0}return!1}function i1r(e,t,r){if(e.length>1){if(ene(e,t))return!0;for(let i of t)if(qre(i,e,r))return!0}for(let i of e)if(qre(i,t,r))return!0;return!1}function ene(e,t){if(e.length===0||t.length===0)return!1;for(let r=0;r<e.length-1;r++){let i=e[r],n=e[r+1];for(let a=0;a<t.length-1;a++){let o=t[a],s=t[a+1];if(n1r(i,n,o,s))return!0}}return!1}function n1r(e,t,r,i){return Y2(e,r,i)!==Y2(t,r,i)&&Y2(e,t,r)!==Y2(e,t,i)}function qre(e,t,r){let i=r*r;if(t.length===1)return e.distSqr(t[0])<i;for(let n=1;n<t.length;n++){let a=t[n-1],o=t[n];if(iit(e,a,o)<i)return!0}return!1}function iit(e,t,r){let i=t.distSqr(r);if(i===0)return e.distSqr(t);let n=((e.x-t.x)*(r.x-t.x)+(e.y-t.y)*(r.y-t.y))/i;return n<0?e.distSqr(t):n>1?e.distSqr(r):e.distSqr(r.sub(t)._mult(n)._add(t))}function qQe(e,t){let r=!1,i,n,a;for(let o of e){i=o;for(let s=0,l=i.length-1;s<i.length;l=s++)n=i[s],a=i[l],n.y>t.y!=a.y>t.y&&t.x<(a.x-n.x)*(t.y-n.y)/(a.y-n.y)+n.x&&(r=!r)}return r}function FT(e,t){let r=!1;for(let i=0,n=e.length-1;i<e.length;n=i++){let a=e[i],o=e[n];a.y>t.y!=o.y>t.y&&t.x<(o.x-a.x)*(t.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}function a1r(e,t,r,i,n){for(let o of e)if(t<=o.x&&r<=o.y&&i>=o.x&&n>=o.y)return!0;let a=[new tr(t,r),new tr(t,n),new tr(i,n),new tr(i,r)];if(e.length>2){for(let o of a)if(FT(e,o))return!0}for(let o=0;o<e.length-1;o++){let s=e[o],l=e[o+1];if(o1r(s,l,a))return!0}return!1}function o1r(e,t,r){let i=r[0],n=r[2];if(e.x<i.x&&t.x<i.x||e.x>n.x&&t.x>n.x||e.y<i.y&&t.y<i.y||e.y>n.y&&t.y>n.y)return!1;let a=Y2(e,t,r[0]);return a!==Y2(e,t,r[1])||a!==Y2(e,t,r[2])||a!==Y2(e,t,r[3])}function yT(e,t,r){let i=t.paint.get(e).value;return i.kind==="constant"?i.value:r.programConfigurations.get(t.id).getMaxValue(e)}function OB(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function NB(e,t,r,i,n){if(!t[0]&&!t[1])return e;let a=tr.convert(t)._mult(n);r==="viewport"&&a._rotate(-i);let o=[];for(let s of e)o.push(s.sub(a));return o}function s1r(e){let t=[];for(let r=0;r<e.length;r++){let i=e[r],n=t.at(-1);(r===0||n&&!i.equals(n))&&t.push(i)}return t}function l1r(e,t){let r=[];for(let i of e){let n=s1r(i),a=[];for(let o=0;o<n.length;o++){let s=n[o],l=n[o-1],u=n[o+1],c=o===0?new tr(0,0):s.sub(l)._unit()._perp(),f=o===n.length-1?new tr(0,0):u.sub(s)._unit()._perp(),h=c._add(f)._unit(),d=h.x*f.x+h.y*f.y;d!==0&&h._mult(1/d),a.push(h._mult(t)._add(s))}r.push(a)}return r}function u1r({queryGeometry:e,size:t},r){return qB(e,r,t)}function c1r({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n},a){return qB(e,a,t*(r.projectTileCoordinates(a.x,a.y,i,n==null?void 0:n(a.x,a.y)).signedDistanceFromCamera/r.cameraToCenterDistance))}function f1r({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n},a){let o=r.projectTileCoordinates(a.x,a.y,i,n==null?void 0:n(a.x,a.y)).signedDistanceFromCamera,s=t*(r.cameraToCenterDistance/o);return qB(e,tne(a,r,i,n),s)}function h1r({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n},a){return qB(e,tne(a,r,i,n),t)}function nit({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n,pitchAlignment:a="map",pitchScale:o="map"},s){let l=a==="map"?o==="map"?u1r:c1r:o==="map"?f1r:h1r,u={queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n};for(let c of s)for(let f of c)if(l(u,f))return!0;return!1}function tne(e,t,r,i){let n=t.projectTileCoordinates(e.x,e.y,r,i==null?void 0:i(e.x,e.y)).point;return new tr((n.x*.5+.5)*t.width,(-n.y*.5+.5)*t.height)}function d1r(e,t,r,i){return e.map(n=>tne(n,t,r,i))}function rne(e,{width:t,height:r},i,n){if(!n)n=new Uint8Array(t*r*i);else if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==t*r*i)throw RangeError(`mismatched image size. expected: ${n.length} but got: ${t*r*i}`);return e.width=t,e.height=r,e.data=n,e}function sit(e,{width:t,height:r},i){if(t===e.width&&r===e.height)return;let n=rne({},{width:t,height:r},i);ine(e,n,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,t),height:Math.min(e.height,r)},i),e.width=t,e.height=r,e.data=n.data}function ine(e,t,r,i,n,a){if(n.width===0||n.height===0)return t;if(n.width>e.width||n.height>e.height||r.x>e.width-n.width||r.y>e.height-n.height)throw RangeError("out of range source coordinates for image copy");if(n.width>t.width||n.height>t.height||i.x>t.width-n.width||i.y>t.height-n.height)throw RangeError("out of range destination coordinates for image copy");let o=e.data,s=t.data;if(o===s)throw Error("srcData equals dstData, so image is already copied");for(let l=0;l<n.height;l++){let u=((r.y+l)*e.width+r.x)*a,c=((i.y+l)*t.width+i.x)*a;for(let f=0;f<n.width*a;f++)s[c+f]=o[u+f]}return t}function Yte(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=4){let i=e[r+3];t[r+0]=Math.round(e[r+0]*i/255),t[r+1]=Math.round(e[r+1]*i/255),t[r+2]=Math.round(e[r+2]*i/255),t[r+3]=i}return t}function nne(e){let t={},r=e.resolution||256,i=e.clips?e.clips.length:1,n=e.image||new As({width:r,height:i});if(!Sdr(r))throw Error(`width is not a power of 2 - ${r}`);let a=(o,s,l)=>{t[e.evaluationKey]=l;let u=e.expression.evaluate(t);n.setPixel(o/4/r,s/4,u)};if(e.clips)for(let o=0,s=0;o<i;++o,s+=r*4)for(let l=0,u=0;l<r;l++,u+=4){let c=l/(r-1),{start:f,end:h}=e.clips[o],d=f*(1-c)+h*c;a(s,u,d)}else for(let o=0,s=0;o<r;o++,s+=4){let l=o/(r-1);a(0,s,l)}return n}function wz(e){return"data"in e}function hit(e,t){let r=t[0],i=t[1],n=t[2],a=t[3],o=Math.min(r,i,n),s=Math.round((e+a)/o);return{r:Math.floor(s*o/r)%256,g:Math.floor(s*o/i)%256,b:Math.floor(s*o/n)%256}}function Jz(e,t,r){let i=r.patternDependencies,n=!1;for(let a of t){let o=a.paint.get(`${e}-pattern`);o.isConstant()||(n=!0);let s=o.constantOr(null);s&&(n=!0,i[s.to]=!0,i[s.from]=!0)}return n}function ane(e,t,r,i,n){let{zoom:a}=i,o=n.patternDependencies;for(let s of t){let l=s.paint.get(`${e}-pattern`).value;if(l.kind!=="constant"){let u=l.evaluate({zoom:a-1},r,{},n.availableImages),c=l.evaluate({zoom:a},r,{},n.availableImages),f=l.evaluate({zoom:a+1},r,{},n.availableImages);u=u!=null&&u.name?u.name:u,c=c!=null&&c.name?c.name:c,f=f!=null&&f.name?f.name:f,o[u]=!0,o[c]=!0,o[f]=!0,r.patterns[s.id]={min:u,mid:c,max:f}}}return r}function I1r(e,t,r=2){let i=t&&t.length,n=i?t[0]*r:e.length;Lk.size&&Lk.clear();let a=pit(e,0,n,r,!0),o=[];if(!a||a.next===a.prev)return o;let s=0,l=0,u=0;if(i&&(a=O1r(e,t,a,r)),e.length>80*r){s=e[0],l=e[1];let c=s,f=l;for(let h=r;h<n;h+=r){let d=e[h],p=e[h+1];d<s&&(s=d),p<l&&(l=p),d>c&&(c=d),p>f&&(f=p)}u=Math.max(c-s,f-l),u=u===0?0:32767/u}return Ure(a,o,s,l,u),o}function pit(e,t,r,i,n){let a=null;if(n===J1r(e,t,r,i)>0)for(let o=t;o<r;o+=i)a=UQe(o/i|0,e[o],e[o+1],a);else for(let o=r-i;o>=t;o-=i)a=UQe(o/i|0,e[o],e[o+1],a);return a&&Pk(a,a.next)&&(Rk(a),a=a.next),a}function Wb(e,t=e){let r=t===e,i=e,n;do n=!1,i!==i.next&&(Lk.size===0||!Lk.has(i))&&(Pk(i,i.next)||Ou(i.prev,i,i.next)===0)?((r||i===t)&&(t=i.prev),Nre=!0,Rk(i),i=i.prev,n=!0):(r||i!==t)&&(i=i.next,n=!r);while(n||i!==t);return t}function Ure(e,t,r,i,n){n&&$1r(e,r,i,n);let a=e,o=!1;for(;e.prev!==e.next;){let s=e.prev,l=e.next;if(Ou(s,e,l)<0&&(n?z1r(e,r,i,n):R1r(e))){t.push(s.i,e.i,l.i),Rk(e),e=l,a=l;continue}if(e=l,e===a){if(Nre=!1,e=Wb(e),Nre){a=e;continue}if(!o){e=B1r(e,t),a=e,o=!0;continue}q1r(e,t,r,i,n);break}}}function R1r(e){let t=e.prev,r=e,i=e.next,n=t.x,a=r.x,o=i.x,s=t.y,l=r.y,u=i.y,c=Math.min(n,a,o),f=Math.min(s,l,u),h=Math.max(n,a,o),d=Math.max(s,l,u),p=i.next;for(;p!==t;){if(p.x>=c&&p.x<=h&&p.y>=f&&p.y<=d&&(n!==p.x||s!==p.y)&&eB(n,s,a,l,o,u,p.x,p.y)&&Ou(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function z1r(e,t,r,i){let n=e.prev,a=e,o=e.next,s=n.x,l=a.x,u=o.x,c=n.y,f=a.y,h=o.y,d=Math.min(s,l,u),p=Math.min(c,f,h),v=Math.max(s,l,u),m=Math.max(c,f,h),g=jre(d,p,t,r,i),w=jre(v,m,t,r,i),b=e.prevZ;for(;b&&b.z>=g;){if(b.x>=d&&b.x<=v&&b.y>=p&&b.y<=m&&b!==o&&(s!==b.x||c!==b.y)&&eB(s,c,l,f,u,h,b.x,b.y)&&Ou(b.prev,b,b.next)>=0)return!1;b=b.prevZ}let _=e.nextZ;for(;_&&_.z<=w;){if(_.x>=d&&_.x<=v&&_.y>=p&&_.y<=m&&_!==o&&(s!==_.x||c!==_.y)&&eB(s,c,l,f,u,h,_.x,_.y)&&Ou(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}function B1r(e,t){let r=e,i=!1;do{let n=r.prev,a=r.next.next;git(n,r,r.next,a,!1)&&Ik(n,a)&&Ik(a,n)&&(t.push(n.i,r.i,a.i),Rk(r),Rk(r.next),r=e=a,i=!0),r=r.next}while(r!==e);return i?Wb(r):r}function q1r(e,t,r,i,n){let a=e;do{let o=a.next.next;for(;o!==a.prev;){if(a.i!==o.i&&X1r(a,o)){let s=mit(a,o);a=Wb(a,a.next),s=Wb(s,s.next),Ure(a,t,r,i,n),Ure(s,t,r,i,n);return}o=o.next}a=a.next}while(a!==e)}function O1r(e,t,r,i){let n=[];for(let a=0,o=t.length;a<o;a++){let s=pit(e,t[a]*i,a<o-1?t[a+1]*i:e.length,i,!1);s===s.next&&Lk.add(s),n.push(Y1r(s))}n.sort(N1r),V1r(e.length/i,t.length),vit(r,r),Vre=!0;for(let a=0;a<n.length;a++)r=U1r(n[a],r);return Vre=!1,Wb(r)}function N1r(e,t){return e.x-t.x||e.y-t.y||(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)}function U1r(e,t){let r=H1r(e,t);if(!r)return t;let i=mit(r,e),n=i.next;return vit(r,n.next),Wb(i,i.next),Wb(r,r.next)}function V1r(e,t){let r=Math.ceil((e+2*t)/16)+t+2;Kl.length<r*4&&(Kl=new Float64Array(r*4)),Qz=0}function vit(e,t){let r=e;do{let i=Qz++;Gre[i]=r;let n=1/0,a=1/0,o=-1/0,s=-1/0,l=0;do{let c=r.next;r.z=i,r.x<n&&(n=r.x),r.x>o&&(o=r.x),r.y<a&&(a=r.y),r.y>s&&(s=r.y),c.x<n&&(n=c.x),c.x>o&&(o=c.x),c.y<a&&(a=c.y),c.y>s&&(s=c.y),r=c}while(++l<16&&r!==t);Hre[i]=r;let u=i*4;Kl[u]=n,Kl[u+1]=a,Kl[u+2]=o,Kl[u+3]=s}while(r!==t)}function G1r(e,t){let r=e.z*4;t.x<Kl[r]&&(Kl[r]=t.x),t.y<Kl[r+1]&&(Kl[r+1]=t.y),t.x>Kl[r+2]&&(Kl[r+2]=t.x),t.y>Kl[r+3]&&(Kl[r+3]=t.y)}function OQe(e){let t=Hre[e];for(;t.prev.next!==t;)t=t.next;return Hre[e]=t,t}function NQe(e){let t=Gre[e];for(;t.prev.next!==t;)t=t.next;return Gre[e]=t,t}function H1r(e,t){let r=t,i=e.x,n=e.y,a=-1/0,o;if(Pk(e,r))return r;for(let h=0,d=0;h<Qz;h++,d+=4){if(n<Kl[d+1]||n>Kl[d+3]||Kl[d]>i||Kl[d+2]<=a)continue;let p=OQe(h);r=NQe(h);do{if(r.prev.next===r){if(Pk(e,r.next))return r.next;if(n<=r.y&&n>=r.next.y&&r.next.y!==r.y){let v=r.x+(n-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(v<=i&&v>a&&(a=v,o=r.x<r.next.x?r:r.next,v===i))return o}}r=r.next}while(r!==p)}if(!o)return null;let s=o.x,l=o.y,u=Math.min(n,l),c=Math.max(n,l),f=1/0;for(let h=0,d=0;h<Qz;h++,d+=4){if(Kl[d+2]<s||Kl[d]>i||Kl[d+3]<u||Kl[d+1]>c)continue;let p=OQe(h);r=NQe(h);do{if(r.prev.next===r&&i>=r.x&&r.x>=s&&i!==r.x&&eB(n<l?i:a,n,s,l,n<l?a:i,n,r.x,r.y)){let v=Math.abs(n-r.y)/(i-r.x);(Ik(r,e)||r.y===n&&r.next.y===n&&r.next.x>i)&&(v<f||v===f&&(r.x>o.x||r.x===o.x&&j1r(o,r)))&&(o=r,f=v)}r=r.next}while(r!==p)}return o}function j1r(e,t){return Ou(e.prev,e,t.prev)<0&&Ou(t.next,e,e.next)<0}function $1r(e,t,r,i){let n=e,a=0;do n.z=jre(n.x,n.y,t,r,i),Wd[a++]=n,n=n.next;while(n!==e);W1r(a);let o=null;for(let s=0;s<a;s++){let l=Wd[s];l.prevZ=o,o&&(o.nextZ=l),o=l}o.nextZ=null}function W1r(e){if(e<=32){for(let t=1;t<e;t++){let r=Wd[t],i=r.z,n=t-1;for(;n>=0&&Wd[n].z>i;)Wd[n+1]=Wd[n],n--;Wd[n+1]=r}return}Ib.length<e&&(Ib=new Uint32Array(e),nk=new Uint32Array(e),ik=Array(e));for(let t=0;t<e;t++)Ib[t]=Wd[t].z;Tz(e,Wd,Ib,ik,nk,0),Tz(e,ik,nk,Wd,Ib,8),Tz(e,Wd,Ib,ik,nk,16),Tz(e,ik,nk,Wd,Ib,24)}function Tz(e,t,r,i,n,a){ak.fill(0);for(let s=0;s<e;s++)ak[r[s]>>>a&255]++;let o=0;for(let s=0;s<256;s++){let l=ak[s];ak[s]=o,o+=l}for(let s=0;s<e;s++){let l=r[s],u=ak[l>>>a&255]++;i[u]=t[s],n[u]=l}}function jre(e,t,r,i,n){return e=(e-r)*n|0,t=(t-i)*n|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function Y1r(e){let t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function eB(e,t,r,i,n,a,o,s){return(n-o)*(t-s)>=(e-o)*(a-s)&&(e-o)*(i-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(n-o)*(i-s)}function X1r(e,t){let r=Pk(e,t)&&Ou(e.prev,e,e.next)>0&&Ou(t.prev,t,t.next)>0;return e.next.i!==t.i&&(r||Ik(e,t)&&Ik(t,e)&&(Ou(e.prev,e,t.prev)!==0||Ou(e,t.prev,t)!==0))&&!Z1r(e,t)&&(r||K1r(e,t))}function Ou(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Pk(e,t){return e.x===t.x&&e.y===t.y}function git(e,t,r,i,n=!0){let a=Ou(e,t,r),o=Ou(e,t,i),s=Ou(r,i,e),l=Ou(r,i,t);return(a>0&&o<0||a<0&&o>0)&&(s>0&&l<0||s<0&&l>0)?!0:n?!!(a===0&&Az(e,r,t)||o===0&&Az(e,i,t)||s===0&&Az(r,e,i)||l===0&&Az(r,t,i)):!1}function Az(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function Z1r(e,t){let r=Math.min(e.x,t.x),i=Math.max(e.x,t.x),n=Math.min(e.y,t.y),a=Math.max(e.y,t.y),o=e;do{let s=o.next;if(o.x>i&&s.x>i||o.x<r&&s.x<r||o.y>a&&s.y>a||o.y<n&&s.y<n){o=s;continue}if(o.i!==e.i&&s.i!==e.i&&o.i!==t.i&&s.i!==t.i&&git(o,s,e,t))return!0;o=s}while(o!==e);return!1}function Ik(e,t){return Ou(e.prev,e,e.next)<0?Ou(e,t,e.next)>=0&&Ou(e,e.prev,t)>=0:Ou(e,t,e.prev)<0||Ou(e,e.next,t)<0}function K1r(e,t){let r=e,i=!1,n=(e.x+t.x)/2,a=(e.y+t.y)/2;do{let o=r.next;r.y>a!=o.y>a&&n<(o.x-r.x)*(a-r.y)/(o.y-r.y)+r.x&&(i=!i),r=o}while(r!==e);return i}function mit(e,t){let r=$re(e.i,e.x,e.y),i=$re(t.i,t.x,t.y),n=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=n,n.prev=r,i.next=r,r.prev=i,a.next=i,i.prev=a,i}function UQe(e,t,r,i){let n=$re(e,t,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function Rk(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ),Vre&&G1r(e.prev,e.next)}function $re(e,t,r){return{i:e,x:t,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function J1r(e,t,r,i){let n=0;for(let a=t,o=r-i;a<r;a+=i)n+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return n}function yit(e,t,r,i=!0){return new Q1r(r,t).subdividePolygonInternal(e,i)}function qb(e,t,r=!1){if(!e||e.length<1||e.length<2)return[];let i=e[0],n=e[e.length-1],a=r&&(i.x!==n.x||i.y!==n.y);if(t<2)return a?[...e,e[0]]:[...e];let o=Math.floor(zr/t),s=[];s.push(new tr(e[0].x,e[0].y));let l=e.length,u=a?l:l-1;for(let c=0;c<u;c++){let f=e[c],h=c<l-1?e[c+1]:e[0],d=f.x,p=f.y,v=h.x,m=h.y,g=d!==v,w=p!==m;if(!g&&!w)continue;let b=v-d,_=m-p,M=Math.abs(b),x=Math.abs(_),T=d,A=p;for(;;){let E=b>0?(Math.floor(T/o)+1)*o:(Math.ceil(T/o)-1)*o,S=_>0?(Math.floor(A/o)+1)*o:(Math.ceil(A/o)-1)*o,C=Math.abs(T-E),k=Math.abs(A-S),D=Math.abs(T-v),F=Math.abs(A-m),P=g?C/M:1/0,R=w?k/x:1/0;if((D<=C||!g)&&(F<=k||!w))break;if(P<R&&g||!w){T=E,A+=_*P;let L=new tr(T,Math.round(A));(s[s.length-1].x!==L.x||s[s.length-1].y!==L.y)&&s.push(L)}else{T+=b*R,A=S;let L=new tr(Math.round(T),A);(s[s.length-1].x!==L.x||s[s.length-1].y!==L.y)&&s.push(L)}}let y=new tr(v,m);(s[s.length-1].x!==y.x||s[s.length-1].y!==y.y)&&s.push(y)}return s}function egr(e){let t=[],r=[];for(let i of e)if(i.length!==0){i!==e[0]&&t.push(r.length/2);for(let n of i)r.push(n.x),r.push(n.y)}return{flattened:r,holeIndices:t}}function tgr(e,t){let r=[];for(let i=0;i<t.length;i+=3){let n=t[i],a=t[i+1],o=t[i+2],s=e[n*2],l=e[n*2+1],u=e[a*2],c=e[a*2+1],f=e[o*2],h=e[o*2+1],d=u-s,p=c-l,v=f-s;d*(h-l)-p*v>0?(r.push(n),r.push(o),r.push(a)):(r.push(n),r.push(a),r.push(o))}return r}function rgr(e,t,r){if(t.length===0)throw Error("Subdivision vertex ring is empty.");let i=0,n=e[t[0]*2];for(let l=1;l<t.length;l++){let u=e[t[l]*2];u<n&&(n=u,i=l)}let a=t.length,o=i,s=(o+1)%a;for(;;){let l=o-1>=0?o-1:a-1,u=(s+1)%a,c=e[t[l]*2],f=e[t[l]*2+1],h=e[t[u]*2],d=e[t[u]*2+1],p=e[t[o]*2],v=e[t[o]*2+1],m=e[t[s]*2],g=e[t[s]*2+1],w=!1;if(c<h)w=!0;else if(c>h)w=!1;else{let b=g-v,_=-(m-p),M=v<g?1:-1;((c-p)*b+(f-v)*_)*M>((h-p)*b+(d-v)*_)*M&&(w=!0)}if(w){let b=t[l],_=t[o],M=t[s];b!==_&&b!==M&&_!==M&&r.push(M,_,b),o--,o<0&&(o=a-1)}else{let b=t[u],_=t[o],M=t[s];b!==_&&b!==M&&_!==M&&r.push(M,_,b),s++,s>=a&&(s=0)}if(l===u)break}}function xit(e,t,r,i,n,a,o,s,l){let u=n.length/2,c=o&&s&&l;if(u<Ws.MAX_VERTEX_ARRAY_LENGTH){let f=t.prepareSegment(u,r,i),h=f.vertexLength;for(let v=0;v<a.length;v+=3)i.emplaceBack(h+a[v],h+a[v+1],h+a[v+2]);f.vertexLength+=u,f.primitiveLength+=a.length/3;let d,p;c&&(p=o.prepareSegment(u,r,s),d=p.vertexLength,p.vertexLength+=u);for(let v=0;v<n.length;v+=2)e(n[v],n[v+1]);if(c)for(let v of l){for(let m=1;m<v.length;m+=2)s.emplaceBack(d+v[m-1],d+v[m]);p.primitiveLength+=v.length/2}}else igr(t,r,i,n,a,e),c&&ngr(o,r,s,n,l,e),t.forceNewSegmentOnNextPrepare(),o==null||o.forceNewSegmentOnNextPrepare()}function bk(e,t,r,i,n,a,o){if(a){let s=i.count;return r(t[n*2],t[n*2+1]),e[n]=i.count,i.count++,o.vertexLength++,s}return e[n]}function igr(e,t,r,i,n,a){let o=[];for(let f=0;f<i.length/2;f++)o.push(-1);let s={count:0},l=0,u=e.getOrCreateLatestSegment(t,r),c=u.vertexLength;for(let f=2;f<n.length;f+=3){let h=n[f-2],d=n[f-1],p=n[f],v=o[h]<l,m=o[d]<l,g=o[p]<l,w=+!!v+ +!!m+ +!!g;u.vertexLength+w>Ws.MAX_VERTEX_ARRAY_LENGTH&&(u=e.createNewSegment(t,r),l=s.count,v=!0,m=!0,g=!0,c=0);let b=bk(o,i,a,s,h,v,u),_=bk(o,i,a,s,d,m,u),M=bk(o,i,a,s,p,g,u);r.emplaceBack(c+b-l,c+_-l,c+M-l),u.primitiveLength++}}function ngr(e,t,r,i,n,a){let o=[];for(let f=0;f<i.length/2;f++)o.push(-1);let s={count:0},l=0,u=e.getOrCreateLatestSegment(t,r),c=u.vertexLength;for(let f of n)for(let h=1;h<f.length;h+=2){let d=f[h-1],p=f[h],v=o[d]<l,m=o[p]<l,g=+!!v+ +!!m;u.vertexLength+g>Ws.MAX_VERTEX_ARRAY_LENGTH&&(u=e.createNewSegment(t,r),l=s.count,v=!0,m=!0,c=0);let w=bk(o,i,a,s,d,v,u),b=bk(o,i,a,s,p,m,u);r.emplaceBack(c+w-l,c+b-l),u.primitiveLength++}}function Xre(e,t){return e.x===t.x&&(e.x<0||e.x>8192)||e.y===t.y&&(e.y<0||e.y>8192)}function VQe(e){return e.every(t=>t.x<0)||e.every(t=>t.x>8192)||e.every(t=>t.y<0)||e.every(t=>t.y>8192)}function Tit(e){let t=e.length;if(t<=1)return[e];let r=[],i,n;for(let a=0;a<t;a++){let o=dgr(e[a]);o!==0&&(n===void 0&&(n=o<0),n===o<0?(i&&r.push(i),i=[e[a]]):i&&i.push(e[a]))}return i&&r.push(i),r}function dgr(e){let t=0;for(let r=0,i=e.length,n=i-1,a,o;r<i;n=r++)a=e[r],o=e[n],t+=(o.x-a.x)*(a.y+o.y);return t}function vgr(e){let t=null,r=e.readVarint()+e.pos;for(;e.pos<r;){let i=e.readVarint();t=i===10?e.readString():i===21?e.readFloat():i===25?e.readDouble():i===32?e.readVarint(!0):i===40?e.readVarint():i===48?e.readSVarint():i===56?e.readBoolean():(e.skip(i),null)}if(t==null)throw Error("unknown feature value");return t}function Mit(e){return Ait*Math.cos(e*Math.PI/180)}function e3(e){return(180+e)/360}function t3(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function rx(e,t){return e/Mit(t)}function GB(e){return e*360-180}function LT(e){let t=180-e*360;return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}function one(e,t){return e*Mit(LT(t))}function mgr(e){return 1/Math.cos(e*Math.PI/180)}function sne(e,t,r){let i=1/(1<<r.z);return new wo(e/zr*i+r.x*i,t/zr*i+r.y*i)}function ygr(e,t,r){return sne(e,t,r).toLngLat()}function Sv(e,t){let r=Jn(t.lat,-85.051129,Tv);return new tr(e3(t.lng)*e,t3(r)*e)}function NT(e,t){return new wo(t.x/e,t.y/e).toLngLat()}function UT(e){return e.cameraToCenterDistance*Math.min(Math.tan(js(90-e.pitch))*.85,Math.tan(js(ix-e.pitch)))}function HB(e,t){let r=e.canonical,i=t/If(r.z),n=r.x+2**r.z*e.wrap,a=new Float64Array(16);return Qd(a),eu(a,a,[n*i,r.y*i,0]),Rc(a,a,[i/zr,i/zr,1]),a}function lne(e,t,r,i,n){let a=wo.fromLngLat(e,t),o=n*rx(1,e.lat),{x:s,y:l,z:u}=jB(r,i),c=o*-s,f=o*-l,h=o*u;return new wo(a.x+c,a.y+f,a.z+h)}function Eit(e){let t=rx(1,e.center.lat)*e.worldSize;return lne(e.center,e.elevation,e.pitch,e.bearing,e.cameraToCenterDistance/t)}function jB(e,t){let r=js(e),i=js(t),n=Math.cos(-r),a=Math.sin(r);return{x:a*Math.sin(i),y:-a*Math.cos(i),z:n}}function GQe(e,t,r){if(t<=0||!e||e.length===0)return e;let i=xgr(t,r);return e.map(n=>_gr(n,i))}function xgr(e,t){let r=ygr(zr/2,zr/2,t),i=wo.fromLngLat(r).meterInMercatorCoordinateUnits(),n=(1<<t.z)*zr;return e*i*n}function _gr(e,t){if(!e||e.length<3)return e;let r=e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y,i=r?e.length-1:e.length;if(i<3)return e;let n=[];for(let o=0;o<i;o++){let s=e[(o-1+i)%i],l=e[o],u=e[(o+1)%i];if(Xre(s,l)||Xre(l,u)){n.push(l.clone());continue}wgr(n,s,l,u,t)}let a=bgr(n);return a.length<3?e:(r&&a.push(a[0].clone()),a)}function bgr(e){let t=[];for(let r of e){let i=r.round(),n=t[t.length-1];((n==null?void 0:n.x)!==i.x||(n==null?void 0:n.y)!==i.y)&&t.push(i)}for(;t.length>1&&t[0].x===t[t.length-1].x&&t[0].y===t[t.length-1].y;)t.pop();return t}function wgr(e,t,r,i,n){let a=t.sub(r),o=i.sub(r),s=a.mag(),l=o.mag();if(s<1e-6||l<1e-6){e.push(r.clone());return}a._div(s),o._div(l);let u=a.x*o.x+a.y*o.y;if(Math.abs(u)>Math.cos(5*Math.PI/180)){e.push(r.clone());return}let c=.2,f=Math.min(n,s*c,l*c),h=r.add(a.mult(f)),d=r.add(o.mult(f)),p=Math.sqrt((1+u)/2),v=r.add(a.add(o)._unit()._mult(f/p)),m=h.sub(v).angleWith(d.sub(v)),g=Math.max(2,Math.ceil(Math.abs(m)/(Math.PI/6)-1e-6));for(let w=0;w<=g;w++)e.push(h.rotateAround(w/g*m,v))}function ok(e,t,r,i,n,a,o,s){e.emplaceBack(t,r,Math.floor(i*Xte)*2+o,n*Xte*2,a*Xte*2,Math.round(s))}function Tgr(e,t){for(let r=0;r<t.length;r++){let i=t[r];(r!==t.length-1||t[0].x!==i.x||t[0].y!==i.y)&&(e.x+=i.x,e.y+=i.y,e.sampleCount++)}}function sk(e,t){return e.x*t.x+e.y*t.y}function HQe(e,t){if(e.length===1){let r=0,i=t[r++],n;for(;!n||i.equals(n);)if(n=t[r++],!n)return 1/0;for(;r<t.length;r++){let a=t[r],o=e[0],s=n.sub(i),l=a.sub(i),u=o.sub(i),c=sk(s,s),f=sk(s,l),h=sk(l,l),d=sk(u,s),p=sk(u,l),v=c*h-f*f,m=(h*d-f*p)/v,g=(c*p-f*d)/v,w=1-m-g,b=i.z*w+n.z*m+a.z*g;if(isFinite(b))return b}return 1/0}{let r=1/0;for(let i of t)r=Math.min(r,i.z);return r}}function Dgr(e,t,r){let i=1/0;rit(r,t)&&(i=HQe(r,t[0]));for(let n=0;n<t.length;n++){let a=t[n],o=e[n];for(let s=0;s<a.length-1;s++){let l=a[s],u=a[s+1],c=o[s],f=[l,u,o[s+1],c,l];Qie(r,f)&&(i=Math.min(i,HQe(r,f)))}}return i!==1/0&&i}function Fgr(e,t,r,i){let n=[],a=[],o=i[8]*t,s=i[9]*t,l=i[10]*t,u=i[11]*t,c=i[8]*r,f=i[9]*r,h=i[10]*r,d=i[11]*r;for(let p of e){let v=[],m=[];for(let g of p){let w=g.x,b=g.y,_=i[0]*w+i[4]*b+i[12],M=i[1]*w+i[5]*b+i[13],x=i[2]*w+i[6]*b+i[14],T=i[3]*w+i[7]*b+i[15],A=_+o,y=M+s,E=x+l,S=T+u,C=_+c,k=M+f,D=x+h,F=T+d,P=new tr(A/S,y/S);P.z=E/S,v.push(P);let R=new tr(C/F,k/F);R.z=D/F,m.push(R)}n.push(v),a.push(m)}return[n,a]}function Lgr(e,t,r){let i=[];for(let n of e){let a=[n.x,n.y,r,1];Uu(a,a,t),i.push(new tr(a[0]/a[3],a[1]/a[3]))}return i}function WQe(e,t){return t>0?t+2*e:e}function Wgr(e){return/[\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C-\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u070D\u070F-\u074A\u074D-\u077F\u07C0-\u07FA\u07FD-\u07FF\u0840-\u085B\u085E\u0860-\u086A\u0870-\u0891\u0897-\u08E1\u08E3-\u08FF\u1800\u1801\u1804\u1806-\u1819\u1820-\u1878\u1880-\u18AA\uA840-\uA877\uFB50-\uFD3D\uFD40-\uFDCF\uFDF0-\uFDFF\uFE70-\uFE74\uFE76-\uFEFC]|\uD802[\uDEC0-\uDEE6\uDEEB-\uDEF6\uDF80-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]|\uD803[\uDD00-\uDD27\uDD30-\uDD39\uDE60-\uDE7E\uDEC2-\uDEC7\uDED0-\uDED8\uDEFA-\uDEFF\uDF30-\uDF59\uDF70-\uDF89\uDFB0-\uDFCB]|\uD805[\uDE60-\uDE6C]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9C-\uDC9F]|\uD83A[\uDD00-\uDD4B\uDD50-\uDD59\uDD5E\uDD5F]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]/gim.test(String.fromCodePoint(e))}function Ygr(e){return/[\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C-\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u070D\u070F-\u074A\u074D-\u07B1\u07C0-\u07FA\u07FD-\u082D\u0830-\u083E\u0840-\u085B\u085E\u0860-\u086A\u0870-\u0891\u0897-\u08E1\u08E3-\u08FF\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFD3D\uFD40-\uFDCF\uFDF0-\uFDFF\uFE70-\uFE74\uFE76-\uFEFC]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC57-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD1F-\uDD39\uDD3F-\uDD59\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F-\uDE48\uDE50-\uDE58\uDE60-\uDE9F\uDEC0-\uDEE6\uDEEB-\uDEF6\uDF00-\uDF35\uDF39-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD27\uDD30-\uDD39\uDD40-\uDD65\uDD69-\uDD85\uDD8E\uDD8F\uDE60-\uDE7E\uDE80-\uDEA9\uDEAB-\uDEAD\uDEB0\uDEB1\uDEC2-\uDEC7\uDED0-\uDED8\uDEFA-\uDF27\uDF30-\uDF59\uDF70-\uDF89\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59\uDD5E\uDD5F]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]/gim.test(String.fromCodePoint(e))}function Iit(e){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(e))}function Xgr(e){return/[\u02EA\u02EB\u2E80-\u2FDF\u2FF0-\u303F\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FD-\u30FF\u3105-\u312F\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(e))}function $B(e){return/[\u02EA\u02EB\u1100-\u11FF\u1401-\u167F\u18B0-\u18FF\u2065\u20DD-\u20E0\u20E2-\u20E4\u2B97\u2BF0-\u2BFF\u2E50\u2E51\u2E80-\u3007\u3012\u3013\u3020-\u302F\u3031-\u30FB\u30FD-\uA4CF\uA960-\uA97F\uAC00-\uD7FF\uF900-\uFAFF\uFE10-\uFE1F\uFE30-\uFE48\uFE50-\uFE57\uFE5F-\uFE62\uFE67-\uFE6F\uFF00-\uFF07\uFF0A-\uFF0C\uFF0E-\uFF19\uFF1F-\uFF3A\uFF3C\uFF3E\uFF40-\uFF5A\uFFE0-\uFFE2\uFFE4-\uFFE7\uFFF0-\uFFF8]|\uD802[\uDD80-\uDD9F]|\uD805[\uDD80-\uDDFF]|\uD806[\uDE00-\uDEBF]|[\uD80C-\uD810\uD81C-\uD822\uD83C\uD83D\uD840-\uD87E\uD880-\uD8BE][\uDC00-\uDFFF]|\uD811[\uDC00-\uDE7F]|\uD81B[\uDFE0-\uDFFF]|\uD823[\uDC00-\uDDFF]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFF]|\uD833[\uDEC0-\uDFCF]|\uD834[\uDC00-\uDDFF\uDEE0-\uDF7F]|\uD836[\uDC00-\uDEAF]|\uD83E[\uDD00-\uDEFF]|[\uD87F\uD8BF][\uDC00-\uDFFD]/gim.test(String.fromCodePoint(e))}function Zgr(e){return/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(e))}function Kgr(e){return/[\r\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0600-\u0605\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DD\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u070F\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0890\u0891\u0897-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E33-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB3-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1037\u1039-\u103E\u1056-\u1059\u105E-\u1060\u1071-\u1074\u1082\u1084-\u1086\u108D\u109D\u1100-\u11FF\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60\u1A62\u1A65-\u1A7C\u1A7F\u1AB0-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA960-\uA97C\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDEFA-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCBD\uDCC2\uDCCD\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC2\uDDC3\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74\uDFB8-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFCA\uDFCC-\uDFD2\uDFE1\uDFE2]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF1F\uDF22-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE84-\uDE99\uDF60-\uDF67]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00-\uDF03\uDF34-\uDF3A\uDF3E-\uDF42\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDD63\uDD67-\uDD6A\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDDE6-\uDDFF\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF]/.test(e)}function XQe(e){return/[\u0E01-\u0E3A\u0E40-\u0E4E\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0EDC-\u0EDF\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA\u1000-\u103F\u1050-\u108F\u109A-\u109F\u1780-\u17D3\u17D7\u17DC\u17DD\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19DE\u19DF\u1A20-\u1A5E\u1A60-\u1A7C\u1AA0-\u1AAD\u1B00-\u1B4C\u1B4E-\u1B7F\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE-\uA9EF\uA9FA-\uA9FE\uAA60-\uAAC2\uAADB-\uAADF]|\uD805[\uDF00-\uDF1A\uDF1D-\uDF2B\uDF3A\uDF3B\uDF3F-\uDF46]/gim.test(String.fromCodePoint(e))}function Jgr(e,t){return/(?:[\u1039\u17D2\u1A60\u1BAB\u200D\uAAF6]|\uD802\uDE3F|\uD804[\uDD33\uDFD0]|\uD806[\uDD3E\uDE47\uDE99]|\uD807[\uDD45\uDD97\uDF42])$/.test(e)||new RegExp("^\\p{gc=Mc}","u").test(t)}function imr(e,t,r){let i=0;for(let n of e.split(";")){let[a,o]=n.split(",").map(l=>parseInt(l,36)),s=i+a;for(let l=s;l<s+o;l++)r.set(l,t);i=s+o}}function nmr(e){var t;return(t=Rit.get(e))!=null?t:"U"}function amr(e){return e==="D"||e==="L"||e==="C"}function omr(e){return e==="D"||e==="R"||e==="C"}function smr(e,t,r){return e==="D"?t&&r?3:t?1:r?2:0:e==="R"?+!!t:e==="L"?r?2:0:null}function lmr(e){return[...e].map(t=>{let r=t.codePointAt(0);return{codePoint:r,type:nmr(r),form:null}})}function umr(e){let t=e.filter(r=>r.type!=="T");for(let r=0;r<t.length;r++){let i=t[r],n=r>0&&amr(t[r-1].type),a=r+1<t.length&&omr(t[r+1].type);i.form=smr(i.type,n,a)}}function cmr(e){let t=!1;for(let r of e)r.type==="T"?r.form=t?3:0:t=r.form===2||r.form===3}function fmr(e){let t=[];for(let r=0;r<e.length;r++){let i=e[r];if(i.codePoint!==ZQe){t.push(i);continue}let n=r+1;for(;n<e.length&&e[n].type==="T";)n++;let a=e[n],o=a&&tmr[String.fromCodePoint(ZQe,a.codePoint)];if(!o){t.push(i);continue}let s=i.form===3||i.form===1;t.push({codePoint:o[+!!s],type:"R",form:0}),t.push(...e.slice(r+1,n)),r=n}return t}function hmr(e){if(e.form===null)return e.codePoint;let t=emr[e.codePoint];return t&&(t[e.form]||t[0])||e.codePoint}function dmr(e){if(!rmr.test(e))return e;let t=lmr(e);return umr(t),cmr(t),fmr(t).map(r=>String.fromCodePoint(hmr(r))).join("")}function pmr(e,t,r){var n;let i=t.layout.get("text-transform").evaluate(r,{});return i==="uppercase"?e=e.toLocaleUpperCase():i==="lowercase"&&(e=e.toLocaleLowerCase()),((n=tB.applyArabicShaping)!=null?n:dmr)(e)}function vmr(e,t,r){for(let i of e.sections)i.text=pmr(i.text,t,r);return e}function gmr(e){let t={},r={},i=[],n=0;function a(u){i.push(e[u]),n++}function o(u,c,f){let h=r[u];return delete r[u],r[c]=h,i[h].geometry[0].pop(),i[h].geometry[0]=i[h].geometry[0].concat(f[0]),h}function s(u,c,f){let h=t[c];return delete t[c],t[u]=h,i[h].geometry[0].shift(),i[h].geometry[0]=f[0].concat(i[h].geometry[0]),h}function l(u,c,f){let h=f?c[0][c[0].length-1]:c[0][0];return`${u}:${h.x}:${h.y}`}for(let u=0;u<e.length;u++){let c=e[u],f=c.geometry,h=c.text?c.text.toString():null;if(!h){a(u);continue}let d=l(h,f),p=l(h,f,!0);if(d in r&&p in t&&r[d]!==t[p]){let v=s(d,p,f),m=o(d,p,i[v].geometry);delete t[d],delete r[p],r[l(h,i[m].geometry,!0)]=m,i[v].geometry=null}else d in r?o(d,p,f):p in t?s(d,p,f):(a(u),t[d]=n-1,r[p]=n-1)}return i.filter(u=>u.geometry)}function Jre(e){if(!zit||!Kgr(e))return[...e];Sz!=null||(Sz=new Intl.Segmenter(void 0,{granularity:"grapheme"}));let t=[];for(let{segment:r}of Sz.segment(e)){let i=t.length-1;i>=0&&Jgr(t[i],r)?t[i]+=r:t.push(r)}return t}function mmr(e){let t=new Set;if(zit){Ez!=null||(Ez=new Intl.Segmenter(void 0,{granularity:"word"}));for(let{index:i}of Ez.segment(e))t.add(i);return t}let r=0;for(let i of e.split(new RegExp("\\b|(?=\\p{Ideo})","u")))t.add(r),r+=i.length;return t}function r8(e){let t=e.codePointAt(0);return e.length>(t>65535?2:1)}function une(e){return/\s/u.test(String.fromCodePoint(e))}function Qre(e){for(let t of e)if($B(t.codePointAt(0)))return!0;return!1}function ymr(e){for(let t of e)if(!xmr(t.codePointAt(0)))return!1;return!0}function xmr(e){return!Wgr(e)}function KQe(e){return!($B(e)||Zgr(e))}function Bit(e){return new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(e))}function qit(e){return Ygr(e)}function Oit(e){for(let t of e)if(qit(t.codePointAt(0)))return!0;return!1}function _mr(e){let t="",r={premature:!0,value:void 0},i=e[Symbol.iterator](),n=i.next(),a=e[Symbol.iterator]();a.next();let o=a.next();for(;!n.done;)(o.done||!KQe(o.value.codePointAt(0))||vT[o.value])&&(r.premature||!KQe(r.value.codePointAt(0))||vT[r.value])&&vT[n.value]?t+=vT[n.value]:t+=n.value,r={value:n.value,premature:!1},n=i.next(),o=a.next();return t}function JQe(e,t,r,i,n,a){if("fontStack"in t){let o=r[t.fontStack],s=o==null?void 0:o[e];if(s)return s.metrics.advance*t.scale+n;let l=0;for(let u of e){let c=o==null?void 0:o[u];c&&(l+=c.metrics.advance*t.scale+n)}return l}{let o=i[t.imageName];return o?o.displaySize[0]*t.scale*24/a+n:0}}function QQe(e,t,r,i){let n=(e-t)**2;return i?e<t?n/2:n*2:n+Math.abs(r)*r}function eet(e){return/^\s+$/u.test(e)}function Tmr(e,t,r){let i=0;return(e===10||e===13)&&(i-=1e4),r&&(i+=150),(e===40||e===65288)&&(i+=50),(t===41||t===65289)&&(i+=50),i}function tet(e,t,r,i,n,a){let o=null,s=QQe(t,r,n,a);for(let l of i){let u=QQe(t-l.x,r,n,a)+l.badness;u<=s&&(o=l,s=u)}return{index:e,x:t,priorBreak:o,badness:s}}function Nit(e){return e?Nit(e.priorBreak).concat(e.index):[]}function Amr(){return(function(e){var t={R:"13k,1a,2,3,3,2+1j,ch+16,a+1,5+2,2+n,5,a,4,6+16,4+3,h+1b,4mo,179q,2+9,2+11,2i9+7y,2+68,4,3+4,5+13,4+3,2+4k,3+29,8+cf,1t+7z,w+17,3+3m,1t+3z,16o1+5r,8+30,8+mc,29+1r,29+4v,75+73",EN:"1c+9,3d+1,6,187+9,513,4+5,7+9,sf+j,175h+9,qw+q,161f+1d,4xt+a,25i+9",ES:"17,2,6dp+1,f+1,av,16vr,mx+1,4o,2",ET:"z+2,3h+3,b+1,ym,3e+1,2o,p4+1,8,6u,7c,g6,1wc,1n9+4,30+1b,2n,6d,qhx+1,h0m,a+1,49+2,63+1,4+1,6bb+3,12jj",AN:"16o+5,2j+9,2+1,35,ed,1ff2+9,87+u",CS:"18,2+1,b,2u,12k,55v,l,17v0,2,3,53,2+1,b",B:"a,3,f+2,2v,690",S:"9,2,k",WS:"c,k,4f4,1vk+a,u,1j,335",ON:"x+1,4+4,h+5,r+5,r+3,z,5+3,2+1,2+1,5,2+2,3+4,o,w,ci+1,8+d,3+d,6+8,2+g,39+1,9,6+1,2,33,b8,3+1,3c+1,7+1,5r,b,7h+3,sa+5,2,3i+6,jg+3,ur+9,2v,ij+1,9g+9,7+a,8m,4+1,49+x,14u,2+2,c+2,e+2,e+2,e+1,i+n,e+e,2+p,u+2,e+2,36+1,2+3,2+1,b,2+2,6+5,2,2,2,h+1,5+4,6+3,3+f,16+2,5+3l,3+81,1y+p,2+40,q+a,m+13,2r+ch,2+9e,75+hf,3+v,2+2w,6e+5,f+6,75+2a,1a+p,2+2g,d+5x,r+b,6+3,4+o,g,6+1,6+2,2k+1,4,2j,5h+z,1m+1,1e+f,t+2,1f+e,d+3,4o+3,2s+1,w,535+1r,h3l+1i,93+2,2s,b+1,3l+x,2v,4g+3,21+3,kz+1,g5v+1,5a,j+9,n+v,2,3,2+8,2+1,3+2,2,3,46+1,4+4,h+5,r+5,r+a,3h+2,4+6,b+4,78,1r+24,4+c,4,1hb,ey+6,103+j,16j+c,1ux+7,5+g,fsh,jdq+1t,4,57+2e,p1,1m,1m,1m,1m,4kt+1,7j+17,5+2r,d+e,3+e,2+e,2+10,m+4,w,1n+5,1q,4z+5,4b+rb,9+c,4+c,4+37,d+2g,8+b,l+b,5+1j,9+9,7+13,9+t,3+1,27+3c,2+29,2+3q,d+d,3+4,4+2,6+6,a+o,8+6,a+2,e+6,16+42,2+1i",BN:"0+8,6+d,2s+5,2+p,e,4m9,1kt+2,2b+5,5+5,17q9+v,7k,6p+8,6+1,119d+3,440+7,96s+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+75,6p+2rz,1ben+1,1ekf+1,1ekf+1",NSM:"lc+33,7o+6,7c+18,2,2+1,2+1,2,21+a,1d+k,h,2u+6,3+5,3+1,2+3,10,v+q,2k+a,1n+8,a,p+3,2+8,2+2,2+4,18+2,3c+e,2+v,1k,2,5+7,5,4+6,b+1,u,1n,5+3,9,l+1,r,3+1,1m,5+1,5+1,3+2,4,v+1,4,c+1,1m,5+4,2+1,5,l+1,n+5,2,1n,3,2+3,9,8+1,c+1,v,1q,d,1f,4,1m+2,6+2,2+3,8+1,c+1,u,1n,g+1,l+1,t+1,1m+1,5+3,9,l+1,u,21,8+2,2,2j,3+6,d+7,2r,3+8,c+5,23+1,s,2,2,1k+d,2+4,2+1,6+a,2+z,a,2v+3,2+5,2+1,3+1,q+1,5+2,h+3,e,3+1,7,g,jk+2,qb+2,u+2,u+1,v+1,1t+1,2+6,9,3+a,a,1a+2,3c+1,z,3b+2,5+1,a,7+2,64+1,3,1n,2+6,2,2,3+7,7+9,3,1d+g,1s+3,1d,2+4,2,6,15+8,d+1,x+3,3+1,2+2,1l,2+1,4,2+2,1n+7,3+1,49+2,2+c,2+6,5,7,4+1,5j+1l,2+4,k1+w,2db+2,3y,2p+v,ff+3,30+1,n9x+3,2+9,x+1,29+1,7l,4,5,q+1,6,48+1,r+h,e,13+7,q+a,1b+2,1d,3+3,3+1,14,1w+5,3+1,3+1,d,9,1c,1g,2+2,3+1,6+1,2,17+1,9,6n,3,5,fn5,ki+f,h+f,r2,6b,46+4,1af+2,2+1,6+3,15+2,5,4m+1,fy+3,as+1,4a+a,4x,1j+e,1l+2,1e+3,3+1,1y+2,11+4,2+7,1r,d+1,1h+8,b+3,3,2o+2,3,2+1,7,4h,4+7,m+1,1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+5,3+1,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2d+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,f0c+4,1o+6,t5,1s+3,2a,f5l+1,43t+2,i+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,gzhy+6n",AL:"16w,3,2,e+1b,z+2,2+2s,g+1,8+1,b+m,2+t,s+2i,c+e,4h+f,1d+1e,1bwe+dp,3+3z,x+c,2+1,35+3y,2rm+z,5+7,b+5,dt+l,c+u,17nl+27,1t+27,4x+6n,3+d",LRO:"6ct",RLO:"6cu",LRE:"6cq",RLE:"6cr",PDF:"6cs",LRI:"6ee",RLI:"6ef",FSI:"6eg",PDI:"6eh"},r={},i={};r.L=1,i[1]="L",Object.keys(t).forEach(function(Ce,be){r[Ce]=1<<be+1,i[r[Ce]]=Ce}),Object.freeze(r);var n=r.LRI|r.RLI|r.FSI,a=r.L|r.R|r.AL,o=r.B|r.S|r.WS|r.ON|r.FSI|r.LRI|r.RLI|r.PDI,s=r.BN|r.RLE|r.LRE|r.RLO|r.LRO|r.PDF,l=r.S|r.WS|r.B|n|r.PDI|s,u=null;function c(){if(!u){u=new Map;var Ce=0;for(var be in t)if(t.hasOwnProperty(be))for(var he=t[be],oe="",Ee=void 0,ye=!1,ue=0,ee=0;ee<=he.length+1;ee+=1){var ae=he[ee];if(ae!==","&&ee!==he.length)ae==="+"?(ye=!0,ue=Ce=ue+parseInt(oe,36),oe=""):oe+=ae;else{ye?Ee=Ce+parseInt(oe,36):(ue=Ce=ue+parseInt(oe,36),Ee=Ce),ye=!1,oe="",ue=Ee;for(var xe=Ce;xe<Ee+1;xe+=1)u.set(xe,r[be])}}}}function f(Ce){return c(),u.get(Ce.codePointAt(0))||r.L}function h(Ce){return i[f(Ce)]}var d={pairs:"14>1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1",canonical:"6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye"};function p(Ce,be){var he=0,oe=new Map,Ee=be&&new Map,ye;return Ce.split(",").forEach(function ue(ee){if(ee.indexOf("+")!==-1)for(var ae=+ee;ae--;)ue(ye);else{ye=ee;var xe=ee.split(">"),re=xe[0],pe=xe[1];re=String.fromCodePoint(he+=parseInt(re,36)),pe=String.fromCodePoint(he+=parseInt(pe,36)),oe.set(re,pe),be&&Ee.set(pe,re)}}),{map:oe,reverseMap:Ee}}var v,m,g;function w(){if(!v){var Ce=p(d.pairs,!0),be=Ce.map,he=Ce.reverseMap;v=be,m=he,g=p(d.canonical,!1).map}}function b(Ce){return w(),v.get(Ce)||null}function _(Ce){return w(),m.get(Ce)||null}function M(Ce){return w(),g.get(Ce)||null}var x=r.L,T=r.R,A=r.EN,y=r.ES,E=r.ET,S=r.AN,C=r.CS,k=r.B,D=r.S,F=r.ON,P=r.BN,R=r.NSM,L=r.AL,I=r.LRO,B=r.RLO,O=r.LRE,$=r.RLE,Y=r.PDF,K=r.LRI,j=r.RLI,q=r.FSI,J=r.PDI;function U(Ce,be){for(var he=125,oe=new Uint32Array(Ce.length),Ee=0;Ee<Ce.length;Ee++)oe[Ee]=f(Ce[Ee]);var ye=new Map;function ue(yo,nu){var Zo=oe[yo];oe[yo]=nu,ye.set(Zo,ye.get(Zo)-1),Zo&o&&ye.set(o,ye.get(o)-1),ye.set(nu,(ye.get(nu)||0)+1),nu&o&&ye.set(o,(ye.get(o)||0)+1)}for(var ee=new Uint8Array(Ce.length),ae=new Map,xe=[],re=null,pe=0;pe<Ce.length;pe++)re||xe.push(re={start:pe,end:Ce.length-1,level:be==="rtl"?1:be==="ltr"?0:iu(pe,!1)}),oe[pe]&k&&(re.end=pe,re=null);for(var we=$|O|B|I|n|J|Y|k,Fe=function(yo){return yo+(yo&1?1:2)},Se=function(yo){return yo+(yo&1?2:1)},ke=0;ke<xe.length;ke++){re=xe[ke];var _e=[{_level:re.level,_override:0,_isolate:0}],Ie=void 0,Oe=0,Qe=0,et=0;ye.clear();for(var _t=re.start;_t<=re.end;_t++){var ut=oe[_t];if(Ie=_e[_e.length-1],ye.set(ut,(ye.get(ut)||0)+1),ut&o&&ye.set(o,(ye.get(o)||0)+1),ut&we)if(ut&($|O)){ee[_t]=Ie._level;var vt=(ut===$?Se:Fe)(Ie._level);vt<=he&&!Oe&&!Qe?_e.push({_level:vt,_override:0,_isolate:0}):Oe||Qe++}else if(ut&(B|I)){ee[_t]=Ie._level;var Xe=(ut===B?Se:Fe)(Ie._level);Xe<=he&&!Oe&&!Qe?_e.push({_level:Xe,_override:ut&B?T:x,_isolate:0}):Oe||Qe++}else if(ut&n){ut&q&&(ut=iu(_t+1,!0)===1?j:K),ee[_t]=Ie._level,Ie._override&&ue(_t,Ie._override);var mt=(ut===j?Se:Fe)(Ie._level);mt<=he&&Oe===0&&Qe===0?(et++,_e.push({_level:mt,_override:0,_isolate:1,_isolInitIndex:_t})):Oe++}else if(ut&J){if(Oe>0)Oe--;else if(et>0){for(Qe=0;!_e[_e.length-1]._isolate;)_e.pop();var bt=_e[_e.length-1]._isolInitIndex;bt!=null&&(ae.set(bt,_t),ae.set(_t,bt)),_e.pop(),et--}Ie=_e[_e.length-1],ee[_t]=Ie._level,Ie._override&&ue(_t,Ie._override)}else ut&Y?(Oe===0&&(Qe>0?Qe--:!Ie._isolate&&_e.length>1&&(_e.pop(),Ie=_e[_e.length-1])),ee[_t]=Ie._level):ut&k&&(ee[_t]=re.level);else ee[_t]=Ie._level,Ie._override&&ut!==P&&ue(_t,Ie._override)}for(var Ne=[],Ue=null,Ge=re.start;Ge<=re.end;Ge++){var je=oe[Ge];if(!(je&s)){var Re=ee[Ge],Ve=je&n,ct=je===J;Ue&&Re===Ue._level?(Ue._end=Ge,Ue._endsWithIsolInit=Ve):Ne.push(Ue={_start:Ge,_end:Ge,_level:Re,_startsWithPDI:ct,_endsWithIsolInit:Ve})}}for(var Tt=[],Xt=0;Xt<Ne.length;Xt++){var Vt=Ne[Xt];if(!Vt._startsWithPDI||Vt._startsWithPDI&&!ae.has(Vt._start)){for(var lr=[Ue=Vt],ur=void 0;Ue&&Ue._endsWithIsolInit&&(ur=ae.get(Ue._end))!=null;)for(var Bt=Xt+1;Bt<Ne.length;Bt++)if(Ne[Bt]._start===ur){lr.push(Ue=Ne[Bt]);break}for(var Zt=[],kr=0;kr<lr.length;kr++)for(var $e=lr[kr],tt=$e._start;tt<=$e._end;tt++)Zt.push(tt);for(var st=ee[Zt[0]],xt=re.level,Je=Zt[0]-1;Je>=0;Je--)if(!(oe[Je]&s)){xt=ee[Je];break}var Ct=Zt[Zt.length-1],ir=ee[Ct],hr=re.level;if(!(oe[Ct]&n)){for(var Ur=Ct+1;Ur<=re.end;Ur++)if(!(oe[Ur]&s)){hr=ee[Ur];break}}Tt.push({_seqIndices:Zt,_sosType:Math.max(xt,st)%2?T:x,_eosType:Math.max(hr,ir)%2?T:x})}}for(var si=0;si<Tt.length;si++){var ei=Tt[si],Lr=ei._seqIndices,$i=ei._sosType,Tn=ei._eosType,hn=ee[Lr[0]]&1?T:x;if(ye.get(R))for(var ta=0;ta<Lr.length;ta++){var ca=Lr[ta];if(oe[ca]&R){for(var dn=$i,Vn=ta-1;Vn>=0;Vn--)if(!(oe[Lr[Vn]]&s)){dn=oe[Lr[Vn]];break}ue(ca,dn&(n|J)?F:dn)}}if(ye.get(A))for(var ra=0;ra<Lr.length;ra++){var ds=Lr[ra];if(oe[ds]&A)for(var mo=ra-1;mo>=-1;mo--){var Rs=mo===-1?$i:oe[Lr[mo]];if(Rs&a){Rs===L&&ue(ds,S);break}}}if(ye.get(L))for(var ho=0;ho<Lr.length;ho++){var ka=Lr[ho];oe[ka]&L&&ue(ka,T)}if(ye.get(y)||ye.get(C))for(var ao=1;ao<Lr.length-1;ao++){var zs=Lr[ao];if(oe[zs]&(y|C)){for(var _a=0,Xs=0,_l=ao-1;_l>=0&&(_a=oe[Lr[_l]],_a&s);_l--);for(var yu=ao+1;yu<Lr.length&&(Xs=oe[Lr[yu]],Xs&s);yu++);_a===Xs&&(oe[zs]===y?_a===A:_a&(A|S))&&ue(zs,_a)}}if(ye.get(A)){for(var ul=0;ul<Lr.length;ul++)if(oe[Lr[ul]]&A){for(var Le=ul-1;Le>=0&&oe[Lr[Le]]&(E|s);Le--)ue(Lr[Le],A);for(ul++;ul<Lr.length&&oe[Lr[ul]]&(E|s|A);ul++)oe[Lr[ul]]!==A&&ue(Lr[ul],A)}}if(ye.get(E)||ye.get(y)||ye.get(C))for(var ot=0;ot<Lr.length;ot++){var lt=Lr[ot];if(oe[lt]&(E|y|C)){ue(lt,F);for(var kt=ot-1;kt>=0&&oe[Lr[kt]]&s;kt--)ue(Lr[kt],F);for(var Jt=ot+1;Jt<Lr.length&&oe[Lr[Jt]]&s;Jt++)ue(Lr[Jt],F)}}if(ye.get(A))for(var Rt=0,Tr=$i;Rt<Lr.length;Rt++){var Wt=Lr[Rt],br=oe[Wt];br&A?Tr===x&&ue(Wt,x):br&a&&(Tr=br)}if(ye.get(o)){for(var Xr=T|A|S,ti=Xr|x,Mi=[],an=[],Gn=0;Gn<Lr.length;Gn++)if(oe[Lr[Gn]]&o){var yn=Ce[Lr[Gn]],fa=void 0;if(b(yn)!==null)if(an.length<63)an.push({char:yn,seqIndex:Gn});else break;else if((fa=_(yn))!==null)for(var Wn=an.length-1;Wn>=0;Wn--){var Ja=an[Wn].char;if(Ja===fa||Ja===_(M(yn))||b(M(Ja))===yn){Mi.push([an[Wn].seqIndex,Gn]),an.length=Wn;break}}}Mi.sort(function(yo,nu){return yo[0]-nu[0]});for(var oo=0;oo<Mi.length;oo++){for(var Ao=Mi[oo],Io=Ao[0],ps=Ao[1],rs=!1,Mo=0,is=Io+1;is<ps;is++){var Ro=Lr[is];if(oe[Ro]&ti){rs=!0;var Uo=oe[Ro]&Xr?T:x;if(Uo===hn){Mo=Uo;break}}}if(rs&&!Mo){Mo=$i;for(var so=Io-1;so>=0;so--){var In=Lr[so];if(oe[In]&ti){var va=oe[In]&Xr?T:x;Mo=va===hn?hn:va;break}}}if(Mo){if(oe[Lr[Io]]=oe[Lr[ps]]=Mo,Mo!==hn){for(var vs=Io+1;vs<Lr.length;vs++)if(!(oe[Lr[vs]]&s)){f(Ce[Lr[vs]])&R&&(oe[Lr[vs]]=Mo);break}}if(Mo!==hn){for(var Zs=ps+1;Zs<Lr.length;Zs++)if(!(oe[Lr[Zs]]&s)){f(Ce[Lr[Zs]])&R&&(oe[Lr[Zs]]=Mo);break}}}}for(var Ks=0;Ks<Lr.length;Ks++)if(oe[Lr[Ks]]&o){for(var Ol=Ks,Js=Ks,ru=$i,xu=Ks-1;xu>=0;xu--)if(oe[Lr[xu]]&s)Ol=xu;else{ru=oe[Lr[xu]]&Xr?T:x;break}for(var _u=Tn,dc=Ks+1;dc<Lr.length;dc++)if(oe[Lr[dc]]&(o|s))Js=dc;else{_u=oe[Lr[dc]]&Xr?T:x;break}for(var Nl=Ol;Nl<=Js;Nl++)oe[Lr[Nl]]=ru===_u?ru:hn;Ks=Js}}}for(var ja=re.start;ja<=re.end;ja++){var bu=ee[ja],Hu=oe[ja];if(bu&1?Hu&(x|A|S)&&ee[ja]++:Hu&T?ee[ja]++:Hu&(S|A)&&(ee[ja]+=2),Hu&s&&(ee[ja]=ja===0?re.level:ee[ja-1]),ja===re.end||f(Ce[ja])&(D|k))for(var Ss=ja;Ss>=0&&f(Ce[Ss])&l;Ss--)ee[Ss]=re.level}}return{levels:ee,paragraphs:xe};function iu(yo,nu){for(var Zo=yo;Zo<Ce.length;Zo++){var au=oe[Zo];if(au&(T|L))return 1;if(au&(k|x)||nu&&au===J)return 0;if(au&n){var Cv=ph(Zo);Zo=Cv===-1?Ce.length:Cv}}return 0}function ph(yo){for(var nu=1,Zo=yo+1;Zo<Ce.length;Zo++){var au=oe[Zo];if(au&k)break;if(au&J){if(--nu===0)return Zo}else au&n&&nu++}return-1}}var V="14>1,j>2,t>2,u>2,1a>g,2v3>1,1>1,1ge>1,1wd>1,b>1,1j>1,f>1,ai>3,-2>3,+1,8>1k0,-1jq>1y7,-1y6>1hf,-1he>1h6,-1h5>1ha,-1h8>1qi,-1pu>1,6>3u,-3s>7,6>1,1>1,f>1,1>1,+2,3>1,1>1,+13,4>1,1>1,6>1eo,-1ee>1,3>1mg,-1me>1mk,-1mj>1mi,-1mg>1mi,-1md>1,1>1,+2,1>10k,-103>1,1>1,4>1,5>1,1>1,+10,3>1,1>8,-7>8,+1,-6>7,+1,a>1,1>1,u>1,u6>1,1>1,+5,26>1,1>1,2>1,2>2,8>1,7>1,4>1,1>1,+5,b8>1,1>1,+3,1>3,-2>1,2>1,1>1,+2,c>1,3>1,1>1,+2,h>1,3>1,a>1,1>1,2>1,3>1,1>1,d>1,f>1,3>1,1a>1,1>1,6>1,7>1,13>1,k>1,1>1,+19,4>1,1>1,+2,2>1,1>1,+18,m>1,a>1,1>1,lk>1,1>1,4>1,2>1,f>1,3>1,1>1,+3,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,6>1,4j>1,j>2,t>2,u>2,2>1,+1",X;function H(){if(!X){var Ce=p(V,!0),be=Ce.map;Ce.reverseMap.forEach(function(he,oe){be.set(oe,he)}),X=be}}function G(Ce){return H(),X.get(Ce)||null}function Q(Ce,be,he,oe){var Ee=Ce.length;he=Math.max(0,he==null?0:+he),oe=Math.min(Ee-1,oe==null?Ee-1:+oe);for(var ye=new Map,ue=he;ue<=oe;ue++)if(be[ue]&1){var ee=G(Ce[ue]);ee!==null&&ye.set(ue,ee)}return ye}function te(Ce,be,he,oe){var Ee=Ce.length;he=Math.max(0,he==null?0:+he),oe=Math.min(Ee-1,oe==null?Ee-1:+oe);var ye=[];return be.paragraphs.forEach(function(ue){var ee=Math.max(he,ue.start),ae=Math.min(oe,ue.end);if(ee<ae){for(var xe=be.levels.slice(ee,ae+1),re=ae;re>=ee&&f(Ce[re])&l;re--)xe[re]=ue.level;for(var pe=ue.level,we=1/0,Fe=0;Fe<xe.length;Fe++){var Se=xe[Fe];Se>pe&&(pe=Se),Se<we&&(we=Se|1)}for(var ke=pe;ke>=we;ke--)for(var _e=0;_e<xe.length;_e++)if(xe[_e]>=ke){for(var Ie=_e;_e+1<xe.length&&xe[_e+1]>=ke;)_e++;_e>Ie&&ye.push([Ie+ee,_e+ee])}}}),ye}function ce(Ce,be,he,oe){var Ee=ge(Ce,be,he,oe),ye=[].concat(Ce);return Ee.forEach(function(ue,ee){ye[ee]=(be.levels[ue]&1?G(Ce[ue]):null)||Ce[ue]}),ye.join("")}function ge(Ce,be,he,oe){for(var Ee=te(Ce,be,he,oe),ye=[],ue=0;ue<Ce.length;ue++)ye[ue]=ue;return Ee.forEach(function(ee){for(var ae=ee[0],xe=ee[1],re=ye.slice(ae,xe+1),pe=re.length;pe--;)ye[xe-pe]=re[pe]}),ye}return e.closingToOpeningBracket=_,e.getBidiCharType=f,e.getBidiCharTypeName=h,e.getCanonicalBracket=M,e.getEmbeddingLevels=U,e.getMirroredCharacter=G,e.getMirroredCharactersMap=Q,e.getReorderSegments=te,e.getReorderedIndices=ge,e.getReorderedString=ce,e.openingToClosingBracket=b,Object.defineProperty(e,"__esModule",{value:!0}),e})({})}function kmr(e,t,r,i){let n=[],a=r;for(let o of Jre(e.slice(r,i)))n.push({index:a,text:o,level:t[a]}),a+=o.length;return n}function Cmr(e,t){let r=!0;for(let i=e.length-1;i>=0;i--){let n=fne.getBidiCharTypeName(e[i].text[0]);Emr.has(n)?(e[i].level=t,r=!0):r&&Smr.has(n)?e[i].level=t:r=!1}}function Dmr(e,t){let r=t,i=1/0;for(let{level:a}of e)a>r&&(r=a),(a|1)<i&&(i=a|1);let n=e.slice();for(let a=r;a>=i;a--)for(let o=0;o<n.length;o++){if(n[o].level<a)continue;let s=o;for(;s+1<n.length&&n[s+1].level>=a;)s++;for(let l=o,u=s;l<u;l++,u--)[n[l],n[u]]=[n[u],n[l]];o=s}return n}function Fmr(e){var t;return e.level%2==0?e.text:(t=fne.getMirroredCharacter(e.text))!=null?t:e.text}function Lmr(e,t){var r,i;return(i=(r=e.find(n=>t>=n.start&&t<=n.end))==null?void 0:r.level)!=null?i:0}function Pmr(e,t,r,i,n){let a=kmr(e,t,i,n);Cmr(a,r);let o="",s=[];for(let l of Dmr(a,r)){if(Mmr.test(l.text))continue;let u=Fmr(l);o+=u,s.push(...Array(u.length).fill(l.index))}return{text:o,sourceIndices:s}}function Imr(e,t){let r=t.filter(a=>a>0&&a<e.length),i=[...new Set([0,...r,e.length])].sort((a,o)=>a-o),n=[];for(let a=0;a+1<i.length;a++)n.push([i[a],i[a+1]]);return n}function Uit(e,t){let{levels:r,paragraphs:i}=fne.getEmbeddingLevels(e);return Imr(e,t.concat(i.map(n=>n.start))).map(([n,a])=>Pmr(e,r,Lmr(i,n),n,a))}function Rmr(e,t){return Uit(e,t).map(r=>r.text)}function zmr(e,t,r){return Uit(e,r).map(i=>[i.text,i.sourceIndices.map(n=>{var a;return(a=t[n])!=null?a:0})])}function Bmr(e,t,r){let i=r.buf,n,a;if(a=i[r.pos++],n=(a&112)>>4,a<128||(a=i[r.pos++],n|=(a&127)<<3,a<128)||(a=i[r.pos++],n|=(a&127)<<10,a<128)||(a=i[r.pos++],n|=(a&127)<<17,a<128)||(a=i[r.pos++],n|=(a&127)<<24,a<128)||(a=i[r.pos++],n|=(a&1)<<31,a<128))return qmr(e,n,t);throw Error("Expected varint not more than 10 bytes")}function qmr(e,t,r){return r?t*4294967296+(e>>>0):(t>>>0)*4294967296+(e>>>0)}function Omr(e,t,r){let i="",n=t;for(;n<r;){let a=e[n],o=null,s=a>239?4:a>223?3:a>191?2:1;if(n+s>r)break;let l,u,c;s===1?a<128&&(o=a):s===2?(l=e[n+1],(l&192)==128&&(o=(a&31)<<6|l&63,o<=127&&(o=null))):s===3?(l=e[n+1],u=e[n+2],(l&192)==128&&(u&192)==128&&(o=(a&15)<<12|(l&63)<<6|u&63,(o<=2047||o>=55296&&o<=57343)&&(o=null))):s===4&&(l=e[n+1],u=e[n+2],c=e[n+3],(l&192)==128&&(u&192)==128&&(c&192)==128&&(o=(a&15)<<18|(l&63)<<12|(u&63)<<6|c&63,(o<=65535||o>=1114112)&&(o=null))),o===null?(o=65533,s=1):o>65535&&(o-=65536,i+=String.fromCharCode(o>>>10&1023|55296),o=56320|o&1023),i+=String.fromCharCode(o),n+=s}return i}function Nmr(e,t,r){e===1&&r.readMessage(Umr,t)}function Umr(e,t,r){if(e===3){let{id:i,bitmap:n,width:a,height:o,left:s,top:l,advance:u}=r.readMessage(Vmr,{});t.push({id:i,bitmap:new UB({width:a+6,height:o+6},n),metrics:{width:a,height:o,left:s,top:l,advance:u}})}}function Vmr(e,t,r){e===1?t.id=r.readVarint():e===2?t.bitmap=r.readBytes():e===3?t.width=r.readVarint():e===4?t.height=r.readVarint():e===5?t.left=r.readSVarint():e===6?t.top=r.readSVarint():e===7&&(t.advance=r.readVarint())}function Git(e){return new Vit(e).readFields(Nmr,[])}function i8(e){return typeof(e==null?void 0:e.renderWithWebGL)=="function"}function Hit(e){let{userImage:t}=e;return!(t!=null&&t.render)||!t.render()?!1:(i8(t.data)||e.data.replace(new Uint8Array(t.data.buffer)),!0)}function hne(e){let t=0,r=0;for(let o of e)t+=o.w*o.h,r=Math.max(r,o.w);e.sort((o,s)=>s.h-o.h);let i=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}],n=0,a=0;for(let o of e)for(let s=i.length-1;s>=0;s--){let l=i[s];if(!(o.w>l.w||o.h>l.h)){if(o.x=l.x,o.y=l.y,a=Math.max(a,o.y+o.h),n=Math.max(n,o.x+o.w),o.w===l.w&&o.h===l.h){let u=i.pop();u&&s<i.length&&(i[s]=u)}else o.h===l.h?(l.x+=o.w,l.w-=o.w):o.w===l.w?(l.y+=o.h,l.h-=o.h):(i.push({x:l.x+o.w,y:l.y,w:l.w-o.w,h:o.h}),l.y+=o.h,l.h-=o.h);break}}return{w:n,h:a,fill:t/(n*a)||0}}function Hmr(e){for(let t of e)if(t.positionedGlyphs.length!==0)return!1;return!0}function jmr(e,t){let r=[],i=0;for(let n of t)r.push(e.substring(i,n)),i=n;return i<e.length()&&r.push(e.substring(i,e.length())),r}function $mr(e){let t=[],r=0;for(;r<e.length;){if(!iet.test(e[r])){t.push(r),r++;continue}let i=r;for(;i<e.length&&iet.test(e[i]);)i++;let n=e[i];if(n!==void 0&&qit(n.codePointAt(0))){t.push(i);for(let a=i-1;a>=r;a--)t.push(a);r=i+1}else{for(let a=r;a<i;a++)t.push(a);r=i}}return t}function Wmr(e){let t=[],r=0;for(let i of e.graphemes())t.push(...Array(i.length).fill(e.sectionIndex[r])),r++;return t}function Ymr(e,t){let r=t.map(a=>e.toCodeUnitIndex(a)),i=tB.isParsed()?tB:null;if(e.sections.length===1)return i?i.processBidirectionalText(e.toString(),r).map(a=>net(a,e.sections,[...a].map(()=>0))):Rmr(e.toString(),r).map(a=>rie([...a],e.sections,[...a].map(()=>0)));let n=Wmr(e);return i?i.processStyledBidirectionalText(e.text,n,r).map(([a,o])=>net(a,e.sections,o)):zmr(e.text,n,r).map(([a,o])=>{let s=[...a];return rie(s,e.sections,$it(s).map(l=>{var u;return(u=o[l])!=null?u:0}))})}function rie(e,t,r){var a;let i=new cne(e.join(""),t,[]),n=0;for(let o of i.graphemes())i.sectionIndex.push((a=r[n])!=null?a:0),n+=[...o].length;return i}function $it(e){let t=[],r=0;for(let i of e)t.push(r),r+=i.length;return t}function net(e,t,r){let i=[...e],n=$it(i),a=$mr(i);return rie(a.map(o=>i[o]),t,a.map(o=>{var s;return(s=r[n[o]])!=null?s:0}))}function kz(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p){let v=cne.fromFeature(e,n);f===2&&v.verticalizePunctuation();let m=v.determineLineBreaks(u,a,t,i,d),g=Oit(v.text)?Ymr(v,m):jmr(v,m),w=[],b={positionedLines:w,text:v.toString(),top:c[1],bottom:c[1],left:c[0],right:c[0],writingMode:f,iconsInText:!1,verticalizable:!1};return iyr(b,t,r,i,g,o,s,l,f,u,h,p),!Hmr(w)&&b}function n8(e){let t=.5,r=.5;switch(e){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(e){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:t,verticalAlign:r}}function Xmr(e,t,r){let i=t.getMaxScale()*24,{maxImageWidth:n,maxImageHeight:a}=t.getMaxImageSize(e),o=Math.max(i,a*r);return{verticalLineContentWidth:Math.max(i,n*r),horizontalLineContentHeight:o}}function Wit(e){switch(e){case"top":return 0;case"center":return .5;default:return 1}}function Zmr(e,t,r,i){var a;if(e!=null&&e.rect)return e;let n=(a=t[r.fontStack])==null?void 0:a[i];return n?{rect:null,metrics:n.metrics}:null}function Kmr(e,t,r){return!(e===1||!t&&!$B(r)||t&&(une(r)||Bit(r)))}function Oz(e){return new RegExp("\\p{Nd}","u").test(String.fromCodePoint(e))}function Yit(e){return new RegExp("\\p{Lu}","u").test(String.fromCodePoint(e))}function Jmr(e){return/[\p{P}\p{S}]/u.test(String.fromCodePoint(e))}function Qmr(e){let t=e.some(Oz)&&e.every(i=>Oz(i)||Jmr(i)),r=e.length<=3&&e.every(i=>Yit(i)||Oz(i));return t||r}function eyr(e){return(Oz(e)||Yit(e))&&!Bit(e)}function tyr(e,t){let r=!1;for(let i=0;i<e.length;i++){if(t[i])continue;let n=vT[e[i]];n&&(i===0||t[i-1])&&(i===e.length-1||t[i+1])&&(e[i]=n,t[i]=!0,r=!0)}return r}function ryr(e){let t=e.graphemes().slice(),r=t.map(a=>a.codePointAt(0)),i=r.map($B),n=a=>!i[a]&&!une(r[a])&&!("imageName"in e.getSection(a));for(let a=0;a<r.length;a++){if(!n(a))continue;let o=a;for(;o+1<r.length&&n(o+1);)o++;if(Qmr(r.slice(a,o+1)))for(let s=a;s<=o;s++)i[s]=eyr(r[s]);a=o}return tyr(t,i)&&(e.text=t.join(""),e._graphemes=null),i}function iyr(e,t,r,i,n,a,o,s,l,u,c,f){var M;let h=0,d=0,p=0,v=0,m=s==="right"?1:s==="left"?0:.5,g=24/f,w=0;for(let x of n){x.trim();let T=x.getMaxScale(),A={positionedGlyphs:[],lineOffset:0};e.positionedLines[w]=A;let y=A.positionedGlyphs,E=0;if(!x.length()){d+=a,++w;continue}let S=Xmr(i,x,g),C=l===2&&!c?ryr(x):null,k=x.graphemes();for(let P=0;P<k.length;P++){let R=x.getSection(P),L=k[P],I=L.codePointAt(0),B=C?C[P]:Kmr(l,c,I),O="fontStack"in R&&r8(L)&&!((M=t[R.fontStack])!=null&&M[L])?[...L]:[L];for(let $ of O){let Y={glyph:$.codePointAt(0),grapheme:$,imageName:null,x:h,y:d+-17,vertical:B,scale:1,fontStack:"",sectionIndex:x.getSectionIndex(P),metrics:null,rect:null},K;if("fontStack"in R){if(K=nyr(R,$,B,S,t,r),!K)continue;Y.fontStack=R.fontStack}else{if(e.iconsInText=!0,R.scale*=g,K=ayr(R,B,T,S,i),!K)continue;E=Math.max(E,K.imageOffset),Y.imageName=R.imageName}let{rect:j,metrics:q,baselineOffset:J}=K;if(Y.y+=J,Y.scale=R.scale,Y.metrics=q,Y.rect=j,y.push(Y),!B)h+=q.advance*R.scale+u;else{e.verticalizable=!0;let U="imageName"in R?q.advance:24;h+=U*R.scale+u}}}if(y.length!==0){let P=h-u;p=Math.max(P,p),oyr(y,0,y.length-1,m)}h=0;let D=(T-1)*24;A.lineOffset=Math.max(E,D);let F=a*T+E;d+=F,v=Math.max(F,v),++w}let{horizontalAlign:b,verticalAlign:_}=n8(o);syr(e.positionedLines,m,b,_,p,v,a,d,n.length),e.top+=-_*d,e.bottom=e.top+d,e.left+=-b*p,e.right=e.left+p}function nyr(e,t,r,i,n,a){var u;let o=(u=a[e.fontStack])==null?void 0:u[t],s=Zmr(o,n,e,t);if(s===null)return null;let l;if(r)l=i.verticalLineContentWidth-e.scale*24;else{let c=Wit(e.verticalAlign);l=(i.horizontalLineContentHeight-e.scale*24)*c}return{rect:s.rect,metrics:s.metrics,baselineOffset:l}}function ayr(e,t,r,i,n){let a=n[e.imageName];if(!a)return null;let o=a.paddedRect,s=a.displaySize,l={width:s[0],height:s[1],left:1,top:-3,advance:t?s[1]:s[0]},u;if(t)u=i.verticalLineContentWidth-s[1]*e.scale;else{let f=Wit(e.verticalAlign);u=(i.horizontalLineContentHeight-s[1]*e.scale)*f}let c=(t?s[0]:s[1])*e.scale-24*r;return{rect:o,metrics:l,baselineOffset:u,imageOffset:c}}function oyr(e,t,r,i){if(i===0)return;let n=e[r],a=n.metrics.advance*n.scale,o=(e[r].x+a)*i;for(let s=t;s<=r;s++)e[s].x-=o}function syr(e,t,r,i,n,a,o,s,l){let u=(t-r)*n,c=0;c=a===o?-i*l*o+.5*o:-s*i- -17;for(let f of e)for(let h of f.positionedGlyphs)h.x+=u,h.y+=c}function lyr(e,t,r){let{horizontalAlign:i,verticalAlign:n}=n8(r),a=t[0],o=t[1],s=a-e.displaySize[0]*i,l=s+e.displaySize[0],u=o-e.displaySize[1]*n;return{image:e,top:u,bottom:u+e.displaySize[1],left:s,right:l}}function Xit(e){var c,f;let t=e.left,r=e.top,i=e.right-t,n=e.bottom-r,a=e.image.content[2]-e.image.content[0],o=e.image.content[3]-e.image.content[1],s=(c=e.image.textFitWidth)!=null?c:"stretchOrShrink",l=(f=e.image.textFitHeight)!=null?f:"stretchOrShrink",u=a/o;if(l==="proportional"){if(s==="stretchOnly"&&i/n<u||s==="proportional"){let h=Math.ceil(n*u);t*=h/i,i=h}}else if(s==="proportional"&&l==="stretchOnly"&&u!==0&&i/n>u){let h=Math.ceil(i/u);r*=h/n,n=h}return{x1:t,y1:r,x2:t+i,y2:r+n}}function aet(e,t,r,i,n,a){let o=e.image,s;if(o.content){let m=o.content,g=o.pixelRatio||1;s=[m[0]/g,m[1]/g,o.displaySize[0]-m[2]/g,o.displaySize[1]-m[3]/g]}let l=t.left*a,u=t.right*a,c,f,h,d;r==="width"||r==="both"?(d=n[0]+l-i[3],f=n[0]+u+i[1]):(d=n[0]+(l+u-o.displaySize[0])/2,f=d+o.displaySize[0]);let p=t.top*a,v=t.bottom*a;return r==="height"||r==="both"?(c=n[1]+p-i[0],h=n[1]+v+i[2]):(c=n[1]+(p+v-o.displaySize[1])/2,h=c+o.displaySize[1]),{image:o,top:c,right:f,bottom:h,left:d,collisionPadding:s}}function set(e,t){let{expression:r}=t;if(r.kind==="constant")return{kind:"constant",layoutSize:r.evaluate(new Co(e+1))};if(r.kind==="source")return{kind:"source"};if(r.kind==="composite"){let{minZoom:i,maxZoom:n}=uyr(r.zoomStops,e);return{kind:"composite",minZoom:i,maxZoom:n,interpolationType:r.interpolationType}}{let i=cyr(r),n=r.evaluate(new Co(e+1));return{kind:"camera",zoomStops:r.zoomStops,sizes:i,layoutSize:n,interpolationType:r.interpolationType}}}function uyr(e,t){let r=0;for(;r<e.length&&e[r]<=t;)r++;r=Math.max(0,r-1);let i=r;for(;i<e.length&&e[i]<t+1;)i++;return i=Math.min(e.length-1,i),{minZoom:e[r],maxZoom:e[i]}}function cyr(e){return e.zoomStops.map(t=>e.evaluate(new Co(t===-1/0?e.zoomStops[1]-1:t)))}function YB(e,{uSize:t,uSizeT:r},{lowerSize:i,upperSize:n}){return e.kind==="source"?i/128:e.kind==="composite"?$s.number(i/128,n/128,r):t}function a8(e,t){let r=0,i=0;return e.kind==="constant"?i=e.layoutSize:e.kind==="camera"?i=fyr(e,t):e.kind==="composite"&&(r=hyr(e,t)),{uSizeT:r,uSize:i}}function fyr({zoomStops:e,sizes:t,layoutSize:r,interpolationType:i},n){let a=e.length-1;for(;a>0&&e[a]>n;)a--;let o=Math.min(a+1,e.length-1),s=i?Jn(Zd.interpolationFactor(i,n,e[a],e[o]),0,1):0;return Math.min($s.number(t[a],t[o],s),r)}function hyr({interpolationType:e,minZoom:t,maxZoom:r},i){return e?Jn(Zd.interpolationFactor(e,i,t,r),0,1):0}function Kit(e,t,r,i,n){if(t.segment===void 0||r===0)return!0;let a=t,o=t.segment+1,s=0;for(;s>-r/2;){if(o--,o<0)return!1;s-=e[o].dist(a),a=e[o]}s+=e[o].dist(e[o+1]),o++;let l=[],u=0;for(;s<r/2;){let c=e[o-1],f=e[o],h=e[o+1];if(!h)return!1;let d=c.angleTo(f)-f.angleTo(h);for(d=Math.abs((d+3*Math.PI)%(Math.PI*2)-Math.PI),l.push({distance:s,angleDelta:d}),u+=d;s-l[0].distance>i;)u-=l.shift().angleDelta;if(u>n)return!1;o++,s+=f.dist(h)}return!0}function Jit(e){let t=0;for(let r=0;r<e.length-1;r++)t+=e[r].dist(e[r+1]);return t}function Qit(e,t,r){return e?3/5*t*r:0}function ent(e,t){return Math.max(e?e.right-e.left:0,t?t.right-t.left:0)}function dyr(e,t,r,i,n,a){let o=Qit(r,n,a),s=ent(r,i)*a,l=0,u=Jit(e)/2;for(let c=0;c<e.length-1;c++){let f=e[c],h=e[c+1],d=f.dist(h);if(l+d>u){let p=(u-l)/d,v=new bT($s.number(f.x,h.x,p),$s.number(f.y,h.y,p),h.angleTo(f),c);return v._round(),!o||Kit(e,v,s,o,t)?v:void 0}l+=d}}function pyr(e,t,r,i,n,a,o,s,l){let u=Qit(i,a,o),c=ent(i,n),f=c*o,h=e[0].x===0||e[0].x===l||e[0].y===0||e[0].y===l;t-f<t/4&&(t=f+t/4);let d=a*2;return tnt(e,h?t/2*s%t:(c/2+d)*o*s%t,t,u,r,f,h,!1,l)}function tnt(e,t,r,i,n,a,o,s,l){let u=a/2,c=Jit(e),f=0,h=t-r,d=[];for(let p=0;p<e.length-1;p++){let v=e[p],m=e[p+1],g=v.dist(m),w=m.angleTo(v);for(;h+r<f+g;){h+=r;let b=(h-f)/g,_=$s.number(v.x,m.x,b),M=$s.number(v.y,m.y,b);if(_>=0&&_<l&&M>=0&&M<l&&h-u>=0&&h+u<=c){let x=new bT(_,M,w,p);x._round(),(!i||Kit(e,x,a,i,n))&&d.push(x)}}f+=g}return!s&&!d.length&&!o&&(d=tnt(e,f/2,r,i,n,a,o,!0,l)),d}function dne(e,t,r,i,n){let a=[];for(let o of e){let s;for(let l=0;l<o.length-1;l++){let u=o[l],c=o[l+1];u.x<t&&c.x<t||(u.x<t?u=new tr(t,u.y+(c.y-u.y)*((t-u.x)/(c.x-u.x)))._round():c.x<t&&(c=new tr(t,u.y+(c.y-u.y)*((t-u.x)/(c.x-u.x)))._round()),!(u.y<r&&c.y<r)&&(u.y<r?u=new tr(u.x+(c.x-u.x)*((r-u.y)/(c.y-u.y)),r)._round():c.y<r&&(c=new tr(u.x+(c.x-u.x)*((r-u.y)/(c.y-u.y)),r)._round()),!(u.x>=i&&c.x>=i)&&(u.x>=i?u=new tr(i,u.y+(c.y-u.y)*((i-u.x)/(c.x-u.x)))._round():c.x>=i&&(c=new tr(i,u.y+(c.y-u.y)*((i-u.x)/(c.x-u.x)))._round()),!(u.y>=n&&c.y>=n)&&(u.y>=n?u=new tr(u.x+(c.x-u.x)*((n-u.y)/(c.y-u.y)),n)._round():c.y>=n&&(c=new tr(u.x+(c.x-u.x)*((n-u.y)/(c.y-u.y)),n)._round()),(!s||!u.equals(s[s.length-1]))&&(s=[u],a.push(s)),s.push(c)))))}}return a}function uet(e,t,r,i){let n=[],a=e.image,o=a.pixelRatio,s=a.paddedRect.w-2,l=a.paddedRect.h-2,u={x1:e.left,y1:e.top,x2:e.right,y2:e.bottom},c=a.stretchX||[[0,s]],f=a.stretchY||[[0,l]],h=(D,F)=>D+F[1]-F[0],d=c.reduce(h,0),p=f.reduce(h,0),v=s-d,m=l-p,g=0,w=d,b=0,_=p,M=0,x=v,T=0,A=m;if(a.content&&i){let D=a.content,F=D[2]-D[0],P=D[3]-D[1];(a.textFitWidth||a.textFitHeight)&&(u=Xit(e)),g=Cz(c,0,D[0]),b=Cz(f,0,D[1]),w=Cz(c,D[0],D[2]),_=Cz(f,D[1],D[3]),M=D[0]-g,T=D[1]-b,x=F-w,A=P-_}let y=u.x1,E=u.y1,S=u.x2-y,C=u.y2-E,k=(D,F,P,R)=>{let L=Dz(D.stretch-g,w,S,y),I=Fz(D.fixed-M,x,D.stretch,d),B=Dz(F.stretch-b,_,C,E),O=Fz(F.fixed-T,A,F.stretch,p),$=Dz(P.stretch-g,w,S,y),Y=Fz(P.fixed-M,x,P.stretch,d),K=Dz(R.stretch-b,_,C,E),j=Fz(R.fixed-T,A,R.stretch,p),q=new tr(L,B),J=new tr($,B),U=new tr($,K),V=new tr(L,K),X=new tr(I/o,O/o),H=new tr(Y/o,j/o),G=t*Math.PI/180;if(G){let Ce=Math.sin(G),be=Math.cos(G),he=[be,-Ce,Ce,be];q._matMult(he),J._matMult(he),V._matMult(he),U._matMult(he)}let Q=D.stretch+D.fixed,te=P.stretch+P.fixed,ce=F.stretch+F.fixed,ge=R.stretch+R.fixed;return{tl:q,tr:J,bl:V,br:U,tex:{x:a.paddedRect.x+1+Q,y:a.paddedRect.y+1+ce,w:te-Q,h:ge-ce},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:X,pixelOffsetBR:H,minFontScaleX:x/o/S,minFontScaleY:A/o/C,isSDF:r}};if(!i||!a.stretchX&&!a.stretchY)n.push(k({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:s+1},{fixed:0,stretch:l+1}));else{let D=cet(c,v,d),F=cet(f,m,p);for(let P=0;P<D.length-1;P++){let R=D[P],L=D[P+1];for(let I=0;I<F.length-1;I++){let B=F[I],O=F[I+1];n.push(k(R,B,L,O))}}}return n}function Cz(e,t,r){let i=0;for(let n of e)i+=Math.max(t,Math.min(r,n[1]))-Math.max(t,Math.min(r,n[0]));return i}function cet(e,t,r){let i=[{fixed:-1,stretch:0}];for(let[n,a]of e){let o=i[i.length-1];i.push({fixed:n-o.stretch,stretch:o.stretch}),i.push({fixed:n-o.stretch,stretch:o.stretch+(a-n)})}return i.push({fixed:t+1,stretch:r}),i}function Dz(e,t,r,i){return e/t*r+i}function Fz(e,t,r,i){return e-t*r/i}function vyr(e,t,r,i,n,a,o,s){let l=i.layout.get("text-rotate").evaluate(a,{})*Math.PI/180,u=[];for(let c of t.positionedLines)for(let f of c.positionedGlyphs){if(!f.rect)continue;let h=f.rect||{},d=4,p=!0,v=1,m=0,g=(n||s)&&f.vertical,w=f.metrics.advance*f.scale/2;if(s&&t.verticalizable){let R=(f.scale-1)*24,L=(24-f.metrics.width*f.scale)/2;m=c.lineOffset/2-(f.imageName?-L:R)}if(f.imageName){let R=o[f.imageName];p=R.sdf,v=R.pixelRatio,d=1/v}let b=n?[f.x+w,f.y]:[0,0],_=n?[0,0]:[f.x+w+r[0],f.y+r[1]-m],M=[0,0];g&&(M=_,_=[0,0]);let x=f.metrics.isDoubleResolution?2:1,T=(f.metrics.left-d)*f.scale-w+_[0],A=(-f.metrics.top-d)*f.scale+_[1],y=T+h.w/x*f.scale/v,E=A+h.h/x*f.scale/v,S=new tr(T,A),C=new tr(y,A),k=new tr(T,E),D=new tr(y,E);if(g){let R=new tr(-w,w- -17),L=-Math.PI/2,I=12-w,B=f.imageName?I:0,O=new tr(22-I,-B),$=new tr(...M);S._rotateAround(L,R)._add(O)._add($),C._rotateAround(L,R)._add(O)._add($),k._rotateAround(L,R)._add(O)._add($),D._rotateAround(L,R)._add(O)._add($)}if(l){let R=Math.sin(l),L=Math.cos(l),I=[L,-R,R,L];S._matMult(I),C._matMult(I),k._matMult(I),D._matMult(I)}let F=new tr(0,0),P=new tr(0,0);u.push({tl:S,tr:C,bl:k,br:D,tex:h,writingMode:t.writingMode,glyphOffset:b,sectionIndex:f.sectionIndex,isSDF:p,pixelOffsetTL:F,pixelOffsetBR:P,minFontScaleX:0,minFontScaleY:0})}return u}function myr(e,t=1){let r=Jd.fromPoints(e[0]),i=Math.min(r.width(),r.height()),n=i/2,a=new gyr([],yyr),{minX:o,minY:s,maxX:l,maxY:u}=r;if(i===0)return new tr(o,s);for(let h=o;h<l;h+=i)for(let d=s;d<u;d+=i)a.push(new dT(h+n,d+n,n,e));let c=_yr(e),f=c;for(;a.length;){let h=a.pop();(h.d>f.d||!f.d)&&(f=h),!(h.max-f.d<=t)&&(n=h.h/2,a.push(new dT(h.p.x-n,h.p.y-n,n,e)),a.push(new dT(h.p.x+n,h.p.y-n,n,e)),a.push(new dT(h.p.x-n,h.p.y+n,n,e)),a.push(new dT(h.p.x+n,h.p.y+n,n,e)))}return c.d>0&&f.d-c.d<=t?c.p:f.p}function yyr(e,t){return t.max-e.max}function xyr(e,t){let r=!1,i=1/0;for(let n of t)for(let a=0,o=n.length,s=o-1;a<o;s=a++){let l=n[a],u=n[s];l.y>e.y!=u.y>e.y&&e.x<(u.x-l.x)*(e.y-l.y)/(u.y-l.y)+l.x&&(r=!r),i=Math.min(i,iit(e,l,u))}return(r?1:-1)*Math.sqrt(i)}function _yr(e){let t=0,r=0,i=0,n=e[0];for(let a=0,o=n.length,s=o-1;a<o;s=a++){let l=n[a],u=n[s],c=l.x*u.y-u.x*l.y;r+=(l.x+u.x)*c,i+=(l.y+u.y)*c,t+=c*3}return new dT(r/t,i/t,0,e)}function rnt(e,t){function r(n,a){let o=0,s=0;a<0&&(a=0);let l=a/Math.SQRT2;switch(n){case"top-right":case"top-left":s=l-7;break;case"bottom-right":case"bottom-left":s=-l+7;break;case"bottom":s=-a+7;break;case"top":s=a-7}switch(n){case"top-right":case"bottom-right":o=-l;break;case"top-left":case"bottom-left":o=l;break;case"left":o=a;break;case"right":o=-a}return[o,s]}function i(n,a,o){let s=0,l=0;switch(a=Math.abs(a),o=Math.abs(o),n){case"top-right":case"top-left":case"top":l=o-7;break;case"bottom-right":case"bottom-left":case"bottom":l=-o+7}switch(n){case"top-right":case"bottom-right":case"right":s=-a;break;case"top-left":case"bottom-left":case"left":s=a}return[s,l]}return t[1]===pne?r(e,t[0]):i(e,t[0],t[1])}function int(e,t,r){var o;let i=e.layout,n=(o=i.get("text-variable-anchor-offset"))==null?void 0:o.evaluate(t,{},r);if(n){let s=n.values,l=[];for(let u=0;u<s.length;u+=2){let c=l[u]=s[u],f=s[u+1].map(h=>h*24);c.startsWith("top")?f[1]-=7:c.startsWith("bottom")&&(f[1]+=7),l[u+1]=f}return new X1(l)}let a=i.get("text-variable-anchor");if(a){let s;s=e._unevaluatedLayout.getValue("text-radial-offset")===void 0?i.get("text-offset").evaluate(t,{},r).map(u=>u*24):[i.get("text-radial-offset").evaluate(t,{},r)*24,pne];let l=[];for(let u of a)l.push(u,rnt(u,s));return new X1(l)}return null}function byr(e){var c,f;e.bucket.createArrays();let t=512*e.bucket.overscaling;e.bucket.tilePixelRatio=zr/t,e.bucket.compareText={},e.bucket.iconsNeedLinear=!1;let r=e.bucket.layers[0],i=r.layout,n=r._unevaluatedLayout._values,a={layoutIconSize:n["icon-size"].possiblyEvaluate(new Co(e.bucket.zoom+1),e.canonical),layoutTextSize:n["text-size"].possiblyEvaluate(new Co(e.bucket.zoom+1),e.canonical),textMaxSize:n["text-size"].possiblyEvaluate(new Co(18))};if(e.bucket.textSizeData.kind==="composite"){let{minZoom:h,maxZoom:d}=e.bucket.textSizeData;a.compositeTextSizes=[n["text-size"].possiblyEvaluate(new Co(h),e.canonical),n["text-size"].possiblyEvaluate(new Co(d),e.canonical)]}if(e.bucket.iconSizeData.kind==="composite"){let{minZoom:h,maxZoom:d}=e.bucket.iconSizeData;a.compositeIconSizes=[n["icon-size"].possiblyEvaluate(new Co(h),e.canonical),n["icon-size"].possiblyEvaluate(new Co(d),e.canonical)]}let o=i.get("text-line-height")*24,s=i.get("text-rotation-alignment")!=="viewport"&&i.get("symbol-placement")!=="point",l=i.get("text-keep-upright"),u=i.get("text-size");for(let h of e.bucket.features){let d=i.get("text-font").evaluate(h,{},e.canonical).join(","),p=u.evaluate(h,{},e.canonical),v=a.layoutTextSize.evaluate(h,{},e.canonical),m=a.layoutIconSize.evaluate(h,{},e.canonical),g={horizontal:{},vertical:void 0},w=h.text,b=[0,0];if(w){let T=w.toString(),A=i.get("text-letter-spacing").evaluate(h,{},e.canonical)*24,y=ymr(T)?A:0,E=i.get("text-anchor").evaluate(h,{},e.canonical),S=int(r,h,e.canonical);if(!S){let F=i.get("text-radial-offset").evaluate(h,{},e.canonical);b=F?rnt(E,[F*24,pne]):i.get("text-offset").evaluate(h,{},e.canonical).map(P=>P*24)}let C=s?"center":i.get("text-justify").evaluate(h,{},e.canonical),k=i.get("symbol-placement")==="point"?i.get("text-max-width").evaluate(h,{},e.canonical)*24:1/0,D=()=>{e.bucket.allowVerticalPlacement&&Qre(T)&&(g.vertical=kz(w,e.glyphMap,e.glyphPositions,e.imagePositions,d,k,o,E,"left",y,b,2,!0,v,p))};if(!s&&S){let F=new Set;if(C==="auto")for(let R=0;R<S.values.length;R+=2)F.add(rB(S.values[R]));else F.add(C);let P=!1;for(let R of F)if(!g.horizontal[R])if(P)g.horizontal[R]=g.horizontal[0];else{let L=kz(w,e.glyphMap,e.glyphPositions,e.imagePositions,d,k,o,"center",R,y,b,1,!1,v,p);L&&(g.horizontal[R]=L,P=L.positionedLines.length===1)}D()}else{C==="auto"&&(C=rB(E));let F=kz(w,e.glyphMap,e.glyphPositions,e.imagePositions,d,k,o,E,C,y,b,1,!1,v,p);F&&(g.horizontal[C]=F),D(),Qre(T)&&s&&l&&(g.vertical=kz(w,e.glyphMap,e.glyphPositions,e.imagePositions,d,k,o,E,C,y,b,2,!1,v,p))}}let _,M=!1;if((c=h.icon)!=null&&c.name){let T=e.imageMap[h.icon.name];T&&(_=lyr(e.imagePositions[h.icon.name],i.get("icon-offset").evaluate(h,{},e.canonical),i.get("icon-anchor").evaluate(h,{},e.canonical)),M=!!T.sdf,e.bucket.sdfIcons===void 0?e.bucket.sdfIcons=M:e.bucket.sdfIcons!==M&&Ma("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),T.pixelRatio===e.bucket.pixelRatio?i.get("icon-rotate").constantOr(1)!==0&&(e.bucket.iconsNeedLinear=!0):e.bucket.iconsNeedLinear=!0)}let x=nnt(g.horizontal)||g.vertical;(f=e.bucket).iconsInText||(f.iconsInText=x?x.iconsInText:!1),(x||_)&&wyr(e.bucket,h,g,_,e.imageMap,a,v,m,b,M,e.canonical,e.subdivisionGranularity)}e.showCollisionBoxes&&e.bucket.generateCollisionDebugBuffers()}function rB(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function wyr(e,t,r,i,n,a,o,s,l,u,c,f){let h=a.textMaxSize.evaluate(t,{});h===void 0&&(h=o);let d=e.layers[0].layout,p=d.get("icon-offset").evaluate(t,{},c),v=nnt(r.horizontal),m=o/24,g=e.tilePixelRatio*m,w=e.tilePixelRatio*h/24,b=e.tilePixelRatio*s,_=e.tilePixelRatio*d.get("symbol-spacing"),M=d.get("text-padding")*e.tilePixelRatio,x=Iyr(d,t,c,e.tilePixelRatio),T=d.get("text-max-angle")/180*Math.PI,A=d.get("text-rotation-alignment")!=="viewport"&&d.get("symbol-placement")!=="point",y=d.get("icon-rotation-alignment").constantOr("viewport")==="map"&&d.get("symbol-placement")!=="point",E=d.get("symbol-placement"),S=_/2,C=d.get("icon-text-fit"),k;i&&C!=="none"&&(e.allowVerticalPlacement&&r.vertical&&(k=aet(i,r.vertical,C,d.get("icon-text-fit-padding"),p,m)),v&&(i=aet(i,v,C,d.get("icon-text-fit-padding"),p,m)));let D=c?f.line.getGranularityForZoomLevel(c.z):1,F=(P,R)=>{R.x<0||R.x>=8192||R.y<0||R.y>=8192||Ayr(e,R,P,r,i,n,k,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,g,[M,M,M,M],A,l,b,x,y,p,t,a,u,c,o)};if(E==="line")for(let P of dne(t.geometry,0,0,zr,zr)){let R=qb(P,D),L=pyr(R,_,T,r.vertical||v,i,24,w,e.overscaling,zr);for(let I of L){let B=v;(!B||!Myr(e,B.text,S,I))&&F(R,I)}}else if(E==="line-center"){for(let P of t.geometry)if(P.length>1){let R=qb(P,D),L=dyr(R,T,r.vertical||v,i,24,w);L&&F(R,L)}}else if(t.type==="Polygon")for(let P of AB(t.geometry,0)){let R=myr(P,16);F(qb(P[0],D,!0),new bT(R.x,R.y,0))}else if(t.type==="LineString")for(let P of t.geometry){let R=qb(P,D);F(R,new bT(R[0].x,R[0].y,0))}else if(t.type==="Point")for(let P of t.geometry)for(let R of P)F([R],new bT(R.x,R.y,0))}function Tyr(e,t){let r=e.length,i=t==null?void 0:t.values;if((i==null?void 0:i.length)>0)for(let n=0;n<i.length;n+=2){let a=XB[i[n]],o=i[n+1];e.emplaceBack(a,o[0],o[1])}return[r,e.length]}function fet(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p,v){let m=vyr(t,r,s,n,a,o,i,e.allowVerticalPlacement),g=e.textSizeData,w=null;g.kind==="source"?(w=[128*n.layout.get("text-size").evaluate(o,{})],w[0]>32640&&Ma(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):g.kind==="composite"&&(w=[128*p.compositeTextSizes[0].evaluate(o,{},v),128*p.compositeTextSizes[1].evaluate(o,{},v)],(w[0]>32640||w[1]>32640)&&Ma(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),e.addSymbols(e.text,m,w,s,a,o,c,t,u.lineStartIndex,u.lineLength,d,v,l);for(let b of f)h[b]=e.text.placedSymbolArray.length-1;return m.length*4}function nnt(e){for(let t in e)return e[t];return null}function Ayr(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p,v,m,g,w,b,_,M,x,T,A){let y=e.addToLineVertexArray(t,r),E=s.layout.get("symbol-height-offset").evaluate(_,{},T);E>e.maxHeightOffset&&(e.maxHeightOffset=E);let S,C,k,D,F=0,P=0,R=0,L=0,I=-1,B=-1,O={},$=(0,Ire.default)("");if(e.allowVerticalPlacement&&i.vertical){let be=s.layout.get("text-rotate").evaluate(_,{},T)+90,he=i.vertical;k=new Lz(l,t,u,c,f,he,h,d,p,be),o&&(D=new Lz(l,t,u,c,f,o,m,g,p,be))}if(n){let be=s.layout.get("icon-rotate").evaluate(_,{}),he=s.layout.get("icon-text-fit")!=="none",oe=uet(n,be,x,he),Ee=o?uet(o,be,x,he):void 0;C=new Lz(l,t,u,c,f,n,m,g,!1,be),F=oe.length*4;let ye=e.iconSizeData,ue=null;ye.kind==="source"?(ue=[128*s.layout.get("icon-size").evaluate(_,{})],ue[0]>32640&&Ma(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):ye.kind==="composite"&&(ue=[128*M.compositeIconSizes[0].evaluate(_,{},T),128*M.compositeIconSizes[1].evaluate(_,{},T)],(ue[0]>32640||ue[1]>32640)&&Ma(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),e.addSymbols(e.icon,oe,ue,b,w,_,0,t,y.lineStartIndex,y.lineLength,-1,T,E),I=e.icon.placedSymbolArray.length-1,Ee&&(P=Ee.length*4,e.addSymbols(e.icon,Ee,ue,b,w,_,2,t,y.lineStartIndex,y.lineLength,-1,T,E),B=e.icon.placedSymbolArray.length-1)}let Y=Object.keys(i.horizontal);for(let be of Y){let he=i.horizontal[be];S||(S=($=(0,Ire.default)(he.text),new Lz(l,t,u,c,f,he,h,d,p,s.layout.get("text-rotate").evaluate(_,{},T))));let oe=he.positionedLines.length===1;if(R+=fet(e,t,he,a,s,p,_,v,E,y,i.vertical?1:3,oe?Y:[be],O,I,M,T),oe)break}i.vertical&&(L+=fet(e,t,i.vertical,a,s,p,_,v,E,y,2,["vertical"],O,B,M,T));let K=S?S.boxStartIndex:e.collisionBoxArray.length,j=S?S.boxEndIndex:e.collisionBoxArray.length,q=k?k.boxStartIndex:e.collisionBoxArray.length,J=k?k.boxEndIndex:e.collisionBoxArray.length,U=C?C.boxStartIndex:e.collisionBoxArray.length,V=C?C.boxEndIndex:e.collisionBoxArray.length,X=D?D.boxStartIndex:e.collisionBoxArray.length,H=D?D.boxEndIndex:e.collisionBoxArray.length,G=-1,Q=(be,he)=>be!=null&&be.circleDiameter?Math.max(be.circleDiameter,he):he;G=Q(S,G),G=Q(k,G),G=Q(C,G),G=Q(D,G);let te=+(G>-1);te&&(G*=A/24),e.glyphOffsetArray.length>=e.maxGlyphs&&Ma("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),_.sortKey!==void 0&&e.addToSortKeyRanges(e.symbolInstances.length,_.sortKey);let ce=int(s,_,T),[ge,Ce]=Tyr(e.textAnchorOffsets,ce);e.symbolInstances.emplaceBack(t.x,t.y,O.right>=0?O.right:-1,O.center>=0?O.center:-1,O.left>=0?O.left:-1,O.vertical||-1,I,B,$,K,j,q,J,U,V,X,H,u,R,L,F,P,te,0,h,G,ge,Ce,E)}function Myr(e,t,r,i){let n=e.compareText;if(!(t in n))n[t]=[];else{let a=n[t];for(let o=a.length-1;o>=0;o--)if(i.dist(a[o])<r)return!0}return n[t].push(i),!1}function zk(e,t,r){let i="never",n=e.get(t);return n?i=n:e.get(r)&&(i="always"),i}function Pz(e,t,r,i,n,a,o,s,l,u,c,f,h,d){let p=s?Math.min(oet,Math.round(s[0])):0,v=s?Math.min(oet,Math.round(s[1])):0;e.emplaceBack(t,r,Math.round(i*32),Math.round(n*32),a,o,(p<<1)+ +!!l,v,u*16,c*16,f*256,h*256,d)}function o8(e,t,r){e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r)}function Eyr(e){for(let t of e.sections)if(Oit(t.text))return!0;return!1}function kyr(e,t){return t.replace(/{([^{}]+)}/g,(r,i)=>e&&i in e?String(e[i]):"")}function Iyr(e,t,r,i=1){var a;let n=(a=e.get("icon-padding").evaluate(t,{},r))==null?void 0:a.values;return[n[0]*i,n[1]*i,n[2]*i,n[3]*i]}function snt(e){let t=[],r=e.id;return r===void 0&&t.push(new Qr(`layers.${r}`,null,'missing required property "id"')),e.render===void 0&&t.push(new Qr(`layers.${r}`,null,'missing required method "render"')),e.renderingMode&&e.renderingMode!=="2d"&&e.renderingMode!=="3d"&&t.push(new Qr(`layers.${r}`,null,'property "renderingMode" must be either "2d" or "3d"')),t}function ZB(e,t){if(e.type==="custom")return new Oyr(e,t);switch(e.type){case"background":return new qyr(e,t);case"circle":return new x1r(e,t);case"color-relief":return new L1r(e,t);case"fill":return new cgr(e,t);case"fill-extrusion":return new Cgr(e,t);case"heatmap":return new T1r(e,t);case"hillshade":return new E1r(e,t);case"line":return new Ggr(e,t);case"raster":return new Rvr(e,t);case"symbol":return new Pyr(e,t)}}function Vyr(e,t,r){return!(e<0||e>25||r<0||r>=2**e||t<0||t>=2**e)}function gne(e,t){let{x:r,y:i}=wo.fromLngLat(t);return!(e<0||e>25||i<0||i>=1||r<0||r>=1)}function Vb(e,t,r,i,n){e*=2,e<0&&(e=e*-1-1);let a=1<<r;return(a*a*e+a*n+i).toString(36)+r.toString(36)+t.toString(36)}function Gyr(e,t,r){t=2**r-t-1;let i=het(e*256,t*256,r),n=het((e+1)*256,(t+1)*256,r);return`${i[0]},${i[1]},${n[0]},${n[1]}`}function het(e,t,r){let i=2*Kte/256/2**r;return[e*i-Kte,t*i-Kte]}function Hyr(e,t,r){let i="";for(let n=e;n>0;n--){let a=1<<n-1;i+=(t&a?1:0)+(r&a?2:0)}return i}function mne(e,t){let r=Math.abs(e.wrap*2)-+(e.wrap<0),i=Math.abs(t.wrap*2)-+(t.wrap<0);return e.overscaledZ-t.overscaledZ||i-r||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}function Ane(e,t){return e-e%t}function Wyr(e){return Ane(e+31,32)}function Yyr(e){if(!Number.isFinite(e)||e<=0)return dnt;let t=Ane(Math.floor(e),256);return t===0?256:t}function Xyr(e){let t=e>>>0;return((t&255)<<24|(t&65280)<<8|t>>>8&65280|t>>>24&255)>>>0}function Zyr(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0;r[n++]=a>>>0&3,r[n++]=a>>>2&3,r[n++]=a>>>4&3,r[n++]=a>>>6&3,r[n++]=a>>>8&3,r[n++]=a>>>10&3,r[n++]=a>>>12&3,r[n++]=a>>>14&3,r[n++]=a>>>16&3,r[n++]=a>>>18&3,r[n++]=a>>>20&3,r[n++]=a>>>22&3,r[n++]=a>>>24&3,r[n++]=a>>>26&3,r[n++]=a>>>28&3,r[n++]=a>>>30&3,r[n++]=o>>>0&3,r[n++]=o>>>2&3,r[n++]=o>>>4&3,r[n++]=o>>>6&3,r[n++]=o>>>8&3,r[n++]=o>>>10&3,r[n++]=o>>>12&3,r[n++]=o>>>14&3,r[n++]=o>>>16&3,r[n++]=o>>>18&3,r[n++]=o>>>20&3,r[n++]=o>>>22&3,r[n++]=o>>>24&3,r[n++]=o>>>26&3,r[n++]=o>>>28&3,r[n]=o>>>30&3}function Kyr(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0;r[n++]=a>>>0&7,r[n++]=a>>>3&7,r[n++]=a>>>6&7,r[n++]=a>>>9&7,r[n++]=a>>>12&7,r[n++]=a>>>15&7,r[n++]=a>>>18&7,r[n++]=a>>>21&7,r[n++]=a>>>24&7,r[n++]=a>>>27&7,r[n++]=(a>>>30|(o&1)<<2)&7,r[n++]=o>>>1&7,r[n++]=o>>>4&7,r[n++]=o>>>7&7,r[n++]=o>>>10&7,r[n++]=o>>>13&7,r[n++]=o>>>16&7,r[n++]=o>>>19&7,r[n++]=o>>>22&7,r[n++]=o>>>25&7,r[n++]=o>>>28&7,r[n++]=(o>>>31|(s&3)<<1)&7,r[n++]=s>>>2&7,r[n++]=s>>>5&7,r[n++]=s>>>8&7,r[n++]=s>>>11&7,r[n++]=s>>>14&7,r[n++]=s>>>17&7,r[n++]=s>>>20&7,r[n++]=s>>>23&7,r[n++]=s>>>26&7,r[n]=s>>>29&7}function Jyr(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0;r[n++]=a>>>0&15,r[n++]=a>>>4&15,r[n++]=a>>>8&15,r[n++]=a>>>12&15,r[n++]=a>>>16&15,r[n++]=a>>>20&15,r[n++]=a>>>24&15,r[n++]=a>>>28&15,r[n++]=o>>>0&15,r[n++]=o>>>4&15,r[n++]=o>>>8&15,r[n++]=o>>>12&15,r[n++]=o>>>16&15,r[n++]=o>>>20&15,r[n++]=o>>>24&15,r[n++]=o>>>28&15,r[n++]=s>>>0&15,r[n++]=s>>>4&15,r[n++]=s>>>8&15,r[n++]=s>>>12&15,r[n++]=s>>>16&15,r[n++]=s>>>20&15,r[n++]=s>>>24&15,r[n++]=s>>>28&15,r[n++]=l>>>0&15,r[n++]=l>>>4&15,r[n++]=l>>>8&15,r[n++]=l>>>12&15,r[n++]=l>>>16&15,r[n++]=l>>>20&15,r[n++]=l>>>24&15,r[n]=l>>>28&15}function Qyr(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0;r[n++]=a>>>0&31,r[n++]=a>>>5&31,r[n++]=a>>>10&31,r[n++]=a>>>15&31,r[n++]=a>>>20&31,r[n++]=a>>>25&31,r[n++]=(a>>>30|(o&7)<<2)&31,r[n++]=o>>>3&31,r[n++]=o>>>8&31,r[n++]=o>>>13&31,r[n++]=o>>>18&31,r[n++]=o>>>23&31,r[n++]=(o>>>28|(s&1)<<4)&31,r[n++]=s>>>1&31,r[n++]=s>>>6&31,r[n++]=s>>>11&31,r[n++]=s>>>16&31,r[n++]=s>>>21&31,r[n++]=s>>>26&31,r[n++]=(s>>>31|(l&15)<<1)&31,r[n++]=l>>>4&31,r[n++]=l>>>9&31,r[n++]=l>>>14&31,r[n++]=l>>>19&31,r[n++]=l>>>24&31,r[n++]=(l>>>29|(u&3)<<3)&31,r[n++]=u>>>2&31,r[n++]=u>>>7&31,r[n++]=u>>>12&31,r[n++]=u>>>17&31,r[n++]=u>>>22&31,r[n]=u>>>27&31}function e2r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0;r[n++]=a>>>0&63,r[n++]=a>>>6&63,r[n++]=a>>>12&63,r[n++]=a>>>18&63,r[n++]=a>>>24&63,r[n++]=(a>>>30|(o&15)<<2)&63,r[n++]=o>>>4&63,r[n++]=o>>>10&63,r[n++]=o>>>16&63,r[n++]=o>>>22&63,r[n++]=(o>>>28|(s&3)<<4)&63,r[n++]=s>>>2&63,r[n++]=s>>>8&63,r[n++]=s>>>14&63,r[n++]=s>>>20&63,r[n++]=s>>>26&63,r[n++]=l>>>0&63,r[n++]=l>>>6&63,r[n++]=l>>>12&63,r[n++]=l>>>18&63,r[n++]=l>>>24&63,r[n++]=(l>>>30|(u&15)<<2)&63,r[n++]=u>>>4&63,r[n++]=u>>>10&63,r[n++]=u>>>16&63,r[n++]=u>>>22&63,r[n++]=(u>>>28|(c&3)<<4)&63,r[n++]=c>>>2&63,r[n++]=c>>>8&63,r[n++]=c>>>14&63,r[n++]=c>>>20&63,r[n]=c>>>26&63}function t2r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0;r[n++]=a>>>0&127,r[n++]=a>>>7&127,r[n++]=a>>>14&127,r[n++]=a>>>21&127,r[n++]=(a>>>28|(o&7)<<4)&127,r[n++]=o>>>3&127,r[n++]=o>>>10&127,r[n++]=o>>>17&127,r[n++]=o>>>24&127,r[n++]=(o>>>31|(s&63)<<1)&127,r[n++]=s>>>6&127,r[n++]=s>>>13&127,r[n++]=s>>>20&127,r[n++]=(s>>>27|(l&3)<<5)&127,r[n++]=l>>>2&127,r[n++]=l>>>9&127,r[n++]=l>>>16&127,r[n++]=l>>>23&127,r[n++]=(l>>>30|(u&31)<<2)&127,r[n++]=u>>>5&127,r[n++]=u>>>12&127,r[n++]=u>>>19&127,r[n++]=(u>>>26|(c&1)<<6)&127,r[n++]=c>>>1&127,r[n++]=c>>>8&127,r[n++]=c>>>15&127,r[n++]=c>>>22&127,r[n++]=(c>>>29|(f&15)<<3)&127,r[n++]=f>>>4&127,r[n++]=f>>>11&127,r[n++]=f>>>18&127,r[n]=f>>>25&127}function r2r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0,h=e[t+7]>>>0;r[n++]=a>>>0&255,r[n++]=a>>>8&255,r[n++]=a>>>16&255,r[n++]=a>>>24&255,r[n++]=o>>>0&255,r[n++]=o>>>8&255,r[n++]=o>>>16&255,r[n++]=o>>>24&255,r[n++]=s>>>0&255,r[n++]=s>>>8&255,r[n++]=s>>>16&255,r[n++]=s>>>24&255,r[n++]=l>>>0&255,r[n++]=l>>>8&255,r[n++]=l>>>16&255,r[n++]=l>>>24&255,r[n++]=u>>>0&255,r[n++]=u>>>8&255,r[n++]=u>>>16&255,r[n++]=u>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>24&255,r[n++]=f>>>0&255,r[n++]=f>>>8&255,r[n++]=f>>>16&255,r[n++]=f>>>24&255,r[n++]=h>>>0&255,r[n++]=h>>>8&255,r[n++]=h>>>16&255,r[n]=h>>>24&255}function i2r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0,h=e[t+7]>>>0,d=e[t+8]>>>0;r[n++]=a>>>0&511,r[n++]=a>>>9&511,r[n++]=a>>>18&511,r[n++]=(a>>>27|(o&15)<<5)&511,r[n++]=o>>>4&511,r[n++]=o>>>13&511,r[n++]=o>>>22&511,r[n++]=(o>>>31|(s&255)<<1)&511,r[n++]=s>>>8&511,r[n++]=s>>>17&511,r[n++]=(s>>>26|(l&7)<<6)&511,r[n++]=l>>>3&511,r[n++]=l>>>12&511,r[n++]=l>>>21&511,r[n++]=(l>>>30|(u&127)<<2)&511,r[n++]=u>>>7&511,r[n++]=u>>>16&511,r[n++]=(u>>>25|(c&3)<<7)&511,r[n++]=c>>>2&511,r[n++]=c>>>11&511,r[n++]=c>>>20&511,r[n++]=(c>>>29|(f&63)<<3)&511,r[n++]=f>>>6&511,r[n++]=f>>>15&511,r[n++]=(f>>>24|(h&1)<<8)&511,r[n++]=h>>>1&511,r[n++]=h>>>10&511,r[n++]=h>>>19&511,r[n++]=(h>>>28|(d&31)<<4)&511,r[n++]=d>>>5&511,r[n++]=d>>>14&511,r[n]=d>>>23&511}function n2r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0,h=e[t+7]>>>0,d=e[t+8]>>>0,p=e[t+9]>>>0;r[n++]=a>>>0&1023,r[n++]=a>>>10&1023,r[n++]=a>>>20&1023,r[n++]=(a>>>30|(o&255)<<2)&1023,r[n++]=o>>>8&1023,r[n++]=o>>>18&1023,r[n++]=(o>>>28|(s&63)<<4)&1023,r[n++]=s>>>6&1023,r[n++]=s>>>16&1023,r[n++]=(s>>>26|(l&15)<<6)&1023,r[n++]=l>>>4&1023,r[n++]=l>>>14&1023,r[n++]=(l>>>24|(u&3)<<8)&1023,r[n++]=u>>>2&1023,r[n++]=u>>>12&1023,r[n++]=u>>>22&1023,r[n++]=c>>>0&1023,r[n++]=c>>>10&1023,r[n++]=c>>>20&1023,r[n++]=(c>>>30|(f&255)<<2)&1023,r[n++]=f>>>8&1023,r[n++]=f>>>18&1023,r[n++]=(f>>>28|(h&63)<<4)&1023,r[n++]=h>>>6&1023,r[n++]=h>>>16&1023,r[n++]=(h>>>26|(d&15)<<6)&1023,r[n++]=d>>>4&1023,r[n++]=d>>>14&1023,r[n++]=(d>>>24|(p&3)<<8)&1023,r[n++]=p>>>2&1023,r[n++]=p>>>12&1023,r[n]=p>>>22&1023}function a2r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0,h=e[t+7]>>>0,d=e[t+8]>>>0,p=e[t+9]>>>0,v=e[t+10]>>>0;r[n++]=a>>>0&2047,r[n++]=a>>>11&2047,r[n++]=(a>>>22|(o&1)<<10)&2047,r[n++]=o>>>1&2047,r[n++]=o>>>12&2047,r[n++]=(o>>>23|(s&3)<<9)&2047,r[n++]=s>>>2&2047,r[n++]=s>>>13&2047,r[n++]=(s>>>24|(l&7)<<8)&2047,r[n++]=l>>>3&2047,r[n++]=l>>>14&2047,r[n++]=(l>>>25|(u&15)<<7)&2047,r[n++]=u>>>4&2047,r[n++]=u>>>15&2047,r[n++]=(u>>>26|(c&31)<<6)&2047,r[n++]=c>>>5&2047,r[n++]=c>>>16&2047,r[n++]=(c>>>27|(f&63)<<5)&2047,r[n++]=f>>>6&2047,r[n++]=f>>>17&2047,r[n++]=(f>>>28|(h&127)<<4)&2047,r[n++]=h>>>7&2047,r[n++]=h>>>18&2047,r[n++]=(h>>>29|(d&255)<<3)&2047,r[n++]=d>>>8&2047,r[n++]=d>>>19&2047,r[n++]=(d>>>30|(p&511)<<2)&2047,r[n++]=p>>>9&2047,r[n++]=p>>>20&2047,r[n++]=(p>>>31|(v&1023)<<1)&2047,r[n++]=v>>>10&2047,r[n]=v>>>21&2047}function o2r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0,h=e[t+7]>>>0,d=e[t+8]>>>0,p=e[t+9]>>>0,v=e[t+10]>>>0,m=e[t+11]>>>0;r[n++]=a>>>0&4095,r[n++]=a>>>12&4095,r[n++]=(a>>>24|(o&15)<<8)&4095,r[n++]=o>>>4&4095,r[n++]=o>>>16&4095,r[n++]=(o>>>28|(s&255)<<4)&4095,r[n++]=s>>>8&4095,r[n++]=s>>>20&4095,r[n++]=l>>>0&4095,r[n++]=l>>>12&4095,r[n++]=(l>>>24|(u&15)<<8)&4095,r[n++]=u>>>4&4095,r[n++]=u>>>16&4095,r[n++]=(u>>>28|(c&255)<<4)&4095,r[n++]=c>>>8&4095,r[n++]=c>>>20&4095,r[n++]=f>>>0&4095,r[n++]=f>>>12&4095,r[n++]=(f>>>24|(h&15)<<8)&4095,r[n++]=h>>>4&4095,r[n++]=h>>>16&4095,r[n++]=(h>>>28|(d&255)<<4)&4095,r[n++]=d>>>8&4095,r[n++]=d>>>20&4095,r[n++]=p>>>0&4095,r[n++]=p>>>12&4095,r[n++]=(p>>>24|(v&15)<<8)&4095,r[n++]=v>>>4&4095,r[n++]=v>>>16&4095,r[n++]=(v>>>28|(m&255)<<4)&4095,r[n++]=m>>>8&4095,r[n]=m>>>20&4095}function s2r(e,t,r,i){let n=i,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,f=e[t+6]>>>0,h=e[t+7]>>>0,d=e[t+8]>>>0,p=e[t+9]>>>0,v=e[t+10]>>>0,m=e[t+11]>>>0,g=e[t+12]>>>0,w=e[t+13]>>>0,b=e[t+14]>>>0,_=e[t+15]>>>0;r[n++]=a>>>0&65535,r[n++]=a>>>16&65535,r[n++]=o>>>0&65535,r[n++]=o>>>16&65535,r[n++]=s>>>0&65535,r[n++]=s>>>16&65535,r[n++]=l>>>0&65535,r[n++]=l>>>16&65535,r[n++]=u>>>0&65535,r[n++]=u>>>16&65535,r[n++]=c>>>0&65535,r[n++]=c>>>16&65535,r[n++]=f>>>0&65535,r[n++]=f>>>16&65535,r[n++]=h>>>0&65535,r[n++]=h>>>16&65535,r[n++]=d>>>0&65535,r[n++]=d>>>16&65535,r[n++]=p>>>0&65535,r[n++]=p>>>16&65535,r[n++]=v>>>0&65535,r[n++]=v>>>16&65535,r[n++]=m>>>0&65535,r[n++]=m>>>16&65535,r[n++]=g>>>0&65535,r[n++]=g>>>16&65535,r[n++]=w>>>0&65535,r[n++]=w>>>16&65535,r[n++]=b>>>0&65535,r[n++]=b>>>16&65535,r[n++]=_>>>0&65535,r[n]=_>>>16&65535}function l2r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0;r[n++]=s>>>0&1,r[n++]=s>>>1&1,r[n++]=s>>>2&1,r[n++]=s>>>3&1,r[n++]=s>>>4&1,r[n++]=s>>>5&1,r[n++]=s>>>6&1,r[n++]=s>>>7&1,r[n++]=s>>>8&1,r[n++]=s>>>9&1,r[n++]=s>>>10&1,r[n++]=s>>>11&1,r[n++]=s>>>12&1,r[n++]=s>>>13&1,r[n++]=s>>>14&1,r[n++]=s>>>15&1,r[n++]=s>>>16&1,r[n++]=s>>>17&1,r[n++]=s>>>18&1,r[n++]=s>>>19&1,r[n++]=s>>>20&1,r[n++]=s>>>21&1,r[n++]=s>>>22&1,r[n++]=s>>>23&1,r[n++]=s>>>24&1,r[n++]=s>>>25&1,r[n++]=s>>>26&1,r[n++]=s>>>27&1,r[n++]=s>>>28&1,r[n++]=s>>>29&1,r[n++]=s>>>30&1,r[n++]=s>>>31&1}}function u2r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0;r[n++]=s>>>0&3,r[n++]=s>>>2&3,r[n++]=s>>>4&3,r[n++]=s>>>6&3,r[n++]=s>>>8&3,r[n++]=s>>>10&3,r[n++]=s>>>12&3,r[n++]=s>>>14&3,r[n++]=s>>>16&3,r[n++]=s>>>18&3,r[n++]=s>>>20&3,r[n++]=s>>>22&3,r[n++]=s>>>24&3,r[n++]=s>>>26&3,r[n++]=s>>>28&3,r[n++]=s>>>30&3,r[n++]=l>>>0&3,r[n++]=l>>>2&3,r[n++]=l>>>4&3,r[n++]=l>>>6&3,r[n++]=l>>>8&3,r[n++]=l>>>10&3,r[n++]=l>>>12&3,r[n++]=l>>>14&3,r[n++]=l>>>16&3,r[n++]=l>>>18&3,r[n++]=l>>>20&3,r[n++]=l>>>22&3,r[n++]=l>>>24&3,r[n++]=l>>>26&3,r[n++]=l>>>28&3,r[n++]=l>>>30&3}}function c2r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0;r[n++]=s>>>0&7,r[n++]=s>>>3&7,r[n++]=s>>>6&7,r[n++]=s>>>9&7,r[n++]=s>>>12&7,r[n++]=s>>>15&7,r[n++]=s>>>18&7,r[n++]=s>>>21&7,r[n++]=s>>>24&7,r[n++]=s>>>27&7,r[n++]=(s>>>30|(l&1)<<2)&7,r[n++]=l>>>1&7,r[n++]=l>>>4&7,r[n++]=l>>>7&7,r[n++]=l>>>10&7,r[n++]=l>>>13&7,r[n++]=l>>>16&7,r[n++]=l>>>19&7,r[n++]=l>>>22&7,r[n++]=l>>>25&7,r[n++]=l>>>28&7,r[n++]=(l>>>31|(u&3)<<1)&7,r[n++]=u>>>2&7,r[n++]=u>>>5&7,r[n++]=u>>>8&7,r[n++]=u>>>11&7,r[n++]=u>>>14&7,r[n++]=u>>>17&7,r[n++]=u>>>20&7,r[n++]=u>>>23&7,r[n++]=u>>>26&7,r[n++]=u>>>29&7}}function f2r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0,c=e[a++]>>>0;r[n++]=s>>>0&15,r[n++]=s>>>4&15,r[n++]=s>>>8&15,r[n++]=s>>>12&15,r[n++]=s>>>16&15,r[n++]=s>>>20&15,r[n++]=s>>>24&15,r[n++]=s>>>28&15,r[n++]=l>>>0&15,r[n++]=l>>>4&15,r[n++]=l>>>8&15,r[n++]=l>>>12&15,r[n++]=l>>>16&15,r[n++]=l>>>20&15,r[n++]=l>>>24&15,r[n++]=l>>>28&15,r[n++]=u>>>0&15,r[n++]=u>>>4&15,r[n++]=u>>>8&15,r[n++]=u>>>12&15,r[n++]=u>>>16&15,r[n++]=u>>>20&15,r[n++]=u>>>24&15,r[n++]=u>>>28&15,r[n++]=c>>>0&15,r[n++]=c>>>4&15,r[n++]=c>>>8&15,r[n++]=c>>>12&15,r[n++]=c>>>16&15,r[n++]=c>>>20&15,r[n++]=c>>>24&15,r[n++]=c>>>28&15}}function h2r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0,c=e[a++]>>>0,f=e[a++]>>>0;r[n++]=s>>>0&31,r[n++]=s>>>5&31,r[n++]=s>>>10&31,r[n++]=s>>>15&31,r[n++]=s>>>20&31,r[n++]=s>>>25&31,r[n++]=(s>>>30|(l&7)<<2)&31,r[n++]=l>>>3&31,r[n++]=l>>>8&31,r[n++]=l>>>13&31,r[n++]=l>>>18&31,r[n++]=l>>>23&31,r[n++]=(l>>>28|(u&1)<<4)&31,r[n++]=u>>>1&31,r[n++]=u>>>6&31,r[n++]=u>>>11&31,r[n++]=u>>>16&31,r[n++]=u>>>21&31,r[n++]=u>>>26&31,r[n++]=(u>>>31|(c&15)<<1)&31,r[n++]=c>>>4&31,r[n++]=c>>>9&31,r[n++]=c>>>14&31,r[n++]=c>>>19&31,r[n++]=c>>>24&31,r[n++]=(c>>>29|(f&3)<<3)&31,r[n++]=f>>>2&31,r[n++]=f>>>7&31,r[n++]=f>>>12&31,r[n++]=f>>>17&31,r[n++]=f>>>22&31,r[n++]=f>>>27&31}}function d2r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0,c=e[a++]>>>0,f=e[a++]>>>0,h=e[a++]>>>0;r[n++]=s>>>0&63,r[n++]=s>>>6&63,r[n++]=s>>>12&63,r[n++]=s>>>18&63,r[n++]=s>>>24&63,r[n++]=(s>>>30|(l&15)<<2)&63,r[n++]=l>>>4&63,r[n++]=l>>>10&63,r[n++]=l>>>16&63,r[n++]=l>>>22&63,r[n++]=(l>>>28|(u&3)<<4)&63,r[n++]=u>>>2&63,r[n++]=u>>>8&63,r[n++]=u>>>14&63,r[n++]=u>>>20&63,r[n++]=u>>>26&63,r[n++]=c>>>0&63,r[n++]=c>>>6&63,r[n++]=c>>>12&63,r[n++]=c>>>18&63,r[n++]=c>>>24&63,r[n++]=(c>>>30|(f&15)<<2)&63,r[n++]=f>>>4&63,r[n++]=f>>>10&63,r[n++]=f>>>16&63,r[n++]=f>>>22&63,r[n++]=(f>>>28|(h&3)<<4)&63,r[n++]=h>>>2&63,r[n++]=h>>>8&63,r[n++]=h>>>14&63,r[n++]=h>>>20&63,r[n++]=h>>>26&63}}function p2r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0,c=e[a++]>>>0,f=e[a++]>>>0,h=e[a++]>>>0,d=e[a++]>>>0;r[n++]=s>>>0&127,r[n++]=s>>>7&127,r[n++]=s>>>14&127,r[n++]=s>>>21&127,r[n++]=(s>>>28|(l&7)<<4)&127,r[n++]=l>>>3&127,r[n++]=l>>>10&127,r[n++]=l>>>17&127,r[n++]=l>>>24&127,r[n++]=(l>>>31|(u&63)<<1)&127,r[n++]=u>>>6&127,r[n++]=u>>>13&127,r[n++]=u>>>20&127,r[n++]=(u>>>27|(c&3)<<5)&127,r[n++]=c>>>2&127,r[n++]=c>>>9&127,r[n++]=c>>>16&127,r[n++]=c>>>23&127,r[n++]=(c>>>30|(f&31)<<2)&127,r[n++]=f>>>5&127,r[n++]=f>>>12&127,r[n++]=f>>>19&127,r[n++]=(f>>>26|(h&1)<<6)&127,r[n++]=h>>>1&127,r[n++]=h>>>8&127,r[n++]=h>>>15&127,r[n++]=h>>>22&127,r[n++]=(h>>>29|(d&15)<<3)&127,r[n++]=d>>>4&127,r[n++]=d>>>11&127,r[n++]=d>>>18&127,r[n++]=d>>>25&127}}function v2r(e,t,r,i){let n=i,a=t;for(let o=0;o<8;o++){let s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0,c=e[a++]>>>0,f=e[a++]>>>0,h=e[a++]>>>0,d=e[a++]>>>0,p=e[a++]>>>0;r[n++]=s>>>0&255,r[n++]=s>>>8&255,r[n++]=s>>>16&255,r[n++]=s>>>24&255,r[n++]=l>>>0&255,r[n++]=l>>>8&255,r[n++]=l>>>16&255,r[n++]=l>>>24&255,r[n++]=u>>>0&255,r[n++]=u>>>8&255,r[n++]=u>>>16&255,r[n++]=u>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>24&255,r[n++]=f>>>0&255,r[n++]=f>>>8&255,r[n++]=f>>>16&255,r[n++]=f>>>24&255,r[n++]=h>>>0&255,r[n++]=h>>>8&255,r[n++]=h>>>16&255,r[n++]=h>>>24&255,r[n++]=d>>>0&255,r[n++]=d>>>8&255,r[n++]=d>>>16&255,r[n++]=d>>>24&255,r[n++]=p>>>0&255,r[n++]=p>>>8&255,r[n++]=p>>>16&255,r[n++]=p>>>24&255}}function g2r(e,t,r,i){let n=i,a=t;for(let o=0;o<128;o++){let s=e[a++]>>>0;r[n++]=s&65535,r[n++]=s>>>16&65535}}function m2r(e,t,r,i,n){let a=oie[n]>>>0,o=t,s=0,l=e[o]>>>0,u=i;for(let c=0;c<8;c++){for(let f=0;f<32;f++)if(s+n<=32){let h=l>>>s&a;r[u+f]=h|0,s+=n,s===32&&(s=0,o++,f!==31&&(l=e[o]>>>0))}else{let h=32-s,d=l>>>s;o++,l=e[o]>>>0;let p=n-h,v=-1>>>32-p>>>0,m=(d|(l&v)<<h)&a;r[u+f]=m|0,s=p}u+=32,s=0,c<7&&(l=e[o]>>>0)}}function pnt(){let e=new Uint8Array(y2r);return{dataToBePacked:Array(33),dataPointers:new Int32Array(33),byteContainer:e,byteContainerI32:new Int32Array(e.buffer,e.byteOffset,e.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function x2r(e=16){if(e<0)throw RangeError(`initialEncodedWordCapacity must be >= 0, got ${e}`);let t=Math.max(16,e|0);return{encodedWords:new Uint32Array(t),decoderWorkspace:pnt()}}function _2r(e,t){if(t<=e.encodedWords.length)return e.encodedWords;let r=new Uint32Array(Math.max(16,t*2));return e.encodedWords=r,r}function b2r(e,t,r,i){i.byteContainer.length<r&&(i.byteContainer=new Uint8Array(r*2),i.byteContainerI32=void 0);let n=i.byteContainer,a=r>>>2;if(n.byteOffset&3)for(let s=0;s<a;s=s+1|0){let l=e[t+s|0]|0,u=s<<2;n[u]=l&255,n[u+1|0]=l>>>8&255,n[u+2|0]=l>>>16&255,n[u+3|0]=l>>>24&255}else{let s=i.byteContainerI32;(!s||s.buffer!==n.buffer||s.byteOffset!==n.byteOffset||s.length<a)&&(s=i.byteContainerI32=new Int32Array(n.buffer,n.byteOffset,n.byteLength>>>2)),s.set(e.subarray(t,t+a))}let o=r&3;if(o>0){let s=e[t+a|0]|0,l=a<<2;for(let u=0;u<o;u=u+1|0)n[l+u|0]=s>>>(u<<3)&255}return n}function w2r(e,t,r){let i=e[t++]|0,n=r.dataToBePacked;for(let a=2;a<=32;a=a+1|0){if(!(i>>>a-1&1))continue;if(t>=e.length)throw Error(`FastPFOR decode: truncated exception stream header (bitWidth=${a}, streamWordIndex=${t}, needWords=1, availableWords=${e.length-t}, encodedWords=${e.length})`);let o=e[t++]>>>0,s=Wyr(o),l=o*a+31>>>5;if(t+l>e.length)throw Error(`FastPFOR decode: truncated exception stream (bitWidth=${a}, size=${o}, streamWordIndex=${t}, needWords=${l}, availableWords=${e.length-t}, encodedWords=${e.length})`);let u=n[a];(!u||u.length<s)&&(u=n[a]=new Uint32Array(s));let c=0;for(;c<o;c=c+32|0)L2r(e,t,u,c,a),t=t+a|0;let f=c-o|0;t=t-(f*a>>>5)|0,r.exceptionSizes[a]=o}return t}function T2r(e,t,r,i,n){switch(n){case 1:l2r(e,t,r,i);break;case 2:u2r(e,t,r,i);break;case 3:c2r(e,t,r,i);break;case 4:f2r(e,t,r,i);break;case 5:h2r(e,t,r,i);break;case 6:d2r(e,t,r,i);break;case 7:p2r(e,t,r,i);break;case 8:v2r(e,t,r,i);break;case 16:g2r(e,t,r,i);break;default:m2r(e,t,r,i,n)}return t+(n<<3)|0}function A2r(e,t,r,i){if(r+2>t)throw Error(`FastPFOR decode: byteContainer underflow at block=${i} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${r}, byteSize=${t})`);let n=e[r++],a=e[r++];if(n>32)throw Error(`FastPFOR decode: invalid bitWidth=${n} at block=${i} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:n,exceptionCount:a,bytePosIn:r}}function M2r(e,t,r,i,n,a){if(r+1>t)throw Error(`FastPFOR decode: exception header underflow at block=${a} (need 1 byte for maxBits, bytePos=${r}, byteSize=${t})`);let o=e[r++];if(o<i||o>32)throw Error(`FastPFOR decode: invalid maxBits=${o} at block=${a} (bitWidth=${i}, expected ${i}..32)`);let s=o-i|0;if(s<1||s>32)throw Error(`FastPFOR decode: invalid exceptionBitWidth=${s} at block=${a} (bitWidth=${i}, maxBits=${o})`);if(r+n>t)throw Error(`FastPFOR decode: exception positions underflow at block=${a} (need=${n}, have=${t-r})`);return{maxBits:o,exceptionBitWidth:s,bytePosIn:r}}function S2r(e,t,r,i,n,a,o,s,l){let{maxBits:u,exceptionBitWidth:c,bytePosIn:f}=M2r(n,a,o,r,i,l);if(o=f,c===1){let m=1<<r;for(let g=0;g<i;g=g+1|0){let w=n[o++];e[w+t|0]|=m}return o}let h=s.dataToBePacked[c];if(!h)throw Error(`FastPFOR decode: missing exception stream for exceptionBitWidth=${c} (bitWidth=${r}, maxBits=${u}) at block ${l}`);let d=s.dataPointers,p=d[c]|0,v=s.exceptionSizes[c]|0;if(p+i>v)throw Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${c} (ptr=${p}, need ${i}, size=${v}) at block ${l}`);for(let m=0;m<i;m=m+1|0){let g=n[o++],w=h[p++]|0;e[g+t|0]|=w<<r}return d[c]=p,o}function E2r(e,t,r,i,n,a,o,s,l,u){let c=r|0,f=0;for(let h=0;h<o;h=h+1|0){let d=A2r(s,l,f,h);f=d.bytePosIn;let p=d.bitWidth,v=d.exceptionCount,m=a+h*256|0;switch(p){case 0:n.fill(0,m,m+256);break;case 32:for(let g=0;g<256;g=g+1|0)n[m+g|0]=e[c+g|0]|0;c=c+256|0;break;default:c=T2r(e,c,n,m,p)}v>0&&(f=S2r(n,m,p,v,s,l,f,u,h))}if(c!==i)throw Error(`FastPFOR decode: packed region mismatch (pageStart=${t}, packedStart=${r}, consumedPackedEnd=${c}, expectedPackedEnd=${i}, packedWords=${i-r}, encoded.length=${e.length})`)}function k2r(e,t,r,i,n,a){let o=r|0,s=e[o]|0;if(s<=0||o+s>e.length-1)throw Error(`FastPFOR decode: invalid whereMeta=${s} at pageStart=${o} (expected > 0 and pageStart+whereMeta < encoded.length=${e.length})`);let l=o+1|0,u=o+s|0,c=e[u]>>>0,f=c+3>>>2,h=u+1,d=h+f;if(d>=e.length)throw Error(`FastPFOR decode: invalid byteSize=${c} (metaInts=${f}, pageStart=${o}, packedEnd=${u}, byteContainerStart=${h}) causes bitmapPos=${d} out of bounds (encoded.length=${e.length})`);let p=b2r(e,h,c,a),v=c,m=w2r(e,d,a);return a.dataPointers.fill(0),E2r(e,o,l,u,t,i|0,n/256|0,p,v,a),m}function C2r(e,t,r,i,n,a){let o=i+Ane(n,256),s=i,l=r;for(;s!==o;){let u=Math.min(sie,o-s);l=k2r(e,t,l,s,u,a),s=s+u|0}return l}function D2r(e,t,r,i,n,a){if(a===0)return t;let o=0,s=t,l=t+r,u=n,c=n,f=n+a,h=0,d=0;for(;s<l&&c<f;){let p=e[s]>>>o&255;if(o+=8,s+=o>>>5,o&=31,h|=(p&127)<<d,p&128)i[c++]=h|0,h=0,d=0;else if(d+=7,d>28)throw Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${d}, partial=${h}, decoded=${c-u}/${a}, inPos=${s}, inEnd=${l})`)}if(c!==f)throw Error(`FastPFOR VByte: truncated stream (decoded=${c-u}, expected=${a}, consumedWords=${s-t}/${r}, vbyteStart=${t}, vbyteEnd=${l})`);return s}function F2r(e,t,r){let i=0,n=0,a=new Uint32Array(t),o=r!=null?r:pnt();if(e.length>0){let u=e[i]|0;if(i=i+1|0,u&255)throw Error(`FastPFOR decode: invalid alignedLength=${u} (expected multiple of 256)`);if(n+u>a.length)throw Error(`FastPFOR decode: output buffer too small (outPos=${n}, alignedLength=${u}, out.length=${a.length})`);i=C2r(e,a,i,n,u,o),n=n+u|0}let s=e.length-i|0,l=t-n|0;return D2r(e,i,s,a,n,l),a}function L2r(e,t,r,i,n){switch(n){case 2:Zyr(e,t,r,i);return;case 3:Kyr(e,t,r,i);return;case 4:Jyr(e,t,r,i);return;case 5:Qyr(e,t,r,i);return;case 6:e2r(e,t,r,i);return;case 7:t2r(e,t,r,i);return;case 8:r2r(e,t,r,i);return;case 9:i2r(e,t,r,i);return;case 10:n2r(e,t,r,i);return;case 11:a2r(e,t,r,i);return;case 12:o2r(e,t,r,i);return;case 16:s2r(e,t,r,i);return;case 32:for(let u=0;u<32;u=u+1|0)r[i+u|0]=e[t+u|0]|0;return}let a=oie[n]>>>0,o=t,s=0,l=e[o]>>>0;for(let u=0;u<32;u++)if(s+n<=32){let c=l>>>s&a;r[i+u]=c|0,s+=n,s===32&&(s=0,o++,u!==31&&(l=e[o]>>>0))}else{let c=32-s,f=l>>>s;o++,l=e[o]>>>0;let h=oie[n-c]>>>0,d=(f|(l&h)<<c)&a;r[i+u]=d|0,s=n-c}}function P2r(e,t,r,i){if(t<0||r<0||t+r>e.length)throw RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${t}, byteLength=${r}, bytes.length=${e.length})`);let n=Math.floor(r/4),a=r%4!=0,o=a?n+1:n;if(i.length<o)throw RangeError(`decodeBigEndianInt32sInto: out.length=${i.length} < ${o}`);if(n>0){let s=e.byteOffset+t;if(s&3)for(let l=0;l<n;l++){let u=t+l*4;i[l]=e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]|0}else{let l=new Uint32Array(e.buffer,s,n);for(let u=0;u<n;u++)i[u]=Xyr(l[u])|0}}if(a){let s=t+n*4,l=r-n*4,u=0;for(let c=0;c<l;c++)u|=e[s+c]<<24-c*8;i[n]=u|0}return o}function cf(e,t,r){let i=new Uint32Array(r),n=0,a=t.get();for(let o=0;o<i.length;o++){let s=e[a++],l=s&127;if(s<128){i[n++]=l;continue}if(s=e[a++],l|=(s&127)<<7,s<128){i[n++]=l;continue}if(s=e[a++],l|=(s&127)<<14,s<128){i[n++]=l;continue}if(s=e[a++],l|=(s&127)<<21,s<128){i[n++]=l;continue}s=e[a++],l|=(s&15)<<28,i[n++]=l}return t.set(a),i}function Mne(e,t,r){let i=new BigUint64Array(r);for(let n=0;n<i.length;n++)i[n]=I2r(e,t);return i}function I2r(e,t){let r=BigInt(0),i=0,n=t.get();for(;n<e.length;){let a=e[n++];if(r|=BigInt(a&127)<<BigInt(i),!(a&128))break;if(i+=7,i>=64)throw Error("Varint too long")}return t.set(n),r}function R2r(e,t,r){let i=new Float64Array(r);for(let n=0;n<r;n++)i[n]=z2r(e,t);return i}function z2r(e,t){let r,i;return i=e[t.get()],t.increment(),r=i&127,i<128||(i=e[t.get()],t.increment(),r|=(i&127)<<7,i<128)||(i=e[t.get()],t.increment(),r|=(i&127)<<14,i<128)||(i=e[t.get()],t.increment(),r|=(i&127)<<21,i<128)?r:(i=e[t.get()],r|=(i&15)<<28,B2r(r,e,t))}function B2r(e,t,r){let i,n;if(n=t[r.get()],r.increment(),i=(n&112)>>4,n<128||(n=t[r.get()],r.increment(),i|=(n&127)<<3,n<128)||(n=t[r.get()],r.increment(),i|=(n&127)<<10,n<128)||(n=t[r.get()],r.increment(),i|=(n&127)<<17,n<128)||(n=t[r.get()],r.increment(),i|=(n&127)<<24,n<128)||(n=t[r.get()],r.increment(),i|=(n&1)<<31,n<128))return i*4294967296+(e>>>0);throw Error("Expected varint not more than 10 bytes")}function q2r(e,t,r,i){return O2r(e,t,r,i,x2r(r>>>2))}function O2r(e,t,r,i,n){let a=i.get();if(r&3)throw Error(`FastPFOR: invalid encodedByteLength=${r} at offset=${a} (encodedBytes.length=${e.length}; expected a multiple of 4 bytes for an int32 big-endian word stream)`);let o=r>>>2,s=_2r(n,o);P2r(e,a,r,s);let l=F2r(s.subarray(0,o),t,n.decoderWorkspace);return i.add(r),l}function Na(e){return e>>>1^-(e&1)}function lf(e){return e>>BigInt(1)^-(e&BigInt(1))}function $2(e){return e%2==1?(e+1)/-2:e/2}function N2r(e){let t=new Int32Array(e.length);for(let r=0;r<e.length;r++)t[r]=Na(e[r]);return t}function U2r(e){let t=new BigInt64Array(e.length);for(let r=0;r<e.length;r++)t[r]=lf(e[r]);return t}function V2r(e){for(let t=0;t<e.length;t++)e[t]=$2(e[t])}function lie(e,t,r){if(r===void 0){r=0;for(let a=0;a<t;a++)r+=e[a]}let i=new Uint32Array(r),n=0;for(let a=0;a<t;a++){let o=e[a],s=e[a+t];i.fill(s,n,n+o),n+=o}return i}function uie(e,t,r){if(r===void 0){r=0;for(let a=0;a<t;a++)r+=Number(e[a])}let i=new BigUint64Array(r),n=0;for(let a=0;a<t;a++){let o=Number(e[a]),s=e[a+t];i.fill(s,n,n+o),n+=o}return i}function vnt(e,t,r){let i=new Float64Array(r),n=0;for(let a=0;a<t;a++){let o=e[a],s=e[a+t];i.fill(s,n,n+o),n+=o}return i}function det(e){let t=new Int32Array(e.length);t[0]=Na(e[0]);let r=e.length/4*4,i=1;if(r>=4)for(;i<r-4;i+=4){let n=e[i],a=e[i+1],o=e[i+2],s=e[i+3];t[i]=Na(n)+t[i-1],t[i+1]=Na(a)+t[i],t[i+2]=Na(o)+t[i+1],t[i+3]=Na(s)+t[i+2]}for(;i!==e.length;++i)t[i]=Na(e[i])+t[i-1];return t}function pet(e){let t=new BigInt64Array(e.length);t[0]=lf(e[0]);let r=e.length/4*4,i=1;if(r>=4)for(;i<r-4;i+=4){let n=e[i],a=e[i+1],o=e[i+2],s=e[i+3];t[i]=lf(n)+t[i-1],t[i+1]=lf(a)+t[i],t[i+2]=lf(o)+t[i+1],t[i+3]=lf(s)+t[i+2]}for(;i!==t.length;++i)t[i]=lf(e[i])+t[i-1];return t}function G2r(e){e[0]=$2(e[0]);let t=e.length/4*4,r=1;if(t>=4)for(;r<t-4;r+=4){let i=e[r],n=e[r+1],a=e[r+2],o=e[r+3];e[r]=$2(i)+e[r-1],e[r+1]=$2(n)+e[r],e[r+2]=$2(a)+e[r+1],e[r+3]=$2(o)+e[r+2]}for(;r!==e.length;++r)e[r]=$2(e[r])+e[r-1]}function H2r(e,t,r){if(r===void 0){r=0;for(let a=0;a<t;a++)r+=e[a]}let i=new Int32Array(r),n=0;for(let a=0;a<t;a++){let o=e[a],s=e[a+t];s=Na(s),i.fill(s,n,n+o),n+=o}return i}function j2r(e,t,r){if(r===void 0){r=0;for(let a=0;a<t;a++)r+=Number(e[a])}let i=new BigInt64Array(r),n=0;for(let a=0;a<t;a++){let o=Number(e[a]),s=e[a+t];s=lf(s),i.fill(s,n,n+o),n+=o}return i}function $2r(e,t,r){let i=new Float64Array(r),n=0;for(let a=0;a<t;a++){let o=e[a],s=e[a+t];s=$2(s),i.fill(s,n,n+o),n+=o}return i}function Sne(e){let t=e.length/4*4,r=1;if(t>=4)for(let i=e[0];r<t-4;r+=4)i=e[r]+=i,i=e[r+1]+=i,i=e[r+2]+=i,i=e[r+3]+=i;for(;r!==e.length;)e[r]+=e[r-1],++r}function W2r(e){let t=0;for(let r=0;r<e.length;r++)e[r]+=t,t=e[r]}function Y2r(e){if(e.length<2)return new Int32Array(e);let t=new Int32Array(e.length);t[0]=Na(e[0]),t[1]=Na(e[1]);let r=e.length/4*4,i=2;if(r>=4)for(;i<r-4;i+=4){let n=e[i],a=e[i+1],o=e[i+2],s=e[i+3];t[i]=Na(n)+t[i-2],t[i+1]=Na(a)+t[i-1],t[i+2]=Na(o)+t[i],t[i+3]=Na(s)+t[i+1]}for(;i!==e.length;i+=2)t[i]=Na(e[i])+t[i-2],t[i+1]=Na(e[i+1])+t[i-1];return t}function gnt(e,t,r,i){if(e.length<2)return new Int32Array(e);let n=new Int32Array(e.length),a=Na(e[0]),o=Na(e[1]);n[0]=H2(Math.round(a*t),r,i),n[1]=H2(Math.round(o*t),r,i);let s=e.length/16,l=2;if(s>=4)for(;l<s-4;l+=4){let u=e[l],c=e[l+1],f=Na(u)+a,h=Na(c)+o;n[l]=H2(Math.round(f*t),r,i),n[l+1]=H2(Math.round(h*t),r,i);let d=e[l+2],p=e[l+3];a=Na(d)+f,o=Na(p)+h,n[l+2]=H2(Math.round(a*t),r,i),n[l+3]=H2(Math.round(o*t),r,i)}for(;l!==e.length;l+=2)a+=Na(e[l]),o+=Na(e[l+1]),n[l]=H2(Math.round(a*t),r,i),n[l+1]=H2(Math.round(o*t),r,i);return n}function H2(e,t,r){return Math.min(r,Math.max(t,e))}function X2r(e){let t=new Int32Array(e.length+1);t[0]=0,t[1]=Na(e[0]);let r=t[1];for(let i=2;i!==t.length;++i){let n=e[i-1],a=Na(n);r+=a,t[i]=t[i-1]+r}return new Uint32Array(t)}function Z2r(e,t,r){let i=new Int32Array(r+1);i[0]=0;let n=1,a=i[0];for(let o=0;o<t;o++){let s=e[o],l=e[o+t];l=Na(l);for(let u=n;u<n+s;u++)i[u]=l+a,a=i[u];n+=s}return i}function K2r(e,t,r){let i=new Uint32Array(r+1);i[0]=0;let n=1,a=i[0];for(let o=0;o<t;o++){let s=e[o],l=e[o+t];for(let u=n;u<n+s;u++)i[u]=l+a,a=i[u];n+=s}return i}function J2r(e,t,r){let i=new Int32Array(r),n=0,a=0;for(let o=0;o<t;o++){let s=e[o],l=e[o+t],u=Na(l);for(let c=0;c<s;c++)a+=u,i[n++]=a}return i}function Q2r(e,t,r){let i=new BigInt64Array(r),n=0,a=BigInt(0);for(let o=0;o<t;o++){let s=Number(e[o]),l=e[o+t],u=lf(l);for(let c=0;c<s;c++)a+=u,i[n++]=a}return i}function vet(e){let t=new Uint32Array(e.length);t[0]=Na(e[0])>>>0;for(let r=1;r<e.length;r++)t[r]=t[r-1]+Na(e[r])>>>0;return t}function get(e){let t=new BigUint64Array(e.length);t[0]=BigInt.asUintN(64,lf(e[0]));for(let r=1;r<e.length;r++)t[r]=BigInt.asUintN(64,t[r-1]+lf(e[r]));return t}function exr(e){if(e.length<2)return new Uint32Array(e);let t=new Uint32Array(e.length);t[0]=Na(e[0])>>>0,t[1]=Na(e[1])>>>0;for(let r=2;r<e.length;r+=2)t[r]=t[r-2]+Na(e[r])>>>0,t[r+1]=t[r-1]+Na(e[r+1])>>>0;return t}function txr(e,t,r,i){let n=gnt(e,t,r,i);return new Uint32Array(n)}function rxr(e){return e[1]}function ixr(e){return Na(e[1])}function nxr(e){if(e.length===2){let t=Na(e[1]);return[t,t]}return[Na(e[2]),Na(e[3])]}function axr(e){return e[1]}function oxr(e){return lf(e[1])}function sxr(e){if(e.length===2){let t=lf(e[1]);return[t,t]}return[lf(e[2]),lf(e[3])]}function Hs(e,t){let r=vxr(e,t);return r.logicalLevelTechnique1===da.MORTON?dxr(r,e,t):(da.RLE===r.logicalLevelTechnique1||da.RLE===r.logicalLevelTechnique2)&&Kd.NONE!==r.physicalLevelTechnique?pxr(r,e,t):r}function dxr(e,t,r){let i=cf(t,r,2);return{physicalStreamType:e.physicalStreamType,logicalStreamType:e.logicalStreamType,logicalLevelTechnique1:e.logicalLevelTechnique1,logicalLevelTechnique2:e.logicalLevelTechnique2,physicalLevelTechnique:e.physicalLevelTechnique,numValues:e.numValues,byteLength:e.byteLength,decompressedCount:e.decompressedCount,numBits:i[0],coordinateShift:i[1]}}function pxr(e,t,r){let i=cf(t,r,2);return{physicalStreamType:e.physicalStreamType,logicalStreamType:e.logicalStreamType,logicalLevelTechnique1:e.logicalLevelTechnique1,logicalLevelTechnique2:e.logicalLevelTechnique2,physicalLevelTechnique:e.physicalLevelTechnique,numValues:e.numValues,byteLength:e.byteLength,decompressedCount:i[1],runs:i[0],numRleValues:i[1]}}function vxr(e,t){let r=e[t.get()],i=lxr[r>>4],n={};switch(i){case pu.DATA:n={dictionaryType:cxr[r&15]};break;case pu.OFFSET:n={offsetType:fxr[r&15]};break;case pu.LENGTH:n={lengthType:hxr[r&15]}}t.increment();let a=e[t.get()],o=met[a>>5],s=met[a>>2&7],l=uxr[a&3];t.increment();let u=cf(e,t,2),c=u[0],f=u[1];return{physicalStreamType:i,logicalStreamType:n,logicalLevelTechnique1:o,logicalLevelTechnique2:s,physicalLevelTechnique:l,numValues:c,byteLength:f,decompressedCount:c}}function i3(e,t,r){if(!t)return e;let i=t.size(),n=e.constructor,a=new n(i),o=0;for(let s=0;s<i;s++)a[s]=t.get(s)?e[o++]:r;return a}function gxr(e,t,r){if(!r)return e;let i=r.size(),n=new bv(e,t),a=new bv(new Uint8Array(Math.ceil(i/8)),i),o=0;for(let s=0;s<i;s++){let l=r.get(s)?n.get(o++):!1;a.set(s,l)}return a.getBuffer()}function mnt(e,t,r){for(let i=0;i<e;i++){let n=Hs(t,r);r.add(n.byteLength)}}function VT(e,t,r,i,n){let a=mxr(e,Math.ceil(t/8),r,i);return n?gxr(a,t,n):a}function mxr(e,t,r,i){let n=new Uint8Array(t),a=0,o=i.get()+r;for(;a<t&&!(i.get()>=o);){let s=e[i.increment()];if(s<=127){let l=s+3,u=e[i.increment()],c=Math.min(a+l,t);n.fill(u,a,c),a=c}else{let l=256-s;for(let u=0;u<l&&a<t;u++)n[a++]=e[i.increment()]}}return i.set(o),n}function ynt(e,t,r,i){let n=t.get(),a=n+r*Float32Array.BYTES_PER_ELEMENT,o=new Uint8Array(e.subarray(n,a)).buffer,s=new Float32Array(o);return t.set(a),i?i3(s,i,0):s}function xnt(e,t,r,i){let n=t.get(),a=n+r*Float64Array.BYTES_PER_ELEMENT,o=new Uint8Array(e.subarray(n,a)).buffer,s=new Float64Array(o);return t.set(a),i?i3(s,i,0):s}function yxr(e,t,r){let i=t.get(),n=r*Uint32Array.BYTES_PER_ELEMENT,a=new DataView(e.buffer,e.byteOffset,e.byteLength),o=new Uint32Array(r);for(let s=0;s<r;s++)o[s]=a.getUint32(i+s*Uint32Array.BYTES_PER_ELEMENT,!0);return t.add(n),o}function xxr(e,t,r){let i=t.get(),n=r*BigUint64Array.BYTES_PER_ELEMENT,a=new DataView(e.buffer,e.byteOffset,e.byteLength),o=new BigUint64Array(r);for(let s=0;s<r;s++)o[s]=a.getBigUint64(i+s*BigUint64Array.BYTES_PER_ELEMENT,!0);return t.add(n),o}function Ene(e,t,r){return r-t>=12?_xr.decode(e.subarray(t,r)):bxr(e,t,r)}function bxr(e,t,r){let i="",n=t;for(;n<r;){let a=e[n],o=null,s=a>239?4:a>223?3:a>191?2:1;if(n+s>r)break;let l,u,c;s===1?a<128&&(o=a):s===2?(l=e[n+1],(l&192)==128&&(o=(a&31)<<6|l&63,o<=127&&(o=null))):s===3?(l=e[n+1],u=e[n+2],(l&192)==128&&(u&192)==128&&(o=(a&15)<<12|(l&63)<<6|u&63,(o<=2047||o>=55296&&o<=57343)&&(o=null))):s===4&&(l=e[n+1],u=e[n+2],c=e[n+3],(l&192)==128&&(u&192)==128&&(c&192)==128&&(o=(a&15)<<18|(l&63)<<12|(u&63)<<6|c&63,(o<=65535||o>=1114112)&&(o=null))),o===null?(o=65533,s=1):o>65535&&(o-=65536,i+=String.fromCharCode(o>>>10&1023|55296),o=56320|o&1023),i+=String.fromCharCode(o),n+=s}return i}function iB(e,t,r,i,n){return Sxr(GT(e,t,r),r,i,n)}function sf(e,t,r,i,n){return Exr(GT(e,t,r),r,i,n)}function W2(e,t,r){return Cxr(GT(e,t,r),r)}function GT(e,t,r){let i=r.physicalLevelTechnique;switch(i){case Kd.FAST_PFOR:return q2r(e,r.numValues,r.byteLength,t);case Kd.VARINT:return cf(e,t,r.numValues);case Kd.NONE:return yxr(e,t,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function f8(e,t,r){let i=r.physicalLevelTechnique;switch(i){case Kd.VARINT:return Mne(e,t,r.numValues);case Kd.NONE:return xxr(e,t,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function wxr(e,t,r){let i=GT(e,t,r);return i.length===1?Na(i[0]):ixr(i)}function kne(e,t,r){let i=GT(e,t,r);return i.length===1?r.logicalLevelTechnique1===da.DELTA?Na(i[0]):i[0]:rxr(i)}function _nt(e,t,r){return nxr(GT(e,t,r))}function bnt(e,t,r){return sxr(Mne(e,t,r.numValues))}function wnt(e,t,r,i){return Ant(f8(e,t,r),r,i)}function Cne(e,t,r,i){return Mnt(f8(e,t,r),r,i)}function Txr(e,t,r,i){let n=Axr(e,t,r,!1);return i?i3(n,i,0):n}function Axr(e,t,r,i){if(r.physicalLevelTechnique===Kd.VARINT)return kxr(R2r(e,t,r.numValues),r,i);let n=f8(e,t,r),a=i?Ant(n,r):Mnt(n,r);return Float64Array.from(a,Number)}function Mxr(e,t,r){let i=f8(e,t,r);return i.length===1?lf(i[0]):oxr(i)}function Tnt(e,t,r){let i=f8(e,t,r);return i.length===1?r.logicalLevelTechnique1===da.DELTA?lf(i[0]):i[0]:axr(i)}function Sxr(e,t,r,i){let n;switch(t.logicalLevelTechnique1){case da.DELTA:if(t.logicalLevelTechnique2===da.RLE){let a=t;if(!i)return J2r(e,a.runs,a.numRleValues);e=lie(e,a.runs,a.numRleValues),n=det(e)}else n=det(e);break;case da.RLE:n=H2r(e,t.runs,t.numRleValues);break;case da.MORTON:Sne(e),n=new Int32Array(e);break;case da.COMPONENTWISE_DELTA:if(r&&!i)return gnt(e,r.scale,r.min,r.max);n=Y2r(e);break;case da.NONE:n=N2r(e);break;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}return i?i3(n,i,0):n}function Exr(e,t,r,i){let n;switch(t.logicalLevelTechnique1){case da.DELTA:if(t.logicalLevelTechnique2===da.RLE){let a=t;n=vet(lie(e,a.runs,a.numRleValues))}else n=vet(e);break;case da.RLE:n=lie(e,t.runs,t.numRleValues);break;case da.MORTON:Sne(e),n=e;break;case da.COMPONENTWISE_DELTA:n=r&&!i?txr(e,r.scale,r.min,r.max):exr(e);break;case da.NONE:n=e;break;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}return i?i3(n,i,0):n}function Ant(e,t,r){let i;switch(t.logicalLevelTechnique1){case da.DELTA:if(t.logicalLevelTechnique2===da.RLE){let n=t;if(!r)return Q2r(e,n.runs,n.numRleValues);e=uie(e,n.runs,n.numRleValues),i=pet(e)}else i=pet(e);break;case da.RLE:i=j2r(e,t.runs,t.numRleValues);break;case da.NONE:i=U2r(e);break;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}return r?i3(i,r,BigInt(0)):i}function Mnt(e,t,r){let i;switch(t.logicalLevelTechnique1){case da.DELTA:if(t.logicalLevelTechnique2===da.RLE){let n=t;i=get(uie(e,n.runs,n.numRleValues))}else i=get(e);break;case da.RLE:i=uie(e,t.runs,t.numRleValues);break;case da.NONE:i=e;break;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}return r?i3(i,r,BigInt(0)):i}function kxr(e,t,r){switch(t.logicalLevelTechnique1){case da.DELTA:if(t.logicalLevelTechnique2===da.RLE){let i=t;e=vnt(e,i.runs,i.numRleValues)}return G2r(e),e;case da.RLE:return Fxr(e,t,r);case da.NONE:return r&&V2r(e),e;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}}function Cxr(e,t){if(t.logicalLevelTechnique1===da.DELTA&&t.logicalLevelTechnique2===da.NONE)return X2r(e);if(t.logicalLevelTechnique1===da.RLE&&t.logicalLevelTechnique2===da.NONE){let r=t;return K2r(e,r.runs,r.numRleValues)}if(t.logicalLevelTechnique1===da.NONE&&t.logicalLevelTechnique2===da.NONE){W2r(e);let r=new Uint32Array(t.numValues+1);return r[0]=0,r.set(e,1),r}if(t.logicalLevelTechnique1===da.DELTA&&t.logicalLevelTechnique2===da.RLE){let r=t,i=Z2r(e,r.runs,r.numRleValues);return Sne(i),new Uint32Array(i)}throw Error("Only delta encoding is supported for transforming length to offset streams yet.")}function JB(e,t,r,i,n="int32"){let a=e.logicalLevelTechnique1;if(a===da.RLE)return e.runs===1?Gs.CONST:Gs.FLAT;if(a!==da.DELTA||e.logicalLevelTechnique2!==da.RLE)return e.numValues===1?Gs.CONST:Gs.FLAT;let o=t instanceof bv?t.size():t,s=e;if(s.numRleValues!==o)return Gs.FLAT;if(s.runs===1)return Gs.SEQUENCE;if(s.runs!==2)return e.numValues===1?Gs.CONST:Gs.FLAT;let l=i.get();if(e.physicalLevelTechnique===Kd.VARINT)return Dxr(r,i,n)?Gs.SEQUENCE:e.numValues===1?Gs.CONST:Gs.FLAT;let u=i.get(),c=new Int32Array(r.buffer,r.byteOffset+u,4);return i.set(l),c[2]===2&&c[3]===2?Gs.SEQUENCE:e.numValues===1?Gs.CONST:Gs.FLAT}function Dxr(e,t,r){let i=new hnt(t.get());if(r==="int64"){let a=Mne(e,i,4);return a[2]===BigInt(2)&&a[3]===BigInt(2)}let n=cf(e,i,4);return n[2]===2&&n[3]===2}function Fxr(e,t,r){return r?$2r(e,t.runs,t.numRleValues):vnt(e,t.runs,t.numRleValues)}function Dne(e,t,r){return{x:yet(e,t)-r,y:yet(e>>1,t)-r}}function yet(e,t){let r=0;for(let i=0;i<t;i++)r|=(e&1<<2*i)>>i;return r}function Pxr(e){let t=Array(e.numGeometries),r=1,i=1,n=1,a=0,o=0,s=0,l=e.mortonSettings,u=e.topologyVector,c=u.geometryOffsets,f=u.partOffsets,h=u.ringOffsets,d=e.vertexOffsets,p=!d||d.length===0,v=e.containsPolygonGeometry(),m=e.vertexBuffer;for(let g=0;g<e.numGeometries;g++){let w=e.geometryType(g);switch(w){case uf.POINT:{let b,_;if(p)b=m[o++],_=m[o++];else if(e.vertexBufferType===n3.MORTON){let M=m[d[s++]],x=Dne(M,l.numBits,l.coordinateShift);b=x.x,_=x.y}else{let M=d[s++]*2;b=m[M],_=m[M+1]}t[a++]=[[new tr(b,_)]],c&&n++,f&&r++,h&&i++}break;case uf.MULTIPOINT:{let b=c[n]-c[n-1];n++;let _;if(p){_=Array(b);for(let M=0;M<b;M++){let x=m[o++],T=m[o++];_[M]=new tr(x,T)}}else _=Rb(e.vertexBufferType,m,d,s,b,!1,l),s+=b;t[a++]=_.map(M=>[M]),r+=b,i+=b}break;case uf.LINESTRING:{let b;v?(b=h[i]-h[i-1],i++):b=f[r]-f[r-1],r++;let _;p?(_=lT(m,o,b,!1),o+=b*2):(_=Rb(e.vertexBufferType,m,d,s,b,!1,l),s+=b),t[a++]=[_],c&&n++}break;case uf.POLYGON:{let b=f[r]-f[r-1];r++;let _=Array(b-1),M,x=h[i]-h[i-1];if(i++,p){M=lT(m,o,x,!0),o+=x*2;for(let T=0;T<_.length;T++)x=h[i]-h[i-1],i++,_[T]=lT(m,o,x,!0),o+=x*2}else{M=Rb(e.vertexBufferType,m,d,s,x,!0,l),s+=x;for(let T=0;T<_.length;T++)x=h[i]-h[i-1],i++,_[T]=Rb(e.vertexBufferType,m,d,s,x,!0,l),s+=x}t[a++]=[M].concat(_),c&&n++}break;case uf.MULTILINESTRING:{let b=c[n]-c[n-1];n++;let _=Array(b);for(let M=0;M<b;M++){let x;if(v?(x=h[i]-h[i-1],i++):x=f[r]-f[r-1],r++,p)_[M]=lT(m,o,x,!1),o+=x*2;else{let T=Rb(e.vertexBufferType,m,d,s,x,!1,l);_[M]=T,s+=x}}t[a++]=_}break;case uf.MULTIPOLYGON:{let b=c[n]-c[n-1];n++;let _=Array(b);for(let M=0;M<b;M++){let x=f[r]-f[r-1];r++;let T,A=Array(x-1),y=h[i]-h[i-1];i++,p?(T=lT(m,o,y,!0),o+=y*2):(T=Rb(e.vertexBufferType,m,d,s,y,!0,l),s+=y);for(let E=0;E<A.length;E++){let S=h[i]-h[i-1];i++,p?(A[E]=lT(m,o,S,!0),o+=S*2):(A[E]=Rb(e.vertexBufferType,m,d,s,S,!0,l),s+=S)}_[M]=[T].concat(A)}t[a++]=_.flat()}break;default:throw Error(`The specified geometry type (${w}) is currently not supported.`)}}return t}function Rb(e,t,r,i,n,a,o){return e===n3.MORTON?Rxr(t,r,i,n,a,o):Ixr(t,r,i,n,a)}function lT(e,t,r,i){let n=Array(i?r+1:r);for(let a=0;a<r*2;a+=2){let o=e[t+a],s=e[t+a+1];n[a/2]=new tr(o,s)}return i&&(n[n.length-1]=n[0]),n}function Ixr(e,t,r,i,n){let a=Array(n?i+1:i);for(let o=0;o<i*2;o+=2){let s=t[r+o/2]*2,l=e[s],u=e[s+1];a[o/2]=new tr(l,u)}return n&&(a[a.length-1]=a[0]),a}function Rxr(e,t,r,i,n,a){let o=Array(n?i+1:i);for(let s=0;s<i;s++){let l=e[t[r+s]],u=Dne(l,a.numBits,a.coordinateShift);o[s]=new tr(u.x,u.y)}return n&&(o[o.length-1]=o[0]),o}function zxr(e,t,r,i,n){return new Cnt(e,t,n3.VEC_2,r,i,n)}function Bxr(e,t,r,i,n,a){return new Cnt(e,t,n3.MORTON,r,i,n,a)}function Dnt(e,t,r,i){return new Fnt(n3.VEC_2,e,t,r,i)}function qxr(e,t,r,i,n){return new Fnt(n3.MORTON,e,t,r,i,n)}function xet(e,t,r,i,n,a){return new Oxr(e,t,r,i,n,a)}function _et(e,t,r,i,n){return new Nxr(e,t,r,i,n)}function Uxr(e,t,r,i,n){let a=Hs(e,r),o=JB(a,i,e,r),s,l,u,c;if(o===Gs.CONST){let b=kne(e,r,a),_,M,x,T;for(let A=0;A<t-1;A++){let y=Hs(e,r);switch(y.physicalStreamType){case pu.LENGTH:switch(y.logicalStreamType.lengthType){case lc.GEOMETRIES:_=W2(e,r,y);break;case lc.PARTS:M=W2(e,r,y);break;case lc.RINGS:x=W2(e,r,y);break;case lc.TRIANGLES:T=W2(e,r,y)}break;case pu.OFFSET:switch(y.logicalStreamType.offsetType){case wm.VERTEX:s=sf(e,r,y);break;case wm.INDEX:c=sf(e,r,y)}break;case pu.DATA:if(sh.VERTEX===y.logicalStreamType.dictionaryType)l=iB(e,r,y,n);else{let E=y;u={numBits:E.numBits,coordinateShift:E.coordinateShift},l=sf(e,r,y,n)}}}return c?_!==void 0||M!==void 0?xet(i,b,T,c,l,{geometryOffsets:_,partOffsets:M,ringOffsets:x}):xet(i,b,T,c,l):u===void 0?zxr(i,b,{geometryOffsets:_,partOffsets:M,ringOffsets:x},s,l):Bxr(i,b,{geometryOffsets:_,partOffsets:M,ringOffsets:x},s,l,u)}let f=sf(e,r,a),h,d,p,v;for(let b=0;b<t-1;b++){let _=Hs(e,r);switch(_.physicalStreamType){case pu.LENGTH:switch(_.logicalStreamType.lengthType){case lc.GEOMETRIES:h=sf(e,r,_);break;case lc.PARTS:d=sf(e,r,_);break;case lc.RINGS:p=sf(e,r,_);break;case lc.TRIANGLES:v=W2(e,r,_)}break;case pu.OFFSET:switch(_.logicalStreamType.offsetType){case wm.VERTEX:s=sf(e,r,_);break;case wm.INDEX:c=sf(e,r,_)}break;case pu.DATA:if(sh.VERTEX===_.logicalStreamType.dictionaryType)l=iB(e,r,_,n);else{let M=_;u={numBits:M.numBits,coordinateShift:M.coordinateShift},l=sf(e,r,_,n)}}}let m,g,w;return h?(m=Jte(f,h,2),d&&p?(g=bet(f,m,d,!1),w=Gxr(f,m,g,p)):d&&(g=Vxr(f,m,d))):d&&p?(g=Jte(f,d,1),w=bet(f,g,p,!0)):d&&(g=Jte(f,d,0)),c&&!g?_et(f,v,c,l):c?_et(f,v,c,l,{geometryOffsets:m,partOffsets:g,ringOffsets:w}):u===void 0?Dnt(f,{geometryOffsets:m,partOffsets:g,ringOffsets:w},s,l):qxr(f,{geometryOffsets:m,partOffsets:g,ringOffsets:w},s,l,u)}function Jte(e,t,r){let i=new Uint32Array(e.length+1),n=0;i[0]=n;let a=0;for(let o=0;o<e.length;o++)n=i[o+1]=n+(e[o]>r?t[a++]:1);return i}function bet(e,t,r,i){let n=new Uint32Array(t[t.length-1]+1),a=0;n[0]=a;let o=1,s=0;for(let l=0;l<e.length;l++){let u=e[l],c=t[l+1]-t[l];if(u===5||u===2||i&&(u===4||u===1))for(let f=0;f<c;f++)a=n[o++]=a+r[s++];else for(let f=0;f<c;f++)n[o++]=++a}return n}function Vxr(e,t,r){let i=new Uint32Array(t[t.length-1]+1),n=0;i[0]=n;let a=1,o=0;for(let s=0;s<e.length;s++){let l=e[s],u=t[s+1]-t[s];if(l===4||l===1)for(let c=0;c<u;c++)n=i[a++]=n+r[o++];else for(let c=0;c<u;c++)i[a++]=++n}return i}function Gxr(e,t,r,i){let n=new Uint32Array(r[r.length-1]+1),a=0;n[0]=a;let o=1,s=1,l=0;for(let u=0;u<e.length;u++){let c=e[u],f=t[u+1]-t[u];if(c!==0&&c!==3)for(let h=0;h<f;h++){let d=r[o]-r[o-1];o++;for(let p=0;p<d;p++)a=n[s++]=a+i[l++]}else for(let h=0;h<f;h++)n[s++]=++a,o++}return n}function $xr(e,t){let r=0;for(let i=0;i<t.length;i++){let n=t[i];n===255?(r++,i++):r+=e[n]}return r}function Wxr(e,t,r){let i=new Uint32Array(t.length);for(let o=1;o<t.length;o++)i[o]=i[o-1]+t[o-1];let n=new Uint8Array($xr(t,r)),a=0;for(let o=0;o<r.length;o++){let s=r[o];if(s===255)o++,n[a++]=r[o];else{let l=t[s],u=i[s];for(;l-- >0;)n[a++]=e[u++]}}return n}function Rnt(e,t,r,i,n){var d,p;let a,o,s,l,u,c=n,f,h;for(let v=0;v<i;v++){let m=Hs(t,r);switch(m.physicalStreamType){case pu.PRESENT:{let g=new bv(VT(t,m.numValues,m.byteLength,r),m.numValues);c=n!=null?n:g;break}case pu.OFFSET:o=sf(t,r,m,void 0,c);break;case pu.LENGTH:{let g=W2(t,r,m);lc.DICTIONARY===m.logicalStreamType.lengthType?a=g:lc.SYMBOL===m.logicalStreamType.lengthType?l=g:f=g;break}case pu.DATA:{let g=t.subarray(r.get(),r.get()+m.byteLength);r.add(m.byteLength);let w=m.logicalStreamType.dictionaryType;sh.FSST===w?u=g:sh.SINGLE===w||sh.SHARED===w?s=g:sh.NONE===w&&(h=g);break}}}return(p=(d=Yxr(e,u,o,a,s,l,c))!=null?d:Xxr(e,s,o,a,c))!=null?p:Zxr(e,f,h,o,c)}function Yxr(e,t,r,i,n,a,o){if(t){if(!r||!i||!n||!a)throw Error(`Incomplete FSST dictionary string column "${e}"`);return new Int(e,r,i,n,a,t,o)}}function Xxr(e,t,r,i,n){if(t){if(!r||!i)throw Error(`Incomplete dictionary string column "${e}"`);return n?new wT(e,r,i,t,n):new wT(e,r,i,t)}}function Zxr(e,t,r,i,n){if(t&&r){if(i)return n?new wT(e,i,t,r,n):new wT(e,i,t,r);if(n&&n.size()!==t.length-1){let a=new Uint32Array(n.size()),o=0;for(let s=0;s<n.size();s++)n.get(s)?a[s]=o++:a[s]=0;return new wT(e,a,t,r,n)}return n?new wet(e,t,r,n):new wet(e,t,r)}}function Kxr(e,t,r,i){let n,a,o,s,l=!1;for(;!l;){let d=Hs(e,t);switch(d.physicalStreamType){case pu.LENGTH:lc.DICTIONARY===d.logicalStreamType.lengthType?n=W2(e,t,d):o=W2(e,t,d);break;case pu.DATA:sh.SINGLE===d.logicalStreamType.dictionaryType||sh.SHARED===d.logicalStreamType.dictionaryType?(a=e.subarray(t.get(),t.get()+d.byteLength),l=!0):s=e.subarray(t.get(),t.get()+d.byteLength),t.add(d.byteLength)}}if(r.type!=="complexType")throw Error(`Shared dictionary column ${r.name} must be a complex (struct) column.`);if(!n||!a)throw Error(`Incomplete shared dictionary for column "${r.name}"`);let u=r.complexType.children,c=[],f=s?{}:void 0,h=0;for(let d of u){let p=cf(e,t,1)[0];if(p===0)continue;let v=d.name?`${r.name}${d.name}`:r.name;if(i&&!i.has(v)){mnt(p,e,t);continue}if(d.type!=="scalarField"||d.scalarField.physicalType!==go.STRING)throw Error("Currently only scalar string fields are implemented for a struct.");if(p>1&&!d.nullable||p===1&&d.nullable)throw Error(`The number of streams for the child field ${d.name} does not match its nullability. nullibilty: ${d.nullable}, numStreams: ${p}`);let m;if(d.nullable){let w=Hs(e,t);m=new bv(VT(e,w.numValues,w.byteLength,t),w.numValues)}let g=sf(e,t,Hs(e,t),void 0,m);if(s){if(!o)throw Error(`Incomplete shared FSST dictionary for column "${v}"`);c[h++]=new Int(v,g,n,a,o,s,m,f)}else c[h++]=new wT(v,g,n,a,m)}return c}function Jxr(e,t,r,i){let n=Qxr(r);if(i===0)return n.map(c=>new Tet(c,[]));let a=e_r(e,t,i),o=(a.presentStream?a.presentCount:a.lengthStream.length)/n.length,s=[],l=0,u=0;for(let c=0;c<n.length;c++){let f=a_r(a,c,o,l,u);s.push(new Tet(n[c],f.value,f.nullabilityBuffer)),l=f.countsEnd,u=f.valuesEnd}return s}function Qxr(e){let t=e.type==="complexType"?e.complexType.children:void 0;return!t||t.length===0?[e.name]:t.map(r=>{var i;return e.name+((i=r.name)!=null?i:"")})}function e_r(e,t,r){let i=e[t.get()];t.add(1);let n=sf(e,t,Hs(e,t)),a=r-1,o=[];i&Tm.STRING&&(a-=t_r(e,t,o)),a-=r_r(e,t,i,o),a-=i_r(e,t,i,o);let s,l=0;if(i&Tm.PRESENCE){let c=n_r(e,t);s=c.value,l=c.count,a--}let u=new Uint32Array;if(a>0&&(u=sf(e,t,Hs(e,t)),a--),a!==0)throw Error(`Unexpected number of remaining streams while decoding map column: ${a}`);return{lengthStream:n,dictionary:o,presentStream:s,presentCount:l,flattenedValues:u}}function t_r(e,t,r){let i=e[t.get()];t.add(1);let n=Rnt("",e,t,i);if(n)for(let a=0;a<n.size;a++)r.push(n.getValue(a));return i}function r_r(e,t,r,i){let n=0;return r&Tm.INT32?(gT(i,iB(e,t,Hs(e,t))),n++):r&Tm.INT64&&(gT(i,wnt(e,t,Hs(e,t))),n++),r&Tm.UINT32?(gT(i,sf(e,t,Hs(e,t))),n++):r&Tm.UINT64&&(gT(i,Cne(e,t,Hs(e,t))),n++),n}function i_r(e,t,r,i){let n=0;return r&Tm.FLOAT&&(gT(i,ynt(e,t,Hs(e,t).numValues)),n++),r&Tm.DOUBLE&&(gT(i,xnt(e,t,Hs(e,t).numValues)),n++),n}function n_r(e,t){let r=Hs(e,t);if(r.physicalStreamType!==pu.PRESENT)throw Error(`Expected PRESENT stream for map column but found: ${r.physicalStreamType}`);let i=r.numValues,n=t.get(),a=new bv(VT(e,i,r.byteLength,t),i);return t.set(n+r.byteLength),{value:a,count:i}}function a_r(e,t,r,i,n){let{lengthStream:a,flattenedValues:o,presentStream:s,dictionary:l}=e,u=t*r,c=r,f;if(s){f=new bv(new Uint8Array(Math.ceil(r/8)),r),c=0;for(let w=0;w<r;w++)s.get(u+w)&&(f.set(w,!0),c++)}let h=i+c;if(h>a.length)throw Error("Merged map counts underflow while decoding child streams");let d=Array(r),p=i,v=n;for(let w=0;w<r;w++){if(s&&!s.get(u+w)){d[w]=null;continue}let b=v+a[p++];if(b>o.length)throw Error("Map value stream underflow while decoding feature payload");let _=o_r(o,v,b,l);d[w]=_.value,v=_.nextIndex}let m=0;for(let w=i;w<h;w++)m+=a[w];let g=n+m;if(v!==g)throw Error("Unused flattened map values remain after decode");return{value:d,nullabilityBuffer:f,countsEnd:h,valuesEnd:g}}function o_r(e,t,r,i){return r-t===1||e[t]===Ob.START_LIST?Lne(e,t,r,i):znt(e,t,r,i)}function znt(e,t,r,i){let n=Object.create(null),a=t;for(;a<r;){let o=Bnt(e[a++],i);if(typeof o!="string")throw Error(`Map key dictionary index does not resolve to a string: ${o}`);let s=Lne(e,a,r,i);n[o]=s.value,a=s.nextIndex}return{value:n,nextIndex:a}}function Lne(e,t,r,i){if(t>=r)throw Error("Unexpected end of map value stream");let n=e[t];if(n===Ob.FALSE)return{value:!1,nextIndex:t+1};if(n===Ob.TRUE)return{value:!0,nextIndex:t+1};if(n===Ob.START_MAP){let a=Aet(e,t,r);return{value:znt(e,t+2,a,i).value,nextIndex:a}}if(n===Ob.START_LIST){let a=Aet(e,t,r),o=[],s=t+2;for(;s<a;){let l=Lne(e,s,a,i);o.push(l.value),s=l.nextIndex}return{value:o,nextIndex:a}}return{value:Bnt(n,i),nextIndex:t+1}}function Aet(e,t,r){if(t+1>=r)throw Error("Missing length for nested map/list payload");let i=e[t+1];if(i<2)throw Error(`Invalid nested payload length: ${i}`);let n=t+i;if(n>r)throw Error("Nested payload exceeds containing payload bounds");return n}function Bnt(e,t){let r=e-Ob.COUNT;if(r<0||r>=t.length)throw Error(`Scalar dictionary index out of range: ${e}`);return t[r]}function gT(e,t){for(let r of t)e.push(r)}function s_r(e,t,r,i,n,a){var o;return r.type==="scalarType"?a&&!a.has(r.name)?(mnt(i,e,t),null):l_r(i,e,t,n,r.scalarType,r):((o=r.complexType)==null?void 0:o.physicalType)===Z2.MAP?Jxr(e,t,r,i):i===0?null:Kxr(e,t,r,a)}function l_r(e,t,r,i,n,a){var l;let o;if(e===0)return null;if(a.nullable){let u=Hs(t,r),c=u.numValues,f=r.get(),h=VT(t,c,u.byteLength,r);r.set(f+u.byteLength),o=new bv(h,u.numValues)}let s=o!=null?o:i;switch(n.physicalType){case go.UINT_32:case go.INT_32:return d_r(t,r,a,n,s);case go.STRING:{let u=a.nullable?e-1:e;return(l=Rnt(a.name,t,r,u,o))!=null?l:null}case go.BOOLEAN:return u_r(t,r,a,i,s);case go.UINT_64:case go.INT_64:return h_r(t,r,a,s,n);case go.FLOAT:return c_r(t,r,a,s);case go.DOUBLE:return f_r(t,r,a,s);default:throw Error(`The specified data type for the field is currently not supported: ${n}`)}}function u_r(e,t,r,i,n){let a=Hs(e,t),o=a.numValues,s=t.get(),l=h8(n)?n:void 0,u=VT(e,o,a.byteLength,t,l);t.set(s+a.byteLength);let c=new bv(u,o);return new Hxr(r.name,c,n)}function c_r(e,t,r,i){let n=Hs(e,t),a=h8(i)?i:void 0,o=ynt(e,t,n.numValues,a);return new jxr(r.name,o,i)}function f_r(e,t,r,i){let n=Hs(e,t),a=h8(i)?i:void 0,o=xnt(e,t,n.numValues,a);return new _ne(r.name,o,i)}function h_r(e,t,r,i,n){let a=Hs(e,t),o=JB(a,i,e,t,"int64"),s=n.physicalType===go.INT_64;if(o===Gs.FLAT){let u=h8(i)?i:void 0,c=s?wnt(e,t,a,u):Cne(e,t,a,u);return new Snt(r.name,c,i)}if(o===Gs.SEQUENCE){let u=bnt(e,t,a);return new Ent(r.name,u[0],u[1],a.numRleValues,s)}let l=s?Mxr(e,t,a):Tnt(e,t,a);return new Pnt(r.name,l,i,s)}function d_r(e,t,r,i,n){let a=Hs(e,t),o=JB(a,n,e,t),s=i.physicalType===go.INT_32;if(o===Gs.FLAT){let u=h8(n)?n:void 0,c=s?iB(e,t,a,void 0,u):sf(e,t,a,void 0,u);return new xne(r.name,c,n)}if(o===Gs.SEQUENCE){let u=_nt(e,t,a);return new bne(r.name,u[0],u[1],a.numRleValues,s)}let l=s?wxr(e,t,a):kne(e,t,a);return new wne(r.name,l,n,s)}function h8(e){return e instanceof bv}function qnt(e){switch(e){case sc.ID:case sc.ID|sc.ID_NULLABLE:case sc.ID|sc.ID_LONG:case sc.ID|sc.ID_LONG|sc.ID_NULLABLE:return{nullable:(e&sc.ID_NULLABLE)!==0,columnScope:pk.FEATURE,type:"scalarType",scalarType:{longID:(e&sc.ID_LONG)!==0,type:"logicalType",logicalType:fnt.ID}};case sc.GEOMETRY:return{nullable:!1,columnScope:pk.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:Z2.GEOMETRY,children:[]}};case sc.STRUCT:return{nullable:!1,columnScope:pk.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:Z2.STRUCT,children:[]}};case sc.MAP:return{nullable:!0,columnScope:pk.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:Z2.MAP,children:[]}};default:return y_r(e)}}function p_r(e){return e>=sc.SCALAR_BASE}function Ont(e){return e===sc.STRUCT||e===sc.MAP}function v_r(e){if(e.type==="scalarType"){let t=e.scalarType;if(t.type==="physicalType")switch(t.physicalType){case go.BOOLEAN:case go.INT_8:case go.UINT_8:case go.INT_32:case go.UINT_32:case go.INT_64:case go.UINT_64:case go.FLOAT:case go.DOUBLE:return!1;case go.STRING:return!0;default:return!1}if(t.type==="logicalType")return!1}else if(e.type==="complexType"){let t=e.complexType;if(t.type==="physicalType")switch(t.physicalType){case Z2.GEOMETRY:case Z2.STRUCT:case Z2.MAP:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",e),!1}function g_r(e){var t;return e.type==="scalarType"&&((t=e.scalarType)==null?void 0:t.type)==="logicalType"&&e.scalarType.logicalType===fnt.ID}function m_r(e){var t;return e.type==="complexType"&&((t=e.complexType)==null?void 0:t.type)==="physicalType"&&e.complexType.physicalType===Z2.GEOMETRY}function y_r(e){let t;switch(e){case 10:case 11:t=go.BOOLEAN;break;case 12:case 13:t=go.INT_8;break;case 14:case 15:t=go.UINT_8;break;case 16:case 17:t=go.INT_32;break;case 18:case 19:t=go.UINT_32;break;case 20:case 21:t=go.INT_64;break;case 22:case 23:t=go.UINT_64;break;case 24:case 25:t=go.FLOAT;break;case 26:case 27:t=go.DOUBLE;break;case 28:case 29:t=go.STRING;break;default:return null}return{nullable:!!(e&1),columnScope:pk.FEATURE,type:"scalarType",scalarType:{longID:!1,type:"physicalType",physicalType:t}}}function Pne(e,t){let r=cf(e,t,1)[0];if(r===0)return"";let i=t.get(),n=i+r,a=e.subarray(i,n);return t.add(r),x_r.decode(a)}function __r(e){let t=e.name,r=e.nullable;return e.type==="scalarType"?{type:"scalarField",scalarField:e.scalarType,name:t,nullable:r}:{type:"complexField",complexField:e.complexType,name:t,nullable:r}}function Nnt(e,t){let r=cf(e,t,1)[0]>>>0,i=r>=sc.SCALAR_BASE?qnt(r):null;if(!i)throw Error(`Unsupported field type code ${r}. Supported: 10-29(scalars), 30(STRUCT), 31(MAP)`);let n=ma(fn({},i),{name:Pne(e,t)});if(n.type==="complexType"&&Ont(r)){let a=n.complexType,o=cf(e,t,1)[0]>>>0;a.children=Array(o);for(let s=0;s<o;s++)a.children[s]=Nnt(e,t)}return __r(n)}function b_r(e,t){let r=cf(e,t,1)[0]>>>0,i=qnt(r);if(!i)throw Error(`Unsupported column type code ${r}. Supported: ${Met}`);let n;if(p_r(r))n=Pne(e,t);else if(r<sc.GEOMETRY)n="id";else if(r===sc.GEOMETRY)n="geometry";else throw Error(`Unsupported column type code ${r}. Supported: ${Met}`);let a=ma(fn({},i),{name:n});if(a.type==="complexType"&&Ont(r)){let o=cf(e,t,1)[0]>>>0,s=a.complexType;s.children=Array(o);for(let l=0;l<o;l++)s.children[l]=Nnt(e,t)}return a}function w_r(e,t){let r={};r.featureTables=[];let i={};if(i.name=Pne(e,t),i.name.length===0)throw Error("Missing layer name");let n=cf(e,t,1)[0]>>>0,a=cf(e,t,1)[0]>>>0;i.columns=Array(a);for(let o=0;o<a;o++)i.columns[o]=b_r(e,t);return r.featureTables.push(i),[r,n]}function T_r(e,t,r=!0){let i=new hnt(0),n=[];for(;i.get()<e.length;){let a=cf(e,i,1)[0]>>>0,o=i.get()+a;if(o>e.length)throw Error(`Block overruns tile: ${o} > ${e.length}`);let s=cf(e,i,1)[0]>>>0;if(s!==1&&s!==2){i.set(o);continue}let[l,u]=w_r(e,i),c=l.featureTables[0],f=null,h=null,d=[],p=0;for(let m of c.columns){let g=m.name;if(g_r(m)){let w=null;if(m.nullable){let _=Hs(e,i),M=i.get(),x=VT(e,_.numValues,_.byteLength,i);i.set(M+_.byteLength),w=new bv(x,_.numValues)}let b=Hs(e,i);p=w?w.size():b.decompressedCount,f=A_r(e,m,i,g,b,w!=null?w:p,r)}else if(m_r(m)){let w=cf(e,i,1)[0];if(p===0){let b=i.get();p=Hs(e,i).decompressedCount,i.set(b)}t&&(t.scale=t.extent/u),h=Uxr(e,w,i,p,t)}else{let w=v_r(m)?cf(e,i,1)[0]:1;if(w===0)continue;let b=s_r(e,i,m,w,p,void 0);if(b)if(Array.isArray(b))for(let _ of b)d.push(_);else d.push(b)}}let v=new $yr(c.name,h,f,d,u);n.push(v),i.set(o)}return n}function A_r(e,t,r,i,n,a,o=!1){var c;let s=(c=t.scalarType)!=null&&c.longID?go.UINT_64:go.UINT_32,l=typeof a=="number"?void 0:a,u=JB(n,a,e,r,s===go.UINT_64?"int64":"int32");if(s===go.UINT_32)switch(u){case Gs.FLAT:return new xne(i,sf(e,r,n,void 0,l),a);case Gs.SEQUENCE:{let f=_nt(e,r,n);return new bne(i,f[0],f[1],n.numRleValues,!1)}case Gs.CONST:return new wne(i,kne(e,r,n),a,!1)}switch(u){case Gs.FLAT:return o?new _ne(i,Txr(e,r,n,l),a):new Snt(i,Cne(e,r,n,l),a);case Gs.SEQUENCE:{let f=bnt(e,r,n);return new Ent(i,f[0],f[1],n.numRleValues,!1)}case Gs.CONST:return new Pnt(i,Tnt(e,r,n),a,!1)}throw Error("Vector type not supported for id column.")}function C_r(e){return typeof e=="object"&&!!e&&"evaluate"in e}function Eet(e,t,r,i,n){return vB(e,(a,o)=>{let s=t instanceof RB?t.get(o):null;return C_r(s)?s.evaluate(r,i,void 0,n):s})}function D_r(e,t){return t-e}var adr,ket,odr,sdr,ldr,Cet,cie,udr,cdr,vz,gz,Nu,oB,wv,J1,Ok,Vet,vie,rQe,Het,zr,pB,Mdr,nQe,zte,Qet,ett,Tv,itt,ntt,aQe,RT,Qh,Uz,TT,kdr,Hk,jk,Sie,ctt,e0,An,mu,ftt,_r,htt,Qr,$k,Ei,la,La,xv,yB,Nb,ha,Fdr,xB,Wk,_B,wk,bB,Yk,wB,Ldr,dtt,ptt,vtt,Qte,gtt,Pdr,Idr,qdr,Ndr,Pc,ea,Vdr,ere,Mm,Q1,eg,Xd,al,Gdr,X1,Z1,Lm,Cie,ST,Hdr,Ttt,Die,Zd,$s,Mtt,yz,_m,uQe,pT,Dtt,Ltt,Xdr,Zdr,Kdr,Jdr,Qdr,epr,qtt,hpr,dpr,ppr,vpr,gpr,mpr,Utt,ypr,xpr,_pr,Y1,Pie,Xtt,pQe,Iie,Bie,Gpr,qie,mT,$1,Hpr,ert,Jb,Nie,Uie,Ek,$z,lrt,ovr,TQe,AQe,Avr,MQe,Svr,Evr,ch,$ie,fre,bm,Yz,Co,PB,IB,hre,Jk,SQe,EQe,Fvr,Yd,RB,Fi,Sn,Ck,Irt,zB,uc,CQe,Wte,Av,Lvr,Pvr,Ivr,BB,Rvr,zvr,Qk,yl,Dk,Xz,dre,pre,vre,Fk,gre,mre,yre,xre,_re,bre,wre,Tre,Are,Zz,Mre,Sre,Kz,Ere,kre,Cre,Dre,Fre,Rrt,Xie,zrt,Brt,qrt,Ort,Nrt,Urt,Vrt,Grt,Hrt,jrt,Pm,$rt,Wrt,qvr,Ovr,Nvr,Uvr,Vvr,sT,FQe,Gvr,Hvr,jvr,LQe,Yrt,$vr,Xrt,Mv,Lre,Zrt,Pre,Wvr,Ws,Yvr,Xvr,Zvr,Kvr,Ire,Krt,Im,wn,qi,pa,Rf,OT,Rm,Zie,Kie,Jvr,ep,hk,zb,xm,mv,j2,Qrt,eit,tit,$b,Bre,zQe,BQe,Jie,p1r,v1r,g1r,m1r,y1r,ait,x1r,oit,_1r,b1r,w1r,UB,As,e8,cit,T1r,A1r,M1r,S1r,fit,E1r,k1r,C1r,D1r,vu,Am,F1r,dit,L1r,Ore,P1r,Lk,Nre,Vre,Kl,Qz,Gre,Hre,Wd,ik,Ib,nk,ak,W1,Gb,VB,xT,_T,Q1r,_it,agr,ogr,sgr,lgr,ugr,bit,cgr,Wre,fgr,hgr,Jd,wit,t8,pgr,ggr,zf,mn,Ait,wo,ix,Xte,kit,Agr,Mgr,Sgr,Egr,kgr,Cit,Cgr,IXr,Pgr,Igr,Zre,Rgr,Kre,zgr,Bgr,Dit,jQe,Fit,qgr,Ogr,Ngr,Ugr,$Qe,Vgr,Mz,Lit,Ggr,Hgr,jgr,$gr,YQe,Pit,tB,Qgr,emr,tmr,ZQe,rmr,Rit,zit,Sz,Ez,vT,bmr,wmr,cne,fne,Mmr,Smr,Emr,tie,RXr,ret,Vit,WB,Gmr,jit,iet,oet,bT,Lz,gyr,dT,XB,pne,Syr,iie,nie,s8,Cyr,Dyr,Fyr,Lyr,Zte,ant,vne,Pyr,Ryr,zyr,Byr,ont,qyr,lnt,Oyr,Nyr,Uyr,unt,l8,u8,Bc,Kte,c8,jyr,yne,r3,KB,xne,_ne,cnt,bne,wne,$yr,pk,go,Z2,fnt,hnt,da,Kd,Tne,oie,dnt,sie,y2r,pu,sh,wm,lc,lxr,met,uxr,cxr,fxr,hxr,Gs,bv,_xr,Snt,Ent,uf,Lxr,n3,knt,Cnt,Fnt,Lnt,Oxr,Nxr,Hxr,jxr,Pnt,Fne,wet,wT,Int,Tet,Tm,Ob,sc,x_r,Met,M_r,S_r,E_r,k_r,Unt,Vnt=Ea(()=>{adr=Object.create,ket=Object.defineProperty,odr=Object.getOwnPropertyDescriptor,sdr=Object.getOwnPropertyNames,ldr=Object.getPrototypeOf,Cet=Object.prototype.hasOwnProperty,cie=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),udr=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var n=sdr(t),a=0,o=n.length,s;a<o;a++)s=n[a],!Cet.call(e,s)&&s!==r&&ket(e,s,{get:(l=>t[l]).bind(null,s),enumerable:!(i=odr(t,s))||i.enumerable});return e},cdr=(e,t,r)=>(r=e==null?{}:adr(ldr(e)),udr(t||!e||!e.__esModule||!Cet.call(e,"default")?ket(r,"default",{value:e,enumerable:!0}):r,e));tr.prototype={clone(){return new tr(this.x,this.y)},add(e){return this.clone()._add(e)},sub(e){return this.clone()._sub(e)},multByPoint(e){return this.clone()._multByPoint(e)},divByPoint(e){return this.clone()._divByPoint(e)},mult(e){return this.clone()._mult(e)},div(e){return this.clone()._div(e)},rotate(e){return this.clone()._rotate(e)},rotateAround(e,t){return this.clone()._rotateAround(e,t)},matMult(e){return this.clone()._matMult(e)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(e){return this.x===e.x&&this.y===e.y},dist(e){return Math.sqrt(this.distSqr(e))},distSqr(e){let t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle(){return Math.atan2(this.y,this.x)},angleTo(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith(e){return this.angleWithSep(e.x,e.y)},angleWithSep(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult(e){let t=e[0]*this.x+e[1]*this.y,r=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=r,this},_add(e){return this.x+=e.x,this.y+=e.y,this},_sub(e){return this.x-=e.x,this.y-=e.y,this},_mult(e){return this.x*=e,this.y*=e,this},_div(e){return this.x/=e,this.y/=e,this},_multByPoint(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint(e){return this.x/=e.x,this.y/=e.y,this},_unit(){return this._div(this.mag()),this},_perp(){let e=this.y;return this.y=this.x,this.x=-e,this},_rotate(e){let t=Math.cos(e),r=Math.sin(e),i=t*this.x-r*this.y,n=r*this.x+t*this.y;return this.x=i,this.y=n,this},_rotateAround(e,t){let r=Math.cos(e),i=Math.sin(e),n=t.x+r*(this.x-t.x)-i*(this.y-t.y),a=t.y+i*(this.x-t.x)+r*(this.y-t.y);return this.x=n,this.y=a,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:tr},tr.convert=function(e){if(e instanceof tr)return e;if(Array.isArray(e))return new tr(+e[0],+e[1]);if(e.x!==void 0&&e.y!==void 0)return new tr(+e.x,+e.y);throw Error("Expected [x, y] or {x, y} point format")};Nu=typeof Float32Array<"u"?Float32Array:Array;Math.PI/180,180/Math.PI;oB=pdr;wv=vdr;J1=pie,Ok=K1;(function(){var e=Ret();return function(t,r,i,n,a,o){var s,l;for(r||(r=3),i||(i=0),l=n?Math.min(n*r+i,t.length):t.length,s=i;s<l;s+=r)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],a(e,e,o),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2];return t}})();Vet=ydr;(function(){var e=gdr();return function(t,r,i,n,a,o){var s,l;for(r||(r=4),i||(i=0),l=n?Math.min(n*r+i,t.length):t.length,s=i;s<l;s+=r)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],e[3]=t[s+3],a(e,e,o),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2],t[s+3]=e[3];return t}})();vie=mdr,rQe=xdr;(function(){var e=Ret(),t=eQe(1,0,0),r=eQe(0,1,0);return function(i,n,a){var o=gu(n,a);return o<-.999999?(uh(e,t,n),Ok(e)<1e-6&&uh(e,r,n),Pf(e,e),_dr(i,e,Math.PI),i):o>.999999?(i[0]=0,i[1]=0,i[2]=0,i[3]=1,i):(uh(e,n,a),i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=1+o,rQe(i,i))}})(),(function(){var e=tQe(),t=tQe();return function(r,i,n,a,o,s){return vk(e,i,o,s),vk(t,n,a,s),vk(r,e,t,2*s*(1-s)),r}})(),(function(){var e=hie();return function(t,r,i,n){return e[0]=i[0],e[3]=i[1],e[6]=i[2],e[1]=n[0],e[4]=n[1],e[7]=n[2],e[2]=-r[0],e[5]=-r[1],e[8]=-r[2],rQe(t,bdr(t,e))}})();Het=wdr;(function(){var e=fB();return function(t,r,i,n,a,o){var s,l;for(r||(r=2),i||(i=0),l=n?Math.min(n*r+i,t.length):t.length,s=i;s<l;s+=r)e[0]=t[s],e[1]=t[s+1],a(e,e,o),t[s]=e[0],t[s+1]=e[1];return t}})();zr=8192;pB=dB(.25,.1,.25,1);Mdr=1;nQe={};zte=null;Qet=(e,t)=>Ki(null,null,function*(){let r=new Blob([new Uint8Array(e)],{type:"image/png"});try{return createImageBitmap(r,t)}catch(i){throw Error(`Could not load image because of ${Ic(i).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),ett=e=>new Promise((t,r)=>{let i=new Image;i.onload=()=>{t(i),URL.revokeObjectURL(i.src),i.onload=null,window.requestAnimationFrame(()=>i.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=")},i.onerror=()=>r(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 n=new Blob([new Uint8Array(e)],{type:"image/png"});i.src=URL.createObjectURL(n)});Tv=85.051129,itt={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},ntt={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0};aQe="AbortError",RT=class extends Error{constructor(e=aQe){super(e instanceof Error?e.message:e),this.name=aQe,e instanceof Error&&e.stack&&(this.stack=e.stack)}};Qh={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};Uz="global-dispatcher",TT=class extends Error{constructor(e,t,r,i){super(`AJAXError: ${t} (${e}): ${r}`),this.status=e,this.statusText=t,this.url=r,this.body=i}};kdr=e=>{var t;return e.startsWith("file:")||((t=mB())==null?void 0:t.startsWith("file:"))&&!/^\w+:/.test(e)};Hk=function(e,t){return Ki(this,null,function*(){var r,i;if(e.url.includes("://")&&!/^https?:|^file:/.test(e.url)){let n=Mie(e.url);if(n){let a=yield n(e,t);return!a.data&&e.type==="arrayBuffer"?ln(a,{data:new ArrayBuffer(0)}):a}if(Hb(self)&&((r=self.worker)!=null&&r.actor))return self.worker.actor.sendAsync({type:"GR",data:e,targetMapId:Uz},t)}if(!kdr(e.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return Cdr(e,t);if(Hb(self)&&((i=self.worker)!=null&&i.actor))return self.worker.actor.sendAsync({type:"GR",data:e,mustQueue:!0,targetMapId:Uz},t)}return Ddr(e,t)})},jk=(e,t)=>Hk(ln(e,{type:"json"}),t),Sie=(e,t)=>Hk(ln(e,{type:"arrayBuffer"}),t);ctt=e=>{let t=window.document.createElement("video");return t.muted=!0,new Promise(r=>{t.onloadstart=()=>{r(t)};for(let i of e){let n=window.document.createElement("source");Eie(i)||(t.crossOrigin="Anonymous"),n.src=i,t.appendChild(n)}})};e0=class{constructor(e,t={}){ln(this,t),this.type=e}},An=class extends e0{constructor(e,t={}){super("error",ln({error:e},t))}},mu=class{on(e,t){return this._listeners||(this._listeners={}),oQe(e,t,this._listeners),{unsubscribe:()=>{this.off(e,t)}}}off(e,t){return Bte(e,t,this._listeners),Bte(e,t,this._oneTimeListeners),this}once(e,t){return t?(this._oneTimeListeners||(this._oneTimeListeners={}),oQe(e,t,this._oneTimeListeners),this):new Promise(r=>this.once(e,r))}fire(e,t){var n,a,o,s,l,u;let r=typeof e=="string"?new e0(e,t||{}):e,i=r.type;if(this.listens(i)){r.target=this;let c=(o=(a=(n=this._listeners)==null?void 0:n[i])==null?void 0:a.slice())!=null?o:[];for(let d of c)d.call(this,r);let f=(u=(l=(s=this._oneTimeListeners)==null?void 0:s[i])==null?void 0:l.slice())!=null?u:[];for(let d of f)Bte(i,d,this._oneTimeListeners),d.call(this,r);let h=this._eventedParent;h&&(ln(r,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),h.fire(r))}else r instanceof An&&console.error(r.error);return this}listens(e){var t,r,i,n,a;return!!((r=(t=this._listeners)==null?void 0:t[e])!=null&&r.length||(n=(i=this._oneTimeListeners)==null?void 0:i[e])!=null&&n.length||(a=this._eventedParent)!=null&&a.listens(e))}setEventedParent(e,t){return this._eventedParent=e,this._eventedParentData=t,this}},ftt={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"},"fill-extrusion-rounded-corner-distance":{type:"number",default:0,minimum:0,units:"meters","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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"},"symbol-height-offset":{type:"number",default:0,units:"meters",requires:[{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-height-anchor":{type:"enum",values:{ground:{},absolute:{}},default:"ground",requires:["symbol-height-offset"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"fill-color":{type:"color",default:"#000000",transition:!0,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,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default: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-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}},_r=ftt,htt=["type","source","source-layer","minzoom","maxzoom","filter","layout"],Qr=class{constructor(e,t,r,i,n="error"){this.message=(e?`${e}: `:"")+r,i&&(this.identifier=i),this.severity=n,t!=null&&t.__line__&&(this.line=t.__line__)}},$k={kind:"null"},Ei={kind:"number"},la={kind:"string"},La={kind:"boolean"},xv={kind:"color"},yB={kind:"projectionDefinition"},Nb={kind:"object"},ha={kind:"value"},Fdr={kind:"error"},xB={kind:"collator"},Wk={kind:"formatted"},_B={kind:"padding"},wk={kind:"colorArray"},bB={kind:"numberArray"},Yk={kind:"resolvedImage"},wB={kind:"variableAnchorOffsetCollection"};Ldr=[$k,Ei,la,La,xv,yB,Wk,Nb,Lf(ha),_B,bB,wk,Yk,wB];dtt=.96422,ptt=.82521,vtt=4/29,Qte=6/29,gtt=3*Qte*Qte,Pdr=Math.PI/180,Idr=180/Math.PI;qdr=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};Ndr={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]};ea=(Pc=class{constructor(t,r,i,n=1,a=!0){this.r=t,this.g=r,this.b=i,this.a=n,a||(this.r*=n,this.g*=n,this.b*=n,n||this.overwriteGetter("rgb",[t,r,i,n]))}static parse(t){if(t instanceof Pc)return t;if(typeof t!="string")return;let r=Odr(t);if(r)return new Pc(...r,!1)}get rgb(){let{r:t,g:r,b:i,a:n}=this,a=n||1/0;return this.overwriteGetter("rgb",[t/a,r/a,i/a,n])}get hcl(){return this.overwriteGetter("hcl",Rdr(this.rgb))}get lab(){return this.overwriteGetter("lab",ytt(this.rgb))}overwriteGetter(t,r){return Object.defineProperty(this,t,{value:r}),r}toString(){let[t,r,i,n]=this.rgb;return`rgba(${[t,r,i].map(a=>Math.round(a*255)).join(",")},${n})`}static interpolate(t,r,i,n="rgb"){switch(n){case"rgb":{let[a,o,s,l]=AT(t.rgb,r.rgb,i);return new Pc(a,o,s,l,!1)}case"hcl":{let[a,o,s,l]=t.hcl,[u,c,f,h]=r.hcl,d,p;if(!isNaN(a)&&!isNaN(u)){let b=u-a;u>a&&b>180?b-=360:u<a&&a-u>180&&(b+=360),d=a+i*b}else isNaN(a)?isNaN(u)?d=NaN:(d=u,(s===1||s===0)&&(p=c)):(d=a,(f===1||f===0)&&(p=o));let[v,m,g,w]=zdr([d,p!=null?p:X2(o,c,i),X2(s,f,i),X2(l,h,i)]);return new Pc(v,m,g,w,!1)}case"lab":{let[a,o,s,l]=xtt(AT(t.lab,r.lab,i));return new Pc(a,o,s,l,!1)}}}},Pc.black=new Pc(0,0,0,1),Pc.white=new Pc(1,1,1,1),Pc.transparent=new Pc(0,0,0,0),Pc.red=new Pc(1,0,0,1),Pc),Vdr=["bottom","center","top"],ere=class{constructor(e,t,r,i,n,a){this.text=e,this.image=t,this.scale=r,this.fontStack=i,this.textColor=n,this.verticalAlign=a}},Mm=class Iz{constructor(t){this.sections=t}static fromString(t){return new Iz([new ere(t,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(t=>t.text.length!==0||t.image&&t.image.name.length!==0)}static factory(t){return t instanceof Iz?t:Iz.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map(t=>t.text).join("")}},Q1=class lk{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof lk)return t;if(typeof t=="number")return new lk([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(let r of t)if(typeof r!="number")return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]]}return new lk(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,i){return new lk(AT(t.values,r.values,i))}},eg=class uk{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof uk)return t;if(typeof t=="number")return new uk([t]);if(Array.isArray(t)){for(let r of t)if(typeof r!="number")return;return new uk(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,i){return new uk(AT(t.values,r.values,i))}},Xd=class ck{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof ck)return t;if(typeof t=="string"){let i=ea.parse(t);return i?new ck([i]):void 0}if(!Array.isArray(t))return;let r=[];for(let i of t){if(typeof i!="string")return;let n=ea.parse(i);if(!n)return;r.push(n)}return new ck(r)}toString(){return JSON.stringify(this.values)}static interpolate(t,r,i,n="rgb"){let a=[];if(t.values.length!=r.values.length)throw Error(`colorArray: Arrays have mismatched length (${t.values.length} vs. ${r.values.length}), cannot interpolate.`);for(let o=0;o<t.values.length;o++)a.push(ea.interpolate(t.values[o],r.values[o],i,n));return new ck(a)}},al=class extends Error{constructor(e,t){super(e),this.name="RuntimeError",this.path=t}toJSON(){return this.message}},Gdr=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]),X1=class Rz{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Rz)return t;if(!(!Array.isArray(t)||t.length<1||t.length%2!=0)){for(let r=0;r<t.length;r+=2){let i=t[r],n=t[r+1];if(typeof i!="string"||!Gdr.has(i)||!Array.isArray(n)||n.length!==2||typeof n[0]!="number"||typeof n[1]!="number")return}return new Rz(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,i,n){let a=t.values,o=r.values;if(a.length!==o.length)throw new al(`Cannot interpolate values of different length. from: ${t.toString()}, to: ${r.toString()}`,n);let s=[];for(let l=0;l<a.length;l+=2){if(a[l]!==o[l])throw new al(`Cannot interpolate values containing mismatched anchors. from[${l}]: ${a[l]}, to[${l}]: ${o[l]}`,n);s.push(a[l]);let[u,c]=a[l+1],[f,h]=o[l+1];s.push([X2(u,f,i),X2(c,h,i)])}return new Rz(s)}},Z1=class _tt{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new _tt({name:t,available:!1}):null}},Lm=class cT{constructor(t,r,i){this.from=t,this.to=r,this.transition=i}toString(){return this.from===this.to&&this.transition===1?this.from:JSON.stringify([this.from,this.to,this.transition])}static interpolate(t,r,i){return new cT(t,r,i)}static parse(t){if(t instanceof cT)return t;if(Array.isArray(t)&&t.length===3&&typeof t[0]=="string"&&typeof t[1]=="string"&&typeof t[2]=="number")return new cT(t[0],t[1],t[2]);if(typeof t=="object"&&typeof t.from=="string"&&typeof t.to=="string"&&typeof t.transition=="number")return new cT(t.from,t.to,t.transition);if(typeof t=="string")return new cT(t,t,1)}},Cie=class{constructor(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}};ST=class wtt{constructor(t,r){this.type=t,this.value=r}static parse(t,r){if(t.length!==2)return r.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!MT(t[1]))return r.error(`invalid value of type "${typeof t[1]}"`);let i=t[1],n=Ql(i),a=r.expectedType;return n.kind==="array"&&n.N===0&&a&&a.kind==="array"&&(typeof a.N!="number"||a.N===0)&&(n=a),new wtt(n,i)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}},Hdr=["Unknown","Point","LineString","Polygon"],Ttt=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Hdr[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(e){let t=this._parseColorCache.get(e);return t||(t=ea.parse(e),this._parseColorCache.set(e,t)),t}};Die=class Att{constructor(t,r,i,n){this.type=t,this.input=r,this.key=n,this.labels=[],this.outputs=[];for(let[a,o]of i)this.labels.push(a),this.outputs.push(o)}static parse(t,r){if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return r.error("Expected an even number of arguments.");let i=r.parse(t[1],1,Ei);if(!i)return null;let n=[],a=null;r.expectedType&&r.expectedType.kind!=="value"&&(a=r.expectedType);for(let o=1;o<t.length;o+=2){let s=o===1?-1/0:t[o],l=t[o+1],u=o,c=o+1;if(typeof s!="number")return r.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',u);if(n.length&&n[n.length-1][0]>=s)return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);let f=r.parse(l,c,a);if(!f)return null;a||(a=f.type),n.push([s,f])}return new Att(a,i,n,r.key)}evaluate(t){let r=this.labels,i=this.outputs;if(r.length===1)return i[0].evaluate(t);let n=this.input.evaluate(t);if(n<=r[0])return i[0].evaluate(t);let a=r.length;return n>=r[a-1]?i[a-1].evaluate(t):i[TB(r,n,this.key)].evaluate(t)}eachChild(t){t(this.input);for(let r of this.outputs)t(r)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}};Zd=class tre{constructor(t,r,i,n,a,o){this.type=t,this.operator=r,this.interpolation=i,this.input=n,this.key=o,this.labels=[],this.outputs=[];for(let[s,l]of a)this.labels.push(s),this.outputs.push(l)}static interpolationFactor(t,r,i,n){let a=0;if(t.name==="exponential")a=Vte(r,t.base,i,n);else if(t.name==="linear")a=Vte(r,1,i,n);else if(t.name==="cubic-bezier"){let o=t.controlPoints;a=jdr(o[0],o[1],o[2],o[3])(Vte(r,1,i,n))}return a}static parse(t,r){let[i,n,a,...o]=t;if(!Array.isArray(n)||n.length===0)return r.error("Expected an interpolation type expression.",1);if(n[0]==="linear")n={name:"linear"};else if(n[0]==="exponential"){let u=n[1];if(typeof u!="number")return r.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:u}}else if(n[0]==="cubic-bezier"){let u=n.slice(1);if(u.length!==4||u.some(c=>typeof c!="number"||c<0||c>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:u}}else return r.error(`Unknown interpolation type ${String(n[0])}`,1,0);if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(a=r.parse(a,2,Ei),!a)return null;let s=[],l=null;(i==="interpolate-hcl"||i==="interpolate-lab")&&r.expectedType!=wk?l=xv:r.expectedType&&r.expectedType.kind!=="value"&&(l=r.expectedType);for(let u=0;u<o.length;u+=2){let c=o[u],f=o[u+1],h=u+3,d=u+4;if(typeof c!="number")return r.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',h);if(s.length&&s[s.length-1][0]>=c)return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',h);let p=r.parse(f,d,l);if(!p)return null;l||(l=p.type),s.push([c,p])}return!G2(l,Ei)&&!G2(l,yB)&&!G2(l,xv)&&!G2(l,_B)&&!G2(l,bB)&&!G2(l,wk)&&!G2(l,wB)&&!G2(l,Lf(Ei))?r.error(`Type ${ml(l)} is not interpolatable.`):new tre(l,i,n,a,s,r.key)}evaluate(t){let r=this.labels,i=this.outputs;if(r.length===1)return i[0].evaluate(t);let n=this.input.evaluate(t);if(n<=r[0])return i[0].evaluate(t);let a=r.length;if(n>=r[a-1])return i[a-1].evaluate(t);let o=TB(r,n,this.key),s=r[o],l=r[o+1],u=tre.interpolationFactor(this.interpolation,n,s,l),c=i[o].evaluate(t),f=i[o+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return X2(c,f,u);case"color":return ea.interpolate(c,f,u);case"padding":return Q1.interpolate(c,f,u);case"colorArray":return Xd.interpolate(c,f,u);case"numberArray":return eg.interpolate(c,f,u);case"variableAnchorOffsetCollection":return X1.interpolate(c,f,u,this.key);case"array":return AT(c,f,u);case"projectionDefinition":return Lm.interpolate(c,f,u)}case"interpolate-hcl":switch(this.type.kind){case"color":return ea.interpolate(c,f,u,"hcl");case"colorArray":return Xd.interpolate(c,f,u,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return ea.interpolate(c,f,u,"lab");case"colorArray":return Xd.interpolate(c,f,u,"lab")}}}eachChild(t){t(this.input);for(let r of this.outputs)t(r)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}};$s={color:ea.interpolate,number:X2,padding:Q1.interpolate,numberArray:eg.interpolate,colorArray:Xd.interpolate,variableAnchorOffsetCollection:X1.interpolate,array:AT},Mtt=class Stt{constructor(t){this.type=Wk,this.sections=t}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let i=t[1];if(!Array.isArray(i)&&typeof i=="object")return r.error("First argument must be an image or text section.");let n=[],a=!1;for(let o=1;o<=t.length-1;++o){let s=t[o];if(a&&typeof s=="object"&&!Array.isArray(s)){a=!1;let l=null;if(s["font-scale"]&&(l=r.parse(s["font-scale"],1,Ei),!l))return null;let u=null;if(s["text-font"]&&(u=r.parse(s["text-font"],1,Lf(la)),!u))return null;let c=null;if(s["text-color"]&&(c=r.parse(s["text-color"],1,xv),!c))return null;let f=null;if(s["vertical-align"]){if(typeof s["vertical-align"]=="string"&&!Vdr.includes(s["vertical-align"]))return r.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${s["vertical-align"]}' instead.`);if(f=r.parse(s["vertical-align"],1,la),!f)return null}let h=n[n.length-1];h.scale=l,h.font=u,h.textColor=c,h.verticalAlign=f}else{let l=r.parse(t[o],1,ha);if(!l)return null;let u=l.type.kind;if(u!=="string"&&u!=="value"&&u!=="null"&&u!=="resolvedImage")return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");a=!0,n.push({content:l,scale:null,font:null,textColor:null,verticalAlign:null})}}return new Stt(n)}evaluate(t){return new Mm(this.sections.map(r=>{let i=r.content.evaluate(t);return Ql(i)===Yk?new ere("",i,null,null,null,r.verticalAlign?r.verticalAlign.evaluate(t):null):new ere(mk(i),null,r.scale?r.scale.evaluate(t):null,r.font?r.font.evaluate(t).join(","):null,r.textColor?r.textColor.evaluate(t):null,r.verticalAlign?r.verticalAlign.evaluate(t):null)}))}eachChild(t){for(let r of this.sections)t(r.content),r.scale&&t(r.scale),r.font&&t(r.font),r.textColor&&t(r.textColor),r.verticalAlign&&t(r.verticalAlign)}outputDefined(){return!1}};yz={string:la,number:Ei,boolean:La,object:Nb},_m=class ktt{constructor(t,r,i){this.type=t,this.args=r,this.key=i}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let i=1,n,a=t[0];if(a==="array"){let s;if(t.length>2){let u=t[1];if(typeof u!="string"||!(u in yz)||u==="object")return r.error('The item type argument of "array" must be one of string, number, boolean',1);s=yz[u],i++}else s=ha;let l;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return r.error('The length argument to "array" must be a positive integer literal',2);l=t[2],i++}n=Lf(s,l)}else{if(!yz[a])throw Error(`Types doesn't contain name = ${a}`);n=yz[a]}let o=[];for(;i<t.length;i++){let s=r.parse(t[i],i,ha);if(!s)return null;o.push(s)}return new ktt(n,o,r.key)}evaluate(t){for(let r=0;r<this.args.length;r++){let i=this.args[r].evaluate(t);if(!Tk(this.type,Ql(i)))return i;if(r===this.args.length-1)throw new al(`Expected value to be of type ${ml(this.type)}, but found ${ml(Ql(i))} instead.`,this.key)}throw Error()}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}},uQe={"to-boolean":La,"to-color":xv,"to-number":Ei,"to-string":la},pT=class Ctt{constructor(t,r,i){this.type=t,this.args=r,this.key=i}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let i=t[0];if(!uQe[i])throw Error(`Can't parse ${i} as it is not part of the known types`);if((i==="to-boolean"||i==="to-string")&&t.length!==2)return r.error("Expected one argument.");let n=uQe[i],a=[];for(let o=1;o<t.length;o++){let s=r.parse(t[o],o,ha);if(!s)return null;a.push(s)}return new Ctt(n,a,r.key)}evaluate(t){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(t);case"color":{let r,i;for(let n of this.args){if(r=n.evaluate(t),i=null,r instanceof ea)return r;if(typeof r=="string"){let a=t.parseColor(r);if(a)return a}else if(Array.isArray(r)&&(i=r.length<3||r.length>4?`Invalid rgba value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:btt(r[0],r[1],r[2],r[3]),!i))return new ea(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new al(i||`Could not parse color from value '${typeof r=="string"?r:JSON.stringify(r)}'`,this.key)}case"padding":{let r;for(let i of this.args){r=i.evaluate(t);let n=Q1.parse(r);if(n)return n}throw new al(`Could not parse padding from value '${typeof r=="string"?r:JSON.stringify(r)}'`,this.key)}case"numberArray":{let r;for(let i of this.args){r=i.evaluate(t);let n=eg.parse(r);if(n)return n}throw new al(`Could not parse numberArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`,this.key)}case"colorArray":{let r;for(let i of this.args){r=i.evaluate(t);let n=Xd.parse(r);if(n)return n}throw new al(`Could not parse colorArray from value '${typeof r=="string"?r:JSON.stringify(r)}'`,this.key)}case"variableAnchorOffsetCollection":{let r;for(let i of this.args){r=i.evaluate(t);let n=X1.parse(r);if(n)return n}throw new al(`Could not parse variableAnchorOffsetCollection from value '${typeof r=="string"?r:JSON.stringify(r)}'`,this.key)}case"number":{let r=null;for(let i of this.args){if(r=i.evaluate(t),r===null)return 0;let n=Number(r);if(!isNaN(n))return n}throw new al(`Could not convert ${JSON.stringify(r)} to number.`,this.key)}case"formatted":return Mm.fromString(mk(this.args[0].evaluate(t)));case"resolvedImage":return Z1.fromString(mk(this.args[0].evaluate(t)));case"projectionDefinition":{let r=this.args[0].evaluate(t);if(Lm.parse(r))return r;throw new al(`Could not parse projectionDefinition from value '${typeof r=="string"?r:JSON.stringify(r)}'`,this.key)}default:return mk(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}},Dtt=class Ftt{constructor(t,r){this.type=r.type,this.bindings=[].concat(t),this.result=r}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(let r of this.bindings)t(r[1]);t(this.result)}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);let i=[];for(let a=1;a<t.length-1;a+=2){let o=t[a];if(typeof o!="string")return r.error(`Expected string, but found ${typeof o} instead.`,a);if(/[^a-zA-Z0-9_]/.test(o))return r.error("Variable names must contain only alphanumeric characters or '_'.",a);let s=r.parse(t[a+1],a+1);if(!s)return null;i.push([o,s])}let n=r.parse(t[t.length-1],t.length-1,r.expectedType,i);return n?new Ftt(i,n):null}outputDefined(){return this.result.outputDefined()}},Ltt=class Ptt{constructor(t,r){this.type=r.type,this.name=t,this.boundExpression=r}static parse(t,r){if(t.length!==2||typeof t[1]!="string")return r.error("'var' expression requires exactly one string literal argument.");let i=t[1];return r.scope.has(i)?new Ptt(i,r.scope.get(i)):r.error(`Unknown variable "${i}". Make sure "${i}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}},Xdr=class Itt{constructor(t,r,i,n){this.type=t,this.index=r,this.input=i,this.key=n}static parse(t,r){if(t.length!==3)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,Ei),n=r.parse(t[2],2,Lf(r.expectedType||ha));if(!i||!n)return null;let a=n.type;return new Itt(a.itemType,i,n,r.key)}evaluate(t){let r=this.index.evaluate(t),i=this.input.evaluate(t);if(r<0)throw new al(`Array index out of bounds: ${r} < 0.`,this.key);if(r>=i.length)throw new al(`Array index out of bounds: ${r} > ${i.length-1}.`,this.key);if(r!==Math.floor(r))throw new al(`Array index must be an integer, but found ${r} instead.`,this.key);return i[r]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}},Zdr=class Rtt{constructor(t,r,i){this.needle=t,this.haystack=r,this.key=i,this.type=La}static parse(t,r){if(t.length!==3)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,ha),n=r.parse(t[2],2,ha);return!i||!n?null:kie(i.type,[La,la,Ei,$k,ha])?new Rtt(i,n,r.key):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${ml(i.type)} instead`)}evaluate(t){let r=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!i)return!1;if(!Ub(r,["boolean","string","number","null"]))throw new al(`Expected first argument to be of type boolean, string, number or null, but found ${ml(Ql(r))} instead.`,this.key);if(!Ub(i,["string","array"]))throw new al(`Expected second argument to be of type array or string, but found ${ml(Ql(i))} instead.`,this.key);return i.indexOf(r)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}},Kdr=class rre{constructor(t,r,i,n){this.needle=t,this.haystack=r,this.key=i,this.fromIndex=n,this.type=Ei}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,ha),n=r.parse(t[2],2,ha);if(!i||!n)return null;if(!kie(i.type,[La,la,Ei,$k,ha]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${ml(i.type)} instead`);if(t.length===4){let a=r.parse(t[3],3,Ei);return a?new rre(i,n,r.key,a):null}return new rre(i,n,r.key)}evaluate(t){let r=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!Ub(r,["boolean","string","number","null"]))throw new al(`Expected first argument to be of type boolean, string, number or null, but found ${ml(Ql(r))} instead.`,this.key);let n;if(this.fromIndex&&(n=this.fromIndex.evaluate(t)),Ub(i,["string"])){let a=i.indexOf(r,n);return a===-1?-1:[...i.slice(0,a)].length}if(Ub(i,["array"]))return i.indexOf(r,n);throw new al(`Expected second argument to be of type array or string, but found ${ml(Ql(i))} instead.`,this.key)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}},Jdr=class ztt{constructor(t,r,i,n,a,o){this.inputType=t,this.type=r,this.input=i,this.cases=n,this.outputs=a,this.otherwise=o}static parse(t,r){if(t.length<5)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return r.error("Expected an even number of arguments.");let i,n;r.expectedType&&r.expectedType.kind!=="value"&&(n=r.expectedType);let a={},o=[];for(let u=2;u<t.length-1;u+=2){let c=t[u],f=t[u+1];Array.isArray(c)||(c=[c]);let h=r.concat(u);if(c.length===0)return h.error("Expected at least one branch label.");for(let p of c){if(typeof p!="number"&&typeof p!="string")return h.error("Branch labels must be numbers or strings.");if(typeof p=="number"&&Math.abs(p)>2**53-1)return h.error(`Branch labels must be integers no larger than ${2**53-1}.`);if(typeof p=="number"&&Math.floor(p)!==p)return h.error("Numeric branch labels must be integer values.");if(!i)i=Ql(p);else if(h.checkSubtype(i,Ql(p)))return null;if(a[String(p)]!==void 0)return h.error("Branch labels must be unique.");a[String(p)]=o.length}let d=r.parse(f,u,n);if(!d)return null;n||(n=d.type),o.push(d)}let s=r.parse(t[1],1,ha);if(!s)return null;let l=r.parse(t[t.length-1],t.length-1,n);return!l||s.type.kind!=="value"&&r.concat(1).checkSubtype(i,s.type)?null:new ztt(i,n,s,a,o,l)}evaluate(t){let r=this.input.evaluate(t);return(Ql(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every(t=>t.outputDefined())&&this.otherwise.outputDefined()}},Qdr=class Btt{constructor(t,r,i){this.type=t,this.branches=r,this.otherwise=i}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return r.error("Expected an odd number of arguments.");let i;r.expectedType&&r.expectedType.kind!=="value"&&(i=r.expectedType);let n=[];for(let o=1;o<t.length-1;o+=2){let s=r.parse(t[o],o,La);if(!s)return null;let l=r.parse(t[o+1],o+1,i);if(!l)return null;n.push([s,l]),i||(i=l.type)}let a=r.parse(t[t.length-1],t.length-1,i);if(!a)return null;if(!i)throw Error("Can't infer output type");return new Btt(i,n,a)}evaluate(t){for(let[r,i]of this.branches)if(r.evaluate(t))return i.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(let[r,i]of this.branches)t(r),t(i);t(this.otherwise)}outputDefined(){return this.branches.every(([t,r])=>r.outputDefined())&&this.otherwise.outputDefined()}},epr=class ire{constructor(t,r,i,n,a){this.type=t,this.input=r,this.beginIndex=i,this.key=n,this.endIndex=a}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,ha),n=r.parse(t[2],2,Ei);if(!i||!n)return null;if(!kie(i.type,[Lf(ha),la,ha]))return r.error(`Expected first argument to be of type array or string, but found ${ml(i.type)} instead`);if(t.length===4){let a=r.parse(t[3],3,Ei);return a?new ire(i.type,i,n,r.key,a):null}return new ire(i.type,i,n,r.key)}evaluate(t){let r=this.input.evaluate(t),i=this.beginIndex.evaluate(t),n;if(this.endIndex&&(n=this.endIndex.evaluate(t)),Ub(r,["string"]))return[...r].slice(i,n).join("");if(Ub(r,["array"]))return r.slice(i,n);throw new al(`Expected first argument to be of type array or string, but found ${ml(Ql(r))} instead.`,this.key)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}},qtt=class nre{constructor(t,r){this.type=t,this.args=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let i=null,n=r.expectedType;n&&n.kind!=="value"&&(i=n);let a=[];for(let o of t.slice(1)){let s=r.parse(o,1+a.length,i,void 0,{typeAnnotation:"omit"});if(!s)return null;i||(i=s.type),a.push(s)}if(!i)throw Error("No output type");return n&&a.some(o=>Tk(n,o.type))?new nre(ha,a):new nre(i,a)}evaluate(t){let r=null,i=0,n;for(let a of this.args)if(i++,r=a.evaluate(t),r&&r instanceof Z1&&!r.available&&(n||(n=r.name),r=null,i===this.args.length&&(r=n)),r!==null)break;return r}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}};hpr=zT("==",tpr,Ott),dpr=zT("!=",rpr,spr),ppr=zT("<",ipr,lpr),vpr=zT(">",npr,upr),gpr=zT("<=",apr,cpr),mpr=zT(">=",opr,fpr),Utt=class Vtt{constructor(t,r,i){this.type=xB,this.locale=i,this.caseSensitive=t,this.diacriticSensitive=r}static parse(t,r){if(t.length!==2)return r.error("Expected one argument.");let i=t[1];if(typeof i!="object"||Array.isArray(i))return r.error("Collator options argument must be an object.");let n=r.parse(i["case-sensitive"]!==void 0&&i["case-sensitive"],1,La);if(!n)return null;let a=r.parse(i["diacritic-sensitive"]!==void 0&&i["diacritic-sensitive"],1,La);if(!a)return null;let o=null;return i.locale&&(o=r.parse(i.locale,1,la),!o)?null:new Vtt(n,a,o)}evaluate(t){return new Cie(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}},ypr=class Gtt{constructor(t,r,i,n,a,o){this.type=la,this.number=t,this.locale=r,this.currency=i,this.unit=n,this.minFractionDigits=a,this.maxFractionDigits=o}static parse(t,r){if(t.length!==3)return r.error("Expected two arguments.");let i=r.parse(t[1],1,Ei);if(!i)return null;let n=t[2];if(typeof n!="object"||Array.isArray(n))return r.error("NumberFormat options argument must be an object.");let a=null;if(n.locale&&(a=r.parse(n.locale,1,la),!a))return null;let o=null;if(n.currency&&(o=r.parse(n.currency,1,la),!o))return null;let s=null;if(n.unit&&(s=r.parse(n.unit,1,la),!s))return null;if(o&&s)return r.error("NumberFormat options `currency` and `unit` are mutually exclusive");let l=null;if(n["min-fraction-digits"]&&(l=r.parse(n["min-fraction-digits"],1,Ei),!l))return null;let u=null;return n["max-fraction-digits"]&&(u=r.parse(n["max-fraction-digits"],1,Ei),!u)?null:new Gtt(i,a,o,s,l,u)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,unit:this.unit?this.unit.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.unit&&t(this.unit),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}},xpr=class Htt{constructor(t){this.type=Yk,this.input=t}static parse(t,r){if(t.length!==2)return r.error("Expected two arguments.");let i=r.parse(t[1],1,la);return i?new Htt(i):r.error("No image name provided.")}evaluate(t){let r=this.input.evaluate(t),i=Z1.fromString(r);return i&&t.availableImages&&(i.available=t.availableImages.indexOf(r)>-1),i}eachChild(t){t(this.input)}outputDefined(){return!1}},_pr=class jtt{constructor(t,r){this.input=t,this.key=r,this.type=Ei}static parse(t,r){if(t.length!==2)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);let i=r.parse(t[1],1);return i?i.type.kind!=="array"&&i.type.kind!=="string"&&i.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${ml(i.type)} instead.`):new jtt(i,r.key):null}evaluate(t){let r=this.input.evaluate(t);if(typeof r=="string")return[...r].length;if(Array.isArray(r))return r.length;throw new al(`Expected value to be of type string or array, but found ${ml(Ql(r))} instead.`,this.key)}eachChild(t){t(this.input)}outputDefined(){return!1}},Y1=8192;Pie=class zz{constructor(t,r){this.type=La,this.geojson=t,this.geometries=r}static parse(t,r){if(t.length!==2)return r.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(MT(t[1])){let i=t[1];if(i.type==="FeatureCollection"){let n=[];for(let a of i.features){let{type:o,coordinates:s}=a.geometry;o==="Polygon"&&n.push(s),o==="MultiPolygon"&&n.push(...s)}if(n.length)return new zz(i,{type:"MultiPolygon",coordinates:n})}else if(i.type==="Feature"){let n=i.geometry.type;if(n==="Polygon"||n==="MultiPolygon")return new zz(i,i.geometry)}else if(i.type==="Polygon"||i.type==="MultiPolygon")return new zz(i,i)}return r.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return Ppr(t,this.geometries);if(t.geometryType()==="LineString")return Ipr(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}},Xtt=class{constructor(e=[],t=(r,i)=>r<i?-1:+(r>i)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(this.length===0)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,i=t[e];for(;e>0;){let n=e-1>>1,a=t[n];if(r(i,a)>=0)break;t[e]=a,e=n}t[e]=i}_down(e){let{data:t,compare:r}=this,i=this.length>>1,n=t[e];for(;e<i;){let a=(e<<1)+1,o=a+1;if(o<this.length&&r(t[o],t[a])<0&&(a=o),r(t[a],n)>=0)break;t[e]=t[a],e=a}t[e]=n}},pQe=Math.PI/180,Iie=class{constructor(e){let t=pQe*6378.137*1e3,r=Math.cos(e*pQe),i=1/(1-.0066943799901413165*(1-r*r)),n=Math.sqrt(i);this.kx=t*n*r,this.ky=t*n*i*.9933056200098587}distance(e,t){let r=this.wrap(e[0]-t[0])*this.kx,i=(e[1]-t[1])*this.ky;return Math.sqrt(r*r+i*i)}pointOnLine(e,t){let r=1/0,i,n,a,o;for(let s=0;s<e.length-1;s++){let l=e[s][0],u=e[s][1],c=this.wrap(e[s+1][0]-l)*this.kx,f=(e[s+1][1]-u)*this.ky,h=0;(c!==0||f!==0)&&(h=(this.wrap(t[0]-l)*this.kx*c+(t[1]-u)*this.ky*f)/(c*c+f*f),h>1?(l=e[s+1][0],u=e[s+1][1]):h>0&&(l+=c/this.kx*h,u+=f/this.ky*h)),c=this.wrap(t[0]-l)*this.kx,f=(t[1]-u)*this.ky;let d=c*c+f*f;d<r&&(r=d,i=l,n=u,a=s,o=h)}return{point:[i,n],index:a,t:Math.max(0,Math.min(1,o))}}wrap(e){for(;e<-180;)e+=360;for(;e>180;)e-=360;return e}};Bie=class Bz{constructor(t,r){this.type=Ei,this.geojson=t,this.geometries=r}static parse(t,r){if(t.length!==2)return r.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(MT(t[1])){let i=t[1];if(i.type==="FeatureCollection")return new Bz(i,i.features.map(n=>Gte(n.geometry)).flat());if(i.type==="Feature")return new Bz(i,Gte(i.geometry));if("type"in i&&"coordinates"in i)return new Bz(i,Gte(i))}return r.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return Npr(t,this.geometries);if(t.geometryType()==="LineString")return Upr(t,this.geometries);if(t.geometryType()==="Polygon")return Vpr(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}},Gpr=class Ktt{constructor(t){let r=null;for(let i of t)if(!r)r=i.type;else{if(r===i.type)continue;r=ha;break}this.type=Lf(r!=null?r:ha,t.length),this.arr=t}static parse(t,r){if(t.length!==2)return r.error(`'semiliteral' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!MT(t[1]))return r.error(`invalid value of type "${typeof t[1]}"`);let i=t[1],n=Ql(i);if(n.kind==="array"){let a=i.map(o=>r.parse(o,null,ha));return new Ktt(a)}return new ST(n,i)}evaluate(t){return this.arr.map(r=>r.evaluate(t))}eachChild(t){this.arr.forEach(t)}outputDefined(){return this.arr.every(t=>t.outputDefined())}},qie=class Jtt{constructor(t){this.key=t,this.type=ha}static parse(t,r){if(t.length!==2)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);let i=t[1];return i==null?r.error("Global state property must be defined."):typeof i=="string"?new Jtt(i):r.error(`Global state property must be string, but found ${typeof t[1]} instead.`)}evaluate(t){var i,n;let r=(i=t.globals)==null?void 0:i.globalState;return!r||Object.keys(r).length===0?null:(n=gk(r,this.key))!=null?n:null}eachChild(){}outputDefined(){return!1}},mT={"==":hpr,"!=":dpr,">":vpr,"<":ppr,">=":mpr,"<=":gpr,array:_m,at:Xdr,boolean:_m,case:Qdr,coalesce:qtt,collator:Utt,format:Mtt,image:xpr,in:Zdr,"index-of":Kdr,interpolate:Zd,"interpolate-hcl":Zd,"interpolate-lab":Zd,length:_pr,let:Dtt,literal:ST,match:Jdr,number:_m,"number-format":ypr,object:_m,semiliteral:Gpr,slice:epr,step:Die,string:_m,"to-boolean":pT,"to-color":pT,"to-number":pT,"to-string":pT,var:Ltt,within:Pie,distance:Bie,"global-state":qie},$1=class extends Error{constructor(e,t){super(t),this.message=t,this.key=e}},Hpr=class Qtt{constructor(t,r=[]){this.parent=t,this.bindings={};for(let[i,n]of r)this.bindings[i]=n}concat(t){return new Qtt(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw Error(`${t} not found in scope.`)}has(t){return this.bindings[t]?!0:this.parent?this.parent.has(t):!1}},ert=class trt{constructor(t,r,i=[],n,a=new Hpr,o=[]){this.registry=t,this.path=i,this.key=i.map(s=>`[${s}]`).join(""),this.scope=a,this.errors=o,this.expectedType=n,this._isConstant=r}parse(t,r,i,n,a={}){return r?this.concat(r,i,n)._parse(t,a):this._parse(t,a)}_parse(t,r){(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number")&&(t=["literal",t]);let i=this.key;function n(a,o,s){return s==="assert"?new _m(o,[a],i):s==="coerce"?new pT(o,[a],i):a}if(Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let a=t[0];if(typeof a!="string")return this.error(`Expression name must be a string, but found ${typeof a} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let o=this.registry[a];if(o){let s=o.parse(t,this);if(!s)return null;if(this.expectedType){let l=this.expectedType,u=s.type;if((l.kind==="string"||l.kind==="number"||l.kind==="boolean"||l.kind==="object"||l.kind==="array")&&u.kind==="value")s=n(s,l,r.typeAnnotation||"assert");else if(l.kind==="projectionDefinition"&&["string","array","value"].includes(u.kind)||["color","formatted","resolvedImage"].includes(l.kind)&&["value","string"].includes(u.kind)||["padding","numberArray"].includes(l.kind)&&["value","number","array"].includes(u.kind)||l.kind==="colorArray"&&["value","string","array"].includes(u.kind)||l.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(u.kind))s=n(s,l,r.typeAnnotation||"coerce");else if(this.checkSubtype(l,u))return null}if(!(s instanceof ST)&&s.type.kind!=="resolvedImage"&&this._isConstant(s)){let l=new Ttt;try{s=new ST(s.type,s.evaluate(l))}catch(u){return this.error(u.message),null}}return s}return this.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`,0)}return t===void 0?this.error("'undefined' value invalid. Use null instead."):typeof t=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof t} instead.`)}concat(t,r,i){let n=typeof t=="number"?this.path.concat(t):this.path,a=i?this.scope.concat(i):this.scope;return new trt(this.registry,this._isConstant,n,r||null,a,this.errors)}error(t,...r){let i=`${this.key}${r.map(n=>`[${n}]`).join("")}`;this.errors.push(new $1(i,t))}checkSubtype(t,r){let i=Tk(t,r);return i&&this.error(i),i}},Jb=class fk{constructor(t,r,i,n,a){this.name=t,this.type=r,this._evaluate=i,this.args=n,this.key=a}evaluate(t){return this._evaluate(t,this.args,this.key)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,r){let i=t[0],n=fk.definitions[i];if(!n)return r.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0);let a=Array.isArray(n)?n[0]:n.type,o=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,s=o.filter(([u])=>!Array.isArray(u)||u.length===t.length-1),l=null;for(let[u,c]of s){l=new ert(r.registry,jz,r.path,null,r.scope);let f=[],h=!1;for(let d=1;d<t.length;d++){let p=t[d],v=Array.isArray(u)?u[d-1]:u.type,m=l.parse(p,1+f.length,v);if(!m){h=!0;break}f.push(m)}if(!h){if(Array.isArray(u)&&u.length!==f.length){l.error(`Expected ${u.length} arguments, but found ${f.length} instead.`);continue}for(let d=0;d<f.length;d++){let p=Array.isArray(u)?u[d]:u.type,v=f[d];l.concat(d+1).checkSubtype(p,v.type)}if(l.errors.length===0)return new fk(i,a,c,f,r.key)}}if(s.length===1)r.errors.push(...l.errors);else{let u=(s.length?s:o).map(([f])=>$pr(f)).join(" | "),c=[];for(let f=1;f<t.length;f++){let h=r.parse(t[f],1+c.length);if(!h)return null;c.push(ml(h.type))}r.error(`Expected arguments of type ${u}, but found (${c.join(", ")}) instead.`)}return null}static register(t,r){fk.definitions=r;for(let i in r)t[i]=fk}};Jb.register(mT,{error:[Fdr,[la],(e,[t],r)=>{throw new al(t.evaluate(e),r)}],typeof:[la,[ha],(e,[t])=>ml(Ql(t.evaluate(e)))],"to-rgba":[Lf(Ei,4),[xv],(e,[t])=>{let[r,i,n,a]=t.evaluate(e).rgb;return[r*255,i*255,n*255,a]}],rgb:[xv,[Ei,Ei,Ei],yQe],rgba:[xv,[Ei,Ei,Ei,Ei],yQe],has:{type:La,overloads:[[[la],(e,[t])=>xQe(t.evaluate(e),e.properties())],[[la,Nb],(e,[t,r])=>xQe(t.evaluate(e),r.evaluate(e))]]},get:{type:ha,overloads:[[[la],(e,[t])=>Hte(t.evaluate(e),e.properties())],[[la,Nb],(e,[t,r])=>Hte(t.evaluate(e),r.evaluate(e))]]},"feature-state":[ha,[la],(e,[t])=>Hte(t.evaluate(e),e.featureState||{})],properties:[Nb,[],e=>e.properties()],"geometry-type":[la,[],e=>e.geometryType()],id:[ha,[],e=>e.id()],zoom:[Ei,[],e=>e.globals.zoom],"heatmap-density":[Ei,[],e=>e.globals.heatmapDensity||0],elevation:[Ei,[],e=>e.globals.elevation||0],"line-progress":[Ei,[],e=>e.globals.lineProgress||0],accumulated:[ha,[],e=>e.globals.accumulated===void 0?null:e.globals.accumulated],"+":[Ei,Pb(Ei),(e,t)=>{let r=0;for(let i of t)r+=i.evaluate(e);return r}],"*":[Ei,Pb(Ei),(e,t)=>{let r=1;for(let i of t)r*=i.evaluate(e);return r}],"-":{type:Ei,overloads:[[[Ei,Ei],(e,[t,r])=>t.evaluate(e)-r.evaluate(e)],[[Ei],(e,[t])=>-t.evaluate(e)]]},"/":[Ei,[Ei,Ei],(e,[t,r])=>t.evaluate(e)/r.evaluate(e)],"%":[Ei,[Ei,Ei],(e,[t,r])=>t.evaluate(e)%r.evaluate(e)],ln2:[Ei,[],()=>Math.LN2],pi:[Ei,[],()=>Math.PI],e:[Ei,[],()=>Math.E],"^":[Ei,[Ei,Ei],(e,[t,r])=>t.evaluate(e)**+r.evaluate(e)],sqrt:[Ei,[Ei],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[Ei,[Ei],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[Ei,[Ei],(e,[t])=>Math.log(t.evaluate(e))],log2:[Ei,[Ei],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[Ei,[Ei],(e,[t])=>Math.sin(t.evaluate(e))],cos:[Ei,[Ei],(e,[t])=>Math.cos(t.evaluate(e))],tan:[Ei,[Ei],(e,[t])=>Math.tan(t.evaluate(e))],asin:[Ei,[Ei],(e,[t])=>Math.asin(t.evaluate(e))],acos:[Ei,[Ei],(e,[t])=>Math.acos(t.evaluate(e))],atan:[Ei,[Ei],(e,[t])=>Math.atan(t.evaluate(e))],min:[Ei,Pb(Ei),(e,t)=>Math.min(...t.map(r=>r.evaluate(e)))],max:[Ei,Pb(Ei),(e,t)=>Math.max(...t.map(r=>r.evaluate(e)))],abs:[Ei,[Ei],(e,[t])=>Math.abs(t.evaluate(e))],round:[Ei,[Ei],(e,[t])=>{let r=t.evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[Ei,[Ei],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[Ei,[Ei],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[La,[la,ha],(e,[t,r])=>e.properties()[t.value]===r.value],"filter-id-==":[La,[ha],(e,[t])=>e.id()===t.value],"filter-type-==":[La,[la],(e,[t])=>e.geometryType()===t.value],"filter-<":[La,[la,ha],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i<n}],"filter-id-<":[La,[ha],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r<i}],"filter->":[La,[la,ha],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i>n}],"filter-id->":[La,[ha],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r>i}],"filter-<=":[La,[la,ha],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i<=n}],"filter-id-<=":[La,[ha],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r<=i}],"filter->=":[La,[la,ha],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i>=n}],"filter-id->=":[La,[ha],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r>=i}],"filter-has":[La,[ha],(e,[t])=>{let r=t.value,i=e.properties();return r in i&&i[r]!==void 0}],"filter-has-id":[La,[],e=>e.id()!==null&&e.id()!==void 0],"filter-type-in":[La,[Lf(la)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[La,[Lf(ha)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[La,[la,Lf(ha)],(e,[t,r])=>r.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[La,[la,Lf(ha)],(e,[t,r])=>jpr(e.properties()[t.value],r.value,0,r.value.length-1)],all:{type:La,overloads:[[[La,La],(e,[t,r])=>t.evaluate(e)&&r.evaluate(e)],[Pb(La),(e,t)=>{for(let r of t)if(!r.evaluate(e))return!1;return!0}]]},any:{type:La,overloads:[[[La,La],(e,[t,r])=>t.evaluate(e)||r.evaluate(e)],[Pb(La),(e,t)=>{for(let r of t)if(r.evaluate(e))return!0;return!1}]]},"!":[La,[La],(e,[t])=>!t.evaluate(e)],"is-supported-script":[La,[la],(e,[t])=>{let r=e.globals&&e.globals.isSupportedScript;return!r||r(t.evaluate(e))}],upcase:[la,[la],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[la,[la],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[la,Pb(ha),(e,t)=>t.map(r=>mk(r.evaluate(e))).join("")],split:[Lf(la),[la,la],(e,[t,r])=>t.evaluate(e).split(r.evaluate(e))],join:[la,[Lf(la),la],(e,[t,r])=>t.evaluate(e).join(r.evaluate(e))],"resolved-locale":[la,[xB],(e,[t])=>t.evaluate(e).resolvedLocale()]});Nie=/^(.*)-transition$/;Uie=class{constructor(e,t,r,i){this.expression=e,this._warningHistory={},this._evaluator=new Ttt,this._defaultValue=r?crt(r):null,this._enumValues=r&&r.type==="enum"?r.values:null,this._globalState=i,this._rootKey=t}evaluateWithoutErrorHandling(e,t,r,i,n,a){return this._globalState&&(e=kT(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,i,n,a){this._globalState&&(e=kT(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a||null;try{let o=this.expression.evaluate(this._evaluator);if(o==null||typeof o=="number"&&o!==o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new al(`Expected value to be one of ${Object.keys(this._enumValues).map(s=>JSON.stringify(s)).join(", ")}, but found ${JSON.stringify(o)} instead.`,"");return o}catch(o){let s=o instanceof al?o.path:"",l=`${s}|${o.message}`;return this._warningHistory[l]||(this._warningHistory[l]=!0,typeof console<"u"&&console.warn(art(this._rootKey,s,o.message,this._defaultValue))),this._defaultValue}}};Ek=class{constructor(e,t,r){this.kind=e,this._styleExpression=t,this.isStateDependent=e!=="constant"&&!Mk(t.expression),this.globalStateRefs=Kk(t.expression),this._globalState=r}evaluateWithoutErrorHandling(e,t,r,i,n,a){return this._globalState&&(e=kT(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,n,a)}evaluate(e,t,r,i,n,a){return this._globalState&&(e=kT(e,this._globalState)),this._styleExpression.evaluate(e,t,r,i,n,a)}},$z=class{constructor(e,t,r,i,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent=e!=="camera"&&!Mk(t.expression),this.globalStateRefs=Kk(t.expression),this.interpolationType=i,this._globalState=n}evaluateWithoutErrorHandling(e,t,r,i,n,a){return this._globalState&&(e=kT(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,n,a)}evaluate(e,t,r,i,n,a){return this._globalState&&(e=kT(e,this._globalState)),this._styleExpression.evaluate(e,t,r,i,n,a)}interpolationFactor(e,t,r){return this.interpolationType?Zd.interpolationFactor(this.interpolationType,e,t,r):0}};lrt=class urt{constructor(t,r,i){this.isStateDependent=!1,this.globalStateRefs=new Set,this._globalState=null,ort(r),this._parameters=t,this._specification=i,this._rootKey=r,this._defaultValue=crt(i),this._warningHistory={};let n=irt(this._parameters,this._specification);this.kind=n.kind,this.interpolationFactor=n.interpolationFactor,this.zoomStops=n.zoomStops,this.interpolationType=n.interpolationType,this._innerEvaluate=n.evaluate}evaluate(t,r){try{return this._innerEvaluate(t,r)}catch(i){let n=i instanceof Error?i.message:String(i),a=`|${n}`;return this._warningHistory[a]||(this._warningHistory[a]=!0,typeof console<"u"&&console.warn(art(this._rootKey,"",n,this._defaultValue))),this._defaultValue}}static deserialize(t){return new urt(t._parameters,t._rootKey,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification,_rootKey:t._rootKey}}};ovr={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};TQe={promoteId:dvr};AQe=1114111,Avr=/^u\+(?:([0-9a-f]{1,6})(?:-([0-9a-f]{1,6}))?|([0-9a-f]{0,5}\?{1,6}))$/i;MQe={"*"(){return[]},array:Hie,boolean:uvr,number:FB,color:ure,constants:prt,enum:kk,filter:jie,function:vrt,layer:_rt,object:I0,source:brt,light:wrt,sky:Trt,terrain:Art,projection:_vr,projectionDefinition:bvr,string:J2,formatted:pvr,resolvedImage:vvr,padding:gvr,numberArray:mvr,colorArray:yvr,variableAnchorOffsetCollection:xvr,sprite:Mrt,state:Srt,fontFaces:Ert};P0.source=jd(Hd(brt)),P0.sprite=jd(Hd(Mrt)),P0.glyphs=jd(Hd(krt)),P0.fontFaces=jd(Hd(Ert)),P0.light=jd(Hd(wrt)),P0.sky=jd(Hd(Trt)),P0.terrain=jd(Hd(Art)),P0.state=jd(Hd(Srt)),P0.layer=jd(Hd(_rt)),P0.filter=jd(Hd(jie)),P0.paintProperty=jd(Hd(yrt)),P0.layoutProperty=jd(Hd(xrt));Svr={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"},Evr=class{constructor(e,t,r){this._rootKey=t,this._globalState=r,this.setValue(e)}evaluate(){var e;return(e=this._literalValue)!=null?e:this._compiledValue.evaluate({})}setValue(e){if(e==null||e==="visible"||e==="none"){this._literalValue=e==="none"?"none":"visible",this._compiledValue=void 0,this._globalStateRefs=new Set;return}let t=DB(e,this._rootKey,Svr,this._globalState);if(t.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,Error(t.value.map(r=>`${r.key}: ${r.message}`).join(", "));this._literalValue=void 0,this._compiledValue=t.value,this._globalStateRefs=Kk(t.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}};ch=P0,$ie=new Set(Object.keys(_r).filter(e=>e.startsWith("source_")).map(e=>e.slice(7).replaceAll("_","-")));fre=class Drt{constructor(t,r,i){let n=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;let o=new Int32Array(this.arrayBuffer);t=o[0],r=o[1],i=o[2],this.d=r+2*i;for(let u=0;u<this.d*this.d;u++){let c=o[3+u],f=o[3+u+1];n.push(c===f?null:o.subarray(c,f))}let s=o[3+n.length],l=o[3+n.length+1];this.keys=o.subarray(s,l),this.bboxes=o.subarray(l),this.insert=this._insertReadonly}else{this.d=r+2*i;for(let o=0;o<this.d*this.d;o++)n.push([]);this.keys=[],this.bboxes=[]}this.n=r,this.extent=t,this.padding=i,this.scale=r/t,this.uid=0;let a=i/r*t;this.min=-a,this.max=t+a}insert(t,r,i,n,a){this._forEachCell(r,i,n,a,this._insertCell,this.uid++,void 0,void 0),this.keys.push(t),this.bboxes.push(r),this.bboxes.push(i),this.bboxes.push(n),this.bboxes.push(a)}_insertReadonly(){throw Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(t,r,i,n,a,o){this.cells[a].push(o)}query(t,r,i,n,a){let o=this.min,s=this.max;if(t<=o&&r<=o&&s<=i&&s<=n&&!a)return[...this.keys];{let l=[];return this._forEachCell(t,r,i,n,this._queryCell,l,{},a),l}}_queryCell(t,r,i,n,a,o,s,l){let u=this.cells[a];if(u!==null){let c=this.keys,f=this.bboxes;for(let h of u)if(s[h]===void 0){let d=h*4;(l?l(f[d+0],f[d+1],f[d+2],f[d+3]):t<=f[d+2]&&r<=f[d+3]&&i>=f[d+0]&&n>=f[d+1])?(s[h]=!0,o.push(c[h])):s[h]=!1}}}_forEachCell(t,r,i,n,a,o,s,l){let u=this._convertToCellCoord(t),c=this._convertToCellCoord(r),f=this._convertToCellCoord(i),h=this._convertToCellCoord(n);for(let d=u;d<=f;d++)for(let p=c;p<=h;p++){let v=this.d*p+d;if((!l||l(this._convertFromCellCoord(d),this._convertFromCellCoord(p),this._convertFromCellCoord(d+1),this._convertFromCellCoord(p+1)))&&a.call(this,t,r,i,n,v,o,s,l))return}}_convertFromCellCoord(t){return(t-this.padding)/this.scale}_convertToCellCoord(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let t=this.cells,r=3+this.cells.length+1+1,i=0;for(let o of this.cells)i+=o.length;let n=new Int32Array(r+i+this.keys.length+this.bboxes.length);n[0]=this.extent,n[1]=this.n,n[2]=this.padding;let a=r;for(let o=0;o<t.length;o++){let s=t[o];n[3+o]=a,n.set(s,a),a+=s.length}return n[3+t.length]=a,n.set(this.keys,a),a+=this.keys.length,n[3+t.length+1]=a,n.set(this.bboxes,a),a+=this.bboxes.length,n.buffer}static serialize(t,r){let i=t.toArrayBuffer();return r&&r.push(i),{buffer:i}}static deserialize(t){return new Drt(t.buffer)}},bm={};Ui("Object",Object),Ui("Set",Set),Ui("TransferableGridIndex",fre),Ui("Color",ea),Ui("Error",Error),Ui("AJAXError",TT),Ui("ResolvedImage",Z1),Ui("StylePropertyFunction",lrt),Ui("StyleExpression",Uie,{omit:["_evaluator"]}),Ui("ZoomDependentExpression",$z),Ui("ZoomConstantExpression",Ek),Ui("CompoundExpression",Jb,{omit:["_evaluate"]});for(let e in mT)mT[e]._classRegistryKey||Ui(`Expression_${e}`,mT[e]);Yz=class{constructor(){this.first=!0}update(e,t){let r=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=t),e!==this.lastZoom&&(this.lastZoom=e,this.lastFloorZoom=r,!0))}},Co=class{constructor(e,t){this.zoom=e,t?(this.now=t.now||0,this.fadeDuration=t.fadeDuration||0,this.zoomHistory=t.zoomHistory||new Yz,this.transition=t.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Yz,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let e=this.zoom,t=e-Math.floor(e),r=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}}},PB="-transition",IB=class{constructor(e,t,r,i){this.property=e,this.value=t,this.expression=tvr(t===void 0?e.specification.default:t,r,e.specification,i)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)}},hre=class{constructor(e,t,r){this.property=e,this.value=new IB(e,void 0,t,r)}transitioned(e,t){return new SQe(this.property,this.value,t,ln({},e.transition,this.transition),e.now)}untransitioned(){return new SQe(this.property,this.value,null,{},0)}},Jk=class{constructor(e,t,r){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues),this._globalState=r,this._rootKey=t}_propertyRootKey(e){return`${this._rootKey}.${String(e)}`}hasProperty(e){return e in this._properties.defaultTransitionablePropertyValues}getValue(e){return lh(this._values[e].value.value)}setValue(e,t){Object.hasOwn(this._values,e)||(this._values[e]=new hre(this._values[e].property,this._propertyRootKey(e),this._globalState)),this._values[e].value=new IB(this._values[e].property,t===null?void 0:lh(t),this._propertyRootKey(e),this._globalState)}getTransition(e){return lh(this._values[e].transition)}setTransition(e,t){Object.hasOwn(this._values,e)||(this._values[e]=new hre(this._values[e].property,this._propertyRootKey(e),this._globalState)),this._values[e].transition=lh(t)||void 0}serialize(){let e={};for(let t of Object.keys(this._values)){let r=this.getValue(t);r!==void 0&&(e[t]=r);let i=this.getTransition(t);i!==void 0&&(e[`${t}${PB}`]=i)}return e}transitioned(e,t){let r=new EQe(this._properties);for(let i of Object.keys(this._values))r._values[i]=this._values[i].transitioned(e,t._values[i]);return r}untransitioned(){let e=new EQe(this._properties);for(let t of Object.keys(this._values))e._values[t]=this._values[t].untransitioned();return e}},SQe=class{constructor(e,t,r,i,n){this.property=e,this.value=t,this.begin=n+i.delay||0,this.end=this.begin+i.duration||0,e.specification.transition&&(i.delay||i.duration)&&(this.prior=r)}possiblyEvaluate(e,t,r){let i=e.now||0,n=this.value.possiblyEvaluate(e,t,r),a=this.prior;if(!a)return n;if(i>this.end||this.value.isDataDriven())return this.prior=null,n;if(i<this.begin)return a.possiblyEvaluate(e,t,r);{let o=(i-this.begin)/(this.end-this.begin);return this.property.interpolate(a.possiblyEvaluate(e,t,r),n,Adr(o))}}},EQe=class{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,t,r){let i=new RB(this._properties);for(let n of Object.keys(this._values))i._values[n]=this._values[n].possiblyEvaluate(e,t,r);return i}hasTransition(){for(let e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}},Fvr=class{constructor(e,t,r){this._properties=e,this._values=Object.create(e.defaultPropertyValues),this._globalState=r,this._rootKey=t}_propertyRootKey(e){return`${this._rootKey}.${String(e)}`}hasValue(e){return this._values[e].value!==void 0}hasProperty(e){return e in this._properties.defaultPropertyValues}getValue(e){return lh(this._values[e].value)}setValue(e,t){this._values[e]=new IB(this._values[e].property,t===null?void 0:lh(t),this._propertyRootKey(e),this._globalState)}serialize(){let e={};for(let t of Object.keys(this._values)){let r=this.getValue(t);r!==void 0&&(e[t]=r)}return e}possiblyEvaluate(e,t,r){let i=new RB(this._properties);for(let n of Object.keys(this._values))i._values[n]=this._values[n].possiblyEvaluate(e,t,r);return i}},Yd=class{constructor(e,t,r){this.property=e,this.value=t,this.parameters=r}isConstant(){return this.value.kind==="constant"}constantOr(e){return this.value.kind==="constant"?this.value.value:e}evaluate(e,t,r,i){return this.property.evaluate(this.value,this.parameters,e,t,r,i)}},RB=class{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}};Fi=class{constructor(e,t){this.specification=e,this.name=t}possiblyEvaluate(e,t){if(e.isDataDriven())throw Error("Value should not be data driven");return e.expression.evaluate(t)}interpolate(e,t,r){if(Prt(e,t))return Ma(`Property "${this.name}" is trying to interpolate arrays of different lengths. Rendering may 'jump'.`),t;let i=this.specification.type,n=$s[i];return n?n(e,t,r):e}},Sn=class{constructor(e,t,r){this.specification=e,this.name=t,this.overrides=r}possiblyEvaluate(e,t,r,i){return e.expression.kind==="constant"||e.expression.kind==="camera"?new Yd(this,{kind:"constant",value:e.expression.evaluate(t,null,{},r,i)},t):new Yd(this,e.expression,t)}interpolate(e,t,r){if(e.value.kind!=="constant"||t.value.kind!=="constant")return e;if(e.value.value===void 0||t.value.value===void 0)return new Yd(this,{kind:"constant",value:void 0},e.parameters);if(Prt(e.value.value,t.value.value))return Ma(`Property "${this.name}" is trying to interpolate arrays of different lengths. Rendering may 'jump'.`),t;let i=this.specification.type,n=$s[i];if(n){let a=n(e.value.value,t.value.value,r);return new Yd(this,{kind:"constant",value:a},e.parameters)}return e}evaluate(e,t,r,i,n,a){return e.kind==="constant"?e.value:e.evaluate(t,r,i,n,a)}},Ck=class extends Sn{possiblyEvaluate(e,t,r,i){if(e.value===void 0)return new Yd(this,{kind:"constant",value:void 0},t);if(e.expression.kind==="constant"){let n=e.expression.evaluate(t,null,{},r,i),a=e.property.specification.type==="resolvedImage"&&typeof n!="string"?n.name:n,o=this._calculate(a,a,a,t);return new Yd(this,{kind:"constant",value:o},t)}if(e.expression.kind==="camera"){let n=this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t);return new Yd(this,{kind:"constant",value:n},t)}return new Yd(this,e.expression,t)}evaluate(e,t,r,i,n,a){if(e.kind==="source"){let o=e.evaluate(t,r,i,n,a);return this._calculate(o,o,o,t)}return e.kind==="composite"?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},r,i),e.evaluate({zoom:Math.floor(t.zoom)},r,i),e.evaluate({zoom:Math.floor(t.zoom)+1},r,i),t):e.value}_calculate(e,t,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}},Irt=class{constructor(e,t){this.specification=e,this.name=t}possiblyEvaluate(e,t,r,i){if(e.value!==void 0){if(e.expression.kind==="constant"){let n=e.expression.evaluate(t,null,{},r,i);return this._calculate(n,n,n,t)}return this._calculate(e.expression.evaluate(new Co(Math.floor(t.zoom-1),t)),e.expression.evaluate(new Co(Math.floor(t.zoom),t)),e.expression.evaluate(new Co(Math.floor(t.zoom+1),t)),t)}}_calculate(e,t,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}},zB=class{constructor(e,t){this.specification=e,this.name=t}possiblyEvaluate(e,t,r,i){return!!e.expression.evaluate(t,null,{},r,i)}interpolate(){return!1}},uc=class{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let t in e){let r=e[t];r.specification.overridable&&this.overridableProperties.push(t);let i=this.defaultPropertyValues[t]=new IB(r,void 0,r.name,void 0),n=this.defaultTransitionablePropertyValues[t]=new hre(r,r.name,void 0);this.defaultTransitioningPropertyValues[t]=n.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=i.possiblyEvaluate({})}}};Ui("DataDrivenProperty",Sn),Ui("DataConstantProperty",Fi),Ui("CrossFadedDataDrivenProperty",Ck),Ui("CrossFadedProperty",Irt),Ui("ColorRampProperty",zB);CQe=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",Wte=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?",Av=class extends mu{constructor(e,t,r){if(super(),this.id=e.id,this.type=e.type,this._globalState=r,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=kvr(this.visibility,`layers[${this.id}].layout.visibility`,r),e.type!=="custom"&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,e.type!=="background"&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter,this._featureFilter=CT(e.filter,`layers[${this.id}].filter`,r)),t.layout&&(this._unevaluatedLayout=new Fvr(t.layout,`layers[${this.id}].layout`,r)),t.paint)){this._transitionablePaint=new Jk(t.paint,`layers[${this.id}].paint`,r);for(let i in e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(let i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new RB(t.paint)}}setFilter(e){this.filter=e,this._featureFilter=CT(e,`layers[${this.id}].filter`,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){var t;if(e==="visibility")return this.visibility;if((t=this._transitionablePaint)!=null&&t.hasProperty(e))throw Error(e+CQe);if(!this._unevaluatedLayout)throw Error(`Cannot get layout property "${e}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(e)}getLayoutAffectingGlobalStateRefs(){let e=new Set;for(let t of this._visibilityExpression.getGlobalStateRefs())e.add(t);if(this._unevaluatedLayout)for(let t in this._unevaluatedLayout._values){let r=this._unevaluatedLayout._values[t];for(let i of r.getGlobalStateRefs())e.add(i)}for(let t of this._featureFilter.getGlobalStateRefs())e.add(t);return e}getPaintAffectingGlobalStateRefs(){var t;let e=new globalThis.Map;if(this._transitionablePaint)for(let r in this._transitionablePaint._values){let i=this._transitionablePaint._values[r].value;for(let n of i.getGlobalStateRefs()){let a=(t=e.get(n))!=null?t:[];a.push({name:r,value:i.value}),e.set(n,a)}}return e}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(e,t,r={}){var i;if(e==="visibility"){this.visibility=t,this._visibilityExpression.setValue(t),this.recalculateVisibility();return}if((i=this._transitionablePaint)!=null&&i.hasProperty(e)){this.fire(new An(Error(e+CQe)));return}t!=null&&this._validate(ch.layoutProperty,`layers.${this.id}.layout.${e}`,e,t,r)||this._unevaluatedLayout.setValue(e,t)}getPaintProperty(e){var t,r;if(e.endsWith("-transition")){let i=e.slice(0,-11);if(i==="visibility"||(t=this._unevaluatedLayout)!=null&&t.hasProperty(i))throw Error(e+Wte);return this._transitionablePaint.getTransition(i)}if(e==="visibility"||(r=this._unevaluatedLayout)!=null&&r.hasProperty(e))throw Error(e+Wte);return this._transitionablePaint.getValue(e)}setPaintProperty(e,t,r={}){var i;if(e==="visibility"||(i=this._unevaluatedLayout)!=null&&i.hasProperty(e))return this.fire(new An(Error(e+Wte))),!1;if(t!=null&&this._validate(ch.paintProperty,`layers.${this.id}.paint.${e}`,e,t,r))return!1;if(e.endsWith("-transition"))return this._transitionablePaint.setTransition(e.slice(0,-11),t||void 0),!1;{let n=this._transitionablePaint._values[e],a=n.property.specification["property-type"]==="cross-faded-data-driven",o=n.value.isDataDriven(),s=n.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);let l=this._transitionablePaint._values[e].value;return l.isDataDriven()||o||a||this._handleOverridablePaintPropertyUpdate(e,s,l)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,t,r){return!1}isHidden(e=this.minzoom,t=!1){return this.minzoom&&e<(t?Math.floor(this.minzoom):this.minzoom)||this.maxzoom&&e>=this.maxzoom?!0:this._evaluatedVisibility==="none"}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)}serialize(){var t,r;let e={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:(t=this._unevaluatedLayout)==null?void 0:t.serialize(),paint:(r=this._transitionablePaint)==null?void 0:r.serialize()};return this.visibility&&(e.layout||(e.layout={}),e.layout.visibility=this.visibility),bie(e,(i,n)=>i!==void 0&&!(n==="layout"&&!Object.keys(i).length)&&!(n==="paint"&&!Object.keys(i).length))}_validate(e,t,r,i,n={}){return qT(this,e,{key:t,layerType:this.type,objectKey:r,value:i},n)}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let e in this.paint._values){let t=this.paint.get(e);if(t instanceof Yd&&ET(t.property.specification)&&(t.value.kind==="source"||t.value.kind==="composite")&&t.value.isStateDependent)return!0}return!1}},Pvr=()=>Lvr||(Lvr=new uc({"raster-opacity":new Fi(_r.paint_raster["raster-opacity"],"raster-opacity"),"raster-hue-rotate":new Fi(_r.paint_raster["raster-hue-rotate"],"raster-hue-rotate"),"raster-brightness-min":new Fi(_r.paint_raster["raster-brightness-min"],"raster-brightness-min"),"raster-brightness-max":new Fi(_r.paint_raster["raster-brightness-max"],"raster-brightness-max"),"raster-saturation":new Fi(_r.paint_raster["raster-saturation"],"raster-saturation"),"raster-contrast":new Fi(_r.paint_raster["raster-contrast"],"raster-contrast"),resampling:new Fi(_r.paint_raster.resampling,"resampling"),"raster-resampling":new Fi(_r.paint_raster["raster-resampling"],"raster-resampling"),"raster-fade-duration":new Fi(_r.paint_raster["raster-fade-duration"],"raster-fade-duration")})),Ivr={get paint(){return Pvr()}},BB=e=>e.type==="raster",Rvr=class extends Av{constructor(e,t){super(e,Ivr,t)}},zvr={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Qk=class{constructor(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}},yl=class{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){let t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t}_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(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(this.capacity*5),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}}_refreshViews(){throw Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}};Dk=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let i=e*2;return this.int16[i+0]=t,this.int16[i+1]=r,e}};Dk.prototype.bytesPerElement=4,Ui("StructArrayLayout2i4",Dk);Xz=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=e*3;return this.int16[n+0]=t,this.int16[n+1]=r,this.int16[n+2]=i,e}};Xz.prototype.bytesPerElement=6,Ui("StructArrayLayout3i6",Xz);dre=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r,i)}emplace(e,t,r,i,n){let a=e*4;return this.int16[a+0]=t,this.int16[a+1]=r,this.int16[a+2]=i,this.int16[a+3]=n,e}};dre.prototype.bytesPerElement=8,Ui("StructArrayLayout4i8",dre);pre=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=e*6;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=a,this.int16[s+5]=o,e}};pre.prototype.bytesPerElement=12,Ui("StructArrayLayout2i4i12",pre);vre=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=e*4,l=e*8;return this.int16[s+0]=t,this.int16[s+1]=r,this.uint8[l+4]=i,this.uint8[l+5]=n,this.uint8[l+6]=a,this.uint8[l+7]=o,e}};vre.prototype.bytesPerElement=8,Ui("StructArrayLayout2i4ub8",vre);Fk=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let i=e*2;return this.float32[i+0]=t,this.float32[i+1]=r,e}};Fk.prototype.bytesPerElement=8,Ui("StructArrayLayout2f8",Fk);gre=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a,o,s,l,u){let c=this.length;return this.resize(c+1),this.emplace(c,e,t,r,i,n,a,o,s,l,u)}emplace(e,t,r,i,n,a,o,s,l,u,c){let f=e*10;return this.uint16[f+0]=t,this.uint16[f+1]=r,this.uint16[f+2]=i,this.uint16[f+3]=n,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.uint16[f+8]=u,this.uint16[f+9]=c,e}};gre.prototype.bytesPerElement=20,Ui("StructArrayLayout10ui20",gre);mre=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a,o,s){let l=this.length;return this.resize(l+1),this.emplace(l,e,t,r,i,n,a,o,s)}emplace(e,t,r,i,n,a,o,s,l){let u=e*8;return this.uint16[u+0]=t,this.uint16[u+1]=r,this.uint16[u+2]=i,this.uint16[u+3]=n,this.uint16[u+4]=a,this.uint16[u+5]=o,this.uint16[u+6]=s,this.uint16[u+7]=l,e}};mre.prototype.bytesPerElement=16,Ui("StructArrayLayout8ui16",mre);yre=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a,o,s,l,u,c,f,h){let d=this.length;return this.resize(d+1),this.emplace(d,e,t,r,i,n,a,o,s,l,u,c,f,h)}emplace(e,t,r,i,n,a,o,s,l,u,c,f,h,d){let p=e*14,v=e*7;return this.int16[p+0]=t,this.int16[p+1]=r,this.int16[p+2]=i,this.int16[p+3]=n,this.uint16[p+4]=a,this.uint16[p+5]=o,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=u,this.int16[p+9]=c,this.int16[p+10]=f,this.int16[p+11]=h,this.float32[v+6]=d,e}};yre.prototype.bytesPerElement=28,Ui("StructArrayLayout4i4ui4i1f28",yre);xre=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=e*3;return this.float32[n+0]=t,this.float32[n+1]=r,this.float32[n+2]=i,e}};xre.prototype.bytesPerElement=12,Ui("StructArrayLayout3f12",xre);_re=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){let r=e*1;return this.uint32[r+0]=t,e}};_re.prototype.bytesPerElement=4,Ui("StructArrayLayout1ul4",_re);bre=class extends yl{_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(e,t,r,i,n,a,o,s,l){let u=this.length;return this.resize(u+1),this.emplace(u,e,t,r,i,n,a,o,s,l)}emplace(e,t,r,i,n,a,o,s,l,u){let c=e*10,f=e*5;return this.int16[c+0]=t,this.int16[c+1]=r,this.int16[c+2]=i,this.int16[c+3]=n,this.int16[c+4]=a,this.int16[c+5]=o,this.uint32[f+3]=s,this.uint16[c+8]=l,this.uint16[c+9]=u,e}};bre.prototype.bytesPerElement=20,Ui("StructArrayLayout6i1ul2ui20",bre);wre=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=e*6;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=a,this.int16[s+5]=o,e}};wre.prototype.bytesPerElement=12,Ui("StructArrayLayout2i2i2i12",wre);Tre=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n){let a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,i,n)}emplace(e,t,r,i,n,a){let o=e*4,s=e*8;return this.float32[o+0]=t,this.float32[o+1]=r,this.float32[o+2]=i,this.int16[s+6]=n,this.int16[s+7]=a,e}};Tre.prototype.bytesPerElement=16,Ui("StructArrayLayout2f1f2i16",Tre);Are=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=e*16,l=e*4,u=e*8;return this.uint8[s+0]=t,this.uint8[s+1]=r,this.float32[l+1]=i,this.float32[l+2]=n,this.int16[u+6]=a,this.int16[u+7]=o,e}};Are.prototype.bytesPerElement=16,Ui("StructArrayLayout2ub2f2i16",Are);Zz=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=e*3;return this.uint16[n+0]=t,this.uint16[n+1]=r,this.uint16[n+2]=i,e}};Zz.prototype.bytesPerElement=6,Ui("StructArrayLayout3ui6",Zz);Mre=class extends yl{_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(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p,v,m,g){let w=this.length;return this.resize(w+1),this.emplace(w,e,t,r,i,n,a,o,s,l,u,c,f,h,d,p,v,m,g)}emplace(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p,v,m,g,w){let b=e*26,_=e*13,M=e*52;return this.int16[b+0]=t,this.int16[b+1]=r,this.uint16[b+2]=i,this.uint16[b+3]=n,this.uint32[_+2]=a,this.uint32[_+3]=o,this.uint32[_+4]=s,this.uint16[b+10]=l,this.uint16[b+11]=u,this.uint16[b+12]=c,this.float32[_+7]=f,this.float32[_+8]=h,this.uint8[M+36]=d,this.uint8[M+37]=p,this.uint8[M+38]=v,this.uint32[_+10]=m,this.int16[b+22]=g,this.float32[_+12]=w,e}};Mre.prototype.bytesPerElement=52,Ui("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i1f52",Mre);Sre=class extends yl{_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(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p,v,m,g,w,b,_,M,x,T,A,y,E,S,C){let k=this.length;return this.resize(k+1),this.emplace(k,e,t,r,i,n,a,o,s,l,u,c,f,h,d,p,v,m,g,w,b,_,M,x,T,A,y,E,S,C)}emplace(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p,v,m,g,w,b,_,M,x,T,A,y,E,S,C,k){let D=e*34,F=e*17;return this.int16[D+0]=t,this.int16[D+1]=r,this.int16[D+2]=i,this.int16[D+3]=n,this.int16[D+4]=a,this.int16[D+5]=o,this.int16[D+6]=s,this.int16[D+7]=l,this.uint16[D+8]=u,this.uint16[D+9]=c,this.uint16[D+10]=f,this.uint16[D+11]=h,this.uint16[D+12]=d,this.uint16[D+13]=p,this.uint16[D+14]=v,this.uint16[D+15]=m,this.uint16[D+16]=g,this.uint16[D+17]=w,this.uint16[D+18]=b,this.uint16[D+19]=_,this.uint16[D+20]=M,this.uint16[D+21]=x,this.uint16[D+22]=T,this.uint32[F+12]=A,this.float32[F+13]=y,this.float32[F+14]=E,this.uint16[D+30]=S,this.uint16[D+31]=C,this.float32[F+16]=k,e}};Sre.prototype.bytesPerElement=68,Ui("StructArrayLayout8i15ui1ul2f2ui1f68",Sre);Kz=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){let r=e*1;return this.float32[r+0]=t,e}};Kz.prototype.bytesPerElement=4,Ui("StructArrayLayout1f4",Kz);Ere=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=e*6,a=e*3;return this.uint16[n+0]=t,this.float32[a+1]=r,this.float32[a+2]=i,e}};Ere.prototype.bytesPerElement=12,Ui("StructArrayLayout1ui2f12",Ere);kre=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=e*2,a=e*4;return this.uint32[n+0]=t,this.uint16[a+2]=r,this.uint16[a+3]=i,e}};kre.prototype.bytesPerElement=8,Ui("StructArrayLayout1ul2ui8",kre);Cre=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let i=e*2;return this.uint16[i+0]=t,this.uint16[i+1]=r,e}};Cre.prototype.bytesPerElement=4,Ui("StructArrayLayout2ui4",Cre);Dre=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){let r=e*1;return this.uint16[r+0]=t,e}};Dre.prototype.bytesPerElement=2,Ui("StructArrayLayout1ui2",Dre);Fre=class extends yl{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r,i)}emplace(e,t,r,i,n){let a=e*4;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=i,this.float32[a+3]=n,e}};Fre.prototype.bytesPerElement=16,Ui("StructArrayLayout4f16",Fre);Rrt=class extends Qk{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 tr(this.anchorPointX,this.anchorPointY)}};Rrt.prototype.size=20;Xie=class extends bre{get(e){return new Rrt(this,e)}};Ui("CollisionBoxArray",Xie);zrt=class extends Qk{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(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}get heightOffset(){return this._structArray.float32[this._pos4+12]}};zrt.prototype.size=52;Brt=class extends Mre{get(e){return new zrt(this,e)}};Ui("PlacedSymbolArray",Brt);qrt=class extends Qk{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(e){this._structArray.uint32[this._pos4+12]=e}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]}get heightOffset(){return this._structArray.float32[this._pos4+16]}};qrt.prototype.size=68;Ort=class extends Sre{get(e){return new qrt(this,e)}};Ui("SymbolInstanceArray",Ort);Nrt=class extends Kz{getoffsetX(e){return this.float32[e*1+0]}};Ui("GlyphOffsetArray",Nrt);Urt=class extends Xz{getx(e){return this.int16[e*3+0]}gety(e){return this.int16[e*3+1]}gettileUnitDistanceFromAnchor(e){return this.int16[e*3+2]}};Ui("SymbolLineVertexArray",Urt);Vrt=class extends Qk{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]}};Vrt.prototype.size=12;Grt=class extends Ere{get(e){return new Vrt(this,e)}};Ui("TextAnchorOffsetArray",Grt);Hrt=class extends Qk{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]}};Hrt.prototype.size=8;jrt=class extends kre{get(e){return new Hrt(this,e)}};Ui("FeatureIndexArray",jrt);Pm=class extends Dk{},$rt=class extends Xz{},Wrt=class extends dre{},qvr=class extends Dk{},Ovr=class extends Dk{},Nvr=class extends pre{},Uvr=class extends vre{},Vvr=class extends Fk{},sT=class extends gre{},FQe=class extends mre{},Gvr=class extends yre{},Hvr=class extends xre{},jvr=class extends _re{},LQe=class extends wre{},Yrt=class extends Tre{},$vr=class extends Are{},Xrt=class extends Zz{},Mv=class extends Zz{},Lre=class extends Cre{},Zrt=class extends Dre{},Pre=ol([{name:"a_pos",components:2,type:"Int16"}],4),Wvr=Pre.members;Pre.size,Pre.alignment;Ws=class hT{constructor(t=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=t}prepareSegment(t,r,i,n){let a=this.segments[this.segments.length-1];return t>hT.MAX_VERTEX_ARRAY_LENGTH&&Ma(`Max vertices per segment is ${hT.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${hT.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!a||a.vertexLength+t>hT.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==n?this.createNewSegment(r,i,n):a}createNewSegment(t,r,i){let n={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0,vaos:{}};return i!==void 0&&(n.sortKey=i),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(n),n}getOrCreateLatestSegment(t,r,i){return this.prepareSegment(0,t,r,i)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let t of this.segments)for(let r in t.vaos)t.vaos[r].destroy()}static simpleSegment(t,r,i,n){return new hT([{vertexOffset:t,primitiveOffset:r,vertexLength:i,primitiveLength:n,vaos:{},sortKey:0}])}};Ws.MAX_VERTEX_ARRAY_LENGTH=2**16-1,Ui("SegmentVector",Ws);Yvr=ol([{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"}]),Xvr=ol([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]),Zvr=cie(((e,t)=>{function r(i,n){for(var a=i.length&3,o=i.length-a,s=n,l,u=3432918353,c=461845907,f,h=0;h<o;)f=i.charCodeAt(h)&255|(i.charCodeAt(++h)&255)<<8|(i.charCodeAt(++h)&255)<<16|(i.charCodeAt(++h)&255)<<24,++h,f=(f&65535)*u+(((f>>>16)*u&65535)<<16)&4294967295,f=f<<15|f>>>17,f=(f&65535)*c+(((f>>>16)*c&65535)<<16)&4294967295,s^=f,s=s<<13|s>>>19,l=(s&65535)*5+(((s>>>16)*5&65535)<<16)&4294967295,s=(l&65535)+27492+(((l>>>16)+58964&65535)<<16);switch(f=0,a){case 3:f^=(i.charCodeAt(h+2)&255)<<16;case 2:f^=(i.charCodeAt(h+1)&255)<<8;case 1:f^=i.charCodeAt(h)&255,f=(f&65535)*u+(((f>>>16)*u&65535)<<16)&4294967295,f=f<<15|f>>>17,f=(f&65535)*c+(((f>>>16)*c&65535)<<16)&4294967295,s^=f}return s^=i.length,s^=s>>>16,s=(s&65535)*2246822507+(((s>>>16)*2246822507&65535)<<16)&4294967295,s^=s>>>13,s=(s&65535)*3266489909+(((s>>>16)*3266489909&65535)<<16)&4294967295,s^=s>>>16,s>>>0}t!==void 0&&(t.exports=r)})),Kvr=cie(((e,t)=>{function r(i,n){for(var a=i.length,o=n^a,s=0,l;a>=4;)l=i.charCodeAt(s)&255|(i.charCodeAt(++s)&255)<<8|(i.charCodeAt(++s)&255)<<16|(i.charCodeAt(++s)&255)<<24,l=(l&65535)*1540483477+(((l>>>16)*1540483477&65535)<<16),l^=l>>>24,l=(l&65535)*1540483477+(((l>>>16)*1540483477&65535)<<16),o=(o&65535)*1540483477+(((o>>>16)*1540483477&65535)<<16)^l,a-=4,++s;switch(a){case 3:o^=(i.charCodeAt(s+2)&255)<<16;case 2:o^=(i.charCodeAt(s+1)&255)<<8;case 1:o^=i.charCodeAt(s)&255,o=(o&65535)*1540483477+(((o>>>16)*1540483477&65535)<<16)}return o^=o>>>13,o=(o&65535)*1540483477+(((o>>>16)*1540483477&65535)<<16),o^=o>>>15,o>>>0}t.exports=r})),Ire=cdr(cie(((e,t)=>{var r=Zvr(),i=Kvr();t.exports=r,t.exports.murmur3=r,t.exports.murmur2=i}))(),1),Krt=class Jrt{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(t,r,i,n){this.ids.push(IQe(t)),this.positions.push(r,i,n)}getPositions(t){if(!this.indexed)throw Error("Trying to get index, but feature positions are not indexed");let r=IQe(t),i=0,n=this.ids.length-1;for(;i<n;){let o=i+n>>1;this.ids[o]>=r?n=o:i=o+1}let a=[];for(;this.ids[i]===r;){let o=this.positions[3*i],s=this.positions[3*i+1],l=this.positions[3*i+2];a.push({index:o,start:s,end:l}),i++}return a}static serialize(t,r){let i=new Float64Array(t.ids),n=new Uint32Array(t.positions);return Rre(i,n,0,i.length-1),r&&r.push(i.buffer,n.buffer),{ids:i,positions:n}}static deserialize(t){let r=new Jrt;return r.ids=t.ids,r.positions=t.positions,r.indexed=!0,r}};Ui("FeaturePositionMap",Krt);Im=class{constructor(e,t){this.gl=e.gl,this.location=t}},wn=class extends Im{constructor(e,t){super(e,t),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))}},qi=class extends Im{constructor(e,t){super(e,t),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))}},pa=class extends Im{constructor(e,t){super(e,t),this.current=[0,0]}set(e){(e[0]!==this.current[0]||e[1]!==this.current[1])&&(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))}},Rf=class extends Im{constructor(e,t){super(e,t),this.current=[0,0,0]}set(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2])&&(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))}},OT=class extends Im{constructor(e,t){super(e,t),this.current=[0,0,0,0]}set(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2]||e[3]!==this.current[3])&&(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))}},Rm=class extends Im{constructor(e,t){super(e,t),this.current=ea.transparent}set(e){(e.r!==this.current.r||e.g!==this.current.g||e.b!==this.current.b||e.a!==this.current.a)&&(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))}},Zie=class extends Im{constructor(e,t){super(e,t),this.current=[]}set(e){if(e!=this.current){this.current=e;let t=new Float32Array(e.length*4);for(let r=0;r<e.length;r++)t[4*r]=e[r].r,t[4*r+1]=e[r].g,t[4*r+2]=e[r].b,t[4*r+3]=e[r].a;this.gl.uniform4fv(this.location,t)}}},Kie=class extends Im{constructor(e,t){super(e,t),this.current=[]}set(e){if(e!=this.current){this.current=e;let t=new Float32Array(e);this.gl.uniform1fv(this.location,t)}}},Jvr=new Float32Array(16),ep=class extends Im{constructor(e,t){super(e,t),this.current=Jvr}set(e){if(e[12]!==this.current[12]||e[0]!==this.current[0]){this.current=e,this.gl.uniformMatrix4fv(this.location,!1,e);return}for(let t=1;t<16;t++)if(e[t]!==this.current[t]){this.current=e,this.gl.uniformMatrix4fv(this.location,!1,e);break}}};hk=class{constructor(e,t,r){this.value=e,this.uniformNames=t.map(i=>`u_${i}`),this.type=r}setUniform(e,t,r){e.set(r.constantOr(this.value))}getBinding(e,t,r){return this.type==="color"?new Rm(e,t):new qi(e,t)}},zb=class{constructor(e,t){this.uniformNames=t.map(r=>`u_${r}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,t){this.pixelRatioFrom=t.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=t.tlbr,this.patternTo=e.tlbr}setConstantDashPositions(e,t){this.dashTo=[0,e.y,e.height,e.width],this.dashFrom=[0,t.y,t.height,t.width]}setUniform(e,t,r,i){let n=null;i==="u_pattern_to"?n=this.patternTo:i==="u_pattern_from"?n=this.patternFrom:i==="u_dasharray_to"?n=this.dashTo:i==="u_dasharray_from"?n=this.dashFrom:i==="u_pixel_ratio_to"?n=this.pixelRatioTo:i==="u_pixel_ratio_from"&&(n=this.pixelRatioFrom),n!==null&&e.set(n)}getBinding(e,t,r){return r.startsWith("u_pattern")||r.startsWith("u_dasharray_")?new OT(e,t):new qi(e,t)}},xm=class{constructor(e,t,r,i){this.expression=e,this.type=r,this.maxValue=0,this.paintVertexAttributes=t.map(n=>({name:`a_${n}`,type:"Float32",components:r==="color"?2:1,offset:0})),this.paintVertexArray=new i}populatePaintArray(e,t,r){let i=this.paintVertexArray.length,n=this.expression.evaluate(new Co(0,r),t,{},r.canonical,[],r.formattedSection);this.paintVertexArray.resize(e),this._setPaintValue(i,e,n)}updatePaintArray(e,t,r,i,n){let a=this.expression.evaluate(new Co(0,n),r,i);this._setPaintValue(e,t,a)}_setPaintValue(e,t,r){if(this.type==="color"){let i=zre(r);for(let n=e;n<t;n++)this.paintVertexArray.emplace(n,i[0],i[1])}else{for(let i=e;i<t;i++)this.paintVertexArray.emplace(i,r);this.maxValue=Math.max(this.maxValue,Math.abs(r))}}upload(e){var t,r;(t=this.paintVertexArray)!=null&&t.arrayBuffer.byteLength&&((r=this.paintVertexBuffer)!=null&&r.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}},mv=class{constructor(e,t,r,i,n,a){this.expression=e,this.uniformNames=t.map(o=>`u_${o}_t`),this.type=r,this.useIntegerZoom=i,this.zoom=n,this.maxValue=0,this.paintVertexAttributes=t.map(o=>({name:`a_${o}`,type:"Float32",components:r==="color"?4:2,offset:0})),this.paintVertexArray=new a}populatePaintArray(e,t,r){let i=this.expression.evaluate(new Co(this.zoom,r),t,{},r.canonical,[],r.formattedSection),n=this.expression.evaluate(new Co(this.zoom+1,r),t,{},r.canonical,[],r.formattedSection),a=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(a,e,i,n)}updatePaintArray(e,t,r,i,n){let a=this.expression.evaluate(new Co(this.zoom,n),r,i),o=this.expression.evaluate(new Co(this.zoom+1,n),r,i);this._setPaintValue(e,t,a,o)}_setPaintValue(e,t,r,i){if(this.type==="color"){let n=zre(r),a=zre(i);for(let o=e;o<t;o++)this.paintVertexArray.emplace(o,n[0],n[1],a[0],a[1])}else{for(let n=e;n<t;n++)this.paintVertexArray.emplace(n,r,i);this.maxValue=Math.max(this.maxValue,Math.abs(r),Math.abs(i))}}upload(e){var t,r;(t=this.paintVertexArray)!=null&&t.arrayBuffer.byteLength&&((r=this.paintVertexBuffer)!=null&&r.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(e,t){let r=this.useIntegerZoom?Math.floor(t.zoom):t.zoom,i=Jn(this.expression.interpolationFactor(r,this.zoom,this.zoom+1),0,1);e.set(i)}getBinding(e,t,r){return new qi(e,t)}},j2=class{constructor(e,t,r,i,n,a){this.expression=e,this.type=t,this.useIntegerZoom=r,this.zoom=i,this.layerId=a,this.zoomInPaintVertexArray=new n,this.zoomOutPaintVertexArray=new n}populatePaintArray(e,t,r){let i=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(e),this.zoomOutPaintVertexArray.resize(e),this._setPaintValues(i,e,this.getPositionIds(t),r)}updatePaintArray(e,t,r,i,n){this._setPaintValues(e,t,this.getPositionIds(r),n)}_setPaintValues(e,t,r,i){let n=this.getPositions(i);if(!n||!r)return;let a=n[r.min],o=n[r.mid],s=n[r.max];if(a&&o&&s)for(let l=e;l<t;l++)this.emplace(this.zoomInPaintVertexArray,l,a,o),this.emplace(this.zoomOutPaintVertexArray,l,s,o)}upload(e){var t,r;if((t=this.zoomInPaintVertexArray)!=null&&t.arrayBuffer.byteLength&&((r=this.zoomOutPaintVertexArray)!=null&&r.arrayBuffer.byteLength)){let i=this.getVertexAttributes();this.zoomInPaintVertexBuffer=e.createVertexBuffer(this.zoomInPaintVertexArray,i,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=e.createVertexBuffer(this.zoomOutPaintVertexArray,i,this.expression.isStateDependent)}}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}},Qrt=class extends j2{getPositions(e){return e.imagePositions}getPositionIds(e){var t;return(t=e.patterns)==null?void 0:t[this.layerId]}getVertexAttributes(){return Yvr.members}emplace(e,t,r,i){e.emplace(t,r.tlbr[0],r.tlbr[1],r.tlbr[2],r.tlbr[3],i.tlbr[0],i.tlbr[1],i.tlbr[2],i.tlbr[3],r.pixelRatio,i.pixelRatio)}},eit=class extends j2{getPositions(e){return e.dashPositions}getPositionIds(e){var t;return(t=e.dashes)==null?void 0:t[this.layerId]}getVertexAttributes(){return Xvr.members}emplace(e,t,r,i){e.emplace(t,0,r.y,r.height,r.width,0,i.y,i.height,i.width)}},tit=class{constructor(e,t,r){this.binders={},this._buffers=[];let i=[];for(let n in e.paint._values){if(!r(n))continue;let a=e.paint.get(n);if(!(a instanceof Yd)||!ET(a.property.specification))continue;let o=Qvr(n,e.type),s=a.value,l=a.property.specification.type,u=a.property.useIntegerZoom,c=a.property.specification["property-type"],f=c==="cross-faded"||c==="cross-faded-data-driven";if(s.kind==="constant")this.binders[n]=f?new zb(s.value,o):new hk(s.value,o,l),i.push(`/u_${n}`);else if(s.kind==="source"||f){let h=RQe(n,l,"source");this.binders[n]=f?n==="line-dasharray"?new eit(s,l,u,t,h,e.id):new Qrt(s,l,u,t,h,e.id):new xm(s,o,l,h),i.push(`/a_${n}`)}else{let h=RQe(n,l,"composite");this.binders[n]=new mv(s,o,l,u,t,h),i.push(`/z_${n}`)}}this.cacheKey=i.sort().join("")}getMaxValue(e){let t=this.binders[e];return t instanceof xm||t instanceof mv?t.maxValue:0}populatePaintArrays(e,t,r){for(let i in this.binders){let n=this.binders[i];(n instanceof xm||n instanceof mv||n instanceof j2)&&n.populatePaintArray(e,t,r)}}setConstantPatternPositions(e,t){for(let r in this.binders){let i=this.binders[r];i instanceof zb&&i.setConstantPatternPositions(e,t)}}setConstantDashPositions(e,t){for(let r in this.binders){let i=this.binders[r];i instanceof zb&&i.setConstantDashPositions(e,t)}}updatePaintArrays(e,t,r,i,n){let a=!1;for(let o of e){let s=t.getPositions(o.id);for(let l of s){let u=r.feature(l.index);for(let c in this.binders){let f=this.binders[c];(f instanceof xm||f instanceof mv||f instanceof j2)&&f.expression.isStateDependent===!0&&(f.expression=i.paint.get(c).value,f.updatePaintArray(l.start,l.end,u,o.state,n),a=!0)}}}return a}defines(){let e=[];for(let t in this.binders){let r=this.binders[t];(r instanceof hk||r instanceof zb)&&e.push(...r.uniformNames.map(i=>`#define HAS_UNIFORM_${i}`))}return e}getBinderAttributes(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof xm||r instanceof mv)for(let i of r.paintVertexAttributes)e.push(i.name);else if(r instanceof j2){let i=r.getVertexAttributes();for(let n of i)e.push(n.name)}}return e}getBinderUniforms(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof hk||r instanceof zb||r instanceof mv)for(let i of r.uniformNames)e.push(i)}return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,t){let r=[];for(let i in this.binders){let n=this.binders[i];if(n instanceof hk||n instanceof zb||n instanceof mv){for(let a of n.uniformNames)if(t[a]){let o=n.getBinding(e,t[a],a);r.push({name:a,property:i,binding:o})}}}return r}setUniforms(e,t,r,i){for(let{name:n,property:a,binding:o}of t)this.binders[a].setUniform(o,i,r.get(a),n)}updatePaintBuffers(e){this._buffers=[];for(let t in this.binders){let r=this.binders[t];if(e&&r instanceof j2){let i=e.fromScale===2?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;i&&this._buffers.push(i)}else(r instanceof xm||r instanceof mv)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}}upload(e){for(let t in this.binders){let r=this.binders[t];(r instanceof xm||r instanceof mv||r instanceof j2)&&r.upload(e)}this.updatePaintBuffers()}destroy(){for(let e in this.binders){let t=this.binders[e];(t instanceof xm||t instanceof mv||t instanceof j2)&&t.destroy()}}},$b=class{constructor(e,t,r=()=>!0){this.programConfigurations={};for(let i of e)this.programConfigurations[i.id]=new tit(i,t,r);this.needsUpload=!1,this._featureMap=new Krt,this._bufferOffset=0}populatePaintArrays(e,t,r,i){for(let n in this.programConfigurations)this.programConfigurations[n].populatePaintArrays(e,t,i);t.id!==void 0&&this._featureMap.add(t.id,r,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,r,i){for(let n of r)this.needsUpload=this.programConfigurations[n.id].updatePaintArrays(e,this._featureMap,t,n,i)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(let t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(let e in this.programConfigurations)this.programConfigurations[e].destroy()}};Ui("ConstantBinder",hk),Ui("CrossFadedConstantBinder",zb),Ui("SourceExpressionBinder",xm),Ui("CrossFadedPatternBinder",Qrt),Ui("CrossFadedDasharrayBinder",eit),Ui("CompositeExpressionBinder",mv),Ui("ProgramConfiguration",tit,{omit:["_buffers"]}),Ui("ProgramConfigurationSet",$b);Bre=2**14-1,zQe=-Bre-1;BQe=-32768;Jie=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(t=>t.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new qvr,this.indexArray=new Mv,this.segments=new Ws,this.programConfigurations=new $b(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id)}populate(e,t,r){let i=this.layers[0],n=[],a=null,o=!1,s=i.type==="heatmap";if(i.type==="circle"){let f=i;a=f.layout.get("circle-sort-key"),o=!a.isConstant(),s||(s=f.paint.get("circle-pitch-alignment")==="map")}let l=s?t.subdivisionGranularity.circle:1,u=new Co(this.zoom),c=this.layers[0]._featureFilter.needGeometry;for(let{feature:f,id:h,index:d,sourceLayerIndex:p}of e){let v=tx(f,c);if(!this.layers[0]._featureFilter.filter(u,v,r))continue;let m=o?a.evaluate(v,{},r):void 0,g={id:h,properties:f.properties,type:f.type,sourceLayerIndex:p,index:d,geometry:c?v.geometry:Qb(f),patterns:{},sortKey:m};n.push(g)}o&&n.sort((f,h)=>f.sortKey-h.sortKey);for(let f of n){let{geometry:h,index:d,sourceLayerIndex:p}=f,v=e[d].feature;this.addFeature(f,h,d,r,l),t.featureIndex.insert(v,h,d,p,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}addFeatures(e){}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Wvr),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,t,r,i,n=1){let a;switch(n){case 1:a=[0,7];break;case 3:a=[0,2,5,7];break;case 5:a=[0,1,3,4,6,7];break;case 7:a=[0,1,2,3,4,5,6,7];break;default:throw Error(`Invalid circle bucket granularity: ${n}; valid values are 1, 3, 5, 7.`)}let o=a.length;for(let s of t)for(let l of s){let u=l.x,c=l.y;if(u<0||u>=8192||c<0||c>=8192)continue;let f=this.segments.prepareSegment(o*o,this.layoutVertexArray,this.indexArray,e.sortKey),h=f.vertexLength;for(let d=0;d<o;d++)for(let p=0;p<o;p++)t1r(this.layoutVertexArray,u,c,a[p],a[d]);for(let d=0;d<o-1;d++)for(let p=0;p<o-1;p++){let v=h+d*o+p,m=h+(d+1)*o+p;this.indexArray.emplaceBack(v,m+1,v+1),this.indexArray.emplaceBack(v,m,m+1)}f.vertexLength+=o*o,f.primitiveLength+=(o-1)*(o-1)*2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:{},canonical:i})}};Ui("CircleBucket",Jie,{omit:["layers"]});v1r=()=>p1r||(p1r=new uc({"circle-sort-key":new Sn(_r.layout_circle["circle-sort-key"],"circle-sort-key")})),m1r=()=>g1r||(g1r=new uc({"circle-radius":new Sn(_r.paint_circle["circle-radius"],"circle-radius"),"circle-color":new Sn(_r.paint_circle["circle-color"],"circle-color"),"circle-blur":new Sn(_r.paint_circle["circle-blur"],"circle-blur"),"circle-opacity":new Sn(_r.paint_circle["circle-opacity"],"circle-opacity"),"circle-translate":new Fi(_r.paint_circle["circle-translate"],"circle-translate"),"circle-translate-anchor":new Fi(_r.paint_circle["circle-translate-anchor"],"circle-translate-anchor"),"circle-pitch-scale":new Fi(_r.paint_circle["circle-pitch-scale"],"circle-pitch-scale"),"circle-pitch-alignment":new Fi(_r.paint_circle["circle-pitch-alignment"],"circle-pitch-alignment"),"circle-stroke-width":new Sn(_r.paint_circle["circle-stroke-width"],"circle-stroke-width"),"circle-stroke-color":new Sn(_r.paint_circle["circle-stroke-color"],"circle-stroke-color"),"circle-stroke-opacity":new Sn(_r.paint_circle["circle-stroke-opacity"],"circle-stroke-opacity")})),y1r={get paint(){return m1r()},get layout(){return v1r()}},ait=e=>e.type==="circle",x1r=class extends Av{constructor(e,t){super(e,y1r,t)}createBucket(e){return new Jie(e)}queryRadius(e){let t=e;return yT("circle-radius",this,t)+yT("circle-stroke-width",this,t)+OB(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,unwrappedTileID:o,getElevation:s}){let l=NB(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-n.bearingInRadians,a),u=this.paint.get("circle-radius").evaluate(t,r)+this.paint.get("circle-stroke-width").evaluate(t,r),c=this.paint.get("circle-pitch-scale"),f=this.paint.get("circle-pitch-alignment"),h,d;return f==="map"?(h=l,d=u*a):(h=d1r(l,n,o,s),d=u),nit({queryGeometry:h,size:d,transform:n,unwrappedTileID:o,getElevation:s,pitchAlignment:f,pitchScale:c},i)}},oit=class extends Jie{};Ui("HeatmapBucket",oit,{omit:["layers"]});b1r=()=>_1r||(_1r=new uc({"heatmap-radius":new Sn(_r.paint_heatmap["heatmap-radius"],"heatmap-radius"),"heatmap-weight":new Sn(_r.paint_heatmap["heatmap-weight"],"heatmap-weight"),"heatmap-intensity":new Fi(_r.paint_heatmap["heatmap-intensity"],"heatmap-intensity"),"heatmap-color":new zB(_r.paint_heatmap["heatmap-color"],"heatmap-color"),"heatmap-opacity":new Fi(_r.paint_heatmap["heatmap-opacity"],"heatmap-opacity")})),w1r={get paint(){return b1r()}};UB=class lit{constructor(t,r){rne(this,t,1,r)}resize(t){sit(this,t,1)}clone(){return new lit({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,r,i,n,a){ine(t,r,i,n,a,1)}},As=class uit{constructor(t,r){rne(this,t,4,r)}resize(t){sit(this,t,4)}replace(t,r){r?this.data.set(t):this.data=t instanceof Uint8ClampedArray?new Uint8Array(t.buffer):t}clone(){return new uit({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,r,i,n,a){ine(t,r,i,n,a,4)}setPixel(t,r,i){let n=(t*this.width+r)*4;this.data[n+0]=Math.round(i.r*255/i.a),this.data[n+1]=Math.round(i.g*255/i.a),this.data[n+2]=Math.round(i.b*255/i.a),this.data[n+3]=Math.round(i.a*255)}};Ui("AlphaImage",UB),Ui("RGBAImage",As);e8="big-fb",cit=e=>e.type==="heatmap",T1r=class extends Av{createBucket(e){return new oit(e)}constructor(e,t){super(e,w1r,t),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(e){e==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){let e=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=nne({expression:e,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has("big-fb")&&this.heatmapFbos.delete(e8)}queryRadius(e){return yT("heatmap-radius",this,e)}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,unwrappedTileID:o,getElevation:s}){return nit({queryGeometry:e,size:this.paint.get("heatmap-radius").evaluate(t,r)*a,transform:n,unwrappedTileID:o,getElevation:s},i)}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&!this.isHidden()}},M1r=()=>A1r||(A1r=new uc({"hillshade-illumination-direction":new Fi(_r.paint_hillshade["hillshade-illumination-direction"],"hillshade-illumination-direction"),"hillshade-illumination-altitude":new Fi(_r.paint_hillshade["hillshade-illumination-altitude"],"hillshade-illumination-altitude"),"hillshade-illumination-anchor":new Fi(_r.paint_hillshade["hillshade-illumination-anchor"],"hillshade-illumination-anchor"),"hillshade-exaggeration":new Fi(_r.paint_hillshade["hillshade-exaggeration"],"hillshade-exaggeration"),"hillshade-shadow-color":new Fi(_r.paint_hillshade["hillshade-shadow-color"],"hillshade-shadow-color"),"hillshade-highlight-color":new Fi(_r.paint_hillshade["hillshade-highlight-color"],"hillshade-highlight-color"),"hillshade-accent-color":new Fi(_r.paint_hillshade["hillshade-accent-color"],"hillshade-accent-color"),"hillshade-method":new Fi(_r.paint_hillshade["hillshade-method"],"hillshade-method"),resampling:new Fi(_r.paint_hillshade.resampling,"resampling")})),S1r={get paint(){return M1r()}},fit=e=>e.type==="hillshade",E1r=class extends Av{constructor(e,t){super(e,S1r,t),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let e=this.paint.get("hillshade-illumination-direction").values,t=this.paint.get("hillshade-illumination-altitude").values,r=this.paint.get("hillshade-highlight-color").values,i=this.paint.get("hillshade-shadow-color").values,n=Math.max(e.length,t.length,r.length,i.length);e=e.concat(Array(n-e.length).fill(e.at(-1))),t=t.concat(Array(n-t.length).fill(t.at(-1))),r=r.concat(Array(n-r.length).fill(r.at(-1))),i=i.concat(Array(n-i.length).fill(i.at(-1)));let a=t.map(js);return{directionRadians:e.map(js),altitudeRadians:a,shadowColor:i,highlightColor:r}}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&!this.isHidden()}},C1r=()=>k1r||(k1r=new uc({"color-relief-opacity":new Fi(_r["paint_color-relief"]["color-relief-opacity"],"color-relief-opacity"),"color-relief-color":new zB(_r["paint_color-relief"]["color-relief-color"],"color-relief-color"),resampling:new Fi(_r["paint_color-relief"].resampling,"resampling")})),D1r={get paint(){return C1r()}};vu=class{constructor(e,t,r,i){this.context=e,this.format=r,this.texture=e.gl.createTexture(),this._ownedHandle=this.texture,this.update(t,i)}update(e,t,r){var u;let{width:i,height:n}=e,a=(((u=this.size)==null?void 0:u[0])!==i||this.size[1]!==n)&&!r,{context:o}=this,{gl:s}=o;this.useMipmap=!!(t!=null&&t.useMipmap),a&&this.size&&this.format===s.RGBA&&(s.deleteTexture(this.texture),this.texture=s.createTexture(),this._ownedHandle=this.texture,this.magFilter=void 0,this.minFilter=void 0,this.wrap=void 0),s.bindTexture(s.TEXTURE_2D,this.texture),o.pixelStoreUnpackFlipY.set(!1),o.pixelStoreUnpack.set(1);let l=this.format===s.RGBA&&(t==null?void 0:t.premultiply)!==!1;if(a)if(this.size=[i,n],this.format===s.RGBA&&i>0&&n>0){let c=this.useMipmap?Math.floor(Math.log2(Math.max(i,n)))+1:1;if(s.texStorage2D(s.TEXTURE_2D,c,s.RGBA8,i,n),wz(e)){o.pixelStoreUnpackPremultiplyAlpha.set(!1);let{data:f}=e;l&&f&&(f=Yte(f)),f&&s.texSubImage2D(s.TEXTURE_2D,0,0,0,i,n,s.RGBA,s.UNSIGNED_BYTE,f)}else o.pixelStoreUnpackPremultiplyAlpha.set(l),s.texSubImage2D(s.TEXTURE_2D,0,0,0,s.RGBA,s.UNSIGNED_BYTE,e)}else wz(e)?(o.pixelStoreUnpackPremultiplyAlpha.set(!1),this._uploadRawData(e,l,i,n,s)):(o.pixelStoreUnpackPremultiplyAlpha.set(l),this._uploadDomImage(e,s));else{let{x:c,y:f}=r||{x:0,y:0};wz(e)?(o.pixelStoreUnpackPremultiplyAlpha.set(!1),this._updateRawData(e,l,c,f,i,n,s)):(o.pixelStoreUnpackPremultiplyAlpha.set(l),this._updateDomImage(e,c,f,s))}this.useMipmap&&!(wz(e)&&e.data===null)&&s.generateMipmap(s.TEXTURE_2D),o.pixelStoreUnpackFlipY.setDefault(),o.pixelStoreUnpack.setDefault(),o.pixelStoreUnpackPremultiplyAlpha.setDefault()}_uploadDomImage(e,t){t.texImage2D(t.TEXTURE_2D,0,this.format,this.format,t.UNSIGNED_BYTE,e)}_uploadRawData(e,t,r,i,n){let{data:a}=e;t&&a&&(a=Yte(a)),n.texImage2D(n.TEXTURE_2D,0,this.format,r,i,0,this.format,n.UNSIGNED_BYTE,a)}_updateDomImage(e,t,r,i){i.texSubImage2D(i.TEXTURE_2D,0,t,r,i.RGBA,i.UNSIGNED_BYTE,e)}_updateRawData(e,t,r,i,n,a,o){let{data:s}=e;t&&s&&(s=Yte(s)),o.texSubImage2D(o.TEXTURE_2D,0,r,i,n,a,o.RGBA,o.UNSIGNED_BYTE,s)}bind(e,t,r){let{context:i}=this,{gl:n}=i;this.texture!==this._ownedHandle&&(this.texture=this._ownedHandle),n.bindTexture(n.TEXTURE_2D,this.texture),(r===n.LINEAR_MIPMAP_NEAREST||r===n.LINEAR_MIPMAP_LINEAR)&&!this.useMipmap&&(r=n.LINEAR);let a=r||e;e!==this.magFilter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,e),this.magFilter=e),a!==this.minFilter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,a),this.minFilter=a),t!==this.wrap&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,t),this.wrap=t)}generateMipmap(){if(!this.useMipmap)return;let{gl:e}=this.context;e.bindTexture(e.TEXTURE_2D,this.texture),e.generateMipmap(e.TEXTURE_2D)}destroy(){let{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null,this._ownedHandle=null}},F1r=(Am=class{constructor(t,r,i,n=1,a=1,o=1,s=0){if(this.uid=t,r.height!==r.width)throw RangeError("DEM tiles must be square");if(i&&!["mapbox","terrarium","custom"].includes(i)){Ma(`"${i}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);return}this.stride=r.height;let l=this.dim=r.height-4;switch(this.data=new Uint32Array(r.data.buffer),Am.byteViewCache.set(this,new Uint8Array(this.data.buffer)),i){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=n,this.greenFactor=a,this.blueFactor=o,this.baseShift=s;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let c=-2;c<l+2;c++){let f=this._idx(0,Math.max(0,Math.min(l-1,c)));(c<0||c>=l)&&this.data.copyWithin(this._idx(0,c),f,f+l),this.data.fill(this.data[f],this._idx(-2,c),this._idx(0,c)),this.data.fill(this.data[f+l-1],this._idx(l,c),this._idx(l+1,c)+1)}let u=this._getByteView();this.min=2**53-1,this.max=-(2**53-1);for(let c=0;c<l;c++)for(let f=0;f<l;f++){let h=this._idx(c,f)*4,d=this._unpackAtIndex(u,h);d>this.max&&(this.max=d),d<this.min&&(this.min=d)}}get(t,r){let i=this._getByteView(),n=this._idx(t,r)*4;return this._unpackAtIndex(i,n)}sampleBilinear(t,r){let i=Math.floor(t),n=Math.floor(r);if(i<-1||i>=this.dim||n<-1||n>=this.dim)throw RangeError(`Out of range source coordinates for DEM data. x: ${t}, y: ${r}, dim: ${this.dim}`);let a=this._getByteView(),o=((n+2)*this.stride+i+2)*4,s=this.stride*4,l=t-i,u=r-n,c=this._unpackAtIndex(a,o),f=this._unpackAtIndex(a,o+4),h=this._unpackAtIndex(a,o+s),d=this._unpackAtIndex(a,o+s+4);return c*(1-l)*(1-u)+f*l*(1-u)+h*(1-l)*u+d*l*u}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(t,r){if(t<-2||t>=this.dim+2||r<-2||r>=this.dim+2)throw RangeError(`Out of range source coordinates for DEM data. x: ${t}, y: ${r}, dim: ${this.dim}`);return(r+2)*this.stride+(t+2)}unpack(t,r,i){return t*this.redFactor+r*this.greenFactor+i*this.blueFactor-this.baseShift}pack(t){return hit(t,this.getUnpackVector())}getPixels(){return new As({width:this.stride,height:this.stride},this._getByteView())}backfillBorder(t,r,i){if(this.dim!==t.dim)throw Error("dem dimension mismatch");let n=r*this.dim,a=r*this.dim+this.dim,o=i*this.dim,s=i*this.dim+this.dim;switch(r){case-1:n=a-2;break;case 1:a=n+2}switch(i){case-1:o=s-2;break;case 1:s=o+2}let l=-r*this.dim,u=-i*this.dim;for(let c=o;c<s;c++)for(let f=n;f<a;f++)this.data[this._idx(f,c)]=t.data[this._idx(f+l,c+u)]}_getByteView(){let t=Am.byteViewCache.get(this);return(t==null?void 0:t.buffer)!==this.data.buffer&&(t=new Uint8Array(this.data.buffer),Am.byteViewCache.set(this,t)),t}_unpackAtIndex(t,r){return this.unpack(t[r],t[r+1],t[r+2])}},Am.byteViewCache=new WeakMap,Am);Ui("DEMData",F1r);dit=e=>e.type==="color-relief",L1r=class extends Av{constructor(e,t){super(e,D1r,t)}_createColorRamp(e){let t={elevationStops:[],colorStops:[]},r=this._transitionablePaint._values["color-relief-color"].value.expression;if(r instanceof Ek&&r._styleExpression.expression instanceof Zd){this.colorRampExpression=r;let a=r._styleExpression.expression;t.elevationStops=a.labels,t.colorStops=[];for(let o of t.elevationStops)t.colorStops.push(a.evaluate({globals:{elevation:o}}))}if(t.elevationStops.length<1&&(t.elevationStops=[0],t.colorStops=[ea.transparent]),t.elevationStops.length<2&&(t.elevationStops.push(t.elevationStops[0]+1),t.colorStops.push(t.colorStops[0])),t.elevationStops.length<=e)return t;let i={elevationStops:[],colorStops:[]},n=(t.elevationStops.length-1)/(e-1);for(let a=0;a<t.elevationStops.length-.5;a+=n)i.elevationStops.push(t.elevationStops[Math.round(a)]),i.colorStops.push(t.colorStops[Math.round(a)]);return Ma(`Too many colors in specification of ${this.id} color-relief layer, may not render properly. Max possible colors: ${e}, provided: ${t.elevationStops.length}`),i}_colorRampChanged(){return this.colorRampExpression!=this._transitionablePaint._values["color-relief-color"].value.expression}getColorRampTextures(e,t,r){if(this.colorRampTextures&&!this._colorRampChanged())return this.colorRampTextures;let i=this._createColorRamp(t),n=new As({width:i.colorStops.length,height:1}),a=new As({width:i.colorStops.length,height:1});for(let o=0;o<i.elevationStops.length;o++){let s=hit(i.elevationStops[o],r);a.setPixel(0,o,new ea(s.r/255,s.g/255,s.b/255,1)),n.setPixel(0,o,i.colorStops[o])}return this.colorRampTextures={elevationTexture:new vu(e,a,e.gl.RGBA),colorTexture:new vu(e,n,e.gl.RGBA)},this.colorRampTextures}hasOffscreenPass(){return!this.isHidden()&&!!this.colorRampTextures}},Ore=ol([{name:"a_pos",components:2,type:"Int16"}],4),P1r=Ore.members;Ore.size,Ore.alignment;Lk=new Set,Nre=!1;Vre=!1;Kl=new Float64Array,Qz=0,Gre=[],Hre=[];Wd=[],ik=[],Ib=new Uint32Array,nk=new Uint32Array,ak=new Uint32Array(256);W1=class{constructor(e,t){if(t>e)throw Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=e,this._minGranularity=t}getGranularityForZoomLevel(e){let t=1<<e;return Math.max(Math.floor(this._baseZoomGranularity/t),this._minGranularity,1)}},VB=(Gb=class{constructor(t){this.fill=t.fill,this.line=t.line,this.tile=t.tile,this.stencil=t.stencil,this.circle=t.circle}},Gb.noSubdivision=new Gb({fill:new W1(0,0),line:new W1(0,0),tile:new W1(0,0),stencil:new W1(0,0),circle:1}),Gb);Ui("SubdivisionGranularityExpression",W1),Ui("SubdivisionGranularitySetting",VB);xT=-32768,_T=32767,Q1r=class{constructor(e,t){this._vertexBuffer=[],this._vertexDictionary=new Map,this._used=!1,this._granularity=e,this._granularityCellSize=zr/e,this._canonical=t}_getKey(e,t){return e+=32768,t+=32768,e<<16|t<<0}_vertexToIndex(e,t){if(e<-32768||t<-32768||e>32767||t>32767)throw Error("Vertex coordinates are out of signed 16 bit integer range.");let r=Math.round(e)|0,i=Math.round(t)|0,n=this._getKey(r,i);if(this._vertexDictionary.has(n))return this._vertexDictionary.get(n);let a=this._vertexBuffer.length/2;return this._vertexDictionary.set(n,a),this._vertexBuffer.push(r,i),a}_subdivideTrianglesScanline(e){if(this._granularity<2)return tgr(this._vertexBuffer,e);let t=[],r=e.length;for(let i=0;i<r;i+=3){let n=[e[i+0],e[i+1],e[i+2]],a=[this._vertexBuffer[e[i+0]*2+0],this._vertexBuffer[e[i+0]*2+1],this._vertexBuffer[e[i+1]*2+0],this._vertexBuffer[e[i+1]*2+1],this._vertexBuffer[e[i+2]*2+0],this._vertexBuffer[e[i+2]*2+1]],o=1/0,s=1/0,l=-1/0,u=-1/0;for(let p=0;p<3;p++){let v=a[p*2],m=a[p*2+1];o=Math.min(o,v),l=Math.max(l,v),s=Math.min(s,m),u=Math.max(u,m)}if(o===l||s===u)continue;let c=Math.floor(o/this._granularityCellSize),f=Math.ceil(l/this._granularityCellSize),h=Math.floor(s/this._granularityCellSize),d=Math.ceil(u/this._granularityCellSize);if(c===f&&h===d){t.push(...n);continue}for(let p=h;p<d;p++){let v=this._scanlineGenerateVertexRingForCellRow(p,a,n);rgr(this._vertexBuffer,v,t)}}return t}_scanlineGenerateVertexRingForCellRow(e,t,r){let i=e*this._granularityCellSize,n=i+this._granularityCellSize,a=[];for(let o=0;o<3;o++){let s=t[o*2],l=t[o*2+1],u=t[(o+1)*2%6],c=t[((o+1)*2+1)%6],f=t[(o+2)*2%6],h=t[((o+2)*2+1)%6],d=u-s,p=c-l,v=d===0,m=p===0,g=(i-l)/p,w=(n-l)/p,b=Math.min(g,w),_=Math.max(g,w);if(!m&&(b>=1||_<=0)||m&&(l<i||l>n)){c>=i&&c<=n&&a.push(r[(o+1)%3]);continue}if(!m&&b>0){let T=s+d*b,A=l+p*b;a.push(this._vertexToIndex(T,A))}let M=s+d*Math.max(b,0),x=s+d*Math.min(_,1);if(v||this._generateIntraEdgeVertices(a,s,l,u,c,M,x),!m&&_<1){let T=s+d*_,A=l+p*_;a.push(this._vertexToIndex(T,A))}(m||c>=i&&c<=n)&&a.push(r[(o+1)%3]),!m&&(c<=i||c>=n)&&this._generateInterEdgeVertices(a,s,l,u,c,f,h,x,i,n)}return a}_generateIntraEdgeVertices(e,t,r,i,n,a,o){let s=i-t,l=n-r,u=l===0,c=u?Math.min(t,i):Math.min(a,o),f=u?Math.max(t,i):Math.max(a,o),h=Math.floor(c/this._granularityCellSize)+1,d=Math.ceil(f/this._granularityCellSize)-1;if(u?t<i:a<o)for(let p=h;p<=d;p++){let v=p*this._granularityCellSize,m=r+l*(v-t)/s;e.push(this._vertexToIndex(v,m))}else for(let p=d;p>=h;p--){let v=p*this._granularityCellSize,m=r+l*(v-t)/s;e.push(this._vertexToIndex(v,m))}}_generateInterEdgeVertices(e,t,r,i,n,a,o,s,l,u){let c=n-r,f=a-i,h=o-n,d=(l-n)/h,p=(u-n)/h,v=Math.min(d,p),m=Math.max(d,p),g=i+f*v,w=Math.floor(Math.min(g,s)/this._granularityCellSize)+1,b=Math.ceil(Math.max(g,s)/this._granularityCellSize)-1,_=s<g,M=h===0;if(M&&(o===l||o===u))return;if(M||v>=1||m<=0){let T=t-a,A=r-o,y=(l-o)/A,E=(u-o)/A,S=a+T*Math.min(y,E);w=Math.floor(Math.min(S,s)/this._granularityCellSize)+1,b=Math.ceil(Math.max(S,s)/this._granularityCellSize)-1,_=s<S}let x=c>0?u:l;if(_)for(let T=w;T<=b;T++){let A=T*this._granularityCellSize;e.push(this._vertexToIndex(A,x))}else for(let T=b;T>=w;T--){let A=T*this._granularityCellSize;e.push(this._vertexToIndex(A,x))}}_generateOutline(e){let t=[];for(let r of e){let i=qb(r,this._granularity,!0),n=this._pointArrayToIndices(i),a=[];for(let o=1;o<n.length;o++)a.push(n[o-1]),a.push(n[o]);t.push(a)}return t}_handlePoles(e){let t=!1,r=!1;this._canonical&&(this._canonical.y===0&&(t=!0),this._canonical.y===(1<<this._canonical.z)-1&&(r=!0)),(t||r)&&this._fillPoles(e,t,r)}_ensureNoPoleVertices(){let e=this._vertexBuffer;for(let t=0;t<e.length;t+=2){let r=e[t+1];r===-32768&&(e[t+1]=-32767),r===32767&&(e[t+1]=32766)}}_generatePoleQuad(e,t,r,i,n,a){i>n==(a===-32768)?(e.push(r),e.push(t),e.push(this._vertexToIndex(i,a)),e.push(this._vertexToIndex(n,a)),e.push(r),e.push(this._vertexToIndex(i,a))):(e.push(t),e.push(r),e.push(this._vertexToIndex(i,a)),e.push(r),e.push(this._vertexToIndex(n,a)),e.push(this._vertexToIndex(i,a)))}_fillPoles(e,t,r){let i=this._vertexBuffer,n=zr,a=e.length;for(let o=2;o<a;o+=3){let s=e[o-2],l=e[o-1],u=e[o],c=i[s*2],f=i[s*2+1],h=i[l*2],d=i[l*2+1],p=i[u*2],v=i[u*2+1];t&&(f===0&&d===0&&this._generatePoleQuad(e,s,l,c,h,xT),d===0&&v===0&&this._generatePoleQuad(e,l,u,h,p,xT),v===0&&f===0&&this._generatePoleQuad(e,u,s,p,c,xT)),r&&(f===n&&d===n&&this._generatePoleQuad(e,s,l,c,h,_T),d===n&&v===n&&this._generatePoleQuad(e,l,u,h,p,_T),v===n&&f===n&&this._generatePoleQuad(e,u,s,p,c,_T))}}_initializeVertices(e){for(let t=0;t<e.length;t+=2)this._vertexToIndex(e[t],e[t+1])}subdividePolygonInternal(e,t){var o;if(this._used)throw Error("Subdivision: multiple use not allowed.");this._used=!0;let{flattened:r,holeIndices:i}=egr(e);this._initializeVertices(r);let n;try{let s=I1r(r,i),l=this._convertIndices(r,s);n=this._subdivideTrianglesScanline(l)}catch(s){console.error(s)}let a=[];return t&&(a=this._generateOutline(e)),this._ensureNoPoleVertices(),this._handlePoles(n),this._granularity>=2&&((o=this._canonical)==null?void 0:o.z)===0&&(n=this._removeTrianglesOutsideTileX(n),a=a.map(s=>this._removeLinesOutsideTileX(s))),{verticesFlattened:this._vertexBuffer,indicesTriangles:n,indicesLineList:a}}_vertexOutsideTileX(e){let t=this._vertexBuffer[e*2];return t<0||t>8192}_removeTrianglesOutsideTileX(e){let t=[];for(let r=0;r<e.length;r+=3)this._vertexOutsideTileX(e[r])||this._vertexOutsideTileX(e[r+1])||this._vertexOutsideTileX(e[r+2])||t.push(e[r],e[r+1],e[r+2]);return t}_removeLinesOutsideTileX(e){let t=[];for(let r=0;r<e.length;r+=2)this._vertexOutsideTileX(e[r])||this._vertexOutsideTileX(e[r+1])||t.push(e[r],e[r+1]);return t}_convertIndices(e,t){let r=[];for(let i of t){let n=e[i*2],a=e[i*2+1];r.push(this._vertexToIndex(n,a))}return r}_pointArrayToIndices(e){let t=[];for(let r of e)t.push(this._vertexToIndex(r.x,r.y));return t}};_it=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(t=>t.id),this.index=e.index,this.hasDependencies=!1,this.sdfPatterns={},this.patternFeatures=[],this.layoutVertexArray=new Ovr,this.indexArray=new Mv,this.indexArray2=new Lre,this.programConfigurations=new $b(e.layers,e.zoom),this.segments=new Ws,this.segments2=new Ws,this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id)}populate(e,t,r){this.hasDependencies=Jz("fill",this.layers,t);let i=this.layers[0].layout.get("fill-sort-key"),n=!i.isConstant(),a=[],o=new Co(this.zoom),s=this.layers[0]._featureFilter.needGeometry;for(let{feature:l,id:u,index:c,sourceLayerIndex:f}of e){let h=tx(l,s);if(!this.layers[0]._featureFilter.filter(o,h,r))continue;let d=n?i.evaluate(h,{},r,t.availableImages):void 0,p={id:u,properties:l.properties,type:l.type,sourceLayerIndex:f,index:c,geometry:s?h.geometry:Qb(l),patterns:{},sortKey:d};a.push(p)}n&&a.sort((l,u)=>l.sortKey-u.sortKey);for(let l of a){let{geometry:u,index:c,sourceLayerIndex:f}=l;if(this.hasDependencies){let d=ane("fill",this.layers,l,{zoom:this.zoom},t);this.patternFeatures.push(d)}else this.addFeature(l,u,c,r,{},t.subdivisionGranularity);let h=e[c].feature;t.featureIndex.insert(h,u,c,f,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}addFeatures({options:e,canonical:t,patternPositions:r,patternMap:i}){this.detectSdfPatterns(i);for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,t,r,e.subdivisionGranularity)}detectSdfPatterns(e){for(let t of this.patternFeatures)for(let r in t.patterns){let i=t.patterns[r];this.recordSdfPattern(r,e[i.min]),this.recordSdfPattern(r,e[i.mid]),this.recordSdfPattern(r,e[i.max])}for(let t of this.layers){let r=t.paint.get("fill-pattern").constantOr(null);r&&(this.recordSdfPattern(t.id,e[r.from.toString()]),this.recordSdfPattern(t.id,e[r.to.toString()]))}}recordSdfPattern(e,t){if(!t)return;let r=t.sdf===!0,i=this.sdfPatterns[e];i===void 0?this.sdfPatterns[e]=r:i!==r&&Ma(`Style sheet warning: Cannot mix SDF and non-SDF fill patterns in layer "${e}"`)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,P1r),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),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(e,t,r,i,n,a){for(let o of AB(t,500)){let s=yit(o,i,a.fill.getGranularityForZoomLevel(i.z)),l=this.layoutVertexArray;xit((u,c)=>{l.emplaceBack(u,c)},this.segments,this.layoutVertexArray,this.indexArray,s.verticesFlattened,s.indicesTriangles,this.segments2,this.indexArray2,s.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:n,canonical:i})}};Ui("FillBucket",_it,{omit:["layers","patternFeatures"]});ogr=()=>agr||(agr=new uc({"fill-sort-key":new Sn(_r.layout_fill["fill-sort-key"],"fill-sort-key")})),lgr=()=>sgr||(sgr=new uc({"fill-antialias":new Fi(_r.paint_fill["fill-antialias"],"fill-antialias"),"fill-opacity":new Sn(_r.paint_fill["fill-opacity"],"fill-opacity"),"fill-layer-opacity":new Fi(_r.paint_fill["fill-layer-opacity"],"fill-layer-opacity"),"fill-color":new Sn(_r.paint_fill["fill-color"],"fill-color"),"fill-outline-color":new Sn(_r.paint_fill["fill-outline-color"],"fill-outline-color"),"fill-translate":new Fi(_r.paint_fill["fill-translate"],"fill-translate"),"fill-translate-anchor":new Fi(_r.paint_fill["fill-translate-anchor"],"fill-translate-anchor"),"fill-pattern":new Ck(_r.paint_fill["fill-pattern"],"fill-pattern")})),ugr={get paint(){return lgr()},get layout(){return ogr()}},bit=e=>e.type==="fill",cgr=class extends Av{constructor(e,t){super(e,ugr,t)}recalculate(e,t){super.recalculate(e,t);let r=this.paint._values["fill-outline-color"];r.value.kind==="constant"&&r.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(e){return new _it(e)}queryRadius(){return OB(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:e,geometry:t,transform:r,pixelsToTileUnits:i}){return rit(NB(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-r.bearingInRadians,i),t)}isTileClipped(){return!0}},Wre=ol([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),fgr=ol([{name:"a_centroid",components:2,type:"Int16"}],4),hgr=Wre.members;Wre.size,Wre.alignment;Jd=class Yre{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(t){return this.minX=Math.min(this.minX,t.x),this.minY=Math.min(this.minY,t.y),this.maxX=Math.max(this.maxX,t.x),this.maxY=Math.max(this.maxY,t.y),this}expandBy(t){return this.minX-=t,this.minY-=t,this.maxX+=t,this.maxY+=t,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(t){return this.expandBy(-t)}map(t){let r=new Yre;return r.extend(t(new tr(this.minX,this.minY))),r.extend(t(new tr(this.maxX,this.minY))),r.extend(t(new tr(this.minX,this.maxY))),r.extend(t(new tr(this.maxX,this.maxY))),r}static fromPoints(t){let r=new Yre;for(let i of t)r.extend(i);return r}contains(t){return t.x>=this.minX&&t.x<=this.maxX&&t.y>=this.minY&&t.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(t){return!this.empty()&&!t.empty()&&t.minX>=this.minX&&t.maxX<=this.maxX&&t.minY>=this.minY&&t.maxY<=this.maxY}intersects(t){return!this.empty()&&!t.empty()&&t.minX<=this.maxX&&t.maxX>=this.minX&&t.minY<=this.maxY&&t.maxY>=this.minY}},wit=Jd.fromPoints([new tr(0,0),new tr(zr,zr)]);t8=class{constructor(e,t,r,i,n){for(this.properties=Object.create(null),this.extent=r,this.type=0,this.id=void 0,this._pbf=e,this._geometry=-1,this._keys=i,this._values=n;e.pos<t;){let a=e.readVarint();if(a===8)this.id=e.readVarint();else if(a===18){let o=e.readVarint()+e.pos;for(;e.pos<o;){let s=i[e.readVarint()],l=n[e.readVarint()];this.properties[s]=l}}else a===24?this.type=e.readVarint():(a===34&&(this._geometry=e.pos),e.skip(a))}}loadGeometry(){if(this._geometry<0)throw Error("feature has no geometry");let e=this._pbf;e.pos=this._geometry;let t=e.readVarint()+e.pos,r=[],i,n=1,a=0,o=0,s=0;for(;e.pos<t;){if(a<=0){let l=e.readVarint();if(n=l&7,a=l>>3,a===0)continue}if(a--,n===1)o+=e.readSVarint(),s+=e.readSVarint(),i&&r.push(i),i=[new tr(o,s)];else if(n===2)o+=e.readSVarint(),s+=e.readSVarint(),i&&i.push(new tr(o,s));else if(n===7)i&&i.push(i[0].clone());else throw Error(`unknown command ${n}`)}return i&&r.push(i),r}bbox(){if(this._geometry<0)throw Error("feature has no geometry");let e=this._pbf;e.pos=this._geometry;let t=e.readVarint()+e.pos,r=1,i=0,n=0,a=0,o=1/0,s=-1/0,l=1/0,u=-1/0;for(;e.pos<t;){if(i<=0){let c=e.readVarint();if(r=c&7,i=c>>3,i===0)continue}if(i--,r===1||r===2)n+=e.readSVarint(),a+=e.readSVarint(),n<o&&(o=n),n>s&&(s=n),a<l&&(l=a),a>u&&(u=a);else if(r!==7)throw Error(`unknown command ${r}`)}return[o,l,s,u]}toGeoJSON(e,t,r){let i=this.extent*2**r,n=this.extent*e,a=this.extent*t,o=this.loadGeometry();function s(f){return[(f.x+n)*360/i-180,360/Math.PI*Math.atan(Math.exp((1-(f.y+a)*2/i)*Math.PI))-90]}function l(f){return f.map(s)}let u;if(this.type===1){let f=[];for(let d of o)f.push(d[0]);let h=l(f);u=f.length===1?{type:"Point",coordinates:h[0]}:{type:"MultiPoint",coordinates:h}}else if(this.type===2){let f=o.map(l);u=f.length===1?{type:"LineString",coordinates:f[0]}:{type:"MultiLineString",coordinates:f}}else if(this.type===3){let f=Tit(o),h=[];for(let d of f)h.push(d.map(l));u=h.length===1?{type:"Polygon",coordinates:h[0]}:{type:"MultiPolygon",coordinates:h}}else throw Error("unknown feature type");let c={type:"Feature",geometry:u,properties:this.properties};return this.id!=null&&(c.id=this.id),c}};t8.types=["Unknown","Point","LineString","Polygon"];pgr=class{constructor(e,t){for(this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],t===void 0&&(t=e.length);e.pos<t;){let r=e.readVarint();r===10?this.name=e.readString():r===18?(this._features.push(e.pos),e.skip(r)):r===26?this._keys.push(e.readString()):r===34?this._values.push(vgr(e)):r===40?this.extent=e.readVarint():r===120?this.version=e.readVarint():e.skip(r)}this.length=this._features.length}feature(e){if(e<0||e>=this._features.length)throw Error("feature index out of bounds");this._pbf.pos=this._features[e];let t=this._pbf.readVarint()+this._pbf.pos;return new t8(this._pbf,t,this.extent,this._keys,this._values)}};ggr=class{constructor(e,t=e.length){let r=Object.create(null);for(;e.pos<t;){let i=e.readVarint();if(i===26){let n=new pgr(e,e.readVarint()+e.pos);n.length&&(r[n.name]=n)}else e.skip(i)}this.layers=r}},zf=63710088e-1,mn=class dk{constructor(t,r){if(isNaN(t)||isNaN(r))throw Error(`Invalid LngLat object: (${t}, ${r})`);if(this.lng=+t,this.lat=+r,this.lat>90||this.lat<-90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new dk(B0(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(t){let r=Math.PI/180,i=this.lat*r,n=t.lat*r,a=Math.sin(i)*Math.sin(n)+Math.cos(i)*Math.cos(n)*Math.cos((t.lng-this.lng)*r);return zf*Math.acos(Math.min(a,1))}static convert(t){if(t instanceof dk)return t;if(Array.isArray(t)&&(t.length===2||t.length===3))return new dk(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&typeof t=="object"&&t)return new dk(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw 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>]")}},Ait=2*Math.PI*zf;wo=class Sit{constructor(t,r,i=0){this.x=+t,this.y=+r,this.z=+i}static fromLngLat(t,r=0){let i=mn.convert(t);return new Sit(e3(i.lng),t3(i.lat),rx(r,i.lat))}toLngLat(){return new mn(GB(this.x),LT(this.y))}toAltitude(){return one(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/Ait*mgr(LT(this.y))}},ix=89.25;Xte=8192;kit=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(t=>t.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new Nvr,this.centroidVertexArray=new Pm,this.indexArray=new Mv,this.programConfigurations=new $b(e.layers,e.zoom),this.segments=new Ws,this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id)}populate(e,t,r){this.features=[],this.hasDependencies=Jz("fill-extrusion",this.layers,t);let i=new Co(this.zoom),n=this.layers[0],a=n.layout.get("fill-extrusion-rounded-corner-distance"),o=n._featureFilter.needGeometry;for(let{feature:s,id:l,index:u,sourceLayerIndex:c}of e){let f=tx(s,o);if(!n._featureFilter.filter(i,f,r))continue;let h=o?f.geometry:Qb(s),d={id:l,sourceLayerIndex:c,index:u,geometry:a>0?GQe(h,a,r):h,properties:s.properties,type:s.type,patterns:{}};this.hasDependencies?this.features.push(ane("fill-extrusion",this.layers,d,{zoom:this.zoom},t)):this.addFeature(d,d.geometry,u,r,{},t.subdivisionGranularity),t.featureIndex.insert(s,d.geometry,u,c,this.index,!0)}}addFeatures({options:e,canonical:t,patternPositions:r}){for(let i of this.features){let{geometry:n}=i;this.addFeature(i,n,i.index,t,r,e.subdivisionGranularity)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,hgr),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,fgr.members,!0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(e,t,r,i,n,a){let o=this.layers[0],s=o.layout?o.layout.get("fill-extrusion-rounded-corner-distance"):0,l=s>0?GQe(t,s,i):t;for(let u of AB(l,500)){let c={x:0,y:0,sampleCount:0},f=this.layoutVertexArray.length;this.processPolygon(c,i,e,u,a);let h=this.layoutVertexArray.length-f,d=Math.floor(c.x/c.sampleCount),p=Math.floor(c.y/c.sampleCount);for(let v=0;v<h;v++)this.centroidVertexArray.emplaceBack(d,p)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:n,canonical:i})}processPolygon(e,t,r,i,n){if(i.length<1||VQe(i[0]))return;for(let c of i)c.length!==0&&Tgr(e,c);let a={segment:this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)},o=n.fill.getGranularityForZoomLevel(t.z),s=t8.types[r.type]==="Polygon";for(let c of i){if(c.length===0||VQe(c))continue;let f=qb(c,o,s);this._generateSideFaces(f,a)}if(!s)return;let l=yit(i,t,o,!1),u=this.layoutVertexArray;xit((c,f)=>{ok(u,c,f,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles)}_generateSideFaces(e,t){let r=0;for(let i=1;i<e.length;i++){let n=e[i],a=e[i-1];if(Xre(n,a))continue;t.segment.vertexLength+4>Ws.MAX_VERTEX_ARRAY_LENGTH&&(t.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let o=n.sub(a)._perp()._unit(),s=a.dist(n);r+s>32768&&(r=0),ok(this.layoutVertexArray,n.x,n.y,o.x,o.y,0,0,r),ok(this.layoutVertexArray,n.x,n.y,o.x,o.y,0,1,r),r+=s,ok(this.layoutVertexArray,a.x,a.y,o.x,o.y,0,0,r),ok(this.layoutVertexArray,a.x,a.y,o.x,o.y,0,1,r);let l=t.segment.vertexLength;this.indexArray.emplaceBack(l,l+2,l+1),this.indexArray.emplaceBack(l+1,l+2,l+3),t.segment.vertexLength+=4,t.segment.primitiveLength+=2}}};Ui("FillExtrusionBucket",kit,{omit:["layers","features"]});Mgr=()=>Agr||(Agr=new uc({"fill-extrusion-rounded-corner-distance":new Fi(_r["layout_fill-extrusion"]["fill-extrusion-rounded-corner-distance"],"fill-extrusion-rounded-corner-distance")})),Egr=()=>Sgr||(Sgr=new uc({"fill-extrusion-opacity":new Fi(_r["paint_fill-extrusion"]["fill-extrusion-opacity"],"fill-extrusion-opacity"),"fill-extrusion-color":new Sn(_r["paint_fill-extrusion"]["fill-extrusion-color"],"fill-extrusion-color"),"fill-extrusion-translate":new Fi(_r["paint_fill-extrusion"]["fill-extrusion-translate"],"fill-extrusion-translate"),"fill-extrusion-translate-anchor":new Fi(_r["paint_fill-extrusion"]["fill-extrusion-translate-anchor"],"fill-extrusion-translate-anchor"),"fill-extrusion-pattern":new Ck(_r["paint_fill-extrusion"]["fill-extrusion-pattern"],"fill-extrusion-pattern"),"fill-extrusion-height":new Sn(_r["paint_fill-extrusion"]["fill-extrusion-height"],"fill-extrusion-height"),"fill-extrusion-base":new Sn(_r["paint_fill-extrusion"]["fill-extrusion-base"],"fill-extrusion-base"),"fill-extrusion-vertical-gradient":new Fi(_r["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"],"fill-extrusion-vertical-gradient")})),kgr={get paint(){return Egr()},get layout(){return Mgr()}},Cit=e=>e.type==="fill-extrusion",Cgr=class extends Av{constructor(e,t){super(e,kgr,t)}createBucket(e){return new kit(e)}queryRadius(){return OB(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,pixelPosMatrix:o}){let s=NB(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-n.bearingInRadians,a),l=this.paint.get("fill-extrusion-height").evaluate(t,r),u=this.paint.get("fill-extrusion-base").evaluate(t,r),c=Lgr(s,o,0),f=Fgr(i,u,l,o),h=f[0],d=f[1];return Dgr(h,d,c)}};IXr=new Uint32Array(96),Pgr="geojsonvt_clip_start",Igr="geojsonvt_clip_end",Zre=ol([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),Rgr=Zre.members;Zre.size,Zre.alignment;Kre=ol([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),zgr=Kre.members;Kre.size,Kre.alignment;Bgr=Math.cos(75/2*(Math.PI/180)),Dit=1/2,jQe=2**14/Dit,Fit=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(t=>t.id),this.index=e.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let t of this.layers)this.gradients[t.id]={};this.layoutVertexArray=new Uvr,this.layoutVertexArray2=new Vvr,this.indexArray=new Mv,this.programConfigurations=new $b(e.layers,e.zoom),this.segments=new Ws,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(t=>t.isStateDependent()).map(t=>t.id)}populate(e,t,r){this.hasDependencies=Jz("line",this.layers,t)||this.hasLineDasharray(this.layers);let i=this.layers[0].layout.get("line-sort-key"),n=!i.isConstant(),a=[],o=new Co(this.zoom),s=this.layers[0]._featureFilter.needGeometry;for(let{feature:l,id:u,index:c,sourceLayerIndex:f}of e){let h=tx(l,s);if(!this.layers[0]._featureFilter.filter(o,h,r))continue;let d=n?i.evaluate(h,{},r):void 0,p={id:u,properties:l.properties,type:l.type,sourceLayerIndex:f,index:c,geometry:s?h.geometry:Qb(l),patterns:{},dashes:{},sortKey:d};a.push(p)}n&&a.sort((l,u)=>l.sortKey-u.sortKey);for(let l of a){let{geometry:u,index:c,sourceLayerIndex:f}=l;this.hasDependencies?(Jz("line",this.layers,t)?ane("line",this.layers,l,{zoom:this.zoom},t):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,l,this.zoom,t),this.patternFeatures.push(l)):this.addFeature(l,u,c,r,{},{},t.subdivisionGranularity);let h=e[c].feature;t.featureIndex.insert(h,u,c,f,this.index)}}update(e,t,r,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r,dashPositions:i})}addFeatures({options:e,canonical:t,patternPositions:r,dashPositions:i}){for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,t,r,i,e.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,zgr)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Rgr),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.hasOwn(e.properties,"geojsonvt_clip_start")&&Object.hasOwn(e.properties,"geojsonvt_clip_end"))return{start:+e.properties[Pgr],end:+e.properties[Igr]}}addFeature(e,t,r,i,n,a,o){let s=this.layers[0].layout,l=s.get("line-join").evaluate(e,{}),u=s.get("line-cap").evaluate(e,{}),c=s.get("line-miter-limit").evaluate(e,{}),f=s.get("line-round-limit").evaluate(e,{});this.lineClips=this.lineFeatureClips(e);for(let h of t)this.addLine(h,e,l,u,c,f,i,o);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:n,dashPositions:a,canonical:i})}addLine(e,t,r,i,n,a,o,s){this.distance=0,this.scaledDistance=0,this.totalDistance=0;let l=o?s.line.getGranularityForZoomLevel(o.z):1;if(e=qb(e,l),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let b=0;b<e.length-1;b++)this.totalDistance+=e[b].dist(e[b+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}let u=t8.types[t.type]==="Polygon",c=e.length;for(;c>=2&&e[c-1].equals(e[c-2]);)c--;let f=0;for(;f<c-1&&e[f].equals(e[f+1]);)f++;if(c-f<(u?3:2))return;r==="bevel"&&(n=1.05);let h=this.overscaling<=16?15*zr/(512*this.overscaling):0,d=this.segments.prepareSegment(c*10,this.layoutVertexArray,this.indexArray),p,v,m,g,w;this.e1=this.e2=-1,u&&(p=e[c-2],w=e[f].sub(p)._unit()._perp());for(let b=f;b<c;b++){if(m=b===c-1?u?e[f+1]:void 0:e[b+1],m&&e[b].equals(m))continue;w&&(g=w),p&&(v=p),p=e[b],w=m?m.sub(p)._unit()._perp():g,g||(g=w);let _=g.add(w);(_.x!==0||_.y!==0)&&_._unit();let M=g.x*w.x+g.y*w.y,x=_.x*w.x+_.y*w.y,T=x===0?1/0:1/x,A=2*Math.sqrt(2-2*x),y=x<Bgr&&v&&m,E=g.x*w.y-g.y*w.x>0;if(y&&b>f){let k=p.dist(v);if(k>2*h){let D=p.sub(p.sub(v)._mult(h/k)._round());this.updateDistance(v,D),this.addCurrentVertex(D,g,0,0,d),v=D}}let S=v&&m,C=S?r:u?"butt":i;if(S&&C==="round"&&(T<a?C="miter":T<=2&&(C="fakeround")),C==="miter"&&T>n&&(C="bevel"),C==="bevel"&&(T>2&&(C="flipbevel"),T<n&&(C="miter")),v&&this.updateDistance(v,p),C==="miter")_._mult(T),this.addCurrentVertex(p,_,0,0,d);else if(C==="flipbevel"){if(T>100)_=w.mult(-1);else{let k=T*g.add(w).mag()/g.sub(w).mag();_._perp()._mult(k*(E?-1:1))}this.addCurrentVertex(p,_,0,0,d),this.addCurrentVertex(p,_.mult(-1),0,0,d)}else if(C==="bevel"||C==="fakeround"){let k=-Math.sqrt(T*T-1),D=E?k:0,F=E?0:k;if(v&&this.addCurrentVertex(p,g,D,F,d),C==="fakeround"){let P=Math.round(A*180/Math.PI/20);for(let R=1;R<P;R++){let L=R/P;if(L!==.5){let B=L-.5,O=1.0904+M*(-3.2452+M*(3.55645-M*1.43519)),$=.848013+M*(-1.06021+M*.215638);L+=L*B*(L-1)*(O*B*B+$)}let I=w.sub(g)._mult(L)._add(g)._unit()._mult(E?-1:1);this.addHalfVertex(p,I.x,I.y,!1,E,0,d)}}m&&this.addCurrentVertex(p,w,-D,-F,d)}else if(C==="butt")this.addCurrentVertex(p,_,0,0,d);else if(C==="square"){let k=v?1:-1;this.addCurrentVertex(p,_,k,k,d)}else C==="round"&&(v&&(this.addCurrentVertex(p,g,0,0,d),this.addCurrentVertex(p,g,1,1,d,!0)),m&&(this.addCurrentVertex(p,w,-1,-1,d,!0),this.addCurrentVertex(p,w,0,0,d)));if(y&&b<c-1){let k=p.dist(m);if(k>2*h){let D=p.add(m.sub(p)._mult(h/k)._round());this.updateDistance(p,D),this.addCurrentVertex(D,w,0,0,d),p=D}}}}addCurrentVertex(e,t,r,i,n,a=!1){let o=t.x+t.y*r,s=t.y-t.x*r,l=-t.x+t.y*i,u=-t.y-t.x*i;this.addHalfVertex(e,o,s,a,!1,r,n),this.addHalfVertex(e,l,u,a,!0,-i,n),this.distance>jQe/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,t,r,i,n,a))}addHalfVertex({x:e,y:t},r,i,n,a,o,s){let l=(this.lineClips?this.scaledDistance*(jQe-1):this.scaledDistance)*Dit;if(this.layoutVertexArray.emplaceBack((e<<1)+ +!!n,(t<<1)+ +!!a,Math.round(63*r)+128,Math.round(63*i)+128,(o===0?0:o<0?-1:1)+1|(l&63)<<2,l>>6),this.lineClips){let c=(this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start);this.layoutVertexArray2.emplaceBack(c,this.lineClipsArray.length)}let u=s.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,u,this.e2),s.primitiveLength++),a?this.e2=u:this.e1=u}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,t){this.distance+=e.dist(t),this.updateScaledDistance()}hasLineDasharray(e){for(let t of e){let r=t.paint.get("line-dasharray");if(r&&!r.isConstant())return!0}return!1}addLineDashDependencies(e,t,r,i){for(let n of e){let a=n.paint.get("line-dasharray");if(!a||a.value.kind==="constant")continue;let o=n.layout.get("line-cap").evaluate(t,{})==="round",s={dasharray:a.value.evaluate({zoom:r-1},t,{}),round:o},l={dasharray:a.value.evaluate({zoom:r},t,{}),round:o},u={dasharray:a.value.evaluate({zoom:r+1},t,{}),round:o},c=`${s.dasharray.join(",")},${s.round}`,f=`${l.dasharray.join(",")},${l.round}`,h=`${u.dasharray.join(",")},${u.round}`;i.dashDependencies[c]=s,i.dashDependencies[f]=l,i.dashDependencies[h]=u,t.dashes[n.id]={min:c,mid:f,max:h}}}};Ui("LineBucket",Fit,{omit:["layers","patternFeatures"]});Ogr=()=>qgr||(qgr=new uc({"line-cap":new Sn(_r.layout_line["line-cap"],"line-cap"),"line-join":new Sn(_r.layout_line["line-join"],"line-join"),"line-miter-limit":new Sn(_r.layout_line["line-miter-limit"],"line-miter-limit"),"line-round-limit":new Sn(_r.layout_line["line-round-limit"],"line-round-limit"),"line-sort-key":new Sn(_r.layout_line["line-sort-key"],"line-sort-key")})),Ugr=()=>Ngr||(Ngr=new uc({"line-opacity":new Sn(_r.paint_line["line-opacity"],"line-opacity"),"line-layer-opacity":new Fi(_r.paint_line["line-layer-opacity"],"line-layer-opacity"),"line-color":new Sn(_r.paint_line["line-color"],"line-color"),"line-translate":new Fi(_r.paint_line["line-translate"],"line-translate"),"line-translate-anchor":new Fi(_r.paint_line["line-translate-anchor"],"line-translate-anchor"),"line-width":new Sn(_r.paint_line["line-width"],"line-width"),"line-gap-width":new Sn(_r.paint_line["line-gap-width"],"line-gap-width"),"line-offset":new Sn(_r.paint_line["line-offset"],"line-offset"),"line-blur":new Sn(_r.paint_line["line-blur"],"line-blur"),"line-dasharray":new Ck(_r.paint_line["line-dasharray"],"line-dasharray"),"line-pattern":new Ck(_r.paint_line["line-pattern"],"line-pattern"),"line-gradient":new zB(_r.paint_line["line-gradient"],"line-gradient")})),$Qe={get paint(){return Ugr()},get layout(){return Ogr()}},Vgr=class extends Sn{possiblyEvaluate(e,t){return t=new Co(Math.floor(t.zoom),{now:t.now,fadeDuration:t.fadeDuration,zoomHistory:t.zoomHistory,transition:t.transition}),super.possiblyEvaluate(e,t)}evaluate(e,t,r,i){return t=ln({},t,{zoom:Math.floor(t.zoom)}),super.evaluate(e,t,r,i)}},Lit=e=>e.type==="line",Ggr=class extends Av{constructor(e,t){super(e,$Qe,t),this.gradientVersion=0,Mz||(Mz=new Vgr($Qe.paint.properties["line-width"].specification,"line-floorwidth"),Mz.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){if(e==="line-gradient"){let t=this.gradientExpression();this.stepInterpolant=evr(t)?t._styleExpression.expression instanceof Die:!1,this.gradientVersion=(this.gradientVersion+1)%(2**53-1)}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,t){super.recalculate(e,t),this.paint._values["line-floorwidth"]=Mz.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new Fit(e)}queryRadius(e){let t=e,r=WQe(yT("line-width",this,t),yT("line-gap-width",this,t)),i=yT("line-offset",this,t);return r/2+Math.abs(i)+OB(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a}){let o=NB(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-n.bearingInRadians,a),s=a/2*WQe(this.paint.get("line-width").evaluate(t,r),this.paint.get("line-gap-width").evaluate(t,r)),l=this.paint.get("line-offset").evaluate(t,r);return l&&(i=l1r(i,l*a)),r1r(o,i,s)}isTileClipped(){return!0}};Hgr=ol([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"},{name:"a_height_offset",components:1,type:"Float32"}],4),jgr=ol([{name:"a_projected_pos",components:3,type:"Float32"}],4);ol([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);$gr=ol([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ol([{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"}]);YQe=ol([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Pit=ol([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);ol([{name:"triangle",components:3,type:"Uint16"}]),ol([{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"},{type:"Float32",name:"heightOffset"}]),ol([{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"},{type:"Float32",name:"heightOffset"}]),ol([{type:"Float32",name:"offsetX"}]),ol([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ol([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);tB=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(e){this.pluginStatus=e.pluginStatus,this.pluginURL=e.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(e){if(tB.isParsed())throw Error("RTL text plugin already registered.");this.applyArabicShaping=e.applyArabicShaping,this.processBidirectionalText=e.processBidirectionalText,this.processStyledBidirectionalText=e.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(e,t){return Ki(this,null,function*(){if(this.isParsed())return this.getState();if(e.pluginStatus!=="loading")return this.setState(e),e;let r=e.pluginURL,i=new Promise(a=>{this.loadScriptResolve=a}),n=new Promise(a=>setTimeout(()=>a(),this.TIMEOUT));if(yield t(r),yield Promise.race([i,n]),this.isParsed()){let a={pluginStatus:"loaded",pluginURL:r};return this.setState(a),a}throw this.setState({pluginStatus:"error",pluginURL:""}),Error(`RTL Text Plugin failed to import scripts from ${r}`)})}};Qgr={C:"18g,1;g2,3;4nb,1",D:"17k,1;5,1;1,1;1,5;4,d;1,7;1,2;z,2;8,g;i,12;1,2;9,1;1,1;1,2;14,3;2,1;28,9;3,f;2,4;1,1;2,3;2,6;7a,1;2,5;1,1;g,a;5,2;2,6;1,f",R:"17m,4;1,1;1,1;5,4;l,1;14,3;1,3;g,i;12,1;2,9;1,1;1,1;2,2;1,1;o,2;2x,3;f,2;4,1;1,2;3,2;6u,j;b,1;r,3;1,1;2,2;6,1",T:"174,b;1,1;1a,l;g,1;2t,7;2,6;2,2;1,4;bt,9;16,o;1,t;1clb,1"},emr={1569:[65152,0,0,0],1570:[65153,65154,0,0],1571:[65155,65156,0,0],1572:[65157,65158,0,0],1573:[65159,65160,0,0],1574:[65161,65162,65163,65164],1575:[65165,65166,0,0],1576:[65167,65168,65169,65170],1577:[65171,65172,0,0],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194,0,0],1584:[65195,65196,0,0],1585:[65197,65198,0,0],1586:[65199,65200,0,0],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262,0,0],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1611:[65136,0,0,65137],1612:[65138,0,0,0],1613:[65140,0,0,0],1614:[65142,0,0,65143],1615:[65144,0,0,65145],1616:[65146,0,0,65147],1617:[65148,0,0,65149],1618:[65150,0,0,65151],1649:[64336,64337,0,0],1655:[64477,0,0,0],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393,0,0],1676:[64388,64389,0,0],1677:[64386,64387,0,0],1678:[64390,64391,0,0],1681:[64396,64397,0,0],1688:[64394,64395,0,0],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415,0,0],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421,0,0],1729:[64422,64423,64424,64425],1733:[64480,64481,0,0],1734:[64473,64474,0,0],1735:[64471,64472,0,0],1736:[64475,64476,0,0],1737:[64482,64483,0,0],1739:[64478,64479,0,0],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431,0,0],1747:[64432,64433,0,0]},tmr={\u0644\u0622:[65269,65270],\u0644\u0623:[65271,65272],\u0644\u0625:[65273,65274],\u0644\u0627:[65275,65276]},ZQe=1604,rmr=/[\u0600-\u06ff\u0750-\u077f\u0870-\u089f\u08a0-\u08ff\ufb50-\ufdff\ufe70-\ufeff]/;Rit=new Map;for(let[e,t]of Object.entries(Qgr))imr(t,e,Rit);zit=typeof Intl<"u"&&"Segmenter"in Intl;vT={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u22EF":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};bmr={10:!0,13:!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},wmr={40:!0};cne=class eie{constructor(t="",r=[],i=[]){this.text=t,this.sections=r,this.sectionIndex=i,this.imageSectionID=null,this._graphemes=null}graphemes(){var t;return(t=this._graphemes)!=null||(this._graphemes=Jre(this.text)),this._graphemes}static fromFeature(t,r){let i=new eie;for(let n of t.sections)n.image?i.addImageSection(n):i.addTextSection(n,r);return i}length(){return this.graphemes().length}getSection(t){return this.sections[this.sectionIndex[t]]}getSectionIndex(t){return this.sectionIndex[t]}verticalizePunctuation(){this.text=_mr(this.text),this._graphemes=null}hasZeroWidthSpaces(){return this.text.includes("\u200B")}trim(){let t=this.graphemes(),r=0;for(;r<t.length&&eet(t[r]);)r++;let i=t.length;for(;i>r&&eet(t[i-1]);)i--;this.text=t.slice(r,i).join(""),this.sectionIndex=this.sectionIndex.slice(r,i),this._graphemes=null}substring(t,r){let i=this.graphemes().slice(t,r).join(""),n=this.sectionIndex.slice(t,r);return new eie(i,this.sections,n)}toCodeUnitIndex(t){return this.graphemes().slice(0,t).join("").length}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((t,r)=>Math.max(t,this.sections[r].scale),0)}getMaxImageSize(t){let r=0,i=0;for(let n=0;n<this.length();n++){let a=this.getSection(n);if("imageName"in a){let o=t[a.imageName];if(!o)continue;let s=o.displaySize;r=Math.max(r,s[0]),i=Math.max(i,s[1])}}return{maxImageWidth:r,maxImageHeight:i}}_appendSection(t,r){let i=this.graphemes(),n=i.length>0?i[i.length-1]:"",a=Jre(n+t);this.text+=t,this._graphemes=i.slice(0,n?-1:void 0).concat(a);let o=a.length-+!!n;for(let s=0;s<o;s++)this.sectionIndex.push(r)}addTextSection(t,r){this.sections.push({scale:t.scale||1,verticalAlign:t.verticalAlign||"bottom",fontStack:t.fontStack||r}),this._appendSection(t.text,this.sections.length-1)}addImageSection(t){let r=t.image?t.image.name:"";if(r.length===0){Ma("Can't add FormattedSection with an empty image.");return}let i=this.getNextImageSectionCharCode();if(!i){Ma("Reached maximum number of images 6401");return}this.sections.push({scale:1,verticalAlign:t.verticalAlign||"bottom",imageName:r}),this._appendSection(String.fromCharCode(i),this.sections.length-1)}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(t,r,i,n,a){let o=[],s=this.determineAverageLineWidth(t,r,i,n,a),l=this.hasZeroWidthSpaces(),u=this.graphemes(),c=null,f=0,h=0;for(let d=0;d<u.length;d++){let p=u[d];if(d>0){let v=u[d-1].codePointAt(0),m=p.codePointAt(0),g=Xgr(v),w=XQe(v)&&XQe(m);(bmr[v]||g||"imageName"in this.getSection(d-1)||u[d+1]!==void 0&&wmr[m]||w&&(c!=null?c:c=mmr(this.text)).has(h))&&o.push(tet(d,f,s,o,Tmr(v,m,g&&l),!1))}une(p.codePointAt(0))||(f+=JQe(p,this.getSection(d),i,n,t,a)),h+=p.length}return Nit(tet(this.length(),f,s,o,0,!0))}determineAverageLineWidth(t,r,i,n,a){let o=0,s=0;for(let u of this.graphemes()){let c=this.getSection(s);o+=JQe(u,c,i,n,t,a),s++}let l=Math.max(1,Math.ceil(o/r));return o/l}};fne=Amr(),Mmr=/[\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]/,Smr=new Set(["WS","FSI","LRI","RLI","PDI"]),Emr=new Set(["S","B"]);tie=4294967296,RXr=1/tie,ret=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),Vit=class{constructor(e){this.buf=ArrayBuffer.isView(e)?e:new Uint8Array(e),this.dataView=new DataView(this.buf.buffer,this.buf.byteOffset,this.buf.byteLength),this.pos=0,this.type=0,this._valueStart=-1,this.length=this.buf.length}readFields(e,t,r=this.length){let i;for(;i=this.nextField(r);)e(i,t,this);return t}readMessage(e,t){return this.readFields(e,t,this.readVarint()+this.pos)}readFixed32(){let e=this.dataView.getUint32(this.pos,!0);return this.pos+=4,e}readSFixed32(){let e=this.dataView.getInt32(this.pos,!0);return this.pos+=4,e}readFixed64(){let e=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*tie;return this.pos+=8,e}readSFixed64(){let e=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*tie;return this.pos+=8,e}readFloat(){let e=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,e}readDouble(){let e=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,e}readVarint(e){let t=this.buf,r=t[this.pos++];if(r<128)return r;let i=r&127,n;return n=t[this.pos++],i|=(n&127)<<7,n<128||(n=t[this.pos++],i|=(n&127)<<14,n<128)||(n=t[this.pos++],i|=(n&127)<<21,n<128)?i:(n=t[this.pos],i|=(n&15)<<28,Bmr(i,e,this))}readSVarint(){let e=this.readVarint();return e%2==1?(e+1)/-2:e/2}readBoolean(){return!!this.readVarint()}readString(){let e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&ret?ret.decode(this.buf.subarray(t,e)):Omr(this.buf,t,e)}readBytes(){let e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t}readPackedVarint(e=[],t){let r=this.readPackedEnd();for(;this.pos<r;)e.push(this.readVarint(t));return e}readPackedSVarint(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSVarint());return e}readPackedBoolean(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readBoolean());return e}readPackedFloat(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFloat());return e}readPackedDouble(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readDouble());return e}readPackedFixed32(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFixed32());return e}readPackedSFixed32(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSFixed32());return e}readPackedFixed64(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFixed64());return e}readPackedSFixed64(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSFixed64());return e}readPackedEnd(){return this.type===2?this.readVarint()+this.pos:this.pos+1}nextField(e=this.length){if(this.pos===this._valueStart&&this.skip(this.type),this.pos>=e)return 0;let t=this.readVarint();return this.type=t&7,this._valueStart=this.pos,t>>>3}skip(e){let t=e&7;if(t===0)for(;this.buf[this.pos++]>127;);else if(t===2)this.pos=this.readVarint()+this.pos;else if(t===5)this.pos+=4;else if(t===1)this.pos+=8;else throw Error(`Unimplemented type: ${t}`)}};WB=class{constructor(e,{pixelRatio:t,version:r,isWebGLImage:i=!1,stretchX:n,stretchY:a,content:o,textFitWidth:s,textFitHeight:l}){this.paddedRect=e,this.pixelRatio=t,this.stretchX=n,this.stretchY=a,this.content=o,this.version=r,this.needsFirstWebGLRender=i,this.textFitWidth=s,this.textFitHeight=l}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}},Gmr=class{constructor(e,t){let r={},i={};this.haveRenderCallbacks=[],this.patchedUpdateVersion=-1;let n=[];this.addImages(e,r,n),this.addImages(t,i,n);let{w:a,h:o}=hne(n),s=new As({width:a||1,height:o||1});for(let l in e){let u=e[l];if(u.isWebGLImage)continue;let c=r[l].paddedRect;As.copy(u.data,s,{x:0,y:0},{x:c.x+1,y:c.y+1},u.data)}for(let l in t){let u=t[l],c=i[l].paddedRect,f=c.x+1,h=c.y+1,d=u.data.width,p=u.data.height;As.copy(u.data,s,{x:0,y:0},{x:f,y:h},u.data),As.copy(u.data,s,{x:0,y:p-1},{x:f,y:h-1},{width:d,height:1}),As.copy(u.data,s,{x:0,y:0},{x:f,y:h+p},{width:d,height:1}),As.copy(u.data,s,{x:d-1,y:0},{x:f-1,y:h},{width:1,height:p}),As.copy(u.data,s,{x:0,y:0},{x:f+d,y:h},{width:1,height:p})}this.image=s,this.iconPositions=r,this.patternPositions=i}addImages(e,t,r){for(let i in e){let n=e[i],a={x:0,y:0,w:n.data.width+2,h:n.data.height+2};r.push(a),t[i]=new WB(a,n),n.hasRenderCallback&&this.haveRenderCallbacks.push(i)}}patchUpdatedImages(e,t){if(e.dispatchRenderCallbacks(this.haveRenderCallbacks),this.patchedUpdateVersion!==e.updateVersion){this.patchedUpdateVersion=e.updateVersion;for(let r in this.iconPositions)this.patchUpdatedImage(this.iconPositions[r],e.getImage(r),t);for(let r in this.patternPositions)this.patchUpdatedImage(this.patternPositions[r],e.getImage(r),t)}}patchUpdatedImage(e,t,r){var l;if(!e||!t||!e.needsFirstWebGLRender&&e.version===t.version)return;e.needsFirstWebGLRender=!1,e.version=t.version;let[i,n]=e.tl,a=(l=t.userImage)==null?void 0:l.data;if(!i8(a)){r.update(t.data,void 0,{x:i,y:n});return}let{width:o,height:s}=t.data;r.context.setCustomLayerDefaults(),a.renderWithWebGL({gl:r.context.gl,texture:r.texture,x:i,y:n,width:o,height:s}),r.context.setDirty()}};Ui("ImagePosition",WB),Ui("ImageAtlas",Gmr);jit=(function(e){return e[e.none=0]="none",e[e.horizontal=1]="horizontal",e[e.vertical=2]="vertical",e[e.horizontalOnly=3]="horizontalOnly",e})(jit||{});iet=new RegExp("^\\p{gc=M}$","u");oet=32640;bT=class Zit extends tr{constructor(t,r,i,n){super(t,r),this.angle=i,n!==void 0&&(this.segment=n)}clone(){return new Zit(this.x,this.y,this.angle,this.segment)}};Ui("Anchor",bT);Lz=class{constructor(e,t,r,i,n,a,o,s,l,u){var c;if(this.boxStartIndex=e.length,l){let f=a.top,h=a.bottom,d=a.collisionPadding;d&&(f-=d[1],h+=d[3]);let p=h-f;p>0&&(p=Math.max(10,p),this.circleDiameter=p)}else{let f=(c=a.image)!=null&&c.content&&(a.image.textFitWidth||a.image.textFitHeight)?Xit(a):{x1:a.left,y1:a.top,x2:a.right,y2:a.bottom};f.y1=f.y1*o-s[0],f.y2=f.y2*o+s[2],f.x1=f.x1*o-s[3],f.x2=f.x2*o+s[1];let h=a.collisionPadding;if(h&&(f.x1-=h[0]*o,f.y1-=h[1]*o,f.x2+=h[2]*o,f.y2+=h[3]*o),u){let d=new tr(f.x1,f.y1),p=new tr(f.x2,f.y1),v=new tr(f.x1,f.y2),m=new tr(f.x2,f.y2),g=u*Math.PI/180;d._rotate(g),p._rotate(g),v._rotate(g),m._rotate(g),f.x1=Math.min(d.x,p.x,v.x,m.x),f.x2=Math.max(d.x,p.x,v.x,m.x),f.y1=Math.min(d.y,p.y,v.y,m.y),f.y2=Math.max(d.y,p.y,v.y,m.y)}e.emplaceBack(t.x,t.y,f.x1,f.y1,f.x2,f.y2,r,i,n)}this.boxEndIndex=e.length}},gyr=class{constructor(e=[],t=(r,i)=>r<i?-1:+(r>i)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(this.length===0)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,i=t[e];for(;e>0;){let n=e-1>>1,a=t[n];if(r(i,a)>=0)break;t[e]=a,e=n}t[e]=i}_down(e){let{data:t,compare:r}=this,i=this.length>>1,n=t[e];for(;e<i;){let a=(e<<1)+1,o=a+1;if(o<this.length&&r(t[o],t[a])<0&&(a=o),r(t[a],n)>=0)break;t[e]=t[a],e=a}t[e]=n}};dT=class{constructor(e,t,r,i){this.p=new tr(e,t),this.h=r,this.d=xyr(this.p,i),this.max=this.d+this.h*Math.SQRT2}};XB=(function(e){return e[e.center=1]="center",e[e.left=2]="left",e[e.right=3]="right",e[e.top=4]="top",e[e.bottom=5]="bottom",e[e["top-left"]=6]="top-left",e[e["top-right"]=7]="top-right",e[e["bottom-left"]=8]="bottom-left",e[e["bottom-right"]=9]="bottom-right",e})({}),pne=1/0;Syr=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];iie=class{constructor(e){this.layoutVertexArray=new Gvr,this.indexArray=new Mv,this.programConfigurations=e,this.segments=new Ws,this.dynamicLayoutVertexArray=new Hvr,this.opacityVertexArray=new jvr,this.hasVisibleVertices=!1,this.placedSymbolArray=new Brt}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(e,t,r,i){this.isEmpty()||(r&&(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Hgr.members),this.indexBuffer=e.createIndexBuffer(this.indexArray,t),this.dynamicLayoutVertexBuffer=e.createVertexBuffer(this.dynamicLayoutVertexArray,jgr.members,!0),this.opacityVertexBuffer=e.createVertexBuffer(this.opacityVertexArray,Syr,!0),this.opacityVertexBuffer.itemSize=1),(r||i)&&this.programConfigurations.upload(e))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}};Ui("SymbolBuffers",iie);nie=class{constructor(e,t,r){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new r,this.segments=new Ws,this.collisionVertexArray=new $vr}upload(e){this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=e.createVertexBuffer(this.collisionVertexArray,$gr.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}};Ui("CollisionBuffers",nie);s8=class{constructor(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(o=>o.id),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasDependencies=!0,this.hasRTLText=!1,this.maxHeightOffset=0,this.sortKeyRanges=[],this.collisionCircleArray=[],this.maxGlyphs=65535;let t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=set(this.zoom,t["text-size"]),this.iconSizeData=set(this.zoom,t["icon-size"]);let r=this.layers[0].layout,i=r.get("symbol-sort-key"),n=r.get("symbol-z-order");this.canOverlap=zk(r,"text-overlap","text-allow-overlap")!=="never"||zk(r,"icon-overlap","icon-allow-overlap")!=="never"||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey=n!=="viewport-y"&&!i.isConstant();let a=n==="viewport-y"||n==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=a&&this.canOverlap,r.get("symbol-placement")==="point"&&(this.writingModes=r.get("text-writing-mode").map(o=>jit[o])),this.stateDependentLayerIds=this.layers.filter(o=>o.isStateDependent()).map(o=>o.id),this.sourceID=e.sourceID}createArrays(){this.text=new iie(new $b(this.layers,this.zoom,e=>e.startsWith("text"))),this.icon=new iie(new $b(this.layers,this.zoom,e=>e.startsWith("icon"))),this.glyphOffsetArray=new Nrt,this.lineVertexArray=new Urt,this.symbolInstances=new Ort,this.textAnchorOffsets=new Grt}calculateGlyphDependencies(e,t,r,i,n){var l;let a=(i||this.allowVerticalPlacement)&&n,o=cne.fromFeature(e,r),s=o.graphemes();for(let u=0;u<s.length;u++){let c=o.getSection(u);if("imageName"in c)continue;let f=t[l=c.fontStack]||(t[l]={}),h=s[u];r8(h)&&(f[h]=!0);for(let d of h){if(f[d]=!0,!a)continue;let p=vT[d];p&&(f[p]=!0)}}}populate(e,t,r){var v;let i=this.layers[0],n=i.layout,a=n.get("text-font"),o=n.get("text-field"),s=n.get("icon-image"),l=(o.value.kind!=="constant"||o.value.value instanceof Mm&&!o.value.value.isEmpty()||o.value.value.toString().length>0)&&(a.value.kind!=="constant"||a.value.value.length>0),u=s.value.kind!=="constant"||!!s.value.value||Object.keys(s.parameters).length>0,c=n.get("symbol-sort-key");if(this.features=[],!l&&!u)return;let f=t.iconDependencies,h=t.glyphDependencies,d=t.availableImages,p=new Co(this.zoom);for(let{feature:m,id:g,index:w,sourceLayerIndex:b}of e){let _=i._featureFilter.needGeometry,M=tx(m,_);if(!i._featureFilter.filter(p,M,r))continue;_||(M.geometry=Qb(m));let x;if(l){let E=i.getValueAndResolveTokens("text-field",M,r,d),S=Mm.factory(E);this.hasRTLText||(this.hasRTLText=Eyr(S)),x=vmr(S,i,M)}let T;if(u){let E=i.getValueAndResolveTokens("icon-image",M,r,d);T=E instanceof Z1?E:Z1.fromString(E)}if(!x&&!T)continue;let A=this.sortFeaturesByKey?c.evaluate(M,{},r):void 0,y={id:g,text:x,icon:T,index:w,sourceLayerIndex:b,geometry:M.geometry,properties:m.properties,type:t8.types[m.type],sortKey:A};if(this.features.push(y),T&&(f[T.name]=!0),x){let E=a.evaluate(M,{},r).join(","),S=n.get("text-rotation-alignment")!=="viewport"&&n.get("symbol-placement")!=="point";this.allowVerticalPlacement=(v=this.writingModes)==null?void 0:v.includes(2);let C=Qre(x.toString());this.calculateGlyphDependencies(x,h,E,S,C);for(let k of x.sections)k.image&&(f[k.image.name]=!0)}}n.get("symbol-placement")==="line"&&(this.features=gmr(this.features)),this.sortFeaturesByKey&&this.features.sort((m,g)=>m.sortKey-g.sortKey)}update(e,t,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,{imagePositions:r}),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,{imagePositions:r}))}addFeatures({options:e,canonical:t,glyphMap:r,glyphPositions:i,iconMap:n,iconPositions:a,showCollisionBoxes:o}){byr({bucket:this,glyphMap:r,glyphPositions:i,imageMap:n,imagePositions:a,showCollisionBoxes:o,canonical:t,subdivisionGranularity:e.subdivisionGranularity})}isEmpty(){return this.symbolInstances.length===0}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,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(e,t){let r=this.lineVertexArray.length;if(e.segment!==void 0){let i=e.dist(t[e.segment+1]),n=e.dist(t[e.segment]),a={};for(let o=e.segment+1;o<t.length;o++)a[o]={x:t[o].x,y:t[o].y,tileUnitDistanceFromAnchor:i},o<t.length-1&&(i+=t[o+1].dist(t[o]));for(let o=e.segment||0;o>=0;o--)a[o]={x:t[o].x,y:t[o].y,tileUnitDistanceFromAnchor:n},o>0&&(n+=t[o-1].dist(t[o]));for(let o=0;o<t.length;o++){let s=a[o];this.lineVertexArray.emplaceBack(s.x,s.y,s.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}}addSymbols(e,t,r,i,n,a,o,s,l,u,c,f,h){let d=e.indexArray,p=e.layoutVertexArray,v=e.segments.prepareSegment(4*t.length,p,d,this.canOverlap?a.sortKey:void 0),m=this.glyphOffsetArray.length,g=v.vertexLength,w=this.allowVerticalPlacement&&o===2?Math.PI/2:0,b=a.text&&a.text.sections;for(let _=0;_<t.length;_++){let{tl:M,tr:x,bl:T,br:A,tex:y,pixelOffsetTL:E,pixelOffsetBR:S,minFontScaleX:C,minFontScaleY:k,glyphOffset:D,isSDF:F,sectionIndex:P}=t[_],R=v.vertexLength,L=D[1];Pz(p,s.x,s.y,M.x,L+M.y,y.x,y.y,r,F,E.x,E.y,C,k,h),Pz(p,s.x,s.y,x.x,L+x.y,y.x+y.w,y.y,r,F,S.x,E.y,C,k,h),Pz(p,s.x,s.y,T.x,L+T.y,y.x,y.y+y.h,r,F,E.x,S.y,C,k,h),Pz(p,s.x,s.y,A.x,L+A.y,y.x+y.w,y.y+y.h,r,F,S.x,S.y,C,k,h),o8(e.dynamicLayoutVertexArray,s,w),d.emplaceBack(R,R+2,R+1),d.emplaceBack(R+1,R+2,R+3),v.vertexLength+=4,v.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(D[0]),(_===t.length-1||P!==t[_+1].sectionIndex)&&e.programConfigurations.populatePaintArrays(p.length,a,a.index,{imagePositions:{},canonical:f,formattedSection:b==null?void 0:b[P]})}e.placedSymbolArray.emplaceBack(s.x,s.y,m,this.glyphOffsetArray.length-m,g,l,u,s.segment,r?r[0]:0,r?r[1]:0,i[0],i[1],o,0,!1,0,c,h)}_addCollisionDebugVertex(e,t,r,i,n,a){return t.emplaceBack(0,0),e.emplaceBack(r.x,r.y,i,n,Math.round(a.x),Math.round(a.y))}addCollisionDebugVertices(e,t,r,i,n,a,o){let s=n.segments.prepareSegment(4,n.layoutVertexArray,n.indexArray),l=s.vertexLength,u=n.layoutVertexArray,c=n.collisionVertexArray,f=o.anchorX,h=o.anchorY;this._addCollisionDebugVertex(u,c,a,f,h,new tr(e,t)),this._addCollisionDebugVertex(u,c,a,f,h,new tr(r,t)),this._addCollisionDebugVertex(u,c,a,f,h,new tr(r,i)),this._addCollisionDebugVertex(u,c,a,f,h,new tr(e,i)),s.vertexLength+=4;let d=n.indexArray;d.emplaceBack(l,l+1),d.emplaceBack(l+1,l+2),d.emplaceBack(l+2,l+3),d.emplaceBack(l+3,l),s.primitiveLength+=4}addDebugCollisionBoxes(e,t,r,i){for(let n=e;n<t;n++){let a=this.collisionBoxArray.get(n),o=a.x1,s=a.y1,l=a.x2,u=a.y2;this.addCollisionDebugVertices(o,s,l,u,i?this.textCollisionBox:this.iconCollisionBox,a.anchorPoint,r)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new nie(LQe,YQe.members,Lre),this.iconCollisionBox=new nie(LQe,YQe.members,Lre);for(let e=0;e<this.symbolInstances.length;e++){let t=this.symbolInstances.get(e);this.addDebugCollisionBoxes(t.textBoxStartIndex,t.textBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.verticalTextBoxStartIndex,t.verticalTextBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.iconBoxStartIndex,t.iconBoxEndIndex,t,!1),this.addDebugCollisionBoxes(t.verticalIconBoxStartIndex,t.verticalIconBoxEndIndex,t,!1)}}_deserializeCollisionBoxesForSymbol(e,t,r,i,n,a,o,s,l){let u={};for(let c=t;c<r;c++){let f=e.get(c);u.textBox={x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,anchorPointX:f.anchorPointX,anchorPointY:f.anchorPointY},u.textFeatureIndex=f.featureIndex;break}for(let c=i;c<n;c++){let f=e.get(c);u.verticalTextBox={x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,anchorPointX:f.anchorPointX,anchorPointY:f.anchorPointY},u.verticalTextFeatureIndex=f.featureIndex;break}for(let c=a;c<o;c++){let f=e.get(c);u.iconBox={x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,anchorPointX:f.anchorPointX,anchorPointY:f.anchorPointY},u.iconFeatureIndex=f.featureIndex;break}for(let c=s;c<l;c++){let f=e.get(c);u.verticalIconBox={x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,anchorPointX:f.anchorPointX,anchorPointY:f.anchorPointY},u.verticalIconFeatureIndex=f.featureIndex;break}return u}deserializeCollisionBoxes(e){this.collisionArrays=[];for(let t=0;t<this.symbolInstances.length;t++){let r=this.symbolInstances.get(t);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(e,r.textBoxStartIndex,r.textBoxEndIndex,r.verticalTextBoxStartIndex,r.verticalTextBoxEndIndex,r.iconBoxStartIndex,r.iconBoxEndIndex,r.verticalIconBoxStartIndex,r.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(e,t){let r=e.placedSymbolArray.get(t),i=r.vertexStartIndex+r.numGlyphs*4;for(let n=r.vertexStartIndex;n<i;n+=4)e.indexArray.emplaceBack(n,n+2,n+1),e.indexArray.emplaceBack(n+1,n+2,n+3)}getSortedSymbolIndexes(e){if(this.sortedAngle===e&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;let t=Math.sin(e),r=Math.cos(e),i=[],n=[],a=[];for(let o=0;o<this.symbolInstances.length;++o){a.push(o);let s=this.symbolInstances.get(o);i.push(Math.round(t*s.anchorX+r*s.anchorY)|0),n.push(s.featureIndex)}return a.sort((o,s)=>i[o]-i[s]||n[s]-n[o]),a}addToSortKeyRanges(e,t){let r=this.sortKeyRanges[this.sortKeyRanges.length-1];(r==null?void 0:r.sortKey)===t?r.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let t of this.symbolInstanceIndexes){let r=this.symbolInstances.get(t);this.featureSortOrder.push(r.featureIndex);let i=[r.rightJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.leftJustifiedTextSymbolIndex];for(let n=0;n<i.length;n++){let a=i[n];a>=0&&i.indexOf(a)===n&&this.addIndicesForPlacedSymbol(this.text,a)}r.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,r.verticalPlacedTextSymbolIndex),r.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,r.placedIconSymbolIndex),r.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,r.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}};Ui("SymbolBucket",s8,{omit:["layers","collisionBoxArray","features","compareText"]});Dyr=()=>Cyr||(Cyr=new uc({"symbol-placement":new Fi(_r.layout_symbol["symbol-placement"],"symbol-placement"),"symbol-spacing":new Fi(_r.layout_symbol["symbol-spacing"],"symbol-spacing"),"symbol-avoid-edges":new Fi(_r.layout_symbol["symbol-avoid-edges"],"symbol-avoid-edges"),"symbol-sort-key":new Sn(_r.layout_symbol["symbol-sort-key"],"symbol-sort-key"),"symbol-z-order":new Fi(_r.layout_symbol["symbol-z-order"],"symbol-z-order"),"icon-allow-overlap":new Fi(_r.layout_symbol["icon-allow-overlap"],"icon-allow-overlap"),"icon-overlap":new Fi(_r.layout_symbol["icon-overlap"],"icon-overlap"),"icon-ignore-placement":new Fi(_r.layout_symbol["icon-ignore-placement"],"icon-ignore-placement"),"icon-optional":new Fi(_r.layout_symbol["icon-optional"],"icon-optional"),"icon-rotation-alignment":new Sn(_r.layout_symbol["icon-rotation-alignment"],"icon-rotation-alignment"),"icon-size":new Sn(_r.layout_symbol["icon-size"],"icon-size"),"icon-text-fit":new Fi(_r.layout_symbol["icon-text-fit"],"icon-text-fit"),"icon-text-fit-padding":new Fi(_r.layout_symbol["icon-text-fit-padding"],"icon-text-fit-padding"),"icon-image":new Sn(_r.layout_symbol["icon-image"],"icon-image"),"icon-rotate":new Sn(_r.layout_symbol["icon-rotate"],"icon-rotate"),"icon-padding":new Sn(_r.layout_symbol["icon-padding"],"icon-padding"),"icon-keep-upright":new Fi(_r.layout_symbol["icon-keep-upright"],"icon-keep-upright"),"icon-offset":new Sn(_r.layout_symbol["icon-offset"],"icon-offset"),"icon-anchor":new Sn(_r.layout_symbol["icon-anchor"],"icon-anchor"),"icon-pitch-alignment":new Fi(_r.layout_symbol["icon-pitch-alignment"],"icon-pitch-alignment"),"text-pitch-alignment":new Fi(_r.layout_symbol["text-pitch-alignment"],"text-pitch-alignment"),"text-rotation-alignment":new Fi(_r.layout_symbol["text-rotation-alignment"],"text-rotation-alignment"),"text-field":new Sn(_r.layout_symbol["text-field"],"text-field"),"text-font":new Sn(_r.layout_symbol["text-font"],"text-font"),"text-size":new Sn(_r.layout_symbol["text-size"],"text-size"),"text-max-width":new Sn(_r.layout_symbol["text-max-width"],"text-max-width"),"text-line-height":new Fi(_r.layout_symbol["text-line-height"],"text-line-height"),"text-letter-spacing":new Sn(_r.layout_symbol["text-letter-spacing"],"text-letter-spacing"),"text-justify":new Sn(_r.layout_symbol["text-justify"],"text-justify"),"text-radial-offset":new Sn(_r.layout_symbol["text-radial-offset"],"text-radial-offset"),"text-variable-anchor":new Fi(_r.layout_symbol["text-variable-anchor"],"text-variable-anchor"),"text-variable-anchor-offset":new Sn(_r.layout_symbol["text-variable-anchor-offset"],"text-variable-anchor-offset"),"text-anchor":new Sn(_r.layout_symbol["text-anchor"],"text-anchor"),"text-max-angle":new Fi(_r.layout_symbol["text-max-angle"],"text-max-angle"),"text-writing-mode":new Fi(_r.layout_symbol["text-writing-mode"],"text-writing-mode"),"text-rotate":new Sn(_r.layout_symbol["text-rotate"],"text-rotate"),"text-padding":new Fi(_r.layout_symbol["text-padding"],"text-padding"),"text-keep-upright":new Fi(_r.layout_symbol["text-keep-upright"],"text-keep-upright"),"text-transform":new Sn(_r.layout_symbol["text-transform"],"text-transform"),"text-offset":new Sn(_r.layout_symbol["text-offset"],"text-offset"),"text-allow-overlap":new Fi(_r.layout_symbol["text-allow-overlap"],"text-allow-overlap"),"text-overlap":new Fi(_r.layout_symbol["text-overlap"],"text-overlap"),"text-ignore-placement":new Fi(_r.layout_symbol["text-ignore-placement"],"text-ignore-placement"),"text-optional":new Fi(_r.layout_symbol["text-optional"],"text-optional"),"symbol-height-offset":new Sn(_r.layout_symbol["symbol-height-offset"],"symbol-height-offset"),"symbol-height-anchor":new Fi(_r.layout_symbol["symbol-height-anchor"],"symbol-height-anchor")})),Lyr=()=>Fyr||(Fyr=new uc({"icon-opacity":new Sn(_r.paint_symbol["icon-opacity"],"icon-opacity"),"icon-color":new Sn(_r.paint_symbol["icon-color"],"icon-color"),"icon-halo-color":new Sn(_r.paint_symbol["icon-halo-color"],"icon-halo-color"),"icon-halo-width":new Sn(_r.paint_symbol["icon-halo-width"],"icon-halo-width"),"icon-halo-blur":new Sn(_r.paint_symbol["icon-halo-blur"],"icon-halo-blur"),"icon-translate":new Fi(_r.paint_symbol["icon-translate"],"icon-translate"),"icon-translate-anchor":new Fi(_r.paint_symbol["icon-translate-anchor"],"icon-translate-anchor"),"text-opacity":new Sn(_r.paint_symbol["text-opacity"],"text-opacity"),"text-color":new Sn(_r.paint_symbol["text-color"],"text-color",{runtimeType:xv,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new Sn(_r.paint_symbol["text-halo-color"],"text-halo-color"),"text-halo-width":new Sn(_r.paint_symbol["text-halo-width"],"text-halo-width"),"text-halo-blur":new Sn(_r.paint_symbol["text-halo-blur"],"text-halo-blur"),"text-translate":new Fi(_r.paint_symbol["text-translate"],"text-translate"),"text-translate-anchor":new Fi(_r.paint_symbol["text-translate-anchor"],"text-translate-anchor")})),Zte={get paint(){return Lyr()},get layout(){return Dyr()}},ant=class{constructor(e){if(e.property.overrides===void 0)throw Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:$k,this.defaultValue=e}evaluate(e){if(e.formattedSection){let t=this.defaultValue.property.overrides;if(t!=null&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){if(!this.defaultValue.isConstant()){let t=this.defaultValue.value;e(t._styleExpression.expression)}}outputDefined(){return!1}serialize(){return null}};Ui("FormatSectionOverride",ant,{omit:["defaultValue"]});vne=e=>e.type==="symbol",Pyr=class aie extends Av{constructor(t,r){super(t,Zte,r)}recalculate(t,r){super.recalculate(t,r);let i=this.layout.get("icon-rotation-alignment");if((i.value.kind!=="constant"||i.value.value==="auto")&&(this.layout._values["icon-rotation-alignment"]=new Yd(i.property,{kind:"constant",value:this.layout.get("symbol-placement")==="point"?"viewport":"map"},i.parameters)),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")==="point"?this.layout._values["text-rotation-alignment"]="viewport":this.layout._values["text-rotation-alignment"]="map"),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").constantOr("viewport")),this.layout.get("symbol-placement")==="point"){let n=this.layout.get("text-writing-mode");if(n){let a=[];for(let o of n)a.includes(o)||a.push(o);this.layout._values["text-writing-mode"]=a}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(t,r,i,n){let a=this.layout.get(t).evaluate(r,{},i,n),o=this._unevaluatedLayout._values[t];return!o.isDataDriven()&&!CB(o.value)&&a?kyr(r.properties,a):a}createBucket(t){return new s8(t)}queryRadius(){return 0}queryIntersectsFeature(){throw Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let t of Zte.paint.overridableProperties){if(!aie.hasPaintOverride(this.layout,t))continue;let r=this.paint.get(t),i=new Uie(new ant(r),`layers[${this.id}].paint.${r.property.name}`,r.property.specification),n=null;n=r.value.kind==="constant"||r.value.kind==="source"?new Ek("source",i):new $z("composite",i,r.value.zoomStops),this.paint._values[t]=new Yd(r.property,n,r.parameters)}}_handleOverridablePaintPropertyUpdate(t,r,i){return!this.layout||r.isDataDriven()||i.isDataDriven()?!1:aie.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,r){let i=t.get("text-field"),n=Zte.paint.properties[r],a=!1,o=s=>{var l;for(let u of s)if((l=n.overrides)!=null&&l.hasOverride(u)){a=!0;return}};if(i.value.kind==="constant"&&i.value.value instanceof Mm)o(i.value.value.sections);else if(i.value.kind==="source"||i.value.kind==="composite"){let s=u=>{if(!a)if(u instanceof ST&&Ql(u.value)===Wk){let c=u.value;o(c.sections)}else u instanceof Mtt?o(u.sections):u.eachChild(s)},l=i.value;l._styleExpression&&s(l._styleExpression.expression)}return a}};zyr=()=>Ryr||(Ryr=new uc({"background-color":new Fi(_r.paint_background["background-color"],"background-color"),"background-pattern":new Irt(_r.paint_background["background-pattern"],"background-pattern"),"background-opacity":new Fi(_r.paint_background["background-opacity"],"background-opacity")})),Byr={get paint(){return zyr()}},ont=e=>e.type==="background",qyr=class extends Av{constructor(e,t){super(e,Byr,t)}};lnt=e=>e.type==="custom",Oyr=class extends Av{constructor(e,t){super(e,{},t),this.onAdd=r=>{this.implementation.onAdd&&this.implementation.onAdd(r,r.painter.context.gl)},this.onRemove=r=>{this.implementation.onRemove&&this.implementation.onRemove(r,r.painter.context.gl)},this.implementation=e}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw Error("Custom layers cannot be serialized")}};Nyr=class{constructor(e){this._methodToThrottle=e,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var e;this._triggered||(this._triggered=!0,(e=this._channel)==null||e.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}},Uyr={once:!0},unt=class{constructor(e,t){this.target=e,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new Nyr(()=>this.process()),this.subscription=Nz(this.target,"message",r=>this.receive(r),!1),this.globalScope=Hb(self)?e:window}registerMessageHandler(e,t){this.messageHandlers[e]=t}unregisterMessageHandler(e){delete this.messageHandlers[e]}sendAsync(e,t){return new Promise((r,i)=>{let n=Math.round(Math.random()*1e18).toString(36).substring(0,10),a=t?Nz(t.signal,"abort",()=>{a==null||a.unsubscribe(),delete this.resolveRejects[n];let l={id:n,type:"<cancel>",origin:location.origin,targetMapId:e.targetMapId,sourceMapId:this.mapId};this.target.postMessage(l),i(new RT(t.signal.reason))},Uyr):null;this.resolveRejects[n]={resolve:l=>{a==null||a.unsubscribe(),r(l)},reject:l=>{a==null||a.unsubscribe(),i(l)}};let o=[],s=ma(fn({},e),{id:n,sourceMapId:this.mapId,origin:location.origin,data:xk(e.data,o)});this.target.postMessage(s,{transfer:o})})}receive(e){let t=e.data,r=t.id,i=["file://","resource://android","null"],n=[t.origin,location.origin],a=t.origin===location.origin,o=n.some(s=>i.includes(s));if((a||o)&&!(t.targetMapId&&this.mapId!==t.targetMapId)){if(t.type==="<cancel>"){delete this.tasks[r];let s=this.abortControllers[r];delete this.abortControllers[r],s&&s.abort();return}if(Hb(self)||t.mustQueue){this.tasks[r]=t,this.taskQueue.push(r),this.invoker.trigger();return}this.processTask(r,t)}}process(){if(this.taskQueue.length===0)return;let e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(e,t)}processTask(e,t){return Ki(this,null,function*(){if(t.type==="<response>"){let n=this.resolveRejects[e];if(delete this.resolveRejects[e],!n)return;t.error?n.reject(Ic(_k(t.error))):n.resolve(_k(t.data));return}if(!this.messageHandlers[t.type]){this.completeTask(e,null,null);return}let r=_k(t.data),i=new AbortController;this.abortControllers[e]=i;try{let n=yield this.messageHandlers[t.type](t.sourceMapId,r,i);this.completeTask(e,null,n)}catch(n){this.completeTask(e,Ic(n))}})}completeTask(e,t,r){let i=[];delete this.abortControllers[e];let n={id:e,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:t?xk(t):null,data:xk(r,i)};this.target.postMessage(n,{transfer:i})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}};l8=class{constructor(e,t,r){if(!Vyr(e,t,r))throw Error(`x=${t}, y=${r}, z=${e} outside of bounds. 0<=x<${2**e}, 0<=y<${2**e} 0<=z<=25 `);this.z=e,this.x=t,this.y=r,this.key=Vb(0,e,e,t,r)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,t,r){let i=Gyr(this.x,this.y,this.z),n=Hyr(this.z,this.x,this.y);return e[(this.x+this.y)%e.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(r==="tms"?2**this.z-this.y-1:this.y)).replace(/{ratio}/g,t>1?"@2x":"").replace(/{quadkey}/g,n).replace(/{bbox-epsg-3857}/g,i)}isChildOf(e){let t=this.z-e.z;return t>0&&e.x===this.x>>t&&e.y===this.y>>t}getTilePoint(e){let t=2**this.z;return new tr((e.x*t-this.x)*zr,(e.y*t-this.y)*zr)}toString(){return`${this.z}/${this.x}/${this.y}`}},u8=class{constructor(e,t){this.wrap=e,this.canonical=t,this.key=Vb(e,t.z,t.z,t.x,t.y)}},Bc=class $d{constructor(t,r,i,n,a){if(this.terrainRttPosMatrix32f=null,t<i)throw Error(`overscaledZ should be >= z; overscaledZ = ${t}; z = ${i}`);this.overscaledZ=t,this.wrap=r,this.canonical=new l8(i,+n,+a),this.key=Vb(r,t,i,n,a)}clone(){return new $d(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)}scaledTo(t){if(t>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);let r=this.canonical.z-t;return t>this.canonical.z?new $d(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new $d(t,this.wrap,t,this.canonical.x>>r,this.canonical.y>>r)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(t,r){if(t>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);let i=this.canonical.z-t;return t>this.canonical.z?Vb(this.wrap*+r,t,this.canonical.z,this.canonical.x,this.canonical.y):Vb(this.wrap*+r,t,t,this.canonical.x>>i,this.canonical.y>>i)}isChildOf(t){if(t.wrap!==this.wrap||this.overscaledZ-t.overscaledZ<=0)return!1;if(t.overscaledZ===0)return this.overscaledZ>0;let r=this.canonical.z-t.canonical.z;return r<0?!1:t.canonical.x===this.canonical.x>>r&&t.canonical.y===this.canonical.y>>r}children(t){if(this.overscaledZ>=t)return[new $d(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let r=this.canonical.z+1,i=this.canonical.x*2,n=this.canonical.y*2;return[new $d(r,this.wrap,r,i,n),new $d(r,this.wrap,r,i+1,n),new $d(r,this.wrap,r,i,n+1),new $d(r,this.wrap,r,i+1,n+1)]}isLessThan(t){return this.wrap<t.wrap?!0:this.wrap>t.wrap?!1:this.overscaledZ<t.overscaledZ?!0:this.overscaledZ>t.overscaledZ?!1:this.canonical.x<t.canonical.x?!0:this.canonical.x>t.canonical.x?!1:this.canonical.y<t.canonical.y}wrapped(){return new $d(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(t){return new $d(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return 2**(this.overscaledZ-this.canonical.z)}toUnwrapped(){return new u8(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(t){return this.canonical.getTilePoint(new wo(t.x-this.wrap,t.y))}normalizeCoordinates(t,r,i=zr){if(t>=0&&t<i&&r>=0&&r<i)return{tileID:this,x:t,y:r};let n=Math.floor(t/i),a=Math.floor(r/i),o=t-n*i,s=r-a*i,l=this.canonical.z,u=1<<l,c=this.canonical.y+a;if(c<0||c>=u)return null;let f=this.canonical.x+n,h=this.wrap;return f<0?(h-=Math.ceil(-f/u),f=(f%u+u)%u):f>=u&&(h+=Math.floor(f/u),f%=u),{tileID:new $d(this.overscaledZ,h,l,f,c),x:o,y:s}}};Kte=Math.PI*6378137;Ui("CanonicalTileID",l8),Ui("OverscaledTileID",Bc,{omit:["terrainRttPosMatrix32f"]});c8="_geojsonTileLayer",jyr=class{constructor(e){this._stringToNumber={},this._numberToString=[];for(let t=0;t<e.length;t++){let r=e[t];this._stringToNumber[r]=t,this._numberToString[t]=r}}encode(e){return this._stringToNumber[e]}decode(e){if(e>=this._numberToString.length)throw Error(`Out of bounds. Index requested n=${e} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[e]}},yne=class{constructor(e,t,r,i,n){this.type="Feature",this._vectorTileFeature=e,this._x=r,this._y=i,this._z=t;for(let a in e.properties)typeof e.properties[a]=="string"&&e.properties[a].startsWith("__$json__:")&&(e.properties[a]=JSON.parse(e.properties[a].slice(10)));this.properties=e.properties,this.id=n}projectPoint(e,t,r,i){return[(e.x+t)*360/i-180,360/Math.PI*Math.atan(Math.exp((1-(e.y+r)*2/i)*Math.PI))-90]}projectLine(e,t,r,i){return e.map(n=>this.projectPoint(n,t,r,i))}get geometry(){if(this._geometry)return this._geometry;let e=this._vectorTileFeature,t=e.extent*2**this._z,r=e.extent*this._x,i=e.extent*this._y,n=e.loadGeometry();switch(e.type){case 1:{let a=[];for(let s of n)a.push(s[0]);let o=this.projectLine(a,r,i,t);this._geometry=a.length===1?{type:"Point",coordinates:o[0]}:{type:"MultiPoint",coordinates:o};break}case 2:{let a=n.map(o=>this.projectLine(o,r,i,t));this._geometry=a.length===1?{type:"LineString",coordinates:a[0]}:{type:"MultiLineString",coordinates:a};break}case 3:{let a=Tit(n),o=[];for(let s of a)o.push(s.map(l=>this.projectLine(l,r,i,t)));this._geometry=o.length===1?{type:"Polygon",coordinates:o[0]}:{type:"MultiPolygon",coordinates:o};break}default:throw Error(`unknown feature type: ${e.type}`)}return this._geometry}set geometry(e){this._geometry=e}toJSON(){let e={geometry:this.geometry};for(let t in this)t!=="_geometry"&&t!=="_vectorTileFeature"&&t!=="_x"&&t!=="_y"&&t!=="_z"&&(e[t]=this[t]);return e}},r3=class{constructor(e,t,r){this._name=e,this.dataBuffer=t,typeof r=="number"?this._size=r:(this.nullabilityBuffer=r,this._size=r.size())}getValue(e){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(e)?null:this.getValueFromBuffer(e)}has(e){var t;return((t=this.nullabilityBuffer)==null?void 0:t.get(e))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}},KB=class extends r3{},xne=class extends KB{getValueFromBuffer(e){return this.dataBuffer[e]}},_ne=class extends KB{getValueFromBuffer(e){return this.dataBuffer[e]}},cnt=class extends r3{constructor(e,t,r,i){super(e,t,i),this.delta=r}},bne=class extends cnt{constructor(e,t,r,i,n){super(e,n?Int32Array.of(t):Uint32Array.of(t),r,i)}getValueFromBuffer(e){return this.dataBuffer[0]+e*this.delta}},wne=class extends r3{constructor(e,t,r,i){super(e,i?Int32Array.of(t):Uint32Array.of(t),r)}getValueFromBuffer(e){return this.dataBuffer[0]}},$yr=class{constructor(e,t,r,i,n=4096){if(this._name=e,this._geometryVector=t,this._idVector=r,this._propertyVectors=i,this._extent=n,e.length===0)throw Error("Missing layer name")}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){var e;return(e=this._propertyVectors)!=null?e:[]}getPropertyVector(e){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this.propertyVectors.map(t=>[t.name,t]))),this.propertyVectorsMap.get(e)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let e=[],t=this.geometryVector.getGeometries();for(let r=0;r<this.numFeatures;r++){let i;if(this.idVector){let o=this.idVector.getValue(r);o!==null&&(i=this.containsMaxSafeIntegerValues(this.idVector)?Number(o):o)}let n={coordinates:t[r],type:this.geometryVector.geometryType(r)},a={};for(let o of this.propertyVectors){if(!o)continue;let s=o.name,l=o.getValue(r);l!==null&&(a[s]=l)}e.push({id:i,geometry:n,properties:a})}return e}containsMaxSafeIntegerValues(e){return e instanceof xne||e instanceof wne||e instanceof bne||e instanceof _ne}},pk={FEATURE:0,VERTEX:1},go={BOOLEAN:0,INT_8:1,UINT_8:2,INT_32:3,UINT_32:4,INT_64:5,UINT_64:6,FLOAT:7,DOUBLE:8,STRING:9},Z2={GEOMETRY:0,STRUCT:1,MAP:2},fnt={ID:0},hnt=class{constructor(e){this.value=e}get(){return this.value}set(e){this.value=e}increment(){return this.value++}add(e){this.value+=e}};(function(e){e.NONE="NONE",e.DELTA="DELTA",e.COMPONENTWISE_DELTA="COMPONENTWISE_DELTA",e.RLE="RLE",e.MORTON="MORTON"})(da||(da={}));(function(e){e.NONE="NONE",e.FAST_PFOR="FAST_PFOR",e.VARINT="VARINT"})(Kd||(Kd={}));Tne=new Uint32Array(33);Tne[0]=0;for(let e=1;e<=32;e++)Tne[e]=e===32?4294967295:4294967295>>>32-e;oie=Tne,dnt=65536;sie=Yyr(dnt),y2r=3*sie/256+sie|0;(function(e){e.PRESENT="PRESENT",e.DATA="DATA",e.OFFSET="OFFSET",e.LENGTH="LENGTH"})(pu||(pu={}));(function(e){e.NONE="NONE",e.SINGLE="SINGLE",e.SHARED="SHARED",e.VERTEX="VERTEX",e.MORTON="MORTON",e.FSST="FSST"})(sh||(sh={}));(function(e){e.VERTEX="VERTEX",e.INDEX="INDEX",e.STRING="STRING",e.KEY="KEY"})(wm||(wm={}));(function(e){e.VAR_BINARY="VAR_BINARY",e.GEOMETRIES="GEOMETRIES",e.PARTS="PARTS",e.RINGS="RINGS",e.TRIANGLES="TRIANGLES",e.SYMBOL="SYMBOL",e.DICTIONARY="DICTIONARY"})(lc||(lc={}));lxr=[pu.PRESENT,pu.DATA,pu.OFFSET,pu.LENGTH],met=[da.NONE,da.DELTA,da.COMPONENTWISE_DELTA,da.RLE,da.MORTON],uxr=[Kd.NONE,Kd.FAST_PFOR,Kd.VARINT],cxr=[sh.NONE,sh.SINGLE,sh.SHARED,sh.VERTEX,sh.MORTON,sh.FSST],fxr=[wm.VERTEX,wm.INDEX,wm.STRING,wm.KEY],hxr=[lc.VAR_BINARY,lc.GEOMETRIES,lc.PARTS,lc.RINGS,lc.TRIANGLES,lc.SYMBOL,lc.DICTIONARY];(function(e){e[e.FLAT=0]="FLAT",e[e.CONST=1]="CONST",e[e.SEQUENCE=2]="SEQUENCE",e[e.DICTIONARY=3]="DICTIONARY",e[e.FSST_DICTIONARY=4]="FSST_DICTIONARY"})(Gs||(Gs={}));bv=class{constructor(e,t){this.values=e,this._size=t}get(e){let t=Math.floor(e/8),r=e%8;return(this.values[t]>>r&1)==1}set(e,t){let r=Math.floor(e/8),i=e%8;this.values[r]=this.values[r]|+!!t<<i}getInt(e){let t=Math.floor(e/8),r=e%8;return this.values[t]>>r&1}size(){return this._size}getBuffer(){return this.values}};_xr=new TextDecoder;Snt=class extends KB{getValueFromBuffer(e){return this.dataBuffer[e]}},Ent=class extends cnt{constructor(e,t,r,i,n){super(e,n?BigInt64Array.of(t):BigUint64Array.of(t),r,i)}getValueFromBuffer(e){return this.dataBuffer[0]+BigInt(e)*this.delta}};(function(e){e[e.POINT=0]="POINT",e[e.LINESTRING=1]="LINESTRING",e[e.POLYGON=2]="POLYGON",e[e.MULTIPOINT=3]="MULTIPOINT",e[e.MULTILINESTRING=4]="MULTILINESTRING",e[e.MULTIPOLYGON=5]="MULTIPOLYGON"})(uf||(uf={}));(function(e){e[e.POINT=0]="POINT",e[e.LINESTRING=1]="LINESTRING",e[e.POLYGON=2]="POLYGON"})(Lxr||(Lxr={}));(function(e){e[e.MORTON=0]="MORTON",e[e.VEC_2=1]="VEC_2",e[e.VEC_3=2]="VEC_3"})(n3||(n3={}));knt=class{constructor(e,t,r,i,n){this._vertexBufferType=e,this._topologyVector=t,this._vertexOffsets=r,this._vertexBuffer=i,this._mortonSettings=n}get vertexBufferType(){return this._vertexBufferType}get topologyVector(){return this._topologyVector}get vertexOffsets(){return this._vertexOffsets}get vertexBuffer(){return this._vertexBuffer}getSimpleEncodedVertex(e){let t=this.vertexOffsets?this.vertexOffsets[e]*2:e*2;return[this.vertexBuffer[t],this.vertexBuffer[t+1]]}getVertex(e){if(this.vertexOffsets&&this.mortonSettings){let r=this.vertexOffsets[e],i=this.vertexBuffer[r],n=Dne(i,this.mortonSettings.numBits,this.mortonSettings.coordinateShift);return[n.x,n.y]}let t=this.vertexOffsets?this.vertexOffsets[e]*2:e*2;return[this.vertexBuffer[t],this.vertexBuffer[t+1]]}getGeometries(){return Pxr(this)}get mortonSettings(){return this._mortonSettings}};Cnt=class extends knt{constructor(e,t,r,i,n,a,o){super(r,i,n,a,o),this._numGeometries=e,this._geometryType=t}geometryType(e){return this._geometryType}get numGeometries(){return this._numGeometries}containsPolygonGeometry(){return this._geometryType===uf.POLYGON||this._geometryType===uf.MULTIPOLYGON}containsSingleGeometryType(){return!0}};Fnt=class extends knt{constructor(e,t,r,i,n,a){super(e,r,i,n,a),this._geometryTypes=t}geometryType(e){return this._geometryTypes[e]}get numGeometries(){return this._geometryTypes.length}containsPolygonGeometry(){for(let e=0;e<this.numGeometries;e++)if(this.geometryType(e)===uf.POLYGON||this.geometryType(e)===uf.MULTIPOLYGON)return!0;return!1}containsSingleGeometryType(){return!1}},Lnt=class{constructor(e,t,r,i){this._triangleOffsets=e,this._indexBuffer=t,this._vertexBuffer=r,this._topologyVector=i}get triangleOffsets(){return this._triangleOffsets}get indexBuffer(){return this._indexBuffer}get vertexBuffer(){return this._vertexBuffer}get topologyVector(){return this._topologyVector}getGeometries(){if(!this._topologyVector)throw Error("Cannot convert GpuVector to coordinates without topology information");let e=new Uint32Array(this.numGeometries);for(let t=0;t<this.numGeometries;t++)e[t]=this.geometryType(t);return Dnt(e,this._topologyVector,void 0,this._vertexBuffer).getGeometries()}[Symbol.iterator](){return null}};Oxr=class extends Lnt{constructor(e,t,r,i,n,a){super(r,i,n,a),this._numGeometries=e,this._geometryType=t}geometryType(e){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}};Nxr=class extends Lnt{constructor(e,t,r,i,n){super(t,r,i,n),this._geometryTypes=e}geometryType(e){return this._geometryTypes[e]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}};Hxr=class extends r3{constructor(e,t,r){super(e,t.getBuffer(),r),this.dataVector=t}getValueFromBuffer(e){return this.dataVector.get(e)}},jxr=class extends KB{getValueFromBuffer(e){return this.dataBuffer[e]}},Pnt=class extends r3{constructor(e,t,r,i){super(e,i?BigInt64Array.of(t):BigUint64Array.of(t),r)}getValueFromBuffer(e){return this.dataBuffer[0]}},Fne=class extends r3{constructor(e,t,r,i){super(e,r,i),this.offsetBuffer=t}},wet=class extends Fne{constructor(e,t,r,i){super(e,t,r,i!=null?i:t.length-1)}getValueFromBuffer(e){let t=this.offsetBuffer[e],r=this.offsetBuffer[e+1];return Ene(this.dataBuffer,t,r)}},wT=class extends Fne{constructor(e,t,r,i,n){super(e,r,i,n!=null?n:t.length),this.indexBuffer=t,this.indexBuffer=t}getValueFromBuffer(e){let t=this.indexBuffer[e],r=this.offsetBuffer[t],i=this.offsetBuffer[t+1];return Ene(this.dataBuffer,r,i)}};Int=class extends Fne{constructor(e,t,r,i,n,a,o,s){super(e,r,i,o!=null?o:t.length),this.indexBuffer=t,this.symbolOffsetBuffer=n,this.symbolTableBuffer=a,this.sharedDictionaryCache=s}getValueFromBuffer(e){var n,a,o;(o=this.decodedDictionary)!=null||(this.decodedDictionary=(n=this.sharedDictionaryCache)==null?void 0:n.decodedDictionary,(a=this.decodedDictionary)!=null||(this.decodedDictionary=this.decodeDictionary(),this.sharedDictionaryCache&&(this.sharedDictionaryCache.decodedDictionary=this.decodedDictionary)));let t=this.indexBuffer[e],r=this.offsetBuffer[t],i=this.offsetBuffer[t+1];return Ene(this.decodedDictionary,r,i)}decodeDictionary(){var e;return(e=this.symbolLengthBuffer)!=null||(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),Wxr(this.symbolTableBuffer,this.symbolLengthBuffer,this.dataBuffer)}offsetToLengthBuffer(e){let t=new Uint32Array(e.length-1),r=e[0];for(let i=1;i<e.length;i++){let n=e[i];t[i-1]=n-r,r=n}return t}};Tet=class extends r3{constructor(e,t,r){super(e,new Uint8Array,r!=null?r:t.length),this.values=t}getValueFromBuffer(e){return this.values[e]}};(function(e){e[e.STRING=1]="STRING",e[e.INT32=2]="INT32",e[e.UINT32=4]="UINT32",e[e.INT64=8]="INT64",e[e.UINT64=16]="UINT64",e[e.FLOAT=32]="FLOAT",e[e.DOUBLE=64]="DOUBLE",e[e.PRESENCE=128]="PRESENCE"})(Tm||(Tm={}));(function(e){e[e.FALSE=0]="FALSE",e[e.TRUE=1]="TRUE",e[e.START_MAP=2]="START_MAP",e[e.START_LIST=3]="START_LIST",e[e.COUNT=4]="COUNT"})(Ob||(Ob={}));sc={ID:0,ID_NULLABLE:1,ID_LONG:2,GEOMETRY:4,SCALAR_BASE:10,STRUCT:30,MAP:31};x_r=new TextDecoder,Met="0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT), 31(MAP)";M_r=class{constructor(e,t){var r;switch(this._featureData=e,this.properties=this._featureData.properties||{},(r=this._featureData.geometry)==null?void 0:r.type){case uf.POINT:case uf.MULTIPOINT:this.type=1;break;case uf.LINESTRING:case uf.MULTILINESTRING:this.type=2;break;case uf.POLYGON:case uf.MULTIPOLYGON:this.type=3;break;default:this.type=0}this.extent=t,this.id=Number(this._featureData.id)}loadGeometry(){let e=[];for(let t of this._featureData.geometry.coordinates){let r=[];for(let i of t)r.push(new tr(i.x,i.y));e.push(r)}return e}},S_r=class{constructor(e){this.features=[],this.featureTable=e,this.name=e.name,this.extent=e.extent,this.version=2,this.features=e.getFeatures(),this.length=this.features.length}feature(e){return new M_r(this.features[e],this.extent)}},E_r=class{constructor(e){this.layers={};let t=T_r(new Uint8Array(e));this.layers=t.reduce((r,i)=>ma(fn({},r),{[i.name]:new S_r(i)}),{})}},k_r=class{constructor(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new fre(zr,16,0),this.grid3D=new fre(zr,16,0),this.featureIndexArray=new jrt,this.promoteId=t}insert(e,t,r,i,n,a){let o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,i,n);let s=a?this.grid3D:this.grid;for(let l of t){let u=[1/0,1/0,-1/0,-1/0];for(let c of l)u[0]=Math.min(u[0],c.x),u[1]=Math.min(u[1],c.y),u[2]=Math.max(u[2],c.x),u[3]=Math.max(u[3],c.y);u[0]<8192&&u[1]<8192&&u[2]>=0&&u[3]>=0&&s.insert(o,u[0],u[1],u[2],u[3])}}loadVTLayers(){return this.vtLayers||(this.encoding==="mlt"?this.vtLayers=new E_r(this.rawTileData).layers:this.vtLayers=new ggr(new Vit(this.rawTileData)).layers,this.sourceLayerCoder=new jyr(this.vtLayers?Object.keys(this.vtLayers).sort():[c8])),this.vtLayers}query(e,t,r,i){this.loadVTLayers();let n=e.params,a=zr/e.tileSize/e.scale,o=CT(n.filter,"queryRenderedFeatures filter",n.globalState),s=e.queryGeometry,l=e.queryPadding*a,u=Jd.fromPoints(s),c=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l),f=Jd.fromPoints(e.cameraQueryGeometry).expandBy(l),h=this.grid3D.query(f.minX,f.minY,f.maxX,f.maxY,(v,m,g,w)=>a1r(e.cameraQueryGeometry,v-l,m-l,g+l,w+l));for(let v of h)c.push(v);c.sort(D_r);let d={},p;for(let v of c){if(v===p)continue;p=v;let m=this.featureIndexArray.get(v),g=null;this.loadMatchingFeature(d,m.bucketIndex,m.sourceLayerIndex,m.featureIndex,o,n.layers,n.availableImages,t,r,i,(w,b,_)=>(g||(g=Qb(w)),b.queryIntersectsFeature({queryGeometry:s,feature:w,featureState:_,geometry:g,zoom:this.z,transform:e.transform,pixelsToTileUnits:a,pixelPosMatrix:e.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:e.getElevation})))}return d}loadMatchingFeature(e,t,r,i,n,a,o,s,l,u,c){let f=this.bucketLayerIDs[t];if(a&&!f.some(v=>a.has(v)))return;let h=this.sourceLayerCoder.decode(r),d=this.vtLayers[h].feature(i);if(n.needGeometry){let v=tx(d,!0);if(!n.filter(new Co(this.tileID.overscaledZ),v,this.tileID.canonical))return}else if(!n.filter(new Co(this.tileID.overscaledZ),d))return;let p=this.getId(d,h);for(let v of f){if(a&&!a.has(v))continue;let m=s[v];if(!m)continue;let g={};p&&u&&(g=u.getState(m.sourceLayer||"_geojsonTileLayer",p));let w=ln({},l[v]);w.paint=Eet(w.paint,m.paint,d,g,o),w.layout=Eet(w.layout,m.layout,d,g,o);let b=!c||c(d,m,g);if(!b)continue;let _=new yne(d,this.z,this.x,this.y,p);_.layer=w;let M=e[v];M===void 0&&(M=e[v]=[]),M.push({featureIndex:i,feature:_,intersectionZ:b})}}lookupSymbolFeatures(e,t,r,i,n,a,o,s){let l={};this.loadVTLayers();let u=CT(n.filterSpec,"queryRenderedFeatures symbol filter",n.globalState);for(let c of e)this.loadMatchingFeature(l,r,i,c,u,a,o,s,t);return l}hasLayer(e){for(let t of this.bucketLayerIDs)for(let r of t)if(e===r)return!0;return!1}getId(e,t){var i;let r=e.id;if(this.promoteId){let n=typeof this.promoteId=="string"?this.promoteId:this.promoteId[t];r=e.properties[n],typeof r=="boolean"&&(r=Number(r)),r===void 0&&((i=e.properties)!=null&&i.cluster)&&this.promoteId&&(r=Number(e.properties.cluster_id))}return r}};Ui("FeatureIndex",k_r,{omit:["rawTileData","sourceLayerCoder"]});Unt=class{constructor(e,t){this.max=e,this.onRemove=t,this.reset()}reset(){for(let e in this.data)for(let t of this.data[e])t.timeout&&clearTimeout(t.timeout),this.onRemove(t.value);return this.data={},this.order=[],this}add(e,t,r){let i=e.wrapped().key;this.data[i]===void 0&&(this.data[i]=[]);let n={value:t,timeout:void 0};if(r!==void 0&&(n.timeout=setTimeout(()=>{this.remove(e,n)},r)),this.data[i].push(n),this.order.push(i),this.order.length>this.max){let a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){let t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),this.data[e].length===0&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value}getByKey(e){let t=this.data[e];return t?t[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,t){if(!this.has(e))return this;let r=e.wrapped().key,i=t===void 0?0:this.data[r].indexOf(t),n=this.data[r][i];return this.data[r].splice(i,1),n.timeout&&clearTimeout(n.timeout),this.data[r].length===0&&delete this.data[r],this.onRemove(n.value),this.order.splice(this.order.indexOf(r),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){let t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this}filter(e){let t=[];for(let r in this.data)for(let i of this.data[r])e(i.value)||t.push(i);for(let r of t)this.remove(r.value.tileID,r)}}});var Pst={};Fp(Pst,{AJAXError:()=>TT,AttributionControl:()=>Mst,BoxZoomHandler:()=>dst,CanvasSource:()=>vot,CooperativeGesturesHandler:()=>Tst,DoubleClickZoomHandler:()=>xst,DragPanHandler:()=>_st,DragRotateHandler:()=>bst,EXTENT:()=>zr,EdgeInsets:()=>cae,ErrorEvent:()=>An,Event:()=>e0,Evented:()=>mu,FullscreenControl:()=>YTr,FullscreenEvent:()=>mae,GPUInitializationError:()=>cst,GeoJSONSource:()=>cot,GeolocateControl:()=>GTr,GeolocateErrorEvent:()=>Fst,GeolocateEvent:()=>s3,GeolocatePositionEvent:()=>gae,GlobeControl:()=>ZTr,Hash:()=>hst,ImageSource:()=>XT,KeyboardHandler:()=>mst,LngLat:()=>mn,LngLatBounds:()=>Ev,LogoControl:()=>Sst,Map:()=>RTr,MapBoxZoomEvent:()=>eae,MapContextEvent:()=>pq,MapLibreEvent:()=>cc,MapLibreMap:()=>RTr,MapMouseEvent:()=>O0,MapMovementEvent:()=>Mn,MapProjectionEvent:()=>Kat,MapSourceDataEvent:()=>Is,MapStyleDataEvent:()=>rp,MapStyleImageMissingEvent:()=>Jat,MapStyleLoadEvent:()=>Qne,MapTerrainEvent:()=>Zat,MapTouchEvent:()=>b8,MapWheelEvent:()=>Xat,Marker:()=>vae,MarkerClickEvent:()=>Dst,MarkerDragEvent:()=>o3,MercatorCoordinate:()=>wo,NavigationControl:()=>BTr,Point:()=>tr,Popup:()=>QTr,PopupEvent:()=>yae,RasterDEMTileSource:()=>lot,RasterTileSource:()=>Tae,ScaleControl:()=>jTr,ScrollZoomHandler:()=>yst,Style:()=>hae,TerrainControl:()=>XTr,TwoFingersTouchPitchHandler:()=>gst,TwoFingersTouchRotateHandler:()=>vst,TwoFingersTouchZoomHandler:()=>pst,TwoFingersTouchZoomRotateHandler:()=>wst,VectorTileSource:()=>sot,VideoSource:()=>pot,addProtocol:()=>ltt,addSourceType:()=>$br,clearPrewarmedResources:()=>ybr,config:()=>Qh,createTileMesh:()=>hot,getGlobalDispatcher:()=>wae,getMaxParallelImageRequests:()=>s6r,getRTLTextPluginStatus:()=>i6r,getVersion:()=>n6r,getWorkerCount:()=>a6r,getWorkerUrl:()=>u6r,importScriptInWorkers:()=>f6r,isTimeFrozen:()=>z_r,now:()=>Oo,prewarm:()=>mbr,removeProtocol:()=>utt,restoreNow:()=>R_r,setMaxParallelImageRequests:()=>l6r,setNow:()=>I_r,setRTLTextPlugin:()=>r6r,setWorkerCount:()=>o6r,setWorkerUrl:()=>c6r});function Yat(){var e=new Nu(4);return Nu!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function F_r(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=r*a-n*i;return o?(o=1/o,e[0]=a*o,e[1]=-i*o,e[2]=-n*o,e[3]=r*o,e):null}function L_r(e){return e[0]*e[3]-e[2]*e[1]}function P_r(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=Math.sin(r),l=Math.cos(r);return e[0]=i*l+a*s,e[1]=n*l+o*s,e[2]=i*-s+a*l,e[3]=n*-s+o*l,e}function Oo(){return Eq.getCurrentTime()}function I_r(e){Eq.setNow(e)}function R_r(){Eq.restoreNow()}function z_r(){return Eq.isFrozen()}function q_r(e,t){let r={};for(let i in e)i!=="ref"&&(r[i]=e[i]);return htt.forEach(i=>{i in t&&(r[i]=t[i])}),r}function Gnt(e){e=e.slice();let t=Object.create(null);for(let r=0;r<e.length;r++)t[e[r].id]=e[r];for(let r=0;r<e.length;r++)"ref"in e[r]&&(e[r]=q_r(e[r],t[e[r].ref]));return e}function qo(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!qo(e[r],t[r]))return!1;return!0}if(typeof e=="object"&&e&&t!==null){if(typeof t!="object"||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(!qo(e[r],t[r]))return!1;return!0}return e===t}function ip(e,t){e.push(t)}function Qat(e,t,r){ip(r,{command:"addSource",args:[e,t[e]]})}function eot(e,t,r){ip(t,{command:"removeSource",args:[e]}),r[e]=!0}function O_r(e,t,r,i){eot(e,r,i),Qat(e,t,r)}function N_r(e,t,r){let i;for(i in e[r])if(Object.prototype.hasOwnProperty.call(e[r],i)&&i!=="data"&&!qo(e[r][i],t[r][i]))return!1;for(i in t[r])if(Object.prototype.hasOwnProperty.call(t[r],i)&&i!=="data"&&!qo(e[r][i],t[r][i]))return!1;return!0}function U_r(e,t,r,i){e||(e={}),t||(t={});let n;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Object.prototype.hasOwnProperty.call(t,n)||eot(n,r,i));for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(Object.prototype.hasOwnProperty.call(e,n)?qo(e[n],t[n])||(e[n].type==="geojson"&&t[n].type==="geojson"&&N_r(e,t,n)?ip(r,{command:"setGeoJSONSourceData",args:[n,t[n].data]}):O_r(n,t,r,i)):Qat(n,t,r))}function eq(e,t,r,i,n,a){e||(e={}),t||(t={});for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(qo(e[o],t[o])||r.push({command:a,args:[i,o,t[o],n]}));for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&!Object.prototype.hasOwnProperty.call(e,o)&&(qo(e[o],t[o])||r.push({command:a,args:[i,o,t[o],n]}))}function Hnt(e){return e.id}function jnt(e,t){return e[t.id]=t,e}function V_r(e,t,r){e||(e=[]),t||(t=[]);let i=e.map(Hnt),n=t.map(Hnt),a=e.reduce(jnt,{}),o=t.reduce(jnt,{}),s=i.slice(),l=Object.create(null),u,c,f,h,d;for(let p=0,v=0;p<i.length;p++)u=i[p],Object.prototype.hasOwnProperty.call(o,u)?v++:(ip(r,{command:"removeLayer",args:[u]}),s.splice(s.indexOf(u,v),1));for(let p=0,v=0;p<n.length;p++)u=n[n.length-1-p],s[s.length-1-p]!==u&&(Object.prototype.hasOwnProperty.call(a,u)?(ip(r,{command:"removeLayer",args:[u]}),s.splice(s.lastIndexOf(u,s.length-v),1)):v++,h=s[s.length-p],ip(r,{command:"addLayer",args:[o[u],h]}),s.splice(s.length-p,0,u),l[u]=!0);for(let p=0;p<n.length;p++)if(u=n[p],c=a[u],f=o[u],!(l[u]||qo(c,f))){if(!qo(c.source,f.source)||!qo(c["source-layer"],f["source-layer"])||!qo(c.type,f.type)){ip(r,{command:"removeLayer",args:[u]}),h=s[s.lastIndexOf(u)+1],ip(r,{command:"addLayer",args:[f,h]});continue}for(d in eq(c.layout,f.layout,r,u,null,"setLayoutProperty"),eq(c.paint,f.paint,r,u,null,"setPaintProperty"),qo(c.filter,f.filter)||ip(r,{command:"setFilter",args:[u,f.filter]}),(!qo(c.minzoom,f.minzoom)||!qo(c.maxzoom,f.maxzoom))&&ip(r,{command:"setLayerZoomRange",args:[u,f.minzoom,f.maxzoom]}),c)Object.prototype.hasOwnProperty.call(c,d)&&d!=="layout"&&d!=="paint"&&d!=="filter"&&d!=="metadata"&&d!=="minzoom"&&d!=="maxzoom"&&(d.indexOf("paint.")===0?eq(c[d],f[d],r,u,d.slice(6),"setPaintProperty"):qo(c[d],f[d])||ip(r,{command:"setLayerProperty",args:[u,d,f[d]]}));for(d in f)Object.prototype.hasOwnProperty.call(f,d)&&!Object.prototype.hasOwnProperty.call(c,d)&&d!=="layout"&&d!=="paint"&&d!=="filter"&&d!=="metadata"&&d!=="minzoom"&&d!=="maxzoom"&&(d.indexOf("paint.")===0?eq(c[d],f[d],r,u,d.slice(6),"setPaintProperty"):qo(c[d],f[d])||ip(r,{command:"setLayerProperty",args:[u,d,f[d]]}))}}function G_r(e,t){if(!e)return[{command:"setStyle",args:[t]}];let r=[];try{if(!qo(e.version,t.version))return[{command:"setStyle",args:[t]}];qo(e.center,t.center)||r.push({command:"setCenter",args:[t.center]}),qo(e.state,t.state)||r.push({command:"setGlobalState",args:[t.state]}),qo(e.centerAltitude,t.centerAltitude)||r.push({command:"setCenterAltitude",args:[t.centerAltitude]}),qo(e.zoom,t.zoom)||r.push({command:"setZoom",args:[t.zoom]}),qo(e.bearing,t.bearing)||r.push({command:"setBearing",args:[t.bearing]}),qo(e.pitch,t.pitch)||r.push({command:"setPitch",args:[t.pitch]}),qo(e.roll,t.roll)||r.push({command:"setRoll",args:[t.roll]}),qo(e.sprite,t.sprite)||r.push({command:"setSprite",args:[t.sprite]}),qo(e.glyphs,t.glyphs)||r.push({command:"setGlyphs",args:[t.glyphs]}),qo(e["font-faces"],t["font-faces"])||r.push({command:"setFontFaces",args:[t["font-faces"]]}),qo(e.transition,t.transition)||r.push({command:"setTransition",args:[t.transition]}),qo(e.light,t.light)||r.push({command:"setLight",args:[t.light]}),qo(e.terrain,t.terrain)||r.push({command:"setTerrain",args:[t.terrain]}),qo(e.sky,t.sky)||r.push({command:"setSky",args:[t.sky]}),qo(e.projection,t.projection)||r.push({command:"setProjection",args:[t.projection]});let i={},n=[];U_r(e.sources,t.sources,n,i);let a=[];e.layers&&e.layers.forEach(o=>{"source"in o&&i[o.source]?r.push({command:"removeLayer",args:[o.id]}):a.push(o)}),r=r.concat(n),V_r(a,t.layers,r)}catch(i){console.warn("Unable to compute style diff:",i),r=[{command:"setStyle",args:[t]}]}return r}function H_r(){let e={},t=_r.$version;for(let r in _r.$root){let i=_r.$root[r];if(i.required){let n=null;n=r==="version"?t:i.type==="array"?[]:{},n!=null&&(e[r]=n)}}return e}function vq(e){let t=[];if(typeof e=="string")t.push({id:"default",url:e});else if(e&&e.length>0){let r=[];for(let{id:i,url:n}of e){let a=`${i}${n}`;r.includes(a)||(r.push(a),t.push({id:i,url:n}))}}return t}function $nt(e,t,r){try{let i=new URL(e);return i.pathname+=`${t}${r}`,i.toString()}catch(i){throw Error(`Invalid sprite URL "${e}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function j_r(e,t,r,i){return Ki(this,null,function*(){let n=vq(e),a=r>1?"@2x":"",o={},s={};for(let{id:l,url:u}of n){let c=yield t.transformRequest($nt(u,a,".json"),"SpriteJSON");o[l]=jk(c,i);let f=yield t.transformRequest($nt(u,a,".png"),"SpriteImage");s[l]=rg.getImage(f,i)}return yield Promise.all([...Object.values(o),...Object.values(s)]),$_r(o,s)})}function $_r(e,t){return Ki(this,null,function*(){let r={};for(let i in e){r[i]={};let n=(yield t[i]).data;if(!n)throw Error(`Could not load sprite image for ${i}: the response is empty`);let a=fh.getImageCanvasContext(n),o=(yield e[i]).data;for(let s in o){let{width:l,height:u,x:c,y:f,sdf:h,pixelRatio:d,stretchX:p,stretchY:v,content:m,textFitWidth:g,textFitHeight:w}=o[s],b={width:l,height:u,x:c,y:f,context:a};r[i][s]={data:null,pixelRatio:d,sdf:h,stretchX:p,stretchY:v,content:m,textFitWidth:g,textFitHeight:w,spriteData:b}}}return r})}function K_r(e){let t=/^u\+([0-9a-f]*)(\?+)$/i.exec(e);if(t){let[,n,a]=t;return n.length+a.length>6?null:Wnt(parseInt(`${n}${"0".repeat(a.length)}`,16),parseInt(`${n}${"f".repeat(a.length)}`,16))}let r=/^u\+([0-9a-f]{1,6})(?:-([0-9a-f]{1,6}))?$/i.exec(e);if(!r)return null;let i=parseInt(r[1],16);return Wnt(i,r[2]===void 0?i:parseInt(r[2],16))}function Wnt(e,t){return e>t||e>tae?null:{start:e,end:Math.min(t,tae)}}function J_r(e,t){return e.ranges.some(({start:r,end:i})=>t>=r&&t<=i)}function Ynt(e,t,r,i,n,a,o,s,l){for(let u=t;u<t+i;u++)Xnt(e,r*a+u,a,n,o,s,l);for(let u=r;u<r+n;u++)Xnt(e,u*a+t,1,i,o,s,l)}function Xnt(e,t,r,i,n,a,o){a[0]=0,o[0]=-1e20,o[1]=rae,n[0]=e[t];for(let s=1,l=0,u=0;s<i;s++){n[s]=e[t+s*r];let c=s*s;do{let f=a[l];u=(n[s]-n[f]+c-f*f)/(s-f)/2}while(u<=o[l]&&--l>-1);l++,a[l]=s,o[l]=u,o[l+1]=rae}for(let s=0,l=0;s<i;s++){for(;o[l+1]<s;)l++;let u=a[l],c=s-u;e[t+s*r]=n[u]+c*c}}function fbr(e){if(!e)return!1;let t=globalThis.location;if(!t)return!1;try{return new URL(e,t.href).origin!==t.origin}catch(r){return!1}}function hbr(){let e=Ist.url;if(!/^https?:/.test(e))return"";let t=e.endsWith("-dev.mjs")?"maplibre-gl-worker-dev.mjs":"maplibre-gl-worker.mjs";return new URL(`./${t}`,e).href}function zne(e,t){if(t)try{return new Worker(e,{type:"module"})}catch(r){console.warn("Module worker not supported, falling back to classic worker",r)}return new Worker(e)}function dbr(e){return Ki(this,null,function*(){let t=yield fetch(e);if(!t.ok)throw Error(`Failed to fetch worker script (${t.status}): ${e}`);let r=yield t.text(),i=new Blob([r],{type:"text/javascript"});return URL.createObjectURL(i)})}function pbr(e){let t=new Blob([`import ${JSON.stringify(new URL(e,Ist.url).href)}`],{type:"text/javascript"});return URL.createObjectURL(t)}function vbr(){return Ki(this,null,function*(){let e=Qh.WORKER_URL||hbr(),t=!(e!=null&&e.endsWith(".cjs"));if(!fbr(e))return zne(e,t);if(t){let i=pbr(e);try{return zne(i,t)}finally{URL.revokeObjectURL(i)}}let r=yield dbr(e);try{return zne(r,t)}finally{URL.revokeObjectURL(r)}})}function bae(){return _q||(_q=new kq),_q}function mbr(){bae().acquire(_ae)}function ybr(){let e=_q;e&&(e.isPreloaded()&&e.numActive()===1?(e.release(_ae),_q=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 wae(){return tq||(tq=new rot(bae(),Uz),tq.registerMessageHandler("GR",(e,t,r)=>Hk(t,r))),tq}function xbr(e,t){let r=Em();return eu(r,r,[1,1,0]),Rc(r,r,[e.width*.5,e.height*.5,1]),e.calculatePosMatrix?Yb(r,r,e.calculatePosMatrix(t.toUnwrapped())):r}function _br(e,t,r){if(e)for(let i of e){let n=t[i];if((n==null?void 0:n.source)===r&&n.type==="fill-extrusion")return!0}else for(let i in t){let n=t[i];if(n.source===r&&n.type==="fill-extrusion")return!0}return!1}function bbr(e,t,r,i,n,a,o){var f;let s=_br((f=n==null?void 0:n.layers)!=null?f:null,t,e.id),l=a.maxPitchScaleFactor(),u=e.tilesIn(i,l,s);u.sort(iot);let c=[];for(let h of u)c.push({wrappedTileID:h.tileID.wrapped().key,queryResults:h.tile.queryRenderedFeatures(t,r,e.getState(),h.queryGeometry,h.cameraQueryGeometry,h.scale,n,a,l,xbr(a,h.tileID),o?(d,p)=>o(h.tileID,d,p):void 0)});return Mbr(Abr(c),e)}function wbr(e,t,r,i,n,a,o){let s={},l=a.queryRenderedSymbols(i),u=[];for(let c of Object.keys(l).map(Number))u.push(o[c]);u.sort(iot);for(let c of u){let f=c.featureIndex.lookupSymbolFeatures(l[c.bucketInstanceId],t,c.bucketIndex,c.sourceLayerIndex,{filterSpec:n.filter,globalState:n.globalState},n.layers,n.availableImages,e);for(let h in f){s[h]||(s[h]=[]);let d=f[h];d.sort((p,v)=>{let m=c.featureSortOrder;if(m){let g=m.indexOf(p.featureIndex);return m.indexOf(v.featureIndex)-g}return v.featureIndex-p.featureIndex});for(let p of d)s[h].push(p)}}return Sbr(s,e,r)}function Tbr(e,t){let r=e.getRenderableIds().map(a=>e.getTileByID(a)),i=[],n={};for(let a of r){let o=a.tileID.canonical.key;n[o]||(n[o]=!0,a.querySourceFeatures(i,t))}return i}function iot(e,t){let r=e.tileID,i=t.tileID;return r.overscaledZ-i.overscaledZ||r.canonical.y-i.canonical.y||r.wrap-i.wrap||r.canonical.x-i.canonical.x}function Abr(e){let t={},r={};for(let{queryResults:i,wrappedTileID:n}of e){r[n]||(r[n]={});let a=r[n];for(let o in i){let s=i[o];a[o]||(a[o]={});let l=a[o];t[o]||(t[o]=[]);for(let u of s)l[u.featureIndex]||(l[u.featureIndex]=!0,t[o].push(u))}}return t}function Mbr(e,t){for(let r in e)for(let i of e[r])not(i,t);return e}function Sbr(e,t,r){for(let i in e)for(let n of e[i]){let a=r[t[i].source];not(n,a)}return e}function not(e,t){let r=e.feature,i=t.getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=i}function aot(e,t,r,i){return Ki(this,null,function*(){let n=e;if(e.url?n=(yield jk(yield t.transformRequest(e.url,"Source"),r)).data:yield fh.frameAsync(r,i),!n)return null;let a=IT(ln(n,e),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in n&&n.vector_layers&&(a.vectorLayerIds=n.vector_layers.map(o=>o.id)),a})}function T8(e,t){return t?e.properties[t]:e.id}function Ebr(e,t){let r=new Map;if(e==null||e.type==null)return r;if(e.type==="Feature"){let i=T8(e,t);return i==null?void 0:(r.set(i,e),r)}if(e.type==="FeatureCollection"){let i=new Set;for(let n of e.features){let a=T8(n,t);if(a==null||i.has(a))return;i.add(a),r.set(a,n)}return r}}function kbr(e,t,r){var n,a;let i=[];if(t.removeAll)e.clear();else if(t.remove)for(let o of t.remove){let s=e.get(o);s&&(i.push(s.geometry),e.delete(o))}if(t.add)for(let o of t.add){let s=T8(o,r);if(s==null)continue;let l=e.get(s);l&&i.push(l.geometry),i.push(o.geometry),e.set(s,o)}if(t.update)for(let o of t.update){let s=e.get(o.id);if(!s)continue;let l=!!o.newGeometry,u=o.removeAllProperties||((n=o.removeProperties)==null?void 0:n.length)>0||((a=o.addOrUpdateProperties)==null?void 0:a.length)>0;if(!l&&!u)continue;i.push(s.geometry);let c=fn({},s);if(e.set(o.id,c),l&&(i.push(o.newGeometry),c.geometry=o.newGeometry),u){if(c.properties=o.removeAllProperties?{}:fn({},c.properties||{}),o.removeProperties)for(let f of o.removeProperties)delete c.properties[f];if(o.addOrUpdateProperties)for(let{key:f,value:h}of o.addOrUpdateProperties)c.properties[f]=h}}return i}function Cbr(e,t,r){if(!e)return t||{};if(!t)return e||{};r&&(Znt(e.add,r),Znt(t.add,r));let i=Knt(e),n=Knt(t);Dbr(i,n);let a={};if((i.removeAll||n.removeAll)&&(a.removeAll=!0),a.remove=new Set([...i.remove,...n.remove]),a.add=new Map([...i.add,...n.add]),a.update=new Map([...i.update,...n.update]),a.remove.size&&a.add.size)for(let s of a.add.keys())a.remove.delete(s);let o=Pbr(a);return r&&Lbr(o.add,r),o}function Dbr(e,t){t.removeAll&&(e.add.clear(),e.update.clear(),e.remove.clear(),t.remove.clear());for(let r of t.remove)e.add.delete(r),e.update.delete(r);for(let[r,i]of t.update){let n=e.update.get(r);n&&(t.update.set(r,Fbr(n,i)),e.update.delete(r))}}function Fbr(e,t){let r={id:e.id};if(t.removeAllProperties&&(delete e.removeProperties,delete e.addOrUpdateProperties,delete t.removeProperties),t.removeProperties&&e.addOrUpdateProperties){let i=new Set(t.removeProperties);e.addOrUpdateProperties=e.addOrUpdateProperties.filter(n=>!i.has(n.key))}return(e.removeAllProperties||t.removeAllProperties)&&(r.removeAllProperties=!0),(e.removeProperties||t.removeProperties)&&(r.removeProperties=[...e.removeProperties||[],...t.removeProperties||[]]),(e.addOrUpdateProperties||t.addOrUpdateProperties)&&(r.addOrUpdateProperties=[...e.addOrUpdateProperties||[],...t.addOrUpdateProperties||[]]),(e.newGeometry||t.newGeometry)&&(r.newGeometry=t.newGeometry||e.newGeometry),r}function Znt(e,t){if(e)for(let r of e){let i=T8(r,t);i!=null&&(r.id=i)}}function Lbr(e,t){if(e)for(let r of e)T8(r,t)!=null&&delete r.id}function Knt(e){var r,i;if(!e)return{};let t={};return t.removeAll=e.removeAll,t.remove=new Set(e.remove||[]),t.add=new Map((r=e.add)==null?void 0:r.map(n=>[n.id,n])),t.update=new Map((i=e.update)==null?void 0:i.map(n=>[n.id,n])),t}function Pbr(e){let t={};return e.removeAll&&(t.removeAll=e.removeAll),e.remove&&(t.remove=Array.from(e.remove)),e.add&&(t.add=Array.from(e.add.values())),e.update&&(t.update=Array.from(e.update.values())),t}function uot(e){return!e||e.length===0?[]:typeof e[0]=="number"?[e]:e.flatMap(t=>uot(t))}function gq(e){return e.type==="GeometryCollection"?e.geometries.flatMap(t=>gq(t)):uot(e.coordinates)}function Jnt(e){let t=new Ev,r;switch(e.type){case"FeatureCollection":r=e.features.flatMap(i=>gq(i.geometry));break;case"Feature":r=gq(e.geometry);break;default:r=gq(e)}if(r.length===0)return t;for(let i of r){let[n,a]=i;t.extend([n,a])}return t}function Ibr({x:e,y:t,z:r},i=0){let n=GB((e-i)/2**r),a=LT((t+1+i)/2**r),o=GB((e+1+i)/2**r),s=LT((t-i)/2**r);return new Ev([n,a],[o,s])}function Bbr(e){e*=Math.PI/180;let t=Math.sin(e),r=Math.cos(e);return[(2*r+1)/3,(-Math.sqrt(3)*t-r+1)/3,(Math.sqrt(3)*t-r+1)/3]}function qbr(e){return e>0?1/(1-e):1+e}function Obr(e){return e>0?1-1/(1.001-e):-e}function fot(e,t){let r=hot(t,"16bit"),i=Pm.deserialize({arrayBuffer:r.vertices,length:r.vertices.byteLength/2/2}),n=Mv.deserialize({arrayBuffer:r.indices,length:r.indices.byteLength/2/3});return new M8(e.createVertexBuffer(i,l3.members),e.createIndexBuffer(n),Ws.simpleSegment(0,0,i.length,n.length))}function hot(e,t){let r=e.granularity===void 0?1:Math.max(e.granularity,1),i=r+(e.generateBorders?2:0),n=r+(e.extendToNorthPole||e.generateBorders?1:0)+(e.extendToSouthPole||e.generateBorders?1:0),a=i+1,o=n+1,s=e.generateBorders?-1:0,l=e.generateBorders||e.extendToNorthPole?-1:0,u=r+ +!!e.generateBorders,c=r+(e.generateBorders||e.extendToSouthPole?1:0),f=a*o,h=i*n*6,d=a*o>65536;if(d&&t==="16bit")throw Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let p=d||t==="32bit",v=new Int16Array(f*2),m=0;for(let b=l;b<=c;b++)for(let _=s;_<=u;_++){let M=_/r*zr;_===-1&&(M=-rq),_===r+1&&(M=zr+rq);let x=b/r*zr;b===-1&&(x=e.extendToNorthPole?xT:-rq),b===r+1&&(x=e.extendToSouthPole?_T:zr+rq),v[m++]=M,v[m++]=x}let g=p?new Uint32Array(h):new Uint16Array(h),w=0;for(let b=0;b<n;b++)for(let _=0;_<i;_++){let M=_+b*a,x=_+1+b*a,T=_+(b+1)*a,A=_+1+(b+1)*a;g[w++]=M,g[w++]=T,g[w++]=x,g[w++]=x,g[w++]=T,g[w++]=A}return{vertices:v.buffer.slice(0),indices:g.buffer.slice(0),uses32bitIndices:p}}function Nbr(e){let t=Jd.fromPoints(e),r=t.width(),i=t.height(),n=Math.max(0,Math.floor(-Math.log(Math.max(r,i))/Math.LN2)),a=2**n;return new l8(n,Math.floor((t.minX+t.maxX)/2*a),Math.floor((t.minY+t.maxY)/2*a))}function Ubr(e){let t=e[1].x-e[0].x,r=e[1].y-e[0].y,i=e[2].x-e[0].x;return t*(e[2].y-e[0].y)-r*i<0}function Vbr(e,t){if(t==="flat"||dot(e))return $T;let[r,i,n,a]=e,o=r.x-i.x+n.x-a.x,s=r.y-i.y+n.y-a.y,l=[i.x-n.x,i.y-n.y,a.x-n.x,a.y-n.y],[u,c,f,h]=l,d=L_r(l),p=(o*h-f*s)/d,v=(u*s-o*c)/d,m=[1,1+p,1+p+v,1+v],g=Math.max(...m)/Math.min(...m),w=t==="perspective"?0:Gbr(g);return!(g>=1&&g<=512)||w>=1?$T:[p,v,w]}function Gbr(e){let t=(1-4/e)/.9921875;return Math.max(0,t)}function dot(e){let[t,r,i,n]=e;return t.x+i.x===r.x+n.x&&t.y+i.y===r.y+n.y}function Wbr(e,t){let r={};if(!t)return r;for(let i of e){let n=i.layerIds.map(a=>t.getLayer(a)).filter(Boolean);if(n.length!==0){i.layers=n,i.stateDependentLayerIds&&(i.stateDependentLayers=i.stateDependentLayerIds.map(a=>n.filter(o=>o.id===a)[0]));for(let a of n)r[a.id]=i}}return r}function A8(){return Qnt||(Qnt=new Ybr),Qnt}function eat(e){let t=[];for(let r in e)t.push({id:r,state:e[r]});return t}function Zbr(e,t,r,i){let n=Uu([],e,t),a=1/n[3]/r*i;return Vet(n,n,[a,a,1/n[3],a])}function Kbr(e,t,r,i){let n=i?4:0,a=i?0:4,o=0,s=[],l=[];for(let f=0;f<4;f++){let h=J1([],e[f+a],e[f+n]),d=K1(h);Ps(h,h,1/d),s.push(d),l.push(h)}for(let f=0;f<4;f++){let h=jet(e[f+n],l[f],r);o=h!==null&&h>=0?Math.max(o,h):Math.max(o,s[f])}let u=Jbr(e,t),c=Qbr(r,u);if(c!==null){let f=c/gu(l[0],u);o=Math.min(o,f)}for(let f=0;f<4;f++){let h=Math.min(o,s[f]);e[f+a]=[e[f+n][0]+l[f][0]*h,e[f+n][1]+l[f][1]*h,e[f+n][2]+l[f][2]*h,1]}}function Jbr(e,t){let r=J1([],e[t[0]],e[t[1]]),i=J1([],e[t[2]],e[t[1]]),n=[0,0,0,0];return Pf(n,uh([],r,i)),n[3]=-gu(n,e[t[0]]),n}function Qbr(e,t){let r=Ok(e),i=Uet([],e,1/r),n=J1([],t,Ps([],i,gu(t,i))),a=Ok(n);if(a>0){let o=Math.sqrt(1-i[3]*i[3]),s=Ps([],i,-i[3]),l=R0([],s,Ps([],n,o/a));return hB(t,l)}return null}function e3r(e,t,r){let i=t.intersectsFrustum(e);if(!r||i===0)return i;let n=t.intersectsPlane(r);return n===0?0:i===2&&n===2?2:1}function tat(e,t,r){let i=0,n=(r-t)/10;for(let a=0;a<10;a++){let o=t+(a+.5)/10*(r-t);i+=n*Math.cos(o)**+e}return i}function nae(e,t){return function(r,i,n,a,o){let s=2*((e-1)/zc(Math.cos(js(ix-o))/Math.cos(js(ix)))-1),l=Math.acos(n/a),u=2*tat(s-1,0,js(o/2)),c=Math.min(js(ix),l+js(o/2)),f=Math.min(c,l-js(o/2)),h=tat(s-1,f,c),d=Math.atan(i/n),p=Math.hypot(i,n),v=r;return v+=zc(a/p/Math.max(.5,Math.cos(js(o/2)))),v+=s*zc(Math.cos(d))/2,v-=zc(Math.max(1,h/u/t))/2,v}}function Sae(e,t){let r=(t.roundZoom?Math.round:Math.floor)(e.zoom+zc(e.tileSize/t.tileSize));return Math.max(0,r)}function r3r(e,t){let r=ix-e.pitch-e.fov/2,i=Jn((15-r)/15,0,1),n=Math.max(500,t!=null?t:0);return e.elevation+i*n}function i3r(e,t,r){let i=e.planes[1],n=e.points.map(l=>{let u=i[0]*l[0]+i[1]*l[1]+i[2]*l[2]+i[3];if(Math.abs(u)>1e-6)return l;let c=[l[0]-r[0],l[1]-r[1],l[2]-r[2]],f=i[0]*c[0]+i[1]*c[1]+i[2]*c[2];if(f>=-1e-9)return l;let h=t/-f;return[l[0]+c[0]*h,l[1]+c[1]*h,l[2]+c[2]*h,l[3]]}),a=e.planes.map((l,u)=>u===1?[l[0],l[1],l[2],l[3]+t]:l),o=[1/0,1/0,1/0],s=[-1/0,-1/0,-1/0];for(let l of n)for(let u=0;u<3;u++)o[u]=Math.min(o[u],l[u]),s[u]=Math.max(s[u],l[u]);return new Mae(n,a,new Aae(o,s))}function ZT(e,t){let r=e.getCameraFrustum(),i=e.getClippingPlane();if(i&&t.maxContentElevation>0){let x=Math.hypot(i[0],i[1],i[2]);if(x>0){let T=1+t.maxContentElevation/zf,A=Jn(-i[3]/x,-1,1),y=Math.cos(Math.acos(A)+Math.acos(1/T));i=[i[0],i[1],i[2],-y*x],r=i3r(r,Math.sqrt(T*T-1),e.cameraPosition)}}let n=Eit(e),a=wo.fromLngLat(e.center,e.elevation),o=r3r(e,t.maxContentElevation),s=e.getCoveringTilesDetailsProvider(),l=s.allowVariableZoom(e,t),u=Sae(e,t),c=t.minzoom||0,f=t.maxzoom===void 0?e.maxZoom:t.maxzoom,h=Math.min(Math.max(0,u),f),d=2**h,p=[d*n.x,d*n.y,0],v=[d*a.x,d*a.y,0],m=Math.hypot(a.x-n.x,a.y-n.y),g=Math.abs(a.z-n.z),w=Math.hypot(m,g),b=x=>({zoom:0,x:0,y:0,wrap:x,fullyVisible:!1}),_=[],M=[];if(e.renderWorldCopies&&s.allowWorldCopies())for(let x=1;x<=3;x++)_.push(b(-x)),_.push(b(x));for(_.push(b(0));_.length>0;){let x=_.pop(),T=x.x,A=x.y,y=x.fullyVisible,E={x:T,y:A,z:x.zoom},S=s.getTileBoundingVolume(E,x.wrap,o,t);if(!y){let F=e3r(r,S,i);if(F===0)continue;y=F===2}let C=s.distanceToTile2d(n.x,n.y,E,S),k=u;l&&(k=(t.calculateTileZoom||t3r)(e.zoom+zc(e.tileSize/t.tileSize),C,g,w,e.fov)),k=(t.roundZoom?Math.round:Math.floor)(k),k=Math.max(0,k);let D=Math.min(k,f);if(x.wrap=s.getWrap(a,E,x.wrap),x.zoom>=D){if(x.zoom<c)continue;let F=h-x.zoom,P=p[0]-.5-(T<<F),R=p[1]-.5-(A<<F),L=t.reparseOverscaled?Math.max(x.zoom,k):x.zoom;M.push({tileID:new Bc(x.zoom===f?L:x.zoom,x.wrap,x.zoom,T,A),distanceSq:Het([v[0]-.5-T,v[1]-.5-A]),tileDistanceToCamera:Math.sqrt(P*P+R*R)});continue}for(let F=0;F<4;F++){let P=(T<<1)+F%2,R=(A<<1)+(F>>1),L=x.zoom+1;_.push({zoom:L,x:P,y:R,wrap:x.wrap,fullyVisible:y})}}return M.sort((x,T)=>x.distanceSq-T.distanceSq).map(x=>x.tileID)}function rat(e){return e==="raster"||e==="image"||e==="video"}function n3r(e,t,r,i,n,a,o){let s=Oo(),l=Wet(t);for(let u of t){let c=e.getTileById(u.key);(c.fadingDirection===0||c.fadeOpacity===0)&&c.resetFadeLogic(),!a3r(e,c,r,s,i,n,o)&&(o3r(e,c,r,s,a,o)||s3r(c,l,s,o)||c.resetFadeLogic())}}function a3r(e,t,r,i,n,a,o){if(!t.hasData())return!1;let{tileID:s,fadingRole:l,fadingDirection:u,fadingParentID:c}=t;if(l===0&&u===1&&c)return r[c.key]=c,!0;let f=Math.max(s.overscaledZ-n,a);for(let h=s.overscaledZ-1;h>=f;h--){let d=s.scaledTo(h),p=e.getLoadedTile(d);if(p)return t.setCrossFadeLogic({fadingRole:0,fadingDirection:1,fadingParentID:p.tileID,fadeEndTime:i+o}),p.setCrossFadeLogic({fadingRole:1,fadingDirection:0,fadeEndTime:i+o}),r[d.key]=d,!0}return!1}function o3r(e,t,r,i,n,a){if(!t.hasData())return!1;let o=t.tileID.children(n),s=iat(e,t,o,r,i,n,a);if(s)return!0;for(let l of o)iat(e,t,l.children(n),r,i,n,a)&&(s=!0);return s}function iat(e,t,r,i,n,a,o){if(r[0].overscaledZ>=a)return!1;let s=!1;for(let l of r){let u=e.getLoadedTile(l);if(!u)continue;let{fadingRole:c,fadingDirection:f,fadingParentID:h}=u;(c!==0||f!==0||!h)&&(u.setCrossFadeLogic({fadingRole:0,fadingDirection:0,fadingParentID:t.tileID,fadeEndTime:n+o}),t.setCrossFadeLogic({fadingRole:1,fadingDirection:1,fadeEndTime:n+o})),i[l.key]=l,s=!0}return s}function s3r(e,t,r,i){let n=e.tileID;if(e.selfFading)return!0;if(e.hasData())return!1;if(t.has(n)){let a=r+i;return e.setSelfFadeLogic(a),!0}return!1}function l3r(e,t){if(t<=0)return!1;let r=Oo();for(let i of e.getAllTiles())if(i.fadeEndTime>=r)return!0;return!1}function u3r(e,t){var i,n,a;let r=t.getRenderableIds();for(let o of r){if(!((i=e.neighboringTiles)!=null&&i[o]))continue;let s=t.getTileById(o);e.neighboringTiles[o].backfilled||nat(e,s),!((a=(n=s.neighboringTiles)==null?void 0:n[e.tileID.key])!=null&&a.backfilled)&&nat(s,e)}}function nat(e,t){var o;e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.needsColorReliefPrepare=!0;let r=t.tileID.canonical.x-e.tileID.canonical.x,i=t.tileID.canonical.y-e.tileID.canonical.y,n=2**e.tileID.canonical.z,a=t.tileID.key;(r!==0||i!==0)&&(Math.abs(i)>1||(Math.abs(r)>1&&(Math.abs(r+n)===1?r+=n:Math.abs(r-n)===1&&(r-=n)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,r,i),(o=e.neighboringTiles)!=null&&o[a]&&(e.neighboringTiles[a].backfilled=!0))))}function mq(e,t,r,i,n){return n?e?e(t,r)+i:i===0?void 0:i:i}function iq(e,t){let r=!0;return e==="always"||(e==="never"||t==="never")&&(r=!1),r}function f3r(e,t){let r=1/(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]),i=1/(t[8]*t[8]+t[9]*t[9]+t[10]*t[10]),n=t[0]*r,a=t[4]*r,o=t[8]*i,s=t[1]*r,l=t[5]*r,u=t[9]*i,c=t[2]*r,f=t[6]*r,h=t[10]*i;e[0]=n,e[1]=a,e[2]=o,e[4]=s,e[5]=l,e[6]=u,e[8]=c,e[9]=f,e[10]=h;let d=t[12],p=t[13],v=t[14];return e[12]=-n*d-s*p-c*v,e[13]=-a*d-l*p-f*v,e[14]=-o*d-u*p-h*v,e[3]=0,e[7]=0,e[11]=0,e[15]=1,e}function h3r(e,t){return e[0]=1/t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1/t[5],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=0,e[11]=1/t[14],e[12]=0,e[13]=0,e[14]=-1,e[15]=t[10]/t[14],e}function d3r(e,t){let r=1/(t[0]*t[5]-t[1]*t[4]);return e[0]=t[5]*r,e[1]=-t[1]*r,e[2]=0,e[3]=0,e[4]=-t[4]*r,e[5]=t[0]*r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1/t[10],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1/t[15],e}function Eae(e,t,r){let i=Em();if(!e){let{vecSouth:n,vecEast:a}=kae(t),o=Yat();o[0]=a[0],o[1]=a[1],o[2]=n[0],o[3]=n[1],F_r(o,o),i[0]=o[0],i[1]=o[1],i[4]=o[2],i[5]=o[3]}return Rc(i,i,[1/r,1/r,1]),i}function v3r(e,t,r,i){if(e){let n=Em();if(!t){let{vecSouth:a,vecEast:o}=kae(r);n[0]=o[0],n[1]=o[1],n[4]=a[0],n[5]=a[1]}return Rc(n,n,[i,i,1]),n}return r.pixelsToClipSpaceMatrix}function kae(e){let t=Math.cos(e.rollInRadians),r=Math.sin(e.rollInRadians),i=Math.cos(e.pitchInRadians),n=Math.cos(e.bearingInRadians),a=Math.sin(e.bearingInRadians),o=fB();o[0]=-n*i*r-a*t,o[1]=-a*i*r+n*t;let s=mie(o);s<1e-9?yie(o):gie(o,o,1/s);let l=fB();l[0]=n*i*t-a*r,l[1]=a*i*t+n*r;let u=mie(l);return u<1e-9?yie(l):gie(l,l,1/u),{vecEast:l,vecSouth:o}}function c3(e,t,r){var i,n;return mq(e.getElevation,t,r,(i=e.heightOffset)!=null?i:0,(n=e.heightAnchorGround)!=null?n:!0)}function Cae(e,t,r,i){let n;i==null?(n=[e,t,0,1],Dae(n,n,r)):(n=[e,t,i,1],Uu(n,n,r));let a=n[3];return{point:new tr(n[0]/a,n[1]/a),signedDistanceFromCamera:a,isOccluded:!1}}function bot(e,t){return .5+e/t*.5}function g3r(e,t){return e.x>=-t[0]&&e.x<=t[0]&&e.y>=-t[1]&&e.y<=t[1]}function m3r(e,t,r,i,n,a,o,s,l,u,c,f,h){let d=r?e.textSizeData:e.iconSizeData,p=a8(d,t.transform.zoom),v=[256/t.width*2+1,256/t.height*2+1],m=r?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;m.clear();let g=e.lineVertexArray,w=r?e.text.placedSymbolArray:e.icon.placedSymbolArray,b=t.transform.width/t.transform.height,_=!1;for(let M=0;M<w.length;M++){let x=w.get(M);if(x.hidden||x.writingMode===2&&!_){WT(x.numGlyphs,m);continue}_=!1;let T=new tr(x.anchorX,x.anchorY),A={getElevation:h,pitchedLabelPlaneMatrix:i,lineVertexArray:g,pitchWithMap:a,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:t.transform,tileAnchorPoint:T,unwrappedTileID:l,width:u,height:c,translation:f},y=Aot(x.anchorX,x.anchorY,A);if(!g3r(y.point,v)){WT(x.numGlyphs,m);continue}let E=y.signedDistanceFromCamera,S=bot(t.transform.cameraToCenterDistance,E),C=YB(d,p,x),k=a?C*t.transform.getPitchedTextCorrection(x.anchorX,x.anchorY,l)/S:C*S,D=lat({projectionContext:A,pitchedLabelPlaneMatrixInverse:n,symbol:x,fontSize:k,flip:!1,keepUpright:o,glyphOffsetArray:e.glyphOffsetArray,dynamicLayoutVertexArray:m,aspectRatio:b,rotateToLine:s});_=D.useVertical,(D.notEnoughRoom||_||D.needsFlipping&&lat({projectionContext:A,pitchedLabelPlaneMatrixInverse:n,symbol:x,fontSize:k,flip:!0,keepUpright:o,glyphOffsetArray:e.glyphOffsetArray,dynamicLayoutVertexArray:m,aspectRatio:b,rotateToLine:s}).notEnoughRoom)&&WT(x.numGlyphs,m)}r?e.text.dynamicLayoutVertexBuffer.updateData(m):e.icon.dynamicLayoutVertexBuffer.updateData(m)}function wot(e,t,r,i,n,a,o,s){let l=a.glyphStartIndex+a.numGlyphs,u=a.lineStartIndex,c=a.lineStartIndex+a.lineLength,f=t.getoffsetX(a.glyphStartIndex),h=t.getoffsetX(l-1),d=bq(e*f,r,i,n,a.segment,u,c,s,o);if(!d)return null;let p=bq(e*h,r,i,n,a.segment,u,c,s,o);return!p||s.projectionCache.anyProjectionOccluded?null:{first:d,last:p}}function sat(e,t,r,i){return e===1&&Math.abs(r.y-t.y)>Math.abs(r.x-t.x)*i?{useVertical:!0}:(e===2?t.y<r.y:t.x>r.x)?{needsFlipping:!0}:null}function lat(e){let{projectionContext:t,pitchedLabelPlaneMatrixInverse:r,symbol:i,fontSize:n,flip:a,keepUpright:o,glyphOffsetArray:s,dynamicLayoutVertexArray:l,aspectRatio:u,rotateToLine:c}=e,f=n/24,h=i.lineOffsetX*f,d=i.lineOffsetY*f,p;if(i.numGlyphs>1){let v=i.glyphStartIndex+i.numGlyphs,m=i.lineStartIndex,g=i.lineStartIndex+i.lineLength,w=wot(f,s,h,d,a,i,c,t);if(!w)return{notEnoughRoom:!0};let b=nq(w.first.point.x,w.first.point.y,t,r),_=nq(w.last.point.x,w.last.point.y,t,r);if(o&&!a){let M=sat(i.writingMode,b,_,u);if(M)return M}p=[w.first];for(let M=i.glyphStartIndex+1;M<v-1;M++){let x=bq(f*s.getoffsetX(M),h,d,a,i.segment,m,g,t,c);if(!x)return{notEnoughRoom:!0};p.push(x)}p.push(w.last)}else{if(o&&!a){let m=f3(t.tileAnchorPoint.x,t.tileAnchorPoint.y,t).point,g=i.lineStartIndex+i.segment+1,w=new tr(t.lineVertexArray.getx(g),t.lineVertexArray.gety(g)),b=f3(w.x,w.y,t),_=b.signedDistanceFromCamera>0?b.point:Tot(t.tileAnchorPoint,w,m,1,t),M=nq(m.x,m.y,t,r),x=nq(_.x,_.y,t,r),T=sat(i.writingMode,M,x,u);if(T)return T}let v=bq(f*s.getoffsetX(i.glyphStartIndex),h,d,a,i.segment,i.lineStartIndex,i.lineStartIndex+i.lineLength,t,c);if(!v||t.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};p=[v]}for(let v of p)o8(l,v.point,v.angle);return{}}function Tot(e,t,r,i,n){let a=e.add(e.sub(t)._unit()),o=f3(a.x,a.y,n).point,s=r.sub(o);return r.add(s._mult(i/s.mag()))}function oae(e,t,r){let i=t.projectionCache;if(i.projections[e])return i.projections[e];let n=new tr(t.lineVertexArray.getx(e),t.lineVertexArray.gety(e)),a=f3(n.x,n.y,t);if(a.signedDistanceFromCamera>0)return i.projections[e]=a.point,i.anyProjectionOccluded||(i.anyProjectionOccluded=a.isOccluded),a.point;let o=e-r.direction,s=r.distanceFromAnchor===0?t.tileAnchorPoint:new tr(t.lineVertexArray.getx(o),t.lineVertexArray.gety(o)),l=r.absOffsetX-r.distanceFromAnchor+1;return Tot(s,n,r.previousVertex,l,t)}function f3(e,t,r){let i=e+r.translation[0],n=t+r.translation[1],a;return r.pitchWithMap?(a=Cae(i,n,r.pitchedLabelPlaneMatrix,c3(r,i,n)),a.isOccluded=!1):(a=r.transform.projectTileCoordinates(i,n,r.unwrappedTileID,c3(r,i,n)),a.point.x=(a.point.x*.5+.5)*r.width,a.point.y=(-a.point.y*.5+.5)*r.height),a}function nq(e,t,r,i){if(r.pitchWithMap){let n=[e,t,0,1];Uu(n,n,i);let a=n[0]/n[3],o=n[1]/n[3];return r.transform.projectTileCoordinates(a,o,r.unwrappedTileID,c3(r,a,o)).point}return{x:e/r.width*2-1,y:1-t/r.height*2}}function Aot(e,t,r){return r.transform.projectTileCoordinates(e,t,r.unwrappedTileID,c3(r,e,t))}function sae(e,t,r){return e._unit()._perp()._mult(t*r)}function y3r(e,t,r,i,n,a,o,s,l){if(s.projectionCache.offsets[e])return s.projectionCache.offsets[e];let u=r.add(t);if(e+l.direction<i||e+l.direction>=n)return s.projectionCache.offsets[e]=u,u;let c=oae(e+l.direction,s,l),f=sae(c.sub(r),o,l.direction),h=r.add(f),d=c.add(f);return s.projectionCache.offsets[e]=Xet(a,u,h,d)||u,s.projectionCache.offsets[e]}function bq(e,t,r,i,n,a,o,s,l){let u=i?e-t:e+t,c=u>0?1:-1,f=0;i&&(c*=-1,f=Math.PI),c<0&&(f+=Math.PI);let h=c>0?a+n:a+n+1,d;s.projectionCache.cachedAnchorPoint?d=s.projectionCache.cachedAnchorPoint:(d=f3(s.tileAnchorPoint.x,s.tileAnchorPoint.y,s).point,s.projectionCache.cachedAnchorPoint=d);let p=d,v=d,m,g,w=0,b=0,_=Math.abs(u),M=[],x;for(;w+b<=_;){if(h+=c,h<a||h>=o)return null;w+=b,v=p,g=m;let E={absOffsetX:_,direction:c,distanceFromAnchor:w,previousVertex:v};if(p=oae(h,s,E),r===0)M.push(v),x=p.sub(v);else{let S,C=p.sub(v);S=C.mag()===0?sae(oae(h+c,s,E).sub(p),r,c):sae(C,r,c),g||(g=v.add(S)),m=y3r(h,S,p,a,o,g,r,s,E),M.push(g),x=m.sub(g)}b=x.mag()}let T=(_-w)/b,A=x._mult(T)._add(g||v),y=f+Math.atan2(p.y-v.y,p.x-v.x);return M.push(A),{point:A,angle:l?y:0,path:M}}function WT(e,t){for(let r=0;r<e;r++){let i=t.length;t.resize(i+4),t.float32.set(x3r,i*3)}}function Dae(e,t,r){let i=t[0],n=t[1];return e[0]=r[0]*i+r[4]*n+r[12],e[1]=r[1]*i+r[5]*n+r[13],e[3]=r[3]*i+r[7]*n+r[15],e}function _3r(e,t){let r=p3r;return d3r(r,t.pitchedLabelPlaneMatrix),e.map(i=>{let n=Cae(i.x,i.y,r,c3(t,i.x,i.y)),a=t.transform.projectTileCoordinates(n.point.x,n.point.y,t.unwrappedTileID,c3(t,n.point.x,n.point.y));return a.point.x=(a.point.x*.5+.5)*t.width,a.point.y=(-a.point.y*.5+.5)*t.height,a})}function b3r(e){let t=0,r=0,i=0,n=0;for(let a=0;a<e.length;a++)e[a].isOccluded?(i=a+1,n=0):(n++,n>r&&(r=n,t=i));return e.slice(t,t+r)}function fat(e,t,r,i,n){let{horizontalAlign:a,verticalAlign:o}=n8(e),s=-(a-.5)*t,l=-(o-.5)*r;return new tr(s+i[0]*n,l+i[1]*n)}function hat(e,t,r,i,n,a){(!i||i.length===0)&&(i=[0,0,0,0]);let o=i[0]-100,s=i[1]-100,l=i[2]-100,u=i[3]-100;e.emplaceBack(+!!t,+!!r,n||0,a||0,o,s),e.emplaceBack(+!!t,+!!r,n||0,a||0,l,s),e.emplaceBack(+!!t,+!!r,n||0,a||0,l,u),e.emplaceBack(+!!t,+!!r,n||0,a||0,o,u)}function dat(e){if(e.opacity===0&&!e.placed)return 0;if(e.opacity===1&&e.placed)return 4294967295;let t=+!!e.placed,r=Math.floor(e.opacity*127);return r*S3r+t*E3r+r*k3r+t*C3r+r*512+t*256+r*2+t}function lae(e,t,r,i,n,a){if(n-i<=r)return;let o=i+n>>1;Sot(e,t,o,i,n,a),lae(e,t,r,i,o-1,1-a),lae(e,t,r,o+1,n,1-a)}function Sot(e,t,r,i,n,a){for(;n>i;){if(n-i>600){let u=n-i+1,c=r-i+1,f=Math.log(u),h=.5*Math.exp(2*f/3),d=.5*Math.sqrt(f*h*(u-h)/u)*(c-u/2<0?-1:1);Sot(e,t,r,Math.max(i,Math.floor(r-c*h/u+d)),Math.min(n,Math.floor(r+(u-c)*h/u+d)),a)}let o=t[2*r+a],s=i,l=n;for(v8(e,t,i,r),t[2*n+a]>o&&v8(e,t,i,n);s<l;){for(v8(e,t,s,l),s++,l--;t[2*s+a]<o;)s++;for(;t[2*l+a]>o;)l--}t[2*i+a]===o?v8(e,t,i,l):(l++,v8(e,t,l,n)),l<=r&&(i=l+1),r<=l&&(n=l-1)}}function v8(e,t,r,i){Bne(e,r,i),Bne(t,2*r,2*i),Bne(t,2*r+1,2*i+1)}function Bne(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function vat(e,t,r,i){let n=e-r,a=t-i;return n*n+a*a}function fo(e,t){let r=/#pragma maplibre: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,i=t.match(/in ([\w]+) ([\w]+)/g),n=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),a=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=a?a.concat(n):n,s=i?i.length:0,l={};return e=e.replace(r,(u,c,f,h,d)=>(l[d]=!0,c==="define"?`
#ifndef HAS_UNIFORM_u_${d}
in ${f} ${h} ${d};
#else
uniform ${f} ${h} u_${d};
#endif
`:`
#ifdef HAS_UNIFORM_u_${d}
${f} ${h} ${d} = u_${d};
#endif
`)),t=t.replace(r,(u,c,f,h,d)=>{let p=h==="float"?"vec2":"vec4",v=d.match(/color/)?"color":p;return l[d]?c==="define"?`
#ifndef HAS_UNIFORM_u_${d}
uniform lowp float u_${d}_t;
layout(location = ${s++}) in ${f} ${p} a_${d};
out ${f} ${h} ${d};
#else
uniform ${f} ${h} u_${d};
#endif
`:v==="vec4"?`
#ifndef HAS_UNIFORM_u_${d}
${d} = a_${d};
#else
${f} ${h} ${d} = u_${d};
#endif
`:`
#ifndef HAS_UNIFORM_u_${d}
${d} = unpack_mix_${v}(a_${d}, u_${d}_t);
#else
${f} ${h} ${d} = u_${d};
#endif
`:c==="define"?`
#ifndef HAS_UNIFORM_u_${d}
uniform lowp float u_${d}_t;
layout(location = ${s++}) in ${f} ${p} a_${d};
#else
uniform ${f} ${h} u_${d};
#endif
`:v==="vec4"?`
#ifndef HAS_UNIFORM_u_${d}
${f} ${h} ${d} = a_${d};
#else
${f} ${h} ${d} = u_${d};
#endif
`:`
#ifndef HAS_UNIFORM_u_${d}
${f} ${h} ${d} = unpack_mix_${v}(a_${d}, u_${d}_t);
#else
${f} ${h} ${d} = u_${d};
#endif
`}),{fragmentSource:e,vertexSource:t,staticAttributes:i,staticUniforms:o}}function wq(e,t){if(!e.renderWorldCopies||e.lngRange)return;let r=t.lng-e.center.lng;t.lng+=r>180?-360:r<-180?360:0}function mat(e){return Math.max(0,Math.floor(e))}function Lae(e,t,r,i){if(i<0||i>=1)return xat;let n=Math.floor(r),a=r-n;for(let o of e.zooms){let s=1<<o,l=a*s,u=i*s,c=Math.floor(l),f=Math.floor(u),h=`${n}/${o}/${c}/${f}`;if(!e.samplerPerTile.has(h))continue;let d=e.samplerPerTile.get(h);return d?{covered:!0,demLoaded:!0,elevation:d(Math.min((l-c)*zr,yat),Math.min((u-f)*zr,yat),zr)*t}:{covered:!0,demLoaded:!1,elevation:0}}return xat}function Fot(e,t){return e.covered&&t<=e.elevation+1e-6}function Lot(e,t,r,i,n){for(let a=0;a<40&&i-r>n;a++){let o=(r+i)/2;t(e,o)?i=o:r=o}return{lo:r,hi:i}}function yq(e,t){return Lae(e.index,e.exaggeration,(e.near[0]+t*e.dx)/e.worldSize,(e.near[1]+t*e.dy)/e.worldSize)}function aq(e,t){return Fot(yq(e,t),e.near[2]+t*e.dz)}function Iot(){Ma("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function Rot(e){if(e.useSlerp)if(e.k<1){let t=Aie(e.startEulerAngles.roll,e.startEulerAngles.pitch,e.startEulerAngles.bearing),r=Aie(e.endEulerAngles.roll,e.endEulerAngles.pitch,e.endEulerAngles.bearing),i=new Float64Array(4);vk(i,t,r,e.k);let n=rtt(i);e.tr.setRoll(n.roll),e.tr.setPitch(n.pitch),e.tr.setBearing(n.bearing)}else e.tr.setRoll(e.endEulerAngles.roll),e.tr.setPitch(e.endEulerAngles.pitch),e.tr.setBearing(e.endEulerAngles.bearing);else e.tr.setRoll($s.number(e.startEulerAngles.roll,e.endEulerAngles.roll,e.k)),e.tr.setPitch($s.number(e.startEulerAngles.pitch,e.endEulerAngles.pitch,e.k)),e.tr.setBearing($s.number(e.startEulerAngles.bearing,e.endEulerAngles.bearing,e.k))}function zot(e,t,r,i,n){let a=n.padding,o=Sv(n.worldSize,r.getNorthWest()),s=Sv(n.worldSize,r.getNorthEast()),l=Sv(n.worldSize,r.getSouthEast()),u=Sv(n.worldSize,r.getSouthWest()),c=js(-i),f=o.rotate(c),h=s.rotate(c),d=l.rotate(c),p=u.rotate(c),v=new tr(Math.max(f.x,h.x,p.x,d.x),Math.max(f.y,h.y,p.y,d.y)),m=new tr(Math.min(f.x,h.x,p.x,d.x),Math.min(f.y,h.y,p.y,d.y)),g=v.sub(m),w=n.width-(a.left+a.right+t.left+t.right),b=n.height-(a.top+a.bottom+t.top+t.bottom),_=w/g.x,M=b/g.y;if(M<0||_<0){Iot();return}let x=Math.min(zc(n.scale*Math.min(_,M)),e.maxZoom),T=tr.convert(e.offset),A=(t.left-t.right)/2,y=(t.top-t.bottom)/2,E=new tr(A,y).rotate(js(i)),S=T.add(E).mult(n.scale/If(x));return{center:NT(n.worldSize,o.add(l).div(2).sub(S)),zoom:x,bearing:i}}function qot(e){let t=YT(e.worldSize,e.center.lat);return 2*Math.PI*t}function Z3r(e,t,r){let i=Vu(t),n=Vu(r),a=gu(i,n),o=Math.acos(a),s=qot(e);return o/(2*Math.PI)*s}function K3r(e,t){return[K2(e*Math.PI*2+Math.PI,Math.PI*2),2*Math.atan(Math.exp(Math.PI-t*Math.PI*2))-Math.PI*.5]}function J3r(e,t){let r=Math.cos(t),i=new Float64Array(3);return i[0]=Math.sin(e)*r,i[1]=Math.sin(t),i[2]=Math.cos(e)*r,i}function nx(e,t,r,i,n){let a=1/(1<<n),o=e/zr*a+r*a,s=t/zr*a+i*a,l=K2(o*Math.PI*2+Math.PI,Math.PI*2),u=2*Math.atan(Math.exp(Math.PI-s*Math.PI*2))-Math.PI*.5,c=Math.cos(u),f=new Float64Array(3);return f[0]=Math.sin(l)*c,f[1]=Math.sin(u),f[2]=Math.cos(l)*c,f}function Vu(e){return J3r(e.lng*Math.PI/180,e.lat*Math.PI/180)}function YT(e,t){return e/(2*Math.PI)/Math.cos(t*Math.PI/180)}function Oot(e){let t=Uu(Cm(),[0,0,0,1],e.modelViewProjectionMatrix);return Uu(t,t,e.inverseProjectionMatrix),[t[0]/t[3],t[1]/t[3],t[2]/t[3]]}function w8(e){let t=Math.asin(e[1])/Math.PI*180,r=Math.sqrt(e[0]*e[0]+e[2]*e[2]);if(r>1e-6){let i=e[0]/r,n=e[2]/r,a=Math.acos(n),o=(i>0?a:-a)/Math.PI*180;return new mn(B0(o,-180,180),t)}return new mn(0,t)}function Q3r(e,t){return cB(Cm(),-e.lng,-e.lat,t)}function ewr(e){let t=e[0],r=e[1],i=e[2],n=e[3];return{lng:-Math.atan2(2*(n*t+r*i),1-2*(t*t+r*r))*180/Math.PI,lat:-Math.asin(Jn(2*(n*r-i*t),-1,1))*180/Math.PI,bearing:Math.atan2(2*(n*i+t*r),1-2*(r*r+i*i))*180/Math.PI}}function bat(e,t){let r=e.cameraPosition,i=K1(r);if(i<=1)return e.screenPointToLocation(t);let n=Do();Pf(n,r);let a=e.getRayDirectionFromPixel(t),o=-gu(a,n),s=Do();qk(s,a,n,o);let l=K1(s);if(l<1e-9)return e.screenPointToLocation(t);let u=Math.atan2(l,o),c=Math.asin(1/i)*.9;if(u<c)return e.screenPointToLocation(t);let f=i*Math.sin(c),h=Math.asin(Jn(f,-1,1))-c,d=i*Math.cos(c)/Math.sqrt(Math.max(1-f*f,1e-12))-1,p=One-h,v=u-c,m=h+d*v*p/(p+d*v),g=Do();Ps(g,s,1/l);let w=Do();return Ps(w,n,Math.cos(Jn(m,0,One))),qk(w,w,g,Math.sin(Jn(m,0,One))),Pf(w,w),w8(w)}function twr(e,t,r,i,n=!0){let a=bat(e,r),o=t;if(i)o=bat(e,r.sub(i));else if(!e.isPointOnMapSurface(r))return;let s=Vu(a),l=Vu(o),u=Q3r(e.center,e.bearing),c=uh(Do(),l,s),f=Math.sqrt(gu(c,c)),h=Math.acos(Jn(gu(l,s),-1,1))/2,d=Math.sin(h),p=f?vie(c[1]/f*d,-c[0]/f*d,c[2]/f*d,Math.cos(h)):vie(0,0,0,1),{lng:v,lat:m,bearing:g}=ewr(Get(Cm(),u,p)),w=e.center.lat,b=e.zoom,_=Jn(m,-90,90),M=n?rwr(e,r,i,v):v;e.setCenter(new mn(B0(M,-180,180),_)),n||e.setBearing(g),e.setZoom(b+qc(w,e.center.lat))}function rwr(e,t,r,i){let n=e.center.lng,a=e.center.lat,o=a>=0?90:-90,s=e.locationToScreenPoint(new mn(0,o)),l=t.x-s.x,u=t.y-s.y,c=l*l+u*u,f=Jn(1-(Tv-Math.abs(a))/12,0,1),h=f*f*(3-2*f),d=K2(i-n+180,360)-180,p=0;if(h>0&&r){let v=(l*r.y-u*r.x)/Math.max(c,400);p=(o>0?1:-1)*v*180/Math.PI}return n+(1-h)*d+h*p}function iwr(e){let t=Do();return t[0]=e[0]*-e[3],t[1]=e[1]*-e[3],t[2]=e[2]*-e[3],{center:t,radius:Math.sqrt(1-e[3]*e[3])}}function nwr(e,t,r){let i=Do();J1(i,r,e);let n=Do();return qk(n,e,i,t/Ok(i)),n}function Mq(e){return Math.cos(e*Math.PI/180)}function qc(e,t){let r=Mq(e),i=Mq(t);return zc(i/r)}function awr(e,t){return 360/qot({worldSize:e,center:{lat:t}})}function owr(e,t){let r=e.rotate(t.bearingInRadians),i=t.zoom+qc(t.center.lat,0),n=Kb(1/Mq(t.center.lat),1/Mq(Math.min(Math.abs(t.center.lat),60)),Gk(i,7,3,0,1)),a=awr(t.worldSize,t.center.lat);return new mn(t.center.lng-r.x*a*n,Jn(t.center.lat+r.y*a,-Tv,Tv))}function Nne(e){let t=.5*e,r=Math.sin(t),i=Math.cos(t);return Math.log(r+i)-Math.log(i-r)}function wat(e,t,r,i){let n=e.lat+r*i;if(Math.abs(r)>1){let a=e.lat+r,o=(Math.sign(a)===Math.sign(e.lat)?Math.abs(e.lat):-Math.abs(e.lat))*Math.PI/180,s=Math.abs(e.lat+r)*Math.PI/180,l=Nne(o+i*(s-o)),u=Nne(o),c=Nne(s),f=(l-u)/(c-u),h=e.lng+t*f;return new mn(h,n)}{let a=e.lng+t*i;return new mn(a,n)}}function oq(e,t,r=1){let i=gu(e,t),n=r*r,a=Do(),o=Do();Ps(o,t,i),J1(a,e,o);let s=n-gu(a,a);if(s<0)return null;let l=gu(e,e)-n,u=-i+(i<0?1:-1)*Math.sqrt(s),c=l/u,f=u;return{tMin:Math.min(c,f),tMax:Math.max(c,f)}}function xq(e,t,r){let i=e-t;return i<0?-i:Math.max(0,i-r)}function Vne(e,t,r,i,n){let a=e-r,o;return o=a<0?Math.min(-a,1+a-n):a>n?Math.min(Math.max(a-n,0),1-a):0,Math.max(o,xq(t,i,n))}function Tat(e,t){let r=1/0,i=-1/0;for(let n of t){let a=gu(e,n);r=Math.min(r,a),i=Math.max(i,a)}return{min:r,max:i}}function Vot(e,t){let r=Do();qk(r,e.origin,e.direction,t);let i=K1(r),n=Do();Ps(n,r,1/i);let a=w8(n),o=wo.fromLngLat(a),s=new wo(o.x,Jn(o.y,0,.999999999)),l=Lae(e.index,e.exaggeration,s.x,s.y),u=Math.abs(a.lat)>85.051129?0:l.elevation;return{sample:ma(fn({},l),{elevation:u}),radius:i,mercator:s}}function Mat(e,t){let{sample:r,radius:i}=Vot(e,t);return Fot(r,(i-1)*zf)}function uwr(e,t,r){let i={constrainOverride:t};if(Array.isArray(e)){let n=new _at({type:e},r);return{projection:n,transform:new Sat(i),cameraHelper:new Eat(n)}}switch(e){case"mercator":return{projection:new uae,transform:new Tq(i),cameraHelper:new Aq};case"globe":{let n=new _at({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]},{});return{projection:n,transform:new Sat(i),cameraHelper:new Eat(n)}}case"vertical-perspective":return{projection:new Bot,transform:new Not(i),cameraHelper:new Hot};default:return Ma(`Unknown projection name: ${e}. Falling back to mercator projection.`),{projection:new uae,transform:new Tq(i),cameraHelper:new Aq}}}function ywr(e,t){for(let[r,i]of Object.entries(Cq)){let n=e.getUniformBlockIndex(t,r);n!==e.INVALID_INDEX&&e.uniformBlockBinding(t,n,i)}}function Pae(e){let t={},r=0;for(let{name:i,type:n}of e){let[a,o]=xwr[n];r=Math.ceil(r/o)*o,t[i]=r,r+=a}return{offsets:t,contentWords:r,sizeWords:Math.ceil(r/4)*4}}function _wr(e){return new Iae(e,Cq.ProjectionUBO,jot)}function bwr(e,t){let r=e.pending;r.set(t.mainMatrix,HT.u_projection_matrix),r.set(t.fallbackMatrix,HT.u_projection_fallback_matrix),r.set(t.tileMercatorCoords,HT.u_projection_tile_mercator_coords),r.set(t.clippingPlane,HT.u_projection_clipping_plane),r[HT.u_projection_transition]=t.projectionTransition,e.pendingWords[HT.u_projection_clip_antimeridian]=+!!t.clipAntimeridian,e.upload()}function wwr(e){return new Iae(e,Cq.TerrainUBO,$ot)}function Twr(e,t){let r=e.pending;r.set(t.u_terrain_matrix,sq.u_terrain_matrix),r.set(t.u_terrain_unpack,sq.u_terrain_unpack),r[sq.u_terrain_dim]=t.u_terrain_dim,r[sq.u_terrain_exaggeration]=t.u_terrain_exaggeration,e.upload()}function Gne(e){let t=[];for(let r of e){if(r===null)continue;let i=r.split(" ");t.push(i.pop())}return t}function Awr(e,t){let r=new Set([e.INT,e.INT_VEC2,e.INT_VEC3,e.INT_VEC4,e.UNSIGNED_INT,e.UNSIGNED_INT_VEC2,e.UNSIGNED_INT_VEC3,e.UNSIGNED_INT_VEC4]),i=new Set,n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let a=0;a<n;a++){let o=e.getActiveAttrib(t,a);o&&r.has(o.type)&&i.add(o.name)}return i}function Wot(e,t,r){let i=1/Zh(r,1,t.transform.tileZoom),n=2**r.tileID.overscaledZ,a=r.tileSize*2**t.transform.tileZoom/n,o=a*(r.tileID.canonical.x+r.tileID.wrap*n),s=a*r.tileID.canonical.y;return{u_image:0,u_texsize:r.imageAtlasTexture.size,u_scale:[i,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[o>>16,s>>16],u_pixel_coord_lower:[o&65535,s&65535]}}function Swr(e,t,r,i){let n=r.patternAtlas.getPattern(e.from.toString()),a=r.patternAtlas.getPattern(e.to.toString()),{width:o,height:s}=r.patternAtlas.getPixelSize(),l=2**i.tileID.overscaledZ,u=i.tileSize*2**r.transform.tileZoom/l,c=u*(i.tileID.canonical.x+i.tileID.wrap*l),f=u*i.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:n.tl,u_pattern_br_a:n.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[o,s],u_mix:t.t,u_pattern_size_a:n.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/Zh(i,1,r.transform.tileZoom),u_pixel_coord_upper:[c>>16,f>>16],u_pixel_coord_lower:[c&65535,f&65535]}}function $wr(e,t){let r=2**t.canonical.z,i=t.canonical.y;return[new wo(0,i/r).toLngLat().lat,new wo(0,(i+1)/r).toLngLat().lat]}function Rae(e,t){return 1/Zh(e,1,t.tileZoom)}function Jot(e,t,r){return Dm(e.transform,t,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}function r4r(e){return new Iae(e,Cq.FrameUBO,tst)}function i4r(e,t){let r=e.pending,{transform:i}=t,n=t.context.gl;r[q0.u_units_to_pixels]=1/i.pixelsToGLUnits[0],r[q0.u_units_to_pixels+1]=1/i.pixelsToGLUnits[1],r[q0.u_world_size]=n.drawingBufferWidth,r[q0.u_world_size+1]=n.drawingBufferHeight,r[q0.u_camera_to_center_distance]=i.cameraToCenterDistance,r[q0.u_symbol_fade_change]=t.options.fadeDuration?t.symbolFadeChange:1,r[q0.u_aspect_ratio]=i.width/i.height,r[q0.u_device_pixel_ratio]=t.pixelRatio,r[q0.u_viewport_size]=i.width,r[q0.u_viewport_size+1]=i.height,r[q0.u_pixel_extrude_scale]=1/i.width,r[q0.u_pixel_extrude_scale+1]=1/i.height,r[q0.u_pitch]=i.pitch/360*2*Math.PI,e.upload()}function Fat(e,t,r,i,n){var g,w;let a=e.context,o=e.transform,s=a.gl,l=e.useProgram("collisionBox"),u=[],c=0,f=0;for(let b of i){let _=t.getTile(b).getBucket(r);if(!_)continue;let M=n?_.textCollisionBox:_.iconCollisionBox,x=_.collisionCircleArray;x.length>0&&(u.push({circleArray:x,circleOffset:f,coord:b}),c+=x.length/4,f=c),M&&l.draw(a,s.LINES,Ba.disabled,Fo.disabled,e.colorModeForRenderPass(),To.disabled,null,(g=e.style.map.terrain)==null?void 0:g.getTerrainData(b),o.getProjectionData({overscaledTileID:b,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),r.id,M.layoutVertexBuffer,M.indexBuffer,M.segments,null,e.transform.zoom,null,null,M.collisionVertexBuffer)}if(!n||!u.length)return;let h=e.useProgram("collisionCircle"),d=new Yrt;d.resize(c*4),d._trim();let p=0;for(let b of u)for(let _=0;_<b.circleArray.length/4;_++){let M=_*4,x=b.circleArray[M+0],T=b.circleArray[M+1],A=b.circleArray[M+2],y=b.circleArray[M+3];d.emplace(p++,x,T,A,y,0),d.emplace(p++,x,T,A,y,1),d.emplace(p++,x,T,A,y,2),d.emplace(p++,x,T,A,y,3)}(!uq||uq.length<c*2)&&(uq=a4r(c));let v=a.createIndexBuffer(uq,!0),m=a.createVertexBuffer(d,Pit.members,!0);for(let b of u)h.draw(a,s.TRIANGLES,Ba.disabled,Fo.disabled,e.colorModeForRenderPass(),To.disabled,null,(w=e.style.map.terrain)==null?void 0:w.getTerrainData(b.coord),null,r.id,m,v,Ws.simpleSegment(0,b.circleOffset*2,b.circleArray.length,b.circleArray.length/2),null,e.transform.zoom,null,null,null);m.destroy(),v.destroy()}function a4r(e){let t=e*2,r=new Xrt;r.resize(t),r._trim();for(let i=0;i<t;i++){let n=i*6;r.uint16[n+0]=i*4+0,r.uint16[n+1]=i*4+1,r.uint16[n+2]=i*4+2,r.uint16[n+3]=i*4+2,r.uint16[n+4]=i*4+3,r.uint16[n+5]=i*4+0}return r}function s4r(e,t,r,i,n,a){if(a.currentPass!=="translucent")return;let{isRenderingToTexture:o}=a,s=Fo.disabled,l=e.colorModeForRenderPass();(r._unevaluatedLayout.hasValue("text-variable-anchor")||r._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&u4r(i,e,r,t,r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),n),r.paint.get("icon-opacity").constantOr(1)!==0&&Lat(e,t,r,i,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment").constantOr("viewport"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),s,l,o),r.paint.get("text-opacity").constantOr(1)!==0&&Lat(e,t,r,i,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),s,l,o),t.map.showCollisionBoxes&&(Fat(e,t,r,i,!0),Fat(e,t,r,i,!1))}function l4r(e,t,r,i,n,a){let{horizontalAlign:o,verticalAlign:s}=n8(e),l=-(o-.5)*t,u=-(s-.5)*r;return new tr((l/n+i[0])*a,(u/n+i[1])*a)}function u4r(e,t,r,i,n,a,o,s,l){var d;let u=t.transform,c=t.style.map.terrain,f=n==="map",h=a==="map";for(let p of e){let v=i.getTile(p),m=v.getBucket(r);if(!((d=m==null?void 0:m.text)!=null&&d.segments.get().length))continue;let g=m.textSizeData,w=a8(g,u.zoom),b=Zh(v,1,t.transform.zoom),_=Eae(f,t.transform,b),M=r.layout.get("icon-text-fit")!=="none"&&m.hasIconData();if(w){let x=2**(u.zoom-v.tileID.overscaledZ),T=c?(A,y)=>c.getElevation(p,A,y):void 0;f4r(m,f,h,l,u,_,x,w,M,Dm(u,v,o,s),p.toUnwrapped(),T,r.layout.get("symbol-height-anchor")==="ground")}}}function c4r(e,t,r,i,n,a){let o=t.tileAnchorPoint.add(new tr(t.translation[0],t.translation[1]));if(t.pitchWithMap){let s=i.mult(a);r||(s=s.rotate(-n));let l=o.add(s);return Cae(l.x,l.y,t.pitchedLabelPlaneMatrix,c3(t,l.x,l.y)).point}if(r){let s=f3(t.tileAnchorPoint.x+1,t.tileAnchorPoint.y,t).point.sub(e),l=Math.atan(s.y/s.x)+(s.x<0?Math.PI:0);return e.add(i.rotate(l))}return e.add(i)}function f4r(e,t,r,i,n,a,o,s,l,u,c,f,h){let d=e.text.placedSymbolArray,p=e.text.dynamicLayoutVertexArray,v=e.icon.dynamicLayoutVertexArray,m={};p.clear();for(let g=0;g<d.length;g++){let w=d.get(g),b=e.allowVerticalPlacement&&!w.placedOrientation,_=!w.hidden&&w.crossTileID&&!b?i[w.crossTileID]:null;if(!_)WT(w.numGlyphs,p);else{let M=new tr(w.anchorX,w.anchorY),x={getElevation:f,heightOffset:w.heightOffset,heightAnchorGround:h,width:n.width,height:n.height,pitchedLabelPlaneMatrix:a,lineVertexArray:null,pitchWithMap:r,transform:n,projectionCache:null,tileAnchorPoint:M,translation:u,unwrappedTileID:c},T=r?Aot(M.x,M.y,x):f3(M.x,M.y,x),A=bot(n.cameraToCenterDistance,T.signedDistanceFromCamera),y=YB(e.textSizeData,s,w)*A/24;r&&(y*=e.tilePixelRatio/o);let{width:E,height:S,anchor:C,textOffset:k,textBoxScale:D}=_,F=l4r(C,E,S,k,D,y),P=n.getPitchedTextCorrection(M.x+u[0],M.y+u[1],c),R=c4r(T.point,x,t,F,-n.bearingInRadians,P),L=e.allowVerticalPlacement&&w.placedOrientation===2?Math.PI/2:0;for(let I=0;I<w.numGlyphs;I++)o8(p,R,L);l&&w.associatedIconIndex>=0&&(m[w.associatedIconIndex]={shiftedAnchor:R,angle:L})}}if(l){v.clear();let g=e.icon.placedSymbolArray;for(let w=0;w<g.length;w++){let b=g.get(w);if(b.hidden)WT(b.numGlyphs,v);else{let _=m[w];if(!_)WT(b.numGlyphs,v);else for(let M=0;M<b.numGlyphs;M++)o8(v,_.shiftedAnchor,_.angle)}}e.icon.dynamicLayoutVertexBuffer.updateData(v)}e.text.dynamicLayoutVertexBuffer.updateData(p)}function h4r(e,t,r){return r.iconsInText&&t?"symbolTextAndIcon":e?"symbolSDF":"symbolIcon"}function Lat(e,t,r,i,n,a,o,s,l,u,c,f,h){var C,k;let d=e.context,p=d.gl,v=e.transform,m=s==="map",g=l==="map",w=s!=="viewport"&&r.layout.get("symbol-placement")!=="point",b=m&&!g&&!w,_=!r.layout.get("symbol-sort-key").isConstant(),M=!1,x=e.getDepthModeForSublayer(0,Ba.ReadOnly),T=r._unevaluatedLayout.hasValue("text-variable-anchor")||r._unevaluatedLayout.hasValue("text-variable-anchor-offset"),A=[],y=v.getCircleRadiusCorrection();for(let D of i){let F=t.getTile(D),P=F.getBucket(r);if(!P)continue;let R=n?P.text:P.icon;if(!(R!=null&&R.segments.get().length)||!R.hasVisibleVertices)continue;let L=R.programConfigurations.get(r.id),I=n||P.sdfIcons,B=n?P.textSizeData:P.iconSizeData,O=g||v.pitch!==0,$=e.useProgram(h4r(I,n,P),L),Y=a8(B,v.zoom),K=(C=e.style.map.terrain)==null?void 0:C.getTerrainData(D),j,q=[0,0],J,U,V=null,X;if(n){if(J=F.glyphAtlasTexture,U=p.LINEAR,j=F.glyphAtlasTexture.size,P.iconsInText){q=F.imageAtlasTexture.size,V=F.imageAtlasTexture;let xe=B.kind==="composite"||B.kind==="camera";X=O||e.options.rotating||e.options.zooming||xe?p.LINEAR:p.NEAREST}}else{let xe=r.layout.get("icon-size").constantOr(0)!==1||P.iconsNeedLinear;J=F.imageAtlasTexture,U=I||e.options.rotating||e.options.zooming||xe||O?p.LINEAR:p.NEAREST,j=F.imageAtlasTexture.size}let H=Zh(F,1,e.transform.zoom),G=Eae(m,e.transform,H),Q=v3r(g,m,e.transform,H),te=Dm(v,F,a,o),ce=v.getProjectionData({overscaledTileID:D,applyGlobeMatrix:!h,applyTerrainMatrix:!0}),ge=T&&P.hasTextData(),Ce=r.layout.get("icon-text-fit")!=="none"&&ge&&P.hasIconData(),be=r._unevaluatedLayout.hasValue("icon-offset"),he=r.layout.get("symbol-height-anchor")==="ground";if(w){let xe=Em();f3r(xe,G);let re=e.style.map.terrain?(pe,we)=>e.style.map.terrain.getElevation(D,pe,we):void 0;m3r(P,e,n,G,xe,g,u,r.layout.get("text-rotation-alignment")==="map",D.toUnwrapped(),v.width,v.height,te,re)}let oe=n&&T||Ce,Ee=g?G:e.transform.clipSpaceToPixelsMatrix,ye=w||oe?o4r:Ee,ue=I&&r.paint.get(n?"text-halo-width":"icon-halo-width").constantOr(1)!==0,ee;ee=I?P.iconsInText?u5r(B.kind,Y,b,g,w,oe,e,ye,Q,te,j,q,y,be,he):est(B.kind,Y,b,g,w,oe,e,ye,Q,te,n,j,ue,y,be,he):Qot(B.kind,Y,b,g,w,oe,e,ye,Q,te,n,j,y,be,he);let ae={program:$,buffers:R,uniformValues:ee,projectionData:ce,atlasTexture:J,atlasTextureIcon:V,atlasInterpolation:U,atlasInterpolationIcon:X,isSDF:I,hasHalo:ue};if(_&&P.canOverlap){M=!0;let xe=R.segments.get();for(let re of xe)A.push({segments:new Ws([re]),sortKey:re.sortKey,state:ae,terrainData:K})}else A.push({segments:R.segments,sortKey:0,state:ae,terrainData:K})}M&&A.sort((D,F)=>D.sortKey-F.sortKey);let E=(k=r.paint.get(n?"text-halo-width":"icon-halo-width").constantOr(null))!=null?k:1/0,S=r.layout.get("text-letter-spacing").constantOr(0)*24<0||E>1;for(let D of A){let F=D.state;d.activeTexture.set(p.TEXTURE0),F.atlasTexture.bind(F.atlasInterpolation,p.CLAMP_TO_EDGE),F.atlasTextureIcon&&(d.activeTexture.set(p.TEXTURE1),F.atlasTextureIcon&&F.atlasTextureIcon.bind(F.atlasInterpolationIcon,p.CLAMP_TO_EDGE));let P=F.isSDF&&F.hasHalo;if(P){let R=F.uniformValues;R.u_is_halo=1,S&&(R.u_is_plain=0,Pat(F.buffers,D.segments,r,e,F.program,x,c,f,R,F.projectionData,D.terrainData),R.u_is_halo=0,R.u_is_plain=1)}Pat(F.buffers,D.segments,r,e,F.program,x,c,f,F.uniformValues,F.projectionData,D.terrainData),P&&!S&&(F.uniformValues.u_is_halo=0)}}function Pat(e,t,r,i,n,a,o,s,l,u,c){let f=i.context,h=f.gl;n.draw(f,h.TRIANGLES,a,o,s,To.backCCW,l,c,u,r.id,e.layoutVertexBuffer,e.indexBuffer,t,r.paint,i.transform.zoom,e.programConfigurations.get(r.id),e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer)}function d4r(e,t,r,i,n){var w;if(n.currentPass!=="translucent")return;let{isRenderingToTexture:a}=n,o=r.paint.get("circle-opacity"),s=r.paint.get("circle-stroke-width"),l=r.paint.get("circle-stroke-opacity"),u=!r.layout.get("circle-sort-key").isConstant();if(o.constantOr(1)===0&&(s.constantOr(1)===0||l.constantOr(1)===0))return;let c=e.context,f=c.gl,h=e.transform,d=e.getDepthModeForSublayer(0,Ba.ReadOnly),p=Fo.disabled,v=e.colorModeForRenderPass(),m=[],g=h.getCircleRadiusCorrection();for(let b of i){let _=t.getTile(b),M=_.getBucket(r);if(!M)continue;let x=r.paint.get("circle-translate"),T=r.paint.get("circle-translate-anchor"),A=Dm(h,_,x,T),y=M.programConfigurations.get(r.id),E=e.useProgram("circle",y),S=M.layoutVertexBuffer,C=M.indexBuffer,k=(w=e.style.map.terrain)==null?void 0:w.getTerrainData(b),D={programConfiguration:y,program:E,layoutVertexBuffer:S,indexBuffer:C,uniformValues:qwr(e,_,r,A,g),terrainData:k,projectionData:h.getProjectionData({overscaledTileID:b,applyGlobeMatrix:!a,applyTerrainMatrix:!0})};if(u){let F=M.segments.get();for(let P of F)m.push({segments:new Ws([P]),sortKey:P.sortKey,state:D})}else m.push({segments:M.segments,sortKey:0,state:D})}u&&m.sort((b,_)=>b.sortKey-_.sortKey);for(let b of m){let{programConfiguration:_,program:M,layoutVertexBuffer:x,indexBuffer:T,uniformValues:A,terrainData:y,projectionData:E}=b.state,S=b.segments;M.draw(c,f.TRIANGLES,d,p,v,To.backCCW,A,y,E,r.id,x,T,S,r.paint,e.transform.zoom,_)}}function p4r(e,t,r,i,n){if(r.paint.get("heatmap-opacity")===0)return;let a=e.context,{isRenderingToTexture:o,isRenderingGlobe:s}=n;if(e.style.map.terrain){for(let l of i){let u=t.getTile(l);t.hasRenderableParent(l)||(n.currentPass==="offscreen"?m4r(e,u,r,l,s):n.currentPass==="translucent"&&y4r(e,r,l,o,s))}a.viewport.set([0,0,e.width,e.height])}else n.currentPass==="offscreen"?v4r(e,t,r,i):n.currentPass==="translucent"&&g4r(e,r)}function v4r(e,t,r,i){let n=e.context,a=n.gl,o=e.transform,s=Fo.disabled,l=new ql([a.ONE,a.ONE],ea.transparent,[!0,!0,!0,!0]);x4r(n,e,r),n.clear({color:ea.transparent});for(let u of i){if(t.hasRenderableParent(u))continue;let c=t.getTile(u),f=c.getBucket(r);if(!f)continue;let h=f.programConfigurations.get(r.id),d=e.useProgram("heatmap",h),p=o.getProjectionData({overscaledTileID:u,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),v=o.getCircleRadiusCorrection();d.draw(n,a.TRIANGLES,Ba.disabled,s,l,To.backCCW,Zot(c,o.zoom,r.paint.get("heatmap-intensity"),v),null,p,r.id,f.layoutVertexBuffer,f.indexBuffer,f.segments,r.paint,o.zoom,h)}n.viewport.set([0,0,e.width,e.height])}function g4r(e,t){let r=e.context,i=r.gl;r.setColorMode(e.colorModeForRenderPass());let n=t.heatmapFbos.get(e8);n&&(r.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,n.colorAttachment.get()),r.activeTexture.set(i.TEXTURE1),ist(r,t).bind(i.LINEAR,i.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(r,i.TRIANGLES,Ba.disabled,Fo.disabled,e.colorModeForRenderPass(),To.disabled,Kot(e,t,0,1),null,null,t.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,t.paint,e.transform.zoom))}function m4r(e,t,r,i,n){let a=e.context,o=a.gl,s=Fo.disabled,l=new ql([o.ONE,o.ONE],ea.transparent,[!0,!0,!0,!0]),u=t.getBucket(r);if(!u)return;let c=i.key,f=r.heatmapFbos.get(c);f||(f=rst(a,t.tileSize,t.tileSize),r.heatmapFbos.set(c,f)),a.bindFramebuffer.set(f.framebuffer),a.viewport.set([0,0,t.tileSize,t.tileSize]),a.clear({color:ea.transparent});let h=u.programConfigurations.get(r.id),d=e.useProgram("heatmap",h,!n),p=e.transform.getProjectionData({overscaledTileID:t.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),v=e.style.map.terrain.getTerrainData(i);d.draw(a,o.TRIANGLES,Ba.disabled,s,l,To.disabled,Zot(t,e.transform.zoom,r.paint.get("heatmap-intensity"),1),v,p,r.id,u.layoutVertexBuffer,u.indexBuffer,u.segments,r.paint,e.transform.zoom,h)}function y4r(e,t,r,i,n){let a=e.context,o=a.gl,s=e.transform;a.setColorMode(e.colorModeForRenderPass());let l=ist(a,t),u=r.key,c=t.heatmapFbos.get(u);if(!c)return;a.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,c.colorAttachment.get()),a.activeTexture.set(o.TEXTURE1),l.bind(o.LINEAR,o.CLAMP_TO_EDGE);let f=s.getProjectionData({overscaledTileID:r,applyTerrainMatrix:n,applyGlobeMatrix:!i});e.useProgram("heatmapTexture").draw(a,o.TRIANGLES,Ba.disabled,Fo.disabled,e.colorModeForRenderPass(),To.disabled,Kot(e,t,0,1),null,f,t.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments,t.paint,s.zoom),c.destroy(),t.heatmapFbos.delete(u)}function x4r(e,t,r){let i=e.gl;e.activeTexture.set(i.TEXTURE1),e.viewport.set([0,0,t.width/4,t.height/4]);let n=r.heatmapFbos.get(e8);n?(i.bindTexture(i.TEXTURE_2D,n.colorAttachment.get()),e.bindFramebuffer.set(n.framebuffer)):(n=rst(e,t.width/4,t.height/4),r.heatmapFbos.set(e8,n))}function rst(e,t,r){let i=e.gl,n=i.createTexture();i.bindTexture(i.TEXTURE_2D,n),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texStorage2D(i.TEXTURE_2D,1,i.RGBA16F,t,r);let a=e.createFramebuffer(t,r,!1,!1);return a.colorAttachment.set(n),a}function ist(e,t){return t.colorRampTexture||(t.colorRampTexture=new vu(e,t.colorRamp,e.gl.RGBA)),t.colorRampTexture}function nst(e,t,r,i){let n=e.context,a=n.bindFramebuffer.get(),o=n.viewport.get(),[,,s,l]=o;return _4r(e,s,l),n.viewport.set([0,0,s,l]),n.clear({color:ea.transparent,depth:1,stencil:0}),e.currentStencilSource=void 0,e.renderTileClippingMasks(t,r,i),{compositeTarget:a,compositeViewport:o}}function _4r(e,t,r){let i=e.context.gl;if(!e.layerOpacityFbo){let a=e.context.createFramebuffer(t,r,!0,!0),o=i.createTexture();i.bindTexture(i.TEXTURE_2D,o),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,t,r,0,i.RGBA,i.UNSIGNED_BYTE,null),a.colorAttachment.set(o),a.depthAttachment.set(e.context.createRenderbuffer(i.DEPTH_STENCIL,t,r)),e.layerOpacityFbo=a,e.context.bindFramebuffer.set(e.layerOpacityFbo.framebuffer);return}if(e.layerOpacityFbo.width===t&&e.layerOpacityFbo.height===r){e.context.bindFramebuffer.set(e.layerOpacityFbo.framebuffer);return}let n=e.layerOpacityFbo;i.bindTexture(i.TEXTURE_2D,n.colorAttachment.get()),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,t,r,0,i.RGBA,i.UNSIGNED_BYTE,null),e.context.bindRenderbuffer.set(n.depthAttachment.get()),i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_STENCIL,t,r),e.context.bindRenderbuffer.set(null),n.width=t,n.height=r,e.context.bindFramebuffer.set(n.framebuffer)}function ast(e,t,r,i){let n=e.context,a=n.gl;n.bindFramebuffer.set(r.compositeTarget),n.viewport.set(r.compositeViewport),n.activeTexture.set(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,e.layerOpacityFbo.colorAttachment.get()),e.useProgram("layerOpacity").draw(n,a.TRIANGLES,Ba.disabled,Fo.disabled,e.colorModeForRenderPass(),To.disabled,a5r(t,0),null,null,i.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,i.paint,e.transform.zoom),e.currentStencilSource=void 0}function ost(e,t,r,i,n,a,o,s){let l=256;if(n.stepInterpolant){let u=t.getSource().maxzoom,c=o.canonical.z===u?Math.ceil(1<<e.transform.maxZoom-o.canonical.z):1,f=a.maxLineLength/zr*1024*c;l=Jn(Yet(f),256,r.maxTextureSize)}return s.gradient=nne({expression:n.gradientExpression(),evaluationKey:"lineProgress",resolution:l,image:s.gradient||void 0,clips:a.lineClipsArray}),s.texture?s.texture.update(s.gradient):s.texture=new vu(r,s.gradient,i.RGBA),s.version=n.gradientVersion,s.texture}function b4r(e,t,r,i,n){e.activeTexture.set(t.TEXTURE0),r.imageAtlasTexture.bind(t.LINEAR,t.CLAMP_TO_EDGE),i.updatePaintBuffers(n)}function w4r(e,t,r,i,n,a){(n||e.lineAtlas.dirty)&&(t.activeTexture.set(r.TEXTURE0),e.lineAtlas.bind(t)),i.updatePaintBuffers(a)}function T4r(e,t,r,i,n,a,o){let s=a.gradients[n.id],l=s.texture;n.gradientVersion!==s.version&&(l=ost(e,t,r,i,n,a,o,s)),r.activeTexture.set(i.TEXTURE0),l.bind(n.stepInterpolant?i.NEAREST:i.LINEAR,i.CLAMP_TO_EDGE)}function A4r(e,t,r,i,n,a,o,s,l){let u=a.gradients[n.id],c=u.texture;n.gradientVersion!==u.version&&(c=ost(e,t,r,i,n,a,o,u)),r.activeTexture.set(i.TEXTURE0),c.bind(n.stepInterpolant?i.NEAREST:i.LINEAR,i.CLAMP_TO_EDGE),r.activeTexture.set(i.TEXTURE1),e.lineAtlas.bind(r),s.updatePaintBuffers(l)}function M4r(e,t,r,i,n){if(n.currentPass!=="translucent")return;let a=r.paint.get("line-opacity"),o=r.paint.get("line-width"),s=r.paint.get("line-layer-opacity");if(a.constantOr(1)===0||o.constantOr(1)===0||s===0)return;let l=!!e.style.map.terrain;if(s<1){let u=nst(e,r,i,l);Iat(e,t,r,i,n,l),ast(e,s,u,r);return}Iat(e,t,r,i,n,l)}function Iat(e,t,r,i,n,a){let{isRenderingToTexture:o}=n,s=e.getDepthModeForSublayer(0,Ba.ReadOnly),l=e.colorModeForRenderPass(),u=r.paint.get("line-dasharray"),c=u.constantOr(1),f=r.paint.get("line-pattern"),h=f.constantOr(1),d=r.paint.get("line-gradient"),p=r.getCrossfadeParameters(),v;v=h?"linePattern":c&&d?"lineGradientSDF":c?"lineSDF":d?"lineGradient":"line";let m=e.context,g=m.gl,w=e.transform,b=!0;for(let _ of i){let M=t.getTile(_);if(h&&!M.patternsLoaded())continue;let x=M.getBucket(r);if(!x)continue;let T=x.programConfigurations.get(r.id),A=e.context.program.get(),y=e.useProgram(v,T),E=b||y.program!==A,S=a?e.getTerrainDataForTile(_,o):null,C=f.constantOr(null),k=u==null?void 0:u.constantOr(null);if(C&&M.imageAtlas){let L=M.imageAtlas,I=L.patternPositions[C.to.toString()],B=L.patternPositions[C.from.toString()];I&&B&&T.setConstantPatternPositions(I,B)}else if(k){let L=r.layout.get("line-cap").constantOr(null)==="round",I=e.lineAtlas.getDash(k.to,L),B=e.lineAtlas.getDash(k.from,L);T.setConstantDashPositions(I,B)}let D=w.getProjectionData({overscaledTileID:_,applyGlobeMatrix:!o,applyTerrainMatrix:!0}),F=w.getPixelScale(),P;h?(P=t5r(e,M,r,F,p),b4r(m,g,M,T,p)):c&&d?(P=i5r(e,M,r,F,p,x.lineClipsArray.length),A4r(e,t,m,g,r,x,_,T,p)):c?(P=r5r(e,M,r,F,p),w4r(e,m,g,T,E,p)):d?(P=e5r(e,M,r,F,x.lineClipsArray.length),T4r(e,t,m,g,r,x,_)):P=Dq(e,M,r,F);let R=e.stencilModeForClipping(_);y.draw(m,g.TRIANGLES,s,R,l,To.disabled,P,S,D,r.id,x.layoutVertexBuffer,x.indexBuffer,x.segments,r.paint,e.transform.zoom,T,x.layoutVertexBuffer2),b=!1}}function sst(e,t,r,i,n){if(!r||!(i!=null&&i.imageAtlas))return;let a=i.imageAtlas.patternPositions,o=a[r.to.toString()],s=a[r.from.toString()];if(!o&&s&&(o=s),!s&&o&&(s=o),!o||!s){let l=n.getPaintProperty(t);o=a[l],s=a[l]}o&&s&&e.setConstantPatternPositions(o,s)}function S4r(e,t,r,i,n){let a=r.paint.get("fill-color"),o=r.paint.get("fill-opacity"),s=r.paint.get("fill-layer-opacity");if(o.constantOr(1)===0||s===0)return;if(s<1){if(n.currentPass!=="translucent")return;let c=nst(e,r,i,!!e.style.map.terrain);Rat(e,t,r,i,n),ast(e,s,c,r);return}let l=r.paint.get("fill-pattern"),u=e.opaquePassEnabledForLayer()&&!l.constantOr(1)&&a.constantOr(ea.transparent).a===1&&o.constantOr(0)===1;if(u&&n.currentPass==="opaque"){let{isRenderingToTexture:c}=n,f=e.colorModeForRenderPass();Bae(e,t,r,i,e.getDepthModeForSublayer(1,Ba.ReadWrite),f,!1,c);return}if(u&&n.currentPass==="translucent"){lst(e,t,r,i,n);return}n.currentPass==="translucent"&&Rat(e,t,r,i,n)}function Rat(e,t,r,i,n){let{isRenderingToTexture:a}=n,o=e.colorModeForRenderPass();Bae(e,t,r,i,e.getDepthModeForSublayer(1,Ba.ReadOnly),o,!1,a),lst(e,t,r,i,n)}function lst(e,t,r,i,n){if(!r.paint.get("fill-antialias"))return;let{isRenderingToTexture:a}=n,o=e.colorModeForRenderPass();Bae(e,t,r,i,e.getDepthModeForSublayer(r.getPaintProperty("fill-outline-color")?2:0,Ba.ReadOnly),o,!0,a)}function Bae(e,t,r,i,n,a,o,s){var x;let l=e.context.gl,u="fill-pattern",c=r.paint.get(u),f=c==null?void 0:c.constantOr(1),h=r.getCrossfadeParameters(),d,p,v,m,g,w=e.transform,b=r.paint.get("fill-translate"),_=r.paint.get("fill-translate-anchor");o?(p=f&&!r.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",d=l.LINES):(p=f?"fillPattern":"fill",d=l.TRIANGLES);let M=c.constantOr(null);for(let T of i){let A=t.getTile(T);if(f&&!A.patternsLoaded())continue;let y=A.getBucket(r);if(!y)continue;let E=(x=y.sdfPatterns[r.id])!=null?x:!1,S=y.programConfigurations.get(r.id),C=e.useProgram(p,S),k=e.getTerrainDataForTile(T,s);f&&(e.context.activeTexture.set(l.TEXTURE0),A.imageAtlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE),S.updatePaintBuffers(h)),sst(S,u,M,A,r);let D=w.getProjectionData({overscaledTileID:T,applyGlobeMatrix:!s,applyTerrainMatrix:!0}),F=Dm(w,A,b,_);o?(m=y.indexBuffer2,g=y.segments2,v=p==="fillOutlinePattern"&&f?zwr(e,h,A,F,E):Rwr(F)):(m=y.indexBuffer,g=y.segments,v=f?Xot(e,h,A,F,E):Iwr(F));let P=e.stencilModeForClipping(T);C.draw(e.context,d,n,P,a,To.backCCW,v,k,D,r.id,y.layoutVertexBuffer,m,g,r.paint,e.transform.zoom,S)}}function E4r(e,t,r,i,n){let a=r.paint.get("fill-extrusion-opacity");if(a===0)return;let{isRenderingToTexture:o}=n;if(n.currentPass==="translucent"){let s=new Ba(e.context.gl.LEQUAL,Ba.ReadWrite,n.depthRangeFor3D);if(a===1&&!r.paint.get("fill-extrusion-pattern").constantOr(1)){let l=e.colorModeForRenderPass();$ne(e,t,r,i,s,Fo.disabled,l,o)}else $ne(e,t,r,i,s,Fo.disabled,ql.disabled,o),$ne(e,t,r,i,s,e.stencilModeFor3D(),e.colorModeForRenderPass(),o)}}function $ne(e,t,r,i,n,a,o,s){var g;let l=e.context,u=l.gl,c="fill-extrusion-pattern",f=r.paint.get(c),h=f.constantOr(1),d=r.getCrossfadeParameters(),p=r.paint.get("fill-extrusion-opacity"),v=f.constantOr(null),m=e.transform;for(let w of i){let b=t.getTile(w),_=b.getBucket(r);if(!_)continue;let M=(g=e.style.map.terrain)==null?void 0:g.getTerrainData(w),x=_.programConfigurations.get(r.id),T=e.useProgram(h?"fillExtrusionPattern":"fillExtrusion",x);h&&(e.context.activeTexture.set(u.TEXTURE0),b.imageAtlasTexture.bind(u.LINEAR,u.CLAMP_TO_EDGE),x.updatePaintBuffers(d));let A=m.getProjectionData({overscaledTileID:w,applyGlobeMatrix:!s,applyTerrainMatrix:!0});sst(x,c,v,b,r);let y=Dm(m,b,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),E=r.paint.get("fill-extrusion-vertical-gradient"),S=h?Cwr(e,E,p,y,w,d,b):Yot(e,E,p,y);T.draw(l,l.gl.TRIANGLES,n,a,o,To.backCCW,S,M,A,r.id,_.layoutVertexBuffer,_.indexBuffer,_.segments,r.paint,e.transform.zoom,x,e.style.map.terrain&&_.centroidVertexBuffer)}}function k4r(e,t,r,i,n){if(n.currentPass!=="offscreen"&&n.currentPass!=="translucent")return;let{isRenderingToTexture:a}=n,o=e.context,s=e.style.projection.useSubdivision,l=e.getDepthModeForSublayer(0,Ba.ReadOnly),u=e.colorModeForRenderPass();if(n.currentPass==="offscreen")C4r(e,t,i,r,l,Fo.disabled,u),o.viewport.set([0,0,e.width,e.height]);else if(n.currentPass==="translucent")if(s){let[c,f,h]=e.stencilConfigForOverlapTwoPass(i);Wne(e,t,r,h,c,l,u,!1,a),Wne(e,t,r,h,f,l,u,!0,a)}else{let[c,f]=e.getStencilConfigForOverlapAndUpdateStencilID(i);Wne(e,t,r,f,c,l,u,!1,a)}}function Wne(e,t,r,i,n,a,o,s,l){let u=e.style.projection,c=e.context,f=e.transform,h=c.gl,d=[`#define NUM_ILLUMINATION_SOURCES ${r.paint.get("hillshade-highlight-color").values.length}`],p=e.useProgram("hillshade",null,!1,d),v=!e.options.moving;for(let m of i){let g=t.getTile(m),w=g.fbo;if(!w)continue;let b=u.getMeshFromTileID(c,m.canonical,s,!0,"raster"),_=e.getTerrainDataForTile(m,l);c.activeTexture.set(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,w.colorAttachment.get());let M=f.getProjectionData({overscaledTileID:m,aligned:v,applyGlobeMatrix:!l,applyTerrainMatrix:!0});p.draw(c,h.TRIANGLES,a,n[m.overscaledZ],o,To.backCCW,Hwr(e,g,r),_,M,r.id,b.vertexBuffer,b.indexBuffer,b.segments)}}function C4r(e,t,r,i,n,a,o){let s=e.context,l=s.gl,u=i.paint.get("resampling")==="nearest"?l.NEAREST:l.LINEAR;for(let c of r){let f=t.getTile(c),h=f.dem;if(!(h!=null&&h.data)||!f.needsHillshadePrepare)continue;let d=h.dim+2,p=h.stride,v=h.getPixels();if(s.activeTexture.set(l.TEXTURE1),s.pixelStoreUnpackPremultiplyAlpha.set(!1),f.demTexture||(f.demTexture=e.getTileTexture(p)),f.demTexture){let g=f.demTexture;g.update(v,{premultiply:!1}),g.bind(l.NEAREST,l.CLAMP_TO_EDGE)}else f.demTexture=new vu(s,v,l.RGBA,{premultiply:!1}),f.demTexture.bind(l.NEAREST,l.CLAMP_TO_EDGE);s.activeTexture.set(l.TEXTURE0);let m=f.fbo;if(!m){let g=new vu(s,{width:d,height:d,data:null},l.RGBA);g.bind(u,l.CLAMP_TO_EDGE),m=f.fbo=s.createFramebuffer(d,d,!0,!1),m.colorAttachment.set(g.texture)}s.bindFramebuffer.set(m.framebuffer),s.viewport.set([0,0,d,d]),e.useProgram("hillshadePrepare").draw(s,l.TRIANGLES,n,a,o,To.disabled,jwr(f.tileID,h),null,null,i.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),f.needsHillshadePrepare=!1}}function D4r(e,t,r,i,n){if(n.currentPass!=="translucent"||!i.length)return;let{isRenderingToTexture:a}=n,o=e.style.projection.useSubdivision,s=e.getDepthModeForSublayer(0,Ba.ReadOnly),l=e.colorModeForRenderPass();if(o){let[u,c,f]=e.stencilConfigForOverlapTwoPass(i);Yne(e,t,r,f,u,s,l,!1,a),Yne(e,t,r,f,c,s,l,!0,a)}else{let[u,c]=e.getStencilConfigForOverlapAndUpdateStencilID(i);Yne(e,t,r,c,u,s,l,!1,a)}}function Yne(e,t,r,i,n,a,o,s,l){var w;let u=e.style.projection,c=e.context,f=e.transform,h=c.gl,d=e.useProgram("colorRelief"),p=!e.options.moving,v=r.paint.get("resampling")==="nearest"?h.NEAREST:h.LINEAR,m=!0,g=0;for(let b of i){let _=t.getTile(b),M=_.dem;if(!(M!=null&&M.data))continue;if(m){zat||(zat=h.getParameter(h.MAX_TEXTURE_SIZE));let E=zat,{elevationTexture:S,colorTexture:C}=r.getColorRampTextures(c,E,M.getUnpackVector());c.activeTexture.set(h.TEXTURE1),S.bind(h.NEAREST,h.CLAMP_TO_EDGE),c.activeTexture.set(h.TEXTURE4),C.bind(h.LINEAR,h.CLAMP_TO_EDGE),m=!1,g=S.size[0]}let x=M.stride;c.activeTexture.set(h.TEXTURE0),(!_.demTexture||_.needsColorReliefPrepare)&&(c.pixelStoreUnpackPremultiplyAlpha.set(!1),_.demTexture||(_.demTexture=(w=e.getTileTexture(x))!=null?w:new vu(c,{width:x,height:x,data:null},h.RGBA)),_.demTexture.update(M.getPixels(),{premultiply:!1}),_.needsColorReliefPrepare=!1),_.demTexture.bind(v,h.CLAMP_TO_EDGE);let T=u.getMeshFromTileID(c,b.canonical,s,!0,"raster"),A=e.getTerrainDataForTile(b,l),y=f.getProjectionData({overscaledTileID:b,aligned:p,applyGlobeMatrix:!l,applyTerrainMatrix:!0});d.draw(c,h.TRIANGLES,a,n[b.overscaledZ],o,To.backCCW,Ywr(r,_.dem,g),A,y,r.id,T.vertexBuffer,T.indexBuffer,T.segments)}}function F4r(e,t,r,i,n){if(n.currentPass!=="translucent"||r.paint.get("raster-opacity")===0||!i.length)return;let{isRenderingToTexture:a}=n,o=t.getSource(),s=e.style.projection.useSubdivision;if(o instanceof XT)cq(e,t,r,i,null,!1,!1,o.tileCoords,o.imageWarp,o.flippedWindingOrder,a,o.getMesh(e.context,s));else if(s){let[l,u,c]=e.stencilConfigForOverlapTwoPass(i);cq(e,t,r,c,l,!1,!0,Xne,$T,!1,a),cq(e,t,r,c,u,!0,!0,Xne,$T,!1,a)}else{let[l,u]=e.getStencilConfigForOverlapAndUpdateStencilID(i);cq(e,t,r,u,l,!1,!0,Xne,$T,!1,a)}}function cq(e,t,r,i,n,a,o,s,l,u=!1,c=!1,f=null){let h=i[i.length-1].overscaledZ,d=e.context,p=d.gl,v=e.useProgram("raster"),m=e.transform,g=e.style.projection,w=e.colorModeForRenderPass(),b=!e.options.moving,_=r.paint.get("raster-opacity"),M=r.paint.get("resampling")==="nearest"||r.paint.get("raster-resampling")==="nearest"?p.NEAREST:p.LINEAR,x=r.paint.get("raster-fade-duration"),T=!!e.style.map.terrain;for(let A of i){let y=e.getDepthModeForSublayer(A.overscaledZ-h,_===1?Ba.ReadWrite:Ba.ReadOnly,p.LESS),E=t.getTile(A);d.activeTexture.set(p.TEXTURE0),E.texture.bind(M,p.CLAMP_TO_EDGE,p.LINEAR_MIPMAP_NEAREST),d.activeTexture.set(p.TEXTURE1);let{parentTile:S,parentScaleBy:C,parentTopLeft:k,fadeValues:D}=L4r(E,t,x,T);E.fadeOpacity=D.tileOpacity,S?(S.fadeOpacity=D.parentTileOpacity,S.texture.bind(M,p.CLAMP_TO_EDGE,p.LINEAR_MIPMAP_NEAREST)):E.texture.bind(M,p.CLAMP_TO_EDGE,p.LINEAR_MIPMAP_NEAREST),E.texture.useMipmap&&d.extTextureFilterAnisotropic&&e.transform.pitch>e.options.anisotropicFilterPitch&&p.texParameterf(p.TEXTURE_2D,d.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,d.extTextureFilterAnisotropicMax);let F=e.getTerrainDataForTile(A,c),P=m.getProjectionData({overscaledTileID:A,aligned:b,applyGlobeMatrix:!c,applyTerrainMatrix:!0}),R=zbr(k,C,D.fadeMix,r,s,l),L=f!=null?f:g.getMeshFromTileID(d,A.canonical,a,o,"raster"),I=n?n[A.overscaledZ]:Fo.disabled;v.draw(d,p.TRIANGLES,y,I,w,u?To.frontCCW:To.backCCW,R,F,P,r.id,L.vertexBuffer,L.indexBuffer,L.segments)}}function L4r(e,t,r,i){let n={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(r===0||i)return n;if(e.fadingParentID){let a=t.getLoadedTile(e.fadingParentID);if(!a)return n;let o=2**(a.tileID.overscaledZ-e.tileID.overscaledZ);return{parentTile:a,parentScaleBy:o,parentTopLeft:[e.tileID.canonical.x*o%1,e.tileID.canonical.y*o%1],fadeValues:P4r(e,a,r)}}return e.selfFading?{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:I4r(e,r)}:n}function P4r(e,t,r){let i=Oo(),n=(i-e.timeAdded)/r,a=(i-t.timeAdded)/r,o=e.fadingDirection===1,s=Jn(n,0,1),l=Jn(1-a,0,1),u=o?s:l;return{tileOpacity:u,parentTileOpacity:o?l:s,fadeMix:{opacity:1,mix:1-u}}}function I4r(e,t){let r=(Oo()-e.timeAdded)/t,i=Jn(r,0,1);return{tileOpacity:i,fadeMix:{opacity:i,mix:0}}}function R4r(e,t,r,i,n){let a=r.paint.get("background-color"),o=r.paint.get("background-opacity");if(o===0)return;let{isRenderingToTexture:s}=n,l=e.context,u=l.gl,c=e.style.projection,f=e.transform,h=f.tileSize,d=r.paint.get("background-pattern");if(e.isPatternMissing(d))return;let p=!d&&a.a===1&&o===1&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(n.currentPass!==p)return;let v=Fo.disabled,m=e.getDepthModeForSublayer(0,p==="opaque"?Ba.ReadWrite:Ba.ReadOnly),g=e.colorModeForRenderPass(),w=e.useProgram(d?"backgroundPattern":"background"),b=i||ZT(f,{tileSize:h,terrain:e.style.map.terrain});d&&(l.activeTexture.set(u.TEXTURE0),e.patternAtlas.bind(e.context));let _=r.getCrossfadeParameters();for(let M of b){let x=f.getProjectionData({overscaledTileID:M,applyGlobeMatrix:!s,applyTerrainMatrix:!0}),T=d?d5r(o,e,d,{tileID:M,tileSize:h},_):h5r(o,a),A=e.getTerrainDataForTile(M,s),y=c.getMeshFromTileID(l,M.canonical,!1,!0,"raster");w.draw(l,u.TRIANGLES,m,v,g,To.backCCW,T,A,x,r.id,y.vertexBuffer,y.indexBuffer,y.segments)}}function U4r(e){let t=e.transform.padding;Bat(e,e.transform.height-(t.top||0),3,z4r),Bat(e,t.bottom||0,3,B4r),qat(e,t.left||0,3,q4r),qat(e,e.transform.width-(t.right||0),3,O4r);let r=e.transform.centerPoint;V4r(e,r.x,e.transform.height-r.y,N4r)}function V4r(e,t,r,i){Sq(e,t-1,r-10,2,20,i),Sq(e,t-10,r-1,20,2,i)}function Bat(e,t,r,i){Sq(e,0,t+r/2,e.transform.width,r,i)}function qat(e,t,r,i){Sq(e,t-r/2,0,r,e.transform.height,i)}function Sq(e,t,r,i,n,a){let o=e.context,s=o.gl;s.enable(s.SCISSOR_TEST),s.scissor(t*e.pixelRatio,r*e.pixelRatio,i*e.pixelRatio,n*e.pixelRatio),o.clear({color:a}),s.disable(s.SCISSOR_TEST)}function G4r(e,t,r){for(let i of r)H4r(e,t,i)}function H4r(e,t,r){var g,w;let i=e.context,n=i.gl,a=e.useProgram("debug"),o=Ba.disabled,s=Fo.disabled,l=e.colorModeForRenderPass(),u="$debug",c=(g=e.style.map.terrain)==null?void 0:g.getTerrainData(r);i.activeTexture.set(n.TEXTURE0);let f=((w=t.getTileByID(r.key).latestRawTileData)==null?void 0:w.byteLength)||0,h=Math.floor(f/1024),d=t.getTile(r).tileSize,p=512/Math.min(d,512)*(r.overscaledZ/e.transform.zoom)*.5,v=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(v+=` => ${r.overscaledZ}`),j4r(e,`${v} ${h}kB`);let m=e.transform.getProjectionData({overscaledTileID:r,applyGlobeMatrix:!0,applyTerrainMatrix:!0});a.draw(i,n.TRIANGLES,o,s,ql.alphaBlended,To.disabled,kat(ea.transparent,p),null,m,u,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments),a.draw(i,n.LINE_STRIP,o,s,l,To.disabled,kat(ea.red),c,m,u,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments)}function j4r(e,t){e.initDebugOverlayCanvas();let r=e.debugOverlayCanvas,i=e.context.gl,n=e.debugOverlayCanvas.getContext("2d");n.clearRect(0,0,r.width,r.height),n.shadowColor="white",n.shadowBlur=2,n.lineWidth=1.5,n.strokeStyle="white",n.textBaseline="top",n.font="bold 36px Open Sans, sans-serif",n.fillText(t,5,5),n.strokeText(t,5,5),e.debugOverlayTexture.update(r),e.debugOverlayTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE)}function $4r(e,t){let r=null,i=Object.values(e._layers).flatMap(s=>s.source&&!s.isHidden(t)?[e.tileManagers[s.source]]:[]),n=i.filter(s=>s.getSource().type==="vector"),a=i.filter(s=>s.getSource().type!=="vector"),o=s=>{(!r||r.getSource().maxzoom<s.getSource().maxzoom)&&(r=s)};for(let s of n)o(s);if(!r)for(let s of a)o(s);return r}function W4r(e,t,r,i){let{isRenderingGlobe:n}=i,a=e.context,o=r.implementation,s=e.style.projection,l=e.transform,u=l.getProjectionDataForCustomLayer(n),c={farZ:l.farZ,nearZ:l.nearZ,fov:l.fov*Math.PI/180,modelViewProjectionMatrix:l.modelViewProjectionMatrix,projectionMatrix:l.projectionMatrix,shaderData:{variantName:s.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793;
uniform mat4 u_projection_matrix;
${s.shaderPreludeCode.vertexSource}`,define:s.shaderDefine},defaultProjectionData:u,getProjectionData:h=>{var d;return l.getProjectionData({overscaledTileID:new Bc(h.tileID.canonical.z,(d=h.tileID.wrap)!=null?d:0,h.tileID.canonical.z,h.tileID.canonical.x,h.tileID.canonical.y),aligned:h.aligned,applyGlobeMatrix:h.applyGlobeMatrix,applyTerrainMatrix:h.applyTerrainMatrix})}},f=o.renderingMode?o.renderingMode:"2d";if(i.currentPass==="offscreen"){let h=o.prerender;h&&(e.setCustomLayerDefaults(),a.setColorMode(e.colorModeForRenderPass()),h.call(o,a.gl,c),a.setDirty(),e.setBaseState())}else if(i.currentPass==="translucent"){e.setCustomLayerDefaults(),a.setColorMode(e.colorModeForRenderPass()),a.setStencilMode(Fo.disabled);let h=f==="3d"?e.getDepthModeFor3D():e.getDepthModeForSublayer(0,Ba.ReadOnly);a.setDepthMode(h),o.render(a.gl,c),a.setDirty(),e.setBaseState(),a.bindFramebuffer.set(null)}}function Y4r(e,t){let r=e.context,i=r.gl,n=e.transform,a=ql.unblended,o=new Ba(i.LEQUAL,Ba.ReadWrite,[0,1]),s=t.tileManager.getRenderableTiles(),l=e.useProgram("terrainDepth");r.bindFramebuffer.set(t.getFramebuffer().framebuffer),r.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),r.clear({color:ea.white,depth:1});for(let u of s){let c=t.getTerrainMesh(u.tileID),f=t.getTerrainData(u.tileID),h=n.getProjectionData({overscaledTileID:u.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),d=mwr(t.getSkirtLength(n.zoom));l.draw(r,i.TRIANGLES,o,Fo.disabled,a,To.backCCW,d,f,h,"terrain",c.vertexBuffer,c.indexBuffer,c.segments)}r.bindFramebuffer.set(null),r.viewport.set([0,0,e.width,e.height])}function X4r(e,t,r,i){let{isRenderingGlobe:n}=i,a=e.context,o=a.gl,s=e.transform,l=e.colorModeForRenderPass(),u=e.getDepthModeFor3D(),c=e.useProgram("terrain");a.bindFramebuffer.set(null),a.viewport.set([0,0,e.width,e.height]);for(let f of r){let h=t.getTerrainMesh(f.tileID),d=e.renderToTexture.getTexture(f),p=t.getTerrainData(f.tileID);a.activeTexture.set(o.TEXTURE0),d.bind(o.LINEAR,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_LINEAR);let v=t.getSkirtLength(s.zoom),m=s.calculateFogMatrix(f.tileID.toUnwrapped()),g=gwr(v,m,e.style.sky,s.pitch,n),w=s.getProjectionData({overscaledTileID:f.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});c.draw(a,o.TRIANGLES,u,Fo.disabled,l,To.backCCW,g,p,w,"terrain",h.vertexBuffer,h.indexBuffer,h.segments)}}function ust(e,t){if(!t.mesh){let r=new Pm;r.emplaceBack(-1,-1),r.emplaceBack(1,-1),r.emplaceBack(1,1),r.emplaceBack(-1,1);let i=new Mv;i.emplaceBack(0,1,2),i.emplaceBack(0,2,3),t.mesh=new M8(e.createVertexBuffer(r,l3.members),e.createIndexBuffer(i),Ws.simpleSegment(0,0,r.length,i.length))}return t.mesh}function Z4r(e,t){let r=e.context,i=r.gl,n=m5r(t,e.transform,e.pixelRatio),a=new Ba(i.LEQUAL,Ba.ReadWrite,[0,1]),o=Fo.disabled,s=e.colorModeForRenderPass(),l=e.useProgram("sky"),u=ust(r,t);l.draw(r,i.TRIANGLES,a,o,s,To.disabled,n,null,void 0,"sky",u.vertexBuffer,u.indexBuffer,u.segments)}function K4r(e,t){let r=e.getCartesianPosition();Bet(r,r);let i=Qd(new Float64Array(16));return e.properties.get("anchor")==="map"&&(km(i,i,t.rollInRadians),Xb(i,i,-t.pitchInRadians),km(i,i,t.bearingInRadians),Xb(i,i,t.center.lat*Math.PI/180),die(i,i,-t.center.lng*Math.PI/180)),qet(r,r,i),r}function J4r(e,t,r){let i=e.context,n=i.gl,a=e.useProgram("atmosphere"),o=new Ba(n.LEQUAL,Ba.ReadOnly,[0,1]),s=e.transform,l=K4r(r,e.transform),u=s.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),c=t.properties.get("atmosphere-blend")*u.projectionTransition;if(c===0)return;let f=YT(s.worldSize,s.center.lat),h=Oot(s),d=v5r(l,c,h,f,s.inverseProjectionMatrix),p=ust(i,t);a.draw(i,n.TRIANGLES,o,Fo.disabled,ql.alphaBlended,To.disabled,d,null,null,"atmosphere",p.vertexBuffer,p.indexBuffer,p.segments)}function eTr(e,t,r){var n;let i=(n=t==null?void 0:t.transitionState)!=null?n:0;return{currentPass:"offscreen",currentLayer:0,opaquePassCutoff:1/0,depthRangeFor3D:[0,1],isRenderingToTexture:!1,transform:e,terrain:r,projectionTransition:i,isRenderingGlobe:i>0}}function fst(e,t){let r=!1,i=null,n,a=()=>{i=null,r&&(r=(e(...n),i=setTimeout(a,t),!1))};return(...o)=>(r=!0,n=o,i||a(),i)}function m8(e,t){(!e.duration||e.duration<t.duration)&&(e.duration=t.duration,e.easing=t.easing)}function y8(e,t,r){let{maxSpeed:i,linearity:n,deceleration:a}=r,o=Jn(e*n/(t/1e3),-i,i),s=Math.abs(o)/(a*n);return{easing:r.easing,duration:s*1e3,amount:s/2*o}}function dae(e,t){if(e.length!==t.length)throw Error(`The number of touches and points are not equal - touches ${e.length}, points ${t.length}`);let r={};for(let i=0;i<e.length;i++)r[e[i].identifier]=t[i];return r}function cTr(e){let t=new tr(0,0);for(let r of e)t._add(r);return t.div(e.length)}function pTr(e,t){let r=dTr[t];return e.buttons===void 0||(e.buttons&r)!==r}function mTr({enable:e,clickTolerance:t}){return new E8({clickTolerance:t,move:(r,i)=>({around:i,panDelta:i.sub(r)}),activateOnStart:!0,moveStateManager:new k8({checkCorrectEvent:r=>r.button===0&&!r.ctrlKey}),enable:e,assignEvents:Fq})}function yTr({enable:e,clickTolerance:t,aroundCenter:r=!0,minPixelCenterThreshold:i=100,rotateSpeed:n=.8},a){return new E8({clickTolerance:t,move:(o,s)=>{let l=a();if(r&&Math.abs(l.y-o.y)>i)return{bearingDelta:Tie(new tr(o.x,s.y),s,l)};let u=(s.x-o.x)*n;return r&&s.y<l.y&&(u=-u),{bearingDelta:u}},moveStateManager:new k8({checkCorrectEvent:o=>o.button===0&&o.ctrlKey||o.button===2&&!o.ctrlKey}),enable:e,assignEvents:Fq})}function xTr({enable:e,clickTolerance:t,pitchSpeed:r=-.5}){return new E8({clickTolerance:t,move:(i,n)=>({pitchDelta:(n.y-i.y)*r}),moveStateManager:new k8({checkCorrectEvent:i=>i.button===0&&i.ctrlKey||i.button===2}),enable:e,assignEvents:Fq})}function _Tr({enable:e,clickTolerance:t,rollDegreesPerPixelMoved:r=.3},i){return new E8({clickTolerance:t,move:(n,a)=>{let o=i(),s=(a.x-n.x)*r;return a.y<o.y&&(s=-s),{rollDelta:s}},moveStateManager:new k8({checkCorrectEvent:n=>n.button===2&&n.ctrlKey}),enable:e,assignEvents:Fq})}function fq(e,t,r){for(let i=0;i<e.length;i++)if(e[i].identifier===r)return t[i]}function Nat(e,t){return Math.log(e/t)/Math.LN2}function Uat(e,t){return e.angleWith(t)*180/Math.PI}function Zne(e){return Math.abs(e.y)>Math.abs(e.x)}function TTr(e){return e*(2-e)}function Kne(e){var t;return((t=e.panDelta)==null?void 0:t.mag())||e.zoomDelta||e.bearingDelta||e.pitchDelta||e.rollDelta}function OTr(e=!1){return Ki(this,null,function*(){if(a3!==void 0&&!e)return a3;if(window.navigator.permissions===void 0)return a3=!!window.navigator.geolocation,a3;try{a3=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch(t){a3=!!window.navigator.geolocation}return a3})}function Est(e,t,r,i=!1){if(i||!r.getCoveringTilesDetailsProvider().allowWorldCopies())return e==null?void 0:e.wrap();let n=new mn(e.lng,e.lat);if(e=new mn(e.lng,e.lat),t){let a=new mn(e.lng-360,e.lat),o=new mn(e.lng+360,e.lat),s=r.locationToScreenPoint(e).distSqr(t);r.locationToScreenPoint(a).distSqr(t)<s?e=a:r.locationToScreenPoint(o).distSqr(t)<s&&(e=o)}for(;Math.abs(e.lng-r.center.lng)>180;){let a=r.locationToScreenPoint(e);if(a.x>=0&&a.y>=0&&a.x<=r.width&&a.y<=r.height)break;e.lng>r.center.lng?e.lng-=360:e.lng+=360}return e.lng!==n.lng&&r.isPointOnMapSurface(r.locationToScreenPoint(e))?e:n}function kst(e,t,r){let i=e.classList;for(let n in Oae)i.remove(`maplibregl-${r}-anchor-${n}`);i.add(`maplibregl-${r}-anchor-${t}`)}function tp(e,t,r=[]){let i=$n.createNS("http://www.w3.org/2000/svg",e);for(let n in t)i.setAttributeNS(null,n,t[n]);for(let n of r)i.appendChild(n);return i}function NTr(){return Jne||(Jne=tp("svg",{display:"block",height:"41px",width:"27px",viewBox:"0 0 27 41"},[tp("g",{"fill-rule":"nonzero"},[tp("g",{transform:"translate(3.0, 29.0)",fill:"#000000"},[["10.5","5.25002273"],["10.5","5.25002273"],["9.5","4.77275007"],["8.5","4.29549936"],["7.5","3.81822308"],["6.5","3.34094679"],["5.5","2.86367051"],["4.5","2.38636864"]].map(([e,t])=>tp("ellipse",{opacity:"0.04",cx:"10.5",cy:"5.80029008",rx:e,ry:t}))),tp("g",{fill:Cst},[tp("path",{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"})]),tp("g",{opacity:"0.25",fill:"#000000"},[tp("path",{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"})]),tp("g",{transform:"translate(6.0, 7.0)",fill:"#FFFFFF"}),tp("g",{transform:"translate(8.0, 8.0)"},[tp("circle",{fill:"#000000",opacity:"0.25",cx:"5.5",cy:"5.5",r:"5.4999962"}),tp("circle",{fill:"#FFFFFF",cx:"5.5",cy:"5.5",r:"5.4999962"})])])]),Jne)}function UTr(e){return e.firstElementChild.children[1]}function $at(e,t,r){let i=(r==null?void 0:r.maxWidth)||100,n=e._container.clientHeight/2,a=e._container.clientWidth/2,o=e.unproject([a-i/2,n]),s=e.unproject([a+i/2,n]),l=Math.round(e.project(s).x-e.project(o).x),u=Math.min(i,l,e._container.clientWidth),c=o.distanceTo(s);if((r==null?void 0:r.unit)==="imperial"){let f=3.2808*c;f>5280?_8(t,u,f/5280,e._getUIString("ScaleControl.Miles")):_8(t,u,f,e._getUIString("ScaleControl.Feet"))}else(r==null?void 0:r.unit)==="nautical"?_8(t,u,c/1852,e._getUIString("ScaleControl.NauticalMiles")):c>=1e3?_8(t,u,c/1e3,e._getUIString("ScaleControl.Kilometers")):_8(t,u,c,e._getUIString("ScaleControl.Meters"))}function _8(e,t,r,i){let n=WTr(r),a=n/r;e.style.width=`${t*a}px`,e.innerHTML=`${n}&nbsp;${i}`}function $Tr(e){let t=10**Math.ceil(-Math.log(e)/Math.LN10);return Math.round(e*t)/t}function WTr(e){let t=10**(`${Math.floor(e)}`.length-1),r=e/t;return r=r>=10?10:r>=5?5:r>=3?3:r>=2?2:r>=1?1:$Tr(r),t*r}function Lst(e){if(!e)return Lst(new tr(0,0));if(typeof e=="number"){let t=Math.round(Math.abs(e)/Math.SQRT2);return{center:new tr(0,0),top:new tr(0,e),"top-left":new tr(t,t),"top-right":new tr(-t,t),bottom:new tr(0,-e),"bottom-left":new tr(t,-t),"bottom-right":new tr(-t,-t),left:new tr(e,0),right:new tr(-e,0)}}if(e instanceof tr||Array.isArray(e)){let t=tr.convert(e);return{center:t,top:t,"top-left":t,"top-right":t,bottom:t,"bottom-left":t,"bottom-right":t,left:t,right:t}}return{center:tr.convert(e.center||[0,0]),top:tr.convert(e.top||[0,0]),"top-left":tr.convert(e["top-left"]||[0,0]),"top-right":tr.convert(e["top-right"]||[0,0]),bottom:tr.convert(e.bottom||[0,0]),"bottom-left":tr.convert(e["bottom-left"]||[0,0]),"bottom-right":tr.convert(e["bottom-right"]||[0,0]),left:tr.convert(e.left||[0,0]),right:tr.convert(e.right||[0,0])}}function e6r(e){var t,r,i,n;return e?{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(i=e.bottom)!=null?i:0,left:(n=e.left)!=null?n:0}:{top:0,right:0,bottom:0,left:0}}function r6r(e,t){return A8().setRTLTextPlugin(e,t)}function i6r(){return A8().getRTLTextPluginStatus()}function n6r(){return t6r}function a6r(){return kq.workerCount}function o6r(e){kq.workerCount=e}function s6r(){return Qh.MAX_PARALLEL_IMAGE_REQUESTS}function l6r(e){Qh.MAX_PARALLEL_IMAGE_REQUESTS=e}function u6r(){return Qh.WORKER_URL}function c6r(e){Qh.WORKER_URL=e}function f6r(e){return Ki(this,null,function*(){yield wae().broadcast("IS",e)})}var Ist,Wat,Ine,QB,Rne,fh,Eq,t,Bo,$n,rg,B_r,cc,Mn,Qne,rp,Is,O0,b8,Xat,eae,Zat,Kat,pq,Jat,W_r,Y_r,tae,X_r,Z_r,Q_r,rae,xae,ebr,tbr,rbr,ibr,nbr,abr,obr,sbr,lbr,ubr,cbr,_ae,kq,gbr,_q,rot,tq,Ev,oot,sot,Tae,lot,cot,$T,Rbr,zbr,M8,l3,rq,XT,pot,vot,got,Hbr,mot,jbr,$br,iae,Ybr,Qnt,yot,Xbr,Aae,Mae,t3r,aat,qm,aae,c3r,oat,p3r,x3r,w3r,uat,d8,cat,T3r,A3r,M3r,S3r,E3r,k3r,C3r,p8,D3r,F3r,pat,xl,L3r,g8,P3r,I3r,R3r,Eot,z3r,B3r,q3r,O3r,N3r,U3r,V3r,G3r,gat,tg,kot,Cot,uae,cae,Fae,H3r,j3r,$3r,yat,W3r,xat,Tq,Aq,Y3r,X3r,qne,Bot,_at,One,swr,Une,lwr,Aat,Not,Sat,Hot,Eat,cwr,hae,fwr,hwr,dwr,pwr,vwr,gwr,mwr,Cq,xwr,Iae,jot,HT,$ot,sq,Mwr,Ewr,kwr,Yot,Cwr,Dwr,Fwr,Lwr,Pwr,Xot,Iwr,Rwr,zwr,Bwr,qwr,Owr,kat,Nwr,Uwr,Zot,Kot,Vwr,Gwr,Hwr,jwr,Wwr,Ywr,Xwr,Zwr,Kwr,Jwr,Qwr,Dq,e5r,t5r,r5r,i5r,n5r,a5r,o5r,s5r,l5r,Qot,est,u5r,c5r,f5r,h5r,d5r,p5r,v5r,g5r,m5r,lq,y5r,x5r,Cat,_5r,No,b5r,w5r,T5r,A5r,M5r,S5r,E5r,k5r,C5r,D5r,F5r,L5r,P5r,I5r,R5r,z5r,B5r,q5r,O5r,N5r,U5r,V5r,G5r,H5r,j5r,$5r,W5r,Y5r,X5r,Z5r,K5r,zae,J5r,Q5r,e4r,t4r,tst,q0,ql,n4r,Ba,Hne,Fo,Dat,jne,To,uq,o4r,zat,Xne,z4r,B4r,q4r,O4r,N4r,Q4r,u3,tTr,cst,hst,S8,rTr,iTr,nTr,aTr,oTr,sTr,lTr,uTr,dst,fTr,pae,hTr,E8,dTr,k8,vTr,gTr,Fq,bTr,qae,Oat,pst,vst,gst,wTr,mst,Vat,yst,xst,ATr,MTr,_st,bst,wst,Tst,STr,hq,ETr,kTr,CTr,Ast,Mst,Sst,DTr,Gat,FTr,jT,LTr,PTr,ITr,Hat,RTr,zTr,BTr,qTr,a3,Oae,jat,Cst,Jne,o3,Dst,vae,VTr,dq,x8,s3,gae,Fst,GTr,HTr,jTr,mae,YTr,XTr,ZTr,KTr,JTr,yae,QTr,t6r,Rst=Ea(()=>{Vnt();Ist={};Wat="6.9.0";fh={frame(e,t,r,i){let n=i||window,a=n.requestAnimationFrame(s=>{o(),t(s)}),{unsubscribe:o}=Nz(e.signal,"abort",()=>{o(),n.cancelAnimationFrame(a),r(new RT(e.signal.reason))},!1)},frameAsync(e,t){return new Promise((r,i)=>{this.frame(e,r,i,t)})},getImageData(e,t=0){return this.getImageCanvasContext(e).getImageData(-t,-t,e.width+2*t,e.height+2*t)},getImageCanvasContext(e){let t;if(nB()&&!fie())t=new OffscreenCanvas(e.width,e.height).getContext("2d",{willReadFrequently:!0});else{let r=window.document.createElement("canvas");r.width=e.width,r.height=e.height,t=r.getContext("2d",{willReadFrequently:!0})}if(!t)throw Error("failed to create canvas 2d context");return t.drawImage(e,0,0,e.width,e.height),t},resolveURL(e){return Ine||(Ine=document.createElement("a")),Ine.href=e,Ine.href},get hardwareConcurrency(){return typeof navigator<"u"&&navigator.hardwareConcurrency||4},get prefersReducedMotion(){return Rne===void 0?matchMedia?(QB!=null||(QB=matchMedia("(prefers-reduced-motion: reduce)")),QB.matches):!1:Rne},set prefersReducedMotion(e){Rne=e}},Eq=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt===null?performance.now():this._frozenAt}setNow(e){this._frozenAt=e}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}};$n=(Bo=class{static create(t,r,i){let n=window.document.createElement(t);return r!==void 0&&(n.className=r),i&&i.appendChild(n),n}static createNS(t,r){return window.document.createElementNS(t,r)}static disableDrag(){Bo.docStyle&&Bo.selectProp&&(Bo.userSelect=Bo.docStyle[Bo.selectProp],Bo.docStyle[Bo.selectProp]="none")}static enableDrag(){Bo.docStyle&&Bo.selectProp&&(Bo.docStyle[Bo.selectProp]=Bo.userSelect)}static suppressClickInternal(t){t.preventDefault(),t.stopPropagation(),window.removeEventListener("click",Bo.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",Bo.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",Bo.suppressClickInternal,!0)},0)}static getScale(t){let r=t.getBoundingClientRect();return{x:r.width/t.offsetWidth||1,y:r.height/t.offsetHeight||1,boundingClientRect:r}}static getPoint(t,r,i){let n=r.boundingClientRect;return new tr((i.clientX-n.left)/r.x-t.clientLeft,(i.clientY-n.top)/r.y-t.clientTop)}static mousePos(t,r){let i=Bo.getScale(t);return Bo.getPoint(t,i,r)}static touchPos(t,r){let i=[],n=Bo.getScale(t);for(let a of r)i.push(Bo.getPoint(t,n,a));return i}static sanitize(t){let r=new DOMParser().parseFromString(t,"text/html").body||document.createElement("body"),i=r.querySelectorAll("script, iframe");for(let n of i)n.remove();return Bo.clean(r),r.innerHTML}static isPossiblyDangerous(t,r){let i=r.replace(/\s+/g,"").toLowerCase();if(["src","href","xlink:href"].includes(t)&&(i.includes("javascript:")||i.includes("data:"))||t==="srcdoc"||t.startsWith("on"))return!0}static clean(t){let r=t.children;for(let i of r)Bo.removeAttributes(i),Bo.clean(i)}static removeAttributes(t){for(let{name:r,value:i}of Array.from(t.attributes))Bo.isPossiblyDangerous(r,i)&&t.removeAttribute(r)}},Bo.docStyle=typeof window<"u"&&((t=window.document)==null?void 0:t.documentElement.style),Bo.selectProp=!Bo.docStyle||"userSelect"in Bo.docStyle?"userSelect":"webkitUserSelect",Bo);(function(e){let t,r,i,n;e.resetRequestQueue=()=>{t=[],r=0,i=0,n={}},e.addThrottleControl=f=>{let h=i++;return n[h]=f,h},e.removeThrottleControl=f=>{delete n[f],u()};let a=()=>{for(let f of Object.keys(n))if(n[f]())return!0;return!1};function o(f,h,d,p,v=!0,m){return Ki(this,null,function*(){let g=yield f.transformRequest(h,d);return gB(p.signal),rg.getImage(g,p,v,m)})}e.transformAndGetImage=o,e.getImage=(f,h,d=!0,p)=>new Promise((v,m)=>{f.headers||(f.headers={}),f.headers.accept="image/webp,*/*",ln(f,{type:"image"});let g={abortController:h,requestParameters:f,supportImageRefresh:d,imageBitmapOptions:p,state:"queued",onError:w=>{m(w)},onSuccess:w=>{v(w)}};t.push(g),u()});let s=(f,h)=>typeof createImageBitmap=="function"?Qet(f,h):ett(f),l=f=>Ki(null,null,function*(){f.state="running";let{requestParameters:h,supportImageRefresh:d,imageBitmapOptions:p,onError:v,onSuccess:m,abortController:g}=f,w=d===!1&&!p&&!Hb(self)&&!Mie(h.url)&&(!h.headers||Object.keys(h.headers).reduce((_,M)=>_&&M==="accept",!0));r++;let b=w?c(h,g):Hk(h,g);try{let _=yield b;delete f.abortController,f.state="completed",_.data instanceof HTMLImageElement||ex(_.data)?m(_):!_.data||_.data.byteLength===0?m({data:null,cacheControl:_.cacheControl,expires:_.expires}):m({data:yield s(_.data,p),cacheControl:_.cacheControl,expires:_.expires})}catch(_){delete f.abortController,v(Ic(_))}finally{r--,u()}}),u=()=>{let f=a()?Qh.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:Qh.MAX_PARALLEL_IMAGE_REQUESTS;for(let h=r;h<f&&t.length>0;h++){let d=t.shift();if(d.abortController.signal.aborted){h--;continue}l(d)}},c=(f,h)=>new Promise((d,p)=>{let v=new Image,m=f.url,g=f.credentials;g&&g==="include"?v.crossOrigin="use-credentials":(g&&g==="same-origin"||!Eie(m))&&(v.crossOrigin="anonymous"),h.signal.addEventListener("abort",()=>{v.src="",p(new RT(h.signal.reason))}),v.fetchPriority="high",v.onload=()=>{v.onerror=v.onload=null,d({data:v})},v.onerror=()=>{v.onerror=v.onload=null,!h.signal.aborted&&p(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."))},v.src=m})})(rg||(rg={})),rg.resetRequestQueue();B_r=class{constructor(e){this._transformRequestFn=e!=null?e:null}transformRequest(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}},cc=class extends e0{},Mn=class extends cc{},Qne=class extends cc{constructor(e={}){super("style.load",e)}},rp=class extends cc{constructor(e,t={}){super(e,t),this.dataType="style"}},Is=class extends cc{constructor(e,t={}){super(e,t),this.dataType="source"}},O0=class extends cc{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,r,i={}){r=r instanceof MouseEvent?r:new MouseEvent(e,r);let n=$n.mousePos(t.getCanvas(),r),a=t.unproject(n);super(e,ln({point:n,lngLat:a,originalEvent:r},i)),this._defaultPrevented=!1,this.target=t}},b8=class extends cc{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,r){let i=e==="touchend"?r.changedTouches:r.touches,n=$n.touchPos(t.getCanvasContainer(),i),a=n.map(l=>t.unproject(l)),o=n.reduce((l,u,c,f)=>l.add(u.div(f.length)),new tr(0,0)),s=t.unproject(o);super(e,{points:n,point:o,lngLats:a,lngLat:s,originalEvent:r}),this._defaultPrevented=!1}},Xat=class extends cc{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t){super("wheel",{originalEvent:t}),this._defaultPrevented=!1}},eae=class extends cc{},Zat=class extends cc{constructor(e={}){super("terrain",e)}},Kat=class extends cc{constructor(e={}){super("projectiontransition",e)}},pq=class extends cc{},Jat=class extends cc{constructor(e={}){super("styleimagemissing",e)}};W_r=class extends mu{constructor(){super(),this.images={},this.updateVersion=0,this.loaded=!1,this.requestors=[],this.missingImageResolver=null,this._spriteImagesIds={},this._imagesIds=null,this._renderCallbacksDispatchedThisFrame={}}destroy(){for(let e of Object.keys(this.images))this.removeImage(e);this._spriteImagesIds={}}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(let{ids:t,promiseResolve:r}of this.requestors)r(this._getImagesForIds(t));this.requestors=[]}}getImage(e){let t=this.images[e];if(t&&!t.data&&t.spriteData){let r=t.spriteData;t.data=new As({width:r.width,height:r.height},r.context.getImageData(r.x,r.y,r.width,r.height).data),t.spriteData=null}return t}addImage(e,t){if(this.images[e])throw Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,t)&&(this.images[e]=t,this._imagesIds=null,t.isWebGLImage&&this.updateImage(e,t,!1))}_validate(e,t){let r=!0,i=t.data||t.spriteData;return this._validateStretch(t.stretchX,i==null?void 0:i.width)||(this.fire(new An(Error(`Image "${e}" has invalid "stretchX" value`))),r=!1),this._validateStretch(t.stretchY,i==null?void 0:i.height)||(this.fire(new An(Error(`Image "${e}" has invalid "stretchY" value`))),r=!1),this._validateContent(t.content,t)||(this.fire(new An(Error(`Image "${e}" has invalid "content" value`))),r=!1),r}_validateStretch(e,t){if(!e)return!0;let r=0;for(let i of e){if(i[0]<r||i[1]<i[0]||t<i[1])return!1;r=i[1]}return!0}_validateContent(e,t){if(!e)return!0;if(e.length!==4)return!1;let r=t.spriteData,i=(r==null?void 0:r.width)||t.data.width,n=(r==null?void 0:r.height)||t.data.height;return e[0]<0||i<e[0]||e[1]<0||n<e[1]||e[2]<0||i<e[2]||e[3]<0||n<e[3]||e[2]<e[0]?!1:e[3]>=e[1]}updateImage(e,t,r=!0){var n;let i=this.images[e];if(r){let a=i.data||i.spriteData;if(a.width!==t.data.width||a.height!==t.data.height)throw Error(`size mismatch between old image (${a.width}x${a.height}) and new image (${t.data.width}x${t.data.height}).`)}t.version=((n=i.version)!=null?n:0)+1,this.images[e]=t,this.updateVersion++}removeImage(e){var r;let t=this.images[e];t&&(delete this.images[e],this._imagesIds=null,(r=t.userImage)!=null&&r.onRemove&&t.userImage.onRemove())}listImages(){var e;return(e=this._imagesIds)!=null||(this._imagesIds=Object.keys(this.images)),this._imagesIds}_getSpriteImageId(e,t){return e==="default"?t:`${e}:${t}`}setSpriteImages(e,t){var o;let r=(o=this._spriteImagesIds[e])!=null?o:[],i=[];for(let s in t){let l=this._getSpriteImageId(e,s);i.push(l),l in this.images?this.updateImage(l,t[s],!1):this.addImage(l,t[s])}let n=new Set(i),a=r.filter(s=>!n.has(s));for(let s of a)this.removeImage(s);return this._spriteImagesIds[e]=i,{loaded:i,removed:a}}removeSpriteImages(e){var r;let t=(r=this._spriteImagesIds[e])!=null?r:[];for(let i of t)this.removeImage(i);return delete this._spriteImagesIds[e],t}removeAllSpriteImages(){let e=Object.values(this._spriteImagesIds).flat();for(let t of e)this.removeImage(t);return this._spriteImagesIds={},e}setMissingImageResolver(e){this.missingImageResolver=e}getImages(e){return new Promise((t,r)=>{let i=!0;if(!this.isLoaded())for(let n of e)this.images[n]||(i=!1);this.isLoaded()||i?t(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:t})})}_getImagesForIds(e){return Ki(this,null,function*(){var n;let t=new Set(e.filter(a=>!this.getImage(a))),r=this.missingImageResolver;r&&(yield Promise.allSettled(Array.from(t,a=>r(a))));let i={};for(let a of e){let o=this.getImage(a);o&&(t.delete(a),i[a]={data:o.data.clone(),pixelRatio:o.pixelRatio,sdf:o.sdf,version:o.version,stretchX:o.stretchX,stretchY:o.stretchY,content:o.content,textFitWidth:o.textFitWidth,textFitHeight:o.textFitHeight,hasRenderCallback:!!((n=o.userImage)!=null&&n.render),isWebGLImage:o.isWebGLImage})}for(let a of t)this.fire(new Jat({id:a})),Ma(`Image "${a}" could not be loaded. Please make sure you have added the image before it is needed with map.addImage(), resolved it with map.setMissingStyleImageResolver(), or included it in a "sprite" property in your style.`);return i})}beginFrame(){this._renderCallbacksDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(let t of e){if(this._renderCallbacksDispatchedThisFrame[t])continue;this._renderCallbacksDispatchedThisFrame[t]=!0;let r=this.getImage(t);r||Ma(`Image with ID: "${t}" was not found`),Hit(r)&&this.updateImage(t,r)}}cloneImages(){let e={};for(let t in this.images){let r=this.images[t];e[t]=ma(fn({},r),{data:r.data?r.data.clone():null})}return e}},Y_r=class{constructor(e){this._imageManager=e,this._entries={},this._image=new As({width:1,height:1}),this._dirty=!0}destroy(){this._texture&&(this._texture=(this._texture.destroy(),null)),this._entries={},this._image=new As({width:1,height:1}),this._dirty=!0}getPixelSize(){let{width:e,height:t}=this._image;return{width:e,height:t}}getPattern(e){let t=this._imageManager.getImage(e);if(!t)return null;let r=this._entries[e];if((r==null?void 0:r.image)!==t){let i={w:t.data.width+2,h:t.data.height+2,x:0,y:0};this._entries[e]={bin:i,position:new WB(i,t),image:t}}else if(r.position.version!==t.version)r.position.version=t.version;else return r.position;return this._update(),this._entries[e].position}bind(e){let t=e.gl;this._texture?this._dirty&&(this._dirty=(this._texture.update(this._image),!1)):(this._texture=new vu(e,this._image,t.RGBA),this._dirty=!1),this._texture.bind(t.LINEAR,t.CLAMP_TO_EDGE)}_update(){for(let n in this._entries)this._imageManager.getImage(n)||delete this._entries[n];let e=[];for(let n in this._entries)e.push(this._entries[n].bin);let{w:t,h:r}=hne(e),i=this._image;i.resize({width:t||1,height:r||1});for(let n in this._entries){let{bin:a}=this._entries[n],o=a.x+1,s=a.y+1,l=this._entries[n].image.data,u=l.width,c=l.height;As.copy(l,i,{x:0,y:0},{x:o,y:s},{width:u,height:c}),As.copy(l,i,{x:0,y:c-1},{x:o,y:s-1},{width:u,height:1}),As.copy(l,i,{x:0,y:0},{x:o,y:s+c},{width:u,height:1}),As.copy(l,i,{x:u-1,y:0},{x:o-1,y:s},{width:1,height:c}),As.copy(l,i,{x:0,y:0},{x:o+u,y:s},{width:1,height:c})}this._dirty=!0}},tae=1114111,X_r={start:0,end:tae},Z_r=0;Q_r=class{constructor(e){this.requestManager=e,this._faces={},this._registered=new Set}setFontFaces(e){this._unregisterAll(),this._faces={};for(let[t,r]of Object.entries(e!=null?e:{})){let i=Array.isArray(r)?r:[r];this._faces[t]=i.map(n=>this._declareFontFace(t,n)).filter(n=>n!==null)}}hasFontFaces(){return Object.keys(this._faces).length>0}getFontFamily(e,t){return Ki(this,null,function*(){var r,i;for(let n of e.split(","))for(let a of(r=this._faces[n.trim()])!=null?r:[])if(J_r(a,t)&&((i=a.loaded)!=null||(a.loaded=this._loadFontFace(a)),yield a.loaded))return a.family;return null})}_declareFontFace(e,t){let r=typeof t=="string"?{url:t}:t;if(typeof(r==null?void 0:r.url)!="string")return Ma(`Ignoring the font face declared for "${e}": it has no URL.`),null;let i=`maplibre-gl-font-face-${Z_r++}`,n=r["unicode-range"];if(!(n!=null&&n.length))return{url:r.url,ranges:[X_r],family:i};let a=[];for(let o of n){let s=K_r(o);if(!s){Ma(`Ignoring the unicode range "${o}" of the font face at ${r.url}: it is not a valid range.`);continue}a.push(s)}return a.length?{url:r.url,ranges:a,family:i}:null}_loadFontFace(e){return Ki(this,null,function*(){if(typeof FontFace>"u"||typeof document>"u"||!document.fonts)return Ma(`Ignoring the font face at ${e.url}: this environment has no CSS Font Loading API.`),!1;let t;try{return t=new FontFace(e.family,yield this._downloadFontFile(e.url)),Object.values(this._faces).some(r=>r.includes(e))?(document.fonts.add(t),this._registered.add(t),yield t.load(),!0):!1}catch(r){return t&&this._unregister(t),Ma(`Ignoring the font face at ${e.url}: ${Ic(r).message}`),!1}})}_downloadFontFile(e){return Ki(this,null,function*(){let t=yield this.requestManager.transformRequest(e,"Glyphs"),r=yield Sie(t,new AbortController);if(!(r!=null&&r.data))throw Error(`the response was empty for the font file at ${e}`);return r.data})}_unregister(e){var t;(t=document.fonts)==null||t.delete(e),this._registered.delete(e)}_unregisterAll(){var e;for(let t of this._registered)(e=document.fonts)==null||e.delete(t);this._registered.clear()}destroy(){this._unregisterAll(),this._faces={}}},rae=1e20,xae=new Float64Array(256);for(let e=0;e<256;e++){let t=.5-(e/255)**.45454545454545453;xae[e]=t*Math.abs(t)}xae[255]=-1e20;ebr=class{constructor({fontSize:e=24,buffer:t=3,radius:r=8,cutoff:i=.25,fontFamily:n="sans-serif",fontWeight:a="normal",fontStyle:o="normal",lang:s=null}={}){this.buffer=t,this.radius=r,this.cutoff=i,this.lang=s;let l=this.size=e+t*4,u=this._createCanvas(l),c=this.ctx=u.getContext("2d",{willReadFrequently:!0});c.font=`${o} ${a} ${e}px ${n}`,c.textBaseline="alphabetic",c.textAlign="left",c.fillStyle="black",this.gridOuter=new Float64Array(l*l),this.gridInner=new Float64Array(l*l),this.f=new Float64Array(l),this.z=new Float64Array(l+1),this.v=new Uint16Array(l)}_createCanvas(e){if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(e,e);let t=document.createElement("canvas");return t.width=t.height=e,t}draw(e){let{width:t,actualBoundingBoxAscent:r,actualBoundingBoxDescent:i,actualBoundingBoxLeft:n,actualBoundingBoxRight:a}=this.ctx.measureText(e),o=Math.ceil(r),s=Math.floor(-n),l=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(a)-s)),u=Math.max(0,Math.min(this.size-this.buffer,o+Math.ceil(i))),c=l+2*this.buffer,f=u+2*this.buffer,h=Math.max(c*f,0),d=new Uint8ClampedArray(h),p={data:d,width:c,height:f,glyphWidth:l,glyphHeight:u,glyphTop:o,glyphLeft:s,glyphAdvance:t};if(l===0||u===0)return p;let{ctx:v,buffer:m,gridInner:g,gridOuter:w}=this;this.lang&&(v.lang=this.lang),v.clearRect(m,m,l,u),v.fillText(e,m-s,m+o);let b=v.getImageData(m,m,l,u);w.fill(rae,0,h),g.fill(0,0,h);let _=3;for(let A=0;A<u;A++){let y=(A+m)*c+m;for(let E=0;E<l;E++,_+=4,y++){let S=b.data[_];if(S===0)continue;let C=xae[S];w[y]=Math.max(0,C),g[y]=Math.max(0,-C)}}Ynt(w,0,0,c,f,c,this.f,this.v,this.z);let M=Math.min(m,1);Ynt(g,m-M,m-M,l+2*M,u+2*M,c,this.f,this.v,this.z);let x=255/this.radius,T=255*(1-this.cutoff);for(let A=0;A<h;A++){let y=Math.sqrt(w[A])-Math.sqrt(g[A]);d[A]=Math.round(T-x*y)}return p}};tbr=_r.layout_symbol["text-font"].default.join(","),rbr=(e,t)=>{let r=new ebr(e);return r.buffer=t,r},ibr=class{constructor(e,t,r,i=rbr){this.requestManager=e,this.localIdeographFontFamily=t,this.entries={},this.lang=r,this.fontFaceManager=new Q_r(e),this.createRasterizer=i}setURL(e){this.url=e}setFontFaces(e){this.fontFaceManager.setFontFaces(e),this.entries={}}getGlyphs(e){return Ki(this,null,function*(){let t=[];for(let n in e)for(let a of e[n])t.push(this._getAndCacheGlyphsPromise(n,a));let r=yield Promise.all(t),i={};for(let{stack:n,id:a,glyph:o}of r)i[n]||(i[n]={}),i[n][a]=o&&{id:o.id,bitmap:o.bitmap.clone(),metrics:o.metrics};return i})}_getAndCacheGlyphsPromise(e,t){return Ki(this,null,function*(){var o,s;(s=(o=this.entries)[e])!=null||(o[e]={glyphs:{},requests:{},ranges:{}});let r=this.entries[e],i=r.glyphs[t];if(i!==void 0)return{stack:e,id:t,glyph:i};let n=t.codePointAt(0),a=this.fontFaceManager.hasFontFaces()?yield this.fontFaceManager.getFontFamily(e,n):null;return a?(i=r.glyphs[t]=yield this._drawGlyph(r,e,t,a),{stack:e,id:t,glyph:i}):!this.url||r8(t)||this._charUsesLocalIdeographFontFamily(n)?(i=r.glyphs[t]=yield this._drawGlyph(r,e,t),{stack:e,id:t,glyph:i}):yield this._downloadAndCacheRangePromise(e,t)})}_downloadAndCacheRangePromise(e,t){return Ki(this,null,function*(){var a;let r=t.codePointAt(0),i=this.entries[e],n=Math.floor(r/256);if(i.ranges[n])return{stack:e,id:t,glyph:null};(a=i.requests)[n]||(a[n]=this._loadGlyphRange(e,n));try{let o=yield i.requests[n];for(let s in o)i.glyphs[String.fromCodePoint(+s)]=o[+s];return i.ranges[n]=!0,{stack:e,id:t,glyph:o[r]||null}}catch(o){let s=i.glyphs[t]=yield this._drawGlyph(i,e,t);return this._warnOnMissingGlyphRange(s,n,r,Ic(o)),{stack:e,id:t,glyph:s}}})}_loadGlyphRange(e,t){return Ki(this,null,function*(){let r=t*256,i=r+255,n=yield this.requestManager.transformRequest(this.url.replace("{fontstack}",e).replace("{range}",`${r}-${i}`),"Glyphs"),a=yield Sie(n,new AbortController);if(!(a!=null&&a.data))throw Error(`Could not load glyph range. range: ${t}, ${r}-${i}`);let o={};for(let s of Git(a.data))o[s.id]=s;return o})}_warnOnMissingGlyphRange(e,t,r,i){let n=t*256,a=n+255,o=r.toString(16).padStart(4,"0").toUpperCase();Ma(`Unable to load glyph range ${t}, ${n}-${a}. Rendering codepoint U+${o} locally instead. ${i}`)}_charUsesLocalIdeographFontFamily(e){return!!this.localIdeographFontFamily&&Iit(e)}_drawGlyph(e,t,r,i){return Ki(this,null,function*(){let n=(yield this._getTinySDF(e,t,r,i)).draw(r),a=new RegExp("^\\p{gc=Cf}+$","u").test(r);return{id:r.codePointAt(0),bitmap:new UB({width:n.width||60,height:n.height||60},n.data),metrics:{width:a?0:n.glyphWidth/2||24,height:n.glyphHeight/2||24,left:n.glyphLeft/2+.5||0,top:n.glyphTop/2-27.5||-8,advance:a?0:n.glyphAdvance/2||24,isDoubleResolution:!0}}})}_getTinySDF(e,t,r,i){var l,u,c,f;let n=r8(r);if(i){let h=n?"clusterTinySDFs":"fontFaceTinySDFs";return(l=e[h])!=null||(e[h]={}),(u=e[h])[i]||(u[i]=this._createTinySDF(i,!1,n?3:1)),e[h][i]}let a=t===tbr&&this.localIdeographFontFamily!==""&&this._charUsesLocalIdeographFontFamily(r.codePointAt(0)),o=a?this.localIdeographFontFamily:t;if(n)return(c=e.clusterTinySDFs)!=null||(e.clusterTinySDFs={}),(f=e.clusterTinySDFs)[o]||(f[o]=this._createTinySDF(o,!0,3)),e.clusterTinySDFs[o];let s=a?"ideographTinySDF":"tinySDF";return e[s]||(e[s]=this._createTinySDF(o)),e[s]}_createTinySDF(e,t=!0,r=1){return Ki(this,null,function*(){var s;let i=e?e.split(","):[];i.push("sans-serif");let n=i.map(l=>/[-\w]+/.test(l)?l:`'${CSS.escape(l)}'`).join(","),a=t?this._fontWeight(i[0]):void 0,o=t?this._fontStyle(i[0]):"normal";if(typeof document<"u"&&((s=document.fonts)!=null&&s.load))try{yield document.fonts.load(`${o} ${a||"normal"} 48px ${n}`)}catch(l){Ma(`Failed to load font "${n}": ${Ic(l).message}`)}return this.createRasterizer({fontSize:48,buffer:Math.max(6,Math.ceil(48*(r-1)/4)),radius:16,cutoff:.25,fontFamily:n,fontWeight:a,fontStyle:o,lang:this.lang},6)})}_fontStyle(e){return/italic/i.test(e)?"italic":/oblique/i.test(e)?"oblique":"normal"}_fontWeight(e){let t={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950},r;for(let[i,n]of Object.entries(t))RegExp(`\\b${i}\\b`,"i").test(e)&&(r=`${n}`);return r}destroy(){for(let e in this.entries){let t=this.entries[e];t.tinySDF=null,t.ideographTinySDF=null,t.fontFaceTinySDFs={},t.glyphs={},t.requests={},t.ranges={}}this.entries={},this.fontFaceManager.destroy()}},abr=()=>nbr||(nbr=new uc({anchor:new Fi(_r.light.anchor,"anchor"),position:new Fi(_r.light.position,"position"),color:new Fi(_r.light.color,"color"),intensity:new Fi(_r.light.intensity,"intensity")})),obr=class extends mu{constructor(e,t){super(),this._transitionable=new Jk(abr(),"light",t),this.setLight(e),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}getCartesianPosition(){return Zet(this.properties.get("position"))}setLight(e,t={}){if(!this._validate(ch.light,e,t))for(let r in e){let i=e[r];r.endsWith("-transition")?this._transitionable.setTransition(r.slice(0,-PB.length),i):this._transitionable.setValue(r,i)}}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,t,r){return qT(this,e,{value:t},r)}},lbr=()=>sbr||(sbr=new uc({"sky-color":new Fi(_r.sky["sky-color"],"sky-color"),"horizon-color":new Fi(_r.sky["horizon-color"],"horizon-color"),"fog-color":new Fi(_r.sky["fog-color"],"fog-color"),"fog-ground-blend":new Fi(_r.sky["fog-ground-blend"],"fog-ground-blend"),"horizon-fog-blend":new Fi(_r.sky["horizon-fog-blend"],"horizon-fog-blend"),"sky-horizon-blend":new Fi(_r.sky["sky-horizon-blend"],"sky-horizon-blend"),"atmosphere-blend":new Fi(_r.sky["atmosphere-blend"],"atmosphere-blend")})),ubr=class extends mu{constructor(e,t){super(),this._transitionable=new Jk(lbr(),"sky",t),this.setSky(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new Co(0))}setSky(e,t={}){if(!this._validate(ch.sky,e,t)){e||(e={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(let r in e){let i=e[r];r.endsWith("-transition")?this._transitionable.setTransition(r.slice(0,-PB.length),i):this._transitionable.setValue(r,i)}}}getSky(){return this._transitionable.serialize()}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,t,r={}){return qT(this,e,{value:t},r)}calculateFogBlendOpacity(e){return e<60?0:e<70?(e-60)/10:1}},cbr=class{constructor(e,t){this.width=e,this.height=t,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(e,t){var i;let r=e.join(",")+String(t);return(i=this.dashEntry)[r]||(i[r]=this.addDash(e,t)),this.dashEntry[r]}getDashRanges(e,t,r){let i=e.length%2==1,n=[],a=i?-e[e.length-1]*r:0,o=e[0]*r,s=!0;n.push({left:a,right:o,isDash:s,zeroLength:e[0]===0});let l=e[0];for(let u=1;u<e.length;u++){s=!s;let c=e[u];a=l*r,l+=c,o=l*r,n.push({left:a,right:o,isDash:s,zeroLength:c===0})}return n}addRoundDash(e,t,r){let i=t/2;for(let n=-r;n<=r;n++){let a=this.nextRow+r+n,o=this.width*a,s=0,l=e[s];for(let u=0;u<this.width;u++){u/l.right>1&&(l=e[++s]);let c=Math.abs(u-l.left),f=Math.abs(u-l.right),h=Math.min(c,f),d,p=n/r*(i+1);if(l.isDash){let v=i-Math.abs(p);d=Math.sqrt(h*h+v*v)}else d=i-Math.sqrt(h*h+p*p);this.data[o+u]=Math.max(0,Math.min(255,d+128))}}}addRegularDash(e){for(let o=e.length-1;o>=0;--o){let s=e[o],l=e[o+1];s.zeroLength?e.splice(o,1):(l==null?void 0:l.isDash)===s.isDash&&(l.left=s.left,e.splice(o,1))}let t=e[0],r=e[e.length-1];t.isDash===r.isDash&&(t.left=r.left-this.width,r.right=t.right+this.width);let i=this.width*this.nextRow,n=0,a=e[n];for(let o=0;o<this.width;o++){o/a.right>1&&(a=e[++n]);let s=Math.abs(o-a.left),l=Math.abs(o-a.right),u=Math.min(s,l),c=a.isDash?u:-u;this.data[i+o]=Math.max(0,Math.min(255,c+128))}}addDash(e,t){let r=t?7:0,i=2*r+1;if(this.nextRow+i>this.height)return Ma("LineAtlas out of space"),null;let n=0;for(let o of e)n+=o;if(n!==0){let o=this.width/n,s=this.getDashRanges(e,this.width,o);t?this.addRoundDash(s,o,r):this.addRegularDash(s)}let a={y:this.nextRow+r,height:2*r,width:n};return this.nextRow+=i,this.dirty=!0,a}bind(e){let t=e.gl;this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.ALPHA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,this.width,this.height,0,t.ALPHA,t.UNSIGNED_BYTE,this.data))}};_ae="maplibre_preloaded_worker_pool",kq=class tot{constructor(){this.active={},this.workersPromise=null}acquire(t){return Ki(this,null,function*(){if(this.active[t]=!0,!this.workersPromise){let r=[];for(;r.length<tot.workerCount;)r.push(vbr());this.workersPromise=Promise.all(r)}return(yield this.workersPromise).slice()})}release(t){if(delete this.active[t],this.numActive()===0&&this.workersPromise){let r=this.workersPromise;this.workersPromise=null,r.then(i=>{for(let n of i)n.terminate()})}}isPreloaded(){return!!this.active[_ae]}numActive(){return Object.keys(this.active).length}},gbr=Math.floor(fh.hardwareConcurrency/2);kq.workerCount=Jet(globalThis)?Math.max(Math.min(gbr,3),1):1;rot=class{constructor(e,t){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=t,this.removed=!1,this.actorsPromise=this.initActors(t)}initActors(e){return Ki(this,null,function*(){let t=yield this.workerPool.acquire(e);if(this.removed)return[];if(this.actors=t.map((r,i)=>{let n=new unt(r,e);return n.name=`Worker ${i}`,n}),!this.actors.length)throw Error("No actors found");return this.actors})}broadcast(e,t){return Ki(this,null,function*(){let r=yield this.actorsPromise;return Promise.all(r.map(i=>i.sendAsync({type:e,data:t})))})}getActor(){return Ki(this,null,function*(){let e=yield this.actorsPromise;return this.currentActor=(this.currentActor+1)%e.length,e[this.currentActor]})}waitForInitComplete(){return Ki(this,null,function*(){this.actors.length===0&&(yield this.actorsPromise)})}getReadyActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(e=!0){this.removed=!0;for(let t of this.actors)t.remove();this.actors=[],e&&this.workerPool.release(this.id)}registerMessageHandler(e,t){return Ki(this,null,function*(){let r=yield this.actorsPromise;for(let i of r)i.registerMessageHandler(e,t)})}unregisterMessageHandler(e){return Ki(this,null,function*(){let t=yield this.actorsPromise;for(let r of t)r.unregisterMessageHandler(e)})}};Ev=class zm{constructor(t,r){t&&(r?this.setSouthWest(t).setNorthEast(r):Array.isArray(t)&&(t.length===4?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1])))}setNorthEast(t){return this._ne=t instanceof mn?new mn(t.lng,t.lat):mn.convert(t),this}setSouthWest(t){return this._sw=t instanceof mn?new mn(t.lng,t.lat):mn.convert(t),this}extend(t){let r=this._sw,i=this._ne,n,a;if(t instanceof mn)n=t,a=t;else if(t instanceof zm){if(n=t._sw,a=t._ne,!n||!a)return this}else{if(Array.isArray(t)){if(t.length===4||t.every(Array.isArray)){let o=t;return this.extend(zm.convert(o))}{let o=t;return this.extend(mn.convert(o))}}return t&&("lng"in t||"lon"in t)&&"lat"in t?this.extend(mn.convert(t)):this}return!r&&!i?(this._sw=new mn(n.lng,n.lat),this._ne=new mn(a.lng,a.lat)):(r.lng=Math.min(n.lng,r.lng),r.lat=Math.min(n.lat,r.lat),i.lng=Math.max(a.lng,i.lng),i.lat=Math.max(a.lat,i.lat)),this}getCenter(){return new mn((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 mn(this.getWest(),this.getNorth())}getSouthEast(){return new mn(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(t){let{lng:r,lat:i}=mn.convert(t),n=this._sw.lat<=i&&i<=this._ne.lat,a=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=r&&r>=this._ne.lng),n&&a}intersects(t){if(t=zm.convert(t),!(t.getNorth()>=this.getSouth()&&t.getSouth()<=this.getNorth()))return!1;let r=Math.abs(this.getEast()-this.getWest()),i=Math.abs(t.getEast()-t.getWest());if(r>=360||i>=360)return!0;let n=B0(this.getWest(),-180,180),a=B0(this.getEast(),-180,180),o=B0(t.getWest(),-180,180),s=B0(t.getEast(),-180,180),l=n>a,u=o>s;return l&&u?!0:l?s>=n||o<=a:u?a>=o||n<=s:o<=a&&s>=n}static convert(t){return t instanceof zm||!t?t:new zm(t)}static fromLngLat(t,r=0){let i=360*r/40075017,n=i/Math.cos(Math.PI/180*t.lat);return new zm(new mn(t.lng-n,t.lat-i),new mn(t.lng+n,t.lat+i))}adjustAntiMeridian(){let t=new mn(this._sw.lng,this._sw.lat),r=new mn(this._ne.lng,this._ne.lat);return t.lng>r.lng?new zm(t,new mn(r.lng+360,r.lat)):new zm(t,r)}},oot=class{constructor(e,t,r){this.bounds=Ev.convert(this.validateBounds(e)),this.minzoom=t||0,this.maxzoom=r||24}validateBounds(e){return!Array.isArray(e)||e.length!==4?[-180,-90,180,90]:[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]}contains(e){let t=2**e.z,r={minX:Math.floor(e3(this.bounds.getWest())*t),minY:Math.floor(t3(this.bounds.getNorth())*t),maxX:Math.ceil(e3(this.bounds.getEast())*t),maxY:Math.ceil(t3(this.bounds.getSouth())*t)};return e.x>=r.minX&&e.x<r.maxX&&e.y>=r.minY&&e.y<r.maxY}},sot=class extends mu{constructor(e,t,r,i){if(super(),this.id=e,this.dispatcher=r,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,ln(this,IT(t,["url","scheme","tileSize","promoteId","encoding"])),this._options=ln({type:"vector"},t),this._collectResourceTiming=t.collectResourceTiming,this.tileSize!==512)throw Error("vector tile sources must have a tileSize of 512");this.setEventedParent(i)}load(e=!1){return Ki(this,null,function*(){this._loaded=!1,this.fire(new Is("dataloading")),this._tileJSONRequest=new AbortController;try{let t=yield aot(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,t&&(ln(this,t),t.bounds&&(this.tileBounds=new oot(t.bounds,this.minzoom,this.maxzoom)),this.fire(new Is("data",{sourceDataType:"metadata"})),this.fire(new Is("data",{sourceDataType:"content",sourceDataChanged:e})))}catch(t){this._tileJSONRequest=null,this._loaded=!0,Fm(t)||this.fire(new An(Ic(t)))}})}loaded(){return this._loaded}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}onAdd(e){this.map=e,this.load()}setSourceProperty(e){this._tileJSONRequest&&this._tileJSONRequest.abort(),e(),this.load(!0)}setTiles(e){return this.setSourceProperty(()=>{this.tiles=e,this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest=(this._tileJSONRequest.abort(),null))}serialize(){return ln({},this._options)}loadTile(e){return Ki(this,null,function*(){let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),r={request:yield this.map._requestManager.transformRequest(t,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(e),etag:e.etag};r.request.collectResourceTiming=this._collectResourceTiming,yield this.dispatcher.waitForInitComplete();let i="RT";if(!e.actor||e.state==="expired")e.actor=this.dispatcher.getReadyActor(),i="LT";else if(e.state==="loading")return new Promise((n,a)=>{e.reloadPromise={resolve:n,reject:a}});e.abortController=new AbortController;try{let n=yield e.actor.sendAsync({type:i,data:r},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,n);let a={};return n!=null&&n.etagUnmodified&&(a.unmodified=!0),a}catch(n){if(delete e.abortController,e.aborted||Fm(n))return;if(n&&n.status!==404)throw n;this._afterTileLoadWorkerResponse(e,null)}})}_getOverzoomParameters(e){return Ki(this,null,function*(){if(e.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)return;let t=e.tileID.scaledTo(this.maxzoom).canonical,r=t.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:t,overzoomRequest:yield this.map._requestManager.transformRequest(r,"Tile")}})}_afterTileLoadWorkerResponse(e,t){if(t!=null&&t.resourceTiming&&(e.resourceTiming=t.resourceTiming),t&&this.map._refreshExpiredTiles&&e.setExpiryData(t),e.etag=t==null?void 0:t.etag,e.loadVectorData(t,this.map.painter),e.reloadPromise){let r=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(r.resolve).catch(r.reject)}}abortTile(e){return Ki(this,null,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.type,source:this.id}}))})}unloadTile(e){return Ki(this,null,function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}},Tae=class extends mu{constructor(e,t,r,i){super(),this.id=e,this.dispatcher=r,this.setEventedParent(i),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._premultiplyAlpha=!0,this._options=ln({type:"raster"},t),ln(this,IT(t,["url","scheme","tileSize"]))}load(e=!1){return Ki(this,null,function*(){this._loaded=!1,this.fire(new Is("dataloading")),this._tileJSONRequest=new AbortController;try{let t=yield aot(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,t&&(ln(this,t),t.bounds&&(this.tileBounds=new oot(t.bounds,this.minzoom,this.maxzoom)),this.fire(new Is("data",{sourceDataType:"metadata"})),this.fire(new Is("data",{sourceDataType:"content",sourceDataChanged:e})))}catch(t){this._tileJSONRequest=null,this._loaded=!0,Fm(t)||this.fire(new An(Ic(t)))}})}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest=(this._tileJSONRequest.abort(),null))}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest=(this._tileJSONRequest.abort(),null)),e(),this.load(!0)}setTiles(e){return this.setSourceProperty(()=>{this.tiles=e,this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}serialize(){return ln({},this._options)}setPremultiplyAlpha(e){return this._premultiplyAlpha===e||this.setSourceProperty(()=>{this._premultiplyAlpha=e}),this}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return Ki(this,null,function*(){var n;let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),r=this._premultiplyAlpha,i=r?void 0:{premultiplyAlpha:"none"};e.abortController=new AbortController;try{let a=yield rg.transformAndGetImage(this.map._requestManager,t,"Tile",e.abortController,this.map._refreshExpiredTiles,i);if(delete e.abortController,e.aborted){e.state="unloaded";return}if(a){this.map._refreshExpiredTiles&&(a.cacheControl||a.expires)&&e.setExpiryData({cacheControl:a.cacheControl,expires:a.expires});let o=this.map.painter.context,s=o.gl,l=(n=a.data)!=null?n:new As({width:1,height:1},new Uint8Array(4));e.texture=this.map.painter.getTileTexture(l.width),e.texture?e.texture.update(l,{useMipmap:!0,premultiply:r}):(e.texture=new vu(o,l,s.RGBA,{useMipmap:!0,premultiply:r}),e.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(a){if(delete e.abortController,e.aborted)e.state="unloaded";else if(a)throw e.state="errored",a}})}abortTile(e){return Ki(this,null,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)})}unloadTile(e){return Ki(this,null,function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)})}hasTransition(){return!1}},lot=class extends Tae{constructor(e,t,r,i){super(e,t,r,i),this.type="raster-dem",this.maxzoom=22,this._options=ln({type:"raster-dem"},t),this.encoding=t.encoding||"mapbox",this.redFactor=t.redFactor,this.greenFactor=t.greenFactor,this.blueFactor=t.blueFactor,this.baseShift=t.baseShift}loadTile(e){return Ki(this,null,function*(){let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{let r=yield rg.transformAndGetImage(this.map._requestManager,t,"Tile",e.abortController,this.map._refreshExpiredTiles,{colorSpaceConversion:"none"});if(delete e.abortController,e.aborted){e.state="unloaded";return}if(r){if(this.map._refreshExpiredTiles&&(r.cacheControl||r.expires)&&e.setExpiryData({cacheControl:r.cacheControl,expires:r.expires}),!r.data){e.state="loaded";return}let i=r.data,n=ex(i)&&nB()?i:yield this.readImageNow(i),a={type:this.type,uid:e.uid,source:this.id,rawImageData:n,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(e.actor&&e.state!=="expired"&&e.state!=="reloading")return;yield this.dispatcher.waitForInitComplete(),(!e.actor||e.state==="expired")&&(e.actor=this.dispatcher.getReadyActor()),e.dem=yield e.actor.sendAsync({type:"LDT",data:a}),e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.needsColorReliefPrepare=!0,e.state="loaded"}}catch(r){if(delete e.abortController,e.aborted)e.state="unloaded";else if(r)throw e.state="errored",r}})}readImageNow(e){return Ki(this,null,function*(){if(typeof VideoFrame<"u"&&fie()){let t=e.width+4,r=e.height+4;try{return new As({width:t,height:r},yield ttt(e,-2,-2,t,r))}catch(i){}}return fh.getImageData(e,2)})}_getNeighboringTiles(e){let t=e.canonical,r=2**t.z,i=(t.x-1+r)%r,n=t.x===0?e.wrap-1:e.wrap,a=(t.x+1+r)%r,o=t.x+1===r?e.wrap+1:e.wrap,s={};return s[new Bc(e.overscaledZ,n,t.z,i,t.y).key]={backfilled:!1},s[new Bc(e.overscaledZ,o,t.z,a,t.y).key]={backfilled:!1},t.y>0&&(s[new Bc(e.overscaledZ,n,t.z,i,t.y-1).key]={backfilled:!1},s[new Bc(e.overscaledZ,e.wrap,t.z,t.x,t.y-1).key]={backfilled:!1},s[new Bc(e.overscaledZ,o,t.z,a,t.y-1).key]={backfilled:!1}),t.y+1<r&&(s[new Bc(e.overscaledZ,n,t.z,i,t.y+1).key]={backfilled:!1},s[new Bc(e.overscaledZ,e.wrap,t.z,t.x,t.y+1).key]={backfilled:!1},s[new Bc(e.overscaledZ,o,t.z,a,t.y+1).key]={backfilled:!1}),s}unloadTile(e){return Ki(this,null,function*(){e.demTexture&&this.map.painter.saveTileTexture(e.demTexture),e.fbo&&(e.fbo.destroy(),delete e.fbo),e.dem&&delete e.dem,delete e.neighboringTiles,e.state="unloaded",e.actor&&(yield e.actor.sendAsync({type:"RDT",data:{type:this.type,uid:e.uid,source:this.id}}))})}};cot=class extends mu{constructor(e,t,r,i){super(),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._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:t.data},this.actorPromise=r.getActor(),this.setEventedParent(i),this._data=typeof t.data=="string"?{url:t.data}:{geojson:t.data},this._options=ln({},t),this._collectResourceTiming=t.collectResourceTiming,t.maxzoom!==void 0&&(this.maxzoom=t.maxzoom),t.type&&(this.type=t.type),t.attribution&&(this.attribution=t.attribution),this.promoteId=t.promoteId,t.clusterMaxZoom!==void 0&&this.maxzoom<=t.clusterMaxZoom&&Ma(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${t.clusterMaxZoom}".`),this.workerOptions=ln({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(t.buffer===void 0?128:t.buffer),tolerance:this._pixelsToTileUnits(t.tolerance===void 0?.375:t.tolerance),extent:zr,maxZoom:this.maxzoom,lineMetrics:t.lineMetrics||!1,generateId:t.generateId||!1,promoteId:typeof t.promoteId=="string"?t.promoteId:void 0,cluster:t.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(t.clusterMaxZoom),minPoints:Math.max(2,t.clusterMinPoints||2),extent:zr,radius:this._pixelsToTileUnits(t.clusterRadius||50),log:!1,generateId:t.generateId||!1}},clusterProperties:t.clusterProperties,filter:t.filter},t.workerOptions)}_hasPendingWorkerUpdate(){return this._pendingWorkerUpdate.data!==void 0||this._pendingWorkerUpdate.diff!==void 0||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(e){return e*(zr/this.tileSize)}_tileUnitsToPixels(e){return e/(zr/this.tileSize)}_getClusterMaxZoom(e){let t=e?Math.round(e):this.maxzoom-1;return Number.isInteger(e)||e===void 0||Ma(`Integer expected for option 'clusterMaxZoom': provided value "${e}" rounded to "${t}"`),t}load(){return Ki(this,null,function*(){yield this._updateWorkerData()})}onAdd(e){this.map=e,this.load()}setData(e){return this._data=typeof e=="string"?{url:e}:{geojson:e},this._pendingWorkerUpdate={data:e},this._updateWorkerData()}updateData(e){return this._pendingWorkerUpdate.diff=Cbr(this._pendingWorkerUpdate.diff,e),this._updateWorkerData()}getData(){return Ki(this,null,function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}})}getBounds(){return Ki(this,null,function*(){return Jnt(yield this.getData())})}setClusterOptions(e){return this.workerOptions.geojsonVtOptions.cluster=e.cluster,e.clusterRadius!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(e.clusterRadius)),e.clusterMaxZoom!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(e.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData()}getClusterOptions(){let{cluster:e,clusterOptions:t}=this.workerOptions.geojsonVtOptions;return{cluster:e,clusterMaxZoom:t.maxZoom,clusterRadius:this._tileUnitsToPixels(t.radius)}}getClusterExpansionZoom(e){return Ki(this,null,function*(){return(yield this.actorPromise).sendAsync({type:"GCEZ",data:{type:this.type,clusterId:e,source:this.id}})})}getClusterChildren(e){return Ki(this,null,function*(){return(yield this.actorPromise).sendAsync({type:"GCC",data:{type:this.type,clusterId:e,source:this.id}})})}getClusterLeaves(e,t,r){return Ki(this,null,function*(){return(yield this.actorPromise).sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:e,limit:t,offset:r}})})}_updateWorkerData(){return Ki(this,null,function*(){if(this._isUpdatingWorker)return this._updatePromise;if(!this._hasPendingWorkerUpdate()){Ma(`No pending worker updates for GeoJSONSource ${this.id}.`);return}let{data:e,diff:t,updateCluster:r}=this._pendingWorkerUpdate,i=this._getLoadGeoJSONParameters(e,t,r);e===void 0?t?this._pendingWorkerUpdate.diff=void 0:r&&(this._pendingWorkerUpdate.updateCluster=void 0):this._pendingWorkerUpdate.data=void 0,this._updatePromise=this._dispatchWorkerUpdate(i),yield this._updatePromise})}_getLoadGeoJSONParameters(e,t,r){return Ki(this,null,function*(){let i=ln({type:this.type,source:this.id},this.workerOptions);if(typeof e=="string")return i.request=yield this.map._requestManager.transformRequest(fh.resolveURL(e),"Source"),i.request.collectResourceTiming=this._collectResourceTiming,i;if(e!==void 0)return i.data=e,i;if(t)return i.dataDiff=t,i;if(r)return i.updateCluster=!0,i})}_dispatchWorkerUpdate(e){return Ki(this,null,function*(){this._isUpdatingWorker=!0,this.fire(new Is("dataloading"));try{let t=yield e,r=yield(yield this.actorPromise).sendAsync({type:"LD",data:t});if(this._isUpdatingWorker=!1,this._removed||r.abandoned){this.fire(new Is("dataabort"));return}r.data&&(this._data={geojson:r.data});let i=this._applyDiffToSource(t.dataDiff),n=this._getShouldReloadTileOptions(i),a={};this._applyResourceTiming(a,r),this.fire(new Is("data",ma(fn({},a),{sourceDataType:"metadata"}))),this.fire(new Is("data",ma(fn({},a),{sourceDataType:"content",shouldReloadTileOptions:n})))}catch(t){if(this._isUpdatingWorker=!1,this._removed){this.fire(new Is("dataabort"));return}this.fire(new An(Ic(t)))}finally{this._hasPendingWorkerUpdate()&&(yield this._updateWorkerData())}})}_applyResourceTiming(e,t){var n;if(!this._collectResourceTiming)return;let r=(n=t.resourceTiming)==null?void 0:n[this.id];if(!r)return;let i=r.slice(0);i!=null&&i.length&&ln(e,{resourceTiming:i})}_applyDiffToSource(e){if(!e)return;let t=typeof this.promoteId=="string"?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let i=Ebr(this._data.geojson,t);if(!i)throw Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:i}}if(!this._data.updateable)return;let r=kbr(this._data.updateable,e,t);if(!(e.removeAll||this._options.cluster))return r}_getShouldReloadTileOptions(e){if(e)return{affectedBounds:e.filter(Boolean).map(t=>Jnt(t))}}shouldReloadTile(e,{affectedBounds:t}){if(e.state==="loading")return!0;if(e.state==="unloaded")return!1;let{buffer:r,extent:i}=this.workerOptions.geojsonVtOptions,n=Ibr(e.tileID.canonical,r/i);for(let a of t)if(n.intersects(a))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(e){return Ki(this,null,function*(){let t=e.actor?"RT":"LT";e.actor=yield this.actorPromise;let r={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};e.abortController=new AbortController;try{let i=yield(yield this.actorPromise).sendAsync({type:t,data:r},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(i,this.map.painter,t==="RT")}catch(i){if(delete e.abortController,e.aborted||Fm(i))return;throw i}})}abortTile(e){return Ki(this,null,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0})}unloadTile(e){return Ki(this,null,function*(){e.unloadVectorData(),yield(yield this.actorPromise).sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actorPromise.then(e=>e.sendAsync({type:"RS",data:{type:this.type,source:this.id}}))}serialize(){return ln({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}},$T=[0,0,1],Rbr=(e,t)=>({u_tl_parent:new pa(e,t.u_tl_parent),u_scale_parent:new qi(e,t.u_scale_parent),u_buffer_scale:new qi(e,t.u_buffer_scale),u_image_warp:new Rf(e,t.u_image_warp),u_fade_t:new qi(e,t.u_fade_t),u_opacity:new qi(e,t.u_opacity),u_image0:new wn(e,t.u_image0),u_image1:new wn(e,t.u_image1),u_brightness_low:new qi(e,t.u_brightness_low),u_brightness_high:new qi(e,t.u_brightness_high),u_saturation_factor:new qi(e,t.u_saturation_factor),u_contrast_factor:new qi(e,t.u_contrast_factor),u_spin_weights:new Rf(e,t.u_spin_weights),u_coords_top:new OT(e,t.u_coords_top),u_coords_bottom:new OT(e,t.u_coords_bottom)}),zbr=(e,t,r,i,n,a)=>({u_tl_parent:e,u_scale_parent:t,u_buffer_scale:1,u_image_warp:a,u_fade_t:r.mix,u_opacity:r.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:Obr(i.paint.get("raster-saturation")),u_contrast_factor:qbr(i.paint.get("raster-contrast")),u_spin_weights:Bbr(i.paint.get("raster-hue-rotate")),u_coords_top:[n[0].x,n[0].y,n[1].x,n[1].y],u_coords_bottom:[n[3].x,n[3].y,n[2].x,n[2].y]});M8=class{constructor(e,t,r){this.vertexBuffer=e,this.indexBuffer=t,this.segments=r}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}},l3=ol([{name:"a_pos",type:"Int16",components:2}]),rq=zr/128;XT=class extends mu{constructor(e,t,r,i){super(),this.imageWarp=$T,this.flippedWindingOrder=!1,this._warp="auto",this._imageDirty=!1,this._subdividedQuad=!1,this._subdividedMesh=null,this.id=e,this.dispatcher=r,this.coordinates=t.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=t}load(e){return Ki(this,null,function*(){if(this.options.url===void 0){this._loaded=!0,this._finishLoading();return}this._loaded=!1,this.fire(new Is("dataloading")),this.url=this.options.url,this._abortController=new AbortController;try{let t=yield rg.transformAndGetImage(this.map._requestManager,this.url,"Image",this._abortController);this._abortController=null,this._loaded=!0,t!=null&&t.data?(this._setImage(t.data),e&&(this.coordinates=e),this._finishLoading()):this.fire(new An(Error(`Could not load image ${this.url}: the response is empty`)))}catch(t){if(Fm(t))return;this._abortController=null,this._loaded=!0,this.fire(new An(Ic(t)))}})}loaded(){return this._loaded}updateImage(e){return this._abortController&&(this._abortController=(this._abortController.abort(),null)),"image"in e?(this._loaded=!0,this._setImage(e.image),e.coordinates&&(this.coordinates=e.coordinates),this._finishLoading(),this):e.url?(this.options.url=e.url,this.load(e.coordinates),this):this}_setImage(e){this.image=e,this._imageDirty=!0}getMesh(e,t){var r;return!this._subdividedQuad||t?null:((r=this._subdividedMesh)!=null||(this._subdividedMesh=fot(e,{granularity:16})),this._subdividedMesh)}_disposeTexture(){var e;(e=this.texture)==null||e.destroy(),this.texture=null}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new Is("data",{sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){var e;this._abortController&&(this._abortController=(this._abortController.abort(),null)),this._disposeTexture(),(e=this._subdividedMesh)==null||e.destroy(),this._subdividedMesh=null,this.image=null,this.tiles={}}setWarp(e){return this._warp===e?this:(this._warp=e,this.tileCoords&&this.setCoordinates(this.coordinates),this)}getWarp(){return this._warp}setCoordinates(e){this.coordinates=e;let t=e.map(wo.fromLngLat);return this.tileID=Nbr(t),this.terrainTileRanges=this._getOverlappingTileRanges(t),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=t.map(r=>this.tileID.getTilePoint(r)._round()),this.imageWarp=Vbr(this.tileCoords,this._warp),this._subdividedQuad=this.imageWarp[2]>0&&!dot(this.tileCoords),this.flippedWindingOrder=Ubr(this.tileCoords),this.fire(new Is("data",{sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let e=this.map.painter.context,t=e.gl;this.texture?this._imageDirty&&(this.texture.update(this.image),this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE)):(this.texture=new vu(e,this.image,t.RGBA),this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE)),this._imageDirty=!1;let r=!1;for(let i in this.tiles){let n=this.tiles[i];n.state!=="loaded"&&(n.state="loaded",n.texture=this.texture,r=!0)}r&&this.fire(new Is("data",{sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return Ki(this,null,function*(){var t;(t=this.tileID)!=null&&t.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"})}serialize(){let e={type:"image",coordinates:this.coordinates};return this.options.url!==void 0&&(e.url=this.options.url),e}hasTransition(){return!1}_getOverlappingTileRanges(e){let{minX:t,minY:r,maxX:i,maxY:n}=Jd.fromPoints(e),a={};for(let o=0;o<=25;o++){let s=2**o,l=Math.floor(t*s),u=Math.floor(r*s),c=Math.floor(i*s),f=Math.floor(n*s),h=(l%s+s)%s,d=c%s,p=Math.floor(l/s),v=Math.floor(c/s);a[o]={minWrap:p,maxWrap:v,minTileXWrapped:h,maxTileXWrapped:d,minTileY:u,maxTileY:f}}return a}};pot=class extends XT{constructor(e,t,r,i){super(e,t,r,i),this._onPlayingHandler=()=>{var n;(n=this.map)==null||n.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=t}load(){return Ki(this,null,function*(){this._loaded=!1;let e=this.options;this.urls=[];for(let t of e.urls)this.urls.push((yield this.map._requestManager.transformRequest(t,"Source")).url);try{let t=yield ctt(this.urls);if(this._loaded=!0,!t)return;this.video=t,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(t){this.fire(new An(Ic(t)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){let t=this.video.seekable;e<t.start(0)||e>t.end(0)?this.fire(new An(new Qr(`sources.${this.id}`,null,`Playback for this video can be set only between the ${t.start(0)} and ${t.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let e=this.map.painter.context,t=e.gl;this.texture?this.video.paused||(this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE),t.texSubImage2D(t.TEXTURE_2D,0,0,0,t.RGBA,t.UNSIGNED_BYTE,this.video)):(this.texture=new vu(e,this.video,t.RGBA),this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE));let r=!1;for(let i in this.tiles){let n=this.tiles[i];n.state!=="loaded"&&(n.state="loaded",n.texture=this.texture,r=!0)}r&&this.fire(new Is("data",{sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}},vot=class extends XT{constructor(e,t,r,i){super(e,t,r,i),t.coordinates?(!Array.isArray(t.coordinates)||t.coordinates.length!==4||t.coordinates.some(n=>!Array.isArray(n)||n.length!==2||n.some(a=>typeof a!="number")))&&this.fire(new An(new Qr(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new An(new Qr(`sources.${e}`,null,'missing required property "coordinates"'))),t.animate&&typeof t.animate!="boolean"&&this.fire(new An(new Qr(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),t.canvas?typeof t.canvas!="string"&&!(t.canvas instanceof HTMLCanvasElement)&&this.fire(new An(new Qr(`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 An(new Qr(`sources.${e}`,null,'missing required property "canvas"'))),this.options=t,this.animate=t.animate===void 0||t.animate}load(){return Ki(this,null,function*(){if(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 An(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._playing=(this.prepare(),!1))},this._finishLoading()})}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this._playing=!1,super.onRemove()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let t=this.map.painter.context,r=t.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new vu(t,this.canvas,r.RGBA,{premultiply:!0}),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let i=!1;for(let n in this.tiles){let a=this.tiles[n];a.state!=="loaded"&&(a.state="loaded",a.texture=this.texture,i=!0)}i&&this.fire(new Is("data",{sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}},got={},Hbr=(e,t,r,i)=>{let n=new(mot(t.type))(e,t,r,i);if(n.id!==e)throw Error(`Expected Source id to be ${e} instead of ${n.id}`);return n},mot=e=>{switch(e){case"geojson":return cot;case"image":return XT;case"raster":return Tae;case"raster-dem":return lot;case"vector":return sot;case"video":return pot;case"canvas":return vot}return got[e]},jbr=(e,t)=>{got[e]=t},$br=(e,t)=>Ki(null,null,function*(){if(mot(e))throw Error(`A source type called "${e}" already exists.`);jbr(e,t)});iae="RTLPluginLoaded",Ybr=class extends mu{constructor(...e){super(...e),this.status="unavailable",this.url=null,this.dispatcher=wae()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch(t=>{throw this.status="error",t})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e,t=!1){return Ki(this,null,function*(){if(this.url)throw Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=fh.resolveURL(e),!this.url)throw Error(`requested url ${e} is invalid`);if(this.status==="unavailable")if(t)this.status="deferred",this._syncState(this.status);else return this._requestImport();else if(this.status==="requested")return this._requestImport()})}_requestImport(){return Ki(this,null,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e0(iae))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}},Qnt=null;yot=class{constructor(e,t){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=e,this.uid=_ie(),this.uses=0,this.tileSize=t,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rttObjects=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading",this.featureStateRevision=-1}isRenderable(e){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(e||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:e,fadingDirection:t,fadingParentID:r,fadeEndTime:i}){this.resetFadeLogic(),this.fadingRole=e,this.fadingDirection=t,this.fadingParentID=r,this.fadeEndTime=i}setSelfFadeLogic(e){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=e}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=Oo(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(e){this.demTexture&&e.saveTileTexture(this.demTexture),this.demTexture=null}getRTT(e){return this.rttObjects[e]}acquireRTT(e,t,r){return this.rttObjects[t]=e.acquireRTT(r)}releaseRTT(e){if(this.rttObjects.length!==0){for(let t of this.rttObjects)t&&e.releaseRTT(t);this.rttObjects.length=0}}loadVectorData(e,t,r){if((e==null?void 0:e.etagUnmodified)===!0){this.state="loaded";return}if(this.hasData()&&this.unloadVectorData(),this.state="loaded",!e){this.collisionBoxArray=new Xie;return}e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestEncoding=e.encoding,this.latestFeatureIndex.rawTileData=e.rawTileData,this.latestFeatureIndex.encoding=e.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=Wbr(e.buckets,t==null?void 0:t.style),this.hasSymbolBuckets=!1;for(let i in this.buckets){let n=this.buckets[i];if(n instanceof s8)if(this.hasSymbolBuckets=!0,r)n.justReloaded=!0;else break}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let i in this.buckets){let n=this.buckets[i];if(n instanceof s8&&n.hasRTLText){this.hasRTLText=!0,A8().lazyLoad();break}}this.queryPadding=0;for(let i in this.buckets){let n=this.buckets[i];this.queryPadding=Math.max(this.queryPadding,t.style.getLayer(i).queryRadius(n))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage),this.dashPositions=e.dashPositions}unloadVectorData(){for(let e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(let r in this.buckets){let i=this.buckets[r];i.uploadPending()&&i.upload(e)}let t=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new vu(e,this.imageAtlas.image,t.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasImage=(this.glyphAtlasTexture=new vu(e,this.glyphAtlasImage,t.ALPHA),null))}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,t,r,i,n,a,o,s,l,u,c){var f;return(f=this.latestFeatureIndex)!=null&&f.rawTileData?this.latestFeatureIndex.query({queryGeometry:i,cameraQueryGeometry:n,scale:a,tileSize:this.tileSize,pixelPosMatrix:u,transform:s,params:o,queryPadding:this.queryPadding*l,getElevation:c},e,t,r):{}}querySourceFeatures(e,t){let r=this.latestFeatureIndex;if(!(r!=null&&r.rawTileData))return;let i=r.loadVTLayers(),n=t!=null&&t.sourceLayer?t.sourceLayer:"",a=i._geojsonTileLayer||i[n];if(!a)return;let o=CT(t==null?void 0:t.filter,`querySourceFeatures[${n}].filter`,t==null?void 0:t.globalState),{z:s,x:l,y:u}=this.tileID.canonical,c={z:s,x:l,y:u};for(let f=0;f<a.length;f++){let h=a.feature(f);if(o.needGeometry){let v=tx(h,!0);if(!o.filter(new Co(this.tileID.overscaledZ),v,this.tileID.canonical))continue}else if(!o.filter(new Co(this.tileID.overscaledZ),h))continue;let d=r.getId(h,n),p=new yne(h,s,l,u,d);p.tile=c,e.push(p)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(e){let t=this.expirationTime;if(e.cacheControl){let r=Ket(e.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+r["max-age"]*1e3)}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){let r=Date.now(),i=!1;if(this.expirationTime>r)i=!1;else if(!t)i=!0;else if(this.expirationTime<t)i=!0;else{let n=this.expirationTime-t;n?this.expirationTime=r+Math.max(n,3e4):i=!0}i?(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(),2**31-1)}setFeatureState(e,t,r){var n,a,o;if(!((n=this.latestFeatureIndex)!=null&&n.rawTileData)||Object.keys(e).length===0||this.featureStateRevision===r)return;this.featureStateRevision=r;let i=this.latestFeatureIndex.loadVTLayers();for(let s in this.buckets){if(!t.style.hasLayer(s))continue;let l=this.buckets[s],u=l.layers[0].sourceLayer||"_geojsonTileLayer",c=i[u],f=e[u];if(!c||!f||f.length===0)continue;l.update(f,c,((a=this.imageAtlas)==null?void 0:a.patternPositions)||{},this.dashPositions||{});let h=(o=t==null?void 0:t.style)==null?void 0:o.getLayer(s);h&&(this.queryPadding=Math.max(this.queryPadding,h.queryRadius(l)))}}holdingForSymbolFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<Oo()}clearSymbolFadeHold(){this.symbolFadeHoldUntil=void 0}setSymbolHoldDuration(e){this.symbolFadeHoldUntil=Oo()+e}setDependencies(e,t){let r={};for(let i of t)r[i]=!0;this.dependencies[e]=r}hasDependency(e,t){for(let r of e){let i=this.dependencies[r];if(i){for(let n of t)if(i[n])return!0}}return!1}};Xbr=class{constructor(){this.state={},this.stateChanges={},this.deletedStates={},this.revision=0}updateState(e,t,r){var n,a,o,s,l;let i=String(t);if((n=this.stateChanges)[e]||(n[e]={}),(a=this.stateChanges[e])[i]||(a[i]={}),ln(this.stateChanges[e][i],r),this.deletedStates[e]===null){this.deletedStates[e]={};for(let u in this.state[e])if(u===i){this.deletedStates[e][i]={};for(let c in this.state[e][u])r[c]===void 0&&(this.deletedStates[e][i][c]=null)}else this.deletedStates[e][u]=null}else if(((o=this.deletedStates[e])==null?void 0:o[i])===null){this.deletedStates[e][i]={};for(let u in this.state[e][i])r[u]===void 0&&(this.deletedStates[e][i][u]=null)}else for(let u in r)((l=(s=this.deletedStates[e])==null?void 0:s[i])==null?void 0:l[u])===null&&delete this.deletedStates[e][i][u]}removeFeatureState(e,t,r){var n,a,o;if(this.deletedStates[e]===null)return;let i=String(t);if((n=this.deletedStates)[e]||(n[e]={}),r&&t!==void 0)this.deletedStates[e][i]!==null&&((a=this.deletedStates[e])[i]||(a[i]={}),this.deletedStates[e][i][r]=null);else if(t!==void 0)if((o=this.stateChanges[e])!=null&&o[i])for(r in this.deletedStates[e][i]={},this.stateChanges[e][i])this.deletedStates[e][i][r]=null;else this.deletedStates[e][i]=null;else this.deletedStates[e]=null}getState(e,t){let r=String(t),i=this.state[e]||{},n=this.stateChanges[e]||{},a=ln({},i[r],n[r]);if(this.deletedStates[e]===null)return{};if(this.deletedStates[e]){let o=this.deletedStates[e][t];if(o===null)return{};for(let s in o)delete a[s]}return a}initializeTileState(e,t){let r={};for(let i in this.state)r[i]=eat(this.state[i]);e.setFeatureState(r,t,this.revision)}coalesceChanges(e,t){var n,a,o;let r={};for(let s in this.stateChanges){(n=this.state)[s]||(n[s]={}),r[s]||(r[s]={});for(let l in this.stateChanges[s])(a=this.state[s])[l]||(a[l]={}),ln(this.state[s][l],this.stateChanges[s][l]),r[s][l]=this.state[s][l]}for(let s in this.deletedStates)if((o=this.state)[s]||(o[s]={}),r[s]||(r[s]={}),this.deletedStates[s]===null)for(let l in this.state[s])this.state[s][l]={},r[s][l]={};else for(let l in this.deletedStates[s]){if(this.deletedStates[s][l]===null)this.state[s][l]={};else for(let u of Object.keys(this.deletedStates[s][l]))delete this.state[s][l][u];r[s][l]=this.state[s][l]}if(this.stateChanges={},this.deletedStates={},Object.keys(r).length===0)return;this.revision++;let i={};for(let s in r)i[s]=eat(r[s]);e.setFeatureState(i,t,this.revision)}},Aae=class xot{constructor(t,r){this.min=t,this.max=r,this.center=Ps([],R0([],this.min,this.max),.5)}quadrant(t){let r=[t%2==0,t<2],i=sB(this.min),n=sB(this.max);for(let a=0;a<r.length;a++)i[a]=r[a]?this.min[a]:this.center[a],n[a]=r[a]?this.center[a]:this.max[a];return n[2]=this.max[2],new xot(i,n)}distanceX(t){return Math.max(Math.min(this.max[0],t[0]),this.min[0])-t[0]}distanceY(t){return Math.max(Math.min(this.max[1],t[1]),this.min[1])-t[1]}intersectsFrustum(t){let r=!0;for(let i of t.planes){let n=this.intersectsPlane(i);if(n===0)return 0;n===1&&(r=!1)}return r?2:t.aabb.min[0]>this.max[0]||t.aabb.min[1]>this.max[1]||t.aabb.min[2]>this.max[2]||t.aabb.max[0]<this.min[0]||t.aabb.max[1]<this.min[1]||t.aabb.max[2]<this.min[2]?0:1}intersectsPlane(t){let r=t[3],i=t[3];for(let n=0;n<3;n++)t[n]>0?(r+=t[n]*this.min[n],i+=t[n]*this.max[n]):(i+=t[n]*this.min[n],r+=t[n]*this.max[n]);return r>=0?2:i<0?0:1}},Mae=class _ot{constructor(t,r,i){this.points=t,this.planes=r,this.aabb=i}static fromInvProjectionMatrix(t,r=1,i=0,n,a){let o=[[-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]],s=a?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],l=2**i,u=o.map(d=>Zbr(d,t,r,l));n&&Kbr(u,s[0],n,a);let c=s.map(d=>{let p=J1([],u[d[0]],u[d[1]]),v=J1([],u[d[2]],u[d[1]]),m=Pf([],uh([],p,v)),g=-gu(m,u[d[1]]);return m.concat(g)}),f=[1/0,1/0,1/0],h=[-1/0,-1/0,-1/0];for(let d of u)for(let p=0;p<3;p++)f[p]=Math.min(f[p],d[p]),h[p]=Math.max(h[p],d[p]);return new _ot(u,c,new Aae(f,h))}};t3r=nae(9.314,3);aat=class{constructor(){this._tiles={}}handleWrapJump(e){let t={};for(let r in this._tiles){let i=this._tiles[r];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+e),t[i.tileID.key]=i}this._tiles=t}setFeatureState(e,t,r){for(let i in this._tiles)this._tiles[i].setFeatureState(e,t,r)}getAllTiles(){return Object.values(this._tiles)}getAllIds(e=!1){return e?Object.values(this._tiles).map(t=>t.tileID).sort(mne).map(t=>t.key):Object.keys(this._tiles)}getTileById(e){return this._tiles[e]}setTile(e,t){this._tiles[e]=t}deleteTileById(e){delete this._tiles[e]}getLoadedTile(e){let t=this.getTileById(e.key);return t!=null&&t.hasData()?t:null}isIdRenderable(e,t=!1){var r;return(r=this.getTileById(e))==null?void 0:r.isRenderable(t)}getRenderableIds(e=0,t){let r=[];for(let i of this.getAllIds())this.isIdRenderable(i,t)&&r.push(this.getTileById(i));return t?r.sort((i,n)=>{let a=i.tileID,o=n.tileID,s=new tr(a.canonical.x,a.canonical.y)._rotate(-e),l=new tr(o.canonical.x,o.canonical.y)._rotate(-e);return a.overscaledZ-o.overscaledZ||l.y-s.y||l.x-s.x}).map(i=>i.tileID.key):r.map(i=>i.tileID).sort(mne).map(i=>i.key)}},aae=(qm=class extends mu{constructor(t,r,i){super(),this._maxContentElevationSeen=0,this.id=t,this.dispatcher=i,this.on("data",n=>{this._dataHandler(n)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=Hbr(t,r,i,this),this._inViewTiles=new aat,this._outOfViewCache=new Unt(0,n=>this._unloadTile(n)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new Xbr,this._didEmitContent=!1,this._updated=!1}onAdd(t){var r;this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._maxTileCacheZoomLevels=t?t._maxTileCacheZoomLevels:null,(r=this._source)!=null&&r.onAdd&&this._source.onAdd(t)}onRemove(t){var r;for(let i of this._inViewTiles.getAllTiles())i.unloadVectorData();this.clearTiles(),(r=this._source)!=null&&r.onRemove&&this._source.onRemove(t),this._inViewTiles=new aat}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 t of this._inViewTiles.getAllTiles())if(t.state!=="loaded"&&t.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(t,r,i,n){return Ki(this,null,function*(){try{let a=yield this._source.loadTile(t);this._tileLoaded(t,r,i,n,a)}catch(a){t.state="errored",a.status===404?this.update(this.transform,this.terrain):this._source.fire(new An(Ic(a),{tile:t}))}})}_unloadTile(t){this._source.unloadTile&&this._source.unloadTile(t)}_abortTile(t){this._source.abortTile&&this._source.abortTile(t),this._source.fire(new Is("dataabort",{tile:t,coord:t.tileID}))}serialize(){return this._source.serialize()}prepare(t){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let r of this._inViewTiles.getAllTiles())r.upload(t),r.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(t){var r;return this._inViewTiles.getRenderableIds((r=this.transform)==null?void 0:r.bearingInRadians,t)}hasRenderableParent(t){let r=t.overscaledZ-1;if(r>=this._source.minzoom){let i=this.getLoadedTile(t.scaledTo(r));if(i)return this._inViewTiles.isIdRenderable(i.tileID.key)}return!1}reload(t,r=void 0){if(this._paused){this._shouldReloadOnResume=!0;return}this._outOfViewCache.reset();for(let i of this._inViewTiles.getAllIds()){let n=this._inViewTiles.getTileById(i);(!r||this._source.shouldReloadTile(n,r))&&(t?this._reloadTile(i,n.state==="errored"?"loading":"expired"):n.state!=="errored"&&this._reloadTile(i,"reloading"))}}_reloadTile(t,r){return Ki(this,null,function*(){let i=this._inViewTiles.getTileById(t);if(!i)return;let n=i.hasData();i.state!=="loading"&&(i.state=r),yield this._loadTile(i,t,r,n)})}_tileLoaded(t,r,i,n,a){n||(t.timeAdded=Oo(),t.selfFading&&(t.fadeEndTime=t.timeAdded+this._rasterFadeDuration)),i==="expired"&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(r,t),!(a!=null&&a.unmodified)&&(this.getSource().type==="raster-dem"&&t.dem&&u3r(t,this._inViewTiles),t.featureStateRevision=-1,this._state.initializeTileState(t,this.map?this.map.painter:null),t.aborted||this._source.fire(new Is("data",{tile:t,coord:t.tileID})))}getTile(t){return this.getTileByID(t.key)}getTileByID(t){return this._inViewTiles.getTileById(t)}_retainLoadedChildren(t,r){let i=this._getLoadedDescendents(r),n=new Set;for(let a of r){let o=i[a.key];if(!(o!=null&&o.length)){n.add(a);continue}let s=a.overscaledZ+qm.maxOverzooming,l=o.filter(f=>f.tileID.overscaledZ<=s);if(!l.length){n.add(a);continue}let u=Math.min(...l.map(f=>f.tileID.overscaledZ)),c=l.filter(f=>f.tileID.overscaledZ===u).map(f=>f.tileID);for(let f of c)t[f.key]=f;this._areDescendentsComplete(c,u,a.overscaledZ)||n.add(a)}return n}_getLoadedDescendents(t){var i;let r={};for(let n of this._inViewTiles.getAllTiles().filter(a=>a.hasData()))for(let a of t)n.tileID.isChildOf(a)&&(r[i=a.key]||(r[i]=[]),r[a.key].push(n));return r}_areDescendentsComplete(t,r,i){return t.length===1&&t[0].isOverscaled()?t[0].overscaledZ===r:4**(r-i)===t.length}getLoadedTile(t){return this._inViewTiles.getLoadedTile(t)}updateCacheSize(t){let r=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),i=this._maxTileCacheZoomLevels===null?Qh.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels,n=Math.floor(r*i),a=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,n):n;this._outOfViewCache.setMaxSize(a)}handleWrapJump(t){let r=(t-(this._prevLng===void 0?t:this._prevLng))/360,i=Math.round(r);this._prevLng=t,i&&(this._inViewTiles.handleWrapJump(i),this._resetTileReloadTimers())}_updateMaxContentElevation(){var n,a;let t=this._maxContentElevationSeen,r=(a=(n=this.map)==null?void 0:n.style)==null?void 0:a._layers;if(!r)return t;let i=this._inViewTiles.getAllTiles();for(let o in r){let s=r[o];if(s.type!=="symbol"||s.source!==this.id||s.isHidden(this.transform.zoom))continue;let l=s;if(l.layout){t=Math.max(t,l.layout.get("symbol-height-offset").constantOr(0));for(let u of i){let c=u.getBucket(s);c&&c.maxHeightOffset>t&&(t=c.maxHeightOffset)}}}return this._maxContentElevationSeen=t,t}update(t,r){if(!this._sourceLoaded||this._paused)return;this.transform=t,this.terrain=r,this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng);let i;!this.used&&!this.usedForTerrain?i=[]:this._source.tileID?i=t.getVisibleUnwrappedCoordinates(this._source.tileID).map(l=>new Bc(l.canonical.z,l.wrap,l.canonical.z,l.canonical.x,l.canonical.y)):(i=ZT(t,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?Math.max(this._source.maxzoom,t.maxZoom-this.map._zoomLevelsToOverscale):this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:r,calculateTileZoom:this._source.calculateTileZoom,maxContentElevation:this._updateMaxContentElevation()}),this._source.hasTile&&(i=i.filter(l=>this._source.hasTile(l)))),this.usedForTerrain&&(i=this._addTerrainIdealTiles(i));let n=i.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,n&&this.fire(new Is("data",{sourceDataType:"idle",sourceId:this.id}));let a=Sae(t,this._source),o=this._updateRetainedTiles(i,a),s=rat(this._source.type);s&&this._rasterFadeDuration>0&&!r&&n3r(this._inViewTiles,i,o,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),s?this._cleanUpRasterTiles(o):this._cleanUpVectorTiles(o)}_cleanUpRasterTiles(t){for(let r of this._inViewTiles.getAllIds())t[r]||this._removeTile(r)}_cleanUpVectorTiles(t){for(let r of this._inViewTiles.getAllIds()){let i=this._inViewTiles.getTileById(r);if(t[r]){i.clearSymbolFadeHold();continue}if(!i.hasSymbolBuckets){this._removeTile(r);continue}i.holdingForSymbolFade()?i.symbolFadeFinished()&&this._removeTile(r):i.setSymbolHoldDuration(this.map._fadeDuration)}}_addTerrainIdealTiles(t){let r=[];for(let i of t)if(i.canonical.z>this._source.minzoom){let n=i.scaledTo(i.canonical.z-1);r.push(n);let a=i.scaledTo(Math.max(this._source.minzoom,Math.min(i.canonical.z,5)));r.push(a)}return t.concat(r)}releaseSymbolFadeTiles(){for(let t of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(t).holdingForSymbolFade()&&this._removeTile(t)}_updateRetainedTiles(t,r){var l;let i=new Set;for(let u of t)this._addTile(u).hasData()||i.add(u);let n=t.reduce((u,c)=>(u[c.key]=c,u),{}),a=this._retainLoadedChildren(n,i),o={},s=Math.max(r-qm.maxUnderzooming,this._source.minzoom);for(let u of a){let c=this._inViewTiles.getTileById(u.key),f=c==null?void 0:c.wasRequested();for(let h=u.overscaledZ-1;h>=s;--h){let d=u.scaledTo(h);if(o[d.key])break;if(o[d.key]=!0,c=this.getTile(d),!c&&f&&(c=this._addTile(d)),c){let p=c.hasData();if((p||!((l=this.map)!=null&&l.cancelPendingTileRequestsWhileZooming)||f)&&(n[d.key]=d),f=c.wasRequested(),p)break}}}return n}_addTile(t){let r=this._inViewTiles.getTileById(t.key);if(r)return r;r=this._outOfViewCache.getAndRemove(t),r&&(r.resetFadeLogic(),this._setTileReloadTimer(t.key,r),r.tileID=t,this._state.initializeTileState(r,this.map?this.map.painter:null));let i=r;return r||(r=new yot(t,this._source.tileSize*t.overscaleFactor()),this._loadTile(r,t.key,r.state,!1)),r.uses++,this._inViewTiles.setTile(t.key,r),i||this._source.fire(new Is("dataloading",{tile:r,coord:r.tileID})),r}_setTileReloadTimer(t,r){this._clearTileReloadTimer(t);let i=r.getExpiryTimeout();if(i){let n=()=>{this._reloadTile(t,"expired"),delete this._timers[t]};this._timers[t]=setTimeout(n,i)}}_clearTileReloadTimer(t){let r=this._timers[t];r&&(clearTimeout(r),delete this._timers[t])}_resetTileReloadTimers(){for(let t in this._timers)clearTimeout(this._timers[t]),delete this._timers[t];for(let t of this._inViewTiles.getAllIds()){let r=this._inViewTiles.getTileById(t);this._setTileReloadTimer(t,r)}}refreshTiles(t){for(let r of this._inViewTiles.getAllIds()){let i=this._inViewTiles.getTileById(r);(this._inViewTiles.isIdRenderable(r)||i.state=="errored")&&t.some(n=>n.equals(i.tileID.canonical))&&this._reloadTile(r,"expired")}}_removeTile(t){let r=this._inViewTiles.getTileById(t);r&&(r.uses--,this._inViewTiles.deleteTileById(t),this._clearTileReloadTimer(t),!(r.uses>0)&&(r.hasData()&&r.state!=="reloading"?this._outOfViewCache.add(r.tileID,r,r.getExpiryTimeout()):(r.aborted=!0,this._abortTile(r),this._unloadTile(r))))}_dataHandler(t){if(t.dataType==="source"){if(t.sourceDataType==="metadata"){this._sourceLoaded=!0;return}t.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(t.sourceDataChanged,t.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}}resetMaxContentElevation(){this._maxContentElevationSeen=0}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1,this.resetMaxContentElevation();for(let t of this._inViewTiles.getAllIds())this._removeTile(t);this._outOfViewCache.reset()}tilesIn(t,r,i){let n=[],a=this.transform;if(!a)return n;let o=a.getCoveringTilesDetailsProvider().allowWorldCopies(),s=i?a.getCameraQueryGeometry(t):t,l=d=>a.screenPointToMercatorCoordinate(d,this.terrain),u=this.transformBbox(t,l,!o),c=this.transformBbox(s,l,!o),f=this.getIds(),h=Jd.fromPoints(c);for(let d of f){let p=this._inViewTiles.getTileById(d);if(p.holdingForSymbolFade())continue;let v=o?[p.tileID]:[p.tileID.unwrapTo(-1),p.tileID.unwrapTo(0)],m=2**(a.zoom-p.tileID.overscaledZ),g=r*p.queryPadding*zr/p.tileSize/m;for(let w of v){let b=h.map(_=>w.getTilePoint(new wo(_.x,_.y)));if(b.expandBy(g),b.intersects(wit)){let _=u.map(x=>w.getTilePoint(x)),M=c.map(x=>w.getTilePoint(x));n.push({tile:p,tileID:o?w:w.unwrapTo(0),queryGeometry:_,cameraQueryGeometry:M,scale:m})}}}return n}transformBbox(t,r,i){let n=t.map(r);if(i){let a=Jd.fromPoints(t);a.shrinkBy(Math.min(a.width(),a.height())*.001);let o=a.map(r);Jd.fromPoints(n).covers(o)||(n=n.map(s=>s.x>.5?new wo(s.x-1,s.y,s.z):s))}return n}getVisibleCoordinates(t){let r=this.getRenderableIds(t).map(i=>this._inViewTiles.getTileById(i).tileID);return this.transform&&this.transform.populateCache(r),r}hasTransition(){return this._source.hasTransition()?!0:rat(this._source.type)&&l3r(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(t){this._rasterFadeDuration=t}setFeatureState(t,r,i){t||(t=c8),this._state.updateState(t,r,i)}removeFeatureState(t,r,i){t||(t=c8),this._state.removeFeatureState(t,r,i)}getFeatureState(t,r){return t||(t=c8),this._state.getState(t,r)}setDependencies(t,r,i){let n=this._inViewTiles.getTileById(t);n&&n.setDependencies(r,i)}reloadTilesForDependencies(t,r){for(let i of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(i).hasDependency(t,r)&&this._reloadTile(i,"reloading");this._outOfViewCache.filter(i=>!i.hasDependency(t,r))}areTilesLoaded(){for(let t of this._inViewTiles.getAllTiles())if(t.state!=="loaded"&&t.state!=="errored")return!1;return!0}},qm.maxUnderzooming=10,qm.maxOverzooming=3,qm),c3r=class{constructor(e,t){this.reset(e,t)}reset(e,t){this.points=e||[],this._distances=[0];for(let r=1;r<this.points.length;r++)this._distances[r]=this._distances[r-1]+this.points[r].dist(this.points[r-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(t||0,this.length*.5),this.paddedLength=this.length-this.padding*2}lerp(e){if(this.points.length===1)return this.points[0];e=Jn(e,0,1);let t=1,r=this._distances[t],i=e*this.paddedLength+this.padding;for(;r<i&&t<this._distances.length;)r=this._distances[++t];let n=t-1,a=this._distances[n],o=r-a,s=o>0?(i-a)/o:0;return this.points[n].mult(1-s).add(this.points[t].mult(s))}};oat=class{constructor(e,t,r){let i=this.boxCells=[],n=this.circleCells=[];this.xCellCount=Math.ceil(e/r),this.yCellCount=Math.ceil(t/r);for(let a=0;a<this.xCellCount*this.yCellCount;a++)i.push([]),n.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=e,this.height=t,this.xScale=this.xCellCount/e,this.yScale=this.yCellCount/t,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(e,t,r,i,n){this._forEachCell(t,r,i,n,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(r),this.bboxes.push(i),this.bboxes.push(n)}insertCircle(e,t,r,i){this._forEachCell(t-i,r-i,t+i,r+i,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(r),this.circles.push(i)}_insertBoxCell(e,t,r,i,n,a){this.boxCells[n].push(a)}_insertCircleCell(e,t,r,i,n,a){this.circleCells[n].push(a)}_query(e,t,r,i,n,a,o){if(r<0||e>this.width||i<0||t>this.height)return[];let s=[];if(e<=0&&t<=0&&this.width<=r&&this.height<=i){if(n)return[{key:null,x1:e,y1:t,x2:r,y2:i}];for(let l=0;l<this.boxKeys.length;l++)s.push({key:this.boxKeys[l],x1:this.bboxes[l*4],y1:this.bboxes[l*4+1],x2:this.bboxes[l*4+2],y2:this.bboxes[l*4+3]});for(let l=0;l<this.circleKeys.length;l++){let u=this.circles[l*3],c=this.circles[l*3+1],f=this.circles[l*3+2];s.push({key:this.circleKeys[l],x1:u-f,y1:c-f,x2:u+f,y2:c+f})}}else{let l={hitTest:n,overlapMode:a,seenUids:{box:{},circle:{}}};this._forEachCell(e,t,r,i,this._queryCell,s,l,o)}return s}query(e,t,r,i){return this._query(e,t,r,i,!1,null)}hitTest(e,t,r,i,n,a){return this._query(e,t,r,i,!0,n,a).length>0}hitTestCircle(e,t,r,i,n){let a=e-r,o=e+r,s=t-r,l=t+r;if(o<0||a>this.width||l<0||s>this.height)return!1;let u=[],c={hitTest:!0,overlapMode:i,circle:{x:e,y:t,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(a,s,o,l,this._queryCellCircle,u,c,n),u.length>0}_queryCell(e,t,r,i,n,a,o,s){let{seenUids:l,hitTest:u,overlapMode:c}=o,f=this.boxCells[n],h=1e-6;if(f!==null){let p=this.bboxes;for(let v of f)if(!l.box[v]){l.box[v]=!0;let m=v*4,g=this.boxKeys[v];if(e<=p[m+2]+h&&t<=p[m+3]+h&&r>=p[m+0]-h&&i>=p[m+1]-h&&(!s||s(g))&&(!u||!iq(c,g.overlapMode))&&(a.push({key:g,x1:p[m],y1:p[m+1],x2:p[m+2],y2:p[m+3]}),u))return!0}}let d=this.circleCells[n];if(d!==null){let p=this.circles;for(let v of d)if(!l.circle[v]){l.circle[v]=!0;let m=v*3,g=this.circleKeys[v];if(this._circleAndRectCollide(p[m],p[m+1],p[m+2],e,t,r,i)&&(!s||s(g))&&(!u||!iq(c,g.overlapMode))){let w=p[m],b=p[m+1],_=p[m+2];if(a.push({key:g,x1:w-_,y1:b-_,x2:w+_,y2:b+_}),u)return!0}}}return!1}_queryCellCircle(e,t,r,i,n,a,o,s){let{circle:l,seenUids:u,overlapMode:c}=o,f=this.boxCells[n];if(f!==null){let d=this.bboxes;for(let p of f)if(!u.box[p]){u.box[p]=!0;let v=p*4,m=this.boxKeys[p];if(this._circleAndRectCollide(l.x,l.y,l.radius,d[v+0],d[v+1],d[v+2],d[v+3])&&(!s||s(m))&&!iq(c,m.overlapMode))return a.push(!0),!0}}let h=this.circleCells[n];if(h!==null){let d=this.circles;for(let p of h)if(!u.circle[p]){u.circle[p]=!0;let v=p*3,m=this.circleKeys[p];if(this._circlesCollide(d[v],d[v+1],d[v+2],l.x,l.y,l.radius)&&(!s||s(m))&&!iq(c,m.overlapMode))return a.push(!0),!0}}}_forEachCell(e,t,r,i,n,a,o,s){let l=this._convertToXCellCoord(e),u=this._convertToYCellCoord(t),c=this._convertToXCellCoord(r),f=this._convertToYCellCoord(i);for(let h=l;h<=c;h++)for(let d=u;d<=f;d++){let p=this.xCellCount*d+h;if(n.call(this,e,t,r,i,p,a,o,s))return}}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,r,i,n,a){let o=i-e,s=n-t,l=r+a;return l*l>o*o+s*s}_circleAndRectCollide(e,t,r,i,n,a,o){let s=(a-i)/2,l=Math.abs(e-(i+s));if(l>s+r)return!1;let u=(o-n)/2,c=Math.abs(t-(n+u));if(c>u+r)return!1;if(l<=s||c<=u)return!0;let f=l-s,h=c-u;return f*f+h*h<=r*r}};p3r=Em();x3r=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);w3r=class{constructor(e,t=new oat(e.width+200,e.height+200,25),r=new oat(e.width+200,e.height+200,25)){this.transform=e,this.grid=t,this.ignoredGrid=r,this.pitchFactor=Math.cos(e.pitch*Math.PI/180)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+100,this.screenBottomBoundary=e.height+100,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(e,t,r,i,n,a,o,s,l,u,c,f,h=0,d=!0){let p=e.anchorPointX+s[0],v=e.anchorPointY+s[1],m=this.projectAndGetPerspectiveRatio(p,v,n,mq(u,p,v,h,d),f),g=r*m.perspectiveRatio,w;if(!a&&!o){let y=m.x+(c?c.x*g:0),E=m.y+(c?c.y*g:0);w={allPointsOccluded:!1,box:[y+e.x1*g,E+e.y1*g,y+e.x2*g,E+e.y2*g]}}else w=this._projectCollisionBox(e,g,i,n,a,o,s,m,u,c,f,h,d);let[b,_,M,x]=w.box,T=a?w.allPointsOccluded:m.isOccluded,A=T;return A||(A=m.perspectiveRatio<this.perspectiveRatioCutoff),A||(A=!this.isInsideGrid(b,_,M,x)),A||t!=="always"&&this.grid.hitTest(b,_,M,x,t,l)?{box:[b,_,M,x],placeable:!1,offscreen:!1,occluded:T}:{box:[b,_,M,x],placeable:!0,offscreen:this.isOffscreen(b,_,M,x),occluded:T}}placeCollisionCircles(e,t,r,i,n,a,o,s,l,u,c,f,h,d){let p=[],v=new tr(t.anchorX,t.anchorY),m=this.getPerspectiveRatio(v.x,v.y,a,d==null?void 0:d(v.x,v.y)),g=(l?n*this.transform.getPitchedTextCorrection(t.anchorX,t.anchorY,a)/m:n*m)/24,w={projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},b=t.lineOffsetX*g,_=t.lineOffsetY*g,M={getElevation:d,pitchedLabelPlaneMatrix:o,lineVertexArray:r,pitchWithMap:l,projectionCache:w,transform:this.transform,tileAnchorPoint:v,unwrappedTileID:a,width:this.transform.width,height:this.transform.height,translation:h},x=wot(g,i,b,_,!1,t,!1,M),T=!1,A=!1,y=!0;if(x){let E=c*.5*m+f,S=new tr(-100,-100),C=new tr(this.screenRightBoundary,this.screenBottomBoundary),k=new c3r,D=x.first,F=x.last,P=[];for(let I=D.path.length-1;I>=1;I--)P.push(D.path[I]);for(let I=1;I<F.path.length;I++)P.push(F.path[I]);let R=E*2.5;if(l){let I=this.projectPathToScreenSpace(P,M);P=I.some(B=>B.signedDistanceFromCamera<=0)?[]:I.map(B=>B.point)}let L=[];if(P.length>0){let I=P[0].clone(),B=P[0].clone();for(let O=1;O<P.length;O++)I.x=Math.min(I.x,P[O].x),I.y=Math.min(I.y,P[O].y),B.x=Math.max(B.x,P[O].x),B.y=Math.max(B.y,P[O].y);L=I.x>=S.x&&B.x<=C.x&&I.y>=S.y&&B.y<=C.y?[P]:B.x<S.x||I.x>C.x||B.y<S.y||I.y>C.y?[]:dne([P],S.x,S.y,C.x,C.y)}for(let I of L){k.reset(I,E*.25);let B=0;B=k.length<=.5*E?1:Math.ceil(k.paddedLength/R)+1;for(let O=0;O<B;O++){let $=O/Math.max(B-1,1),Y=k.lerp($),K=Y.x+100,j=Y.y+100;p.push(K,j,E,0);let q=K-E,J=j-E,U=K+E,V=j+E;if(y&&(y=this.isOffscreen(q,J,U,V)),A||(A=this.isInsideGrid(q,J,U,V)),e!=="always"&&this.grid.hitTestCircle(K,j,E,e,u)&&(T=!0,!s))return{circles:[],offscreen:!1,collisionDetected:T}}}}return{circles:!s&&T||!A||m<this.perspectiveRatioCutoff?[]:p,offscreen:y,collisionDetected:T}}projectPathToScreenSpace(e,t){return b3r(_3r(e,t))}queryRenderedSymbols(e){if(e.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let t=[],r=new Jd;for(let c of e){let f=new tr(c.x+100,c.y+100);r.extend(f),t.push(f)}let{minX:i,minY:n,maxX:a,maxY:o}=r,s=this.grid.query(i,n,a,o).concat(this.ignoredGrid.query(i,n,a,o)),l={},u={};for(let c of s){let f=c.key;if(l[f.bucketInstanceId]===void 0&&(l[f.bucketInstanceId]={}),l[f.bucketInstanceId][f.featureIndex])continue;let h=[new tr(c.x1,c.y1),new tr(c.x2,c.y1),new tr(c.x2,c.y2),new tr(c.x1,c.y2)];Qie(t,h)&&(l[f.bucketInstanceId][f.featureIndex]=!0,u[f.bucketInstanceId]===void 0&&(u[f.bucketInstanceId]=[]),u[f.bucketInstanceId].push(f.featureIndex))}return u}insertCollisionBox(e,t,r,i,n,a){let o=r?this.ignoredGrid:this.grid,s={bucketInstanceId:i,featureIndex:n,collisionGroupID:a,overlapMode:t};o.insert(s,e[0],e[1],e[2],e[3])}insertCollisionCircles(e,t,r,i,n,a){let o=r?this.ignoredGrid:this.grid,s={bucketInstanceId:i,featureIndex:n,collisionGroupID:a,overlapMode:t};for(let l=0;l<e.length;l+=4)o.insertCircle(s,e[l],e[l+1],e[l+2])}projectAndGetPerspectiveRatio(e,t,r,i,n){if(n){let a;i==null?(a=[e,t,0,1],Dae(a,a,n)):(a=[e,t,i,1],Uu(a,a,n));let o=a[3];return{x:(a[0]/o+1)/2*this.transform.width+100,y:(-a[1]/o+1)/2*this.transform.height+100,perspectiveRatio:.5+.5*(this.transform.cameraToCenterDistance/o),isOccluded:!1,signedDistanceFromCamera:o}}{let a=this.transform.projectTileCoordinates(e,t,r,i);return{x:(a.point.x+1)/2*this.transform.width+100,y:(-a.point.y+1)/2*this.transform.height+100,perspectiveRatio:.5+.5*(this.transform.cameraToCenterDistance/a.signedDistanceFromCamera),isOccluded:a.isOccluded,signedDistanceFromCamera:a.signedDistanceFromCamera}}}getPerspectiveRatio(e,t,r,i){let n=this.transform.projectTileCoordinates(e,t,r,i);return .5+.5*(this.transform.cameraToCenterDistance/n.signedDistanceFromCamera)}isOffscreen(e,t,r,i){return r<100||e>=this.screenRightBoundary||i<100||t>this.screenBottomBoundary}isInsideGrid(e,t,r,i){return r>=0&&e<this.gridRightBoundary&&i>=0&&t<this.gridBottomBoundary}getViewportMatrix(){let e=Qd([]);return eu(e,e,[-100,-100,0]),e}_projectCollisionBox(e,t,r,i,n,a,o,s,l,u,c,f=0,h=!0){let d=1,p=0,v=0,m=1,g=e.anchorPointX+o[0],w=e.anchorPointY+o[1];if(a&&!n){let F=this.projectAndGetPerspectiveRatio(g+1,w,i,mq(l,g+1,w,f,h),c),P=F.x-s.x,R=F.y-s.y,L=Math.atan(R/P)+(P<0?Math.PI:0),I=Math.sin(L),B=Math.cos(L);d=B,p=I,v=-I,m=B}else if(!a&&n){let F=kae(this.transform);d=F.vecEast[0],p=F.vecEast[1],v=F.vecSouth[0],m=F.vecSouth[1]}let b=s.x,_=s.y,M=t;if(n&&(b=g,_=w,M=2**-(this.transform.zoom-r.overscaledZ),M*=this.transform.getPitchedTextCorrection(g,w,i),!u)){let F=s.signedDistanceFromCamera/this.transform.cameraToCenterDistance,P=Jn(.5+.5*F,0,4);M*=P}u&&(b+=d*u.x*M+v*u.y*M,_+=p*u.x*M+m*u.y*M);let x=e.x1*M,T=e.x2*M,A=(x+T)/2,y=e.y1*M,E=e.y2*M,S=(y+E)/2,C=[{offsetX:x,offsetY:y},{offsetX:A,offsetY:y},{offsetX:T,offsetY:y},{offsetX:T,offsetY:S},{offsetX:T,offsetY:E},{offsetX:A,offsetY:E},{offsetX:x,offsetY:E},{offsetX:x,offsetY:S}],k=[];for(let{offsetX:F,offsetY:P}of C)k.push(new tr(b+d*F+v*P,_+p*F+m*P));let D=!1;if(n){let F=k.map(P=>this.projectAndGetPerspectiveRatio(P.x,P.y,i,mq(l,P.x,P.y,f,h),c));D=F.some(P=>!P.isOccluded),k=F.map(P=>new tr(P.x,P.y))}else D=!0;return{box:$et(k),allPointsOccluded:!D}}},uat=class{constructor(e,t,r,i){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):i&&r?1:0,this.placed=r}isHidden(){return this.opacity===0&&!this.placed}},d8=class{constructor(e,t,r,i,n){this.text=new uat(e?e.text:null,t,r,n),this.icon=new uat(e?e.icon:null,t,i,n)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}},cat=class{constructor(e,t,r){this.text=e,this.icon=t,this.skipFade=r}},T3r=class{constructor(e,t,r,i,n){this.bucketInstanceId=e,this.featureIndex=t,this.sourceLayerIndex=r,this.bucketIndex=i,this.tileID=n}},A3r=class{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){let t=++this.maxGroupID;this.collisionGroups[e]={ID:t,predicate:r=>r.collisionGroupID===t}}return this.collisionGroups[e]}};M3r=class{constructor(e,t,r,i,n){this.transform=e.clone(),this.terrain=t,this.collisionIndex=new w3r(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=r,this.retainedQueryData={},this.collisionGroups=new A3r(i),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=n,n&&(n.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){let t=this.terrain;if(t)return(r,i)=>t.getElevation(e,r,i)}getBucketParts(e,t,r,i){let n=r.getBucket(t),a=r.latestFeatureIndex;if(!n||!a||t.id!==n.layerIds[0])return;let o=r.collisionBoxArray,s=n.layers[0].layout,l=n.layers[0].paint,u=2**(this.transform.zoom-r.tileID.overscaledZ),c=r.tileSize/zr,f=r.tileID.toUnwrapped(),h=s.get("text-rotation-alignment")==="map",d=Zh(r,1,this.transform.zoom),p=Dm(this.collisionIndex.transform,r,l.get("text-translate"),l.get("text-translate-anchor")),v=Dm(this.collisionIndex.transform,r,l.get("icon-translate"),l.get("icon-translate-anchor")),m=Eae(h,this.transform,d);this.retainedQueryData[n.bucketInstanceId]=new T3r(n.bucketInstanceId,a,n.sourceLayerIndex,n.index,r.tileID);let g={bucket:n,layout:s,translationText:p,translationIcon:v,unwrappedTileID:f,pitchedLabelPlaneMatrix:m,scale:u,textPixelRatio:c,holdingForFade:r.holdingForSymbolFade(),collisionBoxArray:o,partiallyEvaluatedTextSize:a8(n.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(n.sourceID)};if(i)for(let w of n.sortKeyRanges){let{sortKey:b,symbolInstanceStart:_,symbolInstanceEnd:M}=w;e.push({sortKey:b,symbolInstanceStart:_,symbolInstanceEnd:M,parameters:g})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:n.symbolInstances.length,parameters:g})}attemptAnchorPlacement(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p,v,m,g,w,b,_,M){var E,S,C;let x=XB[e.textAnchor],T=[e.textOffset0,e.textOffset1],A=fat(x,r,i,T,n),y=this.collisionIndex.placeCollisionBox(t,f,s,l,u,o,a,v,c.predicate,w,A,b,_,M);if((!g||this.collisionIndex.placeCollisionBox(g,f,s,l,u,o,a,m,c.predicate,w,A,b,_,M).placeable)&&y.placeable){let k;if((E=this.prevPlacement)!=null&&E.variableOffsets[h.crossTileID]&&((C=(S=this.prevPlacement)==null?void 0:S.placements[h.crossTileID])!=null&&C.text)&&(k=this.prevPlacement.variableOffsets[h.crossTileID].anchor),h.crossTileID===0)throw Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[h.crossTileID]={textOffset:T,width:r,height:i,anchor:x,textBoxScale:n,prevAnchor:k},this.markUsedJustification(d,x,h,p),d.allowVerticalPlacement&&(this.markUsedOrientation(d,p,h),this.placedOrientations[h.crossTileID]=p),{shift:A,placedGlyphBoxes:y}}}placeLayerBucketPart(e,t,r){let{bucket:i,layout:n,translationText:a,translationIcon:o,unwrappedTileID:s,pitchedLabelPlaneMatrix:l,textPixelRatio:u,holdingForFade:c,collisionBoxArray:f,partiallyEvaluatedTextSize:h,collisionGroup:d}=e.parameters,p=n.get("text-optional"),v=n.get("icon-optional"),m=zk(n,"text-overlap","text-allow-overlap"),g=m==="always",w=zk(n,"icon-overlap","icon-allow-overlap"),b=w==="always",_=n.get("text-rotation-alignment")==="map",M=n.get("text-pitch-alignment")==="map",x=n.get("icon-text-fit")!=="none",T=n.get("symbol-z-order")==="viewport-y",A=n.get("symbol-height-anchor")==="ground",y=g&&(b||!i.hasIconData()||v),E=b&&(g||!i.hasTextData()||p);!i.collisionArrays&&f&&i.deserializeCollisionBoxes(f);let S=this.retainedQueryData[i.bucketInstanceId].tileID,C=this._getTerrainElevationFunc(S),k=this.transform.getFastPathSimpleProjectionMatrix(S),D=(F,P,R)=>{var be,he;if(t[F.crossTileID])return;if(c){this.placements[F.crossTileID]=new cat(!1,!1,!1);return}let L=F.heightOffset,I=!1,B=!1,O=!0,$=null,Y={box:null,placeable:!1,offscreen:null,occluded:!1},K={box:null,placeable:!1,offscreen:null},j=null,q=null,J=null,U=0,V=0,X=0;P.textFeatureIndex?U=P.textFeatureIndex:F.useRuntimeCollisionCircles&&(U=F.featureIndex),P.verticalTextFeatureIndex&&(V=P.verticalTextFeatureIndex);let H=P.textBox;if(H){let oe=ee=>{let ae=1;if(i.allowVerticalPlacement&&!ee&&this.prevPlacement){let xe=this.prevPlacement.placedOrientations[F.crossTileID];xe&&(this.placedOrientations[F.crossTileID]=xe,ae=xe,this.markUsedOrientation(i,ae,F))}return ae},Ee=(ee,ae)=>{if(i.allowVerticalPlacement&&F.numVerticalGlyphVertices>0&&P.verticalTextBox){for(let xe of i.writingModes)if(xe===2?(Y=ae(),K=Y):Y=ee(),Y==null?void 0:Y.placeable)break}else Y=ee()},ye=F.textAnchorOffsetStartIndex,ue=F.textAnchorOffsetEndIndex;if(ue===ye){let ee=(ae,xe)=>{let re=this.collisionIndex.placeCollisionBox(ae,m,u,S,s,M,_,a,d.predicate,C,void 0,k,L,A);return re!=null&&re.placeable&&(this.markUsedOrientation(i,xe,F),this.placedOrientations[F.crossTileID]=xe),re};Ee(()=>ee(H,1),()=>{let ae=P.verticalTextBox;return i.allowVerticalPlacement&&F.numVerticalGlyphVertices>0&&ae?ee(ae,2):{box:null,offscreen:null}}),oe(Y==null?void 0:Y.placeable)}else{let ee=XB[(he=(be=this.prevPlacement)==null?void 0:be.variableOffsets[F.crossTileID])==null?void 0:he.anchor],ae=(re,pe,we)=>{let Fe=re.x2-re.x1,Se=re.y2-re.y1,ke=F.textBoxScale,_e=x&&w==="never"?pe:null,Ie=null,Oe=m==="never"?1:2,Qe="never";ee&&Oe++;for(let et=0;et<Oe;et++){for(let _t=ye;_t<ue;_t++){let ut=i.textAnchorOffsets.get(_t);if(ee&&ut.textAnchor!==ee)continue;let vt=this.attemptAnchorPlacement(ut,re,Fe,Se,ke,_,M,u,S,s,d,Qe,F,i,we,a,o,_e,C,k,L,A);if(vt&&(Ie=vt.placedGlyphBoxes,Ie==null?void 0:Ie.placeable))return I=!0,$=vt.shift,Ie}ee?ee=null:Qe=m}return r&&!Ie&&(Ie={box:this.collisionIndex.placeCollisionBox(H,"always",u,S,s,M,_,a,d.predicate,C,void 0,k,L,A).box,offscreen:!1,placeable:!1,occluded:!1}),Ie};Ee(()=>ae(H,P.iconBox,1),()=>{let re=P.verticalTextBox,pe=Y==null?void 0:Y.placeable;return i.allowVerticalPlacement&&!pe&&F.numVerticalGlyphVertices>0&&re?ae(re,P.verticalIconBox,2):{box:null,occluded:!0,offscreen:null}}),Y&&(I=Y.placeable,O=Y.offscreen);let xe=oe(Y==null?void 0:Y.placeable);if(!I&&this.prevPlacement){let re=this.prevPlacement.variableOffsets[F.crossTileID];re&&(this.variableOffsets[F.crossTileID]=re,this.markUsedJustification(i,re.anchor,F,xe))}}}if(j=Y,I=j==null?void 0:j.placeable,O=j==null?void 0:j.offscreen,F.useRuntimeCollisionCircles&&F.centerJustifiedTextSymbolIndex>=0){let oe=i.text.placedSymbolArray.get(F.centerJustifiedTextSymbolIndex),Ee=YB(i.textSizeData,h,oe),ye=n.get("text-padding"),ue=F.collisionCircleDiameter;q=this.collisionIndex.placeCollisionCircles(m,oe,i.lineVertexArray,i.glyphOffsetArray,Ee,s,l,r,M,d.predicate,ue,ye,a,C),q.circles.length&&q.collisionDetected&&!r&&Ma("Collisions detected, but collision boxes are not shown"),I=g||q.circles.length>0&&!q.collisionDetected,O&&(O=q.offscreen)}if(P.iconFeatureIndex&&(X=P.iconFeatureIndex),P.iconBox){let oe=Ee=>this.collisionIndex.placeCollisionBox(Ee,w,u,S,s,M,_,o,d.predicate,C,x&&$?$:void 0,k,L,A);K&&K.placeable&&P.verticalIconBox?(J=oe(P.verticalIconBox),B=J.placeable):(J=oe(P.iconBox),B=J.placeable),O&&(O=J.offscreen)}let G=p||F.numHorizontalGlyphVertices===0&&F.numVerticalGlyphVertices===0,Q=v||F.numIconVertices===0;!G&&!Q?B=I=B&&I:Q?G||B&&(B=I):I=B&&I;let te=I&&j.placeable,ce=B&&J.placeable;if(te&&(K&&K.placeable&&V?this.collisionIndex.insertCollisionBox(j.box,m,n.get("text-ignore-placement"),i.bucketInstanceId,V,d.ID):this.collisionIndex.insertCollisionBox(j.box,m,n.get("text-ignore-placement"),i.bucketInstanceId,U,d.ID)),ce&&this.collisionIndex.insertCollisionBox(J.box,w,n.get("icon-ignore-placement"),i.bucketInstanceId,X,d.ID),q&&I&&this.collisionIndex.insertCollisionCircles(q.circles,m,n.get("text-ignore-placement"),i.bucketInstanceId,U,d.ID),r&&this.storeCollisionData(i.bucketInstanceId,R,P,j,J,q),F.crossTileID===0)throw Error("symbolInstance.crossTileID can't be 0");if(i.bucketInstanceId===0)throw Error("bucket.bucketInstanceId can't be 0");let ge=(I||y)&&!(j!=null&&j.occluded),Ce=(B||E)&&!(J!=null&&J.occluded);this.placements[F.crossTileID]=new cat(ge,Ce,O||i.justReloaded),t[F.crossTileID]=!0};if(T){if(e.symbolInstanceStart!==0)throw Error("bucket.bucketInstanceId should be 0");let F=i.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let P=F.length-1;P>=0;--P){let R=F[P];D(i.symbolInstances.get(R),i.collisionArrays[R],R)}}else for(let F=e.symbolInstanceStart;F<e.symbolInstanceEnd;F++)D(i.symbolInstances.get(F),i.collisionArrays[F],F);i.justReloaded=!1}storeCollisionData(e,t,r,i,n,a){if(r.textBox||r.iconBox){let o;this.collisionBoxArrays.has(e)?o=this.collisionBoxArrays.get(e):(o=new Map,this.collisionBoxArrays.set(e,o));let s;o.has(t)?s=o.get(t):(s={text:null,icon:null},o.set(t,s)),r.textBox&&(s.text=i.box),r.iconBox&&(s.icon=n.box)}if(a){let o=this.collisionCircleArrays[e];o===void 0&&(o=this.collisionCircleArrays[e]=[]);for(let s=0;s<a.circles.length;s+=4)o.push(a.circles[s+0]-100),o.push(a.circles[s+1]-100),o.push(a.circles[s+2]),o.push(+!!a.collisionDetected)}}markUsedJustification(e,t,r,i){let n={left:r.leftJustifiedTextSymbolIndex,center:r.centerJustifiedTextSymbolIndex,right:r.rightJustifiedTextSymbolIndex},a;a=i===2?r.verticalPlacedTextSymbolIndex:n[rB(t)];let o=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex,r.verticalPlacedTextSymbolIndex];for(let s of o)s>=0&&(a>=0&&s!==a?e.text.placedSymbolArray.get(s).crossTileID=0:e.text.placedSymbolArray.get(s).crossTileID=r.crossTileID)}markUsedOrientation(e,t,r){let i=t===1||t===3?t:0,n=t===2?t:0,a=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex];for(let o of a)e.text.placedSymbolArray.get(o).placedOrientation=i;r.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(r.verticalPlacedTextSymbolIndex).placedOrientation=n)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;let t=this.prevPlacement,r=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;let i=t?t.symbolFadeChange(e):1,n=t?t.opacities:{},a=t?t.variableOffsets:{},o=t?t.placedOrientations:{};for(let s in this.placements){let l=this.placements[s],u=n[s];u?(this.opacities[s]=new d8(u,i,l.text,l.icon),r||(r=l.text!==u.text.placed),r||(r=l.icon!==u.icon.placed)):(this.opacities[s]=new d8(null,i,l.text,l.icon,l.skipFade),r||(r=l.text||l.icon))}for(let s in n){let l=n[s];if(!this.opacities[s]){let u=new d8(l,i,!1,!1);u.isHidden()||(this.opacities[s]=u,r||(r=l.text.placed),r||(r=l.icon.placed))}}for(let s in a)!this.variableOffsets[s]&&this.opacities[s]&&!this.opacities[s].isHidden()&&(this.variableOffsets[s]=a[s]);for(let s in o)!this.placedOrientations[s]&&this.opacities[s]&&!this.opacities[s].isHidden()&&(this.placedOrientations[s]=o[s]);if(t&&t.lastPlacementChangeTime===void 0)throw Error("Last placement time for previous placement is not defined");r?this.lastPlacementChangeTime=e:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){let r={};for(let i of t){let n=i.getBucket(e);n&&i.latestFeatureIndex&&e.id===n.layerIds[0]&&this.updateBucketOpacities(n,i.tileID,r,i.collisionBoxArray)}}updateBucketOpacities(e,t,r,i){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();let n=e.layers[0],a=n.layout,o=new d8(null,0,!1,!1,!0),s=a.get("text-allow-overlap"),l=a.get("icon-allow-overlap"),u=n._unevaluatedLayout.hasValue("text-variable-anchor")||n._unevaluatedLayout.hasValue("text-variable-anchor-offset"),c=a.get("text-rotation-alignment")==="map",f=a.get("text-pitch-alignment")==="map",h=a.get("icon-text-fit")!=="none",d=new d8(null,0,s&&(l||!e.hasIconData()||a.get("icon-optional")),l&&(s||!e.hasTextData()||a.get("text-optional")),!0);!e.collisionArrays&&i&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(i);let p=(m,g,w)=>{for(let b=0;b<g/4;b++)m.opacityVertexArray.emplaceBack(w);m.hasVisibleVertices||(m.hasVisibleVertices=w!==p8)},v=this.collisionBoxArrays.get(e.bucketInstanceId);for(let m=0;m<e.symbolInstances.length;m++){let g=e.symbolInstances.get(m),{numHorizontalGlyphVertices:w,numVerticalGlyphVertices:b,crossTileID:_}=g,M=r[_],x=this.opacities[_];M?x=o:x||(x=d,this.opacities[_]=x),r[_]=!0;let T=w>0||b>0,A=g.numIconVertices>0,y=this.placedOrientations[g.crossTileID],E=y===2,S=y===1||y===3;if(T){let k=dat(x.text),D=E?p8:k;p(e.text,w,D);let F=S?p8:k;p(e.text,b,F);let P=x.text.isHidden(),R=[g.rightJustifiedTextSymbolIndex,g.centerJustifiedTextSymbolIndex,g.leftJustifiedTextSymbolIndex];for(let B of R)B>=0&&(e.text.placedSymbolArray.get(B).hidden=P||E?1:0);g.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(g.verticalPlacedTextSymbolIndex).hidden=P||S?1:0);let L=this.variableOffsets[g.crossTileID];L&&this.markUsedJustification(e,L.anchor,g,y);let I=this.placedOrientations[g.crossTileID];I&&(this.markUsedJustification(e,"left",g,I),this.markUsedOrientation(e,I,g))}if(A){let k=dat(x.icon),D=!(h&&g.verticalPlacedIconSymbolIndex&&E);if(g.placedIconSymbolIndex>=0){let F=D?k:p8;p(e.icon,g.numIconVertices,F),e.icon.placedSymbolArray.get(g.placedIconSymbolIndex).hidden=x.icon.isHidden()}if(g.verticalPlacedIconSymbolIndex>=0){let F=D?p8:k;p(e.icon,g.numVerticalIconVertices,F),e.icon.placedSymbolArray.get(g.verticalPlacedIconSymbolIndex).hidden=x.icon.isHidden()}}let C=v!=null&&v.has(m)?v.get(m):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){let k=e.collisionArrays[m];if(k){let D=new tr(0,0);if(k.textBox||k.verticalTextBox){let F=!0;if(u){let P=this.variableOffsets[_];P?(D=fat(P.anchor,P.width,P.height,P.textOffset,P.textBoxScale),c&&D._rotate(f?-this.transform.bearingInRadians:this.transform.bearingInRadians)):F=!1}if(k.textBox||k.verticalTextBox){let P;k.textBox&&(P=E),k.verticalTextBox&&(P=S),hat(e.textCollisionBox.collisionVertexArray,x.text.placed,!F||P,C.text,D.x,D.y)}}if(k.iconBox||k.verticalIconBox){let F=!(S||!k.verticalIconBox),P;k.iconBox&&(P=F),k.verticalIconBox&&(P=!F),hat(e.iconCollisionBox.collisionVertexArray,x.icon.placed,P,C.icon,h?D.x:0,h?D.y:0)}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId])}symbolFadeChange(e){return this.fadeDuration===0?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(e,t){let r=this.zoomAtLastRecencyCheck===t?1-this.zoomAdjustment(t):1;return this.zoomAtLastRecencyCheck=t,this.commitTime+this.fadeDuration*r>e}setStale(){this.stale=!0}};S3r=2**25,E3r=2**24,k3r=2**17,C3r=2**16;p8=0,D3r=class{constructor(e){this._sortAcrossTiles=e.layout.get("symbol-z-order")!=="viewport-y"&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,t,r,i,n){let a=this._bucketParts;for(;this._currentTileIndex<e.length;){let o=e[this._currentTileIndex];if(t.getBucketParts(a,i,o,this._sortAcrossTiles),this._currentTileIndex++,n())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,a.sort((o,s)=>o.sortKey-s.sortKey));this._currentPartIndex<a.length;){let o=a[this._currentPartIndex];if(t.placeLayerBucketPart(o,this._seenCrossTileIDs,r),this._currentPartIndex++,n())return!0}return!1}},F3r=class{constructor(e,t,r,i,n,a,o,s){this.placement=new M3r(e,t,a,o,s),this._currentPlacementIndex=r.length-1,this._forceFullPlacement=i,this._showCollisionBoxes=n,this._done=!1}isDone(){return this._done}continuePlacement(e,t,r){let i=Oo(),n=()=>!this._forceFullPlacement&&Oo()-i>2;for(;this._currentPlacementIndex>=0;){let a=t[e[this._currentPlacementIndex]],o=this.placement.collisionIndex.transform.zoom;if(vne(a)&&a.layout&&(!a.minzoom||a.minzoom<=o)&&(!a.maxzoom||a.maxzoom>o)){if(this._inProgressLayer||(this._inProgressLayer=new D3r(a)),this._inProgressLayer.continuePlacement(r[a.source],this.placement,this._showCollisionBoxes,a,n))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}},pat=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],xl=new Uint32Array(96),L3r=class Mot{static from(t){if(!t||t.byteLength===void 0||t.buffer)throw Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[r,i]=new Uint8Array(t,0,2);if(r!==219)throw Error("Data does not appear to be in a KDBush format.");let n=i>>4;if(n!==1)throw Error(`Got v${n} data when expected v1.`);let a=pat[i&15];if(!a)throw Error("Unrecognized array type.");let[o]=new Uint16Array(t,2,1),[s]=new Uint32Array(t,4,1);return new Mot(s,o,a,void 0,t)}constructor(t,r=64,i=Float64Array,n=ArrayBuffer,a){if(isNaN(t)||t<0)throw Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=i,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;let o=pat.indexOf(this.ArrayType),s=t*2*this.ArrayType.BYTES_PER_ELEMENT,l=t*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-l%8)%8;if(o<0)throw Error(`Unexpected typed array class: ${i}.`);if(a)this.data=a,this.ids=new this.IndexArrayType(a,8,t),this.coords=new i(a,8+l+u,t*2),this._pos=t*2,this._finished=!0;else{let c=this.data=new n(8+s+l+u);this.ids=new this.IndexArrayType(c,8,t),this.coords=new i(c,8+l+u,t*2),this._pos=0,this._finished=!1,new Uint8Array(c,0,2).set([219,16+o]),new Uint16Array(c,2,1)[0]=r,new Uint32Array(c,4,1)[0]=t}}add(t,r){let i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=t,this.coords[this._pos++]=r,i}finish(){let t=this._pos>>1;if(t!==this.numItems)throw Error(`Added ${t} items when expected ${this.numItems}.`);return lae(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,r,i,n){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:a,coords:o,nodeSize:s}=this;xl[0]=0,xl[1]=a.length-1,xl[2]=0;let l=3,u=[];for(;l>0;){let c=xl[--l],f=xl[--l],h=xl[--l];if(f-h<=s){for(let m=h;m<=f;m++){let g=o[2*m],w=o[2*m+1];g>=t&&g<=i&&w>=r&&w<=n&&u.push(a[m])}continue}let d=h+f>>1,p=o[2*d],v=o[2*d+1];p>=t&&p<=i&&v>=r&&v<=n&&u.push(a[d]),(c===0?t<=p:r<=v)&&(xl[l++]=h,xl[l++]=d-1,xl[l++]=1-c),(c===0?i>=p:n>=v)&&(xl[l++]=d+1,xl[l++]=f,xl[l++]=1-c)}return u}within(t,r,i){let n=[];return this.withinInto(t,r,i,n),n}withinInto(t,r,i,n){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:a,coords:o,nodeSize:s}=this;xl[0]=0,xl[1]=a.length-1,xl[2]=0;let l=3,u=0,c=i*i;for(;l>0;){let f=xl[--l],h=xl[--l],d=xl[--l];if(h-d<=s){for(let g=d;g<=h;g++)vat(o[2*g],o[2*g+1],t,r)<=c&&(n[u++]=a[g]);continue}let p=d+h>>1,v=o[2*p],m=o[2*p+1];vat(v,m,t,r)<=c&&(n[u++]=a[p]),(f===0?t-i<=v:r-i<=m)&&(xl[l++]=d,xl[l++]=p-1,xl[l++]=1-f),(f===0?t+i>=v:r+i>=m)&&(xl[l++]=p+1,xl[l++]=h,xl[l++]=1-f)}return u}};g8=512/zr/2,P3r=class{constructor(e,t,r){this.tileID=e,this.bucketInstanceId=r,this._symbolsByKey={};let i=new Map;for(let n=0;n<t.length;n++){let a=t.get(n),o=a.key,s=i.get(o);s?s.push(a):i.set(o,[a])}for(let[n,a]of i){let o={positions:a.map(s=>({x:Math.floor(s.anchorX*g8),y:Math.floor(s.anchorY*g8)})),crossTileIDs:a.map(s=>s.crossTileID)};if(o.positions.length>128){let s=new L3r(o.positions.length,16,Uint16Array);for(let{x:l,y:u}of o.positions)s.add(l,u);s.finish(),delete o.positions,o.index=s}this._symbolsByKey[n]=o}}getScaledCoordinates(e,t){let{x:r,y:i,z:n}=this.tileID.canonical,{x:a,y:o,z:s}=t.canonical,l=s-n,u=g8/2**l,c=(a*zr+e.anchorX)*u,f=(o*zr+e.anchorY)*u,h=r*zr*g8,d=i*zr*g8;return{x:Math.floor(c-h),y:Math.floor(f-d)}}findMatches(e,t,r){let i=this.tileID.canonical.z<t.canonical.z?1:2**(this.tileID.canonical.z-t.canonical.z);for(let n=0;n<e.length;n++){let a=e.get(n);if(a.crossTileID)continue;let o=this._symbolsByKey[a.key];if(!o)continue;let s=this.getScaledCoordinates(a,t);o.index?this.findMatchesForIndexedEntry(o,a,s,i,r):o.positions&&this.findMatchesForNonIndexedEntry(o,a,s,i,r)}}findMatchesForIndexedEntry(e,t,r,i,n){let a=e.index.range(r.x-i,r.y-i,r.x+i,r.y+i),o=1/0;for(let s of a)s<o&&!n[e.crossTileIDs[s]]&&(o=s);if(o!==1/0){let s=e.crossTileIDs[o];n[s]=!0,t.crossTileID=s}}findMatchesForNonIndexedEntry(e,t,r,i,n){for(let a=0;a<e.positions.length;a++){let o=e.positions[a],s=e.crossTileIDs[a];if(Math.abs(o.x-r.x)<=i&&Math.abs(o.y-r.y)<=i&&!n[s]){n[s]=!0,t.crossTileID=s;break}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:e})=>e)}},I3r=class{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}},R3r=class{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){let t=Math.round((e-this.lng)/360);if(t!==0)for(let r in this.indexes){let i=this.indexes[r],n={};for(let a in i){let o=i[a];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+t),n[o.tileID.key]=o}this.indexes[r]=n}this.lng=e}addBucket(e,t,r){var n,a,o;if((n=this.indexes[e.overscaledZ])!=null&&n[e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===t.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let s=0;s<t.symbolInstances.length;s++){let l=t.symbolInstances.get(s);l.crossTileID=0}(a=this.usedCrossTileIDs)[o=e.overscaledZ]||(a[o]={});let i=this.usedCrossTileIDs[e.overscaledZ];for(let s in this.indexes){let l=this.indexes[s];if(Number(s)>e.overscaledZ)for(let u in l){let c=l[u];c.tileID.isChildOf(e)&&c.findMatches(t.symbolInstances,e,i)}else{let u=l[e.scaledTo(Number(s)).key];u&&u.findMatches(t.symbolInstances,e,i)}}for(let s=0;s<t.symbolInstances.length;s++){let l=t.symbolInstances.get(s);l.crossTileID||(l.crossTileID=r.generate(),i[l.crossTileID]=!0)}return this.indexes[e.overscaledZ]===void 0&&(this.indexes[e.overscaledZ]={}),this.indexes[e.overscaledZ][e.key]=new P3r(e,t.symbolInstances,t.bucketInstanceId),!0}removeBucketCrossTileIDs(e,t){for(let r of t.getCrossTileIDsLists())for(let i of r)delete this.usedCrossTileIDs[e][i]}removeStaleBuckets(e){let t=!1;for(let r in this.indexes){let i=this.indexes[r];for(let n in i)e[i[n].bucketInstanceId]||(this.removeBucketCrossTileIDs(r,i[n]),delete i[n],t=!0)}return t}},Eot=class{constructor(){this.layerIndexes={},this.crossTileIDs=new I3r,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(e,t,r){let i=this.layerIndexes[e.id];i===void 0&&(i=this.layerIndexes[e.id]=new R3r);let n=!1,a={};i.handleWrapJump(r);for(let o of t){let s=o.getBucket(e);e.id===(s==null?void 0:s.layerIds[0])&&(s.bucketInstanceId||(s.bucketInstanceId=(this.maxBucketInstanceId+=1,this.maxBucketInstanceId)),i.addBucket(o.tileID,s,this.crossTileIDs)&&(n=!0),a[s.bucketInstanceId]=!0)}return i.removeStaleBuckets(a)&&(n=!0),n}pruneUnusedLayers(e){let t={};for(let r of e)t[r]=!0;for(let r in this.layerIndexes)t[r]||delete this.layerIndexes[r]}},z3r=`#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
out highp vec4 fragColor;layout(std140) uniform ProjectionUBO {highp mat4 u_projection_matrix;highp mat4 u_projection_fallback_matrix;highp vec4 u_projection_tile_mercator_coords;highp vec4 u_projection_clipping_plane;highp float u_projection_transition;highp int u_projection_clip_antimeridian;};layout(std140) uniform FrameUBO {highp vec2 u_units_to_pixels;highp vec2 u_world_size;highp float u_camera_to_center_distance;highp float u_symbol_fade_change;highp float u_aspect_ratio;highp float u_device_pixel_ratio;highp vec2 u_viewport_size;highp vec2 u_pixel_extrude_scale;highp float u_pitch;};`,B3r=`#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 uint packedOpacity) {return vec2(float(packedOpacity >> 1u)/127.0,float(packedOpacity & 1u));}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;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+ c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+ c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+ c
);}
#ifdef TERRAIN3D
uniform sampler2D u_terrain;uniform highp sampler2D u_depth;layout(std140) uniform TerrainUBO {highp mat4 u_terrain_matrix;highp vec4 u_terrain_unpack;highp float u_terrain_dim;highp float u_terrain_exaggeration;};
#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(texture(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(ivec2 pos) {
#ifdef TERRAIN3D
vec4 rgb=(texelFetch(u_terrain,pos,0)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;
#else
return 0.0;
#endif
}float get_elevation(vec2 pos) {
#ifdef TERRAIN3D
#ifdef GLOBE
if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;}
#endif
vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+2.0;vec2 f=fract(coord);ivec2 c=ivec2(floor(coord));ivec2 hi=textureSize(u_terrain,0)-1;float tl=ele(clamp(c,ivec2(0),hi));float tr=ele(clamp(c+ivec2(1,0),ivec2(0),hi));float bl=ele(clamp(c+ivec2(0,1),ivec2(0),hi));float br=ele(clamp(c+ivec2(1,1),ivec2(0),hi));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;
#else
return 0.0;
#endif
}const float PI=3.141592653589793;
#define PROJECTION_UBO
layout(std140) uniform ProjectionUBO {highp mat4 u_projection_matrix;highp mat4 u_projection_fallback_matrix;highp vec4 u_projection_tile_mercator_coords;highp vec4 u_projection_clipping_plane;highp float u_projection_transition;highp int u_projection_clip_antimeridian;};layout(std140) uniform FrameUBO {highp vec2 u_units_to_pixels;highp vec2 u_world_size;highp float u_camera_to_center_distance;highp float u_symbol_fade_change;highp float u_aspect_ratio;highp float u_device_pixel_ratio;highp vec2 u_viewport_size;highp vec2 u_pixel_extrude_scale;highp float u_pitch;};`,q3r=`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,O3r="layout(location=0) in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}",N3r=`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity;
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,U3r="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;layout(location=0) in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}",V3r=`in vec3 v_data;flat in float v_visibility;
#pragma maplibre: define highp vec4 color
#pragma maplibre: define mediump float radius
#pragma maplibre: define lowp float blur
#pragma maplibre: define lowp float opacity
#pragma maplibre: define highp vec4 stroke_color
#pragma maplibre: define mediump float stroke_width
#pragma maplibre: define lowp float stroke_opacity
void main() {
#pragma maplibre: initialize highp vec4 color
#pragma maplibre: initialize mediump float radius
#pragma maplibre: initialize lowp float blur
#pragma maplibre: initialize lowp float opacity
#pragma maplibre: initialize highp vec4 stroke_color
#pragma maplibre: initialize mediump float stroke_width
#pragma maplibre: initialize lowp float stroke_opacity
vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;}
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,G3r=`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform vec2 u_translate;layout(location=0) in ivec2 a_pos;out vec3 v_data;flat out float v_visibility;
#pragma maplibre: define highp vec4 color
#pragma maplibre: define mediump float radius
#pragma maplibre: define lowp float blur
#pragma maplibre: define lowp float opacity
#pragma maplibre: define highp vec4 stroke_color
#pragma maplibre: define mediump float stroke_width
#pragma maplibre: define lowp float stroke_opacity
void main(void) {
#pragma maplibre: initialize highp vec4 color
#pragma maplibre: initialize mediump float radius
#pragma maplibre: initialize lowp float blur
#pragma maplibre: initialize lowp float opacity
#pragma maplibre: initialize highp vec4 stroke_color
#pragma maplibre: initialize mediump float stroke_width
#pragma maplibre: initialize lowp float stroke_opacity
ivec2 pos_raw=a_pos+32768;vec2 extrude=vec2(pos_raw & 7)/7.0*2.0-1.0;vec2 circle_center=vec2(pos_raw >> 3)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) {
#ifdef GLOBE
vec3 center_vector=projectToSphere(circle_center);
#endif
float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else {
#ifdef GLOBE
vec4 projected_center=interpolateProjection(circle_center,center_vector,ele);
#else
vec4 projected_center=projectTileWithElevation(circle_center,ele);
#endif
corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);}
#ifdef GLOBE
vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);
#else
gl_Position=projectTileWithElevation(corner_position,ele);
#endif
} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`,gat="void main() {fragColor=vec4(1.0);}",tg={prelude:fo(z3r,B3r),projectionMercator:fo(`
void clipAntimeridian() {}`,"float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:fo("in highp float v_projection_tile_x;void clipAntimeridian() {if (u_projection_clip_antimeridian !=0 && (v_projection_tile_x < 0.0 || v_projection_tile_x >=8192.0)) {discard;}}",`#define GLOBE_RADIUS 6371008.8
#ifndef PROJECTION_UBO
uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;
#endif
out highp float v_projection_tile_x;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos
);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float t=exp(PI-(mercator_pos_y*PI*2.0));return (2.0*t)/(t*t+1.0);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY);if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;float spherical_x=mercator_pos.x*PI*2.0+PI;float t=exp(PI-(mercator_pos.y*PI*2.0));float t2=t*t;float denom=t2+1.0;float sin_sy=(t2-1.0)/denom;float cos_sy=(2.0*t)/denom;vec3 pos=vec3(sin(spherical_x)*cos_sy,sin_sy,cos(spherical_x)*cos_sy
);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {v_projection_tile_x=posInTile.x;vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {v_projection_tile_x=posInTile.x;vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:fo(q3r,O3r),backgroundPattern:fo(N3r,U3r),circle:fo(V3r,G3r),clippingMask:fo(gat,"layout(location=0) in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:fo(`uniform highp float u_intensity;in vec2 v_extrude;
#pragma maplibre: define highp float weight
#define GAUSS_COEF 0.3989422804014327
void main() {
#pragma maplibre: initialize highp float weight
float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0);
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;layout(location=0) in ivec2 a_pos;out vec2 v_extrude;
#pragma maplibre: define highp float weight
#pragma maplibre: define mediump float radius
const highp float ZERO=1.0/255.0/16.0;
#define GAUSS_COEF 0.3989422804014327
void main(void) {
#pragma maplibre: initialize highp float weight
#pragma maplibre: initialize mediump float radius
ivec2 pos_raw=a_pos+32768;vec2 unscaled_extrude=vec2(pos_raw & 7)/7.0*2.0-1.0;float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=vec2(pos_raw >> 3);
#ifdef GLOBE
vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0);
#else
gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center));
#endif
}`),heatmapTexture:fo(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(0.0);
#endif
}`,"uniform mat4 u_matrix;layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world_size,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:fo("flat in float v_placed;flat in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","layout(location=0) in vec2 a_anchor_pos;layout(location=1) in vec2 a_placed;layout(location=2) in vec2 a_box_real;flat out float v_placed;flat out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:fo("flat in float v_radius;in vec2 v_extrude;flat in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","layout(location=0) in vec2 a_pos;layout(location=1) in float a_radius;layout(location=2) in vec2 a_flags;flat out float v_radius;out vec2 v_extrude;flat out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:fo(`#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {vec4 data=texelFetch(u_elevation_stops,ivec2(stop,0),0)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else
{l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0));
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,"uniform vec2 u_dimension;layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=2.0/u_dimension;float scale=(u_dimension.x-4.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:fo("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","layout(location=0) in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:fo(gat,`layout(location=0) in vec2 a_pos;void main() {
#ifdef GLOBE
gl_Position=projectTileFor3D(a_pos,0.0);
#else
gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0);
#endif
}`),fill:fo(`#pragma maplibre: define highp vec4 color
#pragma maplibre: define lowp float opacity
void main() {
#pragma maplibre: initialize highp vec4 color
#pragma maplibre: initialize lowp float opacity
fragColor=color*opacity;
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;
#pragma maplibre: define highp vec4 color
#pragma maplibre: define lowp float opacity
void main() {
#pragma maplibre: initialize highp vec4 color
#pragma maplibre: initialize lowp float opacity
if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:fo(`in vec2 v_pos;
#ifdef GLOBE
in float v_depth;
#endif
#pragma maplibre: define highp vec4 outline_color
#pragma maplibre: define lowp float opacity
void main() {
#pragma maplibre: initialize highp vec4 outline_color
#pragma maplibre: initialize lowp float opacity
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity);
#ifdef GLOBE
if (v_depth > 1.0) {discard;}
#endif
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;out vec2 v_pos;
#ifdef GLOBE
out float v_depth;
#endif
#pragma maplibre: define highp vec4 outline_color
#pragma maplibre: define lowp float opacity
void main() {
#pragma maplibre: initialize highp vec4 outline_color
#pragma maplibre: initialize lowp float opacity
if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world_size;
#ifdef GLOBE
v_depth=gl_Position.z/gl_Position.w;
#endif
}`),fillOutlinePattern:fo(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;uniform bool u_sdf_pattern;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos;
#ifdef GLOBE
in float v_depth;
#endif
#pragma maplibre: define lowp float opacity
#pragma maplibre: define highp vec4 color
#pragma maplibre: define lowp vec4 pattern_from
#pragma maplibre: define lowp vec4 pattern_to
void main() {
#pragma maplibre: initialize lowp float opacity
#pragma maplibre: initialize highp vec4 color
#pragma maplibre: initialize mediump vec4 pattern_from
#pragma maplibre: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);if (u_sdf_pattern) {highp float sdf_edge=(256.0-64.0)/256.0;highp float sdf_gamma_a=max(fwidth(color1.a)*0.5,1.0/255.0/16.0);highp float sdf_gamma_b=max(fwidth(color2.a)*0.5,1.0/255.0/16.0);float sdf_alpha_a=smoothstep(sdf_edge-sdf_gamma_a,sdf_edge+sdf_gamma_a,color1.a);float sdf_alpha_b=smoothstep(sdf_edge-sdf_gamma_b,sdf_edge+sdf_gamma_b,color2.a);fragColor=mix(color*sdf_alpha_a,color*sdf_alpha_b,u_fade)*alpha*opacity;} else {fragColor=mix(color1,color2,u_fade)*alpha*opacity;}
#ifdef GLOBE
if (v_depth > 1.0) {discard;}
#endif
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos;
#ifdef GLOBE
out float v_depth;
#endif
#pragma maplibre: define lowp float opacity
#pragma maplibre: define highp vec4 color
#pragma maplibre: define lowp vec4 pattern_from
#pragma maplibre: define lowp vec4 pattern_to
#pragma maplibre: define lowp float pixel_ratio_from
#pragma maplibre: define lowp float pixel_ratio_to
void main() {
#pragma maplibre: initialize lowp float opacity
#pragma maplibre: initialize highp vec4 color
#pragma maplibre: initialize mediump vec4 pattern_from
#pragma maplibre: initialize mediump vec4 pattern_to
#pragma maplibre: initialize lowp float pixel_ratio_from
#pragma maplibre: initialize lowp float pixel_ratio_to
if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world_size;
#ifdef GLOBE
v_depth=gl_Position.z/gl_Position.w;
#endif
}`),fillPattern:fo(`#ifdef GL_ES
precision highp float;
#endif
uniform vec2 u_texsize;uniform float u_fade;uniform bool u_sdf_pattern;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;
#pragma maplibre: define lowp float opacity
#pragma maplibre: define highp vec4 color
#pragma maplibre: define lowp vec4 pattern_from
#pragma maplibre: define lowp vec4 pattern_to
void main() {
#pragma maplibre: initialize lowp float opacity
#pragma maplibre: initialize highp vec4 color
#pragma maplibre: initialize mediump vec4 pattern_from
#pragma maplibre: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);if (u_sdf_pattern) {highp float sdf_edge=(256.0-64.0)/256.0;highp float sdf_gamma_a=max(fwidth(color1.a)*0.5,1.0/255.0/16.0);highp float sdf_gamma_b=max(fwidth(color2.a)*0.5,1.0/255.0/16.0);float sdf_alpha_a=smoothstep(sdf_edge-sdf_gamma_a,sdf_edge+sdf_gamma_a,color1.a);float sdf_alpha_b=smoothstep(sdf_edge-sdf_gamma_b,sdf_edge+sdf_gamma_b,color2.a);fragColor=mix(color*sdf_alpha_a,color*sdf_alpha_b,u_fade)*opacity;} else {fragColor=mix(color1,color2,u_fade)*opacity;}
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;
#pragma maplibre: define lowp float opacity
#pragma maplibre: define highp vec4 color
#pragma maplibre: define lowp vec4 pattern_from
#pragma maplibre: define lowp vec4 pattern_to
#pragma maplibre: define lowp float pixel_ratio_from
#pragma maplibre: define lowp float pixel_ratio_to
void main() {
#pragma maplibre: initialize lowp float opacity
#pragma maplibre: initialize highp vec4 color
#pragma maplibre: initialize mediump vec4 pattern_from
#pragma maplibre: initialize mediump vec4 pattern_to
#pragma maplibre: initialize lowp float pixel_ratio_from
#pragma maplibre: initialize lowp float pixel_ratio_to
if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:fo(`in vec4 v_color;void main() {fragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;layout(location=1) in ivec4 a_normal_ed;
#ifdef TERRAIN3D
layout(location=2) in vec2 a_centroid;
#endif
out vec4 v_color;
#pragma maplibre: define highp float base
#pragma maplibre: define highp float height
#pragma maplibre: define highp vec4 color
void main() {
#pragma maplibre: initialize highp float base
#pragma maplibre: initialize highp float height
#pragma maplibre: initialize highp vec4 color
vec3 normal=vec3(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=float(a_normal_ed.x & 1);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
#ifdef GLOBE
vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
#else
gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
#endif
float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0);
#ifdef GLOBE
mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);
#endif
directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:fo(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting;
#pragma maplibre: define lowp float base
#pragma maplibre: define lowp float height
#pragma maplibre: define lowp vec4 pattern_from
#pragma maplibre: define lowp vec4 pattern_to
#pragma maplibre: define lowp float pixel_ratio_from
#pragma maplibre: define lowp float pixel_ratio_to
void main() {
#pragma maplibre: initialize lowp float base
#pragma maplibre: initialize lowp float height
#pragma maplibre: initialize mediump vec4 pattern_from
#pragma maplibre: initialize mediump vec4 pattern_to
#pragma maplibre: initialize lowp float pixel_ratio_from
#pragma maplibre: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting;
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;layout(location=0) in vec2 a_pos;layout(location=1) in ivec4 a_normal_ed;
#ifdef TERRAIN3D
layout(location=2) in vec2 a_centroid;
#endif
#ifdef GLOBE
out vec3 v_sphere_pos;
#endif
out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting;
#pragma maplibre: define lowp float base
#pragma maplibre: define lowp float height
#pragma maplibre: define lowp vec4 pattern_from
#pragma maplibre: define lowp vec4 pattern_to
#pragma maplibre: define lowp float pixel_ratio_from
#pragma maplibre: define lowp float pixel_ratio_to
void main() {
#pragma maplibre: initialize lowp float base
#pragma maplibre: initialize lowp float height
#pragma maplibre: initialize mediump vec4 pattern_from
#pragma maplibre: initialize mediump vec4 pattern_to
#pragma maplibre: initialize lowp float pixel_ratio_from
#pragma maplibre: 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=vec3(a_normal_ed.xyz);float edgedistance=float(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=float(a_normal_ed.x & 1);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
#ifdef GLOBE
vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
#else
gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
#endif
vec2 pos=a_normal_ed.x==1 && a_normal_ed.y==0 && a_normal_ed.z==16384
? a_pos
: vec2(edgedistance,elevation*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:fo(`#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(ivec2 texel) {vec4 data=texelFetch(u_image,texel,0)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {ivec2 pos=ivec2(gl_FragCoord.xy)+ivec2(1);float tileSize=u_dimension.x-4.0;float a=getElevation(pos+ivec2(-1,-1));float b=getElevation(pos+ivec2(0,-1));float c=getElevation(pos+ivec2(1,-1));float d=getElevation(pos+ivec2(-1,0));float e=getElevation(pos);float f=getElevation(pos+ivec2(1,0));float g=getElevation(pos+ivec2(-1,1));float h=getElevation(pos+ivec2(0,1));float i=getElevation(pos+ivec2(1,1));float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0);
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;layout(location=0) in vec2 a_pos;layout(location=1) in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:fo(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES];
#define PI 3.141592653589793
#define STANDARD 0
#define COMBINED 1
#define IGOR 2
#define MULTIDIRECTIONAL 3
#define BASIC 4
float get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else
{fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else
{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec2 size=vec2(textureSize(u_image,0));vec2 texturePos=(v_pos*(size-2.0)+1.0)/size;vec4 pixel=texture(u_image,texturePos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);}
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:fo(`flat in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;
#ifdef GLOBE
in float v_depth;
#endif
#pragma maplibre: define highp vec4 color
#pragma maplibre: define lowp float blur
#pragma maplibre: define lowp float opacity
void main() {
#pragma maplibre: initialize highp vec4 color
#pragma maplibre: initialize lowp float blur
#pragma maplibre: initialize lowp float opacity
clipAntimeridian();float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);fragColor=color*(alpha*opacity);
#ifdef GLOBE
if (v_depth > 1.0) {discard;}
#endif
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;out vec2 v_normal;flat out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar;
#ifdef GLOBE
out float v_depth;
#endif
#pragma maplibre: define highp vec4 color
#pragma maplibre: define lowp float blur
#pragma maplibre: define lowp float opacity
#pragma maplibre: define mediump float gapwidth
#pragma maplibre: define lowp float offset
#pragma maplibre: define mediump float width
void main() {
#pragma maplibre: initialize highp vec4 color
#pragma maplibre: initialize lowp float blur
#pragma maplibre: initialize lowp float opacity
#pragma maplibre: initialize mediump float gapwidth
#pragma maplibre: initialize lowp float offset
#pragma maplibre: initialize mediump float width
if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);v_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*2.0;vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
#ifdef GLOBE
v_depth=gl_Position.z/gl_Position.w;
#endif
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_width2=vec2(outset,inset);}`),lineGradient:fo(`uniform sampler2D u_image;flat in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv;
#ifdef GLOBE
in float v_depth;
#endif
#pragma maplibre: define lowp float blur
#pragma maplibre: define lowp float opacity
void main() {
#pragma maplibre: initialize lowp float blur
#pragma maplibre: initialize lowp float opacity
clipAntimeridian();float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity);
#ifdef GLOBE
if (v_depth > 1.0) {discard;}
#endif
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;layout(location=2) in float a_uv_x;layout(location=3) in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform float u_image_height;out vec2 v_normal;flat out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;
#ifdef GLOBE
out float v_depth;
#endif
#pragma maplibre: define lowp float blur
#pragma maplibre: define lowp float opacity
#pragma maplibre: define mediump float gapwidth
#pragma maplibre: define lowp float offset
#pragma maplibre: define mediump float width
void main() {
#pragma maplibre: initialize lowp float blur
#pragma maplibre: initialize lowp float opacity
#pragma maplibre: initialize mediump float gapwidth
#pragma maplibre: initialize lowp float offset
#pragma maplibre: initialize mediump float width
if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);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=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
#ifdef GLOBE
v_depth=gl_Position.z/gl_Position.w;
#endif
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_width2=vec2(outset,inset);}`),linePattern:fo(`#ifdef GL_ES
precision highp float;
#endif
uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;flat in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;flat in float v_width;
#ifdef GLOBE
in float v_depth;
#endif
#pragma maplibre: define lowp vec4 pattern_from
#pragma maplibre: define lowp vec4 pattern_to
#pragma maplibre: define lowp float pixel_ratio_from
#pragma maplibre: define lowp float pixel_ratio_to
#pragma maplibre: define lowp float blur
#pragma maplibre: define lowp float opacity
void main() {
#pragma maplibre: initialize mediump vec4 pattern_from
#pragma maplibre: initialize mediump vec4 pattern_to
#pragma maplibre: initialize lowp float pixel_ratio_from
#pragma maplibre: initialize lowp float pixel_ratio_to
#pragma maplibre: initialize lowp float blur
#pragma maplibre: initialize lowp float opacity
clipAntimeridian();vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity;
#ifdef GLOBE
if (v_depth > 1.0) {discard;}
#endif
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;out vec2 v_normal;flat out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;flat out float v_width;
#ifdef GLOBE
out float v_depth;
#endif
#pragma maplibre: define lowp float blur
#pragma maplibre: define lowp float opacity
#pragma maplibre: define lowp float offset
#pragma maplibre: define mediump float gapwidth
#pragma maplibre: define mediump float width
#pragma maplibre: define lowp float floorwidth
#pragma maplibre: define lowp vec4 pattern_from
#pragma maplibre: define lowp vec4 pattern_to
#pragma maplibre: define lowp float pixel_ratio_from
#pragma maplibre: define lowp float pixel_ratio_to
void main() {
#pragma maplibre: initialize lowp float blur
#pragma maplibre: initialize lowp float opacity
#pragma maplibre: initialize lowp float offset
#pragma maplibre: initialize mediump float gapwidth
#pragma maplibre: initialize mediump float width
#pragma maplibre: initialize lowp float floorwidth
#pragma maplibre: initialize mediump vec4 pattern_from
#pragma maplibre: initialize mediump vec4 pattern_to
#pragma maplibre: initialize lowp float pixel_ratio_from
#pragma maplibre: initialize lowp float pixel_ratio_to
if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);float a_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*LINE_DISTANCE_SCALE;vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
#ifdef GLOBE
v_depth=gl_Position.z/gl_Position.w;
#endif
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:fo(`uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;flat in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;
#ifdef GLOBE
in float v_depth;
#endif
#pragma maplibre: define highp vec4 color
#pragma maplibre: define lowp float blur
#pragma maplibre: define lowp float opacity
#pragma maplibre: define mediump float width
#pragma maplibre: define lowp float floorwidth
#pragma maplibre: define mediump vec4 dasharray_from
#pragma maplibre: define mediump vec4 dasharray_to
void main() {
#pragma maplibre: initialize highp vec4 color
#pragma maplibre: initialize lowp float blur
#pragma maplibre: initialize lowp float opacity
#pragma maplibre: initialize mediump float width
#pragma maplibre: initialize lowp float floorwidth
#pragma maplibre: initialize mediump vec4 dasharray_from
#pragma maplibre: initialize mediump vec4 dasharray_to
clipAntimeridian();float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity);
#ifdef GLOBE
if (v_depth > 1.0) {discard;}
#endif
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;flat out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale;
#ifdef GLOBE
out float v_depth;
#endif
#pragma maplibre: define highp vec4 color
#pragma maplibre: define lowp float blur
#pragma maplibre: define lowp float opacity
#pragma maplibre: define mediump float gapwidth
#pragma maplibre: define lowp float offset
#pragma maplibre: define mediump float width
#pragma maplibre: define lowp float floorwidth
#pragma maplibre: define mediump vec4 dasharray_from
#pragma maplibre: define mediump vec4 dasharray_to
void main() {
#pragma maplibre: initialize highp vec4 color
#pragma maplibre: initialize lowp float blur
#pragma maplibre: initialize lowp float opacity
#pragma maplibre: initialize mediump float gapwidth
#pragma maplibre: initialize lowp float offset
#pragma maplibre: initialize mediump float width
#pragma maplibre: initialize lowp float floorwidth
#pragma maplibre: initialize mediump vec4 dasharray_from
#pragma maplibre: initialize mediump vec4 dasharray_to
if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);float a_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*LINE_DISTANCE_SCALE;vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
#ifdef GLOBE
v_depth=gl_Position.z/gl_Position.w;
#endif
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),lineGradientSDF:fo(`uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;flat in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv;
#ifdef GLOBE
in float v_depth;
#endif
#pragma maplibre: define lowp float blur
#pragma maplibre: define lowp float opacity
#pragma maplibre: define mediump float width
#pragma maplibre: define lowp float floorwidth
#pragma maplibre: define mediump vec4 dasharray_from
#pragma maplibre: define mediump vec4 dasharray_to
void main() {
#pragma maplibre: initialize lowp float blur
#pragma maplibre: initialize lowp float opacity
#pragma maplibre: initialize mediump float width
#pragma maplibre: initialize lowp float floorwidth
#pragma maplibre: initialize mediump vec4 dasharray_from
#pragma maplibre: initialize mediump vec4 dasharray_to
clipAntimeridian();float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity);
#ifdef GLOBE
if (v_depth > 1.0) {discard;}
#endif
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
layout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;layout(location=2) in float a_uv_x;layout(location=3) in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;flat out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b;
#ifdef GLOBE
out float v_depth;
#endif
#pragma maplibre: define lowp float blur
#pragma maplibre: define lowp float opacity
#pragma maplibre: define mediump float gapwidth
#pragma maplibre: define lowp float offset
#pragma maplibre: define mediump float width
#pragma maplibre: define lowp float floorwidth
#pragma maplibre: define mediump vec4 dasharray_from
#pragma maplibre: define mediump vec4 dasharray_to
void main() {
#pragma maplibre: initialize lowp float blur
#pragma maplibre: initialize lowp float opacity
#pragma maplibre: initialize mediump float gapwidth
#pragma maplibre: initialize lowp float offset
#pragma maplibre: initialize mediump float width
#pragma maplibre: initialize lowp float floorwidth
#pragma maplibre: initialize mediump vec4 dasharray_from
#pragma maplibre: initialize mediump vec4 dasharray_to
if (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);float a_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*LINE_DISTANCE_SCALE;float texel_height=1.0/u_image_height;float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
#ifdef GLOBE
v_depth=gl_Position.z/gl_Position.w;
#endif
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),layerOpacity:fo(`uniform sampler2D u_image;uniform float u_opacity;in vec2 v_pos;void main() {fragColor=texture(u_image,v_pos)*u_opacity;
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(0.0);
#endif
}`,"layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=vec4(a_pos.x*2.0-1.0,1.0-a_pos.y*2.0,0.0,1.0);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),raster:fo(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec3 v_pos0;in vec3 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture(u_image0,v_pos0.xy/v_pos0.z);vec4 color1=texture(u_image1,v_pos1.xy/v_pos1.z);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec3 u_image_warp;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;layout(location=0) in vec2 a_pos;out vec3 v_pos0;out vec3 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 topLeft=u_coords_top.xy;vec2 topRight=u_coords_top.zw;vec2 bottomLeft=u_coords_bottom.xy;vec2 bottomRight=u_coords_bottom.zw;vec2 bilinearPos=mix(mix(topLeft,topRight,fractionalPos.x),mix(bottomLeft,bottomRight,fractionalPos.x),fractionalPos.y);float denominator=dot(u_image_warp.xy,fractionalPos)+1.0;vec2 acrossTop=topRight-topLeft+u_image_warp.x*topRight;vec2 downLeft=bottomLeft-topLeft+u_image_warp.y*bottomLeft;vec2 projectivePos=(acrossTop*fractionalPos.x+downLeft*fractionalPos.y+topLeft)/denominator;vec2 position=mix(projectivePos,bilinearPos,u_image_warp.z);gl_Position=projectTile(position,position);vec2 texturePos=((fractionalPos-0.5)/u_buffer_scale)+0.5;
#ifdef GLOBE
if (a_pos.y <-32767.5) {texturePos.y=0.0;}if (a_pos.y > 32766.5) {texturePos.y=1.0;}
#endif
float perspectiveRatio=mix(1.0/denominator,1.0,u_image_warp.z);v_pos0=vec3(texturePos*perspectiveRatio,perspectiveRatio);vec2 parentPos=(texturePos*u_scale_parent)+u_tl_parent;v_pos1=vec3(parentPos*perspectiveRatio,perspectiveRatio);}`),symbolIcon:fo(`uniform sampler2D u_texture;in vec2 v_tex;flat in float v_total_opacity;void main() {fragColor=texture(u_texture,v_tex)*v_total_opacity;
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`layout(location=0) in vec4 a_pos_offset;layout(location=1) in uvec4 a_data;layout(location=2) in vec4 a_pixeloffset;layout(location=3) in vec3 a_projected_pos;layout(location=4) in uint a_fade_opacity;layout(location=5) in float a_height_offset;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 bool u_rotate_symbol;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;uniform bool u_is_offset;uniform bool u_height_anchor_ground;out vec2 v_tex;flat out float v_total_opacity;
#pragma maplibre: define lowp float opacity
void main() {
#pragma maplibre: initialize lowp float opacity
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=vec2(a_data.xy);vec2 a_size=vec2(a_data.zw);float a_size_min=float(a_data.z >> 1u);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=a_height_offset+(u_height_anchor_ground ? get_elevation(a_pos) : 0.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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_symbol_fade_change :-u_symbol_fade_change;float visibility=calculate_visibility(projectedPoint);v_total_opacity=opacity*max(0.0,min(visibility,fade_opacity[0]+fade_change));if (v_total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);if (!u_is_offset) {size*=perspective_ratio;}float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
#ifdef GLOBE
if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
#endif
vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;}`),symbolSDF:fo(`#define SDF_PX 8.0
uniform bool u_is_halo;uniform bool u_is_plain;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1;
#pragma maplibre: define highp vec4 fill_color
#pragma maplibre: define highp vec4 halo_color
#pragma maplibre: define lowp float halo_width
#pragma maplibre: define lowp float halo_blur
void main() {
#pragma maplibre: initialize highp vec4 fill_color
#pragma maplibre: initialize highp vec4 halo_color
#pragma maplibre: initialize lowp float halo_width
#pragma maplibre: initialize lowp float halo_blur
float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float total_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out_text,color_alpha_out_halo;if (u_is_plain){highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);color_alpha_out_text=total_opacity*alpha*fill_color;}if (u_is_halo) {float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);float inner_edge_halo=inner_edge+gamma_halo*gamma_scale;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(inner_edge_halo-gamma_scaled_halo,inner_edge_halo+gamma_scaled_halo,dist);highp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha_halo= min(smoothstep(halo_edge-gamma_scaled_halo,halo_edge+gamma_scaled_halo,dist),1.0-alpha_halo);color_alpha_out_halo=total_opacity*alpha_halo*halo_color;}if (u_is_plain && u_is_halo) {fragColor=color_alpha_out_text+(1.-color_alpha_out_text.a)*color_alpha_out_halo;} else if (u_is_halo){fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out_text;}
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`layout(location=0) in vec4 a_pos_offset;layout(location=1) in uvec4 a_data;layout(location=2) in vec4 a_pixeloffset;layout(location=3) in vec3 a_projected_pos;layout(location=4) in uint a_fade_opacity;layout(location=5) in float a_height_offset;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform bool u_rotate_symbol;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;uniform bool u_is_offset;uniform bool u_height_anchor_ground;out vec2 v_data0;out vec3 v_data1;
#pragma maplibre: define highp vec4 fill_color
#pragma maplibre: define highp vec4 halo_color
#pragma maplibre: define lowp float opacity
#pragma maplibre: define lowp float halo_width
#pragma maplibre: define lowp float halo_blur
void main() {
#pragma maplibre: initialize highp vec4 fill_color
#pragma maplibre: initialize highp vec4 halo_color
#pragma maplibre: initialize lowp float opacity
#pragma maplibre: initialize lowp float halo_width
#pragma maplibre: initialize lowp float halo_blur
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=vec2(a_data.xy);vec2 a_size=vec2(a_data.zw);float a_size_min=float(a_data.z >> 1u);vec2 a_pxoffset=a_pixeloffset.xy/16.0;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=a_height_offset+(u_height_anchor_ground ? get_elevation(a_pos) : 0.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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_symbol_fade_change :-u_symbol_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);if (!u_is_offset) {size*=perspective_ratio;}float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
#ifdef GLOBE
if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
#endif
vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,total_opacity);}`),symbolTextAndIcon:fo(`#define SDF_PX 8.0
#define SDF 1.0
#define ICON 0.0
uniform bool u_is_halo;uniform bool u_is_text;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;in vec4 v_data0;in vec3 v_data1;flat in float v_is_sdf;
#pragma maplibre: define highp vec4 fill_color
#pragma maplibre: define highp vec4 halo_color
#pragma maplibre: define lowp float halo_width
#pragma maplibre: define lowp float halo_blur
void main() {
#pragma maplibre: initialize highp vec4 fill_color
#pragma maplibre: initialize highp vec4 halo_color
#pragma maplibre: initialize lowp float halo_width
#pragma maplibre: initialize lowp float halo_blur
float total_opacity=v_data1[2];if (v_is_sdf==ICON) {vec2 tex_icon=v_data0.zw;fragColor=texture(u_texture_icon,tex_icon)*total_opacity;
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out,color_alpha_out_halo;if (u_is_text) {highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);color_alpha_out=fill_color*(alpha*total_opacity);}if (u_is_halo) {highp float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);lowp float buff_halo=(6.0-halo_width/fontScale)/SDF_PX;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(buff_halo-gamma_scaled_halo,buff_halo+gamma_scaled_halo,dist);color_alpha_out_halo=halo_color*(alpha_halo*total_opacity);}if (u_is_text && u_is_halo) {fragColor=color_alpha_out+(1.-color_alpha_out.a)*color_alpha_out_halo;} else if (u_is_halo) {fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out;}
#ifdef OVERDRAW_INSPECTOR
fragColor=vec4(1.0);
#endif
}`,`layout(location=0) in vec4 a_pos_offset;layout(location=1) in uvec4 a_data;layout(location=2) in vec3 a_projected_pos;layout(location=3) in uint a_fade_opacity;layout(location=4) in float a_height_offset;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_rotate_symbol;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;uniform bool u_is_offset;uniform bool u_height_anchor_ground;out vec4 v_data0;out vec3 v_data1;flat out float v_is_sdf;
#pragma maplibre: define highp vec4 fill_color
#pragma maplibre: define highp vec4 halo_color
#pragma maplibre: define lowp float opacity
#pragma maplibre: define lowp float halo_width
#pragma maplibre: define lowp float halo_blur
void main() {
#pragma maplibre: initialize highp vec4 fill_color
#pragma maplibre: initialize highp vec4 halo_color
#pragma maplibre: initialize lowp float opacity
#pragma maplibre: initialize lowp float halo_width
#pragma maplibre: initialize lowp float halo_blur
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=vec2(a_data.xy);vec2 a_size=vec2(a_data.zw);float a_size_min=float(a_data.z >> 1u);float is_sdf=float(a_data.z & 1u);float ele=a_height_offset+(u_height_anchor_ground ? get_elevation(a_pos) : 0.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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_symbol_fade_change :-u_symbol_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);if (!u_is_offset) {size*=perspective_ratio;}float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
#ifdef GLOBE
if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
#endif
vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec3(gamma_scale,size,total_opacity);v_is_sdf=is_sdf;}`),terrain:fo("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && u_fog_ground_blend_opacity > 0.0 && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","layout(location=0) in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:fo("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","layout(location=0) in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),atmosphere:fo(`#ifdef GL_ES
precision highp float;
#endif
in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758
);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"layout(location=0) in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:fo("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;uniform vec3 u_globe_position;uniform float u_globe_radius;in vec3 v_view_direction;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (u_sky_blend > 0.0) {vec3 ray=normalize(v_view_direction);float globe_distance=length(u_globe_position);float angle_to_globe_center=acos(clamp(dot(ray,u_globe_position)/globe_distance,-1.0,1.0));float horizon_angle=asin(min(u_globe_radius/globe_distance,1.0));blend=mix(blend,(angle_to_globe_center-horizon_angle)*u_camera_to_center_distance*u_device_pixel_ratio,u_sky_blend);}if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","layout(location=0) in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 v_view_direction;void main() {v_view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,1.0,1.0);}")};kot="#define PROJECTION_MERCATOR",Cot="mercator",uae=class{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return Cot}get shaderDefine(){return kot}get shaderPreludeCode(){return tg.projectionMercator}get vertexShaderPreludeCode(){return tg.projectionMercator.vertexSource}get subdivisionGranularity(){return VB.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}destroy(){}getMeshFromTileID(e,t,r,i,n){if(this._cachedMesh)return this._cachedMesh;let a=new Pm;a.emplaceBack(0,0),a.emplaceBack(zr,0),a.emplaceBack(0,zr),a.emplaceBack(zr,zr);let o=e.createVertexBuffer(a,l3.members),s=Ws.simpleSegment(0,0,4,2),l=new Mv;l.emplaceBack(1,0,2),l.emplaceBack(1,2,3);let u=e.createIndexBuffer(l);return this._cachedMesh=new M8(o,u,s),this._cachedMesh}recalculate(){}hasTransition(){return!1}},cae=class Dot{constructor(t=0,r=0,i=0,n=0){if(isNaN(t)||t<0||isNaN(r)||r<0||isNaN(i)||i<0||isNaN(n)||n<0)throw Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=r,this.left=i,this.right=n}interpolate(t,r,i){return r.top!=null&&t.top!=null&&(this.top=$s.number(t.top,r.top,i)),r.bottom!=null&&t.bottom!=null&&(this.bottom=$s.number(t.bottom,r.bottom,i)),r.left!=null&&t.left!=null&&(this.left=$s.number(t.left,r.left,i)),r.right!=null&&t.right!=null&&(this.right=$s.number(t.right,r.right,i)),this}getCenter(t,r){let i=Jn((this.left+t-this.right)/2,0,t),n=Jn((this.top+r-this.bottom)/2,0,r);return new tr(i,n)}equals(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right}clone(){return new Dot(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}};Fae=class{constructor(e,t){var r;this.applyConstrain=(i,n)=>this._constrainOverride===null?this._callbacks.defaultConstrain(i,n):this._constrainOverride(i,n),this._callbacks=e,this._tileSize=512,this._renderWorldCopies=(t==null?void 0:t.renderWorldCopies)===void 0||!!(t!=null&&t.renderWorldCopies),this._minZoom=(t==null?void 0:t.minZoom)||0,this._maxZoom=(t==null?void 0:t.maxZoom)||22,this._minPitch=(t==null?void 0:t.minPitch)===void 0||(t==null?void 0:t.minPitch)===null?0:t==null?void 0:t.minPitch,this._maxPitch=(t==null?void 0:t.maxPitch)===void 0||(t==null?void 0:t.maxPitch)===null?60:t==null?void 0:t.maxPitch,this._constrainOverride=(r=t==null?void 0:t.constrainOverride)!=null?r:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new mn(0,0),this._elevation=0,this._zoom=0,this._tileZoom=mat(this._zoom),this._scale=If(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new cae,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(e,t,r){this._constrainOverride=e.constrainOverride,this._latRange=e.latRange,this._lngRange=e.lngRange,this._width=e.width,this._height=e.height,this._center=e.center,this._elevation=e.elevation,this._minElevationForCurrentTile=e.minElevationForCurrentTile,this._zoom=e.zoom,this._tileZoom=mat(this._zoom),this._scale=If(this._zoom),this._bearingInRadians=e.bearingInRadians,this._fovInRadians=e.fovInRadians,this._pitchInRadians=e.pitchInRadians,this._rollInRadians=e.rollInRadians,this._unmodified=e.unmodified,this._edgeInsets=new cae(e.padding.top,e.padding.bottom,e.padding.left,e.padding.right),this._minZoom=e.minZoom,this._maxZoom=e.maxZoom,this._minPitch=e.minPitch,this._maxPitch=e.maxPitch,this._renderWorldCopies=e.renderWorldCopies,this._cameraToCenterDistance=e.cameraToCenterDistance,this._nearZ=e.nearZ,this._farZ=e.farZ,this._autoCalculateNearFarZ=!r&&e.autoCalculateNearFarZ,t&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(e){this._minElevationForCurrentTile=e}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(e){if(this._minZoom===e)return;this._minZoom=e;let t=this._unmodified;this.setZoom(this.applyConstrain(this._center,this.zoom).zoom),this._unmodified=t}get maxZoom(){return this._maxZoom}setMaxZoom(e){if(this._maxZoom===e)return;this._maxZoom=e;let t=this._unmodified;this.setZoom(this.applyConstrain(this._center,this.zoom).zoom),this._unmodified=t}get minPitch(){return this._minPitch}setMinPitch(e){if(this._minPitch===e)return;this._minPitch=e;let t=this._unmodified;this.setPitch(Math.max(this.pitch,e)),this._unmodified=t}get maxPitch(){return this._maxPitch}setMaxPitch(e){if(this._maxPitch===e)return;this._maxPitch=e;let t=this._unmodified;this.setPitch(Math.min(this.pitch,e)),this._unmodified=t}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){e===void 0?e=!0:e===null&&(e=!1),this._renderWorldCopies=e}get constrainOverride(){return this._constrainOverride}setConstrainOverride(e){e===void 0&&(e=null),this._constrainOverride!==e&&(this._constrainOverride=e,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new tr(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){let t=B0(e,-180,180)*Math.PI/180;this._bearingInRadians!==t&&(this._unmodified=!1,this._bearingInRadians=t,this._calcMatrices(),this._rotationMatrix=Yat(),P_r(this._rotationMatrix,this._rotationMatrix,-this._bearingInRadians))}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){let t=Jn(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==t&&(this._unmodified=!1,this._pitchInRadians=t,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(e){let t=e/180*Math.PI;this._rollInRadians!==t&&(this._unmodified=!1,this._rollInRadians=t,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return yv(this._fovInRadians)}setFov(e){e=Jn(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=js(e),this._calcMatrices())}get zoom(){return this._zoom}setZoom(e){let t=this.applyConstrain(this._center,e).zoom;this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this._tileZoom=Math.max(0,Math.floor(t)),this._scale=If(t),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(e){(e.lat!==this._center.lat||e.lng!==this._center.lng)&&(this._unmodified=!1,this._center=e,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(e){e!==this._elevation&&(this._elevation=e,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(e,t){this._autoCalculateNearFarZ=!1,this._nearZ=e,this._farZ=t,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,t,r){this._unmodified=!1,this._edgeInsets.interpolate(e,t,r),this.constrainInternal(),this._calcMatrices()}resize(e,t,r=!0){this._width=e,this._height=t,r&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var e,t;return((e=this._latRange)==null?void 0:e.length)!==2||((t=this._lngRange)==null?void 0:t.length)!==2?null:new Ev([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(e){e?(this._lngRange=[e.getWest(),e.getEast()],this._latRange=[e.getSouth(),e.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-Tv,Tv])}getCameraQueryGeometry(e,t){if(t.length===1)return[t[0],e];{let{minX:r,minY:i,maxX:n,maxY:a}=Jd.fromPoints(t).extend(e);return[new tr(r,i),new tr(n,i),new tr(n,a),new tr(r,a),new tr(r,i)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let e=this._unmodified,{center:t,zoom:r}=this.applyConstrain(this.center,this.zoom);this.setCenter(t),this.setZoom(r),this._unmodified=e,this._constraining=!1}_calcMatrices(){if(this._pixelPerMeter=rx(1,this.center.lat)*this.worldSize,!this._width||!this._height)return;this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=Qd(new Float64Array(16));Rc(e,e,[this._width/2,-this._height/2,1]),eu(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=Qd(new Float64Array(16)),Rc(e,e,[1,-1,1]),eu(e,e,[-1,-1,0]),Rc(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e;let t=this.fovInRadians/2;this._cameraToCenterDistance=.5/Math.tan(t)*this._height,this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(e,t,r,i){let n=r===void 0?this.bearing:r,a=i=i===void 0?this.pitch:i,{distanceToCenter:o,clampedElevation:s}=this._distanceToCenterFromAltElevationPitch(t,this.elevation,a),{x:l,y:u}=jB(a,n),c=wo.fromLngLat(e,t),f=one(1,c.y),h,d,p=0;do{if(p+=1,p>10)break;d=o/f;let v=l*d,m=u*d;h=new wo(c.x+v,c.y+m),f=1/h.meterInMercatorCoordinateUnits()}while(Math.abs(o-d*f)>1e-12);return{center:h.toLngLat(),elevation:s,zoom:zc(this.height/2/Math.tan(this.fovInRadians/2)/d/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e===0)return;let t=1/this.worldSize,r=rx(1,this.center.lat)*this.worldSize,i=wo.fromLngLat(this.center,this.elevation),n=i.x/t,a=i.y/t,o=i.z/t,s=this.pitch,l=this.bearing,{x:u,y:c,z:f}=jB(s,l),h=this.cameraToCenterDistance,d=n+h*-u,p=a+h*-c,v=o+h*f,{distanceToCenter:m,clampedElevation:g}=this._distanceToCenterFromAltElevationPitch(v/r,e,s),w=m*r,b=d+u*w,_=p+c*w,M=new wo(b*t,_*t,0).toLngLat(),x=rx(1,M.lat),T=zc(this.height/2/Math.tan(this.fovInRadians/2)/m/x/this.tileSize);this._elevation=g,this._center=M,this.setZoom(T)}_distanceToCenterFromAltElevationPitch(e,t,r){let i=-Math.cos(js(r)),n=e-t,a,o=t;return i*n>=0||Math.abs(i)<.1?(a=1e4,o=e+a*i):a=-n/i,{distanceToCenter:a,clampedElevation:o}}getCameraPoint(){let e=this.pitchInRadians,t=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new tr(t*Math.sin(this.rollInRadians),t*Math.cos(this.rollInRadians)))}getMercatorTileCoordinates(e){if(!e)return[0,0,1,1];let t=e.canonical.z>=0?1<<e.canonical.z:2**e.canonical.z;return[e.canonical.x/t,e.canonical.y/t,1/t/zr,1/t/zr]}},H3r=class{distanceToTile2d(e,t,r,i){let n=i,a=n.distanceX([e,t]),o=n.distanceY([e,t]);return Math.hypot(a,o)}getWrap(e,t,r){return r}getTileBoundingVolume(e,t,r,i){var s,l;let n=Math.min(0,r),a=Math.max(0,r);if(i!=null&&i.terrain){let u=new Bc(e.z,t,e.z,e.x,e.y),c=i.terrain.getMinMaxElevation(u);n=(s=c.minElevation)!=null?s:n,a=(l=c.maxElevation)!=null?l:a}let o=1<<e.z;return new Aae([t+e.x/o,e.y/o,n],[t+(e.x+1)/o,(e.y+1)/o,a])}allowVariableZoom(e,t){let r=e.fov*(Math.abs(Math.cos(e.rollInRadians))*e.height+Math.abs(Math.sin(e.rollInRadians))*e.width)/e.height,i=Jn(78.5-r/2,0,60);return!!t.terrain||e.pitch>i}allowWorldCopies(){return!0}prepareNextFrame(){}},j3r=ol([{name:"a_pos3d",type:"Int16",components:3}]),$3r=class extends mu{constructor(e){super(),this._lastTilesetChange=Oo(),this.tileManager=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=e._source.tileSize*2**this.deltaZoom,e.usedForTerrain=!0,e.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null,this.releaseAllRTT()}getSource(){return this.tileManager._source}update(e,t){this.tileManager.update(e,t),this._renderableTilesKeys=[];let r={},i=!1;for(let n of ZT(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:t,calculateTileZoom:this.tileManager._source.calculateTileZoom}))r[n.key]=!0,this._renderableTilesKeys.push(n.key),this._tiles[n.key]||(n.terrainRttPosMatrix32f=new Float32Array(16),wv(n.terrainRttPosMatrix32f,0,zr,zr,0,0,1),this._tiles[n.key]=new yot(n,this.tileSize),this._lastTilesetChange=Oo(),i=!0);for(let n in this._tiles)r[n]||(this._tiles[n].releaseRTT(this.tileManager.map.painter),delete this._tiles[n],i=!0);return i}releaseRTT(e){for(let t in this._tiles){let r=this._tiles[t];(r.tileID.equals(e)||r.tileID.isChildOf(e)||e.isChildOf(r.tileID))&&r.releaseRTT(this.tileManager.map.painter)}}releaseAllRTT(){for(let e in this._tiles)this._tiles[e].releaseRTT(this.tileManager.map.painter)}getRenderableTiles(){return this._renderableTilesKeys.map(e=>this.getTileByID(e))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,t){return t?this._getTerrainCoordsForTileRanges(e,t):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){let t={};for(let r of this._renderableTilesKeys){let i=this._tiles[r].tileID,n=e.clone(),a=Q2();if(i.canonical.equals(e.canonical))wv(a,0,zr,zr,0,0,1);else if(i.canonical.isChildOf(e.canonical)){let o=i.canonical.z-e.canonical.z,s=i.canonical.x-(i.canonical.x>>o<<o),l=i.canonical.y-(i.canonical.y>>o<<o),u=zr>>o;wv(a,0,u,u,0,0,1),eu(a,a,[-s*u,-l*u,0])}else if(e.canonical.isChildOf(i.canonical)){let o=e.canonical.z-i.canonical.z,s=e.canonical.x-(e.canonical.x>>o<<o),l=e.canonical.y-(e.canonical.y>>o<<o),u=zr>>o;wv(a,0,zr,zr,0,0,1),eu(a,a,[s*u,l*u,0]),Rc(a,a,[1/2**o,1/2**o,0])}else continue;n.terrainRttPosMatrix32f=new Float32Array(a),t[r]=n}return t}_getTerrainCoordsForTileRanges(e,t){let r={};for(let i of this._renderableTilesKeys){let n=this._tiles[i].tileID;if(!this._isWithinTileRanges(n,t))continue;let a=e.clone(),o=Q2();if(n.canonical.z===e.canonical.z){let s=e.canonical.x-n.canonical.x+e.wrap*(1<<e.canonical.z),l=e.canonical.y-n.canonical.y;wv(o,0,zr,zr,0,0,1),eu(o,o,[s*zr,l*zr,0])}else if(n.canonical.z>e.canonical.z){let s=n.canonical.z-e.canonical.z,l=n.canonical.x-(n.canonical.x>>s<<s)+e.wrap*(1<<n.canonical.z),u=n.canonical.y-(n.canonical.y>>s<<s),c=e.canonical.x-(n.canonical.x>>s),f=e.canonical.y-(n.canonical.y>>s),h=zr>>s;wv(o,0,h,h,0,0,1),eu(o,o,[-l*h+c*zr,-u*h+f*zr,0])}else{let s=e.canonical.z-n.canonical.z,l=e.canonical.x-(e.canonical.x>>s<<s)+e.wrap*(1<<e.canonical.z),u=e.canonical.y-(e.canonical.y>>s<<s),c=(e.canonical.x>>s)-n.canonical.x,f=(e.canonical.y>>s)-n.canonical.y,h=zr<<s;wv(o,0,h,h,0,0,1),eu(o,o,[l*zr+c*h,u*zr+f*h,0])}a.terrainRttPosMatrix32f=new Float32Array(o),r[i]=a}return r}getSourceTile(e,t){var a,o;let r=this.tileManager._source,i=e.overscaledZ-this.deltaZoom;if(i>r.maxzoom&&(i=r.maxzoom),i<r.minzoom)return;(a=this._sourceTileCache)[o=e.key]||(a[o]=e.scaledTo(i).key);let n=this.findTileInCaches(this._sourceTileCache[e.key]);if(!(n!=null&&n.dem)&&t)for(;i>=r.minzoom&&!(n!=null&&n.dem);)n=this.findTileInCaches(e.scaledTo(i--).key);return n}findTileInCaches(e){let t=this.tileManager.getTileByID(e);return t||(t=this.tileManager._outOfViewCache.getByKey(e),t)}anyTilesAfterTime(e=Oo()){return this._lastTilesetChange>=e}_isWithinTileRanges(e,t){let r=t[e.canonical.z];return!!r&&(e.wrap>r.minWrap||e.wrap<r.maxWrap||e.canonical.x>=r.minTileXWrapped&&e.canonical.x<=r.maxTileXWrapped&&e.canonical.y>=r.minTileY&&e.canonical.y<=r.maxTileY)}},yat=zr*(1-1e-12),W3r=class{constructor(e,t,r,i="auto"){this._meshCache={},this.painter=e,this.tileManager=new $3r(t),this.options=r,this.exaggeration=typeof r.exaggeration=="number"?r.exaggeration:1,this._terrainSkirtLength=i,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache=new Map,this._elevationSamplerCache=new Map}destroy(){this._fbo&&(this._fbo=(this._fbo.destroy(),null)),this._fboDepthTexture&&(this._fboDepthTexture=(this._fboDepthTexture.destroy(),null)),this._emptyDemTexture&&(this._emptyDemTexture=(this._emptyDemTexture.destroy(),null)),this._emptyDepthTexture&&(this._emptyDepthTexture=(this._emptyDepthTexture.destroy(),null));for(let e in this._meshCache)this._meshCache[e].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(e,t,r,i=zr){let n=e.normalizeCoordinates(t,r,i);if(!n)return 0;let a=this.getElevationSampler(n.tileID);return a?a(n.x,n.y,i):0}getElevationForLngLatZoom(e,t){if(!gne(t,e.wrap()))return 0;let{tileID:r,mercatorX:i,mercatorY:n}=this._getOverscaledTileIDFromLngLatZoom(e,t);return this.getElevation(r,i%zr,n%zr,zr)}getElevationForLngLat(e,t){let r=this.getCoverageIndex();if(r){let a=wo.fromLngLat(e),o=Lae(r,this.exaggeration,a.x,a.y);if(o.demLoaded)return o.elevation}let i=ZT(t,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),n=0;for(let a of i)a.canonical.z>n&&(n=Math.min(a.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(e,n)}getElevation(e,t,r,i=zr){return this.getDEMElevation(e,t,r,i)*this.exaggeration}resetElevationCache(){this._elevationSamplerCache.clear(),this._coverageIndex=void 0}getCoverageIndex(){return this._coverageIndex===void 0&&(this._coverageIndex=this._buildCoverageIndex()),this._coverageIndex}_buildCoverageIndex(){let e=[],t=new Map,r=0,i=0;for(let n of this.tileManager.getRenderableTiles()){if(!n)continue;let{canonical:a,wrap:o}=n.tileID;e.includes(a.z)||e.push(a.z);let s=this.getElevationSampler(n.tileID);t.set(`${o}/${a.z}/${a.x}/${a.y}`,s);let{minElevation:l,maxElevation:u}=this.getMinMaxElevation(n.tileID);r=Math.min(r,l!=null?l:0),i=Math.max(i,u!=null?u:0)}return t.size===0?null:(e.sort((n,a)=>a-n),{zooms:e,samplerPerTile:t,minElevation:r-10,maxElevation:i+10})}getElevationSampler(e){let t=e.key,r=this._elevationSamplerCache.get(t);if(r)return r;let i=this.tileManager.getSourceTile(e,!0),n=i==null?void 0:i.dem;if(!i||!n)return null;let a=this._getDEMTileMatrix(e,i),o=a[0]*n.dim,s=a[5]*n.dim,l=a[12]*n.dim,u=a[13]*n.dim,c=(f,h,d)=>{let p=d===8192?1:zr/d;return n.sampleBilinear(f*p*o+l,h*p*s+u)};return this._elevationSamplerCache.set(t,c),c}_getDEMTileMatrix(e,t){let r=`${t.tileID.key}/${e.key}`,i=this._demMatrixCache.get(r);if(i)return i;let n=this.tileManager.getSource().maxzoom,a=e.canonical.z-t.tileID.canonical.z;e.overscaledZ>e.canonical.z&&(e.canonical.z>=n?a=e.canonical.z-n:Ma("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let o=e.canonical.x-(e.canonical.x>>a<<a),s=e.canonical.y-(e.canonical.y>>a<<a),l=Let(new Float64Array(16),[1/(zr<<a),1/(zr<<a),0]);return eu(l,l,[o*zr,s*zr,0]),this._demMatrixCache.set(r,l),l}getTerrainData(e){var i,n;if(!this._emptyDemTexture){let a=this.painter.context,o=new As({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new vu(a,o,a.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new vu(a,new As({width:1,height:1}),a.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(a.gl.NEAREST,a.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=Qd([])}let t=this.tileManager.getSourceTile(e,!0);if(t!=null&&t.dem&&(!t.demTexture||t.needsTerrainPrepare)){let a=this.painter.context;t.demTexture||(t.demTexture=this.painter.getTileTexture(t.dem.stride)),t.demTexture?t.demTexture.update(t.dem.getPixels(),{premultiply:!1}):t.demTexture=new vu(a,t.dem.getPixels(),a.gl.RGBA,{premultiply:!1}),t.demTexture.bind(a.gl.NEAREST,a.gl.CLAMP_TO_EDGE),t.needsTerrainPrepare=!1}let r=t?this._getDEMTileMatrix(e,t):this._emptyDemMatrix;return{u_depth:2,u_terrain:3,u_terrain_dim:((i=t==null?void 0:t.dem)==null?void 0:i.dim)||1,u_terrain_matrix:r,u_terrain_unpack:((n=t==null?void 0:t.dem)==null?void 0:n.getUnpackVector())||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:((t==null?void 0:t.demTexture)||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:t}}getFramebuffer(){let e=this.painter,t=e.width/devicePixelRatio,r=e.height/devicePixelRatio;return this._fbo&&(this._fbo.width!==t||this._fbo.height!==r)&&(this._fbo.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture),this._fboDepthTexture||(this._fboDepthTexture=new vu(e.context,{width:t,height:r,data:null},e.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(e.context.gl.NEAREST,e.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=e.context.createFramebuffer(t,r,!0,!1),this._fbo.depthAttachment.set(e.context.createRenderbuffer(e.context.gl.DEPTH_COMPONENT16,t,r))),this._fbo.colorAttachment.set(this._fboDepthTexture.texture),this._fbo}depthAtPoint(e){let t=new Uint8Array(4),r=this.painter.context,i=r.gl;return r.bindFramebuffer.set(this.getFramebuffer().framebuffer),i.readPixels(e.x,this.painter.height/devicePixelRatio-e.y-1,1,1,i.RGBA,i.UNSIGNED_BYTE,t),r.bindFramebuffer.set(null),(t[0]/16777216+t[1]/65536+t[2]/256+t[3])/256}getTerrainMesh(e){var h;let t=((h=this.painter.style.projection)==null?void 0:h.transitionState)>0,r=t&&e.canonical.y===0,i=t&&e.canonical.y===(1<<e.canonical.z)-1,n=`m_${r?"n":""}_${i?"s":""}`;if(this._meshCache[n])return this._meshCache[n];let a=this.painter.context,o=new $rt,s=new Mv,l=this.meshSize,u=zr/l,c=l*l;for(let d=0;d<=l;d++)for(let p=0;p<=l;p++)o.emplaceBack(p*u,d*u,0);for(let d=0;d<c;d+=l+1)for(let p=0;p<l;p++)s.emplaceBack(p+d,l+p+d+1,l+p+d+2),s.emplaceBack(p+d,l+p+d+2,p+d+1);this._terrainSkirtLength!=="none"&&this._buildSkirts(o,s,l,u,r,i);let f=new M8(a.createVertexBuffer(o,j3r.members),a.createIndexBuffer(s),Ws.simpleSegment(0,0,o.length,s.length));return this._meshCache[n]=f,f}getSkirtLength(e){return 2*Math.PI*zf/2**Math.max(e,0)/5}getMinTileElevationForLngLatZoom(e,t){var i;if(!gne(t,e.wrap()))return 0;let{tileID:r}=this._getOverscaledTileIDFromLngLatZoom(e,t);return(i=this.getMinMaxElevation(r).minElevation)!=null?i:0}getMinMaxElevation(e){let t=this.tileManager.getSourceTile(e,!0),r={minElevation:null,maxElevation:null};return t!=null&&t.dem&&(r.minElevation=t.dem.min*this.exaggeration,r.maxElevation=t.dem.max*this.exaggeration),r}_getOverscaledTileIDFromLngLatZoom(e,t){let r=wo.fromLngLat(e.wrap()),i=(1<<t)*zr,n=r.x*i,a=r.y*i,o=Math.floor(n/zr),s=Math.floor(a/zr);return{tileID:new Bc(t,0,t,o,s),mercatorX:n,mercatorY:a}}_buildSkirts(e,t,r,i,n,a){let o=e.length,s=o+(r+1),l=(r+1)*r,u=n?xT:0,c=+!n,f=a?_T:zr,h=+!a;for(let v=0;v<=r;v++)e.emplaceBack(v*i,u,c);for(let v=0;v<=r;v++)e.emplaceBack(v*i,f,h);for(let v=0;v<r;v++)t.emplaceBack(l+v,s+v,s+v+1),t.emplaceBack(l+v,s+v+1,l+v+1),t.emplaceBack(0+v,o+v+1,o+v),t.emplaceBack(0+v,0+v+1,o+v+1);let d=e.length,p=d+(r+1)*2;for(let v of[0,1])for(let m=0;m<=r;m++)for(let g of[0,1])e.emplaceBack(v*zr,m*i,g);for(let v=0;v<r*2;v+=2)t.emplaceBack(d+v,d+v+1,d+v+3),t.emplaceBack(d+v,d+v+3,d+v+2),t.emplaceBack(p+v,p+v+3,p+v+1),t.emplaceBack(p+v,p+v+2,p+v+3)}},xat={covered:!1,demLoaded:!1,elevation:0};Tq=class Pot{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(t){this._helper.setMinZoom(t)}setMaxZoom(t){this._helper.setMaxZoom(t)}setMinPitch(t){this._helper.setMinPitch(t)}setMaxPitch(t){this._helper.setMaxPitch(t)}setRenderWorldCopies(t){this._helper.setRenderWorldCopies(t)}setBearing(t){this._helper.setBearing(t)}setPitch(t){this._helper.setPitch(t)}setRoll(t){this._helper.setRoll(t)}setFov(t){this._helper.setFov(t)}setZoom(t){this._helper.setZoom(t)}setCenter(t){this._helper.setCenter(t)}setElevation(t){this._helper.setElevation(t)}setMinElevationForCurrentTile(t){this._helper.setMinElevationForCurrentTile(t)}setPadding(t){this._helper.setPadding(t)}interpolatePadding(t,r,i){this._helper.interpolatePadding(t,r,i)}isPaddingEqual(t){return this._helper.isPaddingEqual(t)}resize(t,r,i=!0){this._helper.resize(t,r,i)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(t){this._helper.setMaxBounds(t)}setConstrainOverride(t){this._helper.setConstrainOverride(t)}overrideNearFarZ(t,r){this._helper.overrideNearFarZ(t,r)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(t){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),t)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(t){}constructor(t){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(r,i)=>{i=Jn(+i,this.minZoom,this.maxZoom);let n={center:new mn(r.lng,r.lat),zoom:i},a=this._helper._lngRange;!this._helper._renderWorldCopies&&a===null&&(a=[-179.9999999999,180-1e-10]);let o=this.tileSize*If(n.zoom),s=0,l=o,u=0,c=o,f=0,h=0,{x:d,y:p}=this.size;if(this._helper._latRange){let _=this._helper._latRange;s=t3(_[1])*o,l=t3(_[0])*o,l-s<p&&(f=p/(l-s))}a&&(u=B0(e3(a[0])*o,0,o),c=B0(e3(a[1])*o,0,o),c<u&&(c+=o),c-u<d&&(h=d/(c-u)));let{x:v,y:m}=Sv(o,r),g,w,b=Math.max(h||0,f||0);if(b){let _=new tr(h?(c+u)/2:v,f?(l+s)/2:m);return n.center=NT(o,_).wrap(),n.zoom+=zc(b),n}if(this._helper._latRange){let _=p/2;m-_<s&&(w=s+_),m+_>l&&(w=l-_)}if(a){let _=(u+c)/2,M=v;this._helper._renderWorldCopies&&(M=B0(v,_-o/2,_+o/2));let x=d/2;M-x<u&&(g=u+x),M+x>c&&(g=c-x)}if(g!==void 0||w!==void 0){let _=new tr(g!=null?g:v,w!=null?w:m);n.center=NT(o,_).wrap()}return n},this.applyConstrain=(r,i)=>this._helper.applyConstrain(r,i),this._helper=new Fae({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(r,i)=>this.defaultConstrain(r,i)},t),this._coveringTilesDetailsProvider=new H3r}clone(){let t=new Pot;return t.apply(this,!1),t}apply(t,r,i){this._helper.apply(t,r,i)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(t){let r=[new u8(0,t)];if(this._helper._renderWorldCopies){let i=this.screenPointToMercatorCoordinate(new tr(0,0)),n=this.screenPointToMercatorCoordinate(new tr(this._helper._width,0)),a=this.screenPointToMercatorCoordinate(new tr(this._helper._width,this._helper._height)),o=this.screenPointToMercatorCoordinate(new tr(0,this._helper._height)),s=Math.floor(Math.min(i.x,n.x,a.x,o.x)),l=Math.floor(Math.max(i.x,n.x,a.x,o.x));for(let u=s-1;u<=l+1;u++)u!==0&&r.push(new u8(u,t))}return r}getCameraFrustum(){return Mae.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(t){let r=this.screenPointToLocation(this.centerPoint,t),i=t?t.getElevationForLngLat(r,this):0;this._helper.recalculateZoomAndCenter(i)}setLocationAtPoint(t,r,i=this.elevation){let n=i-this.elevation,a=this.screenPointToMercatorCoordinateAtZ(r,n),o=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,0),s=wo.fromLngLat(t),l=new wo(s.x-(a.x-o.x),s.y-(a.y-o.y));this.setCenter(l==null?void 0:l.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(t,r){return r?this.coordinatePoint(wo.fromLngLat(t),r.getElevationForLngLat(t,this),this._pixelMatrix3D):this.coordinatePoint(wo.fromLngLat(t))}screenPointToLocation(t,r){var i;return(i=this.screenPointToMercatorCoordinate(t,r))==null?void 0:i.toLngLat()}screenPointToLocationAtElevation(t,r){var i;return(i=this.screenPointToMercatorCoordinateAtZ(t,r-this.elevation))==null?void 0:i.toLngLat()}screenPointToMercatorCoordinate(t,r){if(r){let i=this.screenTerrainPointToMercatorCoordinate(t,r);if(i!=null)return i}return this.screenPointToMercatorCoordinateAtZ(t)}screenTerrainPointToMercatorCoordinate(t,r){let i=r.getCoverageIndex();if(!i)return null;let{near:n,far:a}=this.getRaySegmentFromPixel(t),o=this.worldSize,s=a[0]-n[0],l=a[1]-n[1],u=a[2]-n[2],c={index:i,exaggeration:r.exaggeration,near:n,dx:s,dy:l,dz:u,worldSize:o},f=0,h=1;if(u===0){if(n[2]>i.maxElevation||n[2]<i.minElevation)return null}else{let g=(i.maxElevation-n[2])/u,w=(i.minElevation-n[2])/u;if(f=Math.max(f,Math.min(g,w)),h=Math.min(h,Math.max(g,w)),f>h)return null}let d=Math.hypot(s,l),p=Jn(Math.ceil(d*(h-f)/4),1,512),v=0,m=!aq(c,0);for(let g=0;g<=p;g++){let w=f+(h-f)*g/p;if(!m)m=!aq(c,w);else if(aq(c,w)){let{lo:b,hi:_}=Lot(c,aq,v,w,.001/d),M=yq(c,b),x=yq(c,_),T=n[2]+b*u-M.elevation,A=n[2]+_*u-x.elevation,y=M.covered&&T>A?Jn(b+T*(_-b)/(T-A),b,_):_;return new wo((n[0]+y*s)/o,(n[1]+y*l)/o,yq(c,y).elevation)}v=w}return null}getRaySegmentFromPixel(t){let r=[t.x,t.y,0,1],i=[t.x,t.y,1,1];Uu(r,r,this._pixelMatrixInverse),Uu(i,i,this._pixelMatrixInverse);let n=r[3],a=i[3],o=this.elevation;return{near:[r[0]/n,r[1]/n,r[2]/n+o],far:[i[0]/a,i[1]/a,i[2]/a+o]}}screenPointToMercatorCoordinateAtZ(t,r){let i=r||0,{near:n,far:a}=this.getRaySegmentFromPixel(t),o=n[2]===a[2]?0:(i+this.elevation-n[2])/(a[2]-n[2]);return new wo($s.number(n[0],a[0],o)/this.worldSize,$s.number(n[1],a[1],o)/this.worldSize,i)}coordinatePoint(t,r=0,i=this._pixelMatrix){let n=[t.x*this.worldSize,t.y*this.worldSize,r,1];return Uu(n,n,i),new tr(n[0]/n[3],n[1]/n[3])}getBounds(){let t=Math.max(0,this._helper._height/2-UT(this));return new Ev().extend(this.screenPointToLocation(new tr(0,t))).extend(this.screenPointToLocation(new tr(this._helper._width,t))).extend(this.screenPointToLocation(new tr(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new tr(0,this._helper._height)))}isPointOnMapSurface(t,r){return r?this.screenTerrainPointToMercatorCoordinate(t,r)!=null:t.y>this.height/2-UT(this)}calculatePosMatrix(t,r=!1,i=!1){var l;let n=(l=t.key)!=null?l:Vb(t.wrap,t.canonical.z,t.canonical.z,t.canonical.x,t.canonical.y),a=r?this._alignedPosMatrixCache:this._posMatrixCache;if(a.has(n)){let u=a.get(n);return i?u.f32:u.f64}let o=HB(t,this.worldSize);Yb(o,r?this._alignedProjMatrix:this._viewProjMatrix,o);let s={f64:o,f32:new Float32Array(o)};return a.set(n,s),i?s.f32:s.f64}calculateFogMatrix(t){let r=t.key,i=this._fogMatrixCacheF32;if(i.has(r))return i.get(r);let n=HB(t,this.worldSize);return Yb(n,this._fogMatrix,n),i.set(r,new Float32Array(n)),i.get(r)}calculateCenterFromCameraLngLatAlt(t,r,i,n){return this._helper.calculateCenterFromCameraLngLatAlt(t,r,i,n)}calculateCameraOptionsFromTo(t,r,i,n){let a=wo.fromLngLat(t,r),o=wo.fromLngLat(i,n),s=o.x-a.x,l=o.y-a.y,u=o.z-a.z,c=Math.hypot(s,l,u);if(c===0)throw Error("Can't calculate camera options with same From and To");let f=Math.hypot(s,l),h=zc(this.cameraToCenterDistance/c/this.tileSize),d=yv(Math.atan2(s,-l)),p=yv(Math.acos(f/c));return p=u<0?90-p:90+p,{center:o.toLngLat(),elevation:n,zoom:h,pitch:p,bearing:d}}_calculateNearFarZIfNeeded(t,r,i){if(!this._helper.autoCalculateNearFarZ)return;let n=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),a=t-n*this._helper._pixelPerMeter/Math.cos(r),o=n<0?a:t,s=Math.PI/2+this.pitchInRadians,l=js(this.fov)*(Math.abs(Math.cos(js(this.roll)))*this.height+Math.abs(Math.sin(js(this.roll)))*this.width)/this.height*(.5+i.y/this.height),u=Math.sin(l)*o/Math.sin(Jn(Math.PI-s-l,.01,Math.PI-.01)),c=UT(this),f=Math.atan(c/this._helper.cameraToCenterDistance),h=js(90-ix),d=f>h?2*f*(.5+i.y/(c*2)):h,p=Math.sin(d)*o/Math.sin(Jn(Math.PI-s-d,.01,Math.PI-.01)),v=Math.min(u,p);this._helper._farZ=(Math.cos(Math.PI/2-r)*v+o)*1.01,this._helper._nearZ=this._helper._height/50}_calcMatrices(){let t=this.centerOffset,r=Sv(this.worldSize,this.center),i=r.x,n=r.y,a=js(Math.min(this.pitch,ix)),o=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(a));this._calculateNearFarZIfNeeded(o,a,t);let s;s=new Float64Array(16),oB(s,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),h3r(this._invProjMatrix,s),s[8]=-t.x*2/this._helper._width,s[9]=t.y*2/this._helper._height,this._projectionMatrix=aB(s),Rc(s,s,[1,-1,1]),eu(s,s,[0,0,-this._helper.cameraToCenterDistance]),km(s,s,-this.rollInRadians),Xb(s,s,this.pitchInRadians),km(s,s,-this.bearingInRadians),eu(s,s,[-i,-n,0]),this._mercatorMatrix=Rc([],s,[this.worldSize,this.worldSize,this.worldSize]),Rc(s,s,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=Yb(new Float64Array(16),this.clipSpaceToPixelsMatrix,s),eu(s,s,[0,0,-this.elevation]),this._viewProjMatrix=s,this._invViewProjMatrix=Bk([],s);let l=[0,0,-1,1];Uu(l,l,this._invViewProjMatrix),this._cameraPosition=[l[0]/l[3],l[1]/l[3],l[2]/l[3]],this._fogMatrix=new Float64Array(16),oB(this._fogMatrix,this.fovInRadians,this.width/this.height,o,this._helper._farZ),this._fogMatrix[8]=-t.x*2/this.width,this._fogMatrix[9]=t.y*2/this.height,Rc(this._fogMatrix,this._fogMatrix,[1,-1,1]),eu(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),km(this._fogMatrix,this._fogMatrix,-this.rollInRadians),Xb(this._fogMatrix,this._fogMatrix,this.pitchInRadians),km(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),eu(this._fogMatrix,this._fogMatrix,[-i,-n,0]),Rc(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),eu(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=Yb(new Float64Array(16),this.clipSpaceToPixelsMatrix,s);let u=this._helper._width%2/2,c=this._helper._height%2/2,f=Math.cos(this.bearingInRadians),h=Math.sin(-this.bearingInRadians),d=i-Math.round(i)+f*u+h*c,p=n-Math.round(n)+f*c+h*u,v=new Float64Array(s);if(eu(v,v,[d>.5?d-1:d,p>.5?p-1:p,0]),this._alignedProjMatrix=v,s=Bk(new Float64Array(16),this._pixelMatrix),!s)throw Error("failed to invert matrix");this._pixelMatrixInverse=s,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let t=this.screenPointToMercatorCoordinate(new tr(0,0)),r=[t.x*this.worldSize,t.y*this.worldSize,0,1];return Uu(r,r,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this.cameraToCenterDistance/this.pixelsPerMeter+this.elevation}getCameraLngLat(){let t=rx(1,this.center.lat)*this.worldSize,r=this._helper.cameraToCenterDistance/t;return lne(this.center,this.elevation,this.pitch,this.bearing,r).toLngLat()}lngLatToCameraDepth(t,r){let i=wo.fromLngLat(t),n=[i.x*this.worldSize,i.y*this.worldSize,r,1];return Uu(n,n,this._viewProjMatrix),n[2]/n[3]}getProjectionData(t){let{overscaledTileID:r,aligned:i,applyTerrainMatrix:n}=t,a=this._helper.getMercatorTileCoordinates(r),o=r?this.calculatePosMatrix(r,i,!0):null,s;return s=r!=null&&r.terrainRttPosMatrix32f&&n?r.terrainRttPosMatrix32f:o||xie(),{mainMatrix:s,tileMercatorCoords:a,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:s,clipAntimeridian:!1}}isLocationOccluded(t){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(t,r,i){return 1}transformLightDirection(t){return sB(t)}getRayDirectionFromPixel(t){throw Error("Not implemented.")}projectTileCoordinates(t,r,i,n){let a=this.calculatePosMatrix(i),o;n==null?(o=[t,r,0,1],Dae(o,o,a)):(o=[t,r,n,1],Uu(o,o,a));let s=o[3];return{point:new tr(o[0]/s,o[1]/s),signedDistanceFromCamera:s,isOccluded:!1}}populateCache(t){for(let r of t)this.calculatePosMatrix(r)}getProjectionDataForCustomLayer(t=!0){let r=new Bc(0,0,0,0,0),i=this.getProjectionData({overscaledTileID:r,applyGlobeMatrix:t}),n=HB(r,this.worldSize);Yb(n,this._viewProjMatrix,n);let a=[zr,zr,this.worldSize/this._helper.pixelsPerMeter],o=Q2();return Rc(o,n,a),ma(fn({},i),{tileMercatorCoords:[0,0,1,1],fallbackMatrix:o,mainMatrix:o})}getFastPathSimpleProjectionMatrix(t){return this.calculatePosMatrix(t)}};Aq=class{get useGlobeControls(){return!1}handlePanInertia(e,t){let r=e.mag(),i=Math.abs(UT(t));return{easingOffset:e.mult(Math.min(i*.75/r,1)),easingCenter:t.center}}handleMapControlsRollPitchBearingZoom(e,t){e.bearingDelta&&t.setBearing(t.bearing+e.bearingDelta),e.pitchDelta&&t.setPitch(t.pitch+e.pitchDelta),e.rollDelta&&t.setRoll(t.roll+e.rollDelta),e.zoomDelta&&t.setZoom(t.zoom+e.zoomDelta)}handleMapControlsPan(e,t,r){e.around.distSqr(t.centerPoint)<.01||t.setLocationAtPoint(r,e.around,e.aroundElevation)}cameraForBoxAndBearing(e,t,r,i,n){return zot(e,t,r,i,n)}handleJumpToCenterZoom(e,t){let r=t.zoom===void 0?e.zoom:+t.zoom;e.zoom!==r&&e.setZoom(+t.zoom),t.center!==void 0&&e.setCenter(mn.convert(t.center))}handleEaseTo(e,t){let r=e.zoom,i=e.padding,n={roll:e.roll,pitch:e.pitch,bearing:e.bearing},a={roll:t.roll===void 0?e.roll:t.roll,pitch:t.pitch===void 0?e.pitch:t.pitch,bearing:t.bearing===void 0?e.bearing:t.bearing},o=t.zoom!==void 0,s=!e.isPaddingEqual(t.padding),l=!1,u=o?+t.zoom:e.zoom,c=e.centerPoint.add(t.offsetAsPoint),f=e.screenPointToLocation(c),{center:h,zoom:d}=e.applyConstrain(mn.convert(t.center||f),u!=null?u:r);wq(e,h);let p=Sv(e.worldSize,f),v=Sv(e.worldSize,h).sub(p),m=If(d-r);return l=d!==r,{easeFunc:g=>{if(l&&e.setZoom($s.number(r,d,g)),wie(n,a)||Rot({startEulerAngles:n,endEulerAngles:a,tr:e,k:g,useSlerp:n.roll!=a.roll}),s&&(e.interpolatePadding(i,t.padding,g),c=e.centerPoint.add(t.offsetAsPoint)),t.around)e.setLocationAtPoint(t.around,t.aroundPoint);else{let w=If(e.zoom-r),b=(d>r?Math.min(2,m):Math.max(.5,m))**(1-g),_=NT(e.worldSize,p.add(v.mult(g*b)).mult(w));e.setLocationAtPoint(e.renderWorldCopies?_.wrap():_,c)}},isZooming:l,elevationCenter:h}}handleFlyTo(e,t){let r=t.zoom!==void 0,i=e.zoom,n=e.applyConstrain(mn.convert(t.center||t.locationAtOffset),r?+t.zoom:i),a=n.center,o=n.zoom;wq(e,a);let s=e.worldSize,l=Sv(s,t.locationAtOffset),u=Sv(s,a).sub(l),c=u.mag(),f=If(o-i),h=t.minZoom===void 0?e.minZoom:+t.minZoom,d=Math.max(h,e.minZoom),p=Math.min(d,i,o),v=e.applyConstrain(a,p).zoom;return{easeFunc:(m,g,w,b)=>{e.setZoom(m===1?o:i+zc(g));let _=m===1?a:NT(s,l.add(u.mult(w)));e.setLocationAtPoint(e.renderWorldCopies?_.wrap():_,b)},scaleOfZoom:f,targetCenter:a,scaleOfMinZoom:If(v-i),pixelPathLength:c}}},X3r=()=>Y3r||(Y3r=new uc({type:new Fi(_r.projection.type,"type")})),qne=new VB({fill:new W1(128,2),line:new W1(512,0),tile:new W1(128,32),stencil:new W1(128,1),circle:3}),Bot=class{constructor(){this._tileMeshCache={}}get name(){return"vertical-perspective"}get transitionState(){return 1}get useSubdivision(){return!0}get shaderVariantName(){return"globe"}get shaderDefine(){return"#define GLOBE"}get shaderPreludeCode(){return tg.projectionGlobe}get vertexShaderPreludeCode(){return tg.projectionMercator.vertexSource}get subdivisionGranularity(){return qne}get useGlobeControls(){return!0}destroy(){}_getMeshKey(e){return`${e.granularity.toString(36)}_${e.generateBorders?"b":""}${e.extendToNorthPole?"n":""}${e.extendToSouthPole?"s":""}`}getMeshFromTileID(e,t,r,i,n){let a=(n==="stencil"?qne.stencil:qne.tile).getGranularityForZoomLevel(t.z),o=t.y===0&&i,s=t.y===(1<<t.z)-1&&i;return this._getMesh(e,{granularity:a,generateBorders:r,extendToNorthPole:o,extendToSouthPole:s})}_getMesh(e,t){let r=this._getMeshKey(t);if(r in this._tileMeshCache)return this._tileMeshCache[r];let i=fot(e,t);return this._tileMeshCache[r]=i,i}recalculate(e){}hasTransition(){return!1}},_at=class extends mu{constructor(e,t){super(),this._transitionable=new Jk(X3r(),"projection",t),this.setProjection(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new Co(0)),this._mercatorProjection=new uae,this._verticalPerspectiveProjection=new Bot}get transitionState(){let e=this.properties.get("type");if(typeof e=="string"&&e==="mercator")return 0;if(typeof e=="string"&&e==="vertical-perspective")return 1;if(e instanceof Lm){if(e.from===e.to)return e.from==="mercator"?0:1;if(e.from==="vertical-perspective"&&e.to==="mercator")return 1-e.transition;if(e.from==="mercator"&&e.to==="vertical-perspective")return e.transition}return 1}get useGlobeRendering(){return this.transitionState>0}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}getMeshFromTileID(e,t,r,i,n){return this.currentProjection.getMeshFromTileID(e,t,r,i,n)}setProjection(e){this._transitionable.setValue("type",(e==null?void 0:e.type)||"mercator")}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}};One=Math.PI*.98;swr=class{constructor(e){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=e}swapBuffers(){if(!this._hadAnyChanges)return;let e=this._cachePrevious;this._cachePrevious=this._cache,this._cache=e,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(e,t,r,i){let n=`${e.z}_${e.x}_${e.y}_${i!=null&&i.terrain?"t":""}_${Math.round(r)}`,a=this._cache.get(n);if(a)return a;let o=this._cachePrevious.get(n);if(o)return this._cache.set(n,o),o;let s=this._boundingVolumeFactory(e,t,r,i);return this._cache.set(n,s),this._hadAnyChanges=!0,s}},Une=class fae{constructor(t,r,i,n){this.min=i,this.max=n,this.points=t,this.planes=r}static fromAabb(t,r){let i=[];for(let n=0;n<8;n++)i.push([(n>>0&1)==1?r[0]:t[0],(n>>1&1)==1?r[1]:t[1],(n>>2&1)==1?r[2]:t[2]]);return new fae(i,[[-1,0,0,r[0]],[1,0,0,-t[0]],[0,-1,0,r[1]],[0,1,0,-t[1]],[0,0,-1,r[2]],[0,0,1,-t[2]]],t,r)}static fromCenterSizeAngles(t,r,i){let n=cB([],i[0],i[1],i[2]),a=lB([],[r[0],0,0],n),o=lB([],[0,r[1],0],n),s=lB([],[0,0,r[2]],n),l=[...t],u=[...t];for(let f=0;f<8;f++)for(let h=0;h<3;h++){let d=t[h]+a[h]*((f>>0&1)==1?1:-1)+o[h]*((f>>1&1)==1?1:-1)+s[h]*((f>>2&1)==1?1:-1);l[h]=Math.min(l[h],d),u[h]=Math.max(u[h],d)}let c=[];for(let f=0;f<8;f++){let h=[...t];R0(h,h,Ps([],a,(f>>0&1)==1?1:-1)),R0(h,h,Ps([],o,(f>>1&1)==1?1:-1)),R0(h,h,Ps([],s,(f>>2&1)==1?1:-1)),c.push(h)}return new fae(c,[[...a,-gu(a,c[0])],[...o,-gu(o,c[0])],[...s,-gu(s,c[0])],[-a[0],-a[1],-a[2],-gu(a,c[7])],[-o[0],-o[1],-o[2],-gu(o,c[7])],[-s[0],-s[1],-s[2],-gu(s,c[7])]],l,u)}intersectsFrustum(t){let r=!0,i=this.points.length,n=this.planes.length,a=t.planes.length,o=t.points.length;for(let s=0;s<a;s++){let l=t.planes[s],u=0;for(let c=0;c<i;c++){let f=this.points[c];l[0]*f[0]+l[1]*f[1]+l[2]*f[2]+l[3]>=0&&u++}if(u===0)return 0;u<i&&(r=!1)}if(r)return 2;for(let s=0;s<n;s++){let l=this.planes[s],u=0;for(let c=0;c<o;c++){let f=t.points[c];l[0]*f[0]+l[1]*f[1]+l[2]*f[2]+l[3]>=0&&u++}if(u===0)return 0}return 1}intersectsPlane(t){let r=this.points.length,i=0;for(let n=0;n<r;n++){let a=this.points[n];t[0]*a[0]+t[1]*a[1]+t[2]*a[2]+t[3]>=0&&i++}return i===r?2:i===0?0:1}};lwr=class{constructor(){this._boundingVolumeCache=new swr(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(e,t,r,i){let n=1<<r.z,a=1/n,o=r.x/n,s=r.y/n,l=.5,u=2;return u=Math.min(u,Vne(e,t,o,s,a)),u=Math.min(u,Vne(e,t,o+l,-s-a,a)),u=Math.min(u,Vne(e,t,o+l,2-s-a,a)),u}getWrap(e,t,r){let i=1<<t.z,n=1/i,a=t.x/i,o=xq(e.x,a,n),s=xq(e.x,a-1,n),l=xq(e.x,a+1,n),u=Math.min(o,s,l);return u===l?1:u===s?-1:0}allowVariableZoom(e,t){return Sae(e,t)>4}allowWorldCopies(){return!1}getTileBoundingVolume(e,t,r,i){return this._boundingVolumeCache.getTileBoundingVolume(e,t,r,i)}_computeTileBoundingVolume(e,t,r,i){var o,s;let n=Math.min(0,r),a=Math.max(0,r);if(i!=null&&i.terrain){let l=new Bc(e.z,t,e.z,e.x,e.y),u=i.terrain.getMinMaxElevation(l);n=(o=u.minElevation)!=null?o:n,a=Math.max((s=u.maxElevation)!=null?s:a,a)}if(n/=zf,a/=zf,n+=1,a+=1,e.z<=0)return Une.fromAabb([-a,-a,-a],[a,a,a]);if(e.z===1)return Une.fromAabb([e.x===0?-a:0,e.y===0?0:-a,-a],[e.x===0?0:a,e.y===0?a:0,a]);{let l=[nx(0,0,e.x,e.y,e.z),nx(zr,0,e.x,e.y,e.z),nx(zr,zr,e.x,e.y,e.z),nx(0,zr,e.x,e.y,e.z)],u=[];for(let E of l)u.push(Ps([],E,a));if(a!==n)for(let E of l)u.push(Ps([],E,n));e.y===0&&u.push([0,1,0]),e.y===(1<<e.z)-1&&u.push([0,-1,0]);let c=[1,1,1],f=[-1,-1,-1];for(let E of u)for(let S=0;S<3;S++)c[S]=Math.min(c[S],E[S]),f[S]=Math.max(f[S],E[S]);let h=nx(zr/2,zr/2,e.x,e.y,e.z),d=uh([],[0,1,0],h);Pf(d,d);let p=uh([],h,d);Pf(p,p);let v=uh([],l[2],l[1]);Pf(v,v);let m=uh([],l[0],l[3]);Pf(m,m),u.push(Ps([],h,a)),e.y>=(1<<e.z)/2&&u.push(Ps([],nx(zr/2,0,e.x,e.y,e.z),a)),e.y<(1<<e.z)/2&&u.push(Ps([],nx(zr/2,zr,e.x,e.y,e.z),a));let g=Tat(h,u),w=Tat(p,u),b=[-h[0],-h[1],-h[2],g.max],_=[h[0],h[1],h[2],-g.min],M=[-p[0],-p[1],-p[2],w.max],x=[p[0],p[1],p[2],-w.min],T=[...v,0],A=[...m,0],y=[];return e.y===0?y.push(z0(A,T,b),z0(A,T,_)):y.push(z0(M,T,b),z0(M,T,_),z0(M,A,b),z0(M,A,_)),e.y===(1<<e.z)-1?y.push(z0(A,T,b),z0(A,T,_)):y.push(z0(x,T,b),z0(x,T,_),z0(x,A,b),z0(x,A,_)),new Une(y,[b,_,M,x,T,A],c,f)}}};Aat=1e-12,Not=class Uot{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(t){this._helper.setMinZoom(t)}setMaxZoom(t){this._helper.setMaxZoom(t)}setMinPitch(t){this._helper.setMinPitch(t)}setMaxPitch(t){this._helper.setMaxPitch(t)}setRenderWorldCopies(t){this._helper.setRenderWorldCopies(t)}setBearing(t){this._helper.setBearing(t)}setPitch(t){this._helper.setPitch(t)}setRoll(t){this._helper.setRoll(t)}setFov(t){this._helper.setFov(t)}setZoom(t){this._helper.setZoom(t)}setCenter(t){this._helper.setCenter(t)}setElevation(t){this._helper.setElevation(t)}setMinElevationForCurrentTile(t){this._helper.setMinElevationForCurrentTile(t)}setPadding(t){this._helper.setPadding(t)}interpolatePadding(t,r,i){this._helper.interpolatePadding(t,r,i)}isPaddingEqual(t){return this._helper.isPaddingEqual(t)}resize(t,r){this._helper.resize(t,r)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(t){this._helper.setMaxBounds(t)}setConstrainOverride(t){this._helper.setConstrainOverride(t)}overrideNearFarZ(t,r){this._helper.overrideNearFarZ(t,r)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(t){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),t)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(t){}constructor(t){this._cachedClippingPlane=Cm(),this._projectionMatrix=Nk(),this._globeViewProjMatrix32f=xie(),this._globeViewProjMatrixF64=Nk(),this._globeViewProjMatrixF64Inverted=Nk(),this._globeProjMatrixInverted=Nk(),this._cameraPosition=Do(),this.defaultConstrain=(r,i)=>{let n=Jn(r.lat,-Tv,Tv),a=Jn(+i,this.minZoom+qc(0,n),this.maxZoom);return{center:new mn(r.lng,n),zoom:a}},this.applyConstrain=(r,i)=>this._helper.applyConstrain(r,i),this._helper=new Fae({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(r,i)=>this.defaultConstrain(r,i)},t),this._coveringTilesDetailsProvider=new lwr}clone(){let t=new Uot;return t.apply(this,!1),t}apply(t,r){this._helper.apply(t,r)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixF64}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let t=Do();return t[0]=this._cameraPosition[0],t[1]=this._cameraPosition[1],t[2]=this._cameraPosition[2],t}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(t){let{overscaledTileID:r,applyGlobeMatrix:i}=t,n=this._helper.getMercatorTileCoordinates(r);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:n,clippingPlane:this._cachedClippingPlane,projectionTransition:+!!i,fallbackMatrix:this._globeViewProjMatrix32f,clipAntimeridian:(r==null?void 0:r.canonical.z)===0}}_computeClippingPlane(t){let r=this.pitchInRadians,i=this.cameraToCenterDistance/t,n=Math.sin(r)*i,a=Math.cos(r)*i+1,o=1/Math.sqrt(n*n+a*a)*1,s=-n,l=a,u=Math.sqrt(s*s+l*l);s/=u,l/=u;let c=[0,s,l];uB(c,c,[0,0,0],-this.bearingInRadians),PT(c,c,[0,0,0],-1*this.center.lat*Math.PI/180),Zb(c,c,[0,0,0],this.center.lng*Math.PI/180);let f=1/K1(c);return Ps(c,c,f),[...c,-o*f]}isLocationOccluded(t){return!this.isSurfacePointVisible(Vu(t))}transformLightDirection(t){let r=this._helper._center.lng*Math.PI/180,i=this._helper._center.lat*Math.PI/180,n=Math.cos(i),a=[Math.sin(r)*n,Math.sin(i),Math.cos(r)*n],o=[a[2],0,-a[0]],s=[0,0,0];uh(s,o,a),Pf(o,o),Pf(s,s);let l=[o[0]*t[0]+s[0]*t[1]+a[0]*t[2],o[1]*t[0]+s[1]*t[1]+a[1]*t[2],o[2]*t[0]+s[2]*t[1]+a[2]*t[2]],u=[0,0,0];return Pf(u,l),u}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(t,r,i){let n=sne(t,r,i.canonical),a=K3r(n.x,n.y);return this.getCircleRadiusCorrection()/Math.cos(a[1])}projectTileCoordinates(t,r,i,n){let a=i.canonical,o=nx(t,r,a.x,a.y,a.z),s=1+(n!=null?n:0)/zf,l=o[0]*s,u=o[1]*s,c=o[2]*s,f=[l,u,c,1];Uu(f,f,this._globeViewProjMatrixF64);let h;if(s<=1){let d=this._cachedClippingPlane;h=d[0]*o[0]+d[1]*o[1]+d[2]*o[2]+d[3]<0}else h=this._isLineOfSightBlocked(l,u,c);return{point:new tr(f[0]/f[3],f[1]/f[3]),signedDistanceFromCamera:f[3],isOccluded:h}}_isLineOfSightBlocked(t,r,i){let n=this._cameraPosition,a=t-n[0],o=r-n[1],s=i-n[2],l=a*a+o*o+s*s;if(l===0)return!1;let u=Jn(-(n[0]*a+n[1]*o+n[2]*s)/l,0,1),c=n[0]+u*a,f=n[1]+u*o,h=n[2]+u*s;return c*c+f*f+h*h<1}_calcMatrices(){let t=YT(this.worldSize,this.center.lat),r=Q2();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+t*2),oB(r,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);let i=this.centerOffset;r[8]=-i.x*2/this._helper._width,r[9]=i.y*2/this._helper._height,this._projectionMatrix=aB(r),this._globeProjMatrixInverted=Q2(),Bk(this._globeProjMatrixInverted,r),eu(r,r,[0,0,-this.cameraToCenterDistance]),km(r,r,this.rollInRadians),Xb(r,r,-this.pitchInRadians),km(r,r,this.bearingInRadians),eu(r,r,[0,0,-t]);let n=Do();n[0]=t,n[1]=t,n[2]=t,Xb(r,r,this.center.lat*Math.PI/180),die(r,r,-this.center.lng*Math.PI/180),Rc(r,r,n),this._globeViewProjMatrixF64=r,this._globeViewProjMatrix32f=new Float32Array(r),this._globeViewProjMatrixF64Inverted=Q2(),Bk(this._globeViewProjMatrixF64Inverted,r);let a=Do();this._cameraPosition=Do(),this._cameraPosition[2]=this.cameraToCenterDistance/t,uB(this._cameraPosition,this._cameraPosition,a,-this.rollInRadians),PT(this._cameraPosition,this._cameraPosition,a,this.pitchInRadians),uB(this._cameraPosition,this._cameraPosition,a,-this.bearingInRadians),R0(this._cameraPosition,this._cameraPosition,[0,0,1]),PT(this._cameraPosition,this._cameraPosition,a,-this.center.lat*Math.PI/180),Zb(this._cameraPosition,this._cameraPosition,a,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(t);let o=aB(this._globeViewProjMatrixF64Inverted);Rc(o,o,[1,1,-1]),this._cachedFrustum=Mae.fromInvProjectionMatrix(o,1,0,this._cachedClippingPlane,!0)}calculateFogMatrix(t){Ma("calculateFogMatrix is not supported on globe projection.");let r=Q2();return Qd(r),r}getVisibleUnwrappedCoordinates(t){return[new u8(0,t)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(t){if(t){Ma("terrain is not fully supported on vertical perspective projection.");return}this._helper.recalculateZoomAndCenter(0)}maxPitchScaleFactor(){return 1}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return(K1(this._cameraPosition)-1)*zf}getCameraLngLat(){let t=Do();return Pf(t,this._cameraPosition),w8(t)}lngLatToCameraDepth(t,r){let i=Vu(t);Ps(i,i,1+r/zf);let n=Cm();return Uu(n,[i[0],i[1],i[2],1],this._globeViewProjMatrixF64),n[2]/n[3]}populateCache(t){}getBounds(){let t=this.width*.5,r=this.height*.5,i=[new tr(0,0),new tr(t,0),new tr(this.width,0),new tr(this.width,r),new tr(this.width,this.height),new tr(t,this.height),new tr(0,this.height),new tr(0,r)],n=[];for(let f of i)n.push(this.unprojectScreenPoint(f));let a=0,o=0,s=0,l=0,u=this.center;for(let f of n){let h=Kh(u.lng,f.lng),d=Kh(u.lat,f.lat);h<o&&(o=h),h>a&&(a=h),d<l&&(l=d),d>s&&(s=d)}let c=[u.lng+o,u.lat+l,u.lng+a,u.lat+s];return this.isSurfacePointOnScreen([0,1,0])&&(c[3]=90,c[0]=-180,c[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(c[1]=-90,c[0]=-180,c[2]=180),new Ev(c)}calculateCenterFromCameraLngLatAlt(t,r,i,n){return this._helper.calculateCenterFromCameraLngLatAlt(t,r,i,n)}calculateCameraOptionsFromTo(t,r,i,n){let a=mn.convert(i),o=Vu(mn.convert(t));Ps(o,o,1+r/zf);let s=Vu(a),l=Ps(Do(),s,1+n/zf),u=pie(Do(),o,s),c=K1(u);if(c<Aat||zet(o,l)<Aat)throw Error("Can't calculate camera options with same From and To");let f=Do();Zb(u,u,f,-js(a.lng)),PT(u,u,f,js(a.lat));let h=yv(Math.acos(Jn(u[2]/c,-1,1))),d=Math.hypot(u[0],u[1])<c*1e-9?this.bearing:yv(Math.atan2(-u[0],-u[1]));return{center:a,elevation:n,zoom:zc(this.cameraToCenterDistance/c/YT(this.tileSize,a.lat)),pitch:h,bearing:d}}setLocationAtPoint(t,r,i){let n=Vu(this.unprojectScreenPoint(r)),a=Vu(t),o=Do();Net(o);let s=Do();Zb(s,n,o,-this.center.lng*Math.PI/180),PT(s,s,o,this.center.lat*Math.PI/180);let l=a[0]*a[0]+a[2]*a[2],u=s[0]*s[0];if(l<u)return;let c=Math.sqrt(l-u),f=-c,h=Uk(a[0],a[2],s[0],c),d=Uk(a[0],a[2],s[0],f),p=Do();Zb(p,a,o,-h);let v=Uk(p[1],p[2],s[1],s[2]),m=Do();Zb(m,a,o,-d);let g=Uk(m[1],m[2],s[1],s[2]),w=Math.PI*.5,b=v>=-w&&v<=w,_=g>=-w&&g<=w,M,x;if(b&&_){let E=this.center.lng*Math.PI/180,S=this.center.lat*Math.PI/180,C=Vk(h,E),k=Vk(v,S),D=Vk(d,E),F=Vk(g,S);C+k<D+F?(M=h,x=v):(M=d,x=g)}else if(b)M=h,x=v;else if(_)M=d,x=g;else return;let T=M/Math.PI*180,A=x/Math.PI*180,y=this.center.lat;this.setCenter(new mn(T,Jn(A,-90,90))),this.setZoom(this.zoom+qc(y,this.center.lat))}locationToScreenPoint(t,r){let i=Vu(t);if(r){let n=r.getElevationForLngLatZoom(t,this._helper._tileZoom);Ps(i,i,1+n/zf)}return this._projectSurfacePointToScreen(i)}_projectSurfacePointToScreen(t){let r=Cm();return Uu(r,[...t,1],this._globeViewProjMatrixF64),r[0]/=r[3],r[1]/=r[3],new tr((r[0]*.5+.5)*this.width,(-r[1]*.5+.5)*this.height)}screenPointToMercatorCoordinate(t,r){if(r){let i=this.screenTerrainPointToMercatorCoordinate(t,r);if(i)return i}return wo.fromLngLat(this.unprojectScreenPoint(t))}screenTerrainPointToMercatorCoordinate(t,r){let i=r.getCoverageIndex();if(!i)return null;let n=this.cameraPosition,a=this.getRayDirectionFromPixel(t),o=oq(n,a,1+i.maxElevation/zf);if(!o)return null;let s=oq(n,a,1+i.minElevation/zf),l=Math.max(o.tMin,0),u=s?s.tMin:o.tMax;if(u<=l)return null;let c={index:i,exaggeration:r.exaggeration,origin:n,direction:a},f=0;for(let h=0;h<=256;h++){let d=l+(u-l)*h/256;if(Mat(c,d)){let{hi:p}=Lot(c,Mat,f,d,1e-12),{sample:v,mercator:m}=Vot(c,p);return new wo(m.x,m.y,v.elevation)}f=d}return null}screenPointToLocation(t,r){var i;return(i=this.screenPointToMercatorCoordinate(t,r))==null?void 0:i.toLngLat()}screenPointToLocationAtElevation(t,r){return this.screenPointToLocation(t)}isPointOnMapSurface(t,r){let i=this._cameraPosition;return!!oq(i,this.getRayDirectionFromPixel(t))}getRayDirectionFromPixel(t){let r=Cm();r[0]=t.x/this.width*2-1,r[1]=(t.y/this.height*2-1)*-1,r[2]=1,r[3]=1,Uu(r,r,this._globeViewProjMatrixF64Inverted),r[0]/=r[3],r[1]/=r[3],r[2]/=r[3];let i=Do();i[0]=r[0]-this._cameraPosition[0],i[1]=r[1]-this._cameraPosition[1],i[2]=r[2]-this._cameraPosition[2];let n=Do();return Pf(n,i),n}isSurfacePointVisible(t){let r=this._cachedClippingPlane;return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]+r[3]>=0}isSurfacePointOnScreen(t){if(!this.isSurfacePointVisible(t))return!1;let r=Cm();return Uu(r,[...t,1],this._globeViewProjMatrixF64),r[0]/=r[3],r[1]/=r[3],r[2]/=r[3],r[0]>-1&&r[0]<1&&r[1]>-1&&r[1]<1&&r[2]>-1&&r[2]<1}unprojectScreenPoint(t){let r=this._cameraPosition,i=this.getRayDirectionFromPixel(t),n=oq(r,i);if(n){let c=Do();R0(c,r,[i[0]*n.tMin,i[1]*n.tMin,i[2]*n.tMin]);let f=Do();return Pf(f,c),w8(f)}let a=this._cachedClippingPlane,o=a[0]*i[0]+a[1]*i[1]+a[2]*i[2],s=-hB(a,r)/o,l=Do();if(s>0)R0(l,r,[i[0]*s,i[1]*s,i[2]*s]);else{let c=Do();R0(c,r,[i[0]*2,i[1]*2,i[2]*2]);let f=hB(this._cachedClippingPlane,c);J1(l,c,[this._cachedClippingPlane[0]*f,this._cachedClippingPlane[1]*f,this._cachedClippingPlane[2]*f])}let u=iwr(a);return w8(nwr(u.center,u.radius,l))}getProjectionDataForCustomLayer(t=!0){let r=this.getProjectionData({overscaledTileID:new Bc(0,0,0,0,0),applyGlobeMatrix:t});return r.tileMercatorCoords=[0,0,1,1],r}getFastPathSimpleProjectionMatrix(t){}};Sat=class Got{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(t){this._helper.setMinZoom(t)}setMaxZoom(t){this._helper.setMaxZoom(t)}setMinPitch(t){this._helper.setMinPitch(t)}setMaxPitch(t){this._helper.setMaxPitch(t)}setRenderWorldCopies(t){this._helper.setRenderWorldCopies(t)}setBearing(t){this._helper.setBearing(t)}setPitch(t){this._helper.setPitch(t)}setRoll(t){this._helper.setRoll(t)}setFov(t){this._helper.setFov(t)}setZoom(t){this._helper.setZoom(t)}setCenter(t){this._helper.setCenter(t)}setElevation(t){this._helper.setElevation(t)}setMinElevationForCurrentTile(t){this._helper.setMinElevationForCurrentTile(t)}setPadding(t){this._helper.setPadding(t)}interpolatePadding(t,r,i){this._helper.interpolatePadding(t,r,i)}isPaddingEqual(t){return this._helper.isPaddingEqual(t)}resize(t,r,i=!0){this._helper.resize(t,r,i)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(t){this._helper.setMaxBounds(t)}setConstrainOverride(t){this._helper.setConstrainOverride(t)}overrideNearFarZ(t,r){this._helper.overrideNearFarZ(t,r)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(t){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),t)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(t){this._globeness=t,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(t){this._globeness=1,this.defaultConstrain=(r,i)=>this.currentTransform.defaultConstrain(r,i),this.applyConstrain=(r,i)=>this._helper.applyConstrain(r,i),this._helper=new Fae({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(r,i)=>this.defaultConstrain(r,i)},t),this._globeness=1,this._mercatorTransform=new Tq,this._verticalPerspectiveTransform=new Not}clone(){let t=new Got;return t._globeness=this._globeness,t.apply(this,!1),t}apply(t,r){this._helper.apply(t,r),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(t){let r=this._mercatorTransform.getProjectionData(t),i=this._verticalPerspectiveTransform.getProjectionData(t);return{mainMatrix:this.isGlobeRendering?i.mainMatrix:r.mainMatrix,clippingPlane:i.clippingPlane,tileMercatorCoords:i.tileMercatorCoords,projectionTransition:t.applyGlobeMatrix?this._globeness:0,fallbackMatrix:r.fallbackMatrix,clipAntimeridian:i.clipAntimeridian}}isLocationOccluded(t){return this.currentTransform.isLocationOccluded(t)}transformLightDirection(t){return this.currentTransform.transformLightDirection(t)}getPixelScale(){return Kb(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return Kb(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(t,r,i){let n=this._mercatorTransform.getPitchedTextCorrection(t,r,i),a=this._verticalPerspectiveTransform.getPitchedTextCorrection(t,r,i);return Kb(n,a,this._globeness)}projectTileCoordinates(t,r,i,n){return this.currentTransform.projectTileCoordinates(t,r,i,n)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(t){return this.currentTransform.calculateFogMatrix(t)}getVisibleUnwrappedCoordinates(t){return this.currentTransform.getVisibleUnwrappedCoordinates(t)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(t){this.currentTransform.recalculateZoomAndCenter(t)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this.currentTransform.getCameraAltitude()}getCameraLngLat(){return this.currentTransform.getCameraLngLat()}lngLatToCameraDepth(t,r){return this.currentTransform.lngLatToCameraDepth(t,r)}populateCache(t){this._mercatorTransform.populateCache(t),this._verticalPerspectiveTransform.populateCache(t)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(t,r,i,n){return this._helper.calculateCenterFromCameraLngLatAlt(t,r,i,n)}calculateCameraOptionsFromTo(t,r,i,n){return this.currentTransform.calculateCameraOptionsFromTo(t,r,i,n)}setLocationAtPoint(t,r,i){if(!this.isGlobeRendering){this._mercatorTransform.setLocationAtPoint(t,r,i),this.apply(this._mercatorTransform,!1);return}this._verticalPerspectiveTransform.setLocationAtPoint(t,r,i),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(t,r){return this.currentTransform.locationToScreenPoint(t,r)}screenPointToMercatorCoordinate(t,r){return this.currentTransform.screenPointToMercatorCoordinate(t,r)}screenTerrainPointToMercatorCoordinate(t,r){return this.currentTransform.screenTerrainPointToMercatorCoordinate(t,r)}screenPointToLocation(t,r){return this.currentTransform.screenPointToLocation(t,r)}screenPointToLocationAtElevation(t,r){return this.currentTransform.screenPointToLocationAtElevation(t,r)}isPointOnMapSurface(t,r){return this.currentTransform.isPointOnMapSurface(t,r)}getRayDirectionFromPixel(t){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(t)}getProjectionDataForCustomLayer(t=!0){let r=this._mercatorTransform.getProjectionDataForCustomLayer(t);if(!this.isGlobeRendering)return r;let i=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(t);return i.fallbackMatrix=r.mainMatrix,i.projectionTransition=this._globeness,i}getFastPathSimpleProjectionMatrix(t){return this.currentTransform.getFastPathSimpleProjectionMatrix(t)}},Hot=class Bm{get useGlobeControls(){return!0}handlePanInertia(t,r){let i=owr(t,r);return Math.abs(i.lng-r.center.lng)>180&&(i.lng=r.center.lng+179.5*Math.sign(i.lng-r.center.lng)),{easingCenter:i,easingOffset:new tr(0,0)}}handleMapControlsRollPitchBearingZoom(t,r){let i=t.around,n=r.screenPointToLocation(i);t.bearingDelta&&r.setBearing(r.bearing+t.bearingDelta),t.pitchDelta&&r.setPitch(r.pitch+t.pitchDelta),t.rollDelta&&r.setRoll(r.roll+t.rollDelta);let a=r.zoom;t.zoomDelta&&r.setZoom(r.zoom+t.zoomDelta);let o=r.zoom-a;if(o===0)return;let s=Kh(r.center.lng,n.lng),l=s/(Math.abs(s/180)+1),u=Kh(r.center.lat,n.lat),c=r.getRayDirectionFromPixel(i),f=r.cameraPosition,h=gu(f,c)*-1,d=Do();R0(d,f,[c[0]*h,c[1]*h,c[2]*h]);let p=K1(d),v=p-1,m=Math.exp(-Math.max(v-.3,0)*.5),g=Gk(p,.95,.999,0,1),w=YT(r.worldSize,r.center.lat)/Math.min(r.width,r.height),b=Gk(w,.9,.5,1,.25),_=Math.min(m,Kb(1,b,g)),M=(1-If(-o))*_,x=r.center.lat,T=r.zoom,A=new mn(r.center.lng+l*M,Jn(r.center.lat+u*M,-Tv,Tv));r.setLocationAtPoint(n,i);let y=r.center,E=Gk(Math.abs(s),45,85,0,1),S=Math.max(E,g)**.25,C=Kh(y.lng,A.lng),k=Kh(y.lat,A.lat);r.setCenter(new mn(y.lng+C*S,y.lat+k*S).wrap()),r.setZoom(T+qc(x,r.center.lat))}handleMapControlsPan(t,r,i){t.panDelta&&twr(r,i,r.isPointOnMapSurface(t.around)?t.around:r.centerPoint,t.panDelta)}cameraForBoxAndBearing(t,r,i,n,a){let o=zot(t,r,i,n,a),s=r.left/a.width*2-1,l=(a.width-r.right)/a.width*2-1,u=r.top/a.height*-2+1,c=(a.height-r.bottom)/a.height*-2+1,f=Kh(i.getWest(),i.getEast())<0,h=f?i.getEast():i.getWest(),d=f?i.getWest():i.getEast(),p=Math.max(i.getNorth(),i.getSouth()),v=Math.min(i.getNorth(),i.getSouth()),m=h+Kh(h,d)*.5,g=p+Kh(p,v)*.5,w=a.clone();w.setCenter(o.center),w.setBearing(o.bearing),w.setPitch(0),w.setRoll(0),w.setZoom(o.zoom);let b=w.modelViewProjectionMatrix,_=[Vu(i.getNorthWest()),Vu(i.getNorthEast()),Vu(i.getSouthWest()),Vu(i.getSouthEast()),Vu(new mn(d,g)),Vu(new mn(h,g)),Vu(new mn(m,p)),Vu(new mn(m,v))],M=Vu(o.center),x=1/0;for(let T of _)s<0&&(x=Bm.getLesserNonNegativeNonNull(x,Bm.solveVectorScale(T,M,b,"x",s))),l>0&&(x=Bm.getLesserNonNegativeNonNull(x,Bm.solveVectorScale(T,M,b,"x",l))),u>0&&(x=Bm.getLesserNonNegativeNonNull(x,Bm.solveVectorScale(T,M,b,"y",u))),c<0&&(x=Bm.getLesserNonNegativeNonNull(x,Bm.solveVectorScale(T,M,b,"y",c)));if(!Number.isFinite(x)||x===0){Iot();return}return o.zoom=Math.min(w.zoom+zc(x),t.maxZoom),o}handleJumpToCenterZoom(t,r){let i=t.center.lat,n=t.applyConstrain(r.center?mn.convert(r.center):t.center,t.zoom).center;t.setCenter(n.wrap());let a=r.zoom===void 0?t.zoom+qc(i,n.lat):+r.zoom;t.zoom!==a&&t.setZoom(a)}handleEaseTo(t,r){let i=t.zoom,n=t.center,a=t.padding,o={roll:t.roll,pitch:t.pitch,bearing:t.bearing},s={roll:r.roll===void 0?t.roll:r.roll,pitch:r.pitch===void 0?t.pitch:r.pitch,bearing:r.bearing===void 0?t.bearing:r.bearing},l=r.zoom!==void 0,u=!t.isPaddingEqual(r.padding),c=!1,f=r.center?mn.convert(r.center):n,h=t.applyConstrain(f,i).center;wq(t,h);let d=t.clone();d.setCenter(h),d.setZoom(l?+r.zoom:i+qc(n.lat,f.lat)),d.setBearing(r.bearing);let p=new tr(Jn(t.centerPoint.x+r.offsetAsPoint.x,0,t.width),Jn(t.centerPoint.y+r.offsetAsPoint.y,0,t.height));d.setLocationAtPoint(h,p);let v=(r.offset&&r.offsetAsPoint.mag())>0?d.center:h,m=l?+r.zoom:i+qc(n.lat,v.lat),g=i+qc(n.lat,0),w=m+qc(v.lat,0),b=Kh(n.lng,v.lng),_=Kh(n.lat,v.lat),M=If(w-g);return c=m!==i,{easeFunc:x=>{if(wie(o,s)||Rot({startEulerAngles:o,endEulerAngles:s,tr:t,k:x,useSlerp:o.roll!=s.roll}),u&&t.interpolatePadding(a,r.padding,x),r.around)Ma("Easing around a point is not supported under globe projection."),t.setLocationAtPoint(r.around,r.aroundPoint);else{let T=x*(w>g?Math.min(2,M):Math.max(.5,M))**(1-x),A=wat(n,b,_,T);t.setCenter(A.wrap())}if(c){let T=$s.number(g,w,x)+qc(0,t.center.lat);t.setZoom(T)}},isZooming:c,elevationCenter:v}}handleFlyTo(t,r){let i=r.zoom!==void 0,n=t.center,a=t.zoom,o=t.padding,s=!t.isPaddingEqual(r.padding),l=t.applyConstrain(mn.convert(r.center||r.locationAtOffset),a).center,u=i?+r.zoom:t.zoom+qc(t.center.lat,l.lat),c=t.clone();c.setCenter(l),c.setZoom(u),c.setBearing(r.bearing);let f=new tr(Jn(t.centerPoint.x+r.offsetAsPoint.x,0,t.width),Jn(t.centerPoint.y+r.offsetAsPoint.y,0,t.height));c.setLocationAtPoint(l,f);let h=c.center;wq(t,h);let d=Z3r(t,n,h),p=a+qc(n.lat,0),v=u+qc(h.lat,0),m=If(v-p),g=typeof r.minZoom=="number"?+r.minZoom:t.minZoom,w=Math.max(g,t.minZoom)+qc(h.lat,0),b=Math.min(w,p,v)+qc(0,h.lat),_=t.applyConstrain(h,b).zoom+qc(h.lat,0),M=If(_-p),x=Kh(n.lng,h.lng),T=Kh(n.lat,h.lat);return{easeFunc:(A,y,E,S)=>{let C=wat(n,x,T,E);s&&t.interpolatePadding(o,r.padding,A);let k=A===1?h:C;t.setCenter(k.wrap());let D=p+zc(y);t.setZoom(A===1?u:D+qc(0,k.lat))},scaleOfZoom:m,targetCenter:h,scaleOfMinZoom:M,pixelPathLength:d}}static solveVectorScale(t,r,i,n,a){let o=a,s=n==="x"?[i[0],i[4],i[8],i[12]]:[i[1],i[5],i[9],i[13]],l=[i[3],i[7],i[11],i[15]],u=t[0]*s[0]+t[1]*s[1]+t[2]*s[2],c=t[0]*l[0]+t[1]*l[1]+t[2]*l[2],f=r[0]*s[0]+r[1]*s[1]+r[2]*s[2],h=r[0]*l[0]+r[1]*l[1]+r[2]*l[2],d=(f+s[3]-o*h-o*l[3])/(f-u-o*h+o*c);return f+o*c===u+o*h||l[3]*(u-f)+s[3]*(h-c)+u*h===f*c?null:d}static getLesserNonNegativeNonNull(t,r){return r!==null&&r>=0&&r<t?r:t}},Eat=class{constructor(e){this._globe=e,this._mercatorCameraHelper=new Aq,this._verticalPerspectiveCameraHelper=new Hot}get useGlobeControls(){return this._globe.useGlobeRendering}get currentHelper(){return this.useGlobeControls?this._verticalPerspectiveCameraHelper:this._mercatorCameraHelper}handlePanInertia(e,t){return this.currentHelper.handlePanInertia(e,t)}handleMapControlsRollPitchBearingZoom(e,t){this.currentHelper.handleMapControlsRollPitchBearingZoom(e,t)}handleMapControlsPan(e,t,r){this.currentHelper.handleMapControlsPan(e,t,r)}cameraForBoxAndBearing(e,t,r,i,n){return this.currentHelper.cameraForBoxAndBearing(e,t,r,i,n)}handleJumpToCenterZoom(e,t){this.currentHelper.handleJumpToCenterZoom(e,t)}handleEaseTo(e,t){return this.currentHelper.handleEaseTo(e,t)}handleFlyTo(e,t){return this.currentHelper.handleFlyTo(e,t)}};cwr=H_r(),hae=class extends mu{constructor(e,t={}){var i,n;super(),this._rtlPluginLoaded=()=>{for(let a in this.tileManagers){let o=this.tileManagers[a].getSource().type;(o==="vector"||o==="geojson")&&this.tileManagers[a].reload()}},this.map=e,this.dispatcher=new rot(bae(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",(a,o)=>this.getGlyphs(a,o)),this.dispatcher.registerMessageHandler("GI",(a,o)=>this.getImages(a,o)),this.dispatcher.registerMessageHandler("GDA",(a,o)=>this.getDashes(a,o)),this.imageManager=new W_r,this.imageManager.setEventedParent(this),this.imageManager.setMissingImageResolver(e._missingStyleImageResolver),this.patternAtlas=new Y_r(this.imageManager);let r=((i=e._container)==null?void 0:i.lang)||typeof document<"u"&&((n=document.documentElement)==null?void 0:n.lang)||void 0;this.glyphManager=new ibr(e._requestManager,t.localIdeographFontFamily,r),this.lineAtlas=new cbr(256,512),this.crossTileSymbolIndex=new Eot,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",mB()),A8().on(iae,this._rtlPluginLoaded),this.on("data",a=>{if(a.dataType!=="source"||a.sourceDataType!=="metadata")return;let o=this.tileManagers[a.sourceId];if(!o)return;let s=o.getSource();if(s!=null&&s.vectorLayerIds)for(let l in this._layers){let u=this._layers[l];u.source===s.id&&this._validateLayer(u)}})}_setInitialValues(){var e;this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new Yz,this._imagesListDirty=!1,this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this._symbolPlacementTriggered=!1,this._placedProjectionTransition=void 0,this.crossTileSymbolIndex=new(((e=this.crossTileSymbolIndex)==null?void 0:e.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(e,t){var i,n,a;this._checkLoaded();let r=t===null?(a=(n=(i=this.stylesheet.state)==null?void 0:i[e])==null?void 0:n.default)!=null?a:null:t;if(_v(r,this._globalState[e]))return this;this._globalState[e]=r,this._applyGlobalStateChanges([e])}getGlobalState(){return this._globalState}setGlobalState(e){this._checkLoaded();let t=[];for(let r in e)_v(this._globalState[r],e[r].default)||(t.push(r),this._globalState[r]=e[r].default);this._applyGlobalStateChanges(t)}_applyGlobalStateChanges(e){if(e.length===0)return;let t=new Set,r={};for(let i of e){r[i]=this._globalState[i];for(let n in this._layers){let a=this._layers[n],o=a.getLayoutAffectingGlobalStateRefs(),s=a.getPaintAffectingGlobalStateRefs(),l=a.getVisibilityAffectingGlobalStateRefs();if(o.has(i)&&t.add(a.source),s.has(i))for(let{name:u,value:c}of s.get(i))this._updatePaintProperty(a,u,c);l!=null&&l.has(i)&&(a.recalculateVisibility(),this._updateLayer(a))}}this.dispatcher.broadcast("UGS",r);for(let i in this.tileManagers)t.has(i)&&(this._reloadSource(i),this._changed=!0)}loadURL(i){return Ki(this,arguments,function*(e,t={},r){this.fire(new rp("dataloading")),t.validate=typeof t.validate!="boolean"||t.validate,this._loadStyleRequest=new AbortController;let n=this._loadStyleRequest;try{let a=yield this.map._requestManager.transformRequest(e,"Style");gB(n.signal);let o=yield jk(a,n);this._loadStyleRequest===n&&(this._loadStyleRequest=null),this._load(o.data,t,r)}catch(a){this._loadStyleRequest===n&&(this._loadStyleRequest=null),a&&!n.signal.aborted&&this.fire(new An(Ic(a)))}})}loadJSON(e,t={},r){this.fire(new rp("dataloading")),this._frameRequest=new AbortController,fh.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,t.validate=t.validate!==!1,this._load(e,t,r)}).catch(()=>{})}loadEmpty(){this.fire(new rp("dataloading")),this._load(cwr,{validate:!1})}_load(e,t,r){var n,a,o;let i=t.transformStyle?t.transformStyle(r,e):e;if(!(t.validate&&Wie(this,i))){i=fn({},i),this._loaded=!0,this.stylesheet=i;for(let s in i.sources)this.addSource(s,i.sources[s],{validate:!1});i.sprite?this._loadSprite(i.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(i.glyphs),this.glyphManager.setFontFaces(i["font-faces"]),this._createLayers(),this.light=new obr((n=this.stylesheet.light)!=null?n:{},this._globalState),this._setProjectionInternal(((a=this.stylesheet.projection)==null?void 0:a.type)||"mercator"),this.sky=new ubr(this.stylesheet.sky,this._globalState),this.map.setTerrain((o=this.stylesheet.terrain)!=null?o:null,{validate:!1}),this.fire(new rp("data")),this.fire(new Qne)}}_createLayers(){var t,r,i;let e=Gnt(this.stylesheet.layers);this.setGlobalState((t=this.stylesheet.state)!=null?t:null),this.dispatcher.broadcast("SL",e),this._order=e.map(n=>n.id),this._layers={},this._serializedLayers=null;for(let n of e){let a=ZB(n,this._globalState);if(a.setEventedParent(this,{layer:{id:n.id}}),this._layers[n.id]=a,BB(a)&&this.tileManagers[a.source]){let o=(i=(r=n.paint)==null?void 0:r["raster-fade-duration"])!=null?i:a.paint.get("raster-fade-duration");this.tileManagers[a.source].setRasterFadeDuration(o)}}}_loadSprite(e,t=!1,r=void 0){return Ki(this,null,function*(){this.imageManager.setLoaded(!1);let i=new AbortController;this._spriteRequest=i;let n;try{let a=yield j_r(e,this.map._requestManager,this.map.getPixelRatio(),i);if(!a)return;for(let o in a){let{loaded:s,removed:l}=this.imageManager.setSpriteImages(o,a[o]);this._markImagesChanged(l),t&&this._markImagesChanged(s)}}catch(a){n=a,i.signal.aborted||this.fire(new An(n))}finally{this._spriteRequest=null,this.imageManager.setLoaded(!0),t&&(this._changed=!0),this.dispatcher.broadcast("SI",this.imageManager.listImages()),this.fire(new rp("data")),r==null||r(n)}})}_unloadSprite(){this._markImagesChanged(this.imageManager.removeAllSpriteImages()),this._imagesListDirty=!0,this._changed=!0,this.fire(new rp("data"))}_validateLayer(e){let t=this.tileManagers[e.source];if(!t)return;let r=e.sourceLayer;if(!r)return;let i=t.getSource();(i.type==="geojson"||i.vectorLayerIds&&!i.vectorLayerIds.includes(r))&&this.fire(new An(Error(`Source layer "${r}" does not exist on source "${i.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let e in this.tileManagers)if(!this.tileManagers[e].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(e,t=!1){let r=this._serializedAllLayers();if(!e||e.length===0)return Object.values(t?lh(r):r);let i=[];for(let n of e)if(r[n]){let a=t?lh(r[n]):r[n];i.push(a)}return i}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;e=this._serializedLayers={};let t=Object.keys(this._layers);for(let r of t){let i=this._layers[r];i.type!=="custom"&&(e[r]=i.serialize())}return e}hasTransitions(){var e,t,r;if((e=this.light)!=null&&e.hasTransition()||(t=this.sky)!=null&&t.hasTransition()||(r=this.projection)!=null&&r.hasTransition())return!0;for(let i in this.tileManagers)if(this.tileManagers[i].hasTransition())return!0;for(let i in this._layers)if(this._layers[i].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw Error("Style is not done loading.")}update(e){if(!this._loaded)return;let t=this._changed;if(t){this._imagesListDirty&&(this._imagesListDirty=(this.dispatcher.broadcast("SI",this.imageManager.listImages()),!1));let n=Object.keys(this._updatedLayers),a=Object.keys(this._removedLayers);(n.length||a.length)&&this._updateWorkerLayers(n,a);for(let o in this._updatedSources){let s=this._updatedSources[o];if(s==="reload")this._reloadSource(o);else if(s==="clear")this._clearSource(o);else throw Error(`Invalid action ${s}`)}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let o in this._updatedPaintProps)this._layers[o].updateTransitions(e);this._resetUpdates()}let r={};for(let n in this.tileManagers){let a=this.tileManagers[n];r[n]=a.used,a.used=!1}let i=this.imageManager.listImages();for(let n of this._order){let a=this._layers[n];a.recalculate(e,i),!a.isHidden(e.zoom)&&a.source&&(this.tileManagers[a.source].used=!0)}for(let n in r){let a=this.tileManagers[n];!!r[n]!=!!a.used&&a.fire(new Is("data",{sourceDataType:"visibility",sourceId:n}))}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,t&&this.fire(new rp("data"))}_updateTilesForChangedImages(){let e=Object.keys(this._changedImages);if(e.length){for(let t in this.tileManagers)this.tileManagers[t].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let e in this.tileManagers)this.tileManagers[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,t){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:t})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,t={}){var a;this._checkLoaded();let r=this.serialize();if(e=t.transformStyle?t.transformStyle(r,e):e,((a=t.validate)!=null?a:!0)&&Wie(this,e))return!1;e=lh(e),e.layers=Gnt(e.layers);let i=G_r(r,e),n=this._getOperationsToPerform(i);if(n.unimplemented.length>0)throw Error(`Unimplemented: ${n.unimplemented.join(", ")}.`);if(n.operations.length===0)return!1;for(let o of n.operations)o();return this.stylesheet=e,this._serializedLayers=null,this.fire(new Qne({style:this})),!0}_getOperationsToPerform(e){let t=[],r=[];for(let i of e)switch(i.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":t.push(()=>this.addLayer.apply(this,i.args));break;case"removeLayer":t.push(()=>this.removeLayer.apply(this,i.args));break;case"setPaintProperty":t.push(()=>this.setPaintProperty.apply(this,i.args));break;case"setLayoutProperty":t.push(()=>this.setLayoutProperty.apply(this,i.args));break;case"setFilter":t.push(()=>this.setFilter.apply(this,i.args));break;case"addSource":t.push(()=>this.addSource.apply(this,i.args));break;case"removeSource":t.push(()=>this.removeSource.apply(this,i.args));break;case"setLayerZoomRange":t.push(()=>this.setLayerZoomRange.apply(this,i.args));break;case"setLight":t.push(()=>this.setLight.apply(this,i.args));break;case"setGeoJSONSourceData":t.push(()=>this.setGeoJSONSourceData.apply(this,i.args));break;case"setGlyphs":t.push(()=>this.setGlyphs.apply(this,i.args));break;case"setFontFaces":t.push(()=>this.setFontFaces.apply(this,i.args));break;case"setSprite":t.push(()=>this.setSprite.apply(this,i.args));break;case"setTerrain":t.push(()=>this.map.setTerrain.apply(this,i.args));break;case"setSky":t.push(()=>this.setSky.apply(this,i.args));break;case"setProjection":this.setProjection.apply(this,i.args);break;case"setGlobalState":t.push(()=>this.setGlobalState.apply(this,i.args));break;case"setTransition":t.push(()=>{});break;default:r.push(i.command)}return{operations:t,unimplemented:r}}addImage(e,t){if(this.getImage(e)){this.fire(new An(Error(`An image named "${e}" already exists.`)));return}this.imageManager.addImage(e,t),this._afterImageUpdated(e)}updateImage(e,t){this.imageManager.updateImage(e,t)}getImage(e){return this.imageManager.getImage(e)}setMissingImageResolver(e){this.imageManager.setMissingImageResolver(e)}removeImage(e){if(!this.getImage(e)){this.fire(new An(Error(`An image named "${e}" does not exist.`)));return}this.imageManager.removeImage(e),this._afterImageUpdated(e)}_markImagesChanged(e){for(let t of e)this._changedImages[t]=!0}_afterImageUpdated(e){this._changedImages[e]=!0,this._imagesListDirty=!0,this._changed=!0,this.fire(new rp("data"))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,t,r={}){var n;if(this._checkLoaded(),this.tileManagers[e]!==void 0)throw Error(`Source "${e}" already exists.`);if(!t.type)throw Error(`The type property must be defined, but only the following properties were given: ${Object.keys(t).join(", ")}.`);if($ie.has(t.type)&&this._validate(ch.source,`sources.${e}`,t,null,r))return;(n=this.map)!=null&&n._collectResourceTiming&&(t.collectResourceTiming=!0);let i=this.tileManagers[e]=new aae(e,t,this.dispatcher);i.style=this,i.setEventedParent(this,()=>({isSourceLoaded:i.loaded(),source:i.serialize(),sourceId:e})),i.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),this.tileManagers[e]===void 0)throw Error(`There is no source with this ID=${e}`);for(let r in this._layers)if(this._layers[r].source===e)return this.fire(new An(Error(`Source "${e}" cannot be removed while layer "${r}" is using it.`)));let t=this.tileManagers[e];delete this.tileManagers[e],delete this._updatedSources[e],t.fire(new Is("data",{sourceDataType:"metadata",sourceId:e})),t.setEventedParent(null),t.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,t){if(this._checkLoaded(),this.tileManagers[e]===void 0)throw Error(`There is no source with this ID=${e}`);let r=this.tileManagers[e].getSource();if(r.type!=="geojson")throw Error(`geojsonSource.type is ${r.type}, which is !== 'geojson`);r.setData(t),this._changed=!0}getSource(e){var t;return(t=this.tileManagers[e])==null?void 0:t.getSource()}addLayer(e,t,r={}){this._checkLoaded();let i=e.id;if(this.getLayer(i)){this.fire(new An(Error(`Layer "${i}" already exists on this map.`)));return}let n;if(e.type==="custom"){if(LB(this,snt(e)))return;n=ZB(e,this._globalState)}else{if("source"in e&&typeof e.source=="object"&&(this.addSource(i,e.source),e=lh(e),e=ln(e,{source:i})),this._validate(ch.layer,`layers.${i}`,e,{arrayIndex:-1},r))return;n=ZB(e,this._globalState),this._validateLayer(n),n.setEventedParent(this,{layer:{id:i}})}let a=t?this._order.indexOf(t):this._order.length;if(t&&a===-1){this.fire(new An(Error(`Cannot add layer "${i}" before non-existing layer "${t}".`)));return}if(this._order.splice(a,0,i),this._layerOrderChanged=!0,this._layers[i]=n,this._removedLayers[i]&&n.source&&n.type!=="custom"){let o=this._removedLayers[i];delete this._removedLayers[i],o.type===n.type?(this._updatedSources[n.source]="reload",this.tileManagers[n.source].pause()):this._updatedSources[n.source]="clear"}this._updateLayer(n),n.onAdd&&n.onAdd(this.map)}moveLayer(e,t){if(this._checkLoaded(),this._changed=!0,!this._layers[e]){this.fire(new An(Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));return}if(e===t)return;if(t&&!this._order.includes(t)){this.fire(new An(Error(`Cannot move layer "${e}" before non-existing layer "${t}".`)));return}let r=this._order.indexOf(e);this._order.splice(r,1);let i=t?this._order.indexOf(t):this._order.length;this._order.splice(i,0,e),this._layerOrderChanged=!0}removeLayer(e){var i;this._checkLoaded();let t=this._layers[e];if(!t){this.fire(new An(Error(`Cannot remove non-existing layer "${e}".`)));return}t.setEventedParent(null);let r=this._order.indexOf(e);this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=t,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],t.type==="symbol"&&t.source&&((i=this.tileManagers[t.source])==null||i.resetMaxContentElevation()),t.onRemove&&t.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,t,r){this._checkLoaded();let i=this.getLayer(e);if(!i){this.fire(new An(Error(`Cannot set the zoom range of non-existing layer "${e}".`)));return}(i.minzoom!==t||i.maxzoom!==r)&&(t!=null&&(i.minzoom=t),r!=null&&(i.maxzoom=r),this._updateLayer(i))}setFilter(e,t,r={}){this._checkLoaded();let i=this.getLayer(e);if(!i){this.fire(new An(Error(`Cannot filter non-existing layer "${e}".`)));return}if(!_v(i.filter,t)){if(t==null){i.setFilter(void 0),this._updateLayer(i);return}this._validate(ch.filter,`layers.${i.id}.filter`,t,null,r)||(i.setFilter(lh(t)),this._updateLayer(i))}}getFilter(e){return lh(this.getLayer(e).filter)}setLayoutProperty(e,t,r,i={}){this._checkLoaded();let n=this.getLayer(e);if(!n){this.fire(new An(Error(`Cannot style non-existing layer "${e}".`)));return}_v(n.getLayoutProperty(t),r)||(n.setLayoutProperty(t,r,i),this._updateLayer(n))}getLayoutProperty(e,t){let r=this.getLayer(e);if(!r){this.fire(new An(Error(`Cannot get style of non-existing layer "${e}".`)));return}return r.getLayoutProperty(t)}setPaintProperty(e,t,r,i={}){this._checkLoaded();let n=this.getLayer(e);if(!n){this.fire(new An(Error(`Cannot style non-existing layer "${e}".`)));return}_v(n.getPaintProperty(t),r)||this._updatePaintProperty(n,t,r,i)}_updatePaintProperty(e,t,r,i={}){e.setPaintProperty(t,r,i)&&this._updateLayer(e),BB(e)&&t==="raster-fade-duration"&&this.tileManagers[e.source].setRasterFadeDuration(r),this._changed=!0,this._updatedPaintProps[e.id]=!0,e.type==="symbol"&&this.triggerSymbolPlacement(),this._serializedLayers=null}getPaintProperty(e,t){return this.getLayer(e).getPaintProperty(t)}setFeatureState(e,t){this._checkLoaded();let r=e.source,i=e.sourceLayer,n=this.tileManagers[r];if(n===void 0){this.fire(new An(Error(`The source '${r}' does not exist in the map's style.`)));return}let a=n.getSource().type;if(a==="geojson"&&i){this.fire(new An(Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(a==="vector"&&!i){this.fire(new An(Error("The sourceLayer parameter must be provided for vector source types.")));return}if(e.id===void 0){this.fire(new An(Error("The feature id parameter must be provided.")));return}let o=["__proto__","constructor","prototype"];if(t&&Object.keys(t).some(s=>o.includes(s))){this.fire(new An(Error(`The feature state should not include one of the following keys: ${o}`)));return}n.setFeatureState(i,e.id,t)}removeFeatureState(e,t){this._checkLoaded();let r=e.source,i=this.tileManagers[r];if(i===void 0){this.fire(new An(Error(`The source '${r}' does not exist in the map's style.`)));return}let n=i.getSource().type,a=n==="vector"?e.sourceLayer:void 0;if(n==="vector"&&!a){this.fire(new An(Error("The sourceLayer parameter must be provided for vector source types.")));return}if(t&&typeof e.id!="string"&&typeof e.id!="number"){this.fire(new An(Error("A feature id is required to remove its specific state property.")));return}i.removeFeatureState(a,e.id,t)}getFeatureState(e){this._checkLoaded();let t=e.source,r=e.sourceLayer,i=this.tileManagers[t];if(i===void 0){this.fire(new An(Error(`The source '${t}' does not exist in the map's style.`)));return}if(i.getSource().type==="vector"&&!r){this.fire(new An(Error("The sourceLayer parameter must be provided for vector source types.")));return}return e.id===void 0&&this.fire(new An(Error("The feature id parameter must be provided."))),i.getFeatureState(r,e.id)}getTransition(){var e;return ln({duration:300,delay:0},(e=this.stylesheet)==null?void 0:e.transition)}serialize(){if(!this._loaded)return;let e=vB(this.tileManagers,n=>n.serialize()),t=this._serializeByIds(this._order,!0),r=this.map.getTerrain()||void 0,i=this.stylesheet;return bie({version:i.version,name:i.name,metadata:i.metadata,light:i.light,sky:i.sky,center:i.center,zoom:i.zoom,bearing:i.bearing,pitch:i.pitch,sprite:i.sprite,glyphs:i.glyphs,"font-faces":i["font-faces"],transition:i.transition,projection:i.projection,state:i.state,sources:e,layers:t,terrain:r},n=>n!==void 0)}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&this.tileManagers[e.source].getSource().type!=="raster"&&(this._updatedSources[e.source]="reload",this.tileManagers[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){let t=a=>this._layers[a].type==="fill-extrusion",r={},i=[];for(let a=this._order.length-1;a>=0;a--){let o=this._order[a];if(t(o)){r[o]=a;for(let s of e){let l=s[o];if(l)for(let u of l)i.push(u)}}}i.sort((a,o)=>o.intersectionZ-a.intersectionZ);let n=[];for(let a=this._order.length-1;a>=0;a--){let o=this._order[a];if(t(o))for(let s=i.length-1;s>=0;s--){let l=i[s].feature;if(r[l.layer.id]<a)break;n.push(l),i.pop()}else for(let s of e){let l=s[o];if(l)for(let u of l)n.push(u.feature)}}return n}queryRenderedFeatures(e,t,r){t!=null&&t.filter&&this._validate(ch.filter,"queryRenderedFeatures.filter",t.filter,null,t);let i={};if(t!=null&&t.layers){if(!(Array.isArray(t.layers)||t.layers instanceof Set))return this.fire(new An(Error("parameters.layers must be an Array or a Set of strings"))),[];for(let l of t.layers){let u=this._layers[l];if(!u)return this.fire(new An(Error(`The layer '${l}' does not exist in the map's style and cannot be queried for features.`))),[];i[u.source]=!0}}let n=[];t.availableImages=this.imageManager.listImages();let a=this._serializedAllLayers(),o=t.layers instanceof Set?t.layers:Array.isArray(t.layers)?new Set(t.layers):null,s=ma(fn({},t),{layers:o,globalState:this._globalState});for(let l in this.tileManagers)(!t.layers||i[l])&&n.push(bbr(this.tileManagers[l],this._layers,a,e,s,r,this.map.terrain?(u,c,f)=>this.map.terrain.getElevation(u,c,f):void 0));return this.placement&&n.push(wbr(this._layers,a,this.tileManagers,e,s,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(n)}querySourceFeatures(e,t){t!=null&&t.filter&&this._validate(ch.filter,"querySourceFeatures.filter",t.filter,null,t);let r=this.tileManagers[e];return r?Tbr(r,t?ma(fn({},t),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(e,t={}){this._checkLoaded();let r=this.light.getLight(),i=!1;for(let a in e)if(!_v(e[a],r[a])){i=!0;break}if(!i)return;let n={now:Oo(),transition:ln({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,t),this.light.updateTransitions(n)}getProjection(){var e;return(e=this.stylesheet)==null?void 0:e.projection}setProjection(e){this._checkLoaded();let t=e!=null?e:{type:"mercator"};if(this.stylesheet.projection=e,this.projection){if(this.projection.name===t.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(t.type)}getSky(){var e;return(e=this.stylesheet)==null?void 0:e.sky}setSky(e,t={}){this._checkLoaded();let r=this.getSky(),i=!1;if(!e&&!r)return;if(e&&!r)i=!0;else if(!e&&r)i=!0;else for(let a in e)if(!_v(e[a],r[a])){i=!0;break}if(!i)return;let n={now:Oo(),transition:ln({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=e,this.sky.setSky(e,t),this.sky.updateTransitions(n)}_setProjectionInternal(e){var r;let t=uwr(e,(r=this.map._camera)==null?void 0:r.transform.constrainOverride,this._globalState);this.projection=t.projection,this.map.migrateProjection(t.transform,t.cameraHelper);for(let i in this.tileManagers)this.tileManagers[i].reload()}_validate(e,t,r,i,n={}){return n.validate!==!1&&qT(this,e,fn({key:t,style:this.serialize(),value:r},i),n)}_remove(e=!0){this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._loadStyleRequest&&(this._loadStyleRequest=(this._loadStyleRequest.abort(),null)),this._spriteRequest&&(this._spriteRequest=(this._spriteRequest.abort(),null)),A8().off(iae,this._rtlPluginLoaded);for(let t in this._layers)this._layers[t].setEventedParent(null);for(let t in this.tileManagers){let r=this.tileManagers[t];r.setEventedParent(null),r.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),e&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(e)}_clearSource(e){this.tileManagers[e].clearTiles()}_reloadSource(e){this.tileManagers[e].resume(),this.tileManagers[e].reload()}_updateSources(e){for(let t in this.tileManagers)this.tileManagers[t].update(e,this.map.terrain)}_generateCollisionBoxes(){for(let e in this.tileManagers)this._reloadSource(e)}triggerSymbolPlacement(){this._symbolPlacementTriggered=!0}_placementInputsChanged(e,t,r){var n;let i=this.pauseablePlacement;return!i||this._symbolPlacementTriggered||this._placedProjectionTransition!==((n=this.projection)==null?void 0:n.transitionState)||i._showCollisionBoxes!==t||i.placement.collisionGroups.crossSourceCollisions!==r||i.placement.transform.renderWorldCopies!==e.renderWorldCopies||!Pet(i.placement.transform.modelViewProjectionMatrix,e.modelViewProjectionMatrix)}_updatePlacement(e,t,r,i,n=!1){var c,f;let a=!1,o=!1,s={};for(let h of this._order){let d=this._layers[h];if(d.type!=="symbol")continue;if(!s[d.source]){let v=this.tileManagers[d.source];s[d.source]=v.getRenderableIds(!0).map(m=>v.getTileByID(m)).sort((m,g)=>g.tileID.overscaledZ-m.tileID.overscaledZ||(m.tileID.isLessThan(g.tileID)?-1:1))}let p=this.crossTileSymbolIndex.addLayer(d,s[d.source],e.center.lng);a||(a=p)}this.crossTileSymbolIndex.pruneUnusedLayers(this._order),n||(n=this._layerOrderChanged||r===0);let l=a||this._placementInputsChanged(e,t,i),u=((c=this.pauseablePlacement)==null?void 0:c.isDone())&&!this.placement.stillRecent(Oo(),e.zoom);if((n||!this.pauseablePlacement||u&&(l||this.placement.stale))&&(this._symbolPlacementTriggered=!1,this._placedProjectionTransition=(f=this.projection)==null?void 0:f.transitionState,this.pauseablePlacement=new F3r(e,this.map.terrain,this._order,n,t,r,i,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?l&&this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,s),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(Oo()),o=!0),a&&this.pauseablePlacement.placement.setStale()),o||a)for(let h of this._order){let d=this._layers[h];d.type==="symbol"&&this.placement.updateLayerOpacities(d,s[d.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(Oo())}_releaseSymbolFadeTiles(){for(let e in this.tileManagers)this.tileManagers[e].releaseSymbolFadeTiles()}getImages(e,t){return Ki(this,null,function*(){let r=yield this.imageManager.getImages(t.icons);this._updateTilesForChangedImages();let i=this.tileManagers[t.source];return i&&i.setDependencies(t.tileID.key,t.type,t.icons),r})}getGlyphs(e,t){return Ki(this,null,function*(){let r=yield this.glyphManager.getGlyphs(t.stacks),i=this.tileManagers[t.source];return i&&i.setDependencies(t.tileID.key,t.type,[""]),r})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,t={}){this._checkLoaded(),!(e&&this._validate(ch.glyphs,"glyphs",e,null,t))&&(this._changed=!0,this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}getFontFaces(){return this.stylesheet["font-faces"]||null}setFontFaces(e){this._checkLoaded(),this._changed=!0,this._glyphsDidChange=!0,this.stylesheet["font-faces"]=e,this.glyphManager.setFontFaces(e)}getDashes(e,t){return Ki(this,null,function*(){let r={};for(let[i,n]of Object.entries(t.dashes))r[i]=this.lineAtlas.getDash(n.dasharray,n.round);return r})}addSprite(e,t,r={},i){this._checkLoaded();let n=[{id:e,url:t}],a=[...vq(this.stylesheet.sprite),...n];this._validate(ch.sprite,"sprite",a,null,r)||(this.stylesheet.sprite=a,this._loadSprite(n,!0,i))}removeSprite(e){this._checkLoaded();let t=vq(this.stylesheet.sprite);if(!t.find(i=>i.id===e)){this.fire(new An(Error(`Sprite "${e}" doesn't exists on this map.`)));return}let r=this.imageManager.removeSpriteImages(e);this._markImagesChanged(r),t.splice(t.findIndex(i=>i.id===e),1),this.stylesheet.sprite=t.length>0?t:void 0,this._imagesListDirty=!0,this._changed=!0,this.fire(new rp("data"))}getSprite(){return vq(this.stylesheet.sprite)}setSprite(e,t={},r){this._checkLoaded(),!(e&&this._validate(ch.sprite,"sprite",e,null,t))&&(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,r):(this._unloadSprite(),r&&r(null)))}destroy(){this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._loadStyleRequest&&(this._loadStyleRequest=(this._loadStyleRequest.abort(),null)),this._spriteRequest&&(this._spriteRequest=(this._spriteRequest.abort(),null));for(let e in this.tileManagers){let t=this.tileManagers[e];t.setEventedParent(null),t.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this.patternAtlas.destroy()),this.glyphManager&&this.glyphManager.destroy();for(let e in this._layers){let t=this._layers[e];t.setEventedParent(null),t.onRemove&&t.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}},fwr=ol([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),hwr=class{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,t,r,i,n,a,o,s,l){this.context=e;let u=this.boundPaintVertexBuffers.length!==i.length;for(let c=0;!u&&c<i.length;c++)this.boundPaintVertexBuffers[c]!==i[c]&&(u=!0);!this.vao||this.boundProgram!==t||this.boundLayoutVertexBuffer!==r||u||this.boundIndexBuffer!==n||this.boundVertexOffset!==a||this.boundDynamicVertexBuffer!==o||this.boundDynamicVertexBuffer2!==s||this.boundDynamicVertexBuffer3!==l?this.freshBind(t,r,i,n,a,o,s,l):e.bindVertexArray.set(this.vao)}freshBind(e,t,r,i,n,a,o,s){let l=e.numAttributes,u=this.context,c=u.gl;this.vao&&this.destroy(),this.vao=u.createVertexArray(),u.bindVertexArray.set(this.vao),this.boundProgram=e,this.boundLayoutVertexBuffer=t,this.boundPaintVertexBuffers=r,this.boundIndexBuffer=i,this.boundVertexOffset=n,this.boundDynamicVertexBuffer=a,this.boundDynamicVertexBuffer2=o,this.boundDynamicVertexBuffer3=s,t.enableAttributes(c,e);for(let f of r)f.enableAttributes(c,e);a&&a.enableAttributes(c,e),o&&o.enableAttributes(c,e),s&&s.enableAttributes(c,e),t.bind(),t.setVertexAttribPointers(c,e,n);for(let f of r)f.bind(),f.setVertexAttribPointers(c,e,n);a&&(a.bind(),a.setVertexAttribPointers(c,e,n)),i&&i.bind(),o&&(o.bind(),o.setVertexAttribPointers(c,e,n)),s&&(s.bind(),s.setVertexAttribPointers(c,e,n)),u.currentNumAttributes=l}destroy(){this.vao&&(this.vao=(this.context.deleteVertexArray(this.vao),null))}},dwr=(e,t)=>({u_depth:new wn(e,t.u_depth),u_terrain:new wn(e,t.u_terrain)}),pwr=(e,t)=>({u_texture:new wn(e,t.u_texture),u_ele_delta:new qi(e,t.u_ele_delta),u_fog_matrix:new ep(e,t.u_fog_matrix),u_fog_color:new Rm(e,t.u_fog_color),u_fog_ground_blend:new qi(e,t.u_fog_ground_blend),u_fog_ground_blend_opacity:new qi(e,t.u_fog_ground_blend_opacity),u_horizon_color:new Rm(e,t.u_horizon_color),u_horizon_fog_blend:new qi(e,t.u_horizon_fog_blend),u_is_globe_mode:new qi(e,t.u_is_globe_mode)}),vwr=(e,t)=>({u_ele_delta:new qi(e,t.u_ele_delta)}),gwr=(e,t,r,i,n)=>({u_texture:0,u_ele_delta:e,u_fog_matrix:t,u_fog_color:r?r.properties.get("fog-color"):ea.white,u_fog_ground_blend:r?r.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:n?0:r?r.calculateFogBlendOpacity(i):0,u_horizon_color:r?r.properties.get("horizon-color"):ea.white,u_horizon_fog_blend:r?r.properties.get("horizon-fog-blend"):1,u_is_globe_mode:+!!n}),mwr=e=>({u_ele_delta:e}),Cq={ProjectionUBO:0,TerrainUBO:1,FrameUBO:2};xwr={float:[1,1],int:[1,1],vec2:[2,2],vec4:[4,4],mat4:[16,4]};Iae=class{constructor(e,t,r){this.context=e,this.binding=t,this.contentWords=r.contentWords;let i=e.gl;this.buffer=i.createBuffer(),i.bindBuffer(i.UNIFORM_BUFFER,this.buffer),i.bufferData(i.UNIFORM_BUFFER,r.sizeWords*4,i.DYNAMIC_DRAW),i.bindBufferBase(i.UNIFORM_BUFFER,t,this.buffer),this.uploaded=new Float32Array(r.sizeWords),this.pending=new Float32Array(r.sizeWords),this.uploadedWords=new Uint32Array(this.uploaded.buffer),this.pendingWords=new Uint32Array(this.pending.buffer),this.hasData=!1,this.bindingDirty=!1}upload(){let e=this.context.gl,t=!this.hasData;if(!t){let r=this.pendingWords,i=this.uploadedWords;for(let n=0;n<this.contentWords;n++)if(r[n]!==i[n]){t=!0;break}}this.bindingDirty&&(this.bindingDirty=(e.bindBufferBase(e.UNIFORM_BUFFER,this.binding,this.buffer),!1)),t&&(e.bindBuffer(e.UNIFORM_BUFFER,this.buffer),e.bufferSubData(e.UNIFORM_BUFFER,0,this.pending),this.uploaded.set(this.pending),this.hasData=!0)}destroy(){let e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)}},jot=Pae([{name:"u_projection_matrix",type:"mat4"},{name:"u_projection_fallback_matrix",type:"mat4"},{name:"u_projection_tile_mercator_coords",type:"vec4"},{name:"u_projection_clipping_plane",type:"vec4"},{name:"u_projection_transition",type:"float"},{name:"u_projection_clip_antimeridian",type:"int"}]),HT=jot.offsets;$ot=Pae([{name:"u_terrain_matrix",type:"mat4"},{name:"u_terrain_unpack",type:"vec4"},{name:"u_terrain_dim",type:"float"},{name:"u_terrain_exaggeration",type:"float"}]),sq=$ot.offsets;Mwr=class{constructor(e,t,r,i,n,a,o,s,l=[]){let u=e.gl;this.program=u.createProgram();let c=Gne(t.staticAttributes),f=r?r.getBinderAttributes():[],h=c.concat(f),d=tg.prelude.staticUniforms?Gne(tg.prelude.staticUniforms):[],p=t.staticUniforms?Gne(t.staticUniforms):[],v=r?r.getBinderUniforms():[],m=d.concat(p).concat(v),g=[];for(let y of m)g.includes(y)||g.push(y);let w=r?r.defines():[];w.unshift("#version 300 es"),n&&w.push("#define OVERDRAW_INSPECTOR;"),a&&w.push("#define TERRAIN3D;"),s&&w.push(s),l&&w.push(...l);let b=w.concat(tg.prelude.fragmentSource,o.fragmentSource,t.fragmentSource).join(`
`),_=w.concat(tg.prelude.vertexSource,o.vertexSource,t.vertexSource).join(`
`),M=u.createShader(u.FRAGMENT_SHADER);if(u.isContextLost()){this.failedToCreate=!0;return}u.shaderSource(M,b),u.compileShader(M),u.attachShader(this.program,M);let x=u.createShader(u.VERTEX_SHADER);if(u.isContextLost()){this.failedToCreate=!0;return}u.shaderSource(x,_),u.compileShader(x),u.attachShader(this.program,x),this.attributes={};let T={};if(this.numAttributes=h.length,u.linkProgram(this.program),!u.getProgramParameter(this.program,u.LINK_STATUS)){if(u.isContextLost()){this.failedToCreate=!0;return}throw u.getShaderParameter(M,u.COMPILE_STATUS)?u.getShaderParameter(x,u.COMPILE_STATUS)?Error(`Program failed to link: ${u.getProgramInfoLog(this.program)}`):Error(`Could not compile vertex shader: ${u.getShaderInfoLog(x)}`):Error(`Could not compile fragment shader: ${u.getShaderInfoLog(M)}`)}ywr(u,this.program);let A=Awr(u,this.program);for(let y of h){if(!y)continue;let E=u.getAttribLocation(this.program,y);E>=0&&(this.attributes[y]={location:E,isInteger:A.has(y)})}u.deleteShader(x),u.deleteShader(M);for(let y of g)if(y&&!T[y]){let E=u.getUniformLocation(this.program,y);E&&(T[y]=E)}this.fixedUniforms=i(e,T),this.terrainUniforms=dwr(e,T),this.binderUniforms=r?r.getUniforms(e,T):[]}draw(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p,v,m,g,w){var M;let b=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(r),e.setStencilMode(i),e.setColorMode(n),e.setCullFace(a),s){e.activeTexture.set(b.TEXTURE2),b.bindTexture(b.TEXTURE_2D,s.depthTexture),e.activeTexture.set(b.TEXTURE3),b.bindTexture(b.TEXTURE_2D,s.texture);for(let x in this.terrainUniforms)this.terrainUniforms[x].set(s[x]);Twr(e.terrainUniformBuffer,s)}if(l&&bwr(e.projectionUniformBuffer,l),o)for(let x in this.fixedUniforms)this.fixedUniforms[x].set(o[x]);v&&v.setUniforms(e,this.binderUniforms,d,{zoom:p});let _=0;switch(t){case b.LINES:_=2;break;case b.TRIANGLES:_=3;break;case b.LINE_STRIP:_=1}for(let x of h.get())x.vaos||(x.vaos={}),(M=x.vaos)[u]||(M[u]=new hwr),x.vaos[u].bind(e,this,c,v?v.getPaintVertexBuffers():[],f,x.vertexOffset,m,g,w),b.drawElements(t,x.primitiveLength*_,b.UNSIGNED_SHORT,x.primitiveOffset*_*2)}};Ewr=(e,t)=>({u_lightpos:new Rf(e,t.u_lightpos),u_lightpos_globe:new Rf(e,t.u_lightpos_globe),u_lightintensity:new qi(e,t.u_lightintensity),u_lightcolor:new Rf(e,t.u_lightcolor),u_vertical_gradient:new qi(e,t.u_vertical_gradient),u_opacity:new qi(e,t.u_opacity),u_fill_translate:new pa(e,t.u_fill_translate)}),kwr=(e,t)=>({u_lightpos:new Rf(e,t.u_lightpos),u_lightpos_globe:new Rf(e,t.u_lightpos_globe),u_lightintensity:new qi(e,t.u_lightintensity),u_lightcolor:new Rf(e,t.u_lightcolor),u_vertical_gradient:new qi(e,t.u_vertical_gradient),u_height_factor:new qi(e,t.u_height_factor),u_opacity:new qi(e,t.u_opacity),u_fill_translate:new pa(e,t.u_fill_translate),u_image:new wn(e,t.u_image),u_texsize:new pa(e,t.u_texsize),u_pixel_coord_upper:new pa(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new pa(e,t.u_pixel_coord_lower),u_scale:new Rf(e,t.u_scale),u_fade:new qi(e,t.u_fade)}),Yot=(e,t,r,i)=>{let n=e.style.light,a=n.getCartesianPosition(),o=hie();n.properties.get("anchor")==="viewport"&&Det(o,e.transform.bearingInRadians),Oet(a,a,o);let s=e.transform.transformLightDirection(a),l=n.properties.get("color");return{u_lightpos:a,u_lightpos_globe:s,u_lightintensity:n.properties.get("intensity"),u_lightcolor:[l.r,l.g,l.b],u_vertical_gradient:+t,u_opacity:r,u_fill_translate:i}},Cwr=(e,t,r,i,n,a,o)=>ln(Yot(e,t,r,i),Wot(a,e,o),{u_height_factor:-(2**n.overscaledZ)/o.tileSize/8}),Dwr=(e,t)=>({u_fill_translate:new pa(e,t.u_fill_translate)}),Fwr=(e,t)=>({u_image:new wn(e,t.u_image),u_texsize:new pa(e,t.u_texsize),u_pixel_coord_upper:new pa(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new pa(e,t.u_pixel_coord_lower),u_scale:new Rf(e,t.u_scale),u_fade:new qi(e,t.u_fade),u_sdf_pattern:new wn(e,t.u_sdf_pattern),u_fill_translate:new pa(e,t.u_fill_translate)}),Lwr=(e,t)=>({u_fill_translate:new pa(e,t.u_fill_translate)}),Pwr=(e,t)=>({u_image:new wn(e,t.u_image),u_texsize:new pa(e,t.u_texsize),u_pixel_coord_upper:new pa(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new pa(e,t.u_pixel_coord_lower),u_scale:new Rf(e,t.u_scale),u_fade:new qi(e,t.u_fade),u_sdf_pattern:new wn(e,t.u_sdf_pattern),u_fill_translate:new pa(e,t.u_fill_translate)}),Xot=(e,t,r,i,n)=>ln(Wot(t,e,r),{u_fill_translate:i,u_sdf_pattern:+!!n}),Iwr=e=>({u_fill_translate:e}),Rwr=e=>({u_fill_translate:e}),zwr=(e,t,r,i,n)=>Xot(e,t,r,i,n),Bwr=(e,t)=>({u_scale_with_map:new wn(e,t.u_scale_with_map),u_pitch_with_map:new wn(e,t.u_pitch_with_map),u_extrude_scale:new pa(e,t.u_extrude_scale),u_globe_extrude_scale:new qi(e,t.u_globe_extrude_scale),u_translate:new pa(e,t.u_translate)}),qwr=(e,t,r,i,n)=>{let a=e.transform,o,s,l=0;if(r.paint.get("circle-pitch-alignment")==="map"){let u=Zh(t,1,a.zoom);o=!0,s=[u,u],l=u/(zr*2**t.tileID.overscaledZ)*2*Math.PI*n}else o=!1,s=a.pixelsToGLUnits;return{u_scale_with_map:+(r.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+o,u_extrude_scale:s,u_globe_extrude_scale:l,u_translate:i}},Owr=(e,t)=>({u_color:new Rm(e,t.u_color),u_overlay:new wn(e,t.u_overlay),u_overlay_scale:new qi(e,t.u_overlay_scale)}),kat=(e,t=1)=>({u_color:e,u_overlay:0,u_overlay_scale:t}),Nwr=(e,t)=>({u_extrude_scale:new qi(e,t.u_extrude_scale),u_intensity:new qi(e,t.u_intensity),u_globe_extrude_scale:new qi(e,t.u_globe_extrude_scale)}),Uwr=(e,t)=>({u_matrix:new ep(e,t.u_matrix),u_image:new wn(e,t.u_image),u_color_ramp:new wn(e,t.u_color_ramp),u_opacity:new qi(e,t.u_opacity)}),Zot=(e,t,r,i)=>{let n=Zh(e,1,t)/(zr*2**e.tileID.overscaledZ)*2*Math.PI*i;return{u_extrude_scale:Zh(e,1,t),u_intensity:r,u_globe_extrude_scale:n}},Kot=(e,t,r,i)=>{let n=Em();return wv(n,0,e.width,e.height,0,0,1),{u_matrix:n,u_image:r,u_color_ramp:i,u_opacity:t.paint.get("heatmap-opacity")}},Vwr=(e,t)=>({u_image:new wn(e,t.u_image),u_latrange:new pa(e,t.u_latrange),u_exaggeration:new qi(e,t.u_exaggeration),u_altitudes:new Kie(e,t.u_altitudes),u_azimuths:new Kie(e,t.u_azimuths),u_accent:new Rm(e,t.u_accent),u_method:new wn(e,t.u_method),u_shadows:new Zie(e,t.u_shadows),u_highlights:new Zie(e,t.u_highlights)}),Gwr=(e,t)=>({u_matrix:new ep(e,t.u_matrix),u_image:new wn(e,t.u_image),u_dimension:new pa(e,t.u_dimension),u_zoom:new qi(e,t.u_zoom),u_unpack:new OT(e,t.u_unpack)}),Hwr=(e,t,r)=>{let i=r.paint.get("hillshade-accent-color"),n;switch(r.paint.get("hillshade-method")){case"basic":n=4;break;case"combined":n=1;break;case"igor":n=2;break;case"multidirectional":n=3;break;default:n=0}let a=r.getIlluminationProperties();for(let o=0;o<a.directionRadians.length;o++)r.paint.get("hillshade-illumination-anchor")==="viewport"&&(a.directionRadians[o]+=e.transform.bearingInRadians);return{u_image:0,u_latrange:$wr(e,t.tileID),u_exaggeration:r.paint.get("hillshade-exaggeration"),u_altitudes:a.altitudeRadians,u_azimuths:a.directionRadians,u_accent:i,u_method:n,u_highlights:a.highlightColor,u_shadows:a.shadowColor}},jwr=(e,t)=>{let r=t.stride,i=Em();return wv(i,0,zr,-zr,0,0,1),eu(i,i,[0,-zr,0]),{u_matrix:i,u_image:1,u_dimension:[r,r],u_zoom:e.overscaledZ,u_unpack:t.getUnpackVector()}};Wwr=(e,t)=>({u_image:new wn(e,t.u_image),u_unpack:new OT(e,t.u_unpack),u_dimension:new pa(e,t.u_dimension),u_elevation_stops:new wn(e,t.u_elevation_stops),u_color_stops:new wn(e,t.u_color_stops),u_color_ramp_size:new wn(e,t.u_color_ramp_size),u_opacity:new qi(e,t.u_opacity)}),Ywr=(e,t,r=0)=>({u_image:0,u_unpack:t.getUnpackVector(),u_dimension:[t.stride,t.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:r,u_opacity:e.paint.get("color-relief-opacity")}),Xwr=(e,t)=>({u_translation:new pa(e,t.u_translation),u_ratio:new qi(e,t.u_ratio)}),Zwr=(e,t)=>({u_translation:new pa(e,t.u_translation),u_ratio:new qi(e,t.u_ratio),u_image:new wn(e,t.u_image),u_image_height:new qi(e,t.u_image_height)}),Kwr=(e,t)=>({u_translation:new pa(e,t.u_translation),u_texsize:new pa(e,t.u_texsize),u_ratio:new qi(e,t.u_ratio),u_image:new wn(e,t.u_image),u_scale:new Rf(e,t.u_scale),u_fade:new qi(e,t.u_fade)}),Jwr=(e,t)=>({u_translation:new pa(e,t.u_translation),u_ratio:new qi(e,t.u_ratio),u_image:new wn(e,t.u_image),u_mix:new qi(e,t.u_mix),u_tileratio:new qi(e,t.u_tileratio),u_crossfade_from:new qi(e,t.u_crossfade_from),u_crossfade_to:new qi(e,t.u_crossfade_to),u_lineatlas_width:new qi(e,t.u_lineatlas_width),u_lineatlas_height:new qi(e,t.u_lineatlas_height)}),Qwr=(e,t)=>({u_translation:new pa(e,t.u_translation),u_ratio:new qi(e,t.u_ratio),u_image:new wn(e,t.u_image),u_image_height:new qi(e,t.u_image_height),u_tileratio:new qi(e,t.u_tileratio),u_crossfade_from:new qi(e,t.u_crossfade_from),u_crossfade_to:new qi(e,t.u_crossfade_to),u_image_dash:new wn(e,t.u_image_dash),u_mix:new qi(e,t.u_mix),u_lineatlas_width:new qi(e,t.u_lineatlas_width),u_lineatlas_height:new qi(e,t.u_lineatlas_height)}),Dq=(e,t,r,i)=>{let n=e.transform;return{u_translation:Jot(e,t,r),u_ratio:i/Zh(t,1,n.zoom)}},e5r=(e,t,r,i,n)=>ln(Dq(e,t,r,i),{u_image:0,u_image_height:n}),t5r=(e,t,r,i,n)=>{let a=e.transform,o=Rae(t,a);return{u_translation:Jot(e,t,r),u_texsize:t.imageAtlasTexture.size,u_ratio:i/Zh(t,1,a.zoom),u_image:0,u_scale:[o,n.fromScale,n.toScale],u_fade:n.t}},r5r=(e,t,r,i,n)=>{let a=e.transform,o=Rae(t,a);return ln(Dq(e,t,r,i),{u_tileratio:o,u_crossfade_from:n.fromScale,u_crossfade_to:n.toScale,u_image:0,u_mix:n.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})},i5r=(e,t,r,i,n,a)=>{let o=e.transform,s=Rae(t,o);return ln(Dq(e,t,r,i),{u_image:0,u_image_height:a,u_tileratio:s,u_crossfade_from:n.fromScale,u_crossfade_to:n.toScale,u_image_dash:1,u_mix:n.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})};n5r=(e,t)=>({u_image:new wn(e,t.u_image),u_opacity:new qi(e,t.u_opacity)}),a5r=(e,t)=>({u_image:t,u_opacity:e}),o5r=(e,t)=>({u_is_size_zoom_constant:new wn(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new wn(e,t.u_is_size_feature_constant),u_size_t:new qi(e,t.u_size_t),u_size:new qi(e,t.u_size),u_rotate_symbol:new wn(e,t.u_rotate_symbol),u_label_plane_matrix:new ep(e,t.u_label_plane_matrix),u_coord_matrix:new ep(e,t.u_coord_matrix),u_is_text:new wn(e,t.u_is_text),u_pitch_with_map:new wn(e,t.u_pitch_with_map),u_is_along_line:new wn(e,t.u_is_along_line),u_is_variable_anchor:new wn(e,t.u_is_variable_anchor),u_texsize:new pa(e,t.u_texsize),u_texture:new wn(e,t.u_texture),u_translation:new pa(e,t.u_translation),u_pitched_scale:new qi(e,t.u_pitched_scale),u_is_offset:new wn(e,t.u_is_offset),u_height_anchor_ground:new wn(e,t.u_height_anchor_ground)}),s5r=(e,t)=>({u_is_size_zoom_constant:new wn(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new wn(e,t.u_is_size_feature_constant),u_size_t:new qi(e,t.u_size_t),u_size:new qi(e,t.u_size),u_rotate_symbol:new wn(e,t.u_rotate_symbol),u_label_plane_matrix:new ep(e,t.u_label_plane_matrix),u_coord_matrix:new ep(e,t.u_coord_matrix),u_is_text:new wn(e,t.u_is_text),u_pitch_with_map:new wn(e,t.u_pitch_with_map),u_is_along_line:new wn(e,t.u_is_along_line),u_is_variable_anchor:new wn(e,t.u_is_variable_anchor),u_texsize:new pa(e,t.u_texsize),u_texture:new wn(e,t.u_texture),u_gamma_scale:new qi(e,t.u_gamma_scale),u_is_halo:new wn(e,t.u_is_halo),u_is_plain:new wn(e,t.u_is_plain),u_translation:new pa(e,t.u_translation),u_pitched_scale:new qi(e,t.u_pitched_scale),u_is_offset:new wn(e,t.u_is_offset),u_height_anchor_ground:new wn(e,t.u_height_anchor_ground)}),l5r=(e,t)=>({u_is_size_zoom_constant:new wn(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new wn(e,t.u_is_size_feature_constant),u_size_t:new qi(e,t.u_size_t),u_size:new qi(e,t.u_size),u_rotate_symbol:new wn(e,t.u_rotate_symbol),u_label_plane_matrix:new ep(e,t.u_label_plane_matrix),u_coord_matrix:new ep(e,t.u_coord_matrix),u_is_text:new wn(e,t.u_is_text),u_pitch_with_map:new wn(e,t.u_pitch_with_map),u_is_along_line:new wn(e,t.u_is_along_line),u_is_variable_anchor:new wn(e,t.u_is_variable_anchor),u_texsize:new pa(e,t.u_texsize),u_texsize_icon:new pa(e,t.u_texsize_icon),u_texture:new wn(e,t.u_texture),u_texture_icon:new wn(e,t.u_texture_icon),u_gamma_scale:new qi(e,t.u_gamma_scale),u_is_halo:new wn(e,t.u_is_halo),u_translation:new pa(e,t.u_translation),u_pitched_scale:new qi(e,t.u_pitched_scale),u_is_offset:new wn(e,t.u_is_offset),u_height_anchor_ground:new wn(e,t.u_height_anchor_ground)}),Qot=(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p)=>({u_is_size_zoom_constant:+(e==="constant"||e==="source"),u_is_size_feature_constant:+(e==="constant"||e==="camera"),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_rotate_symbol:+r,u_label_plane_matrix:s,u_coord_matrix:l,u_is_text:+c,u_pitch_with_map:+i,u_is_along_line:n,u_is_variable_anchor:a,u_texsize:f,u_texture:0,u_translation:u,u_pitched_scale:h,u_is_offset:d,u_height_anchor_ground:+p}),est=(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p,v)=>{let m=o.transform;return ln(Qot(e,t,r,i,n,a,o,s,l,u,c,f,d,p,v),{u_gamma_scale:i?Math.cos(m.pitch*Math.PI/180)*m.cameraToCenterDistance:1,u_is_halo:+!!h,u_is_plain:1})},u5r=(e,t,r,i,n,a,o,s,l,u,c,f,h,d,p)=>ln(est(e,t,r,i,n,a,o,s,l,u,!0,c,!0,h,d,p),{u_texsize_icon:f,u_texture_icon:1}),c5r=(e,t)=>({u_opacity:new qi(e,t.u_opacity),u_color:new Rm(e,t.u_color)}),f5r=(e,t)=>({u_opacity:new qi(e,t.u_opacity),u_image:new wn(e,t.u_image),u_pattern_tl_a:new pa(e,t.u_pattern_tl_a),u_pattern_br_a:new pa(e,t.u_pattern_br_a),u_pattern_tl_b:new pa(e,t.u_pattern_tl_b),u_pattern_br_b:new pa(e,t.u_pattern_br_b),u_texsize:new pa(e,t.u_texsize),u_mix:new qi(e,t.u_mix),u_pattern_size_a:new pa(e,t.u_pattern_size_a),u_pattern_size_b:new pa(e,t.u_pattern_size_b),u_scale_a:new qi(e,t.u_scale_a),u_scale_b:new qi(e,t.u_scale_b),u_pixel_coord_upper:new pa(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new pa(e,t.u_pixel_coord_lower),u_tile_units_to_pixels:new qi(e,t.u_tile_units_to_pixels)}),h5r=(e,t)=>({u_opacity:e,u_color:t}),d5r=(e,t,r,i,n)=>ln(Swr(r,n,t,i),{u_opacity:e}),p5r=(e,t)=>({u_sun_pos:new Rf(e,t.u_sun_pos),u_atmosphere_blend:new qi(e,t.u_atmosphere_blend),u_globe_position:new Rf(e,t.u_globe_position),u_globe_radius:new qi(e,t.u_globe_radius),u_inv_proj_matrix:new ep(e,t.u_inv_proj_matrix)}),v5r=(e,t,r,i,n)=>({u_sun_pos:e,u_atmosphere_blend:t,u_globe_position:r,u_globe_radius:i,u_inv_proj_matrix:n}),g5r=(e,t)=>({u_sky_color:new Rm(e,t.u_sky_color),u_horizon_color:new Rm(e,t.u_horizon_color),u_horizon:new pa(e,t.u_horizon),u_horizon_normal:new pa(e,t.u_horizon_normal),u_sky_horizon_blend:new qi(e,t.u_sky_horizon_blend),u_sky_blend:new qi(e,t.u_sky_blend),u_inv_proj_matrix:new ep(e,t.u_inv_proj_matrix),u_globe_position:new Rf(e,t.u_globe_position),u_globe_radius:new qi(e,t.u_globe_radius)}),m5r=(e,t,r)=>{let i=Math.cos(t.rollInRadians),n=Math.sin(t.rollInRadians),a=UT(t),o=t.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:e.properties.get("sky-color"),u_horizon_color:e.properties.get("horizon-color"),u_horizon:[(t.width/2-a*n)*r,(t.height/2+a*i)*r],u_horizon_normal:[-n,i],u_sky_horizon_blend:e.properties.get("sky-horizon-blend")*t.height/2*r,u_sky_blend:o,u_inv_proj_matrix:t.inverseProjectionMatrix,u_globe_position:Oot(t),u_globe_radius:YT(t.worldSize,t.center.lat)}},lq=(e,t)=>({}),y5r={fillExtrusion:Ewr,fillExtrusionPattern:kwr,fill:Dwr,fillPattern:Fwr,fillOutline:Lwr,fillOutlinePattern:Pwr,circle:Bwr,collisionBox:lq,collisionCircle:lq,debug:Owr,depth:lq,clippingMask:lq,heatmap:Nwr,heatmapTexture:Uwr,hillshade:Vwr,hillshadePrepare:Gwr,colorRelief:Wwr,line:Xwr,lineGradient:Zwr,linePattern:Kwr,lineSDF:Jwr,lineGradientSDF:Qwr,layerOpacity:n5r,raster:Rbr,symbolIcon:o5r,symbolSDF:s5r,symbolTextAndIcon:l5r,background:c5r,backgroundPattern:f5r,terrain:pwr,terrainDepth:vwr,atmosphere:p5r,sky:g5r},x5r=class{constructor(e,t,r){this.context=e;let i=e.gl;this.buffer=i.createBuffer(),this.dynamicDraw=!!r,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||t.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){let t=this.context.gl;if(!this.dynamicDraw)throw Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){let e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)}},Cat={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},_5r=class{constructor(e,t,r,i){this.length=t.length,this.attributes=r,this.itemSize=t.bytesPerElement,this.dynamicDraw=i,this.context=e;let n=e.gl;this.buffer=n.createBuffer(),e.bindVertexBuffer.set(this.buffer),n.bufferData(n.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||t.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);let t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,t){for(let r of this.attributes){let i=t.attributes[r.name];i!==void 0&&e.enableVertexAttribArray(i.location)}}setVertexAttribPointers(e,t,r){for(let i of this.attributes){let n=t.attributes[i.name];if(n!==void 0){let a=i.offset+this.itemSize*(r||0);n.isInteger?e.vertexAttribIPointer(n.location,i.components,e[Cat[i.type]],this.itemSize,a):e.vertexAttribPointer(n.location,i.components,e[Cat[i.type]],!1,this.itemSize,a)}}}destroy(){let e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)}},No=class{constructor(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(e){}getDefault(){return this.default}setDefault(){this.set(this.default)}},b5r=class extends No{getDefault(){return ea.transparent}set(e){let t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}},w5r=class extends No{getDefault(){return 1}set(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)}},T5r=class extends No{getDefault(){return 0}set(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)}},A5r=class extends No{getDefault(){return[!0,!0,!0,!0]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}},M5r=class extends No{getDefault(){return!0}set(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)}},S5r=class extends No{getDefault(){return 255}set(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)}},E5r=class extends No{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(e){let t=this.current;(e.func!==t.func||e.ref!==t.ref||e.mask!==t.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)}},k5r=class extends No{getDefault(){let e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)}},C5r=class extends No{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.STENCIL_TEST):t.disable(t.STENCIL_TEST),this.current=e,this.dirty=!1}},D5r=class extends No{getDefault(){return[0,1]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)}},F5r=class extends No{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.DEPTH_TEST):t.disable(t.DEPTH_TEST),this.current=e,this.dirty=!1}},L5r=class extends No{getDefault(){return this.gl.LESS}set(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)}},P5r=class extends No{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.BLEND):t.disable(t.BLEND),this.current=e,this.dirty=!1}},I5r=class extends No{getDefault(){let e=this.gl;return[e.ONE,e.ZERO]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)}},R5r=class extends No{getDefault(){return ea.transparent}set(e){let t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}},z5r=class extends No{getDefault(){return this.gl.FUNC_ADD}set(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)}},B5r=class extends No{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.CULL_FACE):t.disable(t.CULL_FACE),this.current=e,this.dirty=!1}},q5r=class extends No{getDefault(){return this.gl.BACK}set(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)}},O5r=class extends No{getDefault(){return this.gl.CCW}set(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)}},N5r=class extends No{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)}},U5r=class extends No{getDefault(){return this.gl.TEXTURE0}set(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)}},V5r=class extends No{getDefault(){let e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}},G5r=class extends No{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,e),this.current=e,this.dirty=!1}},H5r=class extends No{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindRenderbuffer(t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},j5r=class extends No{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindTexture(t.TEXTURE_2D,e),this.current=e,this.dirty=!1}},$5r=class extends No{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}},W5r=class extends No{getDefault(){return null}set(e){let t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1}},Y5r=class extends No{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.bindVertexArray(e),this.current=e,this.dirty=!1)}},X5r=class extends No{getDefault(){return 4}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}},Z5r=class extends No{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}},K5r=class extends No{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}},zae=class extends No{constructor(e,t){super(e),this.context=e,this.parent=t}getDefault(){return null}},J5r=class extends zae{setDirty(){this.dirty=!0}set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}},Q5r=class extends zae{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},e4r=class extends zae{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},t4r=class{constructor(e,t,r,i,n){this.context=e,this.width=t,this.height=r;let a=e.gl,o=this.framebuffer=a.createFramebuffer();if(this.colorAttachment=new J5r(e,o),i)this.depthAttachment=n?new e4r(e,o):new Q5r(e,o);else if(n)throw Error("Stencil cannot be set without depth")}destroy(){let e=this.context.gl,t=this.colorAttachment.get();if(t&&e.deleteTexture(t),this.depthAttachment){let r=this.depthAttachment.get();r&&e.deleteRenderbuffer(r)}e.deleteFramebuffer(this.framebuffer)}},tst=Pae([{name:"u_units_to_pixels",type:"vec2"},{name:"u_world_size",type:"vec2"},{name:"u_camera_to_center_distance",type:"float"},{name:"u_symbol_fade_change",type:"float"},{name:"u_aspect_ratio",type:"float"},{name:"u_device_pixel_ratio",type:"float"},{name:"u_viewport_size",type:"vec2"},{name:"u_pixel_extrude_scale",type:"vec2"},{name:"u_pitch",type:"float"}]),q0=tst.offsets;ql=class{constructor(e,t,r){this.blendFunction=e,this.blendColor=t,this.mask=r}};ql.Replace=[1,0],ql.disabled=new ql(ql.Replace,ea.transparent,[!1,!1,!1,!1]),ql.unblended=new ql(ql.Replace,ea.transparent,[!0,!0,!0,!0]),ql.alphaBlended=new ql([1,771],ea.transparent,[!0,!0,!0,!0]);n4r=class{constructor(e){this.gl=e,this.clearColor=new b5r(this),this.clearDepth=new w5r(this),this.clearStencil=new T5r(this),this.colorMask=new A5r(this),this.depthMask=new M5r(this),this.stencilMask=new S5r(this),this.stencilFunc=new E5r(this),this.stencilOp=new k5r(this),this.stencilTest=new C5r(this),this.depthRange=new D5r(this),this.depthTest=new F5r(this),this.depthFunc=new L5r(this),this.blend=new P5r(this),this.blendFunc=new I5r(this),this.blendColor=new R5r(this),this.blendEquation=new z5r(this),this.cullFace=new B5r(this),this.cullFaceSide=new q5r(this),this.frontFace=new O5r(this),this.program=new N5r(this),this.activeTexture=new U5r(this),this.viewport=new V5r(this),this.bindFramebuffer=new G5r(this),this.bindRenderbuffer=new H5r(this),this.bindTexture=new j5r(this),this.bindVertexBuffer=new $5r(this),this.bindElementBuffer=new W5r(this),this.bindVertexArray=new Y5r(this),this.pixelStoreUnpack=new X5r(this),this.pixelStoreUnpackPremultiplyAlpha=new Z5r(this),this.pixelStoreUnpackFlipY=new K5r(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),e.getExtension("EXT_color_buffer_half_float"),e.getExtension("EXT_color_buffer_float"),this.projectionUniformBuffer=_wr(this),this.terrainUniformBuffer=wwr(this),this.frameUniformBuffer=r4r(this)}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,this.projectionUniformBuffer.bindingDirty=!0,this.terrainUniformBuffer.bindingDirty=!0,this.frameUniformBuffer.bindingDirty=!0}setCustomLayerDefaults(){this.unbindVAO(),this.cullFace.setDefault(),this.activeTexture.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}createIndexBuffer(e,t){return new x5r(this,e,t)}createVertexBuffer(e,t,r){return new _5r(this,e,t,r)}createRenderbuffer(e,t,r){let i=this.gl,n=i.createRenderbuffer();return this.bindRenderbuffer.set(n),i.renderbufferStorage(i.RENDERBUFFER,e,t,r),this.bindRenderbuffer.set(null),n}createFramebuffer(e,t,r,i){return new t4r(this,e,t,r,i)}clear({color:e,depth:t,stencil:r}){let i=this.gl,n=0;e&&(n|=i.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),t!==void 0&&(n|=i.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(t),this.depthMask.set(!0)),r!==void 0&&(n|=i.STENCIL_BUFFER_BIT,this.clearStencil.set(r),this.stencilMask.set(255)),i.clear(n)}setCullFace(e){e.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))}setDepthMode(e){e.func===this.gl.ALWAYS&&!e.mask?this.depthTest.set(!1):(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range))}setStencilMode(e){e.test.func===this.gl.ALWAYS&&!e.mask?this.stencilTest.set(!1):(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask}))}setColorMode(e){_v(e.blendFunction,ql.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)}createVertexArray(){return this.gl.createVertexArray()}deleteVertexArray(e){this.gl.deleteVertexArray(e)}unbindVAO(){this.bindVertexArray.set(null)}},Ba=class{constructor(e,t,r){this.func=e,this.mask=t,this.range=r}};Ba.ReadOnly=!1,Ba.ReadWrite=!0,Ba.disabled=new Ba(519,Ba.ReadOnly,[0,1]);Hne=7680,Fo=class{constructor(e,t,r,i,n,a){this.test=e,this.ref=t,this.mask=r,this.fail=i,this.depthFail=n,this.pass=a}};Fo.disabled=new Fo({func:519,mask:0},0,0,Hne,Hne,Hne);Dat=1029,jne=2305,To=class{constructor(e,t,r){this.enable=e,this.mode=t,this.frontFace=r}};To.disabled=new To(!1,Dat,jne),To.backCCW=new To(!0,Dat,jne),To.frontCCW=new To(!0,1028,jne);o4r=Qd(new Float32Array(16));zat=0;Xne=[new tr(0,0),new tr(zr,0),new tr(zr,zr),new tr(0,zr)];z4r=new ea(1,0,0,1),B4r=new ea(0,1,0,1),q4r=new ea(0,0,1,1),O4r=new ea(1,0,1,1),N4r=new ea(0,1,1,1);Q4r={symbol:s4r,circle:d4r,heatmap:p4r,line:M4r,fill:S4r,fillExtrusion:E4r,hillshade:k4r,colorRelief:D4r,raster:F4r,background:R4r,sky:Z4r,atmosphere:J4r,custom:W4r,debug:G4r,debugPadding:U4r,terrainDepth:Y4r};tTr=(u3=class{constructor(t,r){this.drawFunctions=Q4r,this.context=new n4r(t),this.transform=r,this.layerOpacityFbo=null,this._tileTextures={},this._rttObjectRecyclePool=[],this._rttSharedFbo=null,this.terrainFacilitator={depthDirty:!0,matrix:Qd(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=aae.maxOverzooming+aae.maxUnderzooming+1,this.depthEpsilon=1/2**16,this.crossTileSymbolIndex=new Eot}resize(t,r,i){if(this.width=Math.floor(t*i),this.height=Math.floor(r*i),this.pixelRatio=i,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let n of this.style._order)this.style._layers[n].resize()}setup(){let t=this.context,r=new Pm;r.emplaceBack(0,0),r.emplaceBack(zr,0),r.emplaceBack(0,zr),r.emplaceBack(zr,zr),this.tileExtentBuffer=t.createVertexBuffer(r,l3.members),this.tileExtentSegments=Ws.simpleSegment(0,0,4,2);let i=new Pm;i.emplaceBack(0,0),i.emplaceBack(zr,0),i.emplaceBack(0,zr),i.emplaceBack(zr,zr),this.debugBuffer=t.createVertexBuffer(i,l3.members),this.debugSegments=Ws.simpleSegment(0,0,4,5);let n=new Wrt;n.emplaceBack(0,0,0,0),n.emplaceBack(zr,0,zr,0),n.emplaceBack(0,zr,0,zr),n.emplaceBack(zr,zr,zr,zr),this.rasterBoundsBuffer=t.createVertexBuffer(n,fwr.members),this.rasterBoundsSegments=Ws.simpleSegment(0,0,4,2);let a=new Pm;a.emplaceBack(0,0),a.emplaceBack(zr,0),a.emplaceBack(0,zr),a.emplaceBack(zr,zr),this.rasterBoundsBufferPosOnly=t.createVertexBuffer(a,l3.members),this.rasterBoundsSegmentsPosOnly=Ws.simpleSegment(0,0,4,5);let o=new Pm;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=t.createVertexBuffer(o,l3.members),this.viewportSegments=Ws.simpleSegment(0,0,4,2);let s=new Zrt;s.emplaceBack(0),s.emplaceBack(1),s.emplaceBack(3),s.emplaceBack(2),s.emplaceBack(0),this.tileBorderIndexBuffer=t.createIndexBuffer(s);let l=new Mv;l.emplaceBack(1,0,2),l.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=t.createIndexBuffer(l);let u=this.context.gl;this.stencilClearMode=new Fo({func:u.ALWAYS,mask:0},0,255,u.ZERO,u.ZERO,u.ZERO),this.tileExtentMesh=new M8(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let t=this.context,r=t.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let i=Em();wv(i,0,this.width,this.height,0,0,1),Rc(i,i,[r.drawingBufferWidth,r.drawingBufferHeight,0]);let n={mainMatrix:i,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:i,clipAntimeridian:!1};this.useProgram("clippingMask",null,!0).draw(t,r.TRIANGLES,Ba.disabled,this.stencilClearMode,ql.disabled,To.disabled,null,null,n,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}renderTileClippingMasks(t,r,i){if(this.currentStencilSource===t.source||!t.isTileClipped()||!(r!=null&&r.length))return;this.currentStencilSource=t.source,this.nextStencilID+r.length>256&&this.clearStencil();let n=this.context;n.setColorMode(ql.disabled),n.setDepthMode(Ba.disabled);let a={};for(let o of r)a[o.key]=this.nextStencilID++;this.style.projection.useSubdivision&&this._renderTileMasks(a,r,i,!0),this._renderTileMasks(a,r,i,!1),this._tileClippingMaskIDs=a}_renderTileMasks(t,r,i,n){let a=this.context,o=a.gl,s=this.style.projection,l=this.transform,u=this.useProgram("clippingMask");for(let c of r){let f=t[c.key],h=this.getTerrainDataForTile(c,i),d=s.getMeshFromTileID(this.context,c.canonical,n,!0,"stencil"),p=l.getProjectionData({overscaledTileID:c,applyGlobeMatrix:!i,applyTerrainMatrix:!0});u.draw(a,o.TRIANGLES,Ba.disabled,new Fo({func:o.ALWAYS,mask:0},f,255,o.KEEP,o.KEEP,o.REPLACE),ql.disabled,i?To.disabled:To.backCCW,null,h,p,"$clipping",d.vertexBuffer,d.indexBuffer,d.segments)}}getTerrainDataForTile(t,r){var i,n;return r&&((i=this.style.projection)==null?void 0:i.name)==="mercator"?null:((n=this.style.map.terrain)==null?void 0:n.getTerrainData(t))||null}_renderTilesDepthBuffer(){var l;let t=this.context,r=t.gl,i=this.style.projection,n=this.transform,a=this.useProgram("depth"),o=this.getDepthModeFor3D(),s=ZT(n,{tileSize:n.tileSize});for(let u of s){let c=(l=this.style.map.terrain)==null?void 0:l.getTerrainData(u),f=i.getMeshFromTileID(this.context,u.canonical,!0,!0,"raster"),h=n.getProjectionData({overscaledTileID:u,applyGlobeMatrix:!0,applyTerrainMatrix:!0});a.draw(t,r.TRIANGLES,o,Fo.disabled,ql.disabled,To.backCCW,null,c,h,"$clipping",f.vertexBuffer,f.indexBuffer,f.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let t=this.nextStencilID++,r=this.context.gl;return new Fo({func:r.NOTEQUAL,mask:255},t,255,r.KEEP,r.KEEP,r.REPLACE)}stencilModeForClipping(t){let r=this.context.gl;return new Fo({func:r.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,r.KEEP,r.KEEP,r.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(t){let r=this.context.gl,i=t.sort((o,s)=>s.overscaledZ-o.overscaledZ),n=i[i.length-1].overscaledZ,a=i[0].overscaledZ-n+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();let o={};for(let s=0;s<a;s++)o[s+n]=new Fo({func:r.GEQUAL,mask:255},s+this.nextStencilID,255,r.KEEP,r.KEEP,r.REPLACE);return this.nextStencilID+=a,[o,i]}return[{[n]:Fo.disabled},i]}stencilConfigForOverlapTwoPass(t){let r=this.context.gl,i=t.sort((o,s)=>s.overscaledZ-o.overscaledZ),n=i[i.length-1].overscaledZ,a=i[0].overscaledZ-n+1;if(this.clearStencil(),a>1){let o={},s={};for(let l=0;l<a;l++)o[l+n]=new Fo({func:r.GREATER,mask:255},a+1+l,255,r.KEEP,r.KEEP,r.REPLACE),s[l+n]=new Fo({func:r.GREATER,mask:255},1+l,255,r.KEEP,r.KEEP,r.REPLACE);return this.nextStencilID=a*2+1,[o,s,i]}return this.nextStencilID=3,[{[n]:new Fo({func:r.GREATER,mask:255},2,255,r.KEEP,r.KEEP,r.REPLACE)},{[n]:new Fo({func:r.GREATER,mask:255},1,255,r.KEEP,r.KEEP,r.REPLACE)},i]}colorModeForRenderPass(){let t=this.context.gl;if(this._showOverdrawInspector){let r=.125;return new ql([t.CONSTANT_COLOR,t.ONE],new ea(r,r,r,0),[!0,!0,!0,!0])}return this.renderOptions.currentPass==="opaque"?ql.unblended:ql.alphaBlended}getDepthModeForSublayer(t,r,i){if(!this.opaquePassEnabledForLayer())return Ba.disabled;let n=1-((1+this.renderOptions.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new Ba(i||this.context.gl.LEQUAL,r,[n,n])}getDepthModeFor3D(){return new Ba(this.context.gl.LEQUAL,Ba.ReadWrite,this.renderOptions.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.renderOptions.currentLayer<this.renderOptions.opaquePassCutoff}render(t,r){var c,f;this.style=t,this.options=r;let i=this.renderOptions=eTr(this.transform,t.projection,(c=t.map.terrain)!=null?c:null);this.lineAtlas=t.lineAtlas,this.imageManager=t.imageManager,this.patternAtlas=t.patternAtlas,this.glyphManager=t.glyphManager,this.symbolFadeChange=t.placement.symbolFadeChange(Oo()),i4r(this.context.frameUniformBuffer,this),this.imageManager.beginFrame();let n=this.style._order,a=this.style.tileManagers,o={},s={},l={};for(let h in a){let d=a[h];d.used&&d.prepare(this.context),o[h]=d.getVisibleCoordinates(!1),s[h]=o[h].slice().reverse(),l[h]=d.getVisibleCoordinates(!0).reverse()}i.opaquePassCutoff=1/0;for(let h=0;h<n.length;h++){let d=n[h];if(this.style._layers[d].is3D()){i.opaquePassCutoff=h;break}}this.maybeDrawDepth(),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),i.opaquePassCutoff=0),i.currentPass="offscreen";for(let h of n){let d=this.style._layers[h];if(!d.hasOffscreenPass()||d.isHidden(this.transform.zoom))continue;let p=s[d.source];(d.type==="custom"||p.length)&&this.renderLayer(this,a[d.source],d,p,i)}if(this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?ea.black:ea.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=r.showOverdrawInspector,i.depthRangeFor3D=[0,1-(t._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(i.currentPass="opaque",i.currentLayer=n.length-1;i.currentLayer>=0;i.currentLayer--){let h=this.style._layers[n[i.currentLayer]];if(h.isHidden(this.transform.zoom))continue;let d=a[h.source],p=o[h.source];this.renderTileClippingMasks(h,p,!1),this.renderLayer(this,d,h,p,i)}i.currentPass="translucent";let u=!1;for(i.currentLayer=0;i.currentLayer<n.length;i.currentLayer++){let h=this.style._layers[n[i.currentLayer]];if(h.isHidden(this.transform.zoom))continue;let d=a[h.source];if((f=this.renderToTexture)!=null&&f.renderLayer(h,i))continue;!this.opaquePassEnabledForLayer()&&!u&&(u=!0,i.isRenderingGlobe&&!this.style.map.terrain&&this._renderTilesDepthBuffer());let p=(h.type==="symbol"?l:s)[h.source];this.renderTileClippingMasks(h,o[h.source],!!this.renderToTexture),this.renderLayer(this,d,h,p,i)}if(i.isRenderingGlobe&&this.drawFunctions.atmosphere(this,this.style.sky,this.style.light),this.options.showTileBoundaries){let h=$4r(this.style,this.transform.zoom);h&&this.drawFunctions.debug(this,h,h.getVisibleCoordinates())}this.options.showPadding&&this.drawFunctions.debugPadding(this),this.context.setDefault()}maybeDrawDepth(){var n,a;if(!((n=this.style)!=null&&n.projection)||!((a=this.style.map)!=null&&a.terrain))return;let t=this.terrainFacilitator.matrix,r=this.transform.modelViewProjectionMatrix,i=this.terrainFacilitator.depthDirty;i||(i=!Iet(t,r)),i||(i=this.style.map.terrain.tileManager.anyTilesAfterTime(this.terrainFacilitator.renderTime)),i&&(Fet(t,r),this.terrainFacilitator.renderTime=Oo(),this.terrainFacilitator.depthDirty=!1,this.drawFunctions.terrainDepth(this,this.style.map.terrain))}renderLayer(t,r,i,n,a){if(i.isHidden(this.transform.zoom)||i.type!=="background"&&i.type!=="custom"&&!(n||[]).length)return;this.id=i.id;let o=this.drawFunctions;vne(i)?o.symbol(t,r,i,n,this.style.placement.variableOffsets,a):ait(i)?o.circle(t,r,i,n,a):cit(i)?o.heatmap(t,r,i,n,a):Lit(i)?o.line(t,r,i,n,a):bit(i)?o.fill(t,r,i,n,a):Cit(i)?o.fillExtrusion(t,r,i,n,a):fit(i)?o.hillshade(t,r,i,n,a):dit(i)?o.colorRelief(t,r,i,n,a):BB(i)?o.raster(t,r,i,n,a):ont(i)?o.background(t,r,i,n,a):lnt(i)&&o.custom(t,r,i,a)}saveTileTexture(t){let r=this._tileTextures[t.size[0]];r?r.length<u3.MAX_TEXTURE_POOL_SIZE_PER_BUCKET?r.push(t):t.destroy():this._tileTextures[t.size[0]]=[t]}getTileTexture(t){let r=this._tileTextures[t];return r&&r.length>0?r.pop():null}acquireRTT(t){let r=this.context.gl,i=this._rttObjectRecyclePool.pop();if(i)return i.size!==t&&(i.texture.update({width:t,height:t,data:null},{premultiply:!1,useMipmap:!0}),i.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE,r.LINEAR_MIPMAP_LINEAR),this.context.extTextureFilterAnisotropic&&r.texParameterf(r.TEXTURE_2D,this.context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this.context.extTextureFilterAnisotropicMax),i.size=t),i;let n=new vu(this.context,{width:t,height:t,data:null},r.RGBA,{premultiply:!1,useMipmap:!0});return n.bind(r.LINEAR,r.CLAMP_TO_EDGE,r.LINEAR_MIPMAP_LINEAR),this.context.extTextureFilterAnisotropic&&r.texParameterf(r.TEXTURE_2D,this.context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this.context.extTextureFilterAnisotropicMax),{texture:n,size:t}}bindRTT(t){let r=this.context.gl,i=t.size;if(!this._rttSharedFbo){let n=this.context.createFramebuffer(i,i,!0,!0),a=this.context.createRenderbuffer(r.DEPTH_STENCIL,i,i);n.depthAttachment.set(a),this._rttSharedFbo={fbo:n,depthRenderbuffer:a,size:i}}this._rttSharedFbo.size!==i&&(this.context.bindRenderbuffer.set(this._rttSharedFbo.depthRenderbuffer),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,i,i),this.context.bindRenderbuffer.set(null),this._rttSharedFbo.fbo.width=i,this._rttSharedFbo.fbo.height=i,this._rttSharedFbo.size=i),this._rttSharedFbo.fbo.colorAttachment.set(t.texture.texture),this.context.bindFramebuffer.set(this._rttSharedFbo.fbo.framebuffer)}releaseRTT(t){this._rttObjectRecyclePool.push(t)}isPatternMissing(t){if(!t)return!1;if(!t.from||!t.to)return!0;let r=this.patternAtlas.getPattern(t.from.toString()),i=this.patternAtlas.getPattern(t.to.toString());return!r||!i}useProgram(t,r,i=!1,n=[]){var v;this.cache||(this.cache={});let a=!!this.style.map.terrain,o=this.style.projection,s=i?tg.projectionMercator:o.shaderPreludeCode,l=i?kot:o.shaderDefine,u=`/${i?Cot:o.shaderVariantName}`,c=r?r.cacheKey:"",f=this._showOverdrawInspector?"/overdraw":"",h=a?"/terrain":"",d=n?`/${n.join("/")}`:"",p=t+c+u+f+h+d;return(v=this.cache)[p]||(v[p]=new Mwr(this.context,tg[t],r,y5r[t],this._showOverdrawInspector,a,s,l,n)),this.cache[p]}setCustomLayerDefaults(){this.context.setCustomLayerDefaults()}setBaseState(){let t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;let t=this.context.gl;this.debugOverlayTexture=new vu(this.context,this.debugOverlayCanvas,t.RGBA)}}destroy(){var t,r,i;if(this._tileTextures){for(let n in this._tileTextures){let a=this._tileTextures[n];if(a)for(let o of a)o.destroy()}this._tileTextures={}}for(let n of this._rttObjectRecyclePool)n.texture.destroy();if(this._rttObjectRecyclePool=[],this._rttSharedFbo){this._rttSharedFbo.fbo.colorAttachment.set(null),this._rttSharedFbo.fbo.depthAttachment.set(null);let n=this.context.gl;n.deleteRenderbuffer(this._rttSharedFbo.depthRenderbuffer),n.deleteFramebuffer(this._rttSharedFbo.fbo.framebuffer),this._rttSharedFbo=null}if((t=this.layerOpacityFbo)==null||t.destroy(),this.layerOpacityFbo=null,this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&((r=this.tileExtentMesh.vertexBuffer)==null||r.destroy()),this.tileExtentMesh&&((i=this.tileExtentMesh.indexBuffer)==null||i.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.context.projectionUniformBuffer.destroy(),this.context.terrainUniformBuffer.destroy(),this.context.frameUniformBuffer.destroy(),this.cache){for(let n in this.cache){let a=this.cache[n];a!=null&&a.program&&this.context.gl.deleteProgram(a.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:t,drawingBufferHeight:r}=this.context.gl;return this.width!==t||this.height!==r}},u3.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50,u3),cst=class extends Error{constructor(e,t){var r;super("WebGL2 is required to display this map. We are sorry, but it seems that your browser does not support WebGL2, a technology for rendering 3D graphics on the web. Read more on https://wiki.openstreetmap.org/wiki/This_map_requires_WebGL"),this.name="GPUInitializationError",this.requestedAttributes=e,this.statusMessage=(r=t==null?void 0:t.statusMessage)!=null?r:null}};hst=class{constructor(e){this._getHashParams=()=>new URLSearchParams(window.location.hash.replace("#","")),this._getCurrentHash=()=>{var r;let t=this._getHashParams();return this._hashName?(t.get(this._hashName)||"").split("/"):((r=[...t.keys()][0])!=null?r:"").split("/")},this._onHashChange=()=>{let t=this._getCurrentHash();if(!this._isValidHash(t))return!1;let r=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:r,pitch:+(t[4]||0)}),!0},this._updateHashUnthrottled=()=>{let t=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,t)},this._removeHash=()=>{let t=this._getHashParams();if(this._hashName)t.delete(this._hashName);else{let a=Array.from(t.keys());a.length>0&&t.delete(a[0])}let r=decodeURIComponent(t.toString()).replace(/=&/g,"&").replace(/=$/g,""),i=r?`#${r}`:"",n=window.location.href.replace(/(#.+)?$/,i);n=n.replace("&&","&"),window.history.replaceState(window.history.state,null,n)},this._updateHash=fst(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,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(e){let t=this._map.getCenter(),r=Math.round(this._map.getZoom()*100)/100,i=10**Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),n=Math.round(t.lng*i)/i,a=Math.round(t.lat*i)/i,o=this._map.getBearing(),s=this._map.getPitch(),l="";if(l+=e?`/${n}/${a}/${r}`:`${r}/${a}/${n}`,(o||s)&&(l+=`/${Math.round(o*10)/10}`),s&&(l+=`/${Math.round(s)}`),this._hashName){let u=this._getHashParams();return u.set(this._hashName,l),`#${decodeURIComponent(u.toString()).replace(/=&/g,"&").replace(/=$/g,"")}`}return`#${l}`}_isValidHash(e){if(e.length<3||e.some(n=>isNaN(+n)))return!1;try{new mn(+e[2],+e[1])}catch(n){return!1}let t=+e[0],r=+(e[3]||0),i=+(e[4]||0);return t>=this._map.getMinZoom()&&t<=this._map.getMaxZoom()&&r>=-180&&r<=180&&i>=this._map.getMinPitch()&&i<=this._map.getMaxPitch()}},S8={linearity:.3,easing:dB(0,0,.3,1)},rTr=ln({deceleration:2500,maxSpeed:1400},S8),iTr=ln({deceleration:20,maxSpeed:1400},S8),nTr=ln({deceleration:1e3,maxSpeed:360},S8),aTr=ln({deceleration:1e3,maxSpeed:90},S8),oTr=ln({deceleration:1e3,maxSpeed:360},S8),sTr=class{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:Oo(),settings:e})}_drainInertiaBuffer(){let e=this._inertiaBuffer,t=Oo();for(;e.length>0&&t-e[0].time>160;)e.shift()}_getVelocityEntries(){let e=this._inertiaBuffer,t=Oo()-60,r=Math.max(0,e.length-2);for(;r>0&&e[r-1].time>=t;)r--;return e.slice(r)}_onMoveEnd(e){this._drainInertiaBuffer();let t=this._getVelocityEntries();if(t.length<2){this.clear();return}let r={zoom:0,bearing:0,pitch:0,roll:0,pan:new tr(0,0),pinchAround:void 0,around:void 0};for(let{settings:a}of t)a.around&&(r.around=a.around),a.pinchAround&&(r.pinchAround=a.pinchAround);for(let{settings:a}of t.slice(1))r.zoom+=a.zoomDelta||0,r.bearing+=a.bearingDelta||0,r.pitch+=a.pitchDelta||0,r.roll+=a.rollDelta||0,a.panDelta&&r.pan._add(a.panDelta);if(!r.pan.mag()&&!r.zoom&&!r.bearing&&!r.pitch&&!r.roll){this.clear();return}let i=Oo()-t[0].time,n={};if(r.pan.mag()){let a=y8(r.pan.mag(),i,ln({},rTr,e||{})),o=r.pan.mult(a.amount/r.pan.mag()),s=this._map._camera.cameraHelper.handlePanInertia(o,this._map._camera.transform);n.center=s.easingCenter,n.offset=s.easingOffset,m8(n,a)}if(r.zoom){let a=y8(r.zoom,i,iTr);n.zoom=Jh(this._map.getZoom()+a.amount,this._map.getZoomSnap(),a.amount),m8(n,a)}if(r.bearing){let a=y8(r.bearing,i,nTr);n.bearing=this._map.getBearing()+Jn(a.amount,-179,179),m8(n,a)}if(r.pitch){let a=y8(r.pitch,i,aTr);n.pitch=this._map.getPitch()+a.amount,m8(n,a)}if(r.roll){let a=y8(r.roll,i,oTr);n.roll=this._map.getRoll()+Jn(a.amount,-179,179),m8(n,a)}if(n.zoom||n.bearing){let a=r.pinchAround===void 0?r.around:r.pinchAround;n.around=a?this._map.unproject(a):this._map.getCenter()}return this.clear(),ln(n,{noMoveStart:!0})}};lTr=class{constructor(e,t){this._map=e,this._clickTolerance=t.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new Xat(this._map,e))}mousedown(e,t){return this._mousedownPos=t,this._firePreventable(new O0(e.type,this._map,e))}mouseup(e){this._map.fire(new O0(e.type,this._map,e))}click(e,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||this._map.fire(new O0(e.type,this._map,e))}dblclick(e){return this._firePreventable(new O0(e.type,this._map,e))}mouseover(e){this._map.fire(new O0(e.type,this._map,e))}mouseout(e){this._map.fire(new O0(e.type,this._map,e))}touchstart(e){return this._firePreventable(new b8(e.type,this._map,e))}touchmove(e){this._map.fire(new b8(e.type,this._map,e))}touchend(e){this._map.fire(new b8(e.type,this._map,e))}touchcancel(e){this._map.fire(new b8(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}},uTr=class{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new O0(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new O0("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new O0(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}},dst=class{constructor(e,t,r){this._map=e,this._tr=r,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1,t.boxZoom&&typeof t.boxZoom=="object"&&(this._boxZoomEnd=t.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,t){this.isEnabled()&&e.shiftKey&&e.button===0&&($n.disableDrag(),this._startPos=this._lastPos=t,this._active=!0)}mousemoveWindow(e,t){if(!this._active)return;let r=t;if(this._lastPos.equals(r)||!this._box&&r.dist(this._startPos)<this._clickTolerance)return;let i=this._startPos;this._lastPos=r,this._box||(this._box=$n.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",e));let n=Math.min(i.x,r.x),a=Math.max(i.x,r.x),o=Math.min(i.y,r.y),s=Math.max(i.y,r.y);this._box.style.transform=`translate(${n}px,${o}px)`,this._box.style.width=`${a-n}px`,this._box.style.height=`${s-o}px`}mouseupWindow(e,t){if(!this._active||e.button!==0)return;let r=this._startPos,i=t;if(this.reset(),$n.suppressClick(),r.x===i.x&&r.y===i.y)this._fireEvent("boxzoomcancel",e);else{if(this._map.fire(new eae("boxzoomend",{originalEvent:e})),this._boxZoomEnd){this._boxZoomEnd(this._map,r,i,e);return}return{cameraAnimation:n=>n.fitScreenCoordinates(r,i,this._tr.bearing,{linear:!0})}}}keydown(e){this._active&&e.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box=(this._box.remove(),null)),$n.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,t){return this._map.fire(new eae(e,{originalEvent:t}))}};fTr=class{constructor(e){this.reset(),this.numTouches=e.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(e,t,r){(this.centroid||r.length>this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=e.timeStamp),r.length===this.numTouches&&(this.centroid=cTr(t),this.touches=dae(r,t)))}touchmove(e,t,r){if(this.aborted||!this.centroid)return;let i=dae(r,t);for(let n in this.touches){let a=this.touches[n],o=i[n];(!o||o.dist(a)>30)&&(this.aborted=!0)}}touchend(e,t,r){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),r.length===0){let i=!this.aborted&&this.centroid;if(this.reset(),i)return i}}},pae=class{constructor(e){this.singleTap=new fTr(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,t,r){this.singleTap.touchstart(e,t,r)}touchmove(e,t,r){this.singleTap.touchmove(e,t,r)}touchend(e,t,r){let i=this.singleTap.touchend(e,t,r);if(i){let n=e.timeStamp-this.lastTime<500,a=!this.lastTap||this.lastTap.dist(i)<30;if((!n||!a)&&this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=i,this.count===this.numTaps)return this.reset(),i}}},hTr=class{constructor(e,t){this._tr=t,this._zoomIn=new pae({numTouches:1,numTaps:2}),this._zoomOut=new pae({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,t,r){this._zoomIn.touchstart(e,t,r),this._zoomOut.touchstart(e,t,r)}touchmove(e,t,r){this._zoomIn.touchmove(e,t,r),this._zoomOut.touchmove(e,t,r)}touchend(e,t,r){let i=this._zoomIn.touchend(e,t,r),n=this._zoomOut.touchend(e,t,r),a=this._tr;if(i)return this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:o=>o.easeTo({duration:300,zoom:Jh(a.zoom+1,o.getZoomSnap()),around:a.unproject(i)},{originalEvent:e})};if(n)return this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:o=>o.easeTo({duration:300,zoom:Jh(a.zoom-1,o.getZoomSnap()),around:a.unproject(n)},{originalEvent:e})}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}},E8=class{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){let t=this._moveFunction(...e);if(t.bearingDelta||t.pitchDelta||t.rollDelta||t.around||t.panDelta)return this._active=!0,t}dragStart(e,t){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=Array.isArray(t)?t[0]:t,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,t){if(!this.isEnabled())return;let r=this._lastPoint;if(!r)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e)){this.reset(e);return}let i=Array.isArray(t)?t[0]:t;if(!(!this._moved&&i.dist(r)<this._clickTolerance))return this._moved=!0,this._lastPoint=i,this._move(r,i)}dragEnd(e){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(e)&&(this._moved&&$n.suppressClick(),this.reset(e))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}},dTr={0:1,2:2};k8=class{constructor(e){this._correctEvent=e.checkCorrectEvent}startMove(e){this._eventButton=e.button}endMove(e){delete this._eventButton}isValidStartEvent(e){return this._correctEvent(e)}isValidMoveEvent(e){return!pTr(e,this._eventButton)}isValidEndEvent(e){return e.button===this._eventButton}},vTr=class{constructor(){this._firstTouch=void 0}_isOneFingerTouch(e){return e.targetTouches.length===1}_isSameTouchEvent(e){return e.targetTouches[0].identifier===this._firstTouch}startMove(e){this._firstTouch=e.targetTouches[0].identifier}endMove(e){delete this._firstTouch}isValidStartEvent(e){return this._isOneFingerTouch(e)}isValidMoveEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}isValidEndEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}},gTr=class{constructor(e=new k8({checkCorrectEvent:()=>!0}),t=new vTr){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=t}_executeRelevantHandler(e,t,r){if(e instanceof MouseEvent)return t(e);if(typeof TouchEvent<"u"&&e instanceof TouchEvent)return r(e)}startMove(e){this._executeRelevantHandler(e,t=>{this.mouseMoveStateManager.startMove(t)},t=>{this.oneFingerTouchMoveStateManager.startMove(t)})}endMove(e){this._executeRelevantHandler(e,t=>{this.mouseMoveStateManager.endMove(t)},t=>{this.oneFingerTouchMoveStateManager.endMove(t)})}isValidStartEvent(e){return!!this._executeRelevantHandler(e,t=>this.mouseMoveStateManager.isValidStartEvent(t),t=>this.oneFingerTouchMoveStateManager.isValidStartEvent(t))}isValidMoveEvent(e){return!!this._executeRelevantHandler(e,t=>this.mouseMoveStateManager.isValidMoveEvent(t),t=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(t))}isValidEndEvent(e){return!!this._executeRelevantHandler(e,t=>this.mouseMoveStateManager.isValidEndEvent(t),t=>this.oneFingerTouchMoveStateManager.isValidEndEvent(t))}},Fq=e=>{e.mousedown=e.dragStart,e.mousemoveWindow=e.dragMove,e.mouseup=e.dragEnd,e.contextmenu=t=>{t.preventDefault()}};bTr=class{constructor(e,t){this._clickTolerance=e.clickTolerance||1,this._map=t,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new tr(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,t,r){return this._calculateTransform(e,t,r)}touchmove(e,t,r){if(this._active){if(this._shouldBePrevented(r.length)){this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e);return}return e.preventDefault(),this._calculateTransform(e,t,r)}}touchend(e,t,r){this._calculateTransform(e,t,r),this._active&&this._shouldBePrevented(r.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,t,r){r.length>0&&(this._active=!0);let i=dae(r,t),n=new tr(0,0),a=new tr(0,0),o=0;for(let l in i){let u=i[l],c=this._touches[l];c&&(n._add(u),a._add(u.sub(c)),o++,i[l]=u)}if(this._touches=i,this._shouldBePrevented(o)||!a.mag())return;let s=a.div(o);if(this._sum._add(s),!(this._sum.mag()<this._clickTolerance))return{around:n.div(o),panDelta:s}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}},qae=class{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(e,t,r){this._firstTwoTouches||r.length<2||(this._firstTwoTouches=[r[0].identifier,r[1].identifier],this._start([t[0],t[1]]))}touchmove(e,t,r){if(!this._firstTwoTouches)return;e.preventDefault();let[i,n]=this._firstTwoTouches,a=fq(r,t,i),o=fq(r,t,n);if(!a||!o)return;let s=this._aroundCenter?null:a.add(o).div(2);return this._move([a,o],s,e)}touchend(e,t,r){if(!this._firstTwoTouches)return;let[i,n]=this._firstTwoTouches,a=fq(r,t,i),o=fq(r,t,n);a&&o||(this._active&&$n.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(e){this._enabled=!0,this._aroundCenter=!!e&&e.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}};Oat=.1;pst=class extends qae{constructor(){super(),this._zoomRate=1,this._zoomThreshold=Oat}setZoomRate(e){this._zoomRate=e!=null?e:1}setZoomThreshold(e){this._zoomThreshold=e!=null?e:Oat}reset(){super.reset(),delete this._distance,delete this._startDistance}_start(e){this._startDistance=this._distance=e[0].dist(e[1])}_move(e,t){let r=this._distance;if(this._distance=e[0].dist(e[1]),!(!this._active&&Math.abs(Nat(this._distance,this._startDistance))<this._zoomThreshold))return this._active=!0,{zoomDelta:Nat(this._distance,r)*this._zoomRate,pinchAround:t}}};vst=class extends qae{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(e){this._startVector=this._vector=e[0].sub(e[1]),this._minDiameter=e[0].dist(e[1])}_move(e,t,r){let i=this._vector;if(this._vector=e[0].sub(e[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Uat(this._vector,i),pinchAround:t}}_isBelowThreshold(e){this._minDiameter=Math.min(this._minDiameter,e.mag());let t=25/(Math.PI*this._minDiameter)*360,r=Uat(e,this._startVector);return Math.abs(r)<t}};gst=class extends qae{constructor(e){super(),this._currentTouchCount=0,this._map=e}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,t,r){super.touchstart(e,t,r),this._currentTouchCount=r.length}_start(e){this._lastPoints=e,Zne(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,t,r){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let i=e[0].sub(this._lastPoints[0]),n=e[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(i,n,r.timeStamp),this._valid)return this._lastPoints=e,this._active=!0,{pitchDelta:(i.y+n.y)/2*-.5}}gestureBeginsVertically(e,t,r){if(this._valid!==void 0)return this._valid;let i=e.mag()>=2,n=t.mag()>=2;if(!i&&!n)return;if(!i||!n)return this._firstMove===void 0&&(this._firstMove=r),r-this._firstMove<100&&void 0;let a=e.y>0==t.y>0;return Zne(e)&&Zne(t)&&a}},wTr={panStep:100,bearingStep:15,pitchStep:10},mst=class{constructor(e,t){this._tr=t;let r=wTr;this._panStep=r.panStep,this._bearingStep=r.bearingStep,this._pitchStep=r.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=0,r=0,i=0,n=0,a=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?r=-1:(e.preventDefault(),n=-1);break;case 39:e.shiftKey?r=1:(e.preventDefault(),n=1);break;case 38:e.shiftKey?i=1:(e.preventDefault(),a=-1);break;case 40:e.shiftKey?i=-1:(e.preventDefault(),a=1);break;default:return}return this._rotationDisabled&&(r=0,i=0),{cameraAnimation:o=>{let s=this._tr;o.easeTo({duration:300,easeId:"keyboardHandler",easing:TTr,zoom:t?Jh(s.zoom+t*(e.shiftKey?2:1),o.getZoomSnap()):s.zoom,bearing:s.bearing+r*this._bearingStep,pitch:s.pitch+i*this._pitchStep,offset:[-n*this._panStep,-a*this._panStep],center:s.center},{originalEvent:e})}}}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}};Vat=4.000244140625,yst=class{constructor(e,t,r){this._onTimeout=i=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(i)},this._map=e,this._tr=r,this._triggerRenderFrame=t,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&e.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return this._map.cooperativeGestures.isEnabled()?!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e)):!1}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e)){this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);return}let t=e.deltaMode===WheelEvent.DOM_DELTA_LINE?e.deltaY*40:e.deltaY,r=Oo(),i=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,t!==0&&t%Vat==0?this._type="wheel":t!==0&&Math.abs(t)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=t,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(i*t)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,t+=this._lastValue)),e.shiftKey&&t&&(t/=4),this._type&&(this._lastWheelEvent=e,this._delta-=t,this._active||this._start(e)),e.preventDefault()}_start(e){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let t=$n.mousePos(this._map.getCanvas(),e),r=this._tr;this._aroundPoint=this._aroundCenter?r.transform.locationToScreenPoint(mn.convert(r.center)):t,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let e=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let o=e.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=o),typeof this._targetZoom=="number"&&(this._targetZoom+=o)}if(this._delta!==0){let o=this._type==="wheel"&&Math.abs(this._delta)>Vat?this._wheelZoomRate:this._defaultZoomRate,s=2/(1+Math.exp(-Math.abs(this._delta*o)));this._delta<0&&s!==0&&(s=1/s);let l=typeof this._targetZoom=="number"?If(this._targetZoom):e.scale,u=e.applyConstrain(e.getCameraLngLat(),zc(l*s)).zoom,c=this._map.getZoomSnap();if(this._type==="wheel"&&c>0){let f=Jh(e.zoom,c);this._targetZoom=Jh(u,c,u-f)}else this._targetZoom=u;this._type==="wheel"&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let t=typeof this._targetZoom=="number"?this._targetZoom:e.zoom,r=this._startZoom,i=this._easing,n=!1,a;if(this._type==="wheel"&&r&&i){let o=Oo()-this._lastWheelEventTime,s=Math.min((o+5)/200,1),l=i(s);a=$s.number(r,t,l),s<1?this._needsRerender=!0:n=!0}else a=t,n=!0;return this._active=!0,n&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=a,{noInertia:!0,needsRenderFrame:!n,zoomDelta:a-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let t=pB;if(this._prevEase){let r=this._prevEase,i=(Oo()-r.start)/r.duration,n=r.easing(i+.01)-r.easing(i),a=.27/Math.sqrt(n*n+1e-4)*.01,o=Math.sqrt(.0729-a*a);t=dB(a,o,.25,1)}return this._prevEase={start:Oo(),duration:e,easing:t},t}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}},xst=class{constructor(e,t){this._clickZoom=e,this._tapZoom=t}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()}},ATr=class{constructor(e,t){this._tr=t,this.reset()}reset(){this._active=!1}dblclick(e,t){return e.preventDefault(),{cameraAnimation:r=>{r.easeTo({duration:300,zoom:Jh(this._tr.zoom+(e.shiftKey?-1:1),r.getZoomSnap()),around:this._tr.unproject(t)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}},MTr=class{constructor(){this._tap=new pae({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(e){this._zoomRate=e!=null?e:1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(e,t,r){if(!this._swipePoint)if(!this._tapTime)this._tap.touchstart(e,t,r);else{let i=t[0],n=e.timeStamp-this._tapTime<500,a=this._tapPoint.dist(i)<30;!n||!a?this.reset():r.length>0&&(this._swipePoint=i,this._swipeTouch=r[0].identifier)}}touchmove(e,t,r){if(!this._tapTime)this._tap.touchmove(e,t,r);else if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;let i=t[0],n=i.y-this._swipePoint.y;return this._swipePoint=i,e.preventDefault(),this._active=!0,{zoomDelta:n/128*this._zoomRate}}}touchend(e,t,r){if(this._tapTime)this._swipePoint&&r.length===0&&this.reset();else{let i=this._tap.touchend(e,t,r);i&&(this._tapTime=e.timeStamp,this._tapPoint=i)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}},_st=class{constructor(e,t,r){this._el=e,this._mousePan=t,this._touchPan=r}enable(e){this._inertiaOptions=e||{},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()}},bst=class{constructor(e,t,r,i){this._pitchWithRotate=e.pitchWithRotate,this._rollEnabled=e.rollEnabled,this._mouseRotate=t,this._mousePitch=r,this._mouseRoll=i}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}},wst=class{constructor(e,t,r,i){this._el=e,this._touchZoom=t,this._touchRotate=r,this._tapDragZoom=i,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}setZoomRate(e){this._touchZoom.setZoomRate(e),this._tapDragZoom.setZoomRate(e)}setZoomThreshold(e){this._touchZoom.setZoomThreshold(e)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}},Tst=class{constructor(e,t){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=e,this._options=t,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=$n.create("div","maplibregl-cooperative-gesture-screen",e);let t=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(t=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let r=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),i=document.createElement("div");i.className="maplibregl-desktop-message",i.textContent=t,this._container.appendChild(i);let n=document.createElement("div");n.className="maplibregl-mobile-message",n.textContent=r,this._container.appendChild(n),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(e){return e[this._bypassKey]}notifyGestureBlocked(e,t){this._enabled&&(this._map.fire(new cc("cooperativegestureprevented",{gestureType:e,originalEvent:t})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}},STr=class{constructor(e){this._camera=e}get transform(){return this._camera._requestedCameraState||this._camera.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(e){return this.transform.screenPointToLocation(tr.convert(e),this._camera.terrain)}},hq=e=>e.zoom||e.drag||e.roll||e.pitch||e.rotate,ETr=class extends e0{};kTr=class{get _ownerDocument(){var e;return((e=this._el)==null?void 0:e.ownerDocument)||document}get _ownerWindow(){var e,t;return((t=(e=this._el)==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)||window}constructor(e,t,r){this._terrainGestureAnchorElevation=null,this.handleWindowEvent=n=>{this.handleEvent(n,`${n.type}Window`)},this.handleEvent=(n,a)=>{if(n.type==="blur"){this.stop(!0);return}this._updatingCamera=!0;let o=n.type==="renderFrame"?void 0:n,s={needsRenderFrame:!1},l={},u={};for(let{handlerName:h,handler:d,allowed:p}of this._handlers){if(!d.isEnabled())continue;let v;if(this._blockedByActive(u,p,h))d.reset();else if(d[a||n.type]){if(ott(n,a||n.type)){let m=$n.mousePos(this._map.getCanvas(),n);v=d[a||n.type](n,m)}else if(att(n,a||n.type)){let m=n.touches,g=this._getMapTouches(m),w=$n.touchPos(this._map.getCanvas(),g);v=d[a||n.type](n,w,g)}else stt(a||n.type)||(v=d[a||n.type](n));this.mergeHandlerResult(s,l,v,h,o),v!=null&&v.needsRenderFrame&&this._triggerRenderFrame()}(v||d.isActive())&&(u[h]=d)}let c={};for(let h in this._previousActiveHandlers)u[h]||(c[h]=o);this._previousActiveHandlers=u,(Object.keys(c).length||Kne(s))&&(this._changes.push([s,l,c]),this._triggerRenderFrame()),(Object.keys(u).length||Kne(s))&&this._camera.stop(!0),this._updatingCamera=!1;let{cameraAnimation:f}=s;f&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],f(this._map))},this._map=e,this._camera=t,this._transformProvider=new STr(this._camera),this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new sTr(e),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(r);let i=this._el;this._listeners=[[i,"touchstart",{passive:!0}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(let[n,a,o]of this._listeners)n.addEventListener(a,n===this._ownerDocument?this.handleWindowEvent:this.handleEvent,o)}destroy(){for(let[e,t,r]of this._listeners)e.removeEventListener(t,e===this._ownerDocument?this.handleWindowEvent:this.handleEvent,r)}_addDefaultHandlers(e){let t=this._map,r=t.getCanvasContainer();this._add("mapEvent",new lTr(t,e));let i=t.boxZoom=new dst(t,e,this._transformProvider);this._add("boxZoom",i),e.interactive&&e.boxZoom&&i.enable();let n=t.cooperativeGestures=new Tst(t,e.cooperativeGestures);this._add("cooperativeGestures",n),e.cooperativeGestures&&n.enable();let a=new hTr(t,this._transformProvider),o=new ATr(t,this._transformProvider);t.doubleClickZoom=new xst(o,a),this._add("tapZoom",a),this._add("clickZoom",o),e.interactive&&e.doubleClickZoom&&t.doubleClickZoom.enable();let s=new MTr;this._add("tapDragZoom",s);let l=t.touchPitch=new gst(t);this._add("touchPitch",l),e.interactive&&e.touchPitch&&t.touchPitch.enable(e.touchPitch);let u=()=>t.project(t.getCenter()),c=yTr(e,u),f=xTr(e),h=_Tr(e,u);t.dragRotate=new bst(e,c,f,h),this._add("mouseRotate",c,["mousePitch"]),this._add("mousePitch",f,["mouseRotate","mouseRoll"]),this._add("mouseRoll",h,["mousePitch"]),e.interactive&&e.dragRotate&&t.dragRotate.enable();let d=mTr(e),p=new bTr(e,t);t.dragPan=new _st(r,d,p),this._add("mousePan",d),this._add("touchPan",p,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&t.dragPan.enable(e.dragPan);let v=new vst,m=new pst;t.touchZoomRotate=new wst(r,m,v,s),this._add("touchRotate",v,["touchPan","touchZoom"]),this._add("touchZoom",m,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&t.touchZoomRotate.enable(e.touchZoomRotate),this._add("blockableMapEvent",new uTr(t));let g=t.scrollZoom=new yst(t,()=>this._triggerRenderFrame(),this._transformProvider);this._add("scrollZoom",g,["mousePan"]),e.interactive&&e.scrollZoom&&t.scrollZoom.enable(e.scrollZoom);let w=t.keyboard=new mst(t,this._transformProvider);this._add("keyboard",w),e.interactive&&e.keyboard&&t.keyboard.enable()}_add(e,t,r){this._handlers.push({handlerName:e,handler:t,allowed:r}),this._handlersById[e]=t}stop(e){if(!this._updatingCamera){for(let{handler:t}of this._handlers)t.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(let{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!hq(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,t,r){for(let i in e)if(i!==r&&!(t!=null&&t.includes(i)))return!0;return!1}_getMapTouches(e){let t=[];for(let r of e){let i=r.target;this._el.contains(i)&&t.push(r)}return t}mergeHandlerResult(e,t,r,i,n){if(!r)return;ln(e,r);let a={handlerName:i,originalEvent:r.originalEvent||n};r.zoomDelta!==void 0&&(t.zoom=a),r.panDelta!==void 0&&(t.drag=a),r.rollDelta!==void 0&&(t.roll=a),r.pitchDelta!==void 0&&(t.pitch=a),r.bearingDelta!==void 0&&(t.rotate=a)}_applyChanges(){let e={},t={},r={};for(let[i,n,a]of this._changes)i.panDelta&&(e.panDelta=(e.panDelta||new tr(0,0))._add(i.panDelta)),i.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+i.zoomDelta),i.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+i.bearingDelta),i.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+i.pitchDelta),i.rollDelta&&(e.rollDelta=(e.rollDelta||0)+i.rollDelta),i.around!==void 0&&(e.around=i.around),i.pinchAround!==void 0&&(e.pinchAround=i.pinchAround),i.noInertia&&(e.noInertia=i.noInertia),ln(t,n),ln(r,a);this._updateMapTransform(e,t,r),this._changes=[]}_updateMapTransform(e,t,r){let i=this._map,n=this._camera.getTransformForUpdate(),a=i.terrain;if(!Kne(e)&&!(a&&this._terrainMovement)){this._fireEvents(t,r,!0);return}this._camera.stop(!0);let{panDelta:o,zoomDelta:s,bearingDelta:l,pitchDelta:u,rollDelta:c}=e,{around:f,aroundOnSurface:h}=this._resolveAround(e,a,n),d=a?this._terrainGestureElevation(a,f,h,n,t):void 0,p={panDelta:o,zoomDelta:s,rollDelta:c,pitchDelta:u,bearingDelta:l,around:f,aroundElevation:d};this._camera.cameraHelper.useGlobeControls&&!n.isPointOnMapSurface(f)&&(f=n.centerPoint);let v=this._computePreZoomAroundLoc(n,f,o,d);this._handleMapControls({terrain:a,tr:n,deltasForHelper:p,preZoomAroundLoc:v,combinedEventsInProgress:t,panDelta:o}),this._camera.applyUpdatedTransform(n),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(t,r,!0)}_resolveAround(e,t,r){let i=e.pinchAround===void 0?e.around:e.pinchAround;return i||(i=this._camera.transform.centerPoint),t&&!r.isPointOnMapSurface(i)?{around:r.centerPoint,aroundOnSurface:!1}:{around:i,aroundOnSurface:!0}}_terrainGestureElevation(e,t,r,i,n){if(!r)return;if(!this._terrainMovement&&(n.drag||n.zoom)){let o=i.screenTerrainPointToMercatorCoordinate(t,e);this._terrainGestureAnchorElevation=o?o.z:null}if(this._terrainGestureAnchorElevation===null)return;let a=this._terrainGestureAnchorElevation;if(!(t.distSqr(i.centerPoint)<.01)&&!(a-i.elevation>=.9*(i.getCameraAltitude()-i.elevation)))return a}_computePreZoomAroundLoc(e,t,r,i){if(t.distSqr(e.centerPoint)<.01)return e.center;let n=r?t.sub(r):t;return i===void 0?e.screenPointToLocation(n):e.screenPointToLocationAtElevation(n,i)}_handleMapControls({terrain:e,tr:t,deltasForHelper:r,preZoomAroundLoc:i,combinedEventsInProgress:n,panDelta:a}){let o=this._camera.cameraHelper;if(o.handleMapControlsRollPitchBearingZoom(r,t),!e){o.handleMapControlsPan(r,t,i);return}if(o.useGlobeControls){!this._terrainMovement&&(n.drag||n.zoom)&&(this._terrainMovement=!0,this._camera.elevationFreeze=!0),o.handleMapControlsPan(r,t,i);return}if(!this._terrainMovement&&(n.drag||n.zoom)){this._terrainMovement=!0,this._camera.elevationFreeze=!0,o.handleMapControlsPan(r,t,i);return}if(r.aroundElevation===void 0&&n.drag&&this._terrainMovement&&a){t.setCenter(t.screenPointToLocation(t.centerPoint.sub(a)));return}o.handleMapControlsPan(r,t,i)}_fireEvents(e,t,r){let i=hq(this._eventsInProgress),n=hq(e),a={};for(let c in e){let{originalEvent:f}=e[c];this._eventsInProgress[c]||(a[`${c}start`]=f),this._eventsInProgress[c]=e[c]}!i&&n&&this._fireEvent("movestart",n.originalEvent);for(let c in a)this._fireEvent(c,a[c]);n&&this._fireEvent("move",n.originalEvent);for(let c in e){let{originalEvent:f}=e[c];this._fireEvent(c,f)}let o={},s;for(let c in this._eventsInProgress){let{handlerName:f,originalEvent:h}=this._eventsInProgress[c];this._handlersById[f].isActive()||(delete this._eventsInProgress[c],s=t[f]||h,o[`${c}end`]=s)}for(let c in o)this._fireEvent(c,o[c]);let l=hq(this._eventsInProgress),u=(i||n)&&!l;if(u&&this._terrainMovement){this._camera.elevationFreeze=!1,this._terrainMovement=!1,this._terrainGestureAnchorElevation=null;let c=this._camera.getTransformForUpdate();this._map.getCenterClampedToGround()&&c.recalculateZoomAndCenter(this._map.terrain),this._camera.applyUpdatedTransform(c)}if(r&&u){this._updatingCamera=!0;let c=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),f=h=>h!==0&&-this._bearingSnap<h&&h<this._bearingSnap;c&&(c.essential||!fh.prefersReducedMotion)?(f(c.bearing||this._map.getBearing())&&(c.bearing=0),c.freezeElevation=!0,this._map.easeTo(c,{originalEvent:s})):(this._map.fire(new Mn("moveend",{originalEvent:s})),f(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}}_fireEvent(e,t){this._map.fire(new Mn(e,t?{originalEvent:t}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(e=>{delete this._frameId,this.handleEvent(new ETr("renderFrame",{timeStamp:e})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}},CTr=class extends mu{constructor(e){var t,r,i;super(),this._renderFrameCallback=()=>{let n=Math.min((Oo()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(n)),n<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this.transform=new Tq,this.cameraHelper=new Aq,e.minZoom!==void 0&&this.transform.setMinZoom(e.minZoom),e.maxZoom!==void 0&&this.transform.setMaxZoom(e.maxZoom),e.minPitch!==void 0&&this.transform.setMinPitch(e.minPitch),e.maxPitch!==void 0&&this.transform.setMaxPitch(e.maxPitch),e.renderWorldCopies!==void 0&&this.transform.setRenderWorldCopies(e.renderWorldCopies),e.transformConstrain!==null&&this.transform.setConstrainOverride(e.transformConstrain),this._moving=!1,this._zooming=!1,this._bearingSnap=e.bearingSnap,this._zoomSnap=e.zoomSnap,this._requestRenderFrame=e.requestRenderFrame,this._cancelRenderFrame=e.cancelRenderFrame,this.terrain=e.terrain,this._centerClampedToGround=(t=e.centerClampedToGround)!=null?t:!0,this.transformCameraUpdate=(r=e.transformCameraUpdate)!=null?r:null,this._stopHandlers=(i=e.stopHandlers)!=null?i:(()=>{}),this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(e,t){if(e.apply(this.transform,!0),this.transform=e,this.cameraHelper=t,this._requestedCameraState){let r=e.clone();r.apply(this._requestedCameraState,!0),this._requestedCameraState=r}}getCenter(){return new mn(this.transform.center.lng,this.transform.center.lat)}setCenter(e,t){return this.jumpTo({center:e},t)}getCenterElevation(){return this.transform.elevation}setCenterElevation(e,t){return this.jumpTo({elevation:e},t),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(e){this._centerClampedToGround=e}panBy(e,t,r){return e=tr.convert(e).mult(-1),this.panTo(this.transform.center,ln({offset:e},t),r)}panTo(e,t,r){return this.easeTo(ln({center:e},t),r)}getZoom(){return this.transform.zoom}setZoom(e,t){return this.jumpTo({zoom:e},t),this}zoomTo(e,t,r){return this.easeTo(ln({zoom:e},t),r)}zoomIn(e,t){return this.zoomTo(Jh(this.getZoom()+1,this._zoomSnap),e,t),this}zoomOut(e,t){return this.zoomTo(Jh(this.getZoom()-1,this._zoomSnap),e,t),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(e,t){return e!=this.transform.fov&&(this.transform.setFov(e),this.fire(new Mn("movestart",t)).fire(new Mn("move",t)).fire(new Mn("moveend",t))),this}getBearing(){return this.transform.bearing}setZoomSnap(e){return this._zoomSnap=e,this}getZoomSnap(){return this._zoomSnap}setBearing(e,t){return this.jumpTo({bearing:e},t),this}getPadding(){return this.transform.padding}setPadding(e,t){return this.jumpTo({padding:e},t),this}rotateTo(e,t,r){return this.easeTo(ln({bearing:e},t),r)}resetNorth(e,t){return this.rotateTo(0,ln({duration:1e3},e),t),this}resetNorthPitch(e,t){return this.easeTo(ln({bearing:0,pitch:0,roll:0,duration:1e3},e),t),this}snapToNorth(e,t){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(e,t):this}getPitch(){return this.transform.pitch}setPitch(e,t){return this.jumpTo({pitch:e},t),this}getRoll(){return this.transform.roll}setRoll(e,t){return this.jumpTo({roll:e},t),this}cameraForBounds(e,t){e=Ev.convert(e).adjustAntiMeridian();let r=(t==null?void 0:t.bearing)||0;return this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),r,t)}_cameraForBoxAndBearing(e,t,r,i){let n={top:0,bottom:0,right:0,left:0};if(i=ln({padding:n,offset:[0,0],maxZoom:this.transform.maxZoom},i),typeof i.padding=="number"){let u=i.padding;i.padding={top:u,bottom:u,right:u,left:u}}let a=ln(n,i.padding);i.padding=a;let o=this.transform,s=new Ev(e,t),l=this.cameraHelper.cameraForBoxAndBearing(i,a,s,r,o);return l&&this._zoomSnap&&(l.zoom=Jh(l.zoom,this._zoomSnap,-1)),l}fitBounds(e,t,r){return this._fitInternal(this.cameraForBounds(e,t),t,r)}fitScreenCoordinates(e,t,r,i,n){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(tr.convert(e)),this.transform.screenPointToLocation(tr.convert(t)),r,i),i,n)}_fitInternal(e,t,r){return e?(t=ln(e,t),delete t.padding,t.linear?this.easeTo(t,r):this.flyTo(t,r)):this}jumpTo(e,t){this.stop(),e.zoom!==void 0&&this._zoomSnap&&(e.zoom=Jh(e.zoom,this._zoomSnap));let r=this.getTransformForUpdate(),i=!1,n=!1,a=!1,o=r.zoom;this.terrain&&r.setElevation(this.terrain.getElevationForLngLat(e.center?mn.convert(e.center):r.center,r)),this.cameraHelper.handleJumpToCenterZoom(r,e);let s=r.zoom!==o;return e.elevation!==void 0&&r.elevation!==+e.elevation&&r.setElevation(+e.elevation),e.bearing!==void 0&&r.bearing!==+e.bearing&&(i=!0,r.setBearing(+e.bearing)),e.pitch!==void 0&&r.pitch!==+e.pitch&&(n=!0,r.setPitch(+e.pitch)),e.roll!==void 0&&r.roll!==+e.roll&&(a=!0,r.setRoll(+e.roll)),e.padding!=null&&!r.isPaddingEqual(e.padding)&&r.setPadding(e.padding),this.applyUpdatedTransform(r),this.fire(new Mn("movestart",t)).fire(new Mn("move",t)),s&&this.fire(new Mn("zoomstart",t)).fire(new Mn("zoom",t)).fire(new Mn("zoomend",t)),i&&this.fire(new Mn("rotatestart",t)).fire(new Mn("rotate",t)).fire(new Mn("rotateend",t)),n&&this.fire(new Mn("pitchstart",t)).fire(new Mn("pitch",t)).fire(new Mn("pitchend",t)),a&&this.fire(new Mn("rollstart",t)).fire(new Mn("roll",t)).fire(new Mn("rollend",t)),this.fire(new Mn("moveend",t))}calculateCameraOptionsFromCameraLngLatAltRotation(e,t,r,i,n){let a=this.transform.calculateCenterFromCameraLngLatAlt(e,t,r,i);return{center:a.center,elevation:a.elevation,zoom:a.zoom,bearing:r,pitch:i,roll:n}}easeTo(e,t){this._stop(!1,e.easeId),e=ln({offset:[0,0],duration:500,easing:pB},e),e.zoom!==void 0&&this._zoomSnap&&(e.zoom=Jh(e.zoom,this._zoomSnap)),(e.animate===!1||!e.essential&&fh.prefersReducedMotion)&&(e.duration=0);let r=this.getTransformForUpdate(),i=this.getBearing(),n=r.pitch,a=r.roll,o=e.bearing===void 0?i:this._normalizeBearing(e.bearing,i),s=e.pitch===void 0?n:+e.pitch,l=e.roll===void 0?a:this._normalizeBearing(e.roll,a),u=e.padding===void 0?r.padding:e.padding,c=tr.convert(e.offset),f,h;e.around&&(f=mn.convert(e.around),h=r.locationToScreenPoint(f));let d={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching,rolling:this._rolling},p=this.cameraHelper.handleEaseTo(r,{bearing:o,pitch:s,roll:l,padding:u,around:f,aroundPoint:h,offsetAsPoint:c,offset:e.offset,zoom:e.zoom,center:e.center});return this._rotating||(this._rotating=i!==o),this._pitching||(this._pitching=s!==n),this._rolling||(this._rolling=l!==a),this._padding=!r.isPaddingEqual(u),this._zooming||(this._zooming=p.isZooming),this._easeId=e.easeId,this._prepareEase(t,e.noMoveStart,d),this.terrain&&this._prepareElevation(p.elevationCenter),this._ease(v=>{p.easeFunc(v),this.terrain&&!e.freezeElevation&&this._updateElevation(v),this.applyUpdatedTransform(r),this._fireMoveEvents(t)},v=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(t,v)},e),this}_prepareEase(e,t,r={}){this._moving=!0,!t&&!r.moving&&this.fire(new Mn("movestart",e)),this._zooming&&!r.zooming&&this.fire(new Mn("zoomstart",e)),this._rotating&&!r.rotating&&this.fire(new Mn("rotatestart",e)),this._pitching&&!r.pitching&&this.fire(new Mn("pitchstart",e)),this._rolling&&!r.rolling&&this.fire(new Mn("rollstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLat(e,this.transform),this.elevationFreeze=!0}_updateElevation(e){(this._elevationStart===void 0||this._elevationCenter===void 0)&&this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let t=this.terrain.getElevationForLngLat(this._elevationCenter,this.transform);if(e<1&&t!==this._elevationTarget){let r=this._elevationTarget-this._elevationStart,i=(t-(r*e+this._elevationStart))/(1-e);this._elevationStart+=e*(r-i),this._elevationTarget=t}this.transform.setElevation($s.number(this._elevationStart,this._elevationTarget,e))}_finalizeElevation(){this.elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}getTransformForUpdate(){return!this.transformCameraUpdate&&!this.terrain?this.transform:(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState)}_elevateCameraIfInsideTerrain(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return{};let t=e.getCameraLngLat(),r=e.getCameraAltitude(),i=this.terrain?this.terrain.getElevationForLngLatZoom(t,e.zoom):0;if(r<i){let n=e.calculateCameraOptionsFromTo(t,i,e.center,e.elevation);return{pitch:n.pitch,zoom:n.zoom}}return{}}applyUpdatedTransform(e){let t=[];if(t.push(i=>this._elevateCameraIfInsideTerrain(i)),this.transformCameraUpdate&&t.push(i=>this.transformCameraUpdate(i)),!t.length)return;let r=e.clone();for(let i of t){let n=r.clone(),{center:a,zoom:o,roll:s,pitch:l,bearing:u,elevation:c}=i(n);a&&n.setCenter(a),c!==void 0&&n.setElevation(c),o!==void 0&&n.setZoom(o),s!==void 0&&n.setRoll(s),l!==void 0&&n.setPitch(l),u!==void 0&&n.setBearing(u),r.apply(n,!1)}this.transform.apply(r,!1)}_fireMoveEvents(e){this.fire(new Mn("move",e)),this._zooming&&this.fire(new Mn("zoom",e)),this._rotating&&this.fire(new Mn("rotate",e)),this._pitching&&this.fire(new Mn("pitch",e)),this._rolling&&this.fire(new Mn("roll",e))}_afterEase(e,t){if(this._easeId&&t&&this._easeId===t)return;delete this._easeId;let r=this._zooming,i=this._rotating,n=this._pitching,a=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,r&&this.fire(new Mn("zoomend",e)),i&&this.fire(new Mn("rotateend",e)),n&&this.fire(new Mn("pitchend",e)),a&&this.fire(new Mn("rollend",e)),this.fire(new Mn("moveend",e))}flyTo(e,t){if(!e.essential&&fh.prefersReducedMotion){let k=IT(e,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(k,t)}this.stop(),e=ln({offset:[0,0],speed:1.2,curve:1.42,easing:pB},e),e.zoom!==void 0&&this._zoomSnap&&(e.zoom=Jh(e.zoom,this._zoomSnap));let r=this.getTransformForUpdate(),i=r.bearing,n=r.pitch,a=r.roll,o=r.padding,s=e.bearing===void 0?i:this._normalizeBearing(e.bearing,i),l=e.pitch===void 0?n:+e.pitch,u=e.roll===void 0?a:this._normalizeBearing(e.roll,a),c=e.padding===void 0?r.padding:e.padding,f=tr.convert(e.offset),h=r.centerPoint.add(f),d=r.screenPointToLocation(h),p=this.cameraHelper.handleFlyTo(r,{bearing:s,pitch:l,roll:u,padding:c,locationAtOffset:d,offsetAsPoint:f,center:e.center,minZoom:e.minZoom,zoom:e.zoom}),v=e.curve,m=Math.max(r.width,r.height),g=m/p.scaleOfZoom,w=p.pixelPathLength,b=m/p.scaleOfMinZoom;v=Math.min(v,Math.sqrt(b/w*2));let _=v*v;function M(k){let D=(g*g-m*m+(k?-1:1)*_*_*w*w)/(2*(k?g:m)*_*w);return Math.log(Math.sqrt(D*D+1)-D)}function x(k){return(Math.exp(k)-Math.exp(-k))/2}function T(k){return(Math.exp(k)+Math.exp(-k))/2}function A(k){return x(k)/T(k)}let y=M(!1),E=function(k){return T(y)/T(y+v*k)},S=function(k){return m*((T(y)*A(y+v*k)-x(y))/_)/w},C=(M(!0)-y)/v;if(Math.abs(w)<2e-6||!isFinite(C)){if(Math.abs(m-g)<1e-6)return this.easeTo(e,t);let k=g<m?-1:1;C=Math.abs(Math.log(g/m))/v,S=()=>0,E=D=>Math.exp(k*v*D)}if(e.duration!==void 0)e.duration=+e.duration;else{let k=e.screenSpeed===void 0?+e.speed:+e.screenSpeed/v;e.duration=1e3*C/k}return e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=i!==s,this._pitching=l!==n,this._rolling=u!==a,this._padding=!r.isPaddingEqual(c),this._prepareEase(t,!1),this.terrain&&this._prepareElevation(p.targetCenter),this._ease(k=>{let D=k*C,F=1/E(D),P=S(D);this._rotating&&r.setBearing($s.number(i,s,k)),this._pitching&&r.setPitch($s.number(n,l,k)),this._rolling&&r.setRoll($s.number(a,u,k)),this._padding&&(r.interpolatePadding(o,c,k),h=r.centerPoint.add(f)),p.easeFunc(k,F,P,h),this.terrain&&!e.freezeElevation&&this._updateElevation(k),this.applyUpdatedTransform(r),this._fireMoveEvents(t)},()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(t)},e),this}isEasing(){return!!this._easeFrameId}stop(e){return this._stop(e)}_stop(e,t){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,t)}return e||this._stopHandlers(),this}_ease(e,t,r){r.animate===!1||r.duration===0?(e(1),t()):(this._easeStart=Oo(),this._easeOptions=r,this._onEaseFrame=e,this._onEaseEnd=t,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,t){e=B0(e,-180,180);let r=Math.abs(e-t);return Math.abs(e-360-t)<r&&(e-=360),Math.abs(e+360-t)<r&&(e+=360),e}isMoving(){return this._moving}isZooming(){return this._zooming}isRotating(){return this._rotating}},Ast={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'},Mst=class{constructor(e=Ast){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=t=>{t&&(t.type==="terrain"||t.dataType==="style"||t.dataType==="source"&&(t.sourceDataType==="metadata"||t.sourceDataType==="visibility"))&&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=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=$n.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=$n.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=$n.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(e,t){let r=this._map._getUIString(`AttributionControl.${t}`);e.title=r,e.setAttribute("aria-label",r)}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map(i=>typeof i=="string"?i:"")):typeof this.options.customAttribution=="string"&&e.push(this.options.customAttribution)),this._map.style.stylesheet){let i=this._map.style.stylesheet;this.styleOwner=i.owner,this.styleId=i.id}let t=this._map.style.tileManagers;for(let i in t){let n=t[i];if(n.used||n.usedForTerrain){let a=n.getSource();a.attribution&&!e.includes(a.attribution)&&e.push(a.attribution)}}e=e.filter(i=>String(i).trim()),e.sort((i,n)=>i.length-n.length),e=e.filter((i,n)=>{for(let a=n+1;a<e.length;a++)if(e[a].includes(i))return!1;return!0});let r=e.join(" | ");r!==this._attribHTML&&(this._attribHTML=r,e.length?(this._innerContainer.innerHTML=$n.sanitize(r),this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}},Sst=class{constructor(e={}){this._updateCompact=()=>{let t=this._container.children;if(t.length){let r=t[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&r.classList.add("maplibregl-compact"):r.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){var r;this._map=e,this._compact=(r=this.options)==null?void 0:r.compact,this._container=$n.create("div","maplibregl-ctrl");let t=$n.create("a","maplibregl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://maplibre.org/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}},DTr=class{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){let t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t}remove(e){let t=this._currentlyRunning,r=t?this._queue.concat(t):this._queue;for(let i of r)if(i.id===e){i.cancelled=!0;return}}run(e=0){if(this._currentlyRunning)throw Error("Attempting to run(), but is already running.");let t=this._currentlyRunning=this._queue;this._queue=[];let r=!1,i;for(let n of t)if(!n.cancelled){try{n.callback(e)}catch(a){r||(r=!0,i=a)}if(this._cleared)break}if(this._cleared=!1,this._currentlyRunning=!1,r)throw i}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}},Gat=["none","zoom","sourceTiles","visibleLayers","revision"],FTr=class{constructor(e,t,r,i){this._tileKeys=e.map(n=>n.key).sort().join(),this._revision=t,this._zoom=r,this._visibleLayerIds=i}difference(e){return this._revision===(e==null?void 0:e._revision)?this._visibleLayerIds===e._visibleLayerIds?this._tileKeys===e._tileKeys?this._zoom===e._zoom?"none":"zoom":"sourceTiles":"visibleLayers":"revision"}},jT={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0},LTr=class{constructor(e,t){this.needsFollowUpFrame=!1,this.painter=e,this.terrain=t,this.rttSize=t.tileManager.tileSize*t.qualityFactor}getTexture(e){return e.getRTT(this._stacks.length-1).texture}prepareForRender(e,t){let r=t!==this._lastPrepareZoom;this._lastPrepareZoom=t,this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=e._order.filter(s=>!e._layers[s].isHidden(t));let i=this._renderableLayerIds.join(),n=new Set;for(let s of this._renderableLayerIds){let l=e._layers[s],u=l.source;u&&jT[l.type]&&n.add(u)}this._coordsAscending={},this._rttFingerprints={};for(let s of n){let l=e.tileManagers[s];if(!l)continue;this._coordsAscending[s]={};let u=this._coordsAscending[s],c=l.getSource(),f=c instanceof XT?c.terrainTileRanges:null;for(let p of l.getVisibleCoordinates()){let v=this.terrain.tileManager.getTerrainCoords(p,f);for(let m in v)u[m]||(u[m]=[]),u[m].push(v[m])}this._rttFingerprints[s]={};let h=this._rttFingerprints[s],d=l.getState().revision;for(let p in u)h[p]=new FTr(u[p],d,t,i)}this.needsFollowUpFrame=!1;let a=r||this.painter.options.moving,o=!1;for(let s of this._renderableTiles){let l=this._textureDifference(s);l!=="none"&&(l==="zoom"&&a||l==="visibleLayers"&&r?this.needsFollowUpFrame=!0:l==="zoom"||l==="sourceTiles"?(o?this.needsFollowUpFrame=!0:s.releaseRTT(this.painter),o=!0):s.releaseRTT(this.painter))}}_textureDifference(e){let t="none";for(let r in this._rttFingerprints){let i=this._rttFingerprints[r][e.tileID.key];if(!i)continue;let n=i.difference(e.rttFingerprint[r]);Gat.indexOf(n)>Gat.indexOf(t)&&(t=n)}return t}renderLayer(e,t){if(e.isHidden(this.painter.transform.zoom))return!1;let r=ma(fn({},t),{isRenderingToTexture:!0}),i=e.type,n=this.painter,a=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(jT[i]&&((!this._prevType||!jT[this._prevType])&&this._stacks.push([]),this._prevType=i,this._stacks[this._stacks.length-1].push(e.id),!a))return!0;if(jT[this._prevType]||jT[i]&&a){this._prevType=i;let o=this._stacks.length-1,s=this._stacks[o]||[];for(let l of this._renderableTiles){if(this._rttTiles.push(l),l.getRTT(o))continue;let u=l.acquireRTT(n,o,this.rttSize);n.bindRTT(u),n.context.clear({color:ea.transparent,stencil:0}),n.currentStencilSource=void 0;for(let c of s){let f=n.style._layers[c],h=f.source?this._coordsAscending[f.source][l.tileID.key]:[l.tileID];n.context.viewport.set([0,0,this.rttSize,this.rttSize]),n.renderTileClippingMasks(f,h,!0),n.renderLayer(n,n.style.tileManagers[f.source],f,h,r),f.source&&(l.rttFingerprint[f.source]=this._rttFingerprints[f.source][l.tileID.key])}u.texture.generateMipmap()}return X4r(this.painter,this.terrain,this._rttTiles,r),this._rttTiles=[],jT[i]}return!1}},PTr={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Drag to rotate map, click to reset north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use \u2318 + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},ITr=Wat,Hat={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:Ast,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:Qh.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,rotateSpeed:.8,pitchSpeed:-.5,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,terrainSkirtLength:"auto",zoomLevelsToOverscale:4,anisotropicFilterPitch:20},RTr=class extends mu{get _ownerWindow(){var e,t;return((t=(e=this._container)==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)||window}constructor(e){var n,a,o;super(),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new DTr,this._controls=[],this._mapId=_ie(),this._styleUrl=null,this._missingStyleImageResolver=null,this._lostContextStyle={style:null,images:null},this._contextLost=s=>{if(s.preventDefault(),this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),!this.style){this.fire(new pq("webglcontextlost",{originalEvent:s}));return}for(let l of Object.values(this.style._layers))if(l.type==="custom"&&console.warn(`Custom layer with id '${l.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),l._listeners)for(let[u]of Object.entries(l._listeners))console.warn(`Custom layer with id '${l.id}' had event listeners for event '${u}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new pq("webglcontextlost",{originalEvent:s}))},this._contextRestored=s=>{if(this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style){this.style.imageManager.images=this._lostContextStyle.images;for(let l in this._lostContextStyle.images){let u=this._lostContextStyle.images[l];u.isWebGLImage&&this.style.imageManager.updateImage(l,u,!1)}}this._lostContextStyle={style:null,images:null};try{this._setupPainter()}catch(l){this.fire(new An(l));return}this.resize(),this._update(),this._resizeInternal(),this.fire(new pq("webglcontextrestored",{originalEvent:s}))},this._onMapScroll=s=>{if(s.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()};let t=ma(fn(fn({},Hat),e),{canvasContextAttributes:fn(fn({},Hat.canvasContextAttributes),e.canvasContextAttributes)});if(t.minZoom!=null&&t.maxZoom!=null&&t.minZoom>t.maxZoom)throw Error("maxZoom must be greater than or equal to minZoom");if(t.minPitch!=null&&t.maxPitch!=null&&t.minPitch>t.maxPitch)throw Error("maxPitch must be greater than or equal to minPitch");if(t.minPitch!=null&&t.minPitch<0)throw Error("minPitch must be greater than or equal to 0");if(t.maxPitch!=null&&t.maxPitch>180)throw Error("maxPitch must be less than or equal to 180");this._camera=new CTr({minZoom:t.minZoom,maxZoom:t.maxZoom,minPitch:t.minPitch,maxPitch:t.maxPitch,bearingSnap:t.bearingSnap,zoomSnap:t.zoomSnap,renderWorldCopies:t.renderWorldCopies,centerClampedToGround:t.centerClampedToGround,terrain:this.terrain,transformConstrain:t.transformConstrain,requestRenderFrame:s=>this._requestRenderFrame(s),cancelRenderFrame:s=>this._cancelRenderFrame(s),transformCameraUpdate:t.transformCameraUpdate,stopHandlers:()=>{var s;return(s=this._handlers)==null?void 0:s.stop(!1)}}),this._camera.setEventedParent(this),this._interactive=t.interactive,this._maxTileCacheSize=t.maxTileCacheSize,this._maxTileCacheZoomLevels=t.maxTileCacheZoomLevels,this._canvasContextAttributes=fn({},t.canvasContextAttributes),this._trackResize=t.trackResize===!0,this._terrainSkirtLength=t.terrainSkirtLength,this._refreshExpiredTiles=t.refreshExpiredTiles===!0,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=t.crossSourceCollisions===!0,this._collectResourceTiming=t.collectResourceTiming===!0,this._locale=fn(fn({},PTr),t.locale),this._clickTolerance=t.clickTolerance,this._overridePixelRatio=t.pixelRatio,this._maxCanvasSize=t.maxCanvasSize,this._zoomLevelsToOverscale=t.zoomLevelsToOverscale,this.cancelPendingTileRequestsWhileZooming=t.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(t.anisotropicFilterPitch),t.reduceMotion!==void 0&&(fh.prefersReducedMotion=t.reduceMotion),this._requestManager=new B_r(t.transformRequest),this._container=this._resolveContainer(t.container),t.maxBounds&&this.setMaxBounds(t.maxBounds),this._setupContainer();try{this._setupPainter()}catch(s){throw this._cleanupContainer(),s}this._imageQueueHandle=rg.addThrottleControl(()=>this.isMoving()),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),this._handlers=new kTr(this,this._camera,t),typeof window<"u"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver());let r=typeof t.hash=="string"&&t.hash||void 0;this._hash=t.hash?new hst(r).addTo(this):void 0,(n=this._hash)!=null&&n._onHashChange()||(this.jumpTo({center:t.center,elevation:t.elevation,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch,roll:t.roll}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,ln({},t.fitBoundsOptions,{duration:0}))));let i=typeof t.style=="string"||((o=(a=t.style)==null?void 0:a.projection)==null?void 0:o.type)!=="globe";this.resize(null,i),this._localIdeographFontFamily=t.localIdeographFontFamily,this._validateStyle=t.validateStyle,t.style&&this.setStyle(t.style,{localIdeographFontFamily:t.localIdeographFontFamily}),t.attributionControl&&this.addControl(new Mst(typeof t.attributionControl=="boolean"?void 0:t.attributionControl)),t.maplibreLogo&&this.addControl(new Sst,t.logoPosition),this.on("style.load",()=>{if(i||this._resizeTransform(),this._camera.transform.unmodified){let s=IT(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(s)}}),this.on("data",s=>{this._update(s.dataType==="style"),this.fire(s.dataType==="style"?new rp("styledata",s):new Is("sourcedata",s))}),this.on("dataloading",s=>{this.fire(s.dataType==="style"?new rp("styledataloading",s):new Is("sourcedataloading",s))}),this.on("dataabort",s=>{this.fire(new Is("sourcedataabort",s))})}_getMapId(){return this._mapId}setGlobalStateProperty(e,t){return this.style.setGlobalStateProperty(e,t),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(e,t){if(t===void 0&&(t=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!(e!=null&&e.onAdd))return this.fire(new An(Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let r=e.onAdd(this);this._controls.push(e);let i=this._controlPositions[t];return t.includes("bottom")?i.insertBefore(r,i.firstChild):i.appendChild(r),this}removeControl(e){if(!(e!=null&&e.onRemove))return this.fire(new An(Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let t=this._controls.indexOf(e);return t>-1&&this._controls.splice(t,1),e.onRemove(this),this}hasControl(e){return this._controls.includes(e)}coveringTiles(e){return ZT(this._camera.transform,e)}setTransformCameraUpdate(e){this._camera.transformCameraUpdate=e}getCenter(){return new mn(this._camera.transform.center.lng,this._camera.transform.center.lat)}setCenter(e,t){return this._camera.setCenter(e,t),this}getCenterElevation(){return this._camera.transform.elevation}setCenterElevation(e,t){return this._camera.setCenterElevation(e,t),this}setCenterClampedToGround(e){this._camera.setCenterClampedToGround(e)}panBy(e,t,r){return this._camera.panBy(e,t,r),this}panTo(e,t,r){return this._camera.panTo(e,t,r),this}getZoom(){return this._camera.transform.zoom}setZoom(e,t){return this._camera.setZoom(e,t),this}zoomTo(e,t,r){return this._camera.zoomTo(e,t,r),this}zoomIn(e,t){return this._camera.zoomIn(e,t),this}zoomOut(e,t){return this._camera.zoomOut(e,t),this}getVerticalFieldOfView(){return this._camera.transform.fov}setVerticalFieldOfView(e,t){return this._camera.setVerticalFieldOfView(e,t),this}getBearing(){return this._camera.transform.bearing}setBearing(e,t){return this._camera.setBearing(e,t),this}getZoomSnap(){return this._camera.getZoomSnap()}setZoomSnap(e){return this._camera.setZoomSnap(e),this}getPadding(){return this._camera.transform.padding}setPadding(e,t){return this._camera.setPadding(e,t),this}rotateTo(e,t,r){return this._camera.rotateTo(e,t,r),this}resetNorth(e,t){return this._camera.resetNorth(e,t),this}resetNorthPitch(e,t){return this._camera.resetNorthPitch(e,t),this}snapToNorth(e,t){return this._camera.snapToNorth(e,t),this}getPitch(){return this._camera.transform.pitch}setPitch(e,t){return this._camera.setPitch(e,t),this}getRoll(){return this._camera.transform.roll}setRoll(e,t){return this._camera.setRoll(e,t),this}cameraForBounds(e,t){return this._camera.cameraForBounds(e,t)}fitBounds(e,t,r){return this._camera.fitBounds(e,t,r),this}fitScreenCoordinates(e,t,r,i,n){return this._camera.fitScreenCoordinates(e,t,r,i,n),this}jumpTo(e,t){return this._camera.jumpTo(e,t),this}calculateCameraOptionsFromCameraLngLatAltRotation(e,t,r,i,n){return this._camera.calculateCameraOptionsFromCameraLngLatAltRotation(e,t,r,i,n)}easeTo(e,t){return this._camera.easeTo(e,t),this}flyTo(e,t){return this._camera.flyTo(e,t),this}stop(){return this._camera.stop(),this}queryTerrainElevation(e){return this.terrain?this.terrain.getElevationForLngLat(mn.convert(e),this._camera.transform):null}getCenterClampedToGround(){return this._camera.getCenterClampedToGround()}calculateCameraOptionsFromTo(e,t,r,i){return i==null&&this.terrain&&(i=this.terrain.getElevationForLngLat(r,this._camera.transform)),this._camera.transform.calculateCameraOptionsFromTo(e,t,r,i!=null?i:0)}resize(e,t=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(t);let r=!this._camera._moving;return r&&(this.stop(),this.fire(new Mn("movestart",e)).fire(new Mn("move",e))),this.fire(new cc("resize",e)),r&&this.fire(new Mn("moveend",e)),this}_resizeInternal(e=!0){let[t,r]=this._containerDimensions(),i=this._getClampedPixelRatio(t,r);if(this._resizeCanvas(t,r,i),this.painter.resize(t,r,i),this.painter.overLimit()){let n=this.painter.context.gl;this._maxCanvasSize=[n.drawingBufferWidth,n.drawingBufferHeight];let a=this._getClampedPixelRatio(t,r);this._resizeCanvas(t,r,a),this.painter.resize(t,r,a)}this._resizeTransform(e)}_resizeTransform(e=!0){var i;let[t,r]=this._containerDimensions();this._camera.transform.resize(t,r,e),(i=this._camera._requestedCameraState)==null||i.resize(t,r,e)}_getClampedPixelRatio(e,t){let{0:r,1:i}=this._maxCanvasSize,n=this.getPixelRatio(),a=e*n,o=t*n,s=a>r?r/a:1,l=o>i?i/o:1,u=Math.min(s,l);return u<1&&Ma("The canvas is larger than maxCanvasSize and is rendered at a lower pixel ratio to fit. Increase maxCanvasSize, within MAX_TEXTURE_SIZE, to render at full resolution."),u*n}getPixelRatio(){var e;return(e=this._overridePixelRatio)!=null?e:devicePixelRatio}setPixelRatio(e){this._overridePixelRatio=e,this.resize()}getBounds(){return this._camera.transform.getBounds()}getMaxBounds(){return this._camera.transform.getMaxBounds()}setMaxBounds(e){return this._camera.transform.setMaxBounds(Ev.convert(e)),this._update()}setMinZoom(e){if(e!=null||(e=-2),e>=-2&&e<=this._camera.transform.maxZoom){let t=this._camera.transform.zoom,r=this._camera.getTransformForUpdate();return r.setMinZoom(e),this._camera.applyUpdatedTransform(r),this._update(),t!==this._camera.transform.zoom&&this.fire(new Mn("zoomstart")).fire(new Mn("zoom")).fire(new Mn("zoomend")).fire(new Mn("movestart")).fire(new Mn("move")).fire(new Mn("moveend")),this}throw Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(e=!1){let t=this._camera.transform;return e?t.applyConstrain(t.center,t.minZoom).zoom:t.minZoom}setMaxZoom(e){if(e!=null||(e=22),e>=this._camera.transform.minZoom){let t=this._camera.transform.zoom,r=this._camera.getTransformForUpdate();return r.setMaxZoom(e),this._camera.applyUpdatedTransform(r),this._update(),t!==this._camera.transform.zoom&&this.fire(new Mn("zoomstart")).fire(new Mn("zoom")).fire(new Mn("zoomend")).fire(new Mn("movestart")).fire(new Mn("move")).fire(new Mn("moveend")),this}throw Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this._camera.transform.maxZoom}setMinPitch(e){if(e!=null||(e=0),e<0)throw Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this._camera.transform.maxPitch){let t=this._camera.transform.pitch,r=this._camera.getTransformForUpdate();return r.setMinPitch(e),this._camera.applyUpdatedTransform(r),this._update(),t!==this._camera.transform.pitch&&this.fire(new Mn("pitchstart")).fire(new Mn("pitch")).fire(new Mn("pitchend")).fire(new Mn("movestart")).fire(new Mn("move")).fire(new Mn("moveend")),this}throw Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this._camera.transform.minPitch}setMaxPitch(e){if(e!=null||(e=60),e>180)throw Error("maxPitch must be less than or equal to 180");if(e>=this._camera.transform.minPitch){let t=this._camera.transform.pitch,r=this._camera.getTransformForUpdate();return r.setMaxPitch(e),this._camera.applyUpdatedTransform(r),this._update(),t!==this._camera.transform.pitch&&this.fire(new Mn("pitchstart")).fire(new Mn("pitch")).fire(new Mn("pitchend")).fire(new Mn("movestart")).fire(new Mn("move")).fire(new Mn("moveend")),this}throw Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this._camera.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(e){if(e!=null||(e=20),e>180)throw Error("anisotropicFilterPitch must be less than or equal to 180");if(e<0)throw Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=e,this._update()}getRenderWorldCopies(){return this._camera.transform.renderWorldCopies}setRenderWorldCopies(e){return this._camera.transform.setRenderWorldCopies(e),this._update()}setTransformConstrain(e){return this._camera.transform.setConstrainOverride(e),this._update()}project(e){return this._camera.transform.locationToScreenPoint(mn.convert(e),this.style&&this.terrain)}unproject(e){return this._camera.transform.screenPointToLocation(tr.convert(e),this.terrain)}isMoving(){var e;return this._camera.isMoving()||((e=this._handlers)==null?void 0:e.isMoving())||!1}isZooming(){var e;return this._camera.isZooming()||((e=this._handlers)==null?void 0:e.isZooming())||!1}isRotating(){var e;return this._camera.isRotating()||((e=this._handlers)==null?void 0:e.isRotating())||!1}_createDelegatedListener(e,t,r){if(e==="mouseenter"||e==="mouseover"){let i=!1;return{layers:t,listener:r,delegates:{mousemove:n=>{let a=t.filter(s=>this.getLayer(s)),o=a.length===0?[]:this.queryRenderedFeatures(n.point,{layers:a});o.length?i||(i=!0,r.call(this,new O0(e,this,n.originalEvent,{features:o}))):i=!1},mouseout:()=>{i=!1}}}}if(e==="mouseleave"||e==="mouseout"){let i=!1;return{layers:t,listener:r,delegates:{mousemove:n=>{let a=t.filter(o=>this.getLayer(o));(a.length===0?[]:this.queryRenderedFeatures(n.point,{layers:a})).length?i=!0:i&&(i=!1,r.call(this,new O0(e,this,n.originalEvent)))},mouseout:n=>{i&&(i=!1,r.call(this,new O0(e,this,n.originalEvent)))}}}}{let i=n=>{let a=t.filter(s=>this.getLayer(s)),o=a.length===0?[]:this.queryRenderedFeatures(n.point,{layers:a});o.length&&(n.features=o,r.call(this,n),delete n.features)};return{layers:t,listener:r,delegates:{[e]:i}}}}_saveDelegatedListener(e,t){var r;this._delegatedListeners||(this._delegatedListeners={}),(r=this._delegatedListeners)[e]||(r[e]=[]),this._delegatedListeners[e].push(t)}_removeDelegatedListener(e,t,r){var n;if(!((n=this._delegatedListeners)!=null&&n[e]))return;let i=this._delegatedListeners[e];for(let a=0;a<i.length;a++){let o=i[a];if(o.listener===r&&o.layers.length===t.length&&o.layers.every(s=>t.includes(s))){for(let s in o.delegates)this.off(s,o.delegates[s]);i.splice(a,1);return}}}on(e,t,r){if(r===void 0)return super.on(e,t);let i=typeof t=="string"?[t]:t,n=this._createDelegatedListener(e,i,r);this._saveDelegatedListener(e,n);for(let a in n.delegates)this.on(a,n.delegates[a]);return{unsubscribe:()=>{this._removeDelegatedListener(e,i,r)}}}once(e,t,r){if(r===void 0)return super.once(e,t);let i=typeof t=="string"?[t]:t,n=this._createDelegatedListener(e,i,r);for(let a in n.delegates){let o=n.delegates[a];n.delegates[a]=(...s)=>{this._removeDelegatedListener(e,i,r),o(...s)}}this._saveDelegatedListener(e,n);for(let a in n.delegates)this.once(a,n.delegates[a]);return this}off(e,t,r){if(r===void 0)return super.off(e,t);let i=typeof t=="string"?[t]:t;return this._removeDelegatedListener(e,i,r),this}queryRenderedFeatures(e,t){if(!this.style)return[];let r,i=e instanceof tr||Array.isArray(e),n=i?e:[[0,0],[this._camera.transform.width,this._camera.transform.height]];if(t||(t=(i?{}:e)||{}),n instanceof tr||typeof n[0]=="number")r=[tr.convert(n)];else{let a=tr.convert(n[0]),o=tr.convert(n[1]);r=[a,new tr(o.x,a.y),o,new tr(a.x,o.y),a]}return this.style.queryRenderedFeatures(r,t,this._camera.transform)}querySourceFeatures(e,t){return this.style.querySourceFeatures(e,t)}setStyle(e,t){return t=ln({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},t),this._styleUrl=typeof e=="string"?e:null,t.diff!==!1&&t.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,t),this):(this._localIdeographFontFamily=t.localIdeographFontFamily,this._updateStyle(e,t))}setTransformRequest(e){return this._requestManager.setTransformRequest(e),this}_getUIString(e){let t=this._locale[e];if(t==null)throw Error(`Missing UI string '${e}'`);return t}_updateStyle(e,t){var i,n,a;if((i=this._diffStyleRequest)==null||i.abort(),this._diffStyleRequest=null,t.transformStyle&&this.style&&!this.style._loaded){this.style.once("style.load",()=>this._updateStyle(e,t));return}let r=this.style&&t.transformStyle?this.style.serialize():void 0;if(this.style&&(this.style.setEventedParent(null),this.style._remove(!e)),e)this.style=new hae(this,t||{});else return this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),(a=(n=this.style)==null?void 0:n.projection)==null||a.destroy(),delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof e=="string"?this.style.loadURL(e,t,r):this.style.loadJSON(e,t,r),this}_lazyInitEmptyStyle(){this.style||(this.style=new hae(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(e,t){return Ki(this,null,function*(){var r;if((r=this._diffStyleRequest)==null||r.abort(),typeof e=="string"){let i=e;this._diffStyleRequest=new AbortController;let n=this._diffStyleRequest;try{let a=yield this._requestManager.transformRequest(i,"Style");if(n.signal.aborted){this._diffStyleRequest=null;return}let o=yield jk(a,n);this._diffStyleRequest=null,this._updateDiff(o.data,t)}catch(a){this._diffStyleRequest=null,Fm(a)||this.fire(new An(Ic(a)))}}else typeof e=="object"&&(this._diffStyleRequest=null,this._updateDiff(e,t))})}_updateDiff(e,t){try{this.style.setState(e,t)&&this._update(!0)}catch(r){Ma(`Unable to perform style diff: ${Ic(r).message}. Rebuilding the style from scratch.`),this._updateStyle(e,t)}}getStyle(){if(this.style)return this.style.serialize()}getStyleUrl(){return this._styleUrl}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(!this.style){Ma("There is no style added to the map.");return}return this.style.loaded()}addSource(e,t){return this._lazyInitEmptyStyle(),this.style.addSource(e,t),this._update(!0)}isSourceLoaded(e){var r;let t=(r=this.style)==null?void 0:r.tileManagers[e];if(t===void 0){this.fire(new An(Error(`There is no tile manager with ID '${e}'`)));return}return t.loaded()}setTerrain(e,t={}){if(this.style._checkLoaded(),e&&qT(this,ch.terrain,{value:e},t))return this;if(this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),!e)this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture=null,this._camera.terrain=null,this._camera.transform.setMinElevationForCurrentTile(0),this.getCenterClampedToGround()&&this._camera.transform.setElevation(0);else{let r=this.style.tileManagers[e.source];if(!r)throw Error(`cannot load terrain, because there exists no source with ID: ${e.source}`);this.terrain===null&&r.reload();for(let i in this.style._layers){let n=this.style._layers[i];n.type==="hillshade"&&n.source===e.source&&Ma("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),n.type==="color-relief"&&n.source===e.source&&Ma("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain&&this.terrain.destroy(),this.terrain=new W3r(this.painter,r,e,this._terrainSkirtLength),this.painter.renderToTexture=new LTr(this.painter,this.terrain),this._camera.terrain=this.terrain,this._camera.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._camera.transform.center,this._camera.transform.tileZoom)),this._camera.transform.setElevation(this.terrain.getElevationForLngLat(this._camera.transform.center,this._camera.transform)),this._terrainDataCallback=i=>this._handleTerrainDataEvent(i,e.source),this.style.on("data",this._terrainDataCallback)}return this.style.triggerSymbolPlacement(),this.fire(new Zat({terrain:e})),this}_handleTerrainDataEvent(e,t){var i;if(e.dataType==="style"){this.terrain.tileManager.releaseAllRTT();return}let r=e.sourceId===t;if(r&&(this.terrain.resetElevationCache(),this.style.triggerSymbolPlacement()),r&&e.tile&&!this._camera.elevationFreeze&&(this._camera.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._camera.transform.center,this._camera.transform.tileZoom)),this.getCenterClampedToGround()&&this._camera.transform.setElevation(this.terrain.getElevationForLngLat(this._camera.transform.center,this._camera.transform))),e.tile){if(((i=e.source)==null?void 0:i.type)==="image"){this.terrain.tileManager.releaseAllRTT();return}this.terrain.tileManager.releaseRTT(e.tile.tileID)}}getTerrain(){var e,t;return(t=(e=this.terrain)==null?void 0:e.options)!=null?t:null}areTilesLoaded(){var t;let e=(t=this.style)==null?void 0:t.tileManagers;for(let r of Object.values(e))if(!r.areTilesLoaded())return!1;return!0}removeSource(e){return this.style.removeSource(e),this._update(!0)}getSource(e){var t;return(t=this.style)==null?void 0:t.getSource(e)}setSourceTileLodParams(e,t,r){if(r){let i=this.getSource(r);if(!i)throw Error(`There is no source with ID "${r}", cannot set LOD parameters`);i.calculateTileZoom=nae(Math.max(1,e),Math.max(1,t))}else for(let i in this.style.tileManagers)this.style.tileManagers[i].getSource().calculateTileZoom=nae(Math.max(1,e),Math.max(1,t));return this._update(!0),this}refreshTiles(e,t){let r=this.style.tileManagers[e];if(!r)throw Error(`There is no tile manager with ID "${e}", cannot refresh tile`);t===void 0?r.reload(!0):r.refreshTiles(t.map(i=>new l8(i.z,i.x,i.y)))}addImage(e,t,r={}){var n;this._lazyInitEmptyStyle();let i=this._createStyleImage(t,r);return i?(this.style.addImage(e,i),(n=i.userImage)!=null&&n.onAdd&&i.userImage.onAdd(this,e),this):this}setMissingStyleImageResolver(e){var t;return this._missingStyleImageResolver=e,(t=this.style)==null||t.setMissingImageResolver(e),this}_createStyleImage(e,t={}){let{pixelRatio:r=1,sdf:i=!1,stretchX:n,stretchY:a,content:o,textFitWidth:s,textFitHeight:l}=t;if(e instanceof HTMLImageElement||ex(e)){let{width:u,height:c,data:f}=fh.getImageData(e);return{data:new As({width:u,height:c},f),pixelRatio:r,stretchX:n,stretchY:a,content:o,textFitWidth:s,textFitHeight:l,sdf:i,version:0}}if(e.width===void 0||e.height===void 0)return this.fire(new An(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`"))),null;{let{width:u,height:c,data:f}=e,h=e,d=i8(h.data);return{data:d?new As({width:u,height:c}):new As({width:u,height:c},new Uint8Array(f)),pixelRatio:r,stretchX:n,stretchY:a,content:o,textFitWidth:s,textFitHeight:l,sdf:i,version:0,isWebGLImage:d,userImage:h}}}updateImage(e,t){let r=this.style.getImage(e);if(!r)return this.fire(new An(Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let{width:i,height:n,data:a}=t instanceof HTMLImageElement||ex(t)?fh.getImageData(t):t;if(i===void 0||n===void 0)return this.fire(new An(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(i!==r.data.width||n!==r.data.height)return this.fire(new An(Error("The width and height of the updated image must be that same as the previous version of the image")));if(r.isWebGLImage=i8(a),r.isWebGLImage)r.userImage=t;else{let o=!(t instanceof HTMLImageElement||ex(t));r.data.replace(a,o)}return this.style.updateImage(e,r),this}getImage(e){return this.style.getImage(e)}hasImage(e){return e?!!this.style.getImage(e):(this.fire(new An(Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e)}loadImage(e){return Ki(this,null,function*(){let t=yield rg.getImage(yield this._requestManager.transformRequest(e,"Image"),new AbortController);if(!t.data)throw Error(`Could not load image ${e}: the response is empty`);return t})}listImages(){var e,t;return(t=(e=this.style)==null?void 0:e.listImages())!=null?t:[]}addLayer(e,t){return this._lazyInitEmptyStyle(),this.style.addLayer(e,t),this._update(!0)}moveLayer(e,t){return this.style.moveLayer(e,t),this._update(!0)}removeLayer(e){return this.style.removeLayer(e),this._update(!0)}getLayer(e){var t;return(t=this.style)==null?void 0:t.getLayer(e)}getLayersOrder(){var e,t;return(t=(e=this.style)==null?void 0:e.getLayersOrder())!=null?t:[]}setLayerZoomRange(e,t,r){return this.style.setLayerZoomRange(e,t,r),this._update(!0)}setFilter(e,t,r={}){var i;return(i=this.style)==null||i.setFilter(e,t,r),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,t,r,i={}){var n;return(n=this.style)==null||n.setPaintProperty(e,t,r,i),this._update(!0)}getPaintProperty(e,t){return this.style.getPaintProperty(e,t)}setLayoutProperty(e,t,r,i={}){return this.style.setLayoutProperty(e,t,r,i),this._update(!0)}getLayoutProperty(e,t){return this.style.getLayoutProperty(e,t)}setGlyphs(e,t={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(e,t),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}setFontFaces(e){return this._lazyInitEmptyStyle(),this.style.setFontFaces(e),this._update(!0)}getFontFaces(){return this.style.getFontFaces()}addSprite(e,t,r={}){return this._lazyInitEmptyStyle(),this.style.addSprite(e,t,r,i=>{i||this._update(!0)}),this}removeSprite(e){return this._lazyInitEmptyStyle(),this.style.removeSprite(e),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSprite(e,t,r=>{r||this._update(!0)}),this}setLight(e,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(e,t),this._update(!0)}getLight(){return this.style.getLight()}setSky(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSky(e,t),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(e,t){return this.style.setFeatureState(e,t),this._update()}removeFeatureState(e,t){return this.style.removeFeatureState(e,t),this._update()}getFeatureState(e){return this.style.getFeatureState(e)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let e=0,t=0;return this._container&&(e=this._container.clientWidth||400,t=this._container.clientHeight||300),[e,t]}_shouldHandleInitialResize(){var r;if(!((r=this._container)!=null&&r.clientWidth)||!this._container.clientHeight)return!1;let[e,t]=this._containerDimensions();return e!==this._camera.transform.width||t!==this._camera.transform.height}_setupResizeObserver(){var i;let e=!1,t=fst(n=>{this._trackResize&&!this._removed&&(this.resize(n),this.redraw())},50),r=(i=this._ownerWindow.ResizeObserver)!=null?i:ResizeObserver;this._resizeObserver=new r(n=>{!e&&(e=!0,!this._shouldHandleInitialResize())||t(n)}),this._resizeObserver.observe(this._container)}_resolveContainer(e){if(typeof e=="string"){let t=document.getElementById(e);if(!t)throw Error(`Container '${e}' not found.`);return t}if(e instanceof HTMLElement||e&&typeof e=="object"&&e.nodeType===1)return e;throw Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let e=this._container;e.classList.add("maplibregl-map");let t=this._canvasContainer=$n.create("div","maplibregl-canvas-container",e);this._interactive&&t.classList.add("maplibregl-interactive"),this._canvas=$n.create("canvas","maplibregl-canvas",t),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 r=this._containerDimensions(),i=this._getClampedPixelRatio(r[0],r[1]);this._resizeCanvas(r[0],r[1],i);let n=this._controlContainer=$n.create("div","maplibregl-control-container",e),a=this._controlPositions={};for(let o of["top-left","top-right","bottom-left","bottom-right"])a[o]=$n.create("div",`maplibregl-ctrl-${o} `,n);this._container.addEventListener("scroll",this._onMapScroll,!1)}_cleanupContainer(){this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map")}_resizeCanvas(e,t,r){this._canvas.width=Math.floor(r*e),this._canvas.height=Math.floor(r*t),this._canvas.style.width=`${e}px`,this._canvas.style.height=`${t}px`}_setupPainter(){let e=ma(fn({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),t=null;this._canvas.addEventListener("webglcontextcreationerror",i=>{t=i},{once:!0});let r=this._canvas.getContext("webgl2",e);if(!r)throw new cst(e,t);this.painter=new tTr(r,this._camera.transform)}migrateProjection(e,t){this._camera.migrateProjection(e,t),this.painter.transform=e,this.fire(new Kat({newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){var t;return(t=this.style)!=null&&t._loaded?(this._styleDirty||(this._styleDirty=e),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e)}_render(e){var o,s,l,u,c;let t=this._idleTriggered?this._fadeDuration:0,r=((o=this.style.projection)==null?void 0:o.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),this._removed)return;let i=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let f=this._camera.transform.zoom,h=Oo();this.style.zoomHistory.update(f,h);let d=new Co(f,{now:h,fadeDuration:t,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),p=d.crossFadingFactor();(p!==1||p!==this._crossFadingFactor)&&(i=!0,this._crossFadingFactor=p),this.style.update(d)}let n=((s=this.style.projection)==null?void 0:s.transitionState)>0!==r;this._camera.transform.setTransitionState((l=this.style.projection)==null?void 0:l.transitionState),this.style&&(this._sourcesDirty||n)&&(this._sourcesDirty=!1,this.style._updateSources(this._camera.transform)),this.terrain?(this.terrain.tileManager.update(this._camera.transform,this.terrain)&&this.terrain.resetElevationCache(),this._camera.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._camera.transform.center,this._camera.transform.tileZoom)),!this._camera.elevationFreeze&&this.getCenterClampedToGround()&&this._camera.transform.setElevation(this.terrain.getElevationForLngLat(this._camera.transform.center,this._camera.transform))):(this._camera.transform.setMinElevationForCurrentTile(0),this.getCenterClampedToGround()&&this._camera.transform.setElevation(0)),this._placementDirty=(u=this.style)==null?void 0:u._updatePlacement(this._camera.transform,this.showCollisionBoxes,t,this._crossSourceCollisions,n),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:t,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new cc("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new cc("load"))),this.style&&(this.style.hasTransitions()||i)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let a=this._sourcesDirty||this._styleDirty||this._placementDirty||((c=this.painter.renderToTexture)==null?void 0:c.needsFollowUpFrame);return a||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new cc("idle")),this._loaded&&!this._fullyLoaded&&!a&&(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._render(0)),this}remove(){var t,r;this._hash&&this._hash.remove();for(let i of this._controls)i.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest=(this._frameRequest.abort(),null)),this._renderTaskQueue.clear(),(t=this._diffStyleRequest)==null||t.abort(),this.painter.destroy(),this._handlers.destroy(),this.setStyle(null),typeof window<"u"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),rg.removeThrottleControl(this._imageQueueHandle),(r=this._resizeObserver)==null||r.disconnect();let e=this.painter.context.gl.getExtension("WEBGL_lose_context");e!=null&&e.loseContext&&e.loseContext(),this._cleanupContainer(),this._removed=!0,this.fire(new cc("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,fh.frame(this._frameRequest,e=>{this._frameRequest=null;try{this._render(e)}catch(t){if(!Fm(t))throw t}},()=>{},this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(e){this._showTileBoundaries!==e&&(this._showTileBoundaries=e,this._update())}get showPadding(){return!!this._showPadding}set showPadding(e){this._showPadding!==e&&(this._showPadding=e,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(e){this._showCollisionBoxes!==e&&(this._showCollisionBoxes=e,e?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(e){this._showOverdrawInspector!==e&&(this._showOverdrawInspector=e,this._update())}get repaint(){return!!this._repaint}set repaint(e){this._repaint!==e&&(this._repaint=e,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(e){this._vertices=e,this._update()}get version(){return ITr}getCameraTargetElevation(){return this._camera.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(e){return this._lazyInitEmptyStyle(),this.style.setProjection(e),this._update(!0)}},zTr={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0},BTr=class{constructor(e){this._updateZoomButtons=()=>{let t=this._map.getZoom(),r=t===this._map.getMaxZoom(),i=t===this._map.getMinZoom(!0);this._zoomInButton.disabled=r,this._zoomOutButton.disabled=i,this._zoomInButton.setAttribute("aria-disabled",r.toString()),this._zoomOutButton.setAttribute("aria-disabled",i.toString())},this._rotateCompassArrow=()=>{let t=this._map.getPitch(),r=this._map.getRoll(),i=this._map.getBearing(),n=1/Math.cos(js(t))**.5;if(this.options.visualizePitch&&this.options.visualizeRoll){this._compassIcon.style.transform=`scale(${n}) rotateZ(${-r}deg) rotateX(${t}deg) rotateZ(${-i}deg)`;return}if(this.options.visualizePitch){this._compassIcon.style.transform=`scale(${n}) rotateX(${t}deg) rotateZ(${-i}deg)`;return}if(this.options.visualizeRoll){this._compassIcon.style.transform=`rotate(${-i-r}deg)`;return}this._compassIcon.style.transform=`rotate(${-i}deg)`},this._setButtonTitle=(t,r)=>{let i=this._map._getUIString(`NavigationControl.${r}`);t.title=i,t.setAttribute("aria-label",i)},this.options=ln({},zTr,e),this._container=$n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",t=>t.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",t=>this._map.zoomIn({},{originalEvent:t})),$n.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",t=>this._map.zoomOut({},{originalEvent:t})),$n.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",t=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:t}):this._map.resetNorth({},{originalEvent:t})}),this._compassIcon=$n.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(e){return this._map=e,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("move",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new qTr(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("move",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(e,t){let r=$n.create("button",e,this._container);return r.type="button",r.addEventListener("click",t),r}},qTr=class{constructor(e,t,r=!1){this.mousedown=n=>{this.startMove(n,$n.mousePos(this.element,n)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=n=>{this.move(n,$n.mousePos(this.element,n))},this.mouseup=n=>{this._rotatePitchHandler.dragEnd(n),this.offTemp()},this.touchstart=n=>{n.targetTouches.length===1?(this._startPos=this._lastPos=$n.touchPos(this.element,n.targetTouches)[0],this.startMove(n,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend)):this.reset()},this.touchmove=n=>{n.targetTouches.length===1?(this._lastPos=$n.touchPos(this.element,n.targetTouches)[0],this.move(n,this._lastPos)):this.reset()},this.touchend=n=>{n.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._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=t;let i=new gTr;this._rotatePitchHandler=new E8({clickTolerance:3,move:(n,a)=>{let o=t.getBoundingClientRect(),s=new tr((o.bottom-o.top)/2,(o.right-o.left)/2);return{bearingDelta:Tie(new tr(n.x,a.y),a,s),pitchDelta:r?(a.y-n.y)*-.5:void 0}},moveStateManager:i,enable:!0,assignEvents:()=>{}}),this.map=e,t.addEventListener("mousedown",this.mousedown),t.addEventListener("touchstart",this.touchstart,{passive:!1}),t.addEventListener("touchcancel",this.reset)}startMove(e,t){this._rotatePitchHandler.dragStart(e,t),$n.disableDrag()}move(e,t){let r=this.map,{bearingDelta:i,pitchDelta:n}=this._rotatePitchHandler.dragMove(e,t)||{};i&&r.setBearing(r.getBearing()+i),n&&r.setPitch(r.getPitch()+n)}off(){let e=this.element;e.removeEventListener("mousedown",this.mousedown),e.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),e.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){$n.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}};Oae={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%)"};jat={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]},Cst="#3FB1CE";o3=class extends e0{},Dst=class extends e0{},vae=class extends mu{constructor(e){if(super(),this._onClick=t=>{this.fire(new Dst("click",{originalEvent:t}))},this._onKeyPress=t=>{(t.code==="Space"||t.code==="Enter")&&this.togglePopup()},this._onKeyDown=t=>{if(!this._defaultMarker||!this._draggable||!this._map||!this._lngLat||t.composedPath()[0]!==this._element||t.altKey||t.ctrlKey||t.metaKey)return;let r=jat[t.key];if(!r)return;t.preventDefault(),t.stopPropagation();let i=t.shiftKey?10:1,n=this._map.project(this._lngLat);this.setLngLat(this._map.unproject(new tr(n.x+r[0]*i,n.y+r[1]*i))),this._keyboardDragActive||(this._keyboardDragActive=!0,this.fire(new o3("dragstart"))),this.fire(new o3("drag"))},this._onKeyUp=t=>{jat[t.key]&&this._endKeyboardDrag()},this._onBlur=()=>{this._endKeyboardDrag()},this._onMapClick=t=>{let r=t.originalEvent.target,i=this._element;this._popup&&(r===i||i.contains(r))&&this.togglePopup()},this._update=t=>{if(!this._map)return;let r=this._map.loaded()&&!this._map.isMoving();((t==null?void 0:t.type)==="terrain"||(t==null?void 0:t.type)==="render"&&!r)&&this._map.once("render",this._update),this._lngLat=Est(this._lngLat,this._flatPos,this._map._camera.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map._camera.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let i="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?i=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(i=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let n="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?n="rotateX(0deg)":this._pitchAlignment==="map"&&(n=`rotateX(${this._map.getPitch()}deg)`),!this._subpixelPositioning&&(!t||t.type==="moveend")&&(this._pos=this._pos.round()),this._element.style.transform=`${Oae[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${n} ${i}`,fh.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity((t==null?void 0:t.type)==="moveend")}).catch(()=>{})},this._onMove=t=>{if(!this._isDragging){let r=this._clickTolerance||this._map._clickTolerance;this._isDragging=t.point.dist(this._pointerdownPos)>=r}this._isDragging&&(this._pos=t.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 o3("dragstart"))),this.fire(new o3("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 o3("dragend")),this._state="inactive"},this._addDragHandler=t=>{this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._pointerdownPos=t.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=(e==null?void 0:e.anchor)||"center",this._color=(e==null?void 0:e.color)||Cst,this._scale=(e==null?void 0:e.scale)||1,this._draggable=(e==null?void 0:e.draggable)||!1,this._clickTolerance=(e==null?void 0:e.clickTolerance)||0,this._subpixelPositioning=(e==null?void 0:e.subpixelPositioning)||!1,this._isDragging=!1,this._roleManaged=!1,this._tabIndexManaged=!1,this._keyboardDragActive=!1,this._state="inactive",this._rotation=(e==null?void 0:e.rotation)||0,this._rotationAlignment=(e==null?void 0:e.rotationAlignment)||"auto",this._pitchAlignment=e!=null&&e.pitchAlignment&&e.pitchAlignment!=="auto"?e.pitchAlignment:this._rotationAlignment,this.setOpacity(e==null?void 0:e.opacity,e==null?void 0:e.opacityWhenCovered),e==null?void 0:e.element)this._element=e.element,this._offset=tr.convert((e==null?void 0:e.offset)||[0,0]);else{this._defaultMarker=!0,this._element=$n.create("div");let t=NTr().cloneNode(!0);t.setAttributeNS(null,"height",`${41*this._scale}px`),t.setAttributeNS(null,"width",`${27*this._scale}px`),UTr(t).setAttributeNS(null,"fill",this._color),this._element.appendChild(t),this._offset=tr.convert((e==null?void 0:e.offset)||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",t=>{t.preventDefault()}),this._element.addEventListener("mousedown",t=>{t.preventDefault()}),kst(this._element,this._anchor,"marker"),e==null?void 0:e.className)for(let t of e.className.split(" "))this._element.classList.add(t);this._popup=null}addTo(e){return this.remove(),this._map=e,this._defaultMarker&&!this._element.hasAttribute("aria-label")&&this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),this._updateAccessibilityRole(),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),e.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),this._element.removeEventListener("click",this._onClick),this._element.removeEventListener("keydown",this._onKeyDown),this._element.removeEventListener("keyup",this._onKeyUp),this._element.removeEventListener("blur",this._onBlur),this._element.removeEventListener("keypress",this._onKeyPress),this._keyboardDragActive=!1,this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=mn.convert(e),this._pos=null,this._update(),this._popup&&this._popup.setLngLat(this._lngLat),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress)),e){if(!("offset"in e.options)){let t=13.5/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[t,(24.6+t)*-1],"bottom-right":[-t,(24.6+t)*-1],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=e,this._element.addEventListener("keypress",this._onKeyPress)}return this._updateTabIndex(),this._updateAccessibilityRole(),this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}_endKeyboardDrag(){this._keyboardDragActive&&(this._keyboardDragActive=!1,this.fire(new o3("dragend")))}getPopup(){return this._popup}togglePopup(){let e=this._popup;if(this._element.style.opacity===this._opacityWhenCovered)return this;if(e)e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map));else return this;return this}_updateOpacity(e=!1){var h,d;let t=(h=this._map)==null?void 0:h.terrain,r=this._map._camera.transform.isLocationOccluded(this._lngLat);if(!t||r){let p=r?this._opacityWhenCovered:this._opacity;this._element.style.opacity!==p&&(this._element.style.opacity=p,this._element.classList.toggle("maplibregl-marker-covered",r));return}if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let i=this._map,n=i.terrain.depthAtPoint(this._pos),a=i.terrain.getElevationForLngLat(this._lngLat,i._camera.transform),o=i._camera.transform.lngLatToCameraDepth(this._lngLat,a),s=.006;if(o-n<s){this._element.style.opacity=this._opacity,this._element.classList.remove("maplibregl-marker-covered");return}let l=-this._offset.y/i._camera.transform.pixelsPerMeter,u=Math.sin(i.getPitch()*Math.PI/180)*l,c=i.terrain.depthAtPoint(new tr(this._pos.x,this._pos.y-this._offset.y)),f=i._camera.transform.lngLatToCameraDepth(this._lngLat,a+u)-c>s;(d=this._popup)!=null&&d.isOpen()&&f&&this._popup.remove(),this._element.style.opacity=f?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",f)}getOffset(){return this._offset}setOffset(e){return this._offset=tr.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._element.classList.toggle("maplibregl-marker-draggable",this._draggable),this._map&&(e?(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._defaultMarker&&(this._draggable?(this._element.addEventListener("keydown",this._onKeyDown),this._element.addEventListener("keyup",this._onKeyUp),this._element.addEventListener("blur",this._onBlur)):(this._element.removeEventListener("keydown",this._onKeyDown),this._element.removeEventListener("keyup",this._onKeyUp),this._element.removeEventListener("blur",this._onBlur),this._endKeyboardDrag())),this._updateTabIndex(),this._updateAccessibilityRole(),this}isDraggable(){return this._draggable}_updateTabIndex(){this._popup||this._defaultMarker&&this._draggable?this._element.hasAttribute("tabindex")||(this._element.setAttribute("tabindex","0"),this._tabIndexManaged=!0):this._tabIndexManaged&&(this._tabIndexManaged=(this._element.getAttribute("tabindex")==="0"&&this._element.removeAttribute("tabindex"),!1))}_updateAccessibilityRole(){if(!this._defaultMarker||this._element.hasAttribute("role")&&!this._roleManaged)return;let e=this._draggable||this._popup?"button":"img";this._element.setAttribute("role",e),this._roleManaged=!0}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&e!=="auto"?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,t){return(this._opacity===void 0||e===void 0&&t===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),e!==void 0&&(this._opacity=String(e)),t!==void 0&&(this._opacityWhenCovered=String(t)),this._map&&this._updateOpacity(!0),this}},VTr={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},dq=0,x8=!1,s3=class extends e0{},gae=class extends e0{},Fst=class extends e0{},GTr=class extends mu{constructor(e){super(),this._onSuccess=t=>{if(this._map){if(this._isOutOfMapMaxBounds(t)){this._setErrorState(),this.fire(new gae("outofmaxbounds",t)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,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 Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(t),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new gae("geolocate",t)),this._finish()}},this._updateCamera=t=>{let r=new mn(t.coords.longitude,t.coords.latitude),i=t.coords.accuracy,n=this._map.getBearing(),a=ln({bearing:n},this.options.fitBoundsOptions),o=Ev.fromLngLat(r,i);this._map.fitBounds(o,a,{geolocateSource:!0})},this._updateMarker=t=>{if(t){let r=new mn(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=t.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=t=>{if(this._map){if(t.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 r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(t.code===3&&x8)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new Fst("error",t)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=t=>{if(!this._map)return;let r=(t==null?void 0:t[0])instanceof ResizeObserverEntry;!t.geolocateSource&&this._watchState==="ACTIVE_LOCK"&&!r&&!this._map.isZooming()&&(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new s3("trackuserlocationend")),this.fire(new s3("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",t=>{t.preventDefault()}),this._geolocateButton=$n.create("button","maplibregl-ctrl-geolocate",this._container),$n.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=t=>{if(this._map){if(t===!1){Ma("Geolocation support is not available so the GeolocateControl will be disabled.");let r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r)}else{let r=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=$n.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new vae({element:this._dotElement}),this._circleElement=$n.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new vae({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=ln({},VTr,e)}onAdd(e){return this._map=e,this._container=$n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),OTr().then(t=>this._finishSetupUI(t)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,dq=0,x8=!1}_isOutOfMapMaxBounds(e){let t=this._map.getMaxBounds(),r=e.coords;return t&&(r.longitude<t.getWest()||r.longitude>t.getEast()||r.latitude<t.getSouth()||r.latitude>t.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":break;case"OFF":case void 0:break;default:throw Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let e=this._userLocationDotMarker.getLngLat();if(!this.options.showUserLocation||!this.options.showAccuracyCircle||!this._accuracy||!e)return;let t=this._map.project(e),r=this._map.unproject([t.x+100,t.y]),i=e.distanceTo(r)/100,n=2*this._accuracy/i;this._circleElement.style.width=`${n.toFixed(2)}px`,this._circleElement.style.height=`${n.toFixed(2)}px`}trigger(){if(!this._setup)return Ma("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 s3("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":dq--,x8=!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 s3("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 s3("trackuserlocationstart")),this.fire(new s3("userlocationfocus"));break;default:throw 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 Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),dq++;let e;dq>1?(e={maximumAge:6e5,timeout:0},x8=!0):(e=this.options.positionOptions,x8=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}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)}},HTr={maxWidth:100,unit:"metric"},jTr=class{constructor(e){this._onMove=()=>{$at(this._map,this._container,this.options)},this.setUnit=t=>{this.options.unit=t,$at(this._map,this._container,this.options)},this.options=fn(fn({},HTr),e)}getDefaultPosition(){return"bottom-left"}onAdd(e){return this._map=e,this._container=$n.create("div","maplibregl-ctrl maplibregl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}};mae=class extends e0{},YTr=class extends mu{constructor(e={}){var t;super(),this._onFullscreenChange=()=>{var i;let r=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;(i=r==null?void 0:r.shadowRoot)!=null&&i.fullscreenElement;)r=r.shadowRoot.fullscreenElement;r===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(t=e.pseudo)!=null?t:!1,e!=null&&e.container&&(e.container instanceof HTMLElement?this._container=e.container:Ma("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(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=$n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let e=this._fullscreenButton=$n.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);$n.create("span","maplibregl-ctrl-icon",e).setAttribute("aria-hidden","true"),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e}_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 mae("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new mae("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},XTr=class{constructor(e){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=e}onAdd(e){return this._map=e,this._container=$n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=$n.create("button","maplibregl-ctrl-terrain",this._container),$n.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},ZTr=class{constructor(){this._toggleProjection=()=>{var t;let e=(t=this._map.getProjection())==null?void 0:t.type;e==="mercator"||!e?this._map.setProjection({type:"globe"}):this._map.setProjection({type:"mercator"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var e;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((e=this._map.getProjection())==null?void 0:e.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(e){return this._map=e,this._container=$n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=$n.create("button","maplibregl-ctrl-globe",this._container),$n.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},KTr={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},JTr=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),yae=class extends e0{},QTr=class extends mu{constructor(e){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._map._camera.transform.isLocationOccluded(this.getLngLat())?this._container.style.opacity=`${this.options.locationOccludedOpacity}`:this._container.style.opacity="")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new yae("close"))),this),this._update=t=>{let r=this._lngLat||this._trackPointer;if(!this._map||!r||!this._content)return;if(!this._container){if(this._container=$n.create("div","maplibregl-popup",this._map.getContainer()),this._tip=$n.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let l of this.options.className.split(" "))this._container.classList.add(l);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Est(this._lngLat,this._flatPos,this._map._camera.transform,this._trackPointer);let i;if(t&&"point"in t&&t.point&&(i=t.point),this._trackPointer&&!i)return;let n=this._flatPos=this._pos=this._trackPointer&&i?i:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&i?i:this._map._camera.transform.locationToScreenPoint(this._lngLat));let a=this.options.anchor,o=Lst(this.options.offset);if(!a){let l=this._container.offsetWidth,u=this._container.offsetHeight,c=e6r(this.options.padding),f;f=n.y+o.bottom.y<u+c.top?["top"]:n.y>this._map._camera.transform.height-u-c.bottom?["bottom"]:[],n.x<l/2+c.left?f.push("left"):n.x>this._map._camera.transform.width-l/2-c.right&&f.push("right"),a=f.length===0?"bottom":f.join("-")}let s=n.add(o[a]);this.options.subpixelPositioning||(s=s.round()),this._container.style.transform=`${Oae[a]} translate(${s.x}px,${s.y}px)`,kst(this._container,a,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=ln(Object.create(KTr),e)}addTo(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new yae("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=mn.convert(e),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._update),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._update),this._map.on("drag",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(e){return this.setDOMContent(document.createTextNode(e))}setHTML(e){let t=document.createDocumentFragment(),r=document.createElement("body"),i;for(r.innerHTML=e;i=r.firstChild,i;)t.appendChild(i);return this.setDOMContent(t)}getMaxWidth(){var e;return(e=this._container)==null?void 0:e.style.maxWidth}setMaxWidth(e){return this.options.maxWidth=e,this._update(),this}setDOMContent(e){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=$n.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(e),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(e){return this._container&&this._container.classList.add(e),this}removeClassName(e){return this._container&&this._container.classList.remove(e),this}setOffset(e){return this.options.offset=e,this._update(),this}toggleClassName(e){if(this._container)return this._container.classList.toggle(e)}setSubpixelPositioning(e){this.options.subpixelPositioning=e}setPadding(e){this.options.padding=e,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=$n.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 e=this._container.querySelector(JTr);e&&e.focus()}};t6r=Wat});var Bst=W((sri,zst)=>{"use strict";zst.exports='var t1=Object.defineProperty,e1=Object.defineProperties;var r1=Object.getOwnPropertyDescriptors;var nh=Object.getOwnPropertySymbols;var i1=Object.prototype.hasOwnProperty,n1=Object.prototype.propertyIsEnumerable;var ah=(t,e,r)=>e in t?t1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,je=(t,e)=>{for(var r in e||(e={}))i1.call(e,r)&&ah(t,r,e[r]);if(nh)for(var r of nh(e))n1.call(e,r)&&ah(t,r,e[r]);return t},Si=(t,e)=>e1(t,r1(e));var rt=(t,e,r)=>new Promise((i,n)=>{var a=l=>{try{o(r.next(l))}catch(u){n(u)}},s=l=>{try{o(r.throw(l))}catch(u){n(u)}},o=l=>l.done?i(l.value):Promise.resolve(l.value).then(a,s);o((r=r.apply(t,e)).next())});var a1=Object.create,ep=Object.defineProperty,s1=Object.getOwnPropertyDescriptor,o1=Object.getOwnPropertyNames,l1=Object.getPrototypeOf,rp=Object.prototype.hasOwnProperty,fl=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),u1=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(var n=o1(e),a=0,s=n.length,o;a<s;a++)o=n[a],!rp.call(t,o)&&o!==r&&ep(t,o,{get:(l=>e[l]).bind(null,o),enumerable:!(i=s1(e,o))||i.enumerable});return t},h1=(t,e,r)=>(r=t==null?{}:a1(l1(t)),u1(e||!t||!t.__esModule||!rp.call(t,"default")?ep(r,"default",{value:t,enumerable:!0}):r,t));function B(t,e){this.x=t,this.y=e}B.prototype={clone(){return new B(this.x,this.y)},add(t){return this.clone()._add(t)},sub(t){return this.clone()._sub(t)},multByPoint(t){return this.clone()._multByPoint(t)},divByPoint(t){return this.clone()._divByPoint(t)},mult(t){return this.clone()._mult(t)},div(t){return this.clone()._div(t)},rotate(t){return this.clone()._rotate(t)},rotateAround(t,e){return this.clone()._rotateAround(t,e)},matMult(t){return this.clone()._matMult(t)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(t){return this.x===t.x&&this.y===t.y},dist(t){return Math.sqrt(this.distSqr(t))},distSqr(t){let e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle(){return Math.atan2(this.y,this.x)},angleTo(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith(t){return this.angleWithSep(t.x,t.y)},angleWithSep(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult(t){let e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add(t){return this.x+=t.x,this.y+=t.y,this},_sub(t){return this.x-=t.x,this.y-=t.y,this},_mult(t){return this.x*=t,this.y*=t,this},_div(t){return this.x/=t,this.y/=t,this},_multByPoint(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint(t){return this.x/=t.x,this.y/=t.y,this},_unit(){return this._div(this.mag()),this},_perp(){let t=this.y;return this.y=this.x,this.x=-t,this},_rotate(t){let e=Math.cos(t),r=Math.sin(t),i=e*this.x-r*this.y,n=r*this.x+e*this.y;return this.x=i,this.y=n,this},_rotateAround(t,e){let r=Math.cos(t),i=Math.sin(t),n=e.x+r*(this.x-e.x)-i*(this.y-e.y),a=e.y+i*(this.x-e.x)+r*(this.y-e.y);return this.x=n,this.y=a,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:B},B.convert=function(t){if(t instanceof B)return t;if(Array.isArray(t))return new B(+t[0],+t[1]);if(t.x!==void 0&&t.y!==void 0)return new B(+t.x,+t.y);throw Error("Expected [x, y] or {x, y} point format")};function c1(t,e,r,i){let n=3*t,a=3*(r-t)-n,s=1-n-a,o=3*e,l=3*(i-e)-o,u=1-o-l;return function(h,c=1e-6){if(h<=0)return 0;if(h>=1)return 1;let p=h;for(let y=0;y<8;y++){let m=((s*p+a)*p+n)*p-h;if(Math.abs(m)<c)return((u*p+l)*p+o)*p;let g=(3*s*p+2*a)*p+n;if(Math.abs(g)<1e-6)break;p-=m/g}let f=0,d=1;p=h;for(let y=0;y<20;y++){let m=((s*p+a)*p+n)*p;if(Math.abs(m-h)<c)break;h>m?f=p:d=p,p=(f+d)*.5}return((u*p+l)*p+o)*p}}var Nn;function p1(){return Nn!=null||(Nn=typeof OffscreenCanvas<"u"&&!!new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),Nn}var Un;function f1(){if(Un==null&&(Un=!1,p1())){let t=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(t){for(let r=0;r<25;r++){let i=r*4;t.fillStyle=`rgb(${i},${i+1},${i+2})`,t.fillRect(r%5,Math.floor(r/5),1,1)}let e=t.getImageData(0,0,5,5).data;for(let r=0;r<100;r++)if(r%4!=3&&e[r]!==r){Un=!0;break}}}return Un||!1}var pe=typeof Float32Array<"u"?Float32Array:Array;Math.PI/180,180/Math.PI;function d1(){var t=new pe(9);return pe!=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}function ip(){var t=new pe(3);return pe!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function y1(t){var e=t[0],r=t[1],i=t[2];return Math.sqrt(e*e+r*r+i*i)}function sh(t,e,r){var i=new pe(3);return i[0]=t,i[1]=e,i[2]=r,i}function m1(t,e){var r=e[0],i=e[1],n=e[2],a=r*r+i*i+n*n;return a>0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t}function g1(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ks(t,e,r){var i=e[0],n=e[1],a=e[2],s=r[0],o=r[1],l=r[2];return t[0]=n*l-a*o,t[1]=a*s-i*l,t[2]=i*o-n*s,t}var x1=y1;(function(){var t=ip();return function(e,r,i,n,a,s){var o,l;for(r||(r=3),i||(i=0),l=n?Math.min(n*r+i,e.length):e.length,o=i;o<l;o+=r)t[0]=e[o],t[1]=e[o+1],t[2]=e[o+2],a(t,t,s),e[o]=t[0],e[o+1]=t[1],e[o+2]=t[2];return e}})();function v1(){var t=new pe(4);return pe!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function b1(t,e){var r=e[0],i=e[1],n=e[2],a=e[3],s=r*r+i*i+n*n+a*a;return s>0&&(s=1/Math.sqrt(s)),t[0]=r*s,t[1]=i*s,t[2]=n*s,t[3]=a*s,t}function w1(t,e,r){var i=e[0],n=e[1],a=e[2],s=e[3];return t[0]=r[0]*i+r[4]*n+r[8]*a+r[12]*s,t[1]=r[1]*i+r[5]*n+r[9]*a+r[13]*s,t[2]=r[2]*i+r[6]*n+r[10]*a+r[14]*s,t[3]=r[3]*i+r[7]*n+r[11]*a+r[15]*s,t}(function(){var t=v1();return function(e,r,i,n,a,s){var o,l;for(r||(r=4),i||(i=0),l=n?Math.min(n*r+i,e.length):e.length,o=i;o<l;o+=r)t[0]=e[o],t[1]=e[o+1],t[2]=e[o+2],t[3]=e[o+3],a(t,t,s),e[o]=t[0],e[o+1]=t[1],e[o+2]=t[2],e[o+3]=t[3];return e}})();function oh(){var t=new pe(4);return pe!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function D1(t,e,r){r*=.5;var i=Math.sin(r);return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=Math.cos(r),t}function Ts(t,e,r,i){var n=e[0],a=e[1],s=e[2],o=e[3],l=r[0],u=r[1],h=r[2],c=r[3],p,f=n*l+a*u+s*h+o*c,d,y,m;return f<0&&(f=-f,l=-l,u=-u,h=-h,c=-c),1-f>1e-6?(p=Math.acos(f),d=Math.sin(p),y=Math.sin((1-i)*p)/d,m=Math.sin(i*p)/d):(y=1-i,m=i),t[0]=y*n+m*l,t[1]=y*a+m*u,t[2]=y*s+m*h,t[3]=y*o+m*c,t}function _1(t,e){var r=e[0]+e[4]+e[8],i;if(r>0)i=Math.sqrt(r+1),t[3]=.5*i,i=.5/i,t[0]=(e[5]-e[7])*i,t[1]=(e[6]-e[2])*i,t[2]=(e[1]-e[3])*i;else{var n=0;e[4]>e[0]&&(n=1),e[8]>e[n*3+n]&&(n=2);var a=(n+1)%3,s=(n+2)%3;i=Math.sqrt(e[n*3+n]-e[a*3+a]-e[s*3+s]+1),t[n]=.5*i,i=.5/i,t[3]=(e[a*3+s]-e[s*3+a])*i,t[a]=(e[a*3+n]+e[n*3+a])*i,t[s]=(e[s*3+n]+e[n*3+s])*i}return t}var lh=b1;(function(){var t=ip(),e=sh(1,0,0),r=sh(0,1,0);return function(i,n,a){var s=g1(n,a);return s<-.999999?(ks(t,e,n),x1(t)<1e-6&&ks(t,r,n),m1(t,t),D1(i,t,Math.PI),i):s>.999999?(i[0]=0,i[1]=0,i[2]=0,i[3]=1,i):(ks(t,n,a),i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=1+s,lh(i,i))}})(),(function(){var t=oh(),e=oh();return function(r,i,n,a,s,o){return Ts(t,i,s,o),Ts(e,n,a,o),Ts(r,t,e,2*o*(1-o)),r}})(),(function(){var t=d1();return function(e,r,i,n){return t[0]=i[0],t[3]=i[1],t[6]=i[2],t[1]=n[0],t[4]=n[1],t[7]=n[2],t[2]=-r[0],t[5]=-r[1],t[8]=-r[2],lh(e,_1(e,t))}})();function A1(){var t=new pe(2);return pe!=Float32Array&&(t[0]=0,t[1]=0),t}(function(){var t=A1();return function(e,r,i,n,a,s){var o,l;for(r||(r=2),i||(i=0),l=n?Math.min(n*r+i,e.length):e.length,o=i;o<l;o+=r)t[0]=e[o],t[1]=e[o+1],a(t,t,s),e[o]=t[0],e[o+1]=t[1];return e}})();var mt=8192;var np="__$json__:";function Ki(t){return t instanceof Error?t:Error(typeof t=="string"?t:String(t))}function S1(t){if(t<=0)return 0;if(t>=1)return 1;let e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function E1(t,e,r,i){return c1(t,e,r,i)}var d5=E1(.25,.1,.25,1);function Ji(t,e,r){return Math.min(r,Math.max(e,t))}function F1(t,e,r){let i=r-e,n=((t-e)%i+i)%i+e;return n===e?r:n}function Gt(t,...e){for(let r of e)for(let i in r)t[i]=r[i];return t}function k1(t){return Math.log(t)/Math.LN2%1==0}function Ia(t,e,r){let i={};for(let n in t)i[n]=e.call(r||this,t[n],n,t);return i}function T1(t,e,r){let i={};for(let n in t)e.call(r||this,t[n],n,t)&&(i[n]=t[n]);return i}function He(t){return Array.isArray(t)?t.map(He):typeof t=="object"&&t?Ia(t,He):t}var uh={};function Bt(t){uh[t]||(typeof console<"u"&&console.warn(t),uh[t]=!0)}function Ke(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function mr(t){return typeof WorkerGlobalScope<"u"&&t!==void 0&&t instanceof WorkerGlobalScope}function Ca(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap}function I1(t,e,r,i,n){let a=Math.max(-e,0)*4,s=(Math.max(0,r)-r)*i*4+a,o=i*4,l=Math.max(0,e),u=Math.max(0,r),h=Math.min(t.width,e+i),c=Math.min(t.height,r+n);return{rect:{x:l,y:u,width:h-l,height:c-u},layout:[{offset:s,stride:o}]}}function C1(t,e,r,i,n){return rt(this,null,function*(){if(typeof VideoFrame>"u")throw Error("VideoFrame not supported");let a=new VideoFrame(t,{timestamp:0});try{let s=a==null?void 0:a.format;if(!s||!(s.startsWith("BGR")||s.startsWith("RGB")))throw Error(`Unrecognized format ${s}`);let o=s.startsWith("BGR"),l=new Uint8ClampedArray(i*n*4);if(yield a.copyTo(l,I1(t,e,r,i,n)),o)for(let u=0;u<l.length;u+=4){let h=l[u];l[u]=l[u+2],l[u+2]=h}return l}finally{a.close()}})}var Ei,Fi;function M1(t,e,r,i,n){let a=t.width,s=t.height;(!Ei||!Fi)&&(Ei=new OffscreenCanvas(a,s),Fi=Ei.getContext("2d",{willReadFrequently:!0})),Ei.width=a,Ei.height=s,Fi.drawImage(t,0,0,a,s);let o=Fi.getImageData(e,r,i,n);return Fi.clearRect(0,0,a,s),o.data}function ap(t,e,r,i,n){return rt(this,null,function*(){if(f1())try{return yield C1(t,e,r,i,n)}catch(a){}return M1(t,e,r,i,n)})}function hh(t,e,r,i){return t.addEventListener(e,r,i),{unsubscribe:()=>{t.removeEventListener(e,r,i)}}}function ch(t){return t*Math.PI/180}var ph="AbortError",dl=class extends Error{constructor(t=ph){super(t instanceof Error?t.message:t),this.name=ph,t instanceof Error&&t.stack&&(this.stack=t.stack)}};function yl(t){return t instanceof Error&&t.name==="AbortError"}function B1(t){if(t.aborted)throw new dl(t.reason)}var ml={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function P1(t){return ml.REGISTERED_PROTOCOLS[t.substring(0,t.indexOf("://"))]}function sp(t,e){ml.REGISTERED_PROTOCOLS[t]=e}function op(t){delete ml.REGISTERED_PROTOCOLS[t]}var fh="global-dispatcher",ya=class extends Error{constructor(t,e,r,i){super(`AJAXError: ${e} (${t}): ${r}`),this.status=t,this.statusText=e,this.url=r,this.body=i}};function lp(){var t;if(mr(self))return(t=self.worker)==null?void 0:t.referrer;if(window.location.protocol==="blob:")try{return window.parent.location.href}catch(e){}return window.location.href}var z1=t=>{var e;return t.startsWith("file:")||((e=lp())==null?void 0:e.startsWith("file:"))&&!/^\\w+:/.test(t)};function L1(t,e){return rt(this,null,function*(){let r=new Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,cache:t.cache,referrer:lp(),referrerPolicy:t.referrerPolicy,signal:e.signal});t.type==="json"&&!r.headers.has("Accept")&&r.headers.set("Accept","application/json");let i;try{i=yield fetch(r)}catch(s){throw yl(s)?s:new ya(0,Ki(s).message,t.url,new Blob)}if(!i.ok){let s=yield i.blob();throw new ya(i.status,i.statusText,t.url,s)}let n;n=t.type==="arrayBuffer"||t.type==="image"?i.arrayBuffer():t.type==="json"?i.json():i.text();let a=yield n;return B1(e.signal),{data:a,cacheControl:i.headers.get("Cache-Control"),expires:i.headers.get("Expires"),etag:i.headers.get("ETag")}})}function V1(t,e){return new Promise((r,i)=>{var a;let n=new XMLHttpRequest;n.open(t.method||"GET",t.url,!0),(t.type==="arrayBuffer"||t.type==="image")&&(n.responseType="arraybuffer");for(let s in t.headers)n.setRequestHeader(s,t.headers[s]);t.type==="json"&&(n.responseType="text",(a=t.headers)!=null&&a.Accept||n.setRequestHeader("Accept","application/json")),n.withCredentials=t.credentials==="include",n.onerror=()=>{i(Error(n.statusText))},n.onload=()=>{if(!e.signal.aborted)if((n.status>=200&&n.status<300||n.status===0)&&n.response!==null){let s=n.response;if(t.type==="json")try{s=JSON.parse(n.response)}catch(o){i(o);return}r({data:s,cacheControl:n.getResponseHeader("Cache-Control"),expires:n.getResponseHeader("Expires"),etag:n.getResponseHeader("ETag")})}else{let s=new Blob([n.response],{type:n.getResponseHeader("Content-Type")});i(new ya(n.status,n.statusText,t.url,s))}},e.signal.addEventListener("abort",()=>{n.abort(),i(new dl(e.signal.reason))}),n.send(t.body)})}var Ma=function(t,e){return rt(this,null,function*(){var r,i;if(t.url.includes("://")&&!/^https?:|^file:/.test(t.url)){let n=P1(t.url);if(n){let a=yield n(t,e);return!a.data&&t.type==="arrayBuffer"?Gt(a,{data:new ArrayBuffer(0)}):a}if(mr(self)&&((r=self.worker)!=null&&r.actor))return self.worker.actor.sendAsync({type:"GR",data:t,targetMapId:fh},e)}if(!z1(t.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return L1(t,e);if(mr(self)&&((i=self.worker)!=null&&i.actor))return self.worker.actor.sendAsync({type:"GR",data:t,mustQueue:!0,targetMapId:fh},e)}return V1(t,e)})},up=(t,e)=>Ma(Gt(t,{type:"json"}),e),hp=(t,e)=>Ma(Gt(t,{type:"arrayBuffer"}),e);function dh(t,e,r){var i;(i=r[t])!=null&&i.includes(e)||(r[t]||(r[t]=[]),r[t].push(e))}function Is(t,e,r){if(r!=null&&r[t]){let i=r[t].indexOf(e);i!==-1&&r[t].splice(i,1)}}var cp=class{constructor(t,e={}){Gt(this,e),this.type=t}},ma=class extends cp{constructor(t,e={}){super("error",Gt({error:t},e))}},O1=class{on(t,e){return this._listeners||(this._listeners={}),dh(t,e,this._listeners),{unsubscribe:()=>{this.off(t,e)}}}off(t,e){return Is(t,e,this._listeners),Is(t,e,this._oneTimeListeners),this}once(t,e){return e?(this._oneTimeListeners||(this._oneTimeListeners={}),dh(t,e,this._oneTimeListeners),this):new Promise(r=>this.once(t,r))}fire(t,e){var n,a,s,o,l,u;let r=typeof t=="string"?new cp(t,e||{}):t,i=r.type;if(this.listens(i)){r.target=this;let h=(s=(a=(n=this._listeners)==null?void 0:n[i])==null?void 0:a.slice())!=null?s:[];for(let f of h)f.call(this,r);let c=(u=(l=(o=this._oneTimeListeners)==null?void 0:o[i])==null?void 0:l.slice())!=null?u:[];for(let f of c)Is(i,f,this._oneTimeListeners),f.call(this,r);let p=this._eventedParent;p&&(Gt(r,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),p.fire(r))}else r instanceof ma&&console.error(r.error);return this}listens(t){var e,r,i,n,a;return!!((r=(e=this._listeners)==null?void 0:e[t])!=null&&r.length||(n=(i=this._oneTimeListeners)==null?void 0:i[t])!=null&&n.length||(a=this._eventedParent)!=null&&a.listens(t))}setEventedParent(t,e){return this._eventedParent=t,this._eventedParentData=e,this}},pp={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"},"fill-extrusion-rounded-corner-distance":{type:"number",default:0,minimum:0,units:"meters","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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"},"symbol-height-offset":{type:"number",default:0,units:"meters",requires:[{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-height-anchor":{type:"enum",values:{ground:{},absolute:{}},default:"ground",requires:["symbol-height-offset"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"fill-color":{type:"color",default:"#000000",transition:!0,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,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default: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-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}},w=pp,fp=["type","source","source-layer","minzoom","maxzoom","filter","layout"],E=class{constructor(t,e,r,i,n="error"){this.message=(t?`${t}: `:"")+r,i&&(this.identifier=i),this.severity=n,e!=null&&e.__line__&&(this.line=e.__line__)}},dn={kind:"null"},I={kind:"number"},Y={kind:"string"},tt={kind:"boolean"},ce={kind:"color"},Ba={kind:"projectionDefinition"},fr={kind:"object"},Z={kind:"value"},R1={kind:"error"},Pa={kind:"collator"},yn={kind:"formatted"},za={kind:"padding"},Qi={kind:"colorArray"},La={kind:"numberArray"},mn={kind:"resolvedImage"},Va={kind:"variableAnchorOffsetCollection"};function Ut(t,e){return{kind:"array",itemType:t,N:e}}function yt(t){if(t.kind==="array"){let e=yt(t.itemType);return typeof t.N=="number"?`array<${e}, ${t.N}>`:t.itemType.kind==="value"?"array":`array<${e}>`}return t.kind}var $1=[dn,I,Y,tt,ce,Ba,yn,fr,Ut(Z),za,La,Qi,mn,Va];function tn(t,e){if(e.kind==="error")return null;if(t.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!tn(t.itemType,e.itemType))&&(typeof t.N!="number"||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if(t.kind==="value"){for(let r of $1)if(!tn(r,e))return null}}return`Expected ${yt(t)} but found ${yt(e)} instead.`}function gl(t,e){return e.some(r=>r.kind===t.kind)}function dr(t,e){return e.some(r=>r==="null"?t===null:r==="array"?Array.isArray(t):r==="object"?t&&!Array.isArray(t)&&typeof t=="object":r===typeof t)}function Ge(t,e){return t.kind==="array"&&e.kind==="array"?t.itemType.kind===e.itemType.kind&&typeof t.N=="number":t.kind===e.kind}var dp=.96422,yp=.82521,mp=4/29,Ks=6/29,gp=3*Ks*Ks,N1=Math.PI/180,U1=180/Math.PI;function xp(t){return t%=360,t<0&&(t+=360),t}function vp([t,e,r,i]){t=Cs(t),e=Cs(e),r=Cs(r);let n,a,s=Ms((.2225045*t+.7168786*e+.0606169*r)/1);t===e&&e===r?n=a=s:(n=Ms((.4360747*t+.3850649*e+.1430804*r)/dp),a=Ms((.0139322*t+.0971045*e+.7141733*r)/yp));let o=116*s-16;return[o<0?0:o,500*(n-s),200*(s-a),i]}function Cs(t){return t<=.04045?t/12.92:((t+.055)/1.055)**2.4}function Ms(t){return t>.008856451679035631?t**(1/3):t/gp+mp}function bp([t,e,r,i]){let n=(t+16)/116,a=isNaN(e)?n:n+e/500,s=isNaN(r)?n:n-r/200;return n=1*Ps(n),a=dp*Ps(a),s=yp*Ps(s),[Bs(3.1338561*a-1.6168667*n-.4906146*s),Bs(-.9787684*a+1.9161415*n+.033454*s),Bs(.0719453*a-.2289914*n+1.4052427*s),i]}function Bs(t){return t=t<=.00304?12.92*t:1.055*t**(1/2.4)-.055,t<0?0:t>1?1:t}function Ps(t){return t>Ks?t*t*t:gp*(t-mp)}function q1(t){let[e,r,i,n]=vp(t),a=Math.sqrt(r*r+i*i);return[Math.round(a*1e4)?xp(Math.atan2(i,r)*U1):NaN,a,e,n]}function j1([t,e,r,i]){return t=isNaN(t)?0:t*N1,bp([r,Math.cos(t)*e,Math.sin(t)*e,i])}function G1([t,e,r,i]){t=xp(t),e/=100,r/=100;function n(a){let s=(a+t/30)%12,o=e*Math.min(r,1-r);return r-o*Math.max(-1,Math.min(s-3,9-s,1))}return[n(0),n(8),n(4),i]}var X1=Object.hasOwn||function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};function ji(t,e){return X1(t,e)?t[e]:void 0}function Y1(t){if(t=t.toLowerCase().trim(),t==="transparent")return[0,0,0,0];let e=ji(W1,t);if(e){let[i,n,a]=e;return[i/255,n/255,a/255,1]}if(t.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(t)){let i=t.length<6?1:2,n=1;return[qn(t.slice(n,n+=i)),qn(t.slice(n,n+=i)),qn(t.slice(n,n+=i)),qn(t.slice(n,n+i)||"ff")]}if(t.startsWith("rgb")){let i=t.match(/^rgba?\\(\\s*([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)(%)?(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/);if(i){let[n,a,s,o,l,u,h,c,p,f,d,y]=i,m=[o||" ",h||" ",f].join("");if(m===" "||m===" /"||m===",,"||m===",,,"){let g=[s,u,p].join(""),x=g==="%%%"?100:g===""?255:0;if(x){let v=[Rr(+a/x,0,1),Rr(+l/x,0,1),Rr(+c/x,0,1),d?yh(+d,y):1];if(mh(v))return v}}return}}let r=t.match(/^hsla?\\(\\s*([\\de.+-]+)(?:deg)?(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s+|\\s*(,)\\s*)([\\de.+-]+)%(?:\\s*([,\\/])\\s*([\\de.+-]+)(%)?)?\\s*\\)$/);if(r){let[i,n,a,s,o,l,u,h,c]=r,p=[a||" ",o||" ",u].join("");if(p===" "||p===" /"||p===",,"||p===",,,"){let f=[+n,Rr(+s,0,100),Rr(+l,0,100),h?yh(+h,c):1];if(mh(f))return G1(f)}}}function qn(t){return parseInt(t.padEnd(2,t),16)/255}function yh(t,e){return Rr(e?t/100:t,0,1)}function Rr(t,e,r){return Math.min(Math.max(e,t),r)}function mh(t){return!t.some(Number.isNaN)}var W1={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function Je(t,e,r){return t+r*(e-t)}function ti(t,e,r){return t.map((i,n)=>Je(i,e[n],r))}function Z1(t){return t==="rgb"||t==="hcl"||t==="lab"}var Pt,gt=(Pt=class{constructor(e,r,i,n=1,a=!0){this.r=e,this.g=r,this.b=i,this.a=n,a||(this.r*=n,this.g*=n,this.b*=n,n||this.overwriteGetter("rgb",[e,r,i,n]))}static parse(e){if(e instanceof Pt)return e;if(typeof e!="string")return;let r=Y1(e);if(r)return new Pt(...r,!1)}get rgb(){let{r:e,g:r,b:i,a:n}=this,a=n||1/0;return this.overwriteGetter("rgb",[e/a,r/a,i/a,n])}get hcl(){return this.overwriteGetter("hcl",q1(this.rgb))}get lab(){return this.overwriteGetter("lab",vp(this.rgb))}overwriteGetter(e,r){return Object.defineProperty(this,e,{value:r}),r}toString(){let[e,r,i,n]=this.rgb;return`rgba(${[e,r,i].map(a=>Math.round(a*255)).join(",")},${n})`}static interpolate(e,r,i,n="rgb"){switch(n){case"rgb":{let[a,s,o,l]=ti(e.rgb,r.rgb,i);return new Pt(a,s,o,l,!1)}case"hcl":{let[a,s,o,l]=e.hcl,[u,h,c,p]=r.hcl,f,d;if(!isNaN(a)&&!isNaN(u)){let v=u-a;u>a&&v>180?v-=360:u<a&&a-u>180&&(v+=360),f=a+i*v}else isNaN(a)?isNaN(u)?f=NaN:(f=u,(o===1||o===0)&&(d=h)):(f=a,(c===1||c===0)&&(d=s));let[y,m,g,x]=j1([f,d!=null?d:Je(s,h,i),Je(o,c,i),Je(l,p,i)]);return new Pt(y,m,g,x,!1)}case"lab":{let[a,s,o,l]=bp(ti(e.lab,r.lab,i));return new Pt(a,s,o,l,!1)}}}},Pt.black=new Pt(0,0,0,1),Pt.white=new Pt(1,1,1,1),Pt.transparent=new Pt(0,0,0,0),Pt.red=new Pt(1,0,0,1),Pt),H1=["bottom","center","top"],Js=class{constructor(t,e,r,i,n,a){this.text=t,this.image=e,this.scale=r,this.fontStack=i,this.textColor=n,this.verticalAlign=a}},ze=class la{constructor(e){this.sections=e}static fromString(e){return new la([new Js(e,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof la?e:la.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}},Ae=class Li{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Li)return e;if(typeof e=="number")return new Li([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(let r of e)if(typeof r!="number")return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new Li(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,r,i){return new Li(ti(e.values,r.values,i))}},Se=class Vi{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Vi)return e;if(typeof e=="number")return new Vi([e]);if(Array.isArray(e)){for(let r of e)if(typeof r!="number")return;return new Vi(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,r,i){return new Vi(ti(e.values,r.values,i))}},oe=class Oi{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Oi)return e;if(typeof e=="string"){let i=gt.parse(e);return i?new Oi([i]):void 0}if(!Array.isArray(e))return;let r=[];for(let i of e){if(typeof i!="string")return;let n=gt.parse(i);if(!n)return;r.push(n)}return new Oi(r)}toString(){return JSON.stringify(this.values)}static interpolate(e,r,i,n="rgb"){let a=[];if(e.values.length!=r.values.length)throw Error(`colorArray: Arrays have mismatched length (${e.values.length} vs. ${r.values.length}), cannot interpolate.`);for(let s=0;s<e.values.length;s++)a.push(gt.interpolate(e.values[s],r.values[s],i,n));return new Oi(a)}},ft=class extends Error{constructor(t,e){super(t),this.name="RuntimeError",this.path=e}toJSON(){return this.message}},K1=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]),De=class ua{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof ua)return e;if(!(!Array.isArray(e)||e.length<1||e.length%2!=0)){for(let r=0;r<e.length;r+=2){let i=e[r],n=e[r+1];if(typeof i!="string"||!K1.has(i)||!Array.isArray(n)||n.length!==2||typeof n[0]!="number"||typeof n[1]!="number")return}return new ua(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,r,i,n){let a=e.values,s=r.values;if(a.length!==s.length)throw new ft(`Cannot interpolate values of different length. from: ${e.toString()}, to: ${r.toString()}`,n);let o=[];for(let l=0;l<a.length;l+=2){if(a[l]!==s[l])throw new ft(`Cannot interpolate values containing mismatched anchors. from[${l}]: ${a[l]}, to[${l}]: ${s[l]}`,n);o.push(a[l]);let[u,h]=a[l+1],[c,p]=s[l+1];o.push([Je(u,c,i),Je(h,p,i)])}return new ua(o)}},_e=class wp{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new wp({name:e,available:!1}):null}},Dr=class $r{constructor(e,r,i){this.from=e,this.to=r,this.transition=i}toString(){return this.from===this.to&&this.transition===1?this.from:JSON.stringify([this.from,this.to,this.transition])}static interpolate(e,r,i){return new $r(e,r,i)}static parse(e){if(e instanceof $r)return e;if(Array.isArray(e)&&e.length===3&&typeof e[0]=="string"&&typeof e[1]=="string"&&typeof e[2]=="number")return new $r(e[0],e[1],e[2]);if(typeof e=="object"&&typeof e.from=="string"&&typeof e.to=="string"&&typeof e.transition=="number")return new $r(e.from,e.to,e.transition);if(typeof e=="string")return new $r(e,e,1)}},xl=class{constructor(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,e){return this.collator.compare(t,e)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}};function Dp(t,e,r,i){return typeof t=="number"&&t>=0&&t<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof r=="number"&&r>=0&&r<=255?i===void 0||typeof i=="number"&&i>=0&&i<=1?null:`Invalid rgba value [${[t,e,r,i].join(", ")}]: \'a\' must be between 0 and 1.`:`Invalid rgba value [${(typeof i=="number"?[t,e,r,i]:[t,e,r]).join(", ")}]: \'r\', \'g\', and \'b\' must be between 0 and 255.`}function ei(t){if(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||t instanceof Dr||t instanceof gt||t instanceof xl||t instanceof ze||t instanceof Ae||t instanceof Se||t instanceof oe||t instanceof De||t instanceof _e)return!0;if(Array.isArray(t)){for(let e of t)if(!ei(e))return!1;return!0}if(typeof t=="object"){for(let e in t)if(!ei(t[e]))return!1;return!0}return!1}function _t(t){if(t===null)return dn;if(typeof t=="string")return Y;if(typeof t=="boolean")return tt;if(typeof t=="number")return I;if(t instanceof gt)return ce;if(t instanceof Dr)return Ba;if(t instanceof xl)return Pa;if(t instanceof ze)return yn;if(t instanceof Ae)return za;if(t instanceof Se)return La;if(t instanceof oe)return Qi;if(t instanceof De)return Va;if(t instanceof _e)return mn;if(Array.isArray(t)){let e=t.length,r;for(let i of t){let n=_t(i);if(!r)r=n;else{if(r===n)continue;r=Z;break}}return Ut(r||Z,e)}return fr}function Gi(t){let e=typeof t;return t===null?"":e==="string"||e==="number"||e==="boolean"?String(t):t instanceof gt||t instanceof Dr||t instanceof ze||t instanceof Ae||t instanceof Se||t instanceof oe||t instanceof De||t instanceof _e?t.toString():JSON.stringify(t)}var ri=class _p{constructor(e,r){this.type=e,this.value=r}static parse(e,r){if(e.length!==2)return r.error(`\'literal\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!ei(e[1]))return r.error(`invalid value of type "${typeof e[1]}"`);let i=e[1],n=_t(i),a=r.expectedType;return n.kind==="array"&&n.N===0&&a&&a.kind==="array"&&(typeof a.N!="number"||a.N===0)&&(n=a),new _p(n,i)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}},J1=["Unknown","Point","LineString","Polygon"],Ap=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?J1[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(t){let e=this._parseColorCache.get(t);return e||(e=gt.parse(t),this._parseColorCache.set(t,e)),e}};function Oa(t,e,r){let i=t.length-1,n=0,a=i,s=0,o,l;for(;n<=a;)if(s=Math.floor((n+a)/2),o=t[s],l=t[s+1],o<=e){if(s===i||e<l)return s;n=s+1}else if(o>e)a=s-1;else throw new ft("Input is not a number.",r);return 0}var vl=class Sp{constructor(e,r,i,n){this.type=e,this.input=r,this.key=n,this.labels=[],this.outputs=[];for(let[a,s]of i)this.labels.push(a),this.outputs.push(s)}static parse(e,r){if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");let i=r.parse(e[1],1,I);if(!i)return null;let n=[],a=null;r.expectedType&&r.expectedType.kind!=="value"&&(a=r.expectedType);for(let s=1;s<e.length;s+=2){let o=s===1?-1/0:e[s],l=e[s+1],u=s,h=s+1;if(typeof o!="number")return r.error(\'Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.\',u);if(n.length&&n[n.length-1][0]>=o)return r.error(\'Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.\',u);let c=r.parse(l,h,a);if(!c)return null;a||(a=c.type),n.push([o,c])}return new Sp(a,i,n,r.key)}evaluate(e){let r=this.labels,i=this.outputs;if(r.length===1)return i[0].evaluate(e);let n=this.input.evaluate(e);if(n<=r[0])return i[0].evaluate(e);let a=r.length;return n>=r[a-1]?i[a-1].evaluate(e):i[Oa(r,n,this.key)].evaluate(e)}eachChild(e){e(this.input);for(let r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}};function Q1(t,e,r,i){let n=3*t,a=3*(r-t)-n,s=1-n-a,o=3*e,l=3*(i-e)-o,u=1-o-l;return function(h,c=1e-6){if(h<=0)return 0;if(h>=1)return 1;let p=h;for(let y=0;y<8;y++){let m=((s*p+a)*p+n)*p-h;if(Math.abs(m)<c)return((u*p+l)*p+o)*p;let g=(3*s*p+2*a)*p+n;if(Math.abs(g)<1e-6)break;p-=m/g}let f=0,d=1;p=h;for(let y=0;y<20;y++){let m=((s*p+a)*p+n)*p;if(Math.abs(m-h)<c)break;h>m?f=p:d=p,p=(f+d)*.5}return((u*p+l)*p+o)*p}}var be=class Qs{constructor(e,r,i,n,a,s){this.type=e,this.operator=r,this.interpolation=i,this.input=n,this.key=s,this.labels=[],this.outputs=[];for(let[o,l]of a)this.labels.push(o),this.outputs.push(l)}static interpolationFactor(e,r,i,n){let a=0;if(e.name==="exponential")a=zs(r,e.base,i,n);else if(e.name==="linear")a=zs(r,1,i,n);else if(e.name==="cubic-bezier"){let s=e.controlPoints;a=Q1(s[0],s[1],s[2],s[3])(zs(r,1,i,n))}return a}static parse(e,r){let[i,n,a,...s]=e;if(!Array.isArray(n)||n.length===0)return r.error("Expected an interpolation type expression.",1);if(n[0]==="linear")n={name:"linear"};else if(n[0]==="exponential"){let u=n[1];if(typeof u!="number")return r.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:u}}else if(n[0]==="cubic-bezier"){let u=n.slice(1);if(u.length!==4||u.some(h=>typeof h!="number"||h<0||h>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:u}}else return r.error(`Unknown interpolation type ${String(n[0])}`,1,0);if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(a=r.parse(a,2,I),!a)return null;let o=[],l=null;(i==="interpolate-hcl"||i==="interpolate-lab")&&r.expectedType!=Qi?l=ce:r.expectedType&&r.expectedType.kind!=="value"&&(l=r.expectedType);for(let u=0;u<s.length;u+=2){let h=s[u],c=s[u+1],p=u+3,f=u+4;if(typeof h!="number")return r.error(\'Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.\',p);if(o.length&&o[o.length-1][0]>=h)return r.error(\'Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.\',p);let d=r.parse(c,f,l);if(!d)return null;l||(l=d.type),o.push([h,d])}return!Ge(l,I)&&!Ge(l,Ba)&&!Ge(l,ce)&&!Ge(l,za)&&!Ge(l,La)&&!Ge(l,Qi)&&!Ge(l,Va)&&!Ge(l,Ut(I))?r.error(`Type ${yt(l)} is not interpolatable.`):new Qs(l,i,n,a,o,r.key)}evaluate(e){let r=this.labels,i=this.outputs;if(r.length===1)return i[0].evaluate(e);let n=this.input.evaluate(e);if(n<=r[0])return i[0].evaluate(e);let a=r.length;if(n>=r[a-1])return i[a-1].evaluate(e);let s=Oa(r,n,this.key),o=r[s],l=r[s+1],u=Qs.interpolationFactor(this.interpolation,n,o,l),h=i[s].evaluate(e),c=i[s+1].evaluate(e);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return Je(h,c,u);case"color":return gt.interpolate(h,c,u);case"padding":return Ae.interpolate(h,c,u);case"colorArray":return oe.interpolate(h,c,u);case"numberArray":return Se.interpolate(h,c,u);case"variableAnchorOffsetCollection":return De.interpolate(h,c,u,this.key);case"array":return ti(h,c,u);case"projectionDefinition":return Dr.interpolate(h,c,u)}case"interpolate-hcl":switch(this.type.kind){case"color":return gt.interpolate(h,c,u,"hcl");case"colorArray":return oe.interpolate(h,c,u,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return gt.interpolate(h,c,u,"lab");case"colorArray":return oe.interpolate(h,c,u,"lab")}}}eachChild(e){e(this.input);for(let r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}};function zs(t,e,r,i){let n=i-r,a=t-r;return n===0?0:e===1?a/n:(e**+a-1)/(e**+n-1)}var gr={color:gt.interpolate,number:Je,padding:Ae.interpolate,numberArray:Se.interpolate,colorArray:oe.interpolate,variableAnchorOffsetCollection:De.interpolate,array:ti},Ep=class Fp{constructor(e){this.type=yn,this.sections=e}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let i=e[1];if(!Array.isArray(i)&&typeof i=="object")return r.error("First argument must be an image or text section.");let n=[],a=!1;for(let s=1;s<=e.length-1;++s){let o=e[s];if(a&&typeof o=="object"&&!Array.isArray(o)){a=!1;let l=null;if(o["font-scale"]&&(l=r.parse(o["font-scale"],1,I),!l))return null;let u=null;if(o["text-font"]&&(u=r.parse(o["text-font"],1,Ut(Y)),!u))return null;let h=null;if(o["text-color"]&&(h=r.parse(o["text-color"],1,ce),!h))return null;let c=null;if(o["vertical-align"]){if(typeof o["vertical-align"]=="string"&&!H1.includes(o["vertical-align"]))return r.error(`\'vertical-align\' must be one of: \'bottom\', \'center\', \'top\' but found \'${o["vertical-align"]}\' instead.`);if(c=r.parse(o["vertical-align"],1,Y),!c)return null}let p=n[n.length-1];p.scale=l,p.font=u,p.textColor=h,p.verticalAlign=c}else{let l=r.parse(e[s],1,Z);if(!l)return null;let u=l.type.kind;if(u!=="string"&&u!=="value"&&u!=="null"&&u!=="resolvedImage")return r.error("Formatted text type must be \'string\', \'value\', \'image\' or \'null\'.");a=!0,n.push({content:l,scale:null,font:null,textColor:null,verticalAlign:null})}}return new Fp(n)}evaluate(e){return new ze(this.sections.map(r=>{let i=r.content.evaluate(e);return _t(i)===mn?new Js("",i,null,null,null,r.verticalAlign?r.verticalAlign.evaluate(e):null):new Js(Gi(i),null,r.scale?r.scale.evaluate(e):null,r.font?r.font.evaluate(e).join(","):null,r.textColor?r.textColor.evaluate(e):null,r.verticalAlign?r.verticalAlign.evaluate(e):null)}))}eachChild(e){for(let r of this.sections)e(r.content),r.scale&&e(r.scale),r.font&&e(r.font),r.textColor&&e(r.textColor),r.verticalAlign&&e(r.verticalAlign)}outputDefined(){return!1}};function kp(t,e,r=0,i=t.length-1,n=t0){for(;i>r;){if(i-r>600){let l=i-r+1,u=e-r+1,h=Math.log(l),c=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*c*(l-c)/l)*(u-l/2<0?-1:1);kp(t,e,Math.max(r,Math.floor(e-u*c/l+p)),Math.min(i,Math.floor(e+(l-u)*c/l+p)),n)}let a=t[e],s=r,o=i;for(ki(t,r,e),n(t[i],a)>0&&ki(t,r,i);s<o;){for(ki(t,s,o),s++,o--;n(t[s],a)<0;)s++;for(;n(t[o],a)>0;)o--}n(t[r],a)===0?ki(t,r,o):(o++,ki(t,o,i)),o<=e&&(r=o+1),e<=o&&(i=o-1)}}function ki(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}function t0(t,e){return t<e?-1:+(t>e)}function Ra(t,e){if(t.length<=1)return[t];let r=[],i,n;for(let a of t){let s=r0(a);s!==0&&(a.area=Math.abs(s),n===void 0&&(n=s<0),n===s<0?(i&&r.push(i),i=[a]):i.push(a))}if(i&&r.push(i),e>1)for(let a=0;a<r.length;a++)r[a].length<=e||(kp(r[a],e,1,r[a].length-1,e0),r[a]=r[a].slice(0,e));return r}function e0(t,e){return e.area-t.area}function r0(t){let e=0;for(let r=0,i=t.length,n=i-1,a,s;r<i;n=r++)a=t[r],s=t[n],e+=(s.x-a.x)*(a.y+s.y);return e}var jn={string:Y,number:I,boolean:tt,object:fr},Ie=class Tp{constructor(e,r,i){this.type=e,this.args=r,this.key=i}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let i=1,n,a=e[0];if(a==="array"){let o;if(e.length>2){let u=e[1];if(typeof u!="string"||!(u in jn)||u==="object")return r.error(\'The item type argument of "array" must be one of string, number, boolean\',1);o=jn[u],i++}else o=Z;let l;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return r.error(\'The length argument to "array" must be a positive integer literal\',2);l=e[2],i++}n=Ut(o,l)}else{if(!jn[a])throw Error(`Types doesn\'t contain name = ${a}`);n=jn[a]}let s=[];for(;i<e.length;i++){let o=r.parse(e[i],i,Z);if(!o)return null;s.push(o)}return new Tp(n,s,r.key)}evaluate(e){for(let r=0;r<this.args.length;r++){let i=this.args[r].evaluate(e);if(!tn(this.type,_t(i)))return i;if(r===this.args.length-1)throw new ft(`Expected value to be of type ${yt(this.type)}, but found ${yt(_t(i))} instead.`,this.key)}throw Error()}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}},gh={"to-boolean":tt,"to-color":ce,"to-number":I,"to-string":Y},jr=class Ip{constructor(e,r,i){this.type=e,this.args=r,this.key=i}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let i=e[0];if(!gh[i])throw Error(`Can\'t parse ${i} as it is not part of the known types`);if((i==="to-boolean"||i==="to-string")&&e.length!==2)return r.error("Expected one argument.");let n=gh[i],a=[];for(let s=1;s<e.length;s++){let o=r.parse(e[s],s,Z);if(!o)return null;a.push(o)}return new Ip(n,a,r.key)}evaluate(e){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(e);case"color":{let r,i;for(let n of this.args){if(r=n.evaluate(e),i=null,r instanceof gt)return r;if(typeof r=="string"){let a=e.parseColor(r);if(a)return a}else if(Array.isArray(r)&&(i=r.length<3||r.length>4?`Invalid rgba value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:Dp(r[0],r[1],r[2],r[3]),!i))return new gt(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new ft(i||`Could not parse color from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"padding":{let r;for(let i of this.args){r=i.evaluate(e);let n=Ae.parse(r);if(n)return n}throw new ft(`Could not parse padding from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"numberArray":{let r;for(let i of this.args){r=i.evaluate(e);let n=Se.parse(r);if(n)return n}throw new ft(`Could not parse numberArray from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"colorArray":{let r;for(let i of this.args){r=i.evaluate(e);let n=oe.parse(r);if(n)return n}throw new ft(`Could not parse colorArray from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"variableAnchorOffsetCollection":{let r;for(let i of this.args){r=i.evaluate(e);let n=De.parse(r);if(n)return n}throw new ft(`Could not parse variableAnchorOffsetCollection from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}case"number":{let r=null;for(let i of this.args){if(r=i.evaluate(e),r===null)return 0;let n=Number(r);if(!isNaN(n))return n}throw new ft(`Could not convert ${JSON.stringify(r)} to number.`,this.key)}case"formatted":return ze.fromString(Gi(this.args[0].evaluate(e)));case"resolvedImage":return _e.fromString(Gi(this.args[0].evaluate(e)));case"projectionDefinition":{let r=this.args[0].evaluate(e);if(Dr.parse(r))return r;throw new ft(`Could not parse projectionDefinition from value \'${typeof r=="string"?r:JSON.stringify(r)}\'`,this.key)}default:return Gi(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}},Cp=class Mp{constructor(e,r){this.type=r.type,this.bindings=[].concat(e),this.result=r}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(let r of this.bindings)e(r[1]);e(this.result)}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);let i=[];for(let a=1;a<e.length-1;a+=2){let s=e[a];if(typeof s!="string")return r.error(`Expected string, but found ${typeof s} instead.`,a);if(/[^a-zA-Z0-9_]/.test(s))return r.error("Variable names must contain only alphanumeric characters or \'_\'.",a);let o=r.parse(e[a+1],a+1);if(!o)return null;i.push([s,o])}let n=r.parse(e[e.length-1],e.length-1,r.expectedType,i);return n?new Mp(i,n):null}outputDefined(){return this.result.outputDefined()}},Bp=class Pp{constructor(e,r){this.type=r.type,this.name=e,this.boundExpression=r}static parse(e,r){if(e.length!==2||typeof e[1]!="string")return r.error("\'var\' expression requires exactly one string literal argument.");let i=e[1];return r.scope.has(i)?new Pp(i,r.scope.get(i)):r.error(`Unknown variable "${i}". Make sure "${i}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}},i0=class zp{constructor(e,r,i,n){this.type=e,this.index=r,this.input=i,this.key=n}static parse(e,r){if(e.length!==3)return r.error(`Expected 2 arguments, but found ${e.length-1} instead.`);let i=r.parse(e[1],1,I),n=r.parse(e[2],2,Ut(r.expectedType||Z));if(!i||!n)return null;let a=n.type;return new zp(a.itemType,i,n,r.key)}evaluate(e){let r=this.index.evaluate(e),i=this.input.evaluate(e);if(r<0)throw new ft(`Array index out of bounds: ${r} < 0.`,this.key);if(r>=i.length)throw new ft(`Array index out of bounds: ${r} > ${i.length-1}.`,this.key);if(r!==Math.floor(r))throw new ft(`Array index must be an integer, but found ${r} instead.`,this.key);return i[r]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}},n0=class Lp{constructor(e,r,i){this.needle=e,this.haystack=r,this.key=i,this.type=tt}static parse(e,r){if(e.length!==3)return r.error(`Expected 2 arguments, but found ${e.length-1} instead.`);let i=r.parse(e[1],1,Z),n=r.parse(e[2],2,Z);return!i||!n?null:gl(i.type,[tt,Y,I,dn,Z])?new Lp(i,n,r.key):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${yt(i.type)} instead`)}evaluate(e){let r=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!i)return!1;if(!dr(r,["boolean","string","number","null"]))throw new ft(`Expected first argument to be of type boolean, string, number or null, but found ${yt(_t(r))} instead.`,this.key);if(!dr(i,["string","array"]))throw new ft(`Expected second argument to be of type array or string, but found ${yt(_t(i))} instead.`,this.key);return i.indexOf(r)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}},a0=class to{constructor(e,r,i,n){this.needle=e,this.haystack=r,this.key=i,this.fromIndex=n,this.type=I}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${e.length-1} instead.`);let i=r.parse(e[1],1,Z),n=r.parse(e[2],2,Z);if(!i||!n)return null;if(!gl(i.type,[tt,Y,I,dn,Z]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${yt(i.type)} instead`);if(e.length===4){let a=r.parse(e[3],3,I);return a?new to(i,n,r.key,a):null}return new to(i,n,r.key)}evaluate(e){let r=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!dr(r,["boolean","string","number","null"]))throw new ft(`Expected first argument to be of type boolean, string, number or null, but found ${yt(_t(r))} instead.`,this.key);let n;if(this.fromIndex&&(n=this.fromIndex.evaluate(e)),dr(i,["string"])){let a=i.indexOf(r,n);return a===-1?-1:[...i.slice(0,a)].length}if(dr(i,["array"]))return i.indexOf(r,n);throw new ft(`Expected second argument to be of type array or string, but found ${yt(_t(i))} instead.`,this.key)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}},s0=class Vp{constructor(e,r,i,n,a,s){this.inputType=e,this.type=r,this.input=i,this.cases=n,this.outputs=a,this.otherwise=s}static parse(e,r){if(e.length<5)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return r.error("Expected an even number of arguments.");let i,n;r.expectedType&&r.expectedType.kind!=="value"&&(n=r.expectedType);let a={},s=[];for(let u=2;u<e.length-1;u+=2){let h=e[u],c=e[u+1];Array.isArray(h)||(h=[h]);let p=r.concat(u);if(h.length===0)return p.error("Expected at least one branch label.");for(let d of h){if(typeof d!="number"&&typeof d!="string")return p.error("Branch labels must be numbers or strings.");if(typeof d=="number"&&Math.abs(d)>2**53-1)return p.error(`Branch labels must be integers no larger than ${2**53-1}.`);if(typeof d=="number"&&Math.floor(d)!==d)return p.error("Numeric branch labels must be integer values.");if(!i)i=_t(d);else if(p.checkSubtype(i,_t(d)))return null;if(a[String(d)]!==void 0)return p.error("Branch labels must be unique.");a[String(d)]=s.length}let f=r.parse(c,u,n);if(!f)return null;n||(n=f.type),s.push(f)}let o=r.parse(e[1],1,Z);if(!o)return null;let l=r.parse(e[e.length-1],e.length-1,n);return!l||o.type.kind!=="value"&&r.concat(1).checkSubtype(i,o.type)?null:new Vp(i,n,o,a,s,l)}evaluate(e){let r=this.input.evaluate(e);return(_t(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}},o0=class Op{constructor(e,r,i){this.type=e,this.branches=r,this.otherwise=i}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return r.error("Expected an odd number of arguments.");let i;r.expectedType&&r.expectedType.kind!=="value"&&(i=r.expectedType);let n=[];for(let s=1;s<e.length-1;s+=2){let o=r.parse(e[s],s,tt);if(!o)return null;let l=r.parse(e[s+1],s+1,i);if(!l)return null;n.push([o,l]),i||(i=l.type)}let a=r.parse(e[e.length-1],e.length-1,i);if(!a)return null;if(!i)throw Error("Can\'t infer output type");return new Op(i,n,a)}evaluate(e){for(let[r,i]of this.branches)if(r.evaluate(e))return i.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(let[r,i]of this.branches)e(r),e(i);e(this.otherwise)}outputDefined(){return this.branches.every(([e,r])=>r.outputDefined())&&this.otherwise.outputDefined()}},l0=class eo{constructor(e,r,i,n,a){this.type=e,this.input=r,this.beginIndex=i,this.key=n,this.endIndex=a}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${e.length-1} instead.`);let i=r.parse(e[1],1,Z),n=r.parse(e[2],2,I);if(!i||!n)return null;if(!gl(i.type,[Ut(Z),Y,Z]))return r.error(`Expected first argument to be of type array or string, but found ${yt(i.type)} instead`);if(e.length===4){let a=r.parse(e[3],3,I);return a?new eo(i.type,i,n,r.key,a):null}return new eo(i.type,i,n,r.key)}evaluate(e){let r=this.input.evaluate(e),i=this.beginIndex.evaluate(e),n;if(this.endIndex&&(n=this.endIndex.evaluate(e)),dr(r,["string"]))return[...r].slice(i,n).join("");if(dr(r,["array"]))return r.slice(i,n);throw new ft(`Expected first argument to be of type array or string, but found ${yt(_t(r))} instead.`,this.key)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}},Rp=class ro{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let i=null,n=r.expectedType;n&&n.kind!=="value"&&(i=n);let a=[];for(let s of e.slice(1)){let o=r.parse(s,1+a.length,i,void 0,{typeAnnotation:"omit"});if(!o)return null;i||(i=o.type),a.push(o)}if(!i)throw Error("No output type");return n&&a.some(s=>tn(n,s.type))?new ro(Z,a):new ro(i,a)}evaluate(e){let r=null,i=0,n;for(let a of this.args)if(i++,r=a.evaluate(e),r&&r instanceof _e&&!r.available&&(n||(n=r.name),r=null,i===this.args.length&&(r=n)),r!==null)break;return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}};function xh(t,e){return t==="=="||t==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function u0(t,e,r){return e===r}function h0(t,e,r){return e!==r}function c0(t,e,r){return e<r}function p0(t,e,r){return e>r}function f0(t,e,r){return e<=r}function d0(t,e,r){return e>=r}function $p(t,e,r,i){return i.compare(e,r)===0}function y0(t,e,r,i){return!$p(t,e,r,i)}function m0(t,e,r,i){return i.compare(e,r)<0}function g0(t,e,r,i){return i.compare(e,r)>0}function x0(t,e,r,i){return i.compare(e,r)<=0}function v0(t,e,r,i){return i.compare(e,r)>=0}function li(t,e,r){let i=t!=="=="&&t!=="!=";return class Np{constructor(a,s,o,l){this.lhs=a,this.rhs=s,this.key=o,this.collator=l,this.type=tt,this.hasUntypedArgument=a.type.kind==="value"||s.type.kind==="value"}static parse(a,s){if(a.length!==3&&a.length!==4)return s.error("Expected two or three arguments.");let o=a[0],l=s.parse(a[1],1,Z);if(!l)return null;if(!xh(o,l.type))return s.concat(1).error(`"${o}" comparisons are not supported for type \'${yt(l.type)}\'.`);let u=s.parse(a[2],2,Z);if(!u)return null;if(!xh(o,u.type))return s.concat(2).error(`"${o}" comparisons are not supported for type \'${yt(u.type)}\'.`);if(l.type.kind!==u.type.kind&&l.type.kind!=="value"&&u.type.kind!=="value")return s.error(`Cannot compare types \'${yt(l.type)}\' and \'${yt(u.type)}\'.`);i&&(l.type.kind==="value"&&u.type.kind!=="value"?l=new Ie(u.type,[l],s.key):l.type.kind!=="value"&&u.type.kind==="value"&&(u=new Ie(l.type,[u],s.key)));let h=null;if(a.length===4){if(l.type.kind!=="string"&&u.type.kind!=="string"&&l.type.kind!=="value"&&u.type.kind!=="value")return s.error("Cannot use collator to compare non-string types.");if(h=s.parse(a[3],3,Pa),!h)return null}return new Np(l,u,s.key,h)}evaluate(a){let s=this.lhs.evaluate(a),o=this.rhs.evaluate(a);if(i&&this.hasUntypedArgument){let l=_t(s),u=_t(o);if(l.kind!==u.kind||l.kind!=="string"&&l.kind!=="number")throw new ft(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${l.kind}, ${u.kind}) instead.`,this.key)}if(this.collator&&!i&&this.hasUntypedArgument){let l=_t(s),u=_t(o);if(l.kind!=="string"||u.kind!=="string")return e(a,s,o)}return this.collator?r(a,s,o,this.collator.evaluate(a)):e(a,s,o)}eachChild(a){a(this.lhs),a(this.rhs),this.collator&&a(this.collator)}outputDefined(){return!0}}}var b0=li("==",u0,$p),w0=li("!=",h0,y0),D0=li("<",c0,m0),_0=li(">",p0,g0),A0=li("<=",f0,x0),S0=li(">=",d0,v0),Up=class qp{constructor(e,r,i){this.type=Pa,this.locale=i,this.caseSensitive=e,this.diacriticSensitive=r}static parse(e,r){if(e.length!==2)return r.error("Expected one argument.");let i=e[1];if(typeof i!="object"||Array.isArray(i))return r.error("Collator options argument must be an object.");let n=r.parse(i["case-sensitive"]!==void 0&&i["case-sensitive"],1,tt);if(!n)return null;let a=r.parse(i["diacritic-sensitive"]!==void 0&&i["diacritic-sensitive"],1,tt);if(!a)return null;let s=null;return i.locale&&(s=r.parse(i.locale,1,Y),!s)?null:new qp(n,a,s)}evaluate(e){return new xl(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}},E0=class jp{constructor(e,r,i,n,a,s){this.type=Y,this.number=e,this.locale=r,this.currency=i,this.unit=n,this.minFractionDigits=a,this.maxFractionDigits=s}static parse(e,r){if(e.length!==3)return r.error("Expected two arguments.");let i=r.parse(e[1],1,I);if(!i)return null;let n=e[2];if(typeof n!="object"||Array.isArray(n))return r.error("NumberFormat options argument must be an object.");let a=null;if(n.locale&&(a=r.parse(n.locale,1,Y),!a))return null;let s=null;if(n.currency&&(s=r.parse(n.currency,1,Y),!s))return null;let o=null;if(n.unit&&(o=r.parse(n.unit,1,Y),!o))return null;if(s&&o)return r.error("NumberFormat options `currency` and `unit` are mutually exclusive");let l=null;if(n["min-fraction-digits"]&&(l=r.parse(n["min-fraction-digits"],1,I),!l))return null;let u=null;return n["max-fraction-digits"]&&(u=r.parse(n["max-fraction-digits"],1,I),!u)?null:new jp(i,a,s,o,l,u)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}},F0=class Gp{constructor(e){this.type=mn,this.input=e}static parse(e,r){if(e.length!==2)return r.error("Expected two arguments.");let i=r.parse(e[1],1,Y);return i?new Gp(i):r.error("No image name provided.")}evaluate(e){let r=this.input.evaluate(e),i=_e.fromString(r);return i&&e.availableImages&&(i.available=e.availableImages.indexOf(r)>-1),i}eachChild(e){e(this.input)}outputDefined(){return!1}},k0=class Xp{constructor(e,r){this.input=e,this.key=r,this.type=I}static parse(e,r){if(e.length!==2)return r.error(`Expected 1 argument, but found ${e.length-1} instead.`);let i=r.parse(e[1],1);return i?i.type.kind!=="array"&&i.type.kind!=="string"&&i.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${yt(i.type)} instead.`):new Xp(i,r.key):null}evaluate(e){let r=this.input.evaluate(e);if(typeof r=="string")return[...r].length;if(Array.isArray(r))return r.length;throw new ft(`Expected value to be of type string or array, but found ${yt(_t(r))} instead.`,this.key)}eachChild(e){e(this.input)}outputDefined(){return!1}},we=8192;function T0(t,e){let r=I0(t[0]),i=M0(t[1]),n=2**e.z;return[Math.round(r*n*we),Math.round(i*n*we)]}function bl(t,e){let r=2**e.z,i=(t[0]/we+e.x)/r,n=(t[1]/we+e.y)/r;return[C0(i),B0(n)]}function I0(t){return(180+t)/360}function C0(t){return t*360-180}function M0(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function B0(t){return 360/Math.PI*Math.atan(Math.exp((180-t*360)*Math.PI/180))-90}function gn(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function en(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function P0(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function z0(t,e,r){let i=t[0]-e[0],n=t[1]-e[1],a=t[0]-r[0],s=t[1]-r[1];return i*s-a*n===0&&i*a<=0&&n*s<=0}function $a(t,e,r,i){let n=[e[0]-t[0],e[1]-t[1]];return R0([i[0]-r[0],i[1]-r[1]],n)!==0&&!!(vh(t,e,r,i)&&vh(r,i,t,e))}function L0(t,e,r){for(let i of r)for(let n=0;n<i.length-1;++n)if($a(t,e,i[n],i[n+1]))return!0;return!1}function ui(t,e,r=!1){let i=!1;for(let n of e)for(let a=0;a<n.length-1;a++){if(z0(t,n[a],n[a+1]))return r;P0(t,n[a],n[a+1])&&(i=!i)}return i}function V0(t,e){for(let r of e)if(ui(t,r))return!0;return!1}function Yp(t,e){for(let r of t)if(!ui(r,e))return!1;for(let r=0;r<t.length-1;++r)if(L0(t[r],t[r+1],e))return!1;return!0}function O0(t,e){for(let r of e)if(Yp(t,r))return!0;return!1}function R0(t,e){return t[0]*e[1]-t[1]*e[0]}function vh(t,e,r,i){let n=t[0]-r[0],a=t[1]-r[1],s=e[0]-r[0],o=e[1]-r[1],l=i[0]-r[0],u=i[1]-r[1],h=n*u-l*a,c=s*u-l*o;return h>0&&c<0||h<0&&c>0}function wl(t,e,r){let i=[];for(let n=0;n<t.length;n++){let a=[];for(let s=0;s<t[n].length;s++){let o=T0(t[n][s],r);gn(e,o),a.push(o)}i.push(a)}return i}function Wp(t,e,r){let i=[];for(let n=0;n<t.length;n++){let a=wl(t[n],e,r);i.push(a)}return i}function Zp(t,e,r,i){if(t[0]<r[0]||t[0]>r[2]){let n=i*.5,a=t[0]-r[0]>n?-i:r[0]-t[0]>n?i:0;a===0&&(a=t[0]-r[2]>n?-i:r[2]-t[0]>n?i:0),t[0]+=a}gn(e,t)}function $0(t){t[0]=t[1]=1/0,t[2]=t[3]=-1/0}function bh(t,e,r,i){let n=2**i.z*we,a=[i.x*we,i.y*we],s=[];for(let o of t)for(let l of o){let u=[l.x+a[0],l.y+a[1]];Zp(u,e,r,n),s.push(u)}return s}function wh(t,e,r,i){let n=2**i.z*we,a=[i.x*we,i.y*we],s=[];for(let o of t){let l=[];for(let u of o){let h=[u.x+a[0],u.y+a[1]];gn(e,h),l.push(h)}s.push(l)}if(e[2]-e[0]<=n/2){$0(e);for(let o of s)for(let l of o)Zp(l,e,r,n)}return s}function N0(t,e){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if(e.type==="Polygon"){let a=wl(e.coordinates,i,n),s=bh(t.geometry(),r,i,n);if(!en(r,i))return!1;for(let o of s)if(!ui(o,a))return!1}if(e.type==="MultiPolygon"){let a=Wp(e.coordinates,i,n),s=bh(t.geometry(),r,i,n);if(!en(r,i))return!1;for(let o of s)if(!V0(o,a))return!1}return!0}function U0(t,e){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if(e.type==="Polygon"){let a=wl(e.coordinates,i,n),s=wh(t.geometry(),r,i,n);if(!en(r,i))return!1;for(let o of s)if(!Yp(o,a))return!1}if(e.type==="MultiPolygon"){let a=Wp(e.coordinates,i,n),s=wh(t.geometry(),r,i,n);if(!en(r,i))return!1;for(let o of s)if(!O0(o,a))return!1}return!0}var Dl=class ha{constructor(e,r){this.type=tt,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`\'within\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(ei(e[1])){let i=e[1];if(i.type==="FeatureCollection"){let n=[];for(let a of i.features){let{type:s,coordinates:o}=a.geometry;s==="Polygon"&&n.push(o),s==="MultiPolygon"&&n.push(...o)}if(n.length)return new ha(i,{type:"MultiPolygon",coordinates:n})}else if(i.type==="Feature"){let n=i.geometry.type;if(n==="Polygon"||n==="MultiPolygon")return new ha(i,i.geometry)}else if(i.type==="Polygon"||i.type==="MultiPolygon")return new ha(i,i)}return r.error("\'within\' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return N0(e,this.geometries);if(e.geometryType()==="LineString")return U0(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}},Hp=class{constructor(t=[],e=(r,i)=>r<i?-1:+(r>i)){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;let t=this.data[0],e=this.data.pop();return--this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){let{data:e,compare:r}=this,i=e[t];for(;t>0;){let n=t-1>>1,a=e[n];if(r(i,a)>=0)break;e[t]=a,t=n}e[t]=i}_down(t){let{data:e,compare:r}=this,i=this.length>>1,n=e[t];for(;t<i;){let a=(t<<1)+1,s=a+1;if(s<this.length&&r(e[s],e[a])<0&&(a=s),r(e[a],n)>=0)break;e[t]=e[a],t=a}e[t]=n}},Dh=Math.PI/180,_l=class{constructor(t){let e=Dh*6378.137*1e3,r=Math.cos(t*Dh),i=1/(1-.0066943799901413165*(1-r*r)),n=Math.sqrt(i);this.kx=e*n*r,this.ky=e*n*i*.9933056200098587}distance(t,e){let r=this.wrap(t[0]-e[0])*this.kx,i=(t[1]-e[1])*this.ky;return Math.sqrt(r*r+i*i)}pointOnLine(t,e){let r=1/0,i,n,a,s;for(let o=0;o<t.length-1;o++){let l=t[o][0],u=t[o][1],h=this.wrap(t[o+1][0]-l)*this.kx,c=(t[o+1][1]-u)*this.ky,p=0;(h!==0||c!==0)&&(p=(this.wrap(e[0]-l)*this.kx*h+(e[1]-u)*this.ky*c)/(h*h+c*c),p>1?(l=t[o+1][0],u=t[o+1][1]):p>0&&(l+=h/this.kx*p,u+=c/this.ky*p)),h=this.wrap(e[0]-l)*this.kx,c=(e[1]-u)*this.ky;let f=h*h+c*c;f<r&&(r=f,i=l,n=u,a=o,s=p)}return{point:[i,n],index:a,t:Math.max(0,Math.min(1,s))}}wrap(t){for(;t<-180;)t+=360;for(;t>180;)t-=360;return t}};function Kp(t,e){return e[0]-t[0]}function ga(t){return t[1]-t[0]+1}function Le(t,e){return t[1]>=t[0]&&t[1]<e}function io(t,e){if(t[0]>t[1])return[null,null];let r=ga(t);if(e){if(r===2)return[t,null];let n=Math.floor(r/2);return[[t[0],t[0]+n],[t[0]+n,t[1]]]}if(r===1)return[t,null];let i=Math.floor(r/2)-1;return[[t[0],t[0]+i],[t[0]+i+1,t[1]]]}function no(t,e){if(!Le(e,t.length))return[1/0,1/0,-1/0,-1/0];let r=[1/0,1/0,-1/0,-1/0];for(let i=e[0];i<=e[1];++i)gn(r,t[i]);return r}function ao(t){let e=[1/0,1/0,-1/0,-1/0];for(let r of t)for(let i of r)gn(e,i);return e}function _h(t){return t[0]!==-1/0&&t[1]!==-1/0&&t[2]!==1/0&&t[3]!==1/0}function Al(t,e,r){if(!_h(t)||!_h(e))return NaN;let i=0,n=0;return t[2]<e[0]&&(i=e[0]-t[2]),t[0]>e[2]&&(i=t[0]-e[2]),t[1]>e[3]&&(n=t[1]-e[3]),t[3]<e[1]&&(n=e[1]-t[3]),r.distance([0,0],[i,n])}function hr(t,e,r){let i=r.pointOnLine(e,t);return r.distance(t,i.point)}function Sl(t,e,r,i,n){let a=Math.min(hr(t,[r,i],n),hr(e,[r,i],n)),s=Math.min(hr(r,[t,e],n),hr(i,[t,e],n));return Math.min(a,s)}function q0(t,e,r,i,n){if(!(Le(e,t.length)&&Le(i,r.length)))return 1/0;let a=1/0;for(let s=e[0];s<e[1];++s){let o=t[s],l=t[s+1];for(let u=i[0];u<i[1];++u){let h=r[u],c=r[u+1];if($a(o,l,h,c))return 0;a=Math.min(a,Sl(o,l,h,c,n))}}return a}function j0(t,e,r,i,n){if(!(Le(e,t.length)&&Le(i,r.length)))return NaN;let a=1/0;for(let s=e[0];s<=e[1];++s)for(let o=i[0];o<=i[1];++o)if(a=Math.min(a,n.distance(t[s],r[o])),a===0)return a;return a}function G0(t,e,r){if(ui(t,e,!0))return 0;let i=1/0;for(let n of e){let a=n[0],s=n[n.length-1];if(a!==s&&(i=Math.min(i,hr(t,[s,a],r)),i===0))return i;let o=r.pointOnLine(n,t);if(i=Math.min(i,r.distance(t,o.point)),i===0)return i}return i}function X0(t,e,r,i){if(!Le(e,t.length))return NaN;for(let a=e[0];a<=e[1];++a)if(ui(t[a],r,!0))return 0;let n=1/0;for(let a=e[0];a<e[1];++a){let s=t[a],o=t[a+1];for(let l of r)for(let u=0,h=l.length,c=h-1;u<h;c=u++){let p=l[c],f=l[u];if($a(s,o,p,f))return 0;n=Math.min(n,Sl(s,o,p,f,i))}}return n}function Ah(t,e){for(let r of t)for(let i of r)if(ui(i,e,!0))return!0;return!1}function Y0(t,e,r,i=1/0){let n=ao(t),a=ao(e);if(i!==1/0&&Al(n,a,r)>=i)return i;if(en(n,a)){if(Ah(t,e))return 0}else if(Ah(e,t))return 0;let s=1/0;for(let o of t)for(let l=0,u=o.length,h=u-1;l<u;h=l++){let c=o[h],p=o[l];for(let f of e)for(let d=0,y=f.length,m=y-1;d<y;m=d++){let g=f[m],x=f[d];if($a(c,p,g,x))return 0;s=Math.min(s,Sl(c,p,g,x,r))}}return s}function Sh(t,e,r,i,n,a){if(!a)return;let s=Al(no(i,a),n,r);s<e&&t.push([s,a,[0,0]])}function Gn(t,e,r,i,n,a,s){if(!a||!s)return;let o=Al(no(i,a),no(n,s),r);o<e&&t.push([o,a,s])}function xa(t,e,r,i,n=1/0){let a=Math.min(i.distance(t[0],r[0][0]),n);if(a===0)return a;let s=new Hp([[0,[0,t.length-1],[0,0]]],Kp),o=ao(r);for(;s.length>0;){let l=s.pop();if(l[0]>=a)continue;let u=l[1],h=e?50:100;if(ga(u)<=h){if(!Le(u,t.length))return NaN;if(e){let c=X0(t,u,r,i);if(isNaN(c)||c===0)return c;a=Math.min(a,c)}else for(let c=u[0];c<=u[1];++c){let p=G0(t[c],r,i);if(a=Math.min(a,p),a===0)return 0}}else{let c=io(u,e);Sh(s,a,i,t,o,c[0]),Sh(s,a,i,t,o,c[1])}}return a}function va(t,e,r,i,n,a=1/0){let s=Math.min(a,n.distance(t[0],r[0]));if(s===0)return s;let o=new Hp([[0,[0,t.length-1],[0,r.length-1]]],Kp);for(;o.length>0;){let l=o.pop();if(l[0]>=s)continue;let u=l[1],h=l[2],c=e?50:100,p=i?50:100;if(ga(u)<=c&&ga(h)<=p){if(!Le(u,t.length)&&Le(h,r.length))return NaN;let f;if(e&&i)f=q0(t,u,r,h,n),s=Math.min(s,f);else if(e&&!i){let d=t.slice(u[0],u[1]+1);for(let y=h[0];y<=h[1];++y)if(f=hr(r[y],d,n),s=Math.min(s,f),s===0)return s}else if(!e&&i){let d=r.slice(h[0],h[1]+1);for(let y=u[0];y<=u[1];++y)if(f=hr(t[y],d,n),s=Math.min(s,f),s===0)return s}else f=j0(t,u,r,h,n),s=Math.min(s,f)}else{let f=io(u,e),d=io(h,i);Gn(o,s,n,t,r,f[0],d[0]),Gn(o,s,n,t,r,f[0],d[1]),Gn(o,s,n,t,r,f[1],d[0]),Gn(o,s,n,t,r,f[1],d[1])}}return s}function W0(t,e){let r=t.geometry(),i=r.flat().map(s=>bl([s.x,s.y],t.canonical));if(r.length===0)return NaN;let n=new _l(i[0][1]),a=1/0;for(let s of e){switch(s.type){case"Point":a=Math.min(a,va(i,!1,[s.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,va(i,!1,s.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,xa(i,!1,s.coordinates,n,a))}if(a===0)return a}return a}function Z0(t,e){let r=t.geometry(),i=r.flat().map(s=>bl([s.x,s.y],t.canonical));if(r.length===0)return NaN;let n=new _l(i[0][1]),a=1/0;for(let s of e){switch(s.type){case"Point":a=Math.min(a,va(i,!0,[s.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,va(i,!0,s.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,xa(i,!0,s.coordinates,n,a))}if(a===0)return a}return a}function H0(t,e){let r=t.geometry();if(r.length===0||r[0].length===0)return NaN;let i=Ra(r,0).map(s=>s.map(o=>o.map(l=>bl([l.x,l.y],t.canonical)))),n=new _l(i[0][0][0][1]),a=1/0;for(let s of e)for(let o of i){switch(s.type){case"Point":a=Math.min(a,xa([s.coordinates],!1,o,n,a));break;case"LineString":a=Math.min(a,xa(s.coordinates,!0,o,n,a));break;case"Polygon":a=Math.min(a,Y0(o,s.coordinates,n,a))}if(a===0)return a}return a}function Ls(t){return t.type==="MultiPolygon"?t.coordinates.map(e=>({type:"Polygon",coordinates:e})):t.type==="MultiLineString"?t.coordinates.map(e=>({type:"LineString",coordinates:e})):t.type==="MultiPoint"?t.coordinates.map(e=>({type:"Point",coordinates:e})):[t]}var El=class ca{constructor(e,r){this.type=I,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`\'distance\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(ei(e[1])){let i=e[1];if(i.type==="FeatureCollection")return new ca(i,i.features.map(n=>Ls(n.geometry)).flat());if(i.type==="Feature")return new ca(i,Ls(i.geometry));if("type"in i&&"coordinates"in i)return new ca(i,Ls(i))}return r.error("\'distance\' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return W0(e,this.geometries);if(e.geometryType()==="LineString")return Z0(e,this.geometries);if(e.geometryType()==="Polygon")return H0(e,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}},K0=class Jp{constructor(e){let r=null;for(let i of e)if(!r)r=i.type;else{if(r===i.type)continue;r=Z;break}this.type=Ut(r!=null?r:Z,e.length),this.arr=e}static parse(e,r){if(e.length!==2)return r.error(`\'semiliteral\' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!ei(e[1]))return r.error(`invalid value of type "${typeof e[1]}"`);let i=e[1],n=_t(i);if(n.kind==="array"){let a=i.map(s=>r.parse(s,null,Z));return new Jp(a)}return new ri(n,i)}evaluate(e){return this.arr.map(r=>r.evaluate(e))}eachChild(e){this.arr.forEach(e)}outputDefined(){return this.arr.every(e=>e.outputDefined())}},Fl=class Qp{constructor(e){this.key=e,this.type=Z}static parse(e,r){if(e.length!==2)return r.error(`Expected 1 argument, but found ${e.length-1} instead.`);let i=e[1];return i==null?r.error("Global state property must be defined."):typeof i=="string"?new Qp(i):r.error(`Global state property must be string, but found ${typeof e[1]} instead.`)}evaluate(e){var i,n;let r=(i=e.globals)==null?void 0:i.globalState;return!r||Object.keys(r).length===0?null:(n=ji(r,this.key))!=null?n:null}eachChild(){}outputDefined(){return!1}},Yr={"==":b0,"!=":w0,">":_0,"<":D0,">=":S0,"<=":A0,array:Ie,at:i0,boolean:Ie,case:o0,coalesce:Rp,collator:Up,format:Ep,image:F0,in:n0,"index-of":a0,interpolate:be,"interpolate-hcl":be,"interpolate-lab":be,length:k0,let:Cp,literal:ri,match:s0,number:Ie,"number-format":E0,object:Ie,semiliteral:K0,slice:l0,step:vl,string:Ie,"to-boolean":jr,"to-color":jr,"to-number":jr,"to-string":jr,var:Bp,within:Dl,distance:El,"global-state":Fl},ve=class extends Error{constructor(t,e){super(e),this.message=e,this.key=t}},J0=class tf{constructor(e,r=[]){this.parent=e,this.bindings={};for(let[i,n]of r)this.bindings[i]=n}concat(e){return new tf(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw Error(`${e} not found in scope.`)}has(e){return this.bindings[e]?!0:this.parent?this.parent.has(e):!1}},ef=class rf{constructor(e,r,i=[],n,a=new J0,s=[]){this.registry=e,this.path=i,this.key=i.map(o=>`[${o}]`).join(""),this.scope=a,this.errors=s,this.expectedType=n,this._isConstant=r}parse(e,r,i,n,a={}){return r?this.concat(r,i,n)._parse(e,a):this._parse(e,a)}_parse(e,r){(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number")&&(e=["literal",e]);let i=this.key;function n(a,s,o){return o==="assert"?new Ie(s,[a],i):o==="coerce"?new jr(s,[a],i):a}if(Array.isArray(e)){if(e.length===0)return this.error(\'Expected an array with at least one element. If you wanted a literal array, use ["literal", []].\');let a=e[0];if(typeof a!="string")return this.error(`Expression name must be a string, but found ${typeof a} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let s=this.registry[a];if(s){let o=s.parse(e,this);if(!o)return null;if(this.expectedType){let l=this.expectedType,u=o.type;if((l.kind==="string"||l.kind==="number"||l.kind==="boolean"||l.kind==="object"||l.kind==="array")&&u.kind==="value")o=n(o,l,r.typeAnnotation||"assert");else if(l.kind==="projectionDefinition"&&["string","array","value"].includes(u.kind)||["color","formatted","resolvedImage"].includes(l.kind)&&["value","string"].includes(u.kind)||["padding","numberArray"].includes(l.kind)&&["value","number","array"].includes(u.kind)||l.kind==="colorArray"&&["value","string","array"].includes(u.kind)||l.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(u.kind))o=n(o,l,r.typeAnnotation||"coerce");else if(this.checkSubtype(l,u))return null}if(!(o instanceof ri)&&o.type.kind!=="resolvedImage"&&this._isConstant(o)){let l=new Ap;try{o=new ri(o.type,o.evaluate(l))}catch(u){return this.error(u.message),null}}return o}return this.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`,0)}return e===void 0?this.error("\'undefined\' value invalid. Use null instead."):typeof e=="object"?this.error(\'Bare objects invalid. Use ["literal", {...}] instead.\'):this.error(`Expected an array, but found ${typeof e} instead.`)}concat(e,r,i){let n=typeof e=="number"?this.path.concat(e):this.path,a=i?this.scope.concat(i):this.scope;return new rf(this.registry,this._isConstant,n,r||null,a,this.errors)}error(e,...r){let i=`${this.key}${r.map(n=>`[${n}]`).join("")}`;this.errors.push(new ve(i,e))}checkSubtype(e,r){let i=tn(e,r);return i&&this.error(i),i}},_r=class Ri{constructor(e,r,i,n,a){this.name=e,this.type=r,this._evaluate=i,this.args=n,this.key=a}evaluate(e){return this._evaluate(e,this.args,this.key)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,r){let i=e[0],n=Ri.definitions[i];if(!n)return r.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0);let a=Array.isArray(n)?n[0]:n.type,s=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,o=s.filter(([u])=>!Array.isArray(u)||u.length===e.length-1),l=null;for(let[u,h]of o){l=new ef(r.registry,ba,r.path,null,r.scope);let c=[],p=!1;for(let f=1;f<e.length;f++){let d=e[f],y=Array.isArray(u)?u[f-1]:u.type,m=l.parse(d,1+c.length,y);if(!m){p=!0;break}c.push(m)}if(!p){if(Array.isArray(u)&&u.length!==c.length){l.error(`Expected ${u.length} arguments, but found ${c.length} instead.`);continue}for(let f=0;f<c.length;f++){let d=Array.isArray(u)?u[f]:u.type,y=c[f];l.concat(f+1).checkSubtype(d,y.type)}if(l.errors.length===0)return new Ri(i,a,h,c,r.key)}}if(o.length===1)r.errors.push(...l.errors);else{let u=(o.length?o:s).map(([c])=>tm(c)).join(" | "),h=[];for(let c=1;c<e.length;c++){let p=r.parse(e[c],1+h.length);if(!p)return null;h.push(yt(p.type))}r.error(`Expected arguments of type ${u}, but found (${h.join(", ")}) instead.`)}return null}static register(e,r){Ri.definitions=r;for(let i in r)e[i]=Ri}};function Eh(t,[e,r,i,n],a){e=e.evaluate(t),r=r.evaluate(t),i=i.evaluate(t);let s=n?n.evaluate(t):1,o=Dp(e,r,i,s);if(o)throw new ft(o,a);return new gt(e/255,r/255,i/255,s,!1)}function Fh(t,e){return t in e&&e[t]!==void 0}function Vs(t,e){let r=e[t];return r===void 0?null:r}function Q0(t,e,r,i){for(;r<=i;){let n=r+i>>1;if(e[n]===t)return!0;e[n]>t?i=n-1:r=n+1}return!1}function sr(t){return{type:t}}_r.register(Yr,{error:[R1,[Y],(t,[e],r)=>{throw new ft(e.evaluate(t),r)}],typeof:[Y,[Z],(t,[e])=>yt(_t(e.evaluate(t)))],"to-rgba":[Ut(I,4),[ce],(t,[e])=>{let[r,i,n,a]=e.evaluate(t).rgb;return[r*255,i*255,n*255,a]}],rgb:[ce,[I,I,I],Eh],rgba:[ce,[I,I,I,I],Eh],has:{type:tt,overloads:[[[Y],(t,[e])=>Fh(e.evaluate(t),t.properties())],[[Y,fr],(t,[e,r])=>Fh(e.evaluate(t),r.evaluate(t))]]},get:{type:Z,overloads:[[[Y],(t,[e])=>Vs(e.evaluate(t),t.properties())],[[Y,fr],(t,[e,r])=>Vs(e.evaluate(t),r.evaluate(t))]]},"feature-state":[Z,[Y],(t,[e])=>Vs(e.evaluate(t),t.featureState||{})],properties:[fr,[],t=>t.properties()],"geometry-type":[Y,[],t=>t.geometryType()],id:[Z,[],t=>t.id()],zoom:[I,[],t=>t.globals.zoom],"heatmap-density":[I,[],t=>t.globals.heatmapDensity||0],elevation:[I,[],t=>t.globals.elevation||0],"line-progress":[I,[],t=>t.globals.lineProgress||0],accumulated:[Z,[],t=>t.globals.accumulated===void 0?null:t.globals.accumulated],"+":[I,sr(I),(t,e)=>{let r=0;for(let i of e)r+=i.evaluate(t);return r}],"*":[I,sr(I),(t,e)=>{let r=1;for(let i of e)r*=i.evaluate(t);return r}],"-":{type:I,overloads:[[[I,I],(t,[e,r])=>e.evaluate(t)-r.evaluate(t)],[[I],(t,[e])=>-e.evaluate(t)]]},"/":[I,[I,I],(t,[e,r])=>e.evaluate(t)/r.evaluate(t)],"%":[I,[I,I],(t,[e,r])=>e.evaluate(t)%r.evaluate(t)],ln2:[I,[],()=>Math.LN2],pi:[I,[],()=>Math.PI],e:[I,[],()=>Math.E],"^":[I,[I,I],(t,[e,r])=>e.evaluate(t)**+r.evaluate(t)],sqrt:[I,[I],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[I,[I],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[I,[I],(t,[e])=>Math.log(e.evaluate(t))],log2:[I,[I],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[I,[I],(t,[e])=>Math.sin(e.evaluate(t))],cos:[I,[I],(t,[e])=>Math.cos(e.evaluate(t))],tan:[I,[I],(t,[e])=>Math.tan(e.evaluate(t))],asin:[I,[I],(t,[e])=>Math.asin(e.evaluate(t))],acos:[I,[I],(t,[e])=>Math.acos(e.evaluate(t))],atan:[I,[I],(t,[e])=>Math.atan(e.evaluate(t))],min:[I,sr(I),(t,e)=>Math.min(...e.map(r=>r.evaluate(t)))],max:[I,sr(I),(t,e)=>Math.max(...e.map(r=>r.evaluate(t)))],abs:[I,[I],(t,[e])=>Math.abs(e.evaluate(t))],round:[I,[I],(t,[e])=>{let r=e.evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[I,[I],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[I,[I],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[tt,[Y,Z],(t,[e,r])=>t.properties()[e.value]===r.value],"filter-id-==":[tt,[Z],(t,[e])=>t.id()===e.value],"filter-type-==":[tt,[Y],(t,[e])=>t.geometryType()===e.value],"filter-<":[tt,[Y,Z],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i<n}],"filter-id-<":[tt,[Z],(t,[e])=>{let r=t.id(),i=e.value;return typeof r==typeof i&&r<i}],"filter->":[tt,[Y,Z],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i>n}],"filter-id->":[tt,[Z],(t,[e])=>{let r=t.id(),i=e.value;return typeof r==typeof i&&r>i}],"filter-<=":[tt,[Y,Z],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i<=n}],"filter-id-<=":[tt,[Z],(t,[e])=>{let r=t.id(),i=e.value;return typeof r==typeof i&&r<=i}],"filter->=":[tt,[Y,Z],(t,[e,r])=>{let i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i>=n}],"filter-id->=":[tt,[Z],(t,[e])=>{let r=t.id(),i=e.value;return typeof r==typeof i&&r>=i}],"filter-has":[tt,[Z],(t,[e])=>{let r=e.value,i=t.properties();return r in i&&i[r]!==void 0}],"filter-has-id":[tt,[],t=>t.id()!==null&&t.id()!==void 0],"filter-type-in":[tt,[Ut(Y)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[tt,[Ut(Z)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[tt,[Y,Ut(Z)],(t,[e,r])=>r.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[tt,[Y,Ut(Z)],(t,[e,r])=>Q0(t.properties()[e.value],r.value,0,r.value.length-1)],all:{type:tt,overloads:[[[tt,tt],(t,[e,r])=>e.evaluate(t)&&r.evaluate(t)],[sr(tt),(t,e)=>{for(let r of e)if(!r.evaluate(t))return!1;return!0}]]},any:{type:tt,overloads:[[[tt,tt],(t,[e,r])=>e.evaluate(t)||r.evaluate(t)],[sr(tt),(t,e)=>{for(let r of e)if(r.evaluate(t))return!0;return!1}]]},"!":[tt,[tt],(t,[e])=>!e.evaluate(t)],"is-supported-script":[tt,[Y],(t,[e])=>{let r=t.globals&&t.globals.isSupportedScript;return!r||r(e.evaluate(t))}],upcase:[Y,[Y],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[Y,[Y],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[Y,sr(Z),(t,e)=>e.map(r=>Gi(r.evaluate(t))).join("")],split:[Ut(Y),[Y,Y],(t,[e,r])=>e.evaluate(t).split(r.evaluate(t))],join:[Y,[Ut(Y),Y],(t,[e,r])=>e.evaluate(t).join(r.evaluate(t))],"resolved-locale":[Y,[Pa],(t,[e])=>e.evaluate(t).resolvedLocale()]});function tm(t){return Array.isArray(t)?`(${t.map(yt).join(", ")})`:`(${yt(t.type)}...)`}function ba(t){if(t instanceof Bp)return ba(t.boundExpression);if(t instanceof _r&&t.name==="error"||t instanceof Up||t instanceof Dl||t instanceof El||t instanceof Fl)return!1;let e=t instanceof jr||t instanceof Ie,r=!0;return t.eachChild(i=>{r&&(r=e?ba(i):i instanceof ri)}),r?Na(t)&&Ua(t,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"]):!1}function Na(t){if(t instanceof _r&&(t.name==="get"&&t.args.length===1||t.name==="feature-state"||t.name==="has"&&t.args.length===1||t.name==="properties"||t.name==="geometry-type"||t.name==="id"||/^filter-/.test(t.name))||t instanceof Dl||t instanceof El)return!1;let e=!0;return t.eachChild(r=>{e&&!Na(r)&&(e=!1)}),e}function rn(t){if(t instanceof _r&&t.name==="feature-state")return!1;let e=!0;return t.eachChild(r=>{e&&!rn(r)&&(e=!1)}),e}function Ua(t,e){if(t instanceof _r&&e.indexOf(t.name)>=0)return!1;let r=!0;return t.eachChild(i=>{r&&!Ua(i,e)&&(r=!1)}),r}function ii(t){return t["property-type"]==="data-driven"||t["property-type"]==="cross-faded-data-driven"}function nf(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function kl(t){return!!t.expression&&t.expression.interpolated}var Tl=/^(.*)-transition$/;function nn(t,...e){for(let r of e)for(let i in r)t[i]=r[i];return t}function Q(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":t===null?"null":typeof t}function qa(t){return typeof t=="object"&&!!t&&!Array.isArray(t)&&_t(t)===fr}function em(t){return t}function rm(t){switch(t.type){case"color":return gt.parse;case"padding":return Ae.parse;case"numberArray":return Se.parse;case"colorArray":return oe.parse;default:return null}}function im(t){switch(t){case"exponential":return sf;case"interval":return am;case"categorical":return nm;case"identity":return sm;default:throw Error(`Unknown function type "${t}"`)}}function af(t,e){let r=t.stops&&typeof t.stops[0][0]=="object",i=r||t.property!==void 0,n=r||!i,a=t.type||(kl(e)?"exponential":"interval"),s=rm(e);if(s&&(t=nn({},t),t.stops&&(t.stops=t.stops.map(h=>[h[0],s(h[1])])),t.default?t.default=s(t.default):t.default=s(e.default)),t.colorSpace&&!Z1(t.colorSpace))throw Error(`Unknown color space: "${t.colorSpace}"`);let o=im(a),l,u;if(a==="categorical"){l=Object.create(null);for(let h of t.stops)l[h[0]]=h[1];u=typeof t.stops[0][0]}if(r){let h={},c=[];for(let d=0;d<t.stops.length;d++){let y=t.stops[d],m=y[0].zoom;h[m]===void 0&&(h[m]={zoom:m,type:t.type,property:t.property,default:t.default,stops:[]},c.push(m)),h[m].stops.push([y[0].value,y[1]])}let p=[];for(let d of c)p.push([h[d].zoom,af(h[d],e)]);let f={name:"linear"};return{kind:"composite",interpolationType:f,interpolationFactor:be.interpolationFactor.bind(void 0,f),zoomStops:p.map(d=>d[0]),evaluate({zoom:d},y){return sf({stops:p,base:t.base},e,d).evaluate(d,y)}}}if(n){let h=a==="exponential"?{name:"exponential",base:t.base===void 0?1:t.base}:null;return{kind:"camera",interpolationType:h,interpolationFactor:be.interpolationFactor.bind(void 0,h),zoomStops:t.stops.map(c=>c[0]),evaluate:({zoom:c})=>o(t,e,c,l,u)}}return{kind:"source",evaluate(h,c){let p=c&&c.properties?c.properties[t.property]:void 0;return p===void 0?xn(t.default,e.default):o(t,e,p,l,u)}}}function xn(t,e,r){if(t!==void 0)return t;if(e!==void 0)return e;if(r!==void 0)return r}function nm(t,e,r,i,n){return xn(typeof r===n?i[r]:void 0,t.default,e.default)}function am(t,e,r){if(Q(r)!=="number")return xn(t.default,e.default);let i=t.stops.length;if(i===1||r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];let n=Oa(t.stops.map(a=>a[0]),r,"");return t.stops[n][1]}function sf(t,e,r){let i=t.base===void 0?1:t.base;if(Q(r)!=="number")return xn(t.default,e.default);let n=t.stops.length;if(n===1||r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];let a=Oa(t.stops.map(h=>h[0]),r,""),s=om(r,i,t.stops[a][0],t.stops[a+1][0]),o=t.stops[a][1],l=t.stops[a+1][1],u=gr[e.type]||em;return typeof o.evaluate=="function"?{evaluate(...h){let c=o.evaluate.apply(void 0,h),p=l.evaluate.apply(void 0,h);if(c!==void 0&&p!==void 0)return u(c,p,s,t.colorSpace)}}:u(o,l,s,t.colorSpace)}function sm(t,e,r){switch(e.type){case"color":r=gt.parse(r);break;case"formatted":r=ze.fromString(r.toString());break;case"resolvedImage":r=_e.fromString(r.toString());break;case"padding":r=Ae.parse(r);break;case"colorArray":r=oe.parse(r);break;case"numberArray":r=Se.parse(r);break;default:Q(r)!==e.type&&(e.type!=="enum"||!e.values[r])&&(r=void 0)}return xn(r,t.default,e.default)}function om(t,e,r,i){let n=i-r,a=t-r;return n===0?0:e===1?a/n:(e**+a-1)/(e**+n-1)}function so(t){return{result:"success",value:t}}function Nr(t){return{result:"error",value:t}}var Il=class{constructor(t,e,r,i){this.expression=t,this._warningHistory={},this._evaluator=new Ap,this._defaultValue=r?pf(r):null,this._enumValues=r&&r.type==="enum"?r.values:null,this._globalState=i,this._rootKey=e}evaluateWithoutErrorHandling(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)}evaluate(t,e,r,i,n,a){this._globalState&&(t=ni(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a||null;try{let s=this.expression.evaluate(this._evaluator);if(s==null||typeof s=="number"&&s!==s)return this._defaultValue;if(this._enumValues&&!(s in this._enumValues))throw new ft(`Expected value to be one of ${Object.keys(this._enumValues).map(o=>JSON.stringify(o)).join(", ")}, but found ${JSON.stringify(s)} instead.`,"");return s}catch(s){let o=s instanceof ft?s.path:"",l=`${o}|${s.message}`;return this._warningHistory[l]||(this._warningHistory[l]=!0,typeof console<"u"&&console.warn(of(this._rootKey,o,s.message,this._defaultValue))),this._defaultValue}}};function of(t,e,r,i){return`${t}${e}: ${r}${i==null?"":` Falling back to ${String(i)}.`}`}function lf(t){if(!t)throw Error(\'rootKey must identify the location of the expression in the style JSON, e.g. "layers[3].paint.line-width".\')}function ja(t){return Array.isArray(t)&&t.length>0&&typeof t[0]=="string"&&t[0]in Yr}function er(t,e,r,i){lf(e);let n=new ef(Yr,ba,[],r?hm(r):void 0),a=n.parse(t,void 0,void 0,void 0,r&&r.type==="string"?{typeAnnotation:"coerce"}:void 0);return a?so(new Il(a,e,r,i)):Nr(n.errors)}var an=class{constructor(t,e,r){this.kind=t,this._styleExpression=e,this.isStateDependent=t!=="constant"&&!rn(e.expression),this.globalStateRefs=vn(e.expression),this._globalState=r}evaluateWithoutErrorHandling(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,e,r,i,n,a)}evaluate(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluate(t,e,r,i,n,a)}},wa=class{constructor(t,e,r,i,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent=t!=="camera"&&!rn(e.expression),this.globalStateRefs=vn(e.expression),this.interpolationType=i,this._globalState=n}evaluateWithoutErrorHandling(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,e,r,i,n,a)}evaluate(t,e,r,i,n,a){return this._globalState&&(t=ni(t,this._globalState)),this._styleExpression.evaluate(t,e,r,i,n,a)}interpolationFactor(t,e,r){return this.interpolationType?be.interpolationFactor(this.interpolationType,t,e,r):0}};function lm(t){return t._styleExpression!==void 0}function uf(t,e,r,i){let n=er(t,e,r,i);if(n.result==="error")return n;let a=n.value.expression,s=Na(a);if(!s&&!ii(r))return Nr([new ve("","data expressions not supported")]);let o=Ua(a,["zoom"]);if(!o&&!nf(r))return Nr([new ve("","zoom expressions not supported")]);let l=pa(a);if(!l&&!o)return Nr([new ve("",\'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.\')]);if(l instanceof ve)return Nr([l]);if(l instanceof be&&!kl(r))return Nr([new ve("",\'"interpolate" expressions cannot be used with this property\')]);if(!l)return so(s?new an("constant",n.value,i):new an("source",n.value,i));let u=l instanceof be?l.interpolation:void 0;return so(s?new wa("camera",n.value,l.labels,u,i):new wa("composite",n.value,l.labels,u,i))}var hf=class cf{constructor(e,r,i){this.isStateDependent=!1,this.globalStateRefs=new Set,this._globalState=null,lf(r),this._parameters=e,this._specification=i,this._rootKey=r,this._defaultValue=pf(i),this._warningHistory={};let n=af(this._parameters,this._specification);this.kind=n.kind,this.interpolationFactor=n.interpolationFactor,this.zoomStops=n.zoomStops,this.interpolationType=n.interpolationType,this._innerEvaluate=n.evaluate}evaluate(e,r){try{return this._innerEvaluate(e,r)}catch(i){let n=i instanceof Error?i.message:String(i),a=`|${n}`;return this._warningHistory[a]||(this._warningHistory[a]=!0,typeof console<"u"&&console.warn(of(this._rootKey,"",n,this._defaultValue))),this._defaultValue}}static deserialize(e){return new cf(e._parameters,e._rootKey,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification,_rootKey:e._rootKey}}};function um(t,e,r,i){if(qa(t))return new hf(t,e,r);if(ja(t)){let n=uf(t,e,r,i);if(n.result==="error")throw Error(n.value.map(a=>`${a.key}: ${a.message}`).join(", "));return n.value}{let n=t;return r.type==="color"&&typeof t=="string"?n=gt.parse(t):r.type==="padding"&&(typeof t=="number"||Array.isArray(t))?n=Ae.parse(t):r.type==="numberArray"&&(typeof t=="number"||Array.isArray(t))?n=Se.parse(t):r.type==="colorArray"&&(typeof t=="string"||Array.isArray(t))?n=oe.parse(t):r.type==="variableAnchorOffsetCollection"&&Array.isArray(t)?n=De.parse(t):r.type==="projectionDefinition"&&typeof t=="string"&&(n=Dr.parse(t)),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>n}}}function pa(t){let e=null;if(t instanceof Cp)e=pa(t.result);else if(t instanceof Rp){for(let r of t.args)if(e=pa(r),e)break}else(t instanceof vl||t instanceof be)&&t.input instanceof _r&&t.input.name==="zoom"&&(e=t);return e instanceof ve||t.eachChild(r=>{let i=pa(r);i instanceof ve?e=i:!e&&i?e=new ve("",\'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.\'):e&&i&&e!==i&&(e=new ve("",\'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.\'))}),e}function vn(t,e=new Set){return t instanceof Fl&&e.add(t.key),t.eachChild(r=>{vn(r,e)}),e}function hm(t){let e={color:ce,string:Y,number:I,enum:Y,boolean:tt,formatted:yn,padding:za,numberArray:La,colorArray:Qi,projectionDefinition:Ba,resolvedImage:mn,variableAnchorOffsetCollection:Va};return t.type==="array"?Ut(e[t.value]||Z,t.length):e[t.type]}function pf(t){if(t.type==="color"&&qa(t.default))return new gt(0,0,0,0);switch(t.type){case"color":return gt.parse(t.default)||null;case"padding":return Ae.parse(t.default)||null;case"numberArray":return Se.parse(t.default)||null;case"colorArray":return oe.parse(t.default)||null;case"variableAnchorOffsetCollection":return De.parse(t.default)||null;case"projectionDefinition":return Dr.parse(t.default)||null;default:return t.default===void 0?null:t.default}}function ni(t,e){let{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:s,accumulated:o}=t!=null?t:{};return{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:s,accumulated:o,globalState:e}}function cm(t){let e=!1;for(let r of t){let i=ff(r);if(i==="expression")return"expression";i==="legacy"&&(e=!0)}return e?"legacy":"neutral"}function ff(t){if(typeof t=="boolean")return"neutral";if(!Array.isArray(t)||t.length===0)return"legacy";switch(t[0]){case"has":return t.length<2||t[1]==="$id"||t[1]==="$type"?"legacy":t.length===2?"neutral":"expression";case"in":return t.length>=3&&(typeof t[1]!="string"||Array.isArray(t[2]))?"expression":"legacy";case"!in":case"!has":return"legacy";case"==":case"!=":case">":case">=":case"<":case"<=":return t.length!==3||Array.isArray(t[1])||Array.isArray(t[2])?"expression":"legacy";case"none":return"legacy";case"any":case"all":return cm(t.slice(1));default:return"expression"}}function Cl(t){return ff(t)!=="legacy"}function kh(t){return t==="$type"?["geometry-type"]:t==="$id"?["id"]:["get",t]}function pm(t){switch(t[0]){case"==":case"!=":case"<":case"<=":case">":case">=":return t.length!==3||typeof t[1]!="string"?null:[t[0],kh(t[1]),t[2]];case"in":case"!in":{if(t.length<2||typeof t[1]!="string")return null;let e=["in",kh(t[1]),["literal",t.slice(2)]];return t[0]==="!in"?["!",e]:e}case"has":case"!has":{if(t.length!==2||typeof t[1]!="string"||t[1]==="$type"||t[1]==="$id")return null;let e=["has",t[1]];return t[0]==="!has"?["!",e]:e}default:return null}}function df(t){if((t[0]==="<"||t[0]==="<="||t[0]===">"||t[0]===">=")&&t[1]==="$type")return`"$type" cannot be use with operator "${t[0]}"`;let e=pm(t);return e?`Mixing deprecated filter syntax with expression syntax is not supported. Replace ${JSON.stringify(t)} with ${JSON.stringify(e)}.`:`Mixing deprecated filter syntax with expression syntax is not supported. Convert ${JSON.stringify(t)} to expression syntax.`}function Os(t,e,r){let i=r[t];return Array.isArray(i)?Cl(i)?Ml(i,e.concat(t)):{path:e.concat(t),legacyFilter:i}:null}function Ml(t,e=[]){if(!Array.isArray(t)||t.length<1)return null;switch(t[0]){case"all":case"any":case"none":for(let r=1;r<t.length;r++){let i=Os(r,e,t);if(i)return i}break;case"!":{let r=Os(1,e,t);if(r)return r;break}case"case":for(let r=1;r<t.length-1;r+=2){let i=Os(r,e,t);if(i)return i}}return null}function fm(t,e){let r=Ml(t);if(!r||typeof console>"u")return;let i=r.path.map(n=>`[${n}]`).join("");console.warn(`${e}${i}: ${df(r.legacyFilter)}`)}var dm={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function ai(t,e,r){if(t==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Cl(t)?fm(t,e):t=Da(t);let i=er(t,e,dm,r);if(i.result==="error")throw Error(i.value.map(n=>`${n.key}: ${n.message}`).join(", "));return{filter:(n,a,s)=>i.value.evaluate(n,a,{},s),needGeometry:yf(t),getGlobalStateRefs:()=>vn(i.value.expression)}}function ym(t,e){return t<e?-1:+(t>e)}function yf(t){if(!Array.isArray(t))return!1;if(t[0]==="within"||t[0]==="distance")return!0;for(let e=1;e<t.length;e++)if(yf(t[e]))return!0;return!1}function Da(t){if(!t)return!0;let e=t[0];return t.length<=1?e!=="any":e==="=="?Rs(t[1],t[2],"=="):e==="!="?Xn(Rs(t[1],t[2],"==")):e==="<"||e===">"||e==="<="||e===">="?Rs(t[1],t[2],e):e==="any"?mm(t.slice(1)):e==="all"?["all"].concat(t.slice(1).map(Da)):e==="none"?["all"].concat(t.slice(1).map(Da).map(Xn)):e==="in"?Th(t[1],t.slice(2)):e==="!in"?Xn(Th(t[1],t.slice(2))):e==="has"?Ih(t[1]):e!=="!has"||Xn(Ih(t[1]))}function Rs(t,e,r){switch(t){case"$type":return[`filter-type-${r}`,e];case"$id":return[`filter-id-${r}`,e];default:return[`filter-${r}`,t,e]}}function mm(t){return["any"].concat(t.map(Da))}function Th(t,e){if(e.length===0)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(r=>typeof r!=typeof e[0])?["filter-in-large",t,["literal",e.sort(ym)]]:["filter-in-small",t,["literal",e]]}}function Ih(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Xn(t){return["!",t]}function mf(t){let e=t.key,r=t.value;return r?[new E(e,r,"constants have been deprecated as of v8")]:[]}function Dt(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function xr(t){if(Array.isArray(t))return t.map(xr);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){let e={};for(let r in t)e[r]=xr(t[r]);return e}return Dt(t)}function te(t){let e=t.key,r=t.value,i=t.valueSpec||{},n=t.objectElementValidators||{},a=t.style,s=t.styleSpec,o=t.validateSpec,l=[],u=Q(r);if(u!=="object")return[new E(e,r,`object expected, ${u} found`)];for(let h in r){let c=h.split(".")[0],p=ji(i,c)||i["*"],f;if(ji(n,c))f=n[c];else if(ji(i,c)){if(r[h]===void 0)continue;f=o}else if(n["*"])f=n["*"];else if(i["*"])f=o;else{l.push(new E(e,r[h],`unknown property "${h}"`));continue}l=l.concat(f({key:(e&&`${e}.`)+h,value:r[h],valueSpec:p,style:a,styleSpec:s,object:r,objectKey:h,validateSpec:o},r))}for(let h in i)n[h]||i[h].required&&i[h].default===void 0&&r[h]===void 0&&l.push(new E(e,r,`missing required property "${h}"`));return l}function Bl(t){let e=t.value,r=t.valueSpec,i=t.validateSpec,n=t.style,a=t.styleSpec,s=t.key,o=t.arrayElementValidator||i;if(Q(e)!=="array")return[new E(s,e,`array expected, ${Q(e)} found`)];if(r.length&&e.length!==r.length)return[new E(s,e,`array length ${r.length} expected, length ${e.length} found`)];let l={type:r.value,values:r.values};a.$version<7&&(l.function=r.function),Q(r.value)==="object"&&(l=r.value);let u=[];for(let h=0;h<e.length;h++)u=u.concat(o({array:e,arrayIndex:h,value:e[h],valueSpec:l,validateSpec:t.validateSpec,style:n,styleSpec:a,key:`${s}[${h}]`}));return u}function Ga(t){let e=t.key,r=t.value,i=t.valueSpec,n=Q(r);return n==="number"&&r!==r&&(n="NaN"),n==="number"?"minimum"in i&&r<i.minimum?[new E(e,r,`${r} is less than the minimum value ${i.minimum}`)]:"maximum"in i&&r>i.maximum?[new E(e,r,`${r} is greater than the maximum value ${i.maximum}`)]:[]:[new E(e,r,`number expected, ${n} found`)]}function gf(t){let e=t.valueSpec,r=Dt(t.value.type),i,n={},a,s,o=r!=="categorical"&&t.value.property===void 0,l=!o,u=Q(t.value.stops)==="array"&&Q(t.value.stops[0])==="array"&&Q(t.value.stops[0][0])==="object",h=te({key:t.key,value:t.value,valueSpec:t.styleSpec.function,validateSpec:t.validateSpec,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:c,default:d}});return r==="identity"&&o&&h.push(new E(t.key,t.value,\'missing required property "property"\')),r!=="identity"&&!t.value.stops&&h.push(new E(t.key,t.value,\'missing required property "stops"\')),r==="exponential"&&t.valueSpec.expression&&!kl(t.valueSpec)&&h.push(new E(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!ii(t.valueSpec)?h.push(new E(t.key,t.value,"property functions not supported")):o&&!nf(t.valueSpec)&&h.push(new E(t.key,t.value,"zoom functions not supported"))),(r==="categorical"||u)&&t.value.property===void 0&&h.push(new E(t.key,t.value,\'"property" property is required\')),h;function c(y){if(r==="identity")return[new E(y.key,y.value,\'identity function may not have a "stops" property\')];let m=[],g=y.value;return m=m.concat(Bl({key:y.key,value:g,valueSpec:y.valueSpec,validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec,arrayElementValidator:p})),Q(g)==="array"&&g.length===0&&m.push(new E(y.key,g,"array must have at least one stop")),m}function p(y){let m=[],g=y.value,x=y.key;if(Q(g)!=="array")return[new E(x,g,`array expected, ${Q(g)} found`)];if(g.length!==2)return[new E(x,g,`array length 2 expected, length ${g.length} found`)];if(u){if(Q(g[0])!=="object")return[new E(x,g,`object expected, ${Q(g[0])} found`)];if(g[0].zoom===void 0)return[new E(x,g,"object stop key must have zoom")];if(g[0].value===void 0)return[new E(x,g,"object stop key must have value")];if(s&&s>Dt(g[0].zoom))return[new E(x,g[0].zoom,"stop zoom values must appear in ascending order")];Dt(g[0].zoom)!==s&&(s=Dt(g[0].zoom),a=void 0,n={}),m=m.concat(te({key:`${x}[0]`,value:g[0],valueSpec:{zoom:{}},validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec,objectElementValidators:{zoom:Ga,value:f}}))}else m=m.concat(f({key:`${x}[0]`,value:g[0],valueSpec:{},validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec},g));return ja(xr(g[1]))?m.concat([new E(`${x}[1]`,g[1],"expressions are not allowed in function stops.")]):m.concat(y.validateSpec({key:`${x}[1]`,value:g[1],valueSpec:e,validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec}))}function f(y,m){let g=Q(y.value),x=Dt(y.value),v=y.value===null?m:y.value;if(!i)i=g;else if(g!==i)return[new E(y.key,v,`${g} stop domain type must match previous stop domain type ${i}`)];if(g!=="number"&&g!=="string"&&g!=="boolean")return[new E(y.key,v,"stop domain value must be a number, string, or boolean")];if(g!=="number"&&r!=="categorical"){let b=`number expected, ${g} found`;return ii(e)&&r===void 0&&(b+=\'\\nIf you intended to use a categorical function, specify `"type": "categorical"`.\'),[new E(y.key,v,b)]}return r==="categorical"&&g==="number"&&(!isFinite(x)||Math.floor(x)!==x)?[new E(y.key,v,`integer expected, found ${x}`)]:r!=="categorical"&&g==="number"&&a!==void 0&&x<a?[new E(y.key,v,"stop domain values must appear in ascending order")]:(a=x,r==="categorical"&&x in n?[new E(y.key,v,"stop domain values must be unique")]:(n[x]=!0,[]))}function d(y){return y.validateSpec({key:y.key,value:y.value,valueSpec:e,validateSpec:y.validateSpec,style:y.style,styleSpec:y.styleSpec})}}function si(t){let e=(t.expressionContext==="property"?uf:er)(xr(t.value),t.key,t.valueSpec);if(e.result==="error")return e.value.map(i=>new E(`${t.key}${i.key}`,t.value,i.message));let r=e.value.expression||e.value._styleExpression.expression;if(t.expressionContext==="property"&&t.propertyKey==="text-font"&&!r.outputDefined())return[new E(t.key,t.value,`Invalid data expression for "${t.propertyKey}". Output values must be contained as literals within the expression.`)];if(t.expressionContext==="property"&&t.propertyType==="layout"&&!rn(r))return[new E(t.key,t.value,\'"feature-state" data expressions are not supported with layout properties.\')];if(t.expressionContext==="filter"&&!rn(r))return[new E(t.key,t.value,\'"feature-state" data expressions are not supported with filters.\')];if(t.expressionContext&&t.expressionContext.indexOf("cluster")===0){if(!Ua(r,["zoom","feature-state"]))return[new E(t.key,t.value,\'"zoom" and "feature-state" expressions are not supported with cluster properties.\')];if(t.expressionContext==="cluster-initial"&&!Na(r))return[new E(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function gm(t){let e=t.value,r=t.key,i=Q(e);return i==="boolean"?[]:[new E(r,e,`boolean expected, ${i} found`)]}function oo(t){let e=t.key,r=t.value,i=Q(r);return i==="string"?gt.parse(String(r))?[]:[new E(e,r,`color expected, "${r}" found`)]:[new E(e,r,`color expected, ${i} found`)]}function sn(t){let e=t.key,r=t.value,i=t.valueSpec,n=[];return Array.isArray(i.values)?i.values.indexOf(Dt(r))===-1&&n.push(new E(e,r,`expected one of [${i.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(i.values).indexOf(Dt(r))===-1&&n.push(new E(e,r,`expected one of [${Object.keys(i.values).join(", ")}], ${JSON.stringify(r)} found`)),n}function xm(t,e){let r=t;for(let i of e)r=r[i];return r}function vm(t,e){let r=Ml(e);return r?[new E(`${t.key}${r.path.map(i=>`[${i}]`).join("")}`,xm(t.value,r.path),df(r.legacyFilter),null,"warning")]:[]}function Pl(t){let e=xr(t.value);return Cl(e)?[...vm(t,e),...si(nn({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}}))]:xf(t)}function xf(t){let e=t.value,r=t.key;if(Q(e)!=="array")return[new E(r,e,`array expected, ${Q(e)} found`)];let i=t.styleSpec,n,a=[];if(e.length<1)return[new E(r,e,"filter array must have at least 1 element")];switch(a=a.concat(sn({key:`${r}[0]`,value:e[0],valueSpec:i.filter_operator,style:t.style,styleSpec:t.styleSpec})),Dt(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&Dt(e[1])==="$type"&&a.push(new E(r,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":e.length!==3&&a.push(new E(r,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(n=Q(e[1]),n!=="string"&&a.push(new E(`${r}[1]`,e[1],`string expected, ${n} found`)));for(let s=2;s<e.length;s++)n=Q(e[s]),Dt(e[1])==="$type"?a=a.concat(sn({key:`${r}[${s}]`,value:e[s],valueSpec:i.geometry_type,style:t.style,styleSpec:t.styleSpec})):n!=="string"&&n!=="number"&&n!=="boolean"&&a.push(new E(`${r}[${s}]`,e[s],`string, number, or boolean expected, ${n} found`));break;case"any":case"all":case"none":for(let s=1;s<e.length;s++)a=a.concat(xf({key:`${r}[${s}]`,value:e[s],style:t.style,styleSpec:t.styleSpec}));break;case"has":case"!has":n=Q(e[1]),e.length===2?n!=="string"&&a.push(new E(`${r}[1]`,e[1],`string expected, ${n} found`)):a.push(new E(r,e,`filter array for "${e[0]}" operator must have 2 elements`))}return a}function vf(t,e){let r=t.key,i=t.validateSpec,n=t.style,a=t.styleSpec,s=t.value,o=t.objectKey,l=a[`${e}_${t.layerType}`];if(!l)return[];let u=o.match(Tl);if(e==="paint"&&u&&l[u[1]]&&l[u[1]].transition)return i({key:r,value:s,valueSpec:a.transition,style:n,styleSpec:a});let h=t.valueSpec||l[o];if(!h)return[new E(r,s,`unknown property "${o}"`)];let c;if(Q(s)==="string"&&ii(h)&&!h.tokens&&(c=/^{([^}]+)}$/.exec(s)))return[new E(r,s,`"${o}" does not support interpolation syntax\nUse an identity property function instead: \\`{ "type": "identity", "property": ${JSON.stringify(c[1])} }\\`.`)];let p=[];return t.layerType==="symbol"&&o==="text-font"&&qa(xr(s))&&Dt(s.type)==="identity"&&p.push(new E(r,s,\'"text-font" does not support identity functions\')),p.concat(i({key:t.key,value:s,valueSpec:h,style:n,styleSpec:a,expressionContext:"property",propertyType:e,propertyKey:o}))}function bf(t){return vf(t,"paint")}function wf(t){return vf(t,"layout")}function Df(t){var l,u;let e=[],r=t.value,i=t.key,n=t.style,a=t.styleSpec;if(Q(r)!=="object")return[new E(i,r,`object expected, ${Q(r)} found`)];!r.type&&!r.ref&&e.push(new E(i,r,\'either "type" or "ref" is required\'));let s=Dt(r.type),o=Dt(r.ref);if(r.id){let h=Dt(r.id);for(let c=0;c<t.arrayIndex;c++){let p=n.layers[c];Dt(p.id)===h&&e.push(new E(i,r.id,`duplicate layer id "${r.id}", previously used at line ${p.id.__line__}`))}}if("ref"in r){["type","source","source-layer","filter","layout"].forEach(c=>{c in r&&e.push(new E(i,r[c],`"${c}" is prohibited for ref layers`))});let h;n.layers.forEach(c=>{Dt(c.id)===o&&(h=c)}),h?h.ref?e.push(new E(i,r.ref,"ref cannot reference another ref layer")):s=Dt(h.type):e.push(new E(i,r.ref,`ref layer "${o}" not found`))}else if(s!=="background")if(!r.source)e.push(new E(i,r,\'missing required property "source"\'));else{let h=n.sources&&n.sources[r.source],c=h&&Dt(h.type);h?c==="vector"&&s==="raster"?e.push(new E(i,r.source,`layer "${r.id}" requires a raster source`)):c!=="raster-dem"&&s==="hillshade"||c!=="raster-dem"&&s==="color-relief"?e.push(new E(i,r.source,`layer "${r.id}" requires a raster-dem source`)):c==="raster"&&s!=="raster"?e.push(new E(i,r.source,`layer "${r.id}" requires a vector source`)):c==="vector"&&!r["source-layer"]?e.push(new E(i,r,`layer "${r.id}" must specify a "source-layer"`)):c==="raster-dem"&&s!=="hillshade"&&s!=="color-relief"?e.push(new E(i,r.source,"raster-dem source can only be used with layer type \'hillshade\' or \'color-relief\'.")):s==="line"&&r.paint&&r.paint["line-gradient"]&&(c!=="geojson"||!h.lineMetrics)&&e.push(new E(i,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \\`lineMetrics\\` enabled.`)):e.push(new E(i,r.source,`source "${r.source}" not found`))}return s==="raster"&&((l=r.paint)!=null&&l.resampling)&&((u=r.paint)!=null&&u["raster-resampling"])&&e.push(new E(i,r.paint,`layer "${r.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),e=e.concat(te({key:i,value:r,valueSpec:a.layer,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,objectElementValidators:{"*"(){return[]},type(){return t.validateSpec({key:`${i}.type`,value:r.type,valueSpec:a.layer.type,style:t.style,styleSpec:t.styleSpec,validateSpec:t.validateSpec,object:r,objectKey:"type"})},filter:Pl,layout(h){return te({layer:r,key:h.key,value:h.value,style:h.style,styleSpec:h.styleSpec,validateSpec:h.validateSpec,objectElementValidators:{"*"(c){return wf(nn({layerType:s},c))}}})},paint(h){return te({layer:r,key:h.key,value:h.value,style:h.style,styleSpec:h.styleSpec,validateSpec:h.validateSpec,objectElementValidators:{"*"(c){return bf(nn({layerType:s},c))}}})}}})),e}function tr(t){let e=t.value,r=t.key,i=Q(e);return i==="string"?[]:[new E(r,e,`string expected, ${i} found`)]}function bm(t){var c;let e=(c=t.sourceName)!=null?c:"",r=t.value,i=t.styleSpec,n=i.source_raster_dem,a=t.style,s=[],o=Q(r);if(r===void 0)return s;if(o!=="object")return s.push(new E("source_raster_dem",r,`object expected, ${o} found`)),s;let l=Dt(r.encoding)==="custom",u=["redFactor","greenFactor","blueFactor","baseShift"],h=t.value.encoding?`"${t.value.encoding}"`:"Default";for(let p in r)!l&&u.includes(p)?s.push(new E(p,r[p],`In "${e}": "${p}" is only valid when "encoding" is set to "custom". ${h} encoding found`)):n[p]?s=s.concat(t.validateSpec({key:p,value:r[p],valueSpec:n[p],validateSpec:t.validateSpec,style:a,styleSpec:i})):s.push(new E(p,r[p],`unknown property "${p}"`));return s}var Ch={promoteId:wm};function _f(t){let e=t.value,r=t.key,i=t.styleSpec,n=t.style,a=t.validateSpec;if(!e.type)return[new E(r,e,\'"type" is required\')];let s=Dt(e.type),o;switch(s){case"vector":case"raster":return o=te({key:r,value:e,valueSpec:i[`source_${s.replace("-","_")}`],style:t.style,styleSpec:i,objectElementValidators:Ch,validateSpec:a}),o;case"raster-dem":return o=bm({sourceName:r,value:e,style:t.style,styleSpec:i,validateSpec:a}),o;case"geojson":if(o=te({key:r,value:e,valueSpec:i.source_geojson,style:n,styleSpec:i,validateSpec:a,objectElementValidators:Ch}),e.cluster)for(let l in e.clusterProperties){let[u,h]=e.clusterProperties[l],c=typeof u=="string"?[u,["accumulated"],["get",l]]:u;o.push(...si({key:`${r}.${l}.map`,value:h,validateSpec:a,expressionContext:"cluster-map"})),o.push(...si({key:`${r}.${l}.reduce`,value:c,validateSpec:a,expressionContext:"cluster-reduce"}))}return o;case"video":return te({key:r,value:e,valueSpec:i.source_video,style:n,validateSpec:a,styleSpec:i});case"image":return te({key:r,value:e,valueSpec:i.source_image,style:n,validateSpec:a,styleSpec:i});case"canvas":return[new E(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return sn({key:`${r}.type`,value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:n,validateSpec:a,styleSpec:i})}}function wm({key:t,value:e}){if(Q(e)==="string")return tr({key:t,value:e});{let r=[];for(let i in e)r.push(...tr({key:`${t}.${i}`,value:e[i]}));return r}}function Af(t){let e=t.value,r=t.styleSpec,i=r.light,n=t.style,a=[],s=Q(e);if(e===void 0)return a;if(s!=="object")return a=a.concat([new E("light",e,`object expected, ${s} found`)]),a;for(let o in e){let l=o.match(Tl);a=l&&i[l[1]]&&i[l[1]].transition?a.concat(t.validateSpec({key:o,value:e[o],valueSpec:r.transition,validateSpec:t.validateSpec,style:n,styleSpec:r})):i[o]?a.concat(t.validateSpec({key:o,value:e[o],valueSpec:i[o],validateSpec:t.validateSpec,style:n,styleSpec:r})):a.concat([new E(o,e[o],`unknown property "${o}"`)])}return a}function Sf(t){let e=t.value,r=t.styleSpec,i=r.sky,n=t.style,a=Q(e);if(e===void 0)return[];if(a!=="object")return[new E("sky",e,`object expected, ${a} found`)];let s=[];for(let o in e){let l=o.match(Tl);s=l&&i[l[1]]&&i[l[1]].transition?s.concat(t.validateSpec({key:o,value:e[o],valueSpec:r.transition,style:n,styleSpec:r})):i[o]?s.concat(t.validateSpec({key:o,value:e[o],valueSpec:i[o],style:n,styleSpec:r})):s.concat([new E(o,e[o],`unknown property "${o}"`)])}return s}function Ef(t){let e=t.value,r=t.styleSpec,i=r.terrain,n=t.style,a=[],s=Q(e);if(e===void 0)return a;if(s!=="object")return a=a.concat([new E("terrain",e,`object expected, ${s} found`)]),a;for(let o in e)a=i[o]?a.concat(t.validateSpec({key:o,value:e[o],valueSpec:i[o],validateSpec:t.validateSpec,style:n,styleSpec:r})):a.concat([new E(o,e[o],`unknown property "${o}"`)]);return a}function Dm(t){return tr(t).length===0?[]:si(t)}function _m(t){return tr(t).length===0?[]:si(t)}function Am(t){let e=t.key,r=t.value;if(Q(r)==="array"){if(r.length<1||r.length>4)return[new E(e,r,`padding requires 1 to 4 values; ${r.length} values found`)];let i={type:"number"},n=[];for(let a=0;a<r.length;a++)n=n.concat(t.validateSpec({key:`${e}[${a}]`,value:r[a],validateSpec:t.validateSpec,valueSpec:i}));return n}return Ga({key:e,value:r,valueSpec:{}})}function Sm(t){let e=t.key,r=t.value;if(Q(r)==="array"){let i={type:"number"};if(r.length<1)return[new E(e,r,"array length at least 1 expected, length 0 found")];let n=[];for(let a=0;a<r.length;a++)n=n.concat(t.validateSpec({key:`${e}[${a}]`,value:r[a],validateSpec:t.validateSpec,valueSpec:i}));return n}return Ga({key:e,value:r,valueSpec:{}})}function Em(t){let e=t.key,r=t.value;if(Q(r)==="array"){if(r.length<1)return[new E(e,r,"array length at least 1 expected, length 0 found")];let i=[];for(let n=0;n<r.length;n++)i=i.concat(oo({key:`${e}[${n}]`,value:r[n],valueSpec:{}}));return i}return oo({key:e,value:r,valueSpec:{}})}function Fm(t){let e=t.key,r=t.value,i=Q(r),n=t.styleSpec;if(i!=="array"||r.length<1||r.length%2!=0)return[new E(e,r,"variableAnchorOffsetCollection requires a non-empty array of even length")];let a=[];for(let s=0;s<r.length;s+=2)a=a.concat(sn({key:`${e}[${s}]`,value:r[s],valueSpec:n.layout_symbol["text-anchor"]})),a=a.concat(Bl({key:`${e}[${s+1}]`,value:r[s+1],valueSpec:{length:2,value:"number"},validateSpec:t.validateSpec,style:t.style,styleSpec:n}));return a}function Ff(t){let e=[],r=t.value,i=t.key;if(Array.isArray(r)){let n=[],a=[];for(let s in r)r[s].id&&n.includes(r[s].id)&&e.push(new E(i,r,`all the sprites\' ids must be unique, but ${r[s].id} is duplicated`)),n.push(r[s].id),r[s].url&&a.includes(r[s].url)&&e.push(new E(i,r,`all the sprites\' URLs must be unique, but ${r[s].url} is duplicated`)),a.push(r[s].url),e=e.concat(te({key:`${i}[${s}]`,value:r[s],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:t.validateSpec}));return e}return tr({key:i,value:r})}function km(t){let e=t.value,r=t.styleSpec,i=r.projection,n=t.style,a=Q(e);if(e===void 0)return[];if(a!=="object")return[new E("projection",e,`object expected, ${a} found`)];let s=[];for(let o in e)s=i[o]?s.concat(t.validateSpec({key:o,value:e[o],valueSpec:i[o],style:n,styleSpec:r})):s.concat([new E(o,e[o],`unknown property "${o}"`)]);return s}function Tm(t){let e=t.key,r=t.value;r=r instanceof String?r.valueOf():r;let i=Q(r);return i==="array"&&!Cm(r)&&!Im(r)?[new E(e,r,`projection expected, invalid array ${JSON.stringify(r)} found`)]:["array","string"].includes(i)?[]:[new E(e,r,`projection expected, invalid type "${i}" found`)]}function Im(t){return!!["interpolate","step","literal"].includes(t[0])}function Cm(t){return Array.isArray(t)&&t.length===3&&typeof t[0]=="string"&&typeof t[1]=="string"&&typeof t[2]=="number"}function lo(t){return!!t&&t.constructor===Object}function kf(t){return lo(t.value)?[]:[new E(t.key,t.value,`object expected, ${Q(t.value)} found`)]}var Mh=1114111,Mm=/^u\\+(?:([0-9a-f]{1,6})(?:-([0-9a-f]{1,6}))?|([0-9a-f]{0,5}\\?{1,6}))$/i;function Bm(t,e){if(Q(e)!=="string")return[];let r=`${e}`,i=()=>[new E(t,e,\'invalid unicode range, expected a value such as "U+26", "U+0-10FFFF" or "U+4??"\')],n=r.match(Mm);if(!n)return i();let[,a,s,o]=n;if(o!==void 0)return o.length>6?i():[];let l=parseInt(a,16),u=s===void 0?l:parseInt(s,16);return l>Mh||u>Mh?[new E(t,e,"unicode range is out of bounds, the maximum code point is U+10FFFF")]:l>u?[new E(t,e,`unicode range start must not be greater than its end, but ${r} is`)]:[]}function Tf(t){var o,l;let e=(o=t.key)!=null?o:"font-faces",r=t.value,i=t.validateSpec,n=(l=t.styleSpec)!=null?l:pp,a=t.style;if(!lo(r))return[new E(e,r,`object expected, ${Q(r)} found`)];let s=[];for(let u in r){let h=r[u],c=Q(h);if(c==="string")s.push(...tr({key:`${e}.${u}`,value:h}));else if(c==="array"){let p={url:{type:"string",required:!0},"unicode-range":{type:"array",value:"string"}};for(let[f,d]of h.entries()){let y=`${e}.${u}[${f}]`;s.push(...te({key:y,value:d,valueSpec:p,styleSpec:n,style:a,validateSpec:i}));let m=lo(d)?d["unicode-range"]:void 0;if(Q(m)==="array")for(let[g,x]of m.entries())s.push(...Bm(`${y}.unicode-range[${g}]`,x))}}else s.push(new E(`${e}.${u}`,h,`string or array expected, ${c} found`))}return s}var Bh={"*"(){return[]},array:Bl,boolean:gm,number:Ga,color:oo,constants:mf,enum:sn,filter:Pl,function:gf,layer:Df,object:te,source:_f,light:Af,sky:Sf,terrain:Ef,projection:km,projectionDefinition:Tm,string:tr,formatted:Dm,resolvedImage:_m,padding:Am,numberArray:Sm,colorArray:Em,variableAnchorOffsetCollection:Fm,sprite:Ff,state:kf,fontFaces:Tf};function Xi(t){let e=t.value,r=t.valueSpec,i=t.styleSpec;return t.validateSpec=Xi,r.expression&&qa(Dt(e))?gf(t):r.expression&&ja(xr(e))?si(t):r.type&&Bh[r.type]?Bh[r.type](t):te(nn({},t,{valueSpec:r.type?i[r.type]:r}))}function If(t){let e=t.value,r=t.key,i=tr(t);return i.length||(e.indexOf("{fontstack}")===-1&&i.push(new E(r,e,\'"glyphs" url must include a "{fontstack}" token\')),e.indexOf("{range}")===-1&&i.push(new E(r,e,\'"glyphs" url must include a "{range}" token\'))),i}function Qt(t,e=w){let r=[];return r=r.concat(Xi({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,validateSpec:Xi,objectElementValidators:{glyphs:If,"*"(){return[]}}})),t.constants&&(r=r.concat(mf({key:"constants",value:t.constants,style:t,styleSpec:e,validateSpec:Xi}))),Cf(r)}Qt.source=ie(re(_f)),Qt.sprite=ie(re(Ff)),Qt.glyphs=ie(re(If)),Qt.fontFaces=ie(re(Tf)),Qt.light=ie(re(Af)),Qt.sky=ie(re(Sf)),Qt.terrain=ie(re(Ef)),Qt.state=ie(re(kf)),Qt.layer=ie(re(Df)),Qt.filter=ie(re(Pl)),Qt.paintProperty=ie(re(bf)),Qt.layoutProperty=ie(re(wf));function re(t){return function(e){return t(Object.assign({},e,{validateSpec:Xi}))}}function Cf(t){return[].concat(t).sort((e,r)=>e.line-r.line)}function ie(t){return function(...e){return Cf(t.apply(this,e))}}var Pm={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"},zm=class{constructor(t,e,r){this._rootKey=e,this._globalState=r,this.setValue(t)}evaluate(){var t;return(t=this._literalValue)!=null?t:this._compiledValue.evaluate({})}setValue(t){if(t==null||t==="visible"||t==="none"){this._literalValue=t==="none"?"none":"visible",this._compiledValue=void 0,this._globalStateRefs=new Set;return}let e=er(t,this._rootKey,Pm,this._globalState);if(e.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,Error(e.value.map(r=>`${r.key}: ${r.message}`).join(", "));this._literalValue=void 0,this._compiledValue=e.value,this._globalStateRefs=vn(e.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}};function Lm(t,e,r){return new zm(t,e,r)}var Ph=Qt,y5=new Set(Object.keys(w).filter(t=>t.startsWith("source_")).map(t=>t.slice(7).replaceAll("_","-")));function Vm(t,e){let r=!1;for(let i of e){if(i.severity==="warning"){Bt(i.message);continue}t.fire(new ma(Error(i.message))),r=!0}return r}function Om(t,e,r,i){return(i==null?void 0:i.validate)!==!1&&Vm(t,e(je({styleSpec:w},r)))}var uo=class Mf{constructor(e,r,i){let n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;let s=new Int32Array(this.arrayBuffer);e=s[0],r=s[1],i=s[2],this.d=r+2*i;for(let u=0;u<this.d*this.d;u++){let h=s[3+u],c=s[3+u+1];n.push(h===c?null:s.subarray(h,c))}let o=s[3+n.length],l=s[3+n.length+1];this.keys=s.subarray(o,l),this.bboxes=s.subarray(l),this.insert=this._insertReadonly}else{this.d=r+2*i;for(let s=0;s<this.d*this.d;s++)n.push([]);this.keys=[],this.bboxes=[]}this.n=r,this.extent=e,this.padding=i,this.scale=r/e,this.uid=0;let a=i/r*e;this.min=-a,this.max=e+a}insert(e,r,i,n,a){this._forEachCell(r,i,n,a,this._insertCell,this.uid++,void 0,void 0),this.keys.push(e),this.bboxes.push(r),this.bboxes.push(i),this.bboxes.push(n),this.bboxes.push(a)}_insertReadonly(){throw Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(e,r,i,n,a,s){this.cells[a].push(s)}query(e,r,i,n,a){let s=this.min,o=this.max;if(e<=s&&r<=s&&o<=i&&o<=n&&!a)return[...this.keys];{let l=[];return this._forEachCell(e,r,i,n,this._queryCell,l,{},a),l}}_queryCell(e,r,i,n,a,s,o,l){let u=this.cells[a];if(u!==null){let h=this.keys,c=this.bboxes;for(let p of u)if(o[p]===void 0){let f=p*4;(l?l(c[f+0],c[f+1],c[f+2],c[f+3]):e<=c[f+2]&&r<=c[f+3]&&i>=c[f+0]&&n>=c[f+1])?(o[p]=!0,s.push(h[p])):o[p]=!1}}}_forEachCell(e,r,i,n,a,s,o,l){let u=this._convertToCellCoord(e),h=this._convertToCellCoord(r),c=this._convertToCellCoord(i),p=this._convertToCellCoord(n);for(let f=u;f<=c;f++)for(let d=h;d<=p;d++){let y=this.d*d+f;if((!l||l(this._convertFromCellCoord(f),this._convertFromCellCoord(d),this._convertFromCellCoord(f+1),this._convertFromCellCoord(d+1)))&&a.call(this,e,r,i,n,y,s,o,l))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let e=this.cells,r=3+this.cells.length+1+1,i=0;for(let s of this.cells)i+=s.length;let n=new Int32Array(r+i+this.keys.length+this.bboxes.length);n[0]=this.extent,n[1]=this.n,n[2]=this.padding;let a=r;for(let s=0;s<e.length;s++){let o=e[s];n[3+s]=a,n.set(o,a),a+=o.length}return n[3+e.length]=a,n.set(this.keys,a),a+=this.keys.length,n[3+e.length+1]=a,n.set(this.bboxes,a),a+=this.bboxes.length,n.buffer}static serialize(e,r){let i=e.toArrayBuffer();return r&&r.push(i),{buffer:i}}static deserialize(e){return new Mf(e.buffer)}},Ce={};function C(t,e,r={}){if(Ce[t])throw Error(`${t} is already registered.`);Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),Ce[t]={klass:e,omit:r.omit||[],shallow:r.shallow||[]}}C("Object",Object),C("Set",Set),C("TransferableGridIndex",uo),C("Color",gt),C("Error",Error),C("AJAXError",ya),C("ResolvedImage",_e),C("StylePropertyFunction",hf),C("StyleExpression",Il,{omit:["_evaluator"]}),C("ZoomDependentExpression",wa),C("ZoomConstantExpression",an),C("CompoundExpression",_r,{omit:["_evaluate"]});for(let t in Yr)Yr[t]._classRegistryKey||C(`Expression_${t}`,Yr[t]);function Bf(t){var e;return t&&typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||((e=t.constructor)==null?void 0:e.name)==="ArrayBuffer")}function zl(t){let e=t.constructor;return t.$name||e._classRegistryKey}function Rm(t){if(typeof t!="object"||!t)return!1;let e=zl(t);return e&&e!=="Object"}function Pf(t){return!Rm(t)&&(t==null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof Blob||t instanceof Error||Bf(t)||Ca(t)||ArrayBuffer.isView(t)||t instanceof ImageData)}function Yi(t,e){if(Pf(t))return(Bf(t)||Ca(t))&&e&&e.push(t),ArrayBuffer.isView(t)&&e&&e.push(t.buffer),t instanceof ImageData&&e&&e.push(t.data.buffer),t;if(Array.isArray(t)){let a=[];for(let s of t)a.push(Yi(s,e));return a}if(typeof t!="object")throw Error(`can\'t serialize object of type ${typeof t}`);let r=zl(t);if(!r)throw Error(`can\'t serialize object of unregistered class ${t.constructor.name}`);if(!Ce[r])throw Error(`${r} is not registered.`);let{klass:i}=Ce[r],n=i.serialize?i.serialize(t,e):{};if(i.serialize){if(n===(e==null?void 0:e[e.length-1]))throw Error("statically serialized object won\'t survive transfer of $name property")}else{for(let a in t){if(!t.hasOwnProperty(a)||Ce[r].omit.includes(a))continue;let s=t[a];s!==void 0&&(n[a]=Ce[r].shallow.includes(a)?s:Yi(s,e))}t instanceof Error&&(n.message=t.message)}if(n.$name)throw Error("$name property is reserved for worker serialization logic.");return r!=="Object"&&(n.$name=r),n}function Wi(t){if(Pf(t))return t;if(Array.isArray(t))return t.map(Wi);if(typeof t!="object")throw Error(`can\'t deserialize object of type ${typeof t}`);let e=zl(t)||"Object";if(!Ce[e])throw Error(`can\'t deserialize unregistered class ${e}`);let{klass:r}=Ce[e];if(!r)throw Error(`can\'t deserialize unregistered class ${e}`);if(r.deserialize)return r.deserialize(t);let i=Object.create(r.prototype);for(let n of Object.keys(t)){if(n==="$name")continue;let a=t[n];i[n]=Ce[e].shallow.includes(n)?a:Wi(a)}return i}var zh=class{constructor(){this.first=!0}update(t,e){let r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=r,!0))}},st=class{constructor(t,e){this.zoom=t,e?(this.now=e.now||0,this.fadeDuration=e.fadeDuration||0,this.zoomHistory=e.zoomHistory||new zh,this.transition=e.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new zh,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let t=this.zoom,e=t-Math.floor(t),r=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}}},$m="-transition",Xa=class{constructor(t,e,r,i){this.property=t,this.value=e,this.expression=um(e===void 0?t.specification.default:e,r,t.specification,i)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)}},ho=class{constructor(t,e,r){this.property=t,this.value=new Xa(t,void 0,e,r)}transitioned(t,e){return new Lh(this.property,this.value,e,Gt({},t.transition,this.transition),t.now)}untransitioned(){return new Lh(this.property,this.value,null,{},0)}},Nm=class{constructor(t,e,r){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues),this._globalState=r,this._rootKey=e}_propertyRootKey(t){return`${this._rootKey}.${String(t)}`}hasProperty(t){return t in this._properties.defaultTransitionablePropertyValues}getValue(t){return He(this._values[t].value.value)}setValue(t,e){Object.hasOwn(this._values,t)||(this._values[t]=new ho(this._values[t].property,this._propertyRootKey(t),this._globalState)),this._values[t].value=new Xa(this._values[t].property,e===null?void 0:He(e),this._propertyRootKey(t),this._globalState)}getTransition(t){return He(this._values[t].transition)}setTransition(t,e){Object.hasOwn(this._values,t)||(this._values[t]=new ho(this._values[t].property,this._propertyRootKey(t),this._globalState)),this._values[t].transition=He(e)||void 0}serialize(){let t={};for(let e of Object.keys(this._values)){let r=this.getValue(e);r!==void 0&&(t[e]=r);let i=this.getTransition(e);i!==void 0&&(t[`${e}${$m}`]=i)}return t}transitioned(t,e){let r=new Vh(this._properties);for(let i of Object.keys(this._values))r._values[i]=this._values[i].transitioned(t,e._values[i]);return r}untransitioned(){let t=new Vh(this._properties);for(let e of Object.keys(this._values))t._values[e]=this._values[e].untransitioned();return t}},Lh=class{constructor(t,e,r,i,n){this.property=t,this.value=e,this.begin=n+i.delay||0,this.end=this.begin+i.duration||0,t.specification.transition&&(i.delay||i.duration)&&(this.prior=r)}possiblyEvaluate(t,e,r){let i=t.now||0,n=this.value.possiblyEvaluate(t,e,r),a=this.prior;if(!a)return n;if(i>this.end||this.value.isDataDriven())return this.prior=null,n;if(i<this.begin)return a.possiblyEvaluate(t,e,r);{let s=(i-this.begin)/(this.end-this.begin);return this.property.interpolate(a.possiblyEvaluate(t,e,r),n,S1(s))}}},Vh=class{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)}possiblyEvaluate(t,e,r){let i=new Ya(this._properties);for(let n of Object.keys(this._values))i._values[n]=this._values[n].possiblyEvaluate(t,e,r);return i}hasTransition(){for(let t of Object.keys(this._values))if(this._values[t].prior)return!0;return!1}},Um=class{constructor(t,e,r){this._properties=t,this._values=Object.create(t.defaultPropertyValues),this._globalState=r,this._rootKey=e}_propertyRootKey(t){return`${this._rootKey}.${String(t)}`}hasValue(t){return this._values[t].value!==void 0}hasProperty(t){return t in this._properties.defaultPropertyValues}getValue(t){return He(this._values[t].value)}setValue(t,e){this._values[t]=new Xa(this._values[t].property,e===null?void 0:He(e),this._propertyRootKey(t),this._globalState)}serialize(){let t={};for(let e of Object.keys(this._values)){let r=this.getValue(e);r!==void 0&&(t[e]=r)}return t}possiblyEvaluate(t,e,r){let i=new Ya(this._properties);for(let n of Object.keys(this._values))i._values[n]=this._values[n].possiblyEvaluate(t,e,r);return i}},se=class{constructor(t,e,r){this.property=t,this.value=e,this.parameters=r}isConstant(){return this.value.kind==="constant"}constantOr(t){return this.value.kind==="constant"?this.value.value:t}evaluate(t,e,r,i){return this.property.evaluate(this.value,this.parameters,t,e,r,i)}},Ya=class{constructor(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)}get(t){return this._values[t]}};function Oh(t){if(Array.isArray(t))return t.length;let e=t==null?void 0:t.values;return Array.isArray(e)?e.length:void 0}function zf(t,e){let r=Oh(t),i=Oh(e);return r!==void 0&&i!==void 0&&r!==i}var V=class{constructor(t,e){this.specification=t,this.name=e}possiblyEvaluate(t,e){if(t.isDataDriven())throw Error("Value should not be data driven");return t.expression.evaluate(e)}interpolate(t,e,r){if(zf(t,e))return Bt(`Property "${this.name}" is trying to interpolate arrays of different lengths. Rendering may \'jump\'.`),e;let i=this.specification.type,n=gr[i];return n?n(t,e,r):t}},N=class{constructor(t,e,r){this.specification=t,this.name=e,this.overrides=r}possiblyEvaluate(t,e,r,i){return t.expression.kind==="constant"||t.expression.kind==="camera"?new se(this,{kind:"constant",value:t.expression.evaluate(e,null,{},r,i)},e):new se(this,t.expression,e)}interpolate(t,e,r){if(t.value.kind!=="constant"||e.value.kind!=="constant")return t;if(t.value.value===void 0||e.value.value===void 0)return new se(this,{kind:"constant",value:void 0},t.parameters);if(zf(t.value.value,e.value.value))return Bt(`Property "${this.name}" is trying to interpolate arrays of different lengths. Rendering may \'jump\'.`),e;let i=this.specification.type,n=gr[i];if(n){let a=n(t.value.value,e.value.value,r);return new se(this,{kind:"constant",value:a},t.parameters)}return t}evaluate(t,e,r,i,n,a){return t.kind==="constant"?t.value:t.evaluate(e,r,i,n,a)}},on=class extends N{possiblyEvaluate(t,e,r,i){if(t.value===void 0)return new se(this,{kind:"constant",value:void 0},e);if(t.expression.kind==="constant"){let n=t.expression.evaluate(e,null,{},r,i),a=t.property.specification.type==="resolvedImage"&&typeof n!="string"?n.name:n,s=this._calculate(a,a,a,e);return new se(this,{kind:"constant",value:s},e)}if(t.expression.kind==="camera"){let n=this._calculate(t.expression.evaluate({zoom:e.zoom-1}),t.expression.evaluate({zoom:e.zoom}),t.expression.evaluate({zoom:e.zoom+1}),e);return new se(this,{kind:"constant",value:n},e)}return new se(this,t.expression,e)}evaluate(t,e,r,i,n,a){if(t.kind==="source"){let s=t.evaluate(e,r,i,n,a);return this._calculate(s,s,s,e)}return t.kind==="composite"?this._calculate(t.evaluate({zoom:Math.floor(e.zoom)-1},r,i),t.evaluate({zoom:Math.floor(e.zoom)},r,i),t.evaluate({zoom:Math.floor(e.zoom)+1},r,i),e):t.value}_calculate(t,e,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}}interpolate(t){return t}},Lf=class{constructor(t,e){this.specification=t,this.name=e}possiblyEvaluate(t,e,r,i){if(t.value!==void 0){if(t.expression.kind==="constant"){let n=t.expression.evaluate(e,null,{},r,i);return this._calculate(n,n,n,e)}return this._calculate(t.expression.evaluate(new st(Math.floor(e.zoom-1),e)),t.expression.evaluate(new st(Math.floor(e.zoom),e)),t.expression.evaluate(new st(Math.floor(e.zoom+1),e)),e)}}_calculate(t,e,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}}interpolate(t){return t}},Wa=class{constructor(t,e){this.specification=t,this.name=e}possiblyEvaluate(t,e,r,i){return!!t.expression.evaluate(e,null,{},r,i)}interpolate(){return!1}},Xt=class{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let e in t){let r=t[e];r.specification.overridable&&this.overridableProperties.push(e);let i=this.defaultPropertyValues[e]=new Xa(r,void 0,r.name,void 0),n=this.defaultTransitionablePropertyValues[e]=new ho(r,r.name,void 0);this.defaultTransitioningPropertyValues[e]=n.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=i.possiblyEvaluate({})}}};C("DataDrivenProperty",N),C("DataConstantProperty",V),C("CrossFadedDataDrivenProperty",on),C("CrossFadedProperty",Lf),C("ColorRampProperty",Wa);var Rh=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",$s=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?",de=class extends O1{constructor(t,e,r){if(super(),this.id=t.id,this.type=t.type,this._globalState=r,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=Lm(this.visibility,`layers[${this.id}].layout.visibility`,r),t.type!=="custom"&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,t.type!=="background"&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter,this._featureFilter=ai(t.filter,`layers[${this.id}].filter`,r)),e.layout&&(this._unevaluatedLayout=new Um(e.layout,`layers[${this.id}].layout`,r)),e.paint)){this._transitionablePaint=new Nm(e.paint,`layers[${this.id}].paint`,r);for(let i in t.paint)this.setPaintProperty(i,t.paint[i],{validate:!1});for(let i in t.layout)this.setLayoutProperty(i,t.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ya(e.paint)}}setFilter(t){this.filter=t,this._featureFilter=ai(t,`layers[${this.id}].filter`,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){var e;if(t==="visibility")return this.visibility;if((e=this._transitionablePaint)!=null&&e.hasProperty(t))throw Error(t+Rh);if(!this._unevaluatedLayout)throw Error(`Cannot get layout property "${t}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(t)}getLayoutAffectingGlobalStateRefs(){let t=new Set;for(let e of this._visibilityExpression.getGlobalStateRefs())t.add(e);if(this._unevaluatedLayout)for(let e in this._unevaluatedLayout._values){let r=this._unevaluatedLayout._values[e];for(let i of r.getGlobalStateRefs())t.add(i)}for(let e of this._featureFilter.getGlobalStateRefs())t.add(e);return t}getPaintAffectingGlobalStateRefs(){var e;let t=new globalThis.Map;if(this._transitionablePaint)for(let r in this._transitionablePaint._values){let i=this._transitionablePaint._values[r].value;for(let n of i.getGlobalStateRefs()){let a=(e=t.get(n))!=null?e:[];a.push({name:r,value:i.value}),t.set(n,a)}}return t}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(t,e,r={}){var i;if(t==="visibility"){this.visibility=e,this._visibilityExpression.setValue(e),this.recalculateVisibility();return}if((i=this._transitionablePaint)!=null&&i.hasProperty(t)){this.fire(new ma(Error(t+Rh)));return}e!=null&&this._validate(Ph.layoutProperty,`layers.${this.id}.layout.${t}`,t,e,r)||this._unevaluatedLayout.setValue(t,e)}getPaintProperty(t){var e,r;if(t.endsWith("-transition")){let i=t.slice(0,-11);if(i==="visibility"||(e=this._unevaluatedLayout)!=null&&e.hasProperty(i))throw Error(t+$s);return this._transitionablePaint.getTransition(i)}if(t==="visibility"||(r=this._unevaluatedLayout)!=null&&r.hasProperty(t))throw Error(t+$s);return this._transitionablePaint.getValue(t)}setPaintProperty(t,e,r={}){var i;if(t==="visibility"||(i=this._unevaluatedLayout)!=null&&i.hasProperty(t))return this.fire(new ma(Error(t+$s))),!1;if(e!=null&&this._validate(Ph.paintProperty,`layers.${this.id}.paint.${t}`,t,e,r))return!1;if(t.endsWith("-transition"))return this._transitionablePaint.setTransition(t.slice(0,-11),e||void 0),!1;{let n=this._transitionablePaint._values[t],a=n.property.specification["property-type"]==="cross-faded-data-driven",s=n.value.isDataDriven(),o=n.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);let l=this._transitionablePaint._values[t].value;return l.isDataDriven()||s||a||this._handleOverridablePaintPropertyUpdate(t,o,l)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,e,r){return!1}isHidden(t=this.minzoom,e=!1){return this.minzoom&&t<(e?Math.floor(this.minzoom):this.minzoom)||this.maxzoom&&t>=this.maxzoom?!0:this._evaluatedVisibility==="none"}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)}serialize(){var e,r;let t={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:(e=this._unevaluatedLayout)==null?void 0:e.serialize(),paint:(r=this._transitionablePaint)==null?void 0:r.serialize()};return this.visibility&&(t.layout||(t.layout={}),t.layout.visibility=this.visibility),T1(t,(i,n)=>i!==void 0&&!(n==="layout"&&!Object.keys(i).length)&&!(n==="paint"&&!Object.keys(i).length))}_validate(t,e,r,i,n={}){return Om(this,t,{key:e,layerType:this.type,objectKey:r,value:i},n)}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let t in this.paint._values){let e=this.paint.get(t);if(e instanceof se&&ii(e.property.specification)&&(e.value.kind==="source"||e.value.kind==="composite")&&e.value.isStateDependent)return!0}return!1}},qm,jm=()=>qm||(qm=new Xt({"raster-opacity":new V(w.paint_raster["raster-opacity"],"raster-opacity"),"raster-hue-rotate":new V(w.paint_raster["raster-hue-rotate"],"raster-hue-rotate"),"raster-brightness-min":new V(w.paint_raster["raster-brightness-min"],"raster-brightness-min"),"raster-brightness-max":new V(w.paint_raster["raster-brightness-max"],"raster-brightness-max"),"raster-saturation":new V(w.paint_raster["raster-saturation"],"raster-saturation"),"raster-contrast":new V(w.paint_raster["raster-contrast"],"raster-contrast"),resampling:new V(w.paint_raster.resampling,"resampling"),"raster-resampling":new V(w.paint_raster["raster-resampling"],"raster-resampling"),"raster-fade-duration":new V(w.paint_raster["raster-fade-duration"],"raster-fade-duration")})),Gm={get paint(){return jm()}};var Xm=class extends de{constructor(t,e){super(t,Gm,e)}},Ym={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},bn=class{constructor(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}},xt=class{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){let e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e}_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(t){this.reserve(t),this.length=t}reserve(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(this.capacity*5),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}}_refreshViews(){throw Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}};function At(t,e=1){let r=0,i=0;return{members:t.map(n=>{let a=Wm(n.type),s=r=$h(r,Math.max(e,a)),o=n.components||1;return i=Math.max(i,a),r+=a*o,{name:n.name,type:n.type,components:o,offset:s}}),size:$h(r,Math.max(i,e)),alignment:e}}function Wm(t){return Ym[t].BYTES_PER_ELEMENT}function $h(t,e){return Math.ceil(t/e)*e}var ln=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e){let r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){let i=t*2;return this.int16[i+0]=e,this.int16[i+1]=r,t}};ln.prototype.bytesPerElement=4,C("StructArrayLayout2i4",ln);var co=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*3;return this.int16[n+0]=e,this.int16[n+1]=r,this.int16[n+2]=i,t}};co.prototype.bytesPerElement=6,C("StructArrayLayout3i6",co);var Nh=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)}emplace(t,e,r,i,n){let a=t*4;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=i,this.int16[a+3]=n,t}};Nh.prototype.bytesPerElement=8,C("StructArrayLayout4i8",Nh);var po=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*6;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=i,this.int16[o+3]=n,this.int16[o+4]=a,this.int16[o+5]=s,t}};po.prototype.bytesPerElement=12,C("StructArrayLayout2i4i12",po);var fo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*4,l=t*8;return this.int16[o+0]=e,this.int16[o+1]=r,this.uint8[l+4]=i,this.uint8[l+5]=n,this.uint8[l+6]=a,this.uint8[l+7]=s,t}};fo.prototype.bytesPerElement=8,C("StructArrayLayout2i4ub8",fo);var un=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e){let r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){let i=t*2;return this.float32[i+0]=e,this.float32[i+1]=r,t}};un.prototype.bytesPerElement=8,C("StructArrayLayout2f8",un);var yo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a,s,o,l,u){let h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,i,n,a,s,o,l,u)}emplace(t,e,r,i,n,a,s,o,l,u,h){let c=t*10;return this.uint16[c+0]=e,this.uint16[c+1]=r,this.uint16[c+2]=i,this.uint16[c+3]=n,this.uint16[c+4]=a,this.uint16[c+5]=s,this.uint16[c+6]=o,this.uint16[c+7]=l,this.uint16[c+8]=u,this.uint16[c+9]=h,t}};yo.prototype.bytesPerElement=20,C("StructArrayLayout10ui20",yo);var mo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a,s,o){let l=this.length;return this.resize(l+1),this.emplace(l,t,e,r,i,n,a,s,o)}emplace(t,e,r,i,n,a,s,o,l){let u=t*8;return this.uint16[u+0]=e,this.uint16[u+1]=r,this.uint16[u+2]=i,this.uint16[u+3]=n,this.uint16[u+4]=a,this.uint16[u+5]=s,this.uint16[u+6]=o,this.uint16[u+7]=l,t}};mo.prototype.bytesPerElement=16,C("StructArrayLayout8ui16",mo);var go=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a,s,o,l,u,h,c,p){let f=this.length;return this.resize(f+1),this.emplace(f,t,e,r,i,n,a,s,o,l,u,h,c,p)}emplace(t,e,r,i,n,a,s,o,l,u,h,c,p,f){let d=t*14,y=t*7;return this.int16[d+0]=e,this.int16[d+1]=r,this.int16[d+2]=i,this.int16[d+3]=n,this.uint16[d+4]=a,this.uint16[d+5]=s,this.uint16[d+6]=o,this.uint16[d+7]=l,this.int16[d+8]=u,this.int16[d+9]=h,this.int16[d+10]=c,this.int16[d+11]=p,this.float32[y+6]=f,t}};go.prototype.bytesPerElement=28,C("StructArrayLayout4i4ui4i1f28",go);var xo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*3;return this.float32[n+0]=e,this.float32[n+1]=r,this.float32[n+2]=i,t}};xo.prototype.bytesPerElement=12,C("StructArrayLayout3f12",xo);var vo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){let e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){let r=t*1;return this.uint32[r+0]=e,t}};vo.prototype.bytesPerElement=4,C("StructArrayLayout1ul4",vo);var bo=class extends xt{_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(t,e,r,i,n,a,s,o,l){let u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,i,n,a,s,o,l)}emplace(t,e,r,i,n,a,s,o,l,u){let h=t*10,c=t*5;return this.int16[h+0]=e,this.int16[h+1]=r,this.int16[h+2]=i,this.int16[h+3]=n,this.int16[h+4]=a,this.int16[h+5]=s,this.uint32[c+3]=o,this.uint16[h+8]=l,this.uint16[h+9]=u,t}};bo.prototype.bytesPerElement=20,C("StructArrayLayout6i1ul2ui20",bo);var wo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*6;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=i,this.int16[o+3]=n,this.int16[o+4]=a,this.int16[o+5]=s,t}};wo.prototype.bytesPerElement=12,C("StructArrayLayout2i2i2i12",wo);var Uh=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n){let a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,i,n)}emplace(t,e,r,i,n,a){let s=t*4,o=t*8;return this.float32[s+0]=e,this.float32[s+1]=r,this.float32[s+2]=i,this.int16[o+6]=n,this.int16[o+7]=a,t}};Uh.prototype.bytesPerElement=16,C("StructArrayLayout2f1f2i16",Uh);var Do=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,e,r,i,n,a){let s=this.length;return this.resize(s+1),this.emplace(s,t,e,r,i,n,a)}emplace(t,e,r,i,n,a,s){let o=t*16,l=t*4,u=t*8;return this.uint8[o+0]=e,this.uint8[o+1]=r,this.float32[l+1]=i,this.float32[l+2]=n,this.int16[u+6]=a,this.int16[u+7]=s,t}};Do.prototype.bytesPerElement=16,C("StructArrayLayout2ub2f2i16",Do);var _o=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*3;return this.uint16[n+0]=e,this.uint16[n+1]=r,this.uint16[n+2]=i,t}};_o.prototype.bytesPerElement=6,C("StructArrayLayout3ui6",_o);var Ao=class extends xt{_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(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g){let x=this.length;return this.resize(x+1),this.emplace(x,t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g)}emplace(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x){let v=t*26,b=t*13,D=t*52;return this.int16[v+0]=e,this.int16[v+1]=r,this.uint16[v+2]=i,this.uint16[v+3]=n,this.uint32[b+2]=a,this.uint32[b+3]=s,this.uint32[b+4]=o,this.uint16[v+10]=l,this.uint16[v+11]=u,this.uint16[v+12]=h,this.float32[b+7]=c,this.float32[b+8]=p,this.uint8[D+36]=f,this.uint8[D+37]=d,this.uint8[D+38]=y,this.uint32[b+10]=m,this.int16[v+22]=g,this.float32[b+12]=x,t}};Ao.prototype.bytesPerElement=52,C("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i1f52",Ao);var So=class extends xt{_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(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,D,A,_,S,k,z,O,P){let L=this.length;return this.resize(L+1),this.emplace(L,t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,D,A,_,S,k,z,O,P)}emplace(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,D,A,_,S,k,z,O,P,L){let F=t*34,$=t*17;return this.int16[F+0]=e,this.int16[F+1]=r,this.int16[F+2]=i,this.int16[F+3]=n,this.int16[F+4]=a,this.int16[F+5]=s,this.int16[F+6]=o,this.int16[F+7]=l,this.uint16[F+8]=u,this.uint16[F+9]=h,this.uint16[F+10]=c,this.uint16[F+11]=p,this.uint16[F+12]=f,this.uint16[F+13]=d,this.uint16[F+14]=y,this.uint16[F+15]=m,this.uint16[F+16]=g,this.uint16[F+17]=x,this.uint16[F+18]=v,this.uint16[F+19]=b,this.uint16[F+20]=D,this.uint16[F+21]=A,this.uint16[F+22]=_,this.uint32[$+12]=S,this.float32[$+13]=k,this.float32[$+14]=z,this.uint16[F+30]=O,this.uint16[F+31]=P,this.float32[$+16]=L,t}};So.prototype.bytesPerElement=68,C("StructArrayLayout8i15ui1ul2f2ui1f68",So);var _a=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){let e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){let r=t*1;return this.float32[r+0]=e,t}};_a.prototype.bytesPerElement=4,C("StructArrayLayout1f4",_a);var Eo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*6,a=t*3;return this.uint16[n+0]=e,this.float32[a+1]=r,this.float32[a+2]=i,t}};Eo.prototype.bytesPerElement=12,C("StructArrayLayout1ui2f12",Eo);var Fo=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e,r){let i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)}emplace(t,e,r,i){let n=t*2,a=t*4;return this.uint32[n+0]=e,this.uint16[a+2]=r,this.uint16[a+3]=i,t}};Fo.prototype.bytesPerElement=8,C("StructArrayLayout1ul2ui8",Fo);var ko=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,e){let r=this.length;return this.resize(r+1),this.emplace(r,t,e)}emplace(t,e,r){let i=t*2;return this.uint16[i+0]=e,this.uint16[i+1]=r,t}};ko.prototype.bytesPerElement=4,C("StructArrayLayout2ui4",ko);var qh=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){let e=this.length;return this.resize(e+1),this.emplace(e,t)}emplace(t,e){let r=t*1;return this.uint16[r+0]=e,t}};qh.prototype.bytesPerElement=2,C("StructArrayLayout1ui2",qh);var To=class extends xt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,e,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)}emplace(t,e,r,i,n){let a=t*4;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=i,this.float32[a+3]=n,t}};To.prototype.bytesPerElement=16,C("StructArrayLayout4f16",To);var Vf=class extends bn{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 B(this.anchorPointX,this.anchorPointY)}};Vf.prototype.size=20;var Ll=class extends bo{get(t){return new Vf(this,t)}};C("CollisionBoxArray",Ll);var Of=class extends bn{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(t){this._structArray.uint8[this._pos1+37]=t}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(t){this._structArray.uint8[this._pos1+38]=t}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(t){this._structArray.uint32[this._pos4+10]=t}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}get heightOffset(){return this._structArray.float32[this._pos4+12]}};Of.prototype.size=52;var Rf=class extends Ao{get(t){return new Of(this,t)}};C("PlacedSymbolArray",Rf);var $f=class extends bn{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(t){this._structArray.uint32[this._pos4+12]=t}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]}get heightOffset(){return this._structArray.float32[this._pos4+16]}};$f.prototype.size=68;var Nf=class extends So{get(t){return new $f(this,t)}};C("SymbolInstanceArray",Nf);var Uf=class extends _a{getoffsetX(t){return this.float32[t*1+0]}};C("GlyphOffsetArray",Uf);var qf=class extends co{getx(t){return this.int16[t*3+0]}gety(t){return this.int16[t*3+1]}gettileUnitDistanceFromAnchor(t){return this.int16[t*3+2]}};C("SymbolLineVertexArray",qf);var jf=class extends bn{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]}};jf.prototype.size=12;var Gf=class extends Eo{get(t){return new jf(this,t)}};C("TextAnchorOffsetArray",Gf);var Xf=class extends bn{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]}};Xf.prototype.size=8;var Yf=class extends Fo{get(t){return new Xf(this,t)}};C("FeatureIndexArray",Yf);var Zm=class extends ln{};var Hm=class extends ln{},Km=class extends ln{},Jm=class extends po{},Qm=class extends fo{},tg=class extends un{},Vr=class extends yo{},jh=class extends mo{},eg=class extends go{},rg=class extends xo{},ig=class extends vo{},Gh=class extends wo{};var ng=class extends Do{};var wn=class extends _o{},Io=class extends ko{};var Co=At([{name:"a_pos",components:2,type:"Int16"}],4),ag=Co.members;Co.size,Co.alignment;var ee=class Ur{constructor(e=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=e}prepareSegment(e,r,i,n){let a=this.segments[this.segments.length-1];return e>Ur.MAX_VERTEX_ARRAY_LENGTH&&Bt(`Max vertices per segment is ${Ur.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}. Consider using the \\`fillLargeMeshArrays\\` function if you require meshes with more than ${Ur.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!a||a.vertexLength+e>Ur.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==n?this.createNewSegment(r,i,n):a}createNewSegment(e,r,i){let n={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0,vaos:{}};return i!==void 0&&(n.sortKey=i),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(n),n}getOrCreateLatestSegment(e,r,i){return this.prepareSegment(0,e,r,i)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let e of this.segments)for(let r in e.vaos)e.vaos[r].destroy()}static simpleSegment(e,r,i,n){return new Ur([{vertexOffset:e,primitiveOffset:r,vertexLength:i,primitiveLength:n,vaos:{},sortKey:0}])}};ee.MAX_VERTEX_ARRAY_LENGTH=2**16-1,C("SegmentVector",ee);function Xh(t,e){return t=Ji(Math.floor(t),0,255),e=Ji(Math.floor(e),0,255),256*t+e}var sg=At([{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"}]),og=At([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]),lg=fl(((t,e)=>{function r(i,n){for(var a=i.length&3,s=i.length-a,o=n,l,u=3432918353,h=461845907,c,p=0;p<s;)c=i.charCodeAt(p)&255|(i.charCodeAt(++p)&255)<<8|(i.charCodeAt(++p)&255)<<16|(i.charCodeAt(++p)&255)<<24,++p,c=(c&65535)*u+(((c>>>16)*u&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(c&65535)*h+(((c>>>16)*h&65535)<<16)&4294967295,o^=c,o=o<<13|o>>>19,l=(o&65535)*5+(((o>>>16)*5&65535)<<16)&4294967295,o=(l&65535)+27492+(((l>>>16)+58964&65535)<<16);switch(c=0,a){case 3:c^=(i.charCodeAt(p+2)&255)<<16;case 2:c^=(i.charCodeAt(p+1)&255)<<8;case 1:c^=i.charCodeAt(p)&255,c=(c&65535)*u+(((c>>>16)*u&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(c&65535)*h+(((c>>>16)*h&65535)<<16)&4294967295,o^=c}return o^=i.length,o^=o>>>16,o=(o&65535)*2246822507+(((o>>>16)*2246822507&65535)<<16)&4294967295,o^=o>>>13,o=(o&65535)*3266489909+(((o>>>16)*3266489909&65535)<<16)&4294967295,o^=o>>>16,o>>>0}e!==void 0&&(e.exports=r)})),ug=fl(((t,e)=>{function r(i,n){for(var a=i.length,s=n^a,o=0,l;a>=4;)l=i.charCodeAt(o)&255|(i.charCodeAt(++o)&255)<<8|(i.charCodeAt(++o)&255)<<16|(i.charCodeAt(++o)&255)<<24,l=(l&65535)*1540483477+(((l>>>16)*1540483477&65535)<<16),l^=l>>>24,l=(l&65535)*1540483477+(((l>>>16)*1540483477&65535)<<16),s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16)^l,a-=4,++o;switch(a){case 3:s^=(i.charCodeAt(o+2)&255)<<16;case 2:s^=(i.charCodeAt(o+1)&255)<<8;case 1:s^=i.charCodeAt(o)&255,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16)}return s^=s>>>13,s=(s&65535)*1540483477+(((s>>>16)*1540483477&65535)<<16),s^=s>>>15,s>>>0}e.exports=r})),Mo=h1(fl(((t,e)=>{var r=lg(),i=ug();e.exports=r,e.exports.murmur3=r,e.exports.murmur2=i}))(),1),Wf=class Zf{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,r,i,n){this.ids.push(Yh(e)),this.positions.push(r,i,n)}getPositions(e){if(!this.indexed)throw Error("Trying to get index, but feature positions are not indexed");let r=Yh(e),i=0,n=this.ids.length-1;for(;i<n;){let s=i+n>>1;this.ids[s]>=r?n=s:i=s+1}let a=[];for(;this.ids[i]===r;){let s=this.positions[3*i],o=this.positions[3*i+1],l=this.positions[3*i+2];a.push({index:s,start:o,end:l}),i++}return a}static serialize(e,r){let i=new Float64Array(e.ids),n=new Uint32Array(e.positions);return Bo(i,n,0,i.length-1),r&&r.push(i.buffer,n.buffer),{ids:i,positions:n}}static deserialize(e){let r=new Zf;return r.ids=e.ids,r.positions=e.positions,r.indexed=!0,r}};function Yh(t){let e=+t;return!isNaN(e)&&e<=2**53-1?e:(0,Mo.default)(String(t))}function Bo(t,e,r,i){for(;r<i;){let n=t[r+i>>1],a=r-1,s=i+1;for(;;){do a++;while(t[a]<n);do s--;while(t[s]>n);if(a>=s)break;Yn(t,a,s),Yn(e,3*a,3*s),Yn(e,3*a+1,3*s+1),Yn(e,3*a+2,3*s+2)}s-r<i-s?(Bo(t,e,r,s),r=s+1):(Bo(t,e,s+1,i),i=s)}}function Yn(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}C("FeaturePositionMap",Wf);var Vl=class{constructor(t,e){this.gl=t.gl,this.location=e}};var Ol=class extends Vl{constructor(t,e){super(t,e),this.current=0}set(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))}};var hg=class extends Vl{constructor(t,e){super(t,e),this.current=[0,0,0,0]}set(t){(t[0]!==this.current[0]||t[1]!==this.current[1]||t[2]!==this.current[2]||t[3]!==this.current[3])&&(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))}},cg=class extends Vl{constructor(t,e){super(t,e),this.current=gt.transparent}set(t){(t.r!==this.current.r||t.g!==this.current.g||t.b!==this.current.b||t.a!==this.current.a)&&(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))}};var m5=new Float32Array(16);function Po(t){return[Xh(255*t.r,255*t.g),Xh(255*t.b,255*t.a)]}var $i=class{constructor(t,e,r){this.value=t,this.uniformNames=e.map(i=>`u_${i}`),this.type=r}setUniform(t,e,r){t.set(r.constantOr(this.value))}getBinding(t,e,r){return this.type==="color"?new cg(t,e):new Ol(t,e)}},ur=class{constructor(t,e){this.uniformNames=e.map(r=>`u_${r}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,e){this.pixelRatioFrom=e.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=e.tlbr,this.patternTo=t.tlbr}setConstantDashPositions(t,e){this.dashTo=[0,t.y,t.height,t.width],this.dashFrom=[0,e.y,e.height,e.width]}setUniform(t,e,r,i){let n=null;i==="u_pattern_to"?n=this.patternTo:i==="u_pattern_from"?n=this.patternFrom:i==="u_dasharray_to"?n=this.dashTo:i==="u_dasharray_from"?n=this.dashFrom:i==="u_pixel_ratio_to"?n=this.pixelRatioTo:i==="u_pixel_ratio_from"&&(n=this.pixelRatioFrom),n!==null&&t.set(n)}getBinding(t,e,r){return r.startsWith("u_pattern")||r.startsWith("u_dasharray_")?new hg(t,e):new Ol(t,e)}},ke=class{constructor(t,e,r,i){this.expression=t,this.type=r,this.maxValue=0,this.paintVertexAttributes=e.map(n=>({name:`a_${n}`,type:"Float32",components:r==="color"?2:1,offset:0})),this.paintVertexArray=new i}populatePaintArray(t,e,r){let i=this.paintVertexArray.length,n=this.expression.evaluate(new st(0,r),e,{},r.canonical,[],r.formattedSection);this.paintVertexArray.resize(t),this._setPaintValue(i,t,n)}updatePaintArray(t,e,r,i,n){let a=this.expression.evaluate(new st(0,n),r,i);this._setPaintValue(t,e,a)}_setPaintValue(t,e,r){if(this.type==="color"){let i=Po(r);for(let n=t;n<e;n++)this.paintVertexArray.emplace(n,i[0],i[1])}else{for(let i=t;i<e;i++)this.paintVertexArray.emplace(i,r);this.maxValue=Math.max(this.maxValue,Math.abs(r))}}upload(t){var e,r;(e=this.paintVertexArray)!=null&&e.arrayBuffer.byteLength&&((r=this.paintVertexBuffer)!=null&&r.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}},he=class{constructor(t,e,r,i,n,a){this.expression=t,this.uniformNames=e.map(s=>`u_${s}_t`),this.type=r,this.useIntegerZoom=i,this.zoom=n,this.maxValue=0,this.paintVertexAttributes=e.map(s=>({name:`a_${s}`,type:"Float32",components:r==="color"?4:2,offset:0})),this.paintVertexArray=new a}populatePaintArray(t,e,r){let i=this.expression.evaluate(new st(this.zoom,r),e,{},r.canonical,[],r.formattedSection),n=this.expression.evaluate(new st(this.zoom+1,r),e,{},r.canonical,[],r.formattedSection),a=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(a,t,i,n)}updatePaintArray(t,e,r,i,n){let a=this.expression.evaluate(new st(this.zoom,n),r,i),s=this.expression.evaluate(new st(this.zoom+1,n),r,i);this._setPaintValue(t,e,a,s)}_setPaintValue(t,e,r,i){if(this.type==="color"){let n=Po(r),a=Po(i);for(let s=t;s<e;s++)this.paintVertexArray.emplace(s,n[0],n[1],a[0],a[1])}else{for(let n=t;n<e;n++)this.paintVertexArray.emplace(n,r,i);this.maxValue=Math.max(this.maxValue,Math.abs(r),Math.abs(i))}}upload(t){var e,r;(e=this.paintVertexArray)!=null&&e.arrayBuffer.byteLength&&((r=this.paintVertexBuffer)!=null&&r.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(t,e){let r=this.useIntegerZoom?Math.floor(e.zoom):e.zoom,i=Ji(this.expression.interpolationFactor(r,this.zoom,this.zoom+1),0,1);t.set(i)}getBinding(t,e,r){return new Ol(t,e)}},Ye=class{constructor(t,e,r,i,n,a){this.expression=t,this.type=e,this.useIntegerZoom=r,this.zoom=i,this.layerId=a,this.zoomInPaintVertexArray=new n,this.zoomOutPaintVertexArray=new n}populatePaintArray(t,e,r){let i=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(t),this.zoomOutPaintVertexArray.resize(t),this._setPaintValues(i,t,this.getPositionIds(e),r)}updatePaintArray(t,e,r,i,n){this._setPaintValues(t,e,this.getPositionIds(r),n)}_setPaintValues(t,e,r,i){let n=this.getPositions(i);if(!n||!r)return;let a=n[r.min],s=n[r.mid],o=n[r.max];if(a&&s&&o)for(let l=t;l<e;l++)this.emplace(this.zoomInPaintVertexArray,l,a,s),this.emplace(this.zoomOutPaintVertexArray,l,o,s)}upload(t){var e,r;if((e=this.zoomInPaintVertexArray)!=null&&e.arrayBuffer.byteLength&&((r=this.zoomOutPaintVertexArray)!=null&&r.arrayBuffer.byteLength)){let i=this.getVertexAttributes();this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,i,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,i,this.expression.isStateDependent)}}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}},Hf=class extends Ye{getPositions(t){return t.imagePositions}getPositionIds(t){var e;return(e=t.patterns)==null?void 0:e[this.layerId]}getVertexAttributes(){return sg.members}emplace(t,e,r,i){t.emplace(e,r.tlbr[0],r.tlbr[1],r.tlbr[2],r.tlbr[3],i.tlbr[0],i.tlbr[1],i.tlbr[2],i.tlbr[3],r.pixelRatio,i.pixelRatio)}},Kf=class extends Ye{getPositions(t){return t.dashPositions}getPositionIds(t){var e;return(e=t.dashes)==null?void 0:e[this.layerId]}getVertexAttributes(){return og.members}emplace(t,e,r,i){t.emplace(e,0,r.y,r.height,r.width,0,i.y,i.height,i.width)}},Jf=class{constructor(t,e,r){this.binders={},this._buffers=[];let i=[];for(let n in t.paint._values){if(!r(n))continue;let a=t.paint.get(n);if(!(a instanceof se)||!ii(a.property.specification))continue;let s=pg(n,t.type),o=a.value,l=a.property.specification.type,u=a.property.useIntegerZoom,h=a.property.specification["property-type"],c=h==="cross-faded"||h==="cross-faded-data-driven";if(o.kind==="constant")this.binders[n]=c?new ur(o.value,s):new $i(o.value,s,l),i.push(`/u_${n}`);else if(o.kind==="source"||c){let p=Wh(n,l,"source");this.binders[n]=c?n==="line-dasharray"?new Kf(o,l,u,e,p,t.id):new Hf(o,l,u,e,p,t.id):new ke(o,s,l,p),i.push(`/a_${n}`)}else{let p=Wh(n,l,"composite");this.binders[n]=new he(o,s,l,u,e,p),i.push(`/z_${n}`)}}this.cacheKey=i.sort().join("")}getMaxValue(t){let e=this.binders[t];return e instanceof ke||e instanceof he?e.maxValue:0}populatePaintArrays(t,e,r){for(let i in this.binders){let n=this.binders[i];(n instanceof ke||n instanceof he||n instanceof Ye)&&n.populatePaintArray(t,e,r)}}setConstantPatternPositions(t,e){for(let r in this.binders){let i=this.binders[r];i instanceof ur&&i.setConstantPatternPositions(t,e)}}setConstantDashPositions(t,e){for(let r in this.binders){let i=this.binders[r];i instanceof ur&&i.setConstantDashPositions(t,e)}}updatePaintArrays(t,e,r,i,n){let a=!1;for(let s of t){let o=e.getPositions(s.id);for(let l of o){let u=r.feature(l.index);for(let h in this.binders){let c=this.binders[h];(c instanceof ke||c instanceof he||c instanceof Ye)&&c.expression.isStateDependent===!0&&(c.expression=i.paint.get(h).value,c.updatePaintArray(l.start,l.end,u,s.state,n),a=!0)}}}return a}defines(){let t=[];for(let e in this.binders){let r=this.binders[e];(r instanceof $i||r instanceof ur)&&t.push(...r.uniformNames.map(i=>`#define HAS_UNIFORM_${i}`))}return t}getBinderAttributes(){let t=[];for(let e in this.binders){let r=this.binders[e];if(r instanceof ke||r instanceof he)for(let i of r.paintVertexAttributes)t.push(i.name);else if(r instanceof Ye){let i=r.getVertexAttributes();for(let n of i)t.push(n.name)}}return t}getBinderUniforms(){let t=[];for(let e in this.binders){let r=this.binders[e];if(r instanceof $i||r instanceof ur||r instanceof he)for(let i of r.uniformNames)t.push(i)}return t}getPaintVertexBuffers(){return this._buffers}getUniforms(t,e){let r=[];for(let i in this.binders){let n=this.binders[i];if(n instanceof $i||n instanceof ur||n instanceof he){for(let a of n.uniformNames)if(e[a]){let s=n.getBinding(t,e[a],a);r.push({name:a,property:i,binding:s})}}}return r}setUniforms(t,e,r,i){for(let{name:n,property:a,binding:s}of e)this.binders[a].setUniform(s,i,r.get(a),n)}updatePaintBuffers(t){this._buffers=[];for(let e in this.binders){let r=this.binders[e];if(t&&r instanceof Ye){let i=t.fromScale===2?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;i&&this._buffers.push(i)}else(r instanceof ke||r instanceof he)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}}upload(t){for(let e in this.binders){let r=this.binders[e];(r instanceof ke||r instanceof he||r instanceof Ye)&&r.upload(t)}this.updatePaintBuffers()}destroy(){for(let t in this.binders){let e=this.binders[t];(e instanceof ke||e instanceof he||e instanceof Ye)&&e.destroy()}}},vr=class{constructor(t,e,r=()=>!0){this.programConfigurations={};for(let i of t)this.programConfigurations[i.id]=new Jf(i,e,r);this.needsUpload=!1,this._featureMap=new Wf,this._bufferOffset=0}populatePaintArrays(t,e,r,i){for(let n in this.programConfigurations)this.programConfigurations[n].populatePaintArrays(t,e,i);e.id!==void 0&&this._featureMap.add(e.id,r,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,e,r,i){for(let n of r)this.needsUpload=this.programConfigurations[n.id].updatePaintArrays(t,this._featureMap,e,n,i)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(let e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}}destroy(){for(let t in this.programConfigurations)this.programConfigurations[t].destroy()}};function pg(t,e){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[t]||[t.replace(`${e}-`,"").replace(/-/g,"_")]}function fg(t){return{"line-pattern":{source:Vr,composite:Vr},"fill-pattern":{source:Vr,composite:Vr},"fill-extrusion-pattern":{source:Vr,composite:Vr},"line-dasharray":{source:jh,composite:jh}}[t]}function Wh(t,e,r){var n;let i={color:{source:un,composite:To},number:{source:_a,composite:un}};return((n=fg(t))==null?void 0:n[r])||i[e][r]}C("ConstantBinder",$i),C("CrossFadedConstantBinder",ur),C("SourceExpressionBinder",ke),C("CrossFadedPatternBinder",Hf),C("CrossFadedDasharrayBinder",Kf),C("CompositeExpressionBinder",he),C("ProgramConfiguration",Jf,{omit:["_buffers"]}),C("ProgramConfigurationSet",vr);var zo=2**14-1,Zh=-zo-1;function Ar(t){let e=mt/t.extent,r=t.loadGeometry();for(let i of r)for(let n of i){let a=Math.round(n.x*e),s=Math.round(n.y*e);n.x=Ji(a,Zh,zo),n.y=Ji(s,Zh,zo),(a<n.x||a>n.x+1||s<n.y||s>n.y+1)&&Bt("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function hi(t,e){return{type:t.type,id:t.id,properties:t.properties,geometry:e?Ar(t):[]}}var Hh=-32768;function dg(t,e,r,i,n){t.emplaceBack(Hh+e*8+i,Hh+r*8+n)}var Rl=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new Hm,this.indexArray=new wn,this.segments=new ee,this.programConfigurations=new vr(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){let i=this.layers[0],n=[],a=null,s=!1,o=i.type==="heatmap";if(i.type==="circle"){let c=i;a=c.layout.get("circle-sort-key"),s=!a.isConstant(),o||(o=c.paint.get("circle-pitch-alignment")==="map")}let l=o?e.subdivisionGranularity.circle:1,u=new st(this.zoom),h=this.layers[0]._featureFilter.needGeometry;for(let{feature:c,id:p,index:f,sourceLayerIndex:d}of t){let y=hi(c,h);if(!this.layers[0]._featureFilter.filter(u,y,r))continue;let m=s?a.evaluate(y,{},r):void 0,g={id:p,properties:c.properties,type:c.type,sourceLayerIndex:d,index:f,geometry:h?y.geometry:Ar(c),patterns:{},sortKey:m};n.push(g)}s&&n.sort((c,p)=>c.sortKey-p.sortKey);for(let c of n){let{geometry:p,index:f,sourceLayerIndex:d}=c,y=t[f].feature;this.addFeature(c,p,f,r,l),e.featureIndex.insert(y,p,f,d,this.index)}}update(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r})}addFeatures(t){}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,ag),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(t,e,r,i,n=1){let a;switch(n){case 1:a=[0,7];break;case 3:a=[0,2,5,7];break;case 5:a=[0,1,3,4,6,7];break;case 7:a=[0,1,2,3,4,5,6,7];break;default:throw Error(`Invalid circle bucket granularity: ${n}; valid values are 1, 3, 5, 7.`)}let s=a.length;for(let o of e)for(let l of o){let u=l.x,h=l.y;if(u<0||u>=8192||h<0||h>=8192)continue;let c=this.segments.prepareSegment(s*s,this.layoutVertexArray,this.indexArray,t.sortKey),p=c.vertexLength;for(let f=0;f<s;f++)for(let d=0;d<s;d++)dg(this.layoutVertexArray,u,h,a[d],a[f]);for(let f=0;f<s-1;f++)for(let d=0;d<s-1;d++){let y=p+f*s+d,m=p+(f+1)*s+d;this.indexArray.emplaceBack(y,m+1,y+1),this.indexArray.emplaceBack(y,m,m+1)}c.vertexLength+=s*s,c.primitiveLength+=(s-1)*(s-1)*2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{imagePositions:{},canonical:i})}};C("CircleBucket",Rl,{omit:["layers"]});function yg(t,e){for(let r of t)if(oi(e,r))return!0;for(let r of e)if(oi(t,r))return!0;return $l(t,e)}function Za(t,e,r){return oi(t,e)?!0:Lo(e,t,r)}function Qf(t,e){if(t.length===1)return Kh(e,t[0]);for(let r of e)for(let i of r)if(oi(t,i))return!0;for(let r of t)if(Kh(e,r))return!0;for(let r of e)if($l(t,r))return!0;return!1}function mg(t,e,r){for(let i of e){if(t.length>=3){for(let n of i)if(oi(t,n))return!0}if(gg(t,i,r))return!0}return!1}function gg(t,e,r){if(t.length>1){if($l(t,e))return!0;for(let i of e)if(Lo(i,t,r))return!0}for(let i of t)if(Lo(i,e,r))return!0;return!1}function $l(t,e){if(t.length===0||e.length===0)return!1;for(let r=0;r<t.length-1;r++){let i=t[r],n=t[r+1];for(let a=0;a<e.length-1;a++){let s=e[a],o=e[a+1];if(xg(i,n,s,o))return!0}}return!1}function xg(t,e,r,i){return Ke(t,r,i)!==Ke(e,r,i)&&Ke(t,e,r)!==Ke(t,e,i)}function Lo(t,e,r){let i=r*r;if(e.length===1)return t.distSqr(e[0])<i;for(let n=1;n<e.length;n++){let a=e[n-1],s=e[n];if(td(t,a,s)<i)return!0}return!1}function td(t,e,r){let i=e.distSqr(r);if(i===0)return t.distSqr(e);let n=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/i;return n<0?t.distSqr(e):n>1?t.distSqr(r):t.distSqr(r.sub(e)._mult(n)._add(e))}function Kh(t,e){let r=!1,i,n,a;for(let s of t){i=s;for(let o=0,l=i.length-1;o<i.length;l=o++)n=i[o],a=i[l],n.y>e.y!=a.y>e.y&&e.x<(a.x-n.x)*(e.y-n.y)/(a.y-n.y)+n.x&&(r=!r)}return r}function oi(t,e){let r=!1;for(let i=0,n=t.length-1;i<t.length;n=i++){let a=t[i],s=t[n];a.y>e.y!=s.y>e.y&&e.x<(s.x-a.x)*(e.y-a.y)/(s.y-a.y)+a.x&&(r=!r)}return r}function vg(t,e,r,i,n){for(let s of t)if(e<=s.x&&r<=s.y&&i>=s.x&&n>=s.y)return!0;let a=[new B(e,r),new B(e,n),new B(i,n),new B(i,r)];if(t.length>2){for(let s of a)if(oi(t,s))return!0}for(let s=0;s<t.length-1;s++){let o=t[s],l=t[s+1];if(bg(o,l,a))return!0}return!1}function bg(t,e,r){let i=r[0],n=r[2];if(t.x<i.x&&e.x<i.x||t.x>n.x&&e.x>n.x||t.y<i.y&&e.y<i.y||t.y>n.y&&e.y>n.y)return!1;let a=Ke(t,e,r[0]);return a!==Ke(t,e,r[1])||a!==Ke(t,e,r[2])||a!==Ke(t,e,r[3])}function Wr(t,e,r){let i=e.paint.get(t).value;return i.kind==="constant"?i.value:r.programConfigurations.get(e.id).getMaxValue(t)}function Ha(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Ka(t,e,r,i,n){if(!e[0]&&!e[1])return t;let a=B.convert(e)._mult(n);r==="viewport"&&a._rotate(-i);let s=[];for(let o of t)s.push(o.sub(a));return s}function wg(t){let e=[];for(let r=0;r<t.length;r++){let i=t[r],n=e.at(-1);(r===0||n&&!i.equals(n))&&e.push(i)}return e}function Dg(t,e){let r=[];for(let i of t){let n=wg(i),a=[];for(let s=0;s<n.length;s++){let o=n[s],l=n[s-1],u=n[s+1],h=s===0?new B(0,0):o.sub(l)._unit()._perp(),c=s===n.length-1?new B(0,0):u.sub(o)._unit()._perp(),p=h._add(c)._unit(),f=p.x*c.x+p.y*c.y;f!==0&&p._mult(1/f),a.push(p._mult(e)._add(o))}r.push(a)}return r}function _g({queryGeometry:t,size:e},r){return Za(t,r,e)}function Ag({queryGeometry:t,size:e,transform:r,unwrappedTileID:i,getElevation:n},a){return Za(t,a,e*(r.projectTileCoordinates(a.x,a.y,i,n==null?void 0:n(a.x,a.y)).signedDistanceFromCamera/r.cameraToCenterDistance))}function Sg({queryGeometry:t,size:e,transform:r,unwrappedTileID:i,getElevation:n},a){let s=r.projectTileCoordinates(a.x,a.y,i,n==null?void 0:n(a.x,a.y)).signedDistanceFromCamera,o=e*(r.cameraToCenterDistance/s);return Za(t,Nl(a,r,i,n),o)}function Eg({queryGeometry:t,size:e,transform:r,unwrappedTileID:i,getElevation:n},a){return Za(t,Nl(a,r,i,n),e)}function ed({queryGeometry:t,size:e,transform:r,unwrappedTileID:i,getElevation:n,pitchAlignment:a="map",pitchScale:s="map"},o){let l=a==="map"?s==="map"?_g:Ag:s==="map"?Sg:Eg,u={queryGeometry:t,size:e,transform:r,unwrappedTileID:i,getElevation:n};for(let h of o)for(let c of h)if(l(u,c))return!0;return!1}function Nl(t,e,r,i){let n=e.projectTileCoordinates(t.x,t.y,r,i==null?void 0:i(t.x,t.y)).point;return new B((n.x*.5+.5)*e.width,(-n.y*.5+.5)*e.height)}function Fg(t,e,r,i){return t.map(n=>Nl(n,e,r,i))}var kg,Tg=()=>kg||(kg=new Xt({"circle-sort-key":new N(w.layout_circle["circle-sort-key"],"circle-sort-key")})),Ig,Cg=()=>Ig||(Ig=new Xt({"circle-radius":new N(w.paint_circle["circle-radius"],"circle-radius"),"circle-color":new N(w.paint_circle["circle-color"],"circle-color"),"circle-blur":new N(w.paint_circle["circle-blur"],"circle-blur"),"circle-opacity":new N(w.paint_circle["circle-opacity"],"circle-opacity"),"circle-translate":new V(w.paint_circle["circle-translate"],"circle-translate"),"circle-translate-anchor":new V(w.paint_circle["circle-translate-anchor"],"circle-translate-anchor"),"circle-pitch-scale":new V(w.paint_circle["circle-pitch-scale"],"circle-pitch-scale"),"circle-pitch-alignment":new V(w.paint_circle["circle-pitch-alignment"],"circle-pitch-alignment"),"circle-stroke-width":new N(w.paint_circle["circle-stroke-width"],"circle-stroke-width"),"circle-stroke-color":new N(w.paint_circle["circle-stroke-color"],"circle-stroke-color"),"circle-stroke-opacity":new N(w.paint_circle["circle-stroke-opacity"],"circle-stroke-opacity")})),Mg={get paint(){return Cg()},get layout(){return Tg()}};var Bg=class extends de{constructor(t,e){super(t,Mg,e)}createBucket(t){return new Rl(t)}queryRadius(t){let e=t;return Wr("circle-radius",this,e)+Wr("circle-stroke-width",this,e)+Ha(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,unwrappedTileID:s,getElevation:o}){let l=Ka(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-n.bearingInRadians,a),u=this.paint.get("circle-radius").evaluate(e,r)+this.paint.get("circle-stroke-width").evaluate(e,r),h=this.paint.get("circle-pitch-scale"),c=this.paint.get("circle-pitch-alignment"),p,f;return c==="map"?(p=l,f=u*a):(p=Fg(l,n,s,o),f=u),ed({queryGeometry:p,size:f,transform:n,unwrappedTileID:s,getElevation:o,pitchAlignment:c,pitchScale:h},i)}},rd=class extends Rl{};C("HeatmapBucket",rd,{omit:["layers"]});var Pg,zg=()=>Pg||(Pg=new Xt({"heatmap-radius":new N(w.paint_heatmap["heatmap-radius"],"heatmap-radius"),"heatmap-weight":new N(w.paint_heatmap["heatmap-weight"],"heatmap-weight"),"heatmap-intensity":new V(w.paint_heatmap["heatmap-intensity"],"heatmap-intensity"),"heatmap-color":new Wa(w.paint_heatmap["heatmap-color"],"heatmap-color"),"heatmap-opacity":new V(w.paint_heatmap["heatmap-opacity"],"heatmap-opacity")})),Lg={get paint(){return zg()}};function Ul(t,{width:e,height:r},i,n){if(!n)n=new Uint8Array(e*r*i);else if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==e*r*i)throw RangeError(`mismatched image size. expected: ${n.length} but got: ${e*r*i}`);return t.width=e,t.height=r,t.data=n,t}function id(t,{width:e,height:r},i){if(e===t.width&&r===t.height)return;let n=Ul({},{width:e,height:r},i);ql(t,n,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,e),height:Math.min(t.height,r)},i),t.width=e,t.height=r,t.data=n.data}function ql(t,e,r,i,n,a){if(n.width===0||n.height===0)return e;if(n.width>t.width||n.height>t.height||r.x>t.width-n.width||r.y>t.height-n.height)throw RangeError("out of range source coordinates for image copy");if(n.width>e.width||n.height>e.height||i.x>e.width-n.width||i.y>e.height-n.height)throw RangeError("out of range destination coordinates for image copy");let s=t.data,o=e.data;if(s===o)throw Error("srcData equals dstData, so image is already copied");for(let l=0;l<n.height;l++){let u=((r.y+l)*t.width+r.x)*a,h=((i.y+l)*e.width+i.x)*a;for(let c=0;c<n.width*a;c++)o[h+c]=s[u+c]}return e}var Ja=class nd{constructor(e,r){Ul(this,e,1,r)}resize(e){id(this,e,1)}clone(){return new nd({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(e,r,i,n,a){ql(e,r,i,n,a,1)}},Zt=class ad{constructor(e,r){Ul(this,e,4,r)}resize(e){id(this,e,4)}replace(e,r){r?this.data.set(e):this.data=e instanceof Uint8ClampedArray?new Uint8Array(e.buffer):e}clone(){return new ad({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(e,r,i,n,a){ql(e,r,i,n,a,4)}setPixel(e,r,i){let n=(e*this.width+r)*4;this.data[n+0]=Math.round(i.r*255/i.a),this.data[n+1]=Math.round(i.g*255/i.a),this.data[n+2]=Math.round(i.b*255/i.a),this.data[n+3]=Math.round(i.a*255)}};function Ns(t){let e=new Uint8Array(t.length);for(let r=0;r<t.length;r+=4){let i=t[r+3];e[r+0]=Math.round(t[r+0]*i/255),e[r+1]=Math.round(t[r+1]*i/255),e[r+2]=Math.round(t[r+2]*i/255),e[r+3]=i}return e}C("AlphaImage",Ja),C("RGBAImage",Zt);function Vg(t){let e={},r=t.resolution||256,i=t.clips?t.clips.length:1,n=t.image||new Zt({width:r,height:i});if(!k1(r))throw Error(`width is not a power of 2 - ${r}`);let a=(s,o,l)=>{e[t.evaluationKey]=l;let u=t.expression.evaluate(e);n.setPixel(s/4/r,o/4,u)};if(t.clips)for(let s=0,o=0;s<i;++s,o+=r*4)for(let l=0,u=0;l<r;l++,u+=4){let h=l/(r-1),{start:c,end:p}=t.clips[s],f=c*(1-h)+p*h;a(o,u,f)}else for(let s=0,o=0;s<r;s++,o+=4){let l=s/(r-1);a(0,o,l)}return n}var Og="big-fb";var Rg=class extends de{createBucket(t){return new rd(t)}constructor(t,e){super(t,Lg,e),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(t){t==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){let t=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=Vg({expression:t,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has("big-fb")&&this.heatmapFbos.delete(Og)}queryRadius(t){return Wr("heatmap-radius",this,t)}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,unwrappedTileID:s,getElevation:o}){return ed({queryGeometry:t,size:this.paint.get("heatmap-radius").evaluate(e,r)*a,transform:n,unwrappedTileID:s,getElevation:o},i)}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&!this.isHidden()}},$g,Ng=()=>$g||($g=new Xt({"hillshade-illumination-direction":new V(w.paint_hillshade["hillshade-illumination-direction"],"hillshade-illumination-direction"),"hillshade-illumination-altitude":new V(w.paint_hillshade["hillshade-illumination-altitude"],"hillshade-illumination-altitude"),"hillshade-illumination-anchor":new V(w.paint_hillshade["hillshade-illumination-anchor"],"hillshade-illumination-anchor"),"hillshade-exaggeration":new V(w.paint_hillshade["hillshade-exaggeration"],"hillshade-exaggeration"),"hillshade-shadow-color":new V(w.paint_hillshade["hillshade-shadow-color"],"hillshade-shadow-color"),"hillshade-highlight-color":new V(w.paint_hillshade["hillshade-highlight-color"],"hillshade-highlight-color"),"hillshade-accent-color":new V(w.paint_hillshade["hillshade-accent-color"],"hillshade-accent-color"),"hillshade-method":new V(w.paint_hillshade["hillshade-method"],"hillshade-method"),resampling:new V(w.paint_hillshade.resampling,"resampling")})),Ug={get paint(){return Ng()}};var qg=class extends de{constructor(t,e){super(t,Ug,e),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let t=this.paint.get("hillshade-illumination-direction").values,e=this.paint.get("hillshade-illumination-altitude").values,r=this.paint.get("hillshade-highlight-color").values,i=this.paint.get("hillshade-shadow-color").values,n=Math.max(t.length,e.length,r.length,i.length);t=t.concat(Array(n-t.length).fill(t.at(-1))),e=e.concat(Array(n-e.length).fill(e.at(-1))),r=r.concat(Array(n-r.length).fill(r.at(-1))),i=i.concat(Array(n-i.length).fill(i.at(-1)));let a=e.map(ch);return{directionRadians:t.map(ch),altitudeRadians:a,shadowColor:i,highlightColor:r}}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&!this.isHidden()}},jg,Gg=()=>jg||(jg=new Xt({"color-relief-opacity":new V(w["paint_color-relief"]["color-relief-opacity"],"color-relief-opacity"),"color-relief-color":new Wa(w["paint_color-relief"]["color-relief-color"],"color-relief-color"),resampling:new V(w["paint_color-relief"].resampling,"resampling")})),Xg={get paint(){return Gg()}};function Wn(t){return"data"in t}var Jh=class{constructor(t,e,r,i){this.context=t,this.format=r,this.texture=t.gl.createTexture(),this._ownedHandle=this.texture,this.update(e,i)}update(t,e,r){var u;let{width:i,height:n}=t,a=(((u=this.size)==null?void 0:u[0])!==i||this.size[1]!==n)&&!r,{context:s}=this,{gl:o}=s;this.useMipmap=!!(e!=null&&e.useMipmap),a&&this.size&&this.format===o.RGBA&&(o.deleteTexture(this.texture),this.texture=o.createTexture(),this._ownedHandle=this.texture,this.magFilter=void 0,this.minFilter=void 0,this.wrap=void 0),o.bindTexture(o.TEXTURE_2D,this.texture),s.pixelStoreUnpackFlipY.set(!1),s.pixelStoreUnpack.set(1);let l=this.format===o.RGBA&&(e==null?void 0:e.premultiply)!==!1;if(a)if(this.size=[i,n],this.format===o.RGBA&&i>0&&n>0){let h=this.useMipmap?Math.floor(Math.log2(Math.max(i,n)))+1:1;if(o.texStorage2D(o.TEXTURE_2D,h,o.RGBA8,i,n),Wn(t)){s.pixelStoreUnpackPremultiplyAlpha.set(!1);let{data:c}=t;l&&c&&(c=Ns(c)),c&&o.texSubImage2D(o.TEXTURE_2D,0,0,0,i,n,o.RGBA,o.UNSIGNED_BYTE,c)}else s.pixelStoreUnpackPremultiplyAlpha.set(l),o.texSubImage2D(o.TEXTURE_2D,0,0,0,o.RGBA,o.UNSIGNED_BYTE,t)}else Wn(t)?(s.pixelStoreUnpackPremultiplyAlpha.set(!1),this._uploadRawData(t,l,i,n,o)):(s.pixelStoreUnpackPremultiplyAlpha.set(l),this._uploadDomImage(t,o));else{let{x:h,y:c}=r||{x:0,y:0};Wn(t)?(s.pixelStoreUnpackPremultiplyAlpha.set(!1),this._updateRawData(t,l,h,c,i,n,o)):(s.pixelStoreUnpackPremultiplyAlpha.set(l),this._updateDomImage(t,h,c,o))}this.useMipmap&&!(Wn(t)&&t.data===null)&&o.generateMipmap(o.TEXTURE_2D),s.pixelStoreUnpackFlipY.setDefault(),s.pixelStoreUnpack.setDefault(),s.pixelStoreUnpackPremultiplyAlpha.setDefault()}_uploadDomImage(t,e){e.texImage2D(e.TEXTURE_2D,0,this.format,this.format,e.UNSIGNED_BYTE,t)}_uploadRawData(t,e,r,i,n){let{data:a}=t;e&&a&&(a=Ns(a)),n.texImage2D(n.TEXTURE_2D,0,this.format,r,i,0,this.format,n.UNSIGNED_BYTE,a)}_updateDomImage(t,e,r,i){i.texSubImage2D(i.TEXTURE_2D,0,e,r,i.RGBA,i.UNSIGNED_BYTE,t)}_updateRawData(t,e,r,i,n,a,s){let{data:o}=t;e&&o&&(o=Ns(o)),s.texSubImage2D(s.TEXTURE_2D,0,r,i,n,a,s.RGBA,s.UNSIGNED_BYTE,o)}bind(t,e,r){let{context:i}=this,{gl:n}=i;this.texture!==this._ownedHandle&&(this.texture=this._ownedHandle),n.bindTexture(n.TEXTURE_2D,this.texture),(r===n.LINEAR_MIPMAP_NEAREST||r===n.LINEAR_MIPMAP_LINEAR)&&!this.useMipmap&&(r=n.LINEAR);let a=r||t;t!==this.magFilter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,t),this.magFilter=t),a!==this.minFilter&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,a),this.minFilter=a),e!==this.wrap&&(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,e),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,e),this.wrap=e)}generateMipmap(){if(!this.useMipmap)return;let{gl:t}=this.context;t.bindTexture(t.TEXTURE_2D,this.texture),t.generateMipmap(t.TEXTURE_2D)}destroy(){let{gl:t}=this.context;t.deleteTexture(this.texture),this.texture=null,this._ownedHandle=null}},Pe,jl=(Pe=class{constructor(e,r,i,n=1,a=1,s=1,o=0){if(this.uid=e,r.height!==r.width)throw RangeError("DEM tiles must be square");if(i&&!["mapbox","terrarium","custom"].includes(i)){Bt(`"${i}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);return}this.stride=r.height;let l=this.dim=r.height-4;switch(this.data=new Uint32Array(r.data.buffer),Pe.byteViewCache.set(this,new Uint8Array(this.data.buffer)),i){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=n,this.greenFactor=a,this.blueFactor=s,this.baseShift=o;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let h=-2;h<l+2;h++){let c=this._idx(0,Math.max(0,Math.min(l-1,h)));(h<0||h>=l)&&this.data.copyWithin(this._idx(0,h),c,c+l),this.data.fill(this.data[c],this._idx(-2,h),this._idx(0,h)),this.data.fill(this.data[c+l-1],this._idx(l,h),this._idx(l+1,h)+1)}let u=this._getByteView();this.min=2**53-1,this.max=-(2**53-1);for(let h=0;h<l;h++)for(let c=0;c<l;c++){let p=this._idx(h,c)*4,f=this._unpackAtIndex(u,p);f>this.max&&(this.max=f),f<this.min&&(this.min=f)}}get(e,r){let i=this._getByteView(),n=this._idx(e,r)*4;return this._unpackAtIndex(i,n)}sampleBilinear(e,r){let i=Math.floor(e),n=Math.floor(r);if(i<-1||i>=this.dim||n<-1||n>=this.dim)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${r}, dim: ${this.dim}`);let a=this._getByteView(),s=((n+2)*this.stride+i+2)*4,o=this.stride*4,l=e-i,u=r-n,h=this._unpackAtIndex(a,s),c=this._unpackAtIndex(a,s+4),p=this._unpackAtIndex(a,s+o),f=this._unpackAtIndex(a,s+o+4);return h*(1-l)*(1-u)+c*l*(1-u)+p*(1-l)*u+f*l*u}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(e,r){if(e<-2||e>=this.dim+2||r<-2||r>=this.dim+2)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${r}, dim: ${this.dim}`);return(r+2)*this.stride+(e+2)}unpack(e,r,i){return e*this.redFactor+r*this.greenFactor+i*this.blueFactor-this.baseShift}pack(e){return sd(e,this.getUnpackVector())}getPixels(){return new Zt({width:this.stride,height:this.stride},this._getByteView())}backfillBorder(e,r,i){if(this.dim!==e.dim)throw Error("dem dimension mismatch");let n=r*this.dim,a=r*this.dim+this.dim,s=i*this.dim,o=i*this.dim+this.dim;switch(r){case-1:n=a-2;break;case 1:a=n+2}switch(i){case-1:s=o-2;break;case 1:o=s+2}let l=-r*this.dim,u=-i*this.dim;for(let h=s;h<o;h++)for(let c=n;c<a;c++)this.data[this._idx(c,h)]=e.data[this._idx(c+l,h+u)]}_getByteView(){let e=Pe.byteViewCache.get(this);return(e==null?void 0:e.buffer)!==this.data.buffer&&(e=new Uint8Array(this.data.buffer),Pe.byteViewCache.set(this,e)),e}_unpackAtIndex(e,r){return this.unpack(e[r],e[r+1],e[r+2])}},Pe.byteViewCache=new WeakMap,Pe);function sd(t,e){let r=e[0],i=e[1],n=e[2],a=e[3],s=Math.min(r,i,n),o=Math.round((t+a)/s);return{r:Math.floor(o*s/r)%256,g:Math.floor(o*s/i)%256,b:Math.floor(o*s/n)%256}}C("DEMData",jl);var Yg=class extends de{constructor(t,e){super(t,Xg,e)}_createColorRamp(t){let e={elevationStops:[],colorStops:[]},r=this._transitionablePaint._values["color-relief-color"].value.expression;if(r instanceof an&&r._styleExpression.expression instanceof be){this.colorRampExpression=r;let a=r._styleExpression.expression;e.elevationStops=a.labels,e.colorStops=[];for(let s of e.elevationStops)e.colorStops.push(a.evaluate({globals:{elevation:s}}))}if(e.elevationStops.length<1&&(e.elevationStops=[0],e.colorStops=[gt.transparent]),e.elevationStops.length<2&&(e.elevationStops.push(e.elevationStops[0]+1),e.colorStops.push(e.colorStops[0])),e.elevationStops.length<=t)return e;let i={elevationStops:[],colorStops:[]},n=(e.elevationStops.length-1)/(t-1);for(let a=0;a<e.elevationStops.length-.5;a+=n)i.elevationStops.push(e.elevationStops[Math.round(a)]),i.colorStops.push(e.colorStops[Math.round(a)]);return Bt(`Too many colors in specification of ${this.id} color-relief layer, may not render properly. Max possible colors: ${t}, provided: ${e.elevationStops.length}`),i}_colorRampChanged(){return this.colorRampExpression!=this._transitionablePaint._values["color-relief-color"].value.expression}getColorRampTextures(t,e,r){if(this.colorRampTextures&&!this._colorRampChanged())return this.colorRampTextures;let i=this._createColorRamp(e),n=new Zt({width:i.colorStops.length,height:1}),a=new Zt({width:i.colorStops.length,height:1});for(let s=0;s<i.elevationStops.length;s++){let o=sd(i.elevationStops[s],r);a.setPixel(0,s,new gt(o.r/255,o.g/255,o.b/255,1)),n.setPixel(0,s,i.colorStops[s])}return this.colorRampTextures={elevationTexture:new Jh(t,a,t.gl.RGBA),colorTexture:new Jh(t,n,t.gl.RGBA)},this.colorRampTextures}hasOffscreenPass(){return!this.isHidden()&&!!this.colorRampTextures}},Vo=At([{name:"a_pos",components:2,type:"Int16"}],4),Wg=Vo.members;Vo.size,Vo.alignment;function Aa(t,e,r){let i=r.patternDependencies,n=!1;for(let a of e){let s=a.paint.get(`${t}-pattern`);s.isConstant()||(n=!0);let o=s.constantOr(null);o&&(n=!0,i[o.to]=!0,i[o.from]=!0)}return n}function Gl(t,e,r,i,n){let{zoom:a}=i,s=n.patternDependencies;for(let o of e){let l=o.paint.get(`${t}-pattern`).value;if(l.kind!=="constant"){let u=l.evaluate({zoom:a-1},r,{},n.availableImages),h=l.evaluate({zoom:a},r,{},n.availableImages),c=l.evaluate({zoom:a+1},r,{},n.availableImages);u=u!=null&&u.name?u.name:u,h=h!=null&&h.name?h.name:h,c=c!=null&&c.name?c.name:c,s[u]=!0,s[h]=!0,s[c]=!0,r.patterns[o.id]={min:u,mid:h,max:c}}}return r}var hn=new Set,Oo=!1;function Zg(t,e,r=2){let i=e&&e.length,n=i?e[0]*r:t.length;hn.size&&hn.clear();let a=od(t,0,n,r,!0),s=[];if(!a||a.next===a.prev)return s;let o=0,l=0,u=0;if(i&&(a=tx(t,e,a,r)),t.length>80*r){o=t[0],l=t[1];let h=o,c=l;for(let p=r;p<n;p+=r){let f=t[p],d=t[p+1];f<o&&(o=f),d<l&&(l=d),f>h&&(h=f),d>c&&(c=d)}u=Math.max(h-o,c-l),u=u===0?0:32767/u}return Ro(a,s,o,l,u),s}function od(t,e,r,i,n){let a=null;if(n===fx(t,e,r,i)>0)for(let s=e;s<r;s+=i)a=ec(s/i|0,t[s],t[s+1],a);else for(let s=r-i;s>=e;s-=i)a=ec(s/i|0,t[s],t[s+1],a);return a&&cn(a,a.next)&&(fn(a),a=a.next),a}function br(t,e=t){let r=e===t,i=t,n;do n=!1,i!==i.next&&(hn.size===0||!hn.has(i))&&(cn(i,i.next)||Ft(i.prev,i,i.next)===0)?((r||i===e)&&(e=i.prev),Oo=!0,fn(i),i=i.prev,n=!0):(r||i!==e)&&(i=i.next,n=!r);while(n||i!==e);return e}function Ro(t,e,r,i,n){n&&ox(t,r,i,n);let a=t,s=!1;for(;t.prev!==t.next;){let o=t.prev,l=t.next;if(Ft(o,t,l)<0&&(n?Kg(t,r,i,n):Hg(t))){e.push(o.i,t.i,l.i),fn(t),t=l,a=l;continue}if(t=l,t===a){if(Oo=!1,t=br(t),Oo){a=t;continue}if(!s){t=Jg(t,e),a=t,s=!0;continue}Qg(t,e,r,i,n);break}}}function Hg(t){let e=t.prev,r=t,i=t.next,n=e.x,a=r.x,s=i.x,o=e.y,l=r.y,u=i.y,h=Math.min(n,a,s),c=Math.min(o,l,u),p=Math.max(n,a,s),f=Math.max(o,l,u),d=i.next;for(;d!==e;){if(d.x>=h&&d.x<=p&&d.y>=c&&d.y<=f&&(n!==d.x||o!==d.y)&&Ea(n,o,a,l,s,u,d.x,d.y)&&Ft(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function Kg(t,e,r,i){let n=t.prev,a=t,s=t.next,o=n.x,l=a.x,u=s.x,h=n.y,c=a.y,p=s.y,f=Math.min(o,l,u),d=Math.min(h,c,p),y=Math.max(o,l,u),m=Math.max(h,c,p),g=qo(f,d,e,r,i),x=qo(y,m,e,r,i),v=t.prevZ;for(;v&&v.z>=g;){if(v.x>=f&&v.x<=y&&v.y>=d&&v.y<=m&&v!==s&&(o!==v.x||h!==v.y)&&Ea(o,h,l,c,u,p,v.x,v.y)&&Ft(v.prev,v,v.next)>=0)return!1;v=v.prevZ}let b=t.nextZ;for(;b&&b.z<=x;){if(b.x>=f&&b.x<=y&&b.y>=d&&b.y<=m&&b!==s&&(o!==b.x||h!==b.y)&&Ea(o,h,l,c,u,p,b.x,b.y)&&Ft(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function Jg(t,e){let r=t,i=!1;do{let n=r.prev,a=r.next.next;ud(n,r,r.next,a,!1)&&pn(n,a)&&pn(a,n)&&(e.push(n.i,r.i,a.i),fn(r),fn(r.next),r=t=a,i=!0),r=r.next}while(r!==t);return i?br(r):r}function Qg(t,e,r,i,n){let a=t;do{let s=a.next.next;for(;s!==a.prev;){if(a.i!==s.i&&hx(a,s)){let o=hd(a,s);a=br(a,a.next),o=br(o,o.next),Ro(a,e,r,i,n),Ro(o,e,r,i,n);return}s=s.next}a=a.next}while(a!==t)}var $o=!1;function tx(t,e,r,i){let n=[];for(let a=0,s=e.length;a<s;a++){let o=od(t,e[a]*i,a<s-1?e[a+1]*i:t.length,i,!1);o===o.next&&hn.add(o),n.push(ux(o))}n.sort(ex),ix(t.length/i,e.length),ld(r,r),$o=!0;for(let a=0;a<n.length;a++)r=rx(n[a],r);return $o=!1,br(r)}function ex(t,e){return t.x-e.x||t.y-e.y||(t.next.y-t.y)/(t.next.x-t.x)-(e.next.y-e.y)/(e.next.x-e.x)}function rx(t,e){let r=ax(t,e);if(!r)return e;let i=hd(r,t),n=i.next;return ld(r,n.next),br(i,i.next),br(r,r.next)}var wt=new Float64Array,Sa=0,No=[],Uo=[];function ix(t,e){let r=Math.ceil((t+2*e)/16)+e+2;wt.length<r*4&&(wt=new Float64Array(r*4)),Sa=0}function ld(t,e){let r=t;do{let i=Sa++;No[i]=r;let n=1/0,a=1/0,s=-1/0,o=-1/0,l=0;do{let h=r.next;r.z=i,r.x<n&&(n=r.x),r.x>s&&(s=r.x),r.y<a&&(a=r.y),r.y>o&&(o=r.y),h.x<n&&(n=h.x),h.x>s&&(s=h.x),h.y<a&&(a=h.y),h.y>o&&(o=h.y),r=h}while(++l<16&&r!==e);Uo[i]=r;let u=i*4;wt[u]=n,wt[u+1]=a,wt[u+2]=s,wt[u+3]=o}while(r!==e)}function nx(t,e){let r=t.z*4;e.x<wt[r]&&(wt[r]=e.x),e.y<wt[r+1]&&(wt[r+1]=e.y),e.x>wt[r+2]&&(wt[r+2]=e.x),e.y>wt[r+3]&&(wt[r+3]=e.y)}function Qh(t){let e=Uo[t];for(;e.prev.next!==e;)e=e.next;return Uo[t]=e,e}function tc(t){let e=No[t];for(;e.prev.next!==e;)e=e.next;return No[t]=e,e}function ax(t,e){let r=e,i=t.x,n=t.y,a=-1/0,s;if(cn(t,r))return r;for(let p=0,f=0;p<Sa;p++,f+=4){if(n<wt[f+1]||n>wt[f+3]||wt[f]>i||wt[f+2]<=a)continue;let d=Qh(p);r=tc(p);do{if(r.prev.next===r){if(cn(t,r.next))return r.next;if(n<=r.y&&n>=r.next.y&&r.next.y!==r.y){let y=r.x+(n-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(y<=i&&y>a&&(a=y,s=r.x<r.next.x?r:r.next,y===i))return s}}r=r.next}while(r!==d)}if(!s)return null;let o=s.x,l=s.y,u=Math.min(n,l),h=Math.max(n,l),c=1/0;for(let p=0,f=0;p<Sa;p++,f+=4){if(wt[f+2]<o||wt[f]>i||wt[f+3]<u||wt[f+1]>h)continue;let d=Qh(p);r=tc(p);do{if(r.prev.next===r&&i>=r.x&&r.x>=o&&i!==r.x&&Ea(n<l?i:a,n,o,l,n<l?a:i,n,r.x,r.y)){let y=Math.abs(n-r.y)/(i-r.x);(pn(r,t)||r.y===n&&r.next.y===n&&r.next.x>i)&&(y<c||y===c&&(r.x>s.x||r.x===s.x&&sx(s,r)))&&(s=r,c=y)}r=r.next}while(r!==d)}return s}function sx(t,e){return Ft(t.prev,t,e.prev)<0&&Ft(e.next,t,t.next)<0}var ae=[],Ti=[],or=new Uint32Array,Ii=new Uint32Array,Ci=new Uint32Array(256);function ox(t,e,r,i){let n=t,a=0;do n.z=qo(n.x,n.y,e,r,i),ae[a++]=n,n=n.next;while(n!==t);lx(a);let s=null;for(let o=0;o<a;o++){let l=ae[o];l.prevZ=s,s&&(s.nextZ=l),s=l}s.nextZ=null}function lx(t){if(t<=32){for(let e=1;e<t;e++){let r=ae[e],i=r.z,n=e-1;for(;n>=0&&ae[n].z>i;)ae[n+1]=ae[n],n--;ae[n+1]=r}return}or.length<t&&(or=new Uint32Array(t),Ii=new Uint32Array(t),Ti=Array(t));for(let e=0;e<t;e++)or[e]=ae[e].z;Zn(t,ae,or,Ti,Ii,0),Zn(t,Ti,Ii,ae,or,8),Zn(t,ae,or,Ti,Ii,16),Zn(t,Ti,Ii,ae,or,24)}function Zn(t,e,r,i,n,a){Ci.fill(0);for(let o=0;o<t;o++)Ci[r[o]>>>a&255]++;let s=0;for(let o=0;o<256;o++){let l=Ci[o];Ci[o]=s,s+=l}for(let o=0;o<t;o++){let l=r[o],u=Ci[l>>>a&255]++;i[u]=e[o],n[u]=l}}function qo(t,e,r,i,n){return t=(t-r)*n|0,e=(e-i)*n|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function ux(t){let e=t,r=t;do(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next;while(e!==t);return r}function Ea(t,e,r,i,n,a,s,o){return(n-s)*(e-o)>=(t-s)*(a-o)&&(t-s)*(i-o)>=(r-s)*(e-o)&&(r-s)*(a-o)>=(n-s)*(i-o)}function hx(t,e){let r=cn(t,e)&&Ft(t.prev,t,t.next)>0&&Ft(e.prev,e,e.next)>0;return t.next.i!==e.i&&(r||pn(t,e)&&pn(e,t)&&(Ft(t.prev,t,e.prev)!==0||Ft(t,e.prev,e)!==0))&&!cx(t,e)&&(r||px(t,e))}function Ft(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function cn(t,e){return t.x===e.x&&t.y===e.y}function ud(t,e,r,i,n=!0){let a=Ft(t,e,r),s=Ft(t,e,i),o=Ft(r,i,t),l=Ft(r,i,e);return(a>0&&s<0||a<0&&s>0)&&(o>0&&l<0||o<0&&l>0)?!0:n?!!(a===0&&Hn(t,r,e)||s===0&&Hn(t,i,e)||o===0&&Hn(r,t,i)||l===0&&Hn(r,e,i)):!1}function Hn(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function cx(t,e){let r=Math.min(t.x,e.x),i=Math.max(t.x,e.x),n=Math.min(t.y,e.y),a=Math.max(t.y,e.y),s=t;do{let o=s.next;if(s.x>i&&o.x>i||s.x<r&&o.x<r||s.y>a&&o.y>a||s.y<n&&o.y<n){s=o;continue}if(s.i!==t.i&&o.i!==t.i&&s.i!==e.i&&o.i!==e.i&&ud(s,o,t,e))return!0;s=o}while(s!==t);return!1}function pn(t,e){return Ft(t.prev,t,t.next)<0?Ft(t,e,t.next)>=0&&Ft(t,t.prev,e)>=0:Ft(t,e,t.prev)<0||Ft(t,t.next,e)<0}function px(t,e){let r=t,i=!1,n=(t.x+e.x)/2,a=(t.y+e.y)/2;do{let s=r.next;r.y>a!=s.y>a&&n<(s.x-r.x)*(a-r.y)/(s.y-r.y)+r.x&&(i=!i),r=s}while(r!==t);return i}function hd(t,e){let r=jo(t.i,t.x,t.y),i=jo(e.i,e.x,e.y),n=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,a.next=i,i.prev=a,i}function ec(t,e,r,i){let n=jo(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function fn(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ),$o&&nx(t.prev,t.next)}function jo(t,e,r){return{i:t,x:e,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function fx(t,e,r,i){let n=0;for(let a=e,s=r-i;a<r;a+=i)n+=(t[s]-t[a])*(t[a+1]+t[s+1]),s=a;return n}var Ni=class{constructor(t,e){if(e>t)throw Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=t,this._minGranularity=e}getGranularityForZoomLevel(t){let e=1<<t;return Math.max(Math.floor(this._baseZoomGranularity/e),this._minGranularity,1)}},yr,dx=(yr=class{constructor(e){this.fill=e.fill,this.line=e.line,this.tile=e.tile,this.stencil=e.stencil,this.circle=e.circle}},yr.noSubdivision=new yr({fill:new Ni(0,0),line:new Ni(0,0),tile:new Ni(0,0),stencil:new Ni(0,0),circle:1}),yr);C("SubdivisionGranularityExpression",Ni),C("SubdivisionGranularitySetting",dx);var Us=-32768,qs=32767,yx=class{constructor(t,e){this._vertexBuffer=[],this._vertexDictionary=new Map,this._used=!1,this._granularity=t,this._granularityCellSize=mt/t,this._canonical=e}_getKey(t,e){return t+=32768,e+=32768,t<<16|e<<0}_vertexToIndex(t,e){if(t<-32768||e<-32768||t>32767||e>32767)throw Error("Vertex coordinates are out of signed 16 bit integer range.");let r=Math.round(t)|0,i=Math.round(e)|0,n=this._getKey(r,i);if(this._vertexDictionary.has(n))return this._vertexDictionary.get(n);let a=this._vertexBuffer.length/2;return this._vertexDictionary.set(n,a),this._vertexBuffer.push(r,i),a}_subdivideTrianglesScanline(t){if(this._granularity<2)return gx(this._vertexBuffer,t);let e=[],r=t.length;for(let i=0;i<r;i+=3){let n=[t[i+0],t[i+1],t[i+2]],a=[this._vertexBuffer[t[i+0]*2+0],this._vertexBuffer[t[i+0]*2+1],this._vertexBuffer[t[i+1]*2+0],this._vertexBuffer[t[i+1]*2+1],this._vertexBuffer[t[i+2]*2+0],this._vertexBuffer[t[i+2]*2+1]],s=1/0,o=1/0,l=-1/0,u=-1/0;for(let d=0;d<3;d++){let y=a[d*2],m=a[d*2+1];s=Math.min(s,y),l=Math.max(l,y),o=Math.min(o,m),u=Math.max(u,m)}if(s===l||o===u)continue;let h=Math.floor(s/this._granularityCellSize),c=Math.ceil(l/this._granularityCellSize),p=Math.floor(o/this._granularityCellSize),f=Math.ceil(u/this._granularityCellSize);if(h===c&&p===f){e.push(...n);continue}for(let d=p;d<f;d++){let y=this._scanlineGenerateVertexRingForCellRow(d,a,n);xx(this._vertexBuffer,y,e)}}return e}_scanlineGenerateVertexRingForCellRow(t,e,r){let i=t*this._granularityCellSize,n=i+this._granularityCellSize,a=[];for(let s=0;s<3;s++){let o=e[s*2],l=e[s*2+1],u=e[(s+1)*2%6],h=e[((s+1)*2+1)%6],c=e[(s+2)*2%6],p=e[((s+2)*2+1)%6],f=u-o,d=h-l,y=f===0,m=d===0,g=(i-l)/d,x=(n-l)/d,v=Math.min(g,x),b=Math.max(g,x);if(!m&&(v>=1||b<=0)||m&&(l<i||l>n)){h>=i&&h<=n&&a.push(r[(s+1)%3]);continue}if(!m&&v>0){let _=o+f*v,S=l+d*v;a.push(this._vertexToIndex(_,S))}let D=o+f*Math.max(v,0),A=o+f*Math.min(b,1);if(y||this._generateIntraEdgeVertices(a,o,l,u,h,D,A),!m&&b<1){let _=o+f*b,S=l+d*b;a.push(this._vertexToIndex(_,S))}(m||h>=i&&h<=n)&&a.push(r[(s+1)%3]),!m&&(h<=i||h>=n)&&this._generateInterEdgeVertices(a,o,l,u,h,c,p,A,i,n)}return a}_generateIntraEdgeVertices(t,e,r,i,n,a,s){let o=i-e,l=n-r,u=l===0,h=u?Math.min(e,i):Math.min(a,s),c=u?Math.max(e,i):Math.max(a,s),p=Math.floor(h/this._granularityCellSize)+1,f=Math.ceil(c/this._granularityCellSize)-1;if(u?e<i:a<s)for(let d=p;d<=f;d++){let y=d*this._granularityCellSize,m=r+l*(y-e)/o;t.push(this._vertexToIndex(y,m))}else for(let d=f;d>=p;d--){let y=d*this._granularityCellSize,m=r+l*(y-e)/o;t.push(this._vertexToIndex(y,m))}}_generateInterEdgeVertices(t,e,r,i,n,a,s,o,l,u){let h=n-r,c=a-i,p=s-n,f=(l-n)/p,d=(u-n)/p,y=Math.min(f,d),m=Math.max(f,d),g=i+c*y,x=Math.floor(Math.min(g,o)/this._granularityCellSize)+1,v=Math.ceil(Math.max(g,o)/this._granularityCellSize)-1,b=o<g,D=p===0;if(D&&(s===l||s===u))return;if(D||y>=1||m<=0){let _=e-a,S=r-s,k=(l-s)/S,z=(u-s)/S,O=a+_*Math.min(k,z);x=Math.floor(Math.min(O,o)/this._granularityCellSize)+1,v=Math.ceil(Math.max(O,o)/this._granularityCellSize)-1,b=o<O}let A=h>0?u:l;if(b)for(let _=x;_<=v;_++){let S=_*this._granularityCellSize;t.push(this._vertexToIndex(S,A))}else for(let _=v;_>=x;_--){let S=_*this._granularityCellSize;t.push(this._vertexToIndex(S,A))}}_generateOutline(t){let e=[];for(let r of t){let i=cr(r,this._granularity,!0),n=this._pointArrayToIndices(i),a=[];for(let s=1;s<n.length;s++)a.push(n[s-1]),a.push(n[s]);e.push(a)}return e}_handlePoles(t){let e=!1,r=!1;this._canonical&&(this._canonical.y===0&&(e=!0),this._canonical.y===(1<<this._canonical.z)-1&&(r=!0)),(e||r)&&this._fillPoles(t,e,r)}_ensureNoPoleVertices(){let t=this._vertexBuffer;for(let e=0;e<t.length;e+=2){let r=t[e+1];r===-32768&&(t[e+1]=-32767),r===32767&&(t[e+1]=32766)}}_generatePoleQuad(t,e,r,i,n,a){i>n==(a===-32768)?(t.push(r),t.push(e),t.push(this._vertexToIndex(i,a)),t.push(this._vertexToIndex(n,a)),t.push(r),t.push(this._vertexToIndex(i,a))):(t.push(e),t.push(r),t.push(this._vertexToIndex(i,a)),t.push(r),t.push(this._vertexToIndex(n,a)),t.push(this._vertexToIndex(i,a)))}_fillPoles(t,e,r){let i=this._vertexBuffer,n=mt,a=t.length;for(let s=2;s<a;s+=3){let o=t[s-2],l=t[s-1],u=t[s],h=i[o*2],c=i[o*2+1],p=i[l*2],f=i[l*2+1],d=i[u*2],y=i[u*2+1];e&&(c===0&&f===0&&this._generatePoleQuad(t,o,l,h,p,Us),f===0&&y===0&&this._generatePoleQuad(t,l,u,p,d,Us),y===0&&c===0&&this._generatePoleQuad(t,u,o,d,h,Us)),r&&(c===n&&f===n&&this._generatePoleQuad(t,o,l,h,p,qs),f===n&&y===n&&this._generatePoleQuad(t,l,u,p,d,qs),y===n&&c===n&&this._generatePoleQuad(t,u,o,d,h,qs))}}_initializeVertices(t){for(let e=0;e<t.length;e+=2)this._vertexToIndex(t[e],t[e+1])}subdividePolygonInternal(t,e){var s;if(this._used)throw Error("Subdivision: multiple use not allowed.");this._used=!0;let{flattened:r,holeIndices:i}=mx(t);this._initializeVertices(r);let n;try{let o=Zg(r,i),l=this._convertIndices(r,o);n=this._subdivideTrianglesScanline(l)}catch(o){console.error(o)}let a=[];return e&&(a=this._generateOutline(t)),this._ensureNoPoleVertices(),this._handlePoles(n),this._granularity>=2&&((s=this._canonical)==null?void 0:s.z)===0&&(n=this._removeTrianglesOutsideTileX(n),a=a.map(o=>this._removeLinesOutsideTileX(o))),{verticesFlattened:this._vertexBuffer,indicesTriangles:n,indicesLineList:a}}_vertexOutsideTileX(t){let e=this._vertexBuffer[t*2];return e<0||e>8192}_removeTrianglesOutsideTileX(t){let e=[];for(let r=0;r<t.length;r+=3)this._vertexOutsideTileX(t[r])||this._vertexOutsideTileX(t[r+1])||this._vertexOutsideTileX(t[r+2])||e.push(t[r],t[r+1],t[r+2]);return e}_removeLinesOutsideTileX(t){let e=[];for(let r=0;r<t.length;r+=2)this._vertexOutsideTileX(t[r])||this._vertexOutsideTileX(t[r+1])||e.push(t[r],t[r+1]);return e}_convertIndices(t,e){let r=[];for(let i of e){let n=t[i*2],a=t[i*2+1];r.push(this._vertexToIndex(n,a))}return r}_pointArrayToIndices(t){let e=[];for(let r of t)e.push(this._vertexToIndex(r.x,r.y));return e}};function cd(t,e,r,i=!0){return new yx(r,e).subdividePolygonInternal(t,i)}function cr(t,e,r=!1){if(!t||t.length<1||t.length<2)return[];let i=t[0],n=t[t.length-1],a=r&&(i.x!==n.x||i.y!==n.y);if(e<2)return a?[...t,t[0]]:[...t];let s=Math.floor(mt/e),o=[];o.push(new B(t[0].x,t[0].y));let l=t.length,u=a?l:l-1;for(let h=0;h<u;h++){let c=t[h],p=h<l-1?t[h+1]:t[0],f=c.x,d=c.y,y=p.x,m=p.y,g=f!==y,x=d!==m;if(!g&&!x)continue;let v=y-f,b=m-d,D=Math.abs(v),A=Math.abs(b),_=f,S=d;for(;;){let z=v>0?(Math.floor(_/s)+1)*s:(Math.ceil(_/s)-1)*s,O=b>0?(Math.floor(S/s)+1)*s:(Math.ceil(S/s)-1)*s,P=Math.abs(_-z),L=Math.abs(S-O),F=Math.abs(_-y),$=Math.abs(S-m),U=g?P/D:1/0,T=x?L/A:1/0;if((F<=P||!g)&&($<=L||!x))break;if(U<T&&g||!x){_=z,S+=b*U;let q=new B(_,Math.round(S));(o[o.length-1].x!==q.x||o[o.length-1].y!==q.y)&&o.push(q)}else{_+=v*T,S=O;let q=new B(Math.round(_),S);(o[o.length-1].x!==q.x||o[o.length-1].y!==q.y)&&o.push(q)}}let k=new B(y,m);(o[o.length-1].x!==k.x||o[o.length-1].y!==k.y)&&o.push(k)}return o}function mx(t){let e=[],r=[];for(let i of t)if(i.length!==0){i!==t[0]&&e.push(r.length/2);for(let n of i)r.push(n.x),r.push(n.y)}return{flattened:r,holeIndices:e}}function gx(t,e){let r=[];for(let i=0;i<e.length;i+=3){let n=e[i],a=e[i+1],s=e[i+2],o=t[n*2],l=t[n*2+1],u=t[a*2],h=t[a*2+1],c=t[s*2],p=t[s*2+1],f=u-o,d=h-l,y=c-o;f*(p-l)-d*y>0?(r.push(n),r.push(s),r.push(a)):(r.push(n),r.push(a),r.push(s))}return r}function xx(t,e,r){if(e.length===0)throw Error("Subdivision vertex ring is empty.");let i=0,n=t[e[0]*2];for(let l=1;l<e.length;l++){let u=t[e[l]*2];u<n&&(n=u,i=l)}let a=e.length,s=i,o=(s+1)%a;for(;;){let l=s-1>=0?s-1:a-1,u=(o+1)%a,h=t[e[l]*2],c=t[e[l]*2+1],p=t[e[u]*2],f=t[e[u]*2+1],d=t[e[s]*2],y=t[e[s]*2+1],m=t[e[o]*2],g=t[e[o]*2+1],x=!1;if(h<p)x=!0;else if(h>p)x=!1;else{let v=g-y,b=-(m-d),D=y<g?1:-1;((h-d)*v+(c-y)*b)*D>((p-d)*v+(f-y)*b)*D&&(x=!0)}if(x){let v=e[l],b=e[s],D=e[o];v!==b&&v!==D&&b!==D&&r.push(D,b,v),s--,s<0&&(s=a-1)}else{let v=e[u],b=e[s],D=e[o];v!==b&&v!==D&&b!==D&&r.push(D,b,v),o++,o>=a&&(o=0)}if(l===u)break}}function pd(t,e,r,i,n,a,s,o,l){let u=n.length/2,h=s&&o&&l;if(u<ee.MAX_VERTEX_ARRAY_LENGTH){let c=e.prepareSegment(u,r,i),p=c.vertexLength;for(let y=0;y<a.length;y+=3)i.emplaceBack(p+a[y],p+a[y+1],p+a[y+2]);c.vertexLength+=u,c.primitiveLength+=a.length/3;let f,d;h&&(d=s.prepareSegment(u,r,o),f=d.vertexLength,d.vertexLength+=u);for(let y=0;y<n.length;y+=2)t(n[y],n[y+1]);if(h)for(let y of l){for(let m=1;m<y.length;m+=2)o.emplaceBack(f+y[m-1],f+y[m]);d.primitiveLength+=y.length/2}}else vx(e,r,i,n,a,t),h&&bx(s,r,o,n,l,t),e.forceNewSegmentOnNextPrepare(),s==null||s.forceNewSegmentOnNextPrepare()}function Zi(t,e,r,i,n,a,s){if(a){let o=i.count;return r(e[n*2],e[n*2+1]),t[n]=i.count,i.count++,s.vertexLength++,o}return t[n]}function vx(t,e,r,i,n,a){let s=[];for(let c=0;c<i.length/2;c++)s.push(-1);let o={count:0},l=0,u=t.getOrCreateLatestSegment(e,r),h=u.vertexLength;for(let c=2;c<n.length;c+=3){let p=n[c-2],f=n[c-1],d=n[c],y=s[p]<l,m=s[f]<l,g=s[d]<l,x=+!!y+ +!!m+ +!!g;u.vertexLength+x>ee.MAX_VERTEX_ARRAY_LENGTH&&(u=t.createNewSegment(e,r),l=o.count,y=!0,m=!0,g=!0,h=0);let v=Zi(s,i,a,o,p,y,u),b=Zi(s,i,a,o,f,m,u),D=Zi(s,i,a,o,d,g,u);r.emplaceBack(h+v-l,h+b-l,h+D-l),u.primitiveLength++}}function bx(t,e,r,i,n,a){let s=[];for(let c=0;c<i.length/2;c++)s.push(-1);let o={count:0},l=0,u=t.getOrCreateLatestSegment(e,r),h=u.vertexLength;for(let c of n)for(let p=1;p<c.length;p+=2){let f=c[p-1],d=c[p],y=s[f]<l,m=s[d]<l,g=+!!y+ +!!m;u.vertexLength+g>ee.MAX_VERTEX_ARRAY_LENGTH&&(u=t.createNewSegment(e,r),l=o.count,y=!0,m=!0,h=0);let x=Zi(s,i,a,o,f,y,u),v=Zi(s,i,a,o,d,m,u);r.emplaceBack(h+x-l,h+v-l),u.primitiveLength++}}var fd=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.sdfPatterns={},this.patternFeatures=[],this.layoutVertexArray=new Km,this.indexArray=new wn,this.indexArray2=new Io,this.programConfigurations=new vr(t.layers,t.zoom),this.segments=new ee,this.segments2=new ee,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){this.hasDependencies=Aa("fill",this.layers,e);let i=this.layers[0].layout.get("fill-sort-key"),n=!i.isConstant(),a=[],s=new st(this.zoom),o=this.layers[0]._featureFilter.needGeometry;for(let{feature:l,id:u,index:h,sourceLayerIndex:c}of t){let p=hi(l,o);if(!this.layers[0]._featureFilter.filter(s,p,r))continue;let f=n?i.evaluate(p,{},r,e.availableImages):void 0,d={id:u,properties:l.properties,type:l.type,sourceLayerIndex:c,index:h,geometry:o?p.geometry:Ar(l),patterns:{},sortKey:f};a.push(d)}n&&a.sort((l,u)=>l.sortKey-u.sortKey);for(let l of a){let{geometry:u,index:h,sourceLayerIndex:c}=l;if(this.hasDependencies){let f=Gl("fill",this.layers,l,{zoom:this.zoom},e);this.patternFeatures.push(f)}else this.addFeature(l,u,h,r,{},e.subdivisionGranularity);let p=t[h].feature;e.featureIndex.insert(p,u,h,c,this.index)}}update(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r})}addFeatures({options:t,canonical:e,patternPositions:r,patternMap:i}){this.detectSdfPatterns(i);for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,e,r,t.subdivisionGranularity)}detectSdfPatterns(t){for(let e of this.patternFeatures)for(let r in e.patterns){let i=e.patterns[r];this.recordSdfPattern(r,t[i.min]),this.recordSdfPattern(r,t[i.mid]),this.recordSdfPattern(r,t[i.max])}for(let e of this.layers){let r=e.paint.get("fill-pattern").constantOr(null);r&&(this.recordSdfPattern(e.id,t[r.from.toString()]),this.recordSdfPattern(e.id,t[r.to.toString()]))}}recordSdfPattern(t,e){if(!e)return;let r=e.sdf===!0,i=this.sdfPatterns[t];i===void 0?this.sdfPatterns[t]=r:i!==r&&Bt(`Style sheet warning: Cannot mix SDF and non-SDF fill patterns in layer "${t}"`)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Wg),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),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(t,e,r,i,n,a){for(let s of Ra(e,500)){let o=cd(s,i,a.fill.getGranularityForZoomLevel(i.z)),l=this.layoutVertexArray;pd((u,h)=>{l.emplaceBack(u,h)},this.segments,this.layoutVertexArray,this.indexArray,o.verticesFlattened,o.indicesTriangles,this.segments2,this.indexArray2,o.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{imagePositions:n,canonical:i})}};C("FillBucket",fd,{omit:["layers","patternFeatures"]});var wx,Dx=()=>wx||(wx=new Xt({"fill-sort-key":new N(w.layout_fill["fill-sort-key"],"fill-sort-key")})),_x,Ax=()=>_x||(_x=new Xt({"fill-antialias":new V(w.paint_fill["fill-antialias"],"fill-antialias"),"fill-opacity":new N(w.paint_fill["fill-opacity"],"fill-opacity"),"fill-layer-opacity":new V(w.paint_fill["fill-layer-opacity"],"fill-layer-opacity"),"fill-color":new N(w.paint_fill["fill-color"],"fill-color"),"fill-outline-color":new N(w.paint_fill["fill-outline-color"],"fill-outline-color"),"fill-translate":new V(w.paint_fill["fill-translate"],"fill-translate"),"fill-translate-anchor":new V(w.paint_fill["fill-translate-anchor"],"fill-translate-anchor"),"fill-pattern":new on(w.paint_fill["fill-pattern"],"fill-pattern")})),Sx={get paint(){return Ax()},get layout(){return Dx()}};var Ex=class extends de{constructor(t,e){super(t,Sx,e)}recalculate(t,e){super.recalculate(t,e);let r=this.paint._values["fill-outline-color"];r.value.kind==="constant"&&r.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(t){return new fd(t)}queryRadius(){return Ha(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:t,geometry:e,transform:r,pixelsToTileUnits:i}){return Qf(Ka(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-r.bearingInRadians,i),e)}isTileClipped(){return!0}},Go=At([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Fx=At([{name:"a_centroid",components:2,type:"Int16"}],4),kx=Go.members;Go.size,Go.alignment;var Fa=class Xo{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(e){return this.minX=Math.min(this.minX,e.x),this.minY=Math.min(this.minY,e.y),this.maxX=Math.max(this.maxX,e.x),this.maxY=Math.max(this.maxY,e.y),this}expandBy(e){return this.minX-=e,this.minY-=e,this.maxX+=e,this.maxY+=e,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(e){return this.expandBy(-e)}map(e){let r=new Xo;return r.extend(e(new B(this.minX,this.minY))),r.extend(e(new B(this.maxX,this.minY))),r.extend(e(new B(this.minX,this.maxY))),r.extend(e(new B(this.maxX,this.maxY))),r}static fromPoints(e){let r=new Xo;for(let i of e)r.extend(i);return r}contains(e){return e.x>=this.minX&&e.x<=this.maxX&&e.y>=this.minY&&e.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(e){return!this.empty()&&!e.empty()&&e.minX>=this.minX&&e.maxX<=this.maxX&&e.minY>=this.minY&&e.maxY<=this.maxY}intersects(e){return!this.empty()&&!e.empty()&&e.minX<=this.maxX&&e.maxX>=this.minX&&e.minY<=this.maxY&&e.maxY>=this.minY}},g5=Fa.fromPoints([new B(0,0),new B(mt,mt)]);function Yo(t,e){return t.x===e.x&&(t.x<0||t.x>8192)||t.y===e.y&&(t.y<0||t.y>8192)}function rc(t){return t.every(e=>e.x<0)||t.every(e=>e.x>8192)||t.every(e=>e.y<0)||t.every(e=>e.y>8192)}var Dn=class{constructor(t,e,r,i,n){for(this.properties=Object.create(null),this.extent=r,this.type=0,this.id=void 0,this._pbf=t,this._geometry=-1,this._keys=i,this._values=n;t.pos<e;){let a=t.readVarint();if(a===8)this.id=t.readVarint();else if(a===18){let s=t.readVarint()+t.pos;for(;t.pos<s;){let o=i[t.readVarint()],l=n[t.readVarint()];this.properties[o]=l}}else a===24?this.type=t.readVarint():(a===34&&(this._geometry=t.pos),t.skip(a))}}loadGeometry(){if(this._geometry<0)throw Error("feature has no geometry");let t=this._pbf;t.pos=this._geometry;let e=t.readVarint()+t.pos,r=[],i,n=1,a=0,s=0,o=0;for(;t.pos<e;){if(a<=0){let l=t.readVarint();if(n=l&7,a=l>>3,a===0)continue}if(a--,n===1)s+=t.readSVarint(),o+=t.readSVarint(),i&&r.push(i),i=[new B(s,o)];else if(n===2)s+=t.readSVarint(),o+=t.readSVarint(),i&&i.push(new B(s,o));else if(n===7)i&&i.push(i[0].clone());else throw Error(`unknown command ${n}`)}return i&&r.push(i),r}bbox(){if(this._geometry<0)throw Error("feature has no geometry");let t=this._pbf;t.pos=this._geometry;let e=t.readVarint()+t.pos,r=1,i=0,n=0,a=0,s=1/0,o=-1/0,l=1/0,u=-1/0;for(;t.pos<e;){if(i<=0){let h=t.readVarint();if(r=h&7,i=h>>3,i===0)continue}if(i--,r===1||r===2)n+=t.readSVarint(),a+=t.readSVarint(),n<s&&(s=n),n>o&&(o=n),a<l&&(l=a),a>u&&(u=a);else if(r!==7)throw Error(`unknown command ${r}`)}return[s,l,o,u]}toGeoJSON(t,e,r){let i=this.extent*2**r,n=this.extent*t,a=this.extent*e,s=this.loadGeometry();function o(c){return[(c.x+n)*360/i-180,360/Math.PI*Math.atan(Math.exp((1-(c.y+a)*2/i)*Math.PI))-90]}function l(c){return c.map(o)}let u;if(this.type===1){let c=[];for(let f of s)c.push(f[0]);let p=l(c);u=c.length===1?{type:"Point",coordinates:p[0]}:{type:"MultiPoint",coordinates:p}}else if(this.type===2){let c=s.map(l);u=c.length===1?{type:"LineString",coordinates:c[0]}:{type:"MultiLineString",coordinates:c}}else if(this.type===3){let c=dd(s),p=[];for(let f of c)p.push(f.map(l));u=p.length===1?{type:"Polygon",coordinates:p[0]}:{type:"MultiPolygon",coordinates:p}}else throw Error("unknown feature type");let h={type:"Feature",geometry:u,properties:this.properties};return this.id!=null&&(h.id=this.id),h}};Dn.types=["Unknown","Point","LineString","Polygon"];function dd(t){let e=t.length;if(e<=1)return[t];let r=[],i,n;for(let a=0;a<e;a++){let s=Tx(t[a]);s!==0&&(n===void 0&&(n=s<0),n===s<0?(i&&r.push(i),i=[t[a]]):i&&i.push(t[a]))}return i&&r.push(i),r}function Tx(t){let e=0;for(let r=0,i=t.length,n=i-1,a,s;r<i;n=r++)a=t[r],s=t[n],e+=(s.x-a.x)*(a.y+s.y);return e}var Ix=class{constructor(t,e){for(this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],e===void 0&&(e=t.length);t.pos<e;){let r=t.readVarint();r===10?this.name=t.readString():r===18?(this._features.push(t.pos),t.skip(r)):r===26?this._keys.push(t.readString()):r===34?this._values.push(Cx(t)):r===40?this.extent=t.readVarint():r===120?this.version=t.readVarint():t.skip(r)}this.length=this._features.length}feature(t){if(t<0||t>=this._features.length)throw Error("feature index out of bounds");this._pbf.pos=this._features[t];let e=this._pbf.readVarint()+this._pbf.pos;return new Dn(this._pbf,e,this.extent,this._keys,this._values)}};function Cx(t){let e=null,r=t.readVarint()+t.pos;for(;t.pos<r;){let i=t.readVarint();e=i===10?t.readString():i===21?t.readFloat():i===25?t.readDouble():i===32?t.readVarint(!0):i===40?t.readVarint():i===48?t.readSVarint():i===56?t.readBoolean():(t.skip(i),null)}if(e==null)throw Error("unknown feature value");return e}var Xl=class{constructor(t,e=t.length){let r=Object.create(null);for(;t.pos<e;){let i=t.readVarint();if(i===26){let n=new Ix(t,t.readVarint()+t.pos);n.length&&(r[n.name]=n)}else t.skip(i)}this.layers=r}},yd=63710088e-1,ic=class Ui{constructor(e,r){if(isNaN(e)||isNaN(r))throw Error(`Invalid LngLat object: (${e}, ${r})`);if(this.lng=+e,this.lat=+r,this.lat>90||this.lat<-90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Ui(F1(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){let r=Math.PI/180,i=this.lat*r,n=e.lat*r,a=Math.sin(i)*Math.sin(n)+Math.cos(i)*Math.cos(n)*Math.cos((e.lng-this.lng)*r);return yd*Math.acos(Math.min(a,1))}static convert(e){if(e instanceof Ui)return e;if(Array.isArray(e)&&(e.length===2||e.length===3))return new Ui(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&typeof e=="object"&&e)return new Ui(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw 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>]")}},md=2*Math.PI*yd;function gd(t){return md*Math.cos(t*Math.PI/180)}function Mx(t){return(180+t)/360}function Bx(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Px(t,e){return t/gd(e)}function zx(t){return t*360-180}function Wo(t){let e=180-t*360;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}function Lx(t,e){return t*gd(Wo(e))}function Vx(t){return 1/Math.cos(t*Math.PI/180)}var Yl=class xd{constructor(e,r,i=0){this.x=+e,this.y=+r,this.z=+i}static fromLngLat(e,r=0){let i=ic.convert(e);return new xd(Mx(i.lng),Bx(i.lat),Px(r,i.lat))}toLngLat(){return new ic(zx(this.x),Wo(this.y))}toAltitude(){return Lx(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/md*Vx(Wo(this.y))}};function Ox(t,e,r){let i=1/(1<<r.z);return new Yl(t/mt*i+r.x*i,e/mt*i+r.y*i)}function Rx(t,e,r){return Ox(t,e,r).toLngLat()}function nc(t,e,r){if(e<=0||!t||t.length===0)return t;let i=$x(e,r);return t.map(n=>Nx(n,i))}function $x(t,e){let r=Rx(mt/2,mt/2,e),i=Yl.fromLngLat(r).meterInMercatorCoordinateUnits(),n=(1<<e.z)*mt;return t*i*n}function Nx(t,e){if(!t||t.length<3)return t;let r=t[0].x===t[t.length-1].x&&t[0].y===t[t.length-1].y,i=r?t.length-1:t.length;if(i<3)return t;let n=[];for(let s=0;s<i;s++){let o=t[(s-1+i)%i],l=t[s],u=t[(s+1)%i];if(Yo(o,l)||Yo(l,u)){n.push(l.clone());continue}qx(n,o,l,u,e)}let a=Ux(n);return a.length<3?t:(r&&a.push(a[0].clone()),a)}function Ux(t){let e=[];for(let r of t){let i=r.round(),n=e[e.length-1];((n==null?void 0:n.x)!==i.x||(n==null?void 0:n.y)!==i.y)&&e.push(i)}for(;e.length>1&&e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y;)e.pop();return e}function qx(t,e,r,i,n){let a=e.sub(r),s=i.sub(r),o=a.mag(),l=s.mag();if(o<1e-6||l<1e-6){t.push(r.clone());return}a._div(o),s._div(l);let u=a.x*s.x+a.y*s.y;if(Math.abs(u)>Math.cos(5*Math.PI/180)){t.push(r.clone());return}let h=.2,c=Math.min(n,o*h,l*h),p=r.add(a.mult(c)),f=r.add(s.mult(c)),d=Math.sqrt((1+u)/2),y=r.add(a.add(s)._unit()._mult(c/d)),m=p.sub(y).angleWith(f.sub(y)),g=Math.max(2,Math.ceil(Math.abs(m)/(Math.PI/6)-1e-6));for(let x=0;x<=g;x++)t.push(p.rotateAround(x/g*m,y))}var js=8192;function Mi(t,e,r,i,n,a,s,o){t.emplaceBack(e,r,Math.floor(i*js)*2+s,n*js*2,a*js*2,Math.round(o))}var vd=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new Jm,this.centroidVertexArray=new Zm,this.indexArray=new wn,this.programConfigurations=new vr(t.layers,t.zoom),this.segments=new ee,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){this.features=[],this.hasDependencies=Aa("fill-extrusion",this.layers,e);let i=new st(this.zoom),n=this.layers[0],a=n.layout.get("fill-extrusion-rounded-corner-distance"),s=n._featureFilter.needGeometry;for(let{feature:o,id:l,index:u,sourceLayerIndex:h}of t){let c=hi(o,s);if(!n._featureFilter.filter(i,c,r))continue;let p=s?c.geometry:Ar(o),f={id:l,sourceLayerIndex:h,index:u,geometry:a>0?nc(p,a,r):p,properties:o.properties,type:o.type,patterns:{}};this.hasDependencies?this.features.push(Gl("fill-extrusion",this.layers,f,{zoom:this.zoom},e)):this.addFeature(f,f.geometry,u,r,{},e.subdivisionGranularity),e.featureIndex.insert(o,f.geometry,u,h,this.index,!0)}}addFeatures({options:t,canonical:e,patternPositions:r}){for(let i of this.features){let{geometry:n}=i;this.addFeature(i,n,i.index,e,r,t.subdivisionGranularity)}}update(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,kx),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,Fx.members,!0),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(t,e,r,i,n,a){let s=this.layers[0],o=s.layout?s.layout.get("fill-extrusion-rounded-corner-distance"):0,l=o>0?nc(e,o,i):e;for(let u of Ra(l,500)){let h={x:0,y:0,sampleCount:0},c=this.layoutVertexArray.length;this.processPolygon(h,i,t,u,a);let p=this.layoutVertexArray.length-c,f=Math.floor(h.x/h.sampleCount),d=Math.floor(h.y/h.sampleCount);for(let y=0;y<p;y++)this.centroidVertexArray.emplaceBack(f,d)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{imagePositions:n,canonical:i})}processPolygon(t,e,r,i,n){if(i.length<1||rc(i[0]))return;for(let h of i)h.length!==0&&jx(t,h);let a={segment:this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)},s=n.fill.getGranularityForZoomLevel(e.z),o=Dn.types[r.type]==="Polygon";for(let h of i){if(h.length===0||rc(h))continue;let c=cr(h,s,o);this._generateSideFaces(c,a)}if(!o)return;let l=cd(i,e,s,!1),u=this.layoutVertexArray;pd((h,c)=>{Mi(u,h,c,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles)}_generateSideFaces(t,e){let r=0;for(let i=1;i<t.length;i++){let n=t[i],a=t[i-1];if(Yo(n,a))continue;e.segment.vertexLength+4>ee.MAX_VERTEX_ARRAY_LENGTH&&(e.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let s=n.sub(a)._perp()._unit(),o=a.dist(n);r+o>32768&&(r=0),Mi(this.layoutVertexArray,n.x,n.y,s.x,s.y,0,0,r),Mi(this.layoutVertexArray,n.x,n.y,s.x,s.y,0,1,r),r+=o,Mi(this.layoutVertexArray,a.x,a.y,s.x,s.y,0,0,r),Mi(this.layoutVertexArray,a.x,a.y,s.x,s.y,0,1,r);let l=e.segment.vertexLength;this.indexArray.emplaceBack(l,l+2,l+1),this.indexArray.emplaceBack(l+1,l+2,l+3),e.segment.vertexLength+=4,e.segment.primitiveLength+=2}}};function jx(t,e){for(let r=0;r<e.length;r++){let i=e[r];(r!==e.length-1||e[0].x!==i.x||e[0].y!==i.y)&&(t.x+=i.x,t.y+=i.y,t.sampleCount++)}}C("FillExtrusionBucket",vd,{omit:["layers","features"]});var Gx,Xx=()=>Gx||(Gx=new Xt({"fill-extrusion-rounded-corner-distance":new V(w["layout_fill-extrusion"]["fill-extrusion-rounded-corner-distance"],"fill-extrusion-rounded-corner-distance")})),Yx,Wx=()=>Yx||(Yx=new Xt({"fill-extrusion-opacity":new V(w["paint_fill-extrusion"]["fill-extrusion-opacity"],"fill-extrusion-opacity"),"fill-extrusion-color":new N(w["paint_fill-extrusion"]["fill-extrusion-color"],"fill-extrusion-color"),"fill-extrusion-translate":new V(w["paint_fill-extrusion"]["fill-extrusion-translate"],"fill-extrusion-translate"),"fill-extrusion-translate-anchor":new V(w["paint_fill-extrusion"]["fill-extrusion-translate-anchor"],"fill-extrusion-translate-anchor"),"fill-extrusion-pattern":new on(w["paint_fill-extrusion"]["fill-extrusion-pattern"],"fill-extrusion-pattern"),"fill-extrusion-height":new N(w["paint_fill-extrusion"]["fill-extrusion-height"],"fill-extrusion-height"),"fill-extrusion-base":new N(w["paint_fill-extrusion"]["fill-extrusion-base"],"fill-extrusion-base"),"fill-extrusion-vertical-gradient":new V(w["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"],"fill-extrusion-vertical-gradient")})),Zx={get paint(){return Wx()},get layout(){return Xx()}};var Hx=class extends de{constructor(t,e){super(t,Zx,e)}createBucket(t){return new vd(t)}queryRadius(){return Ha(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,pixelPosMatrix:s}){let o=Ka(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-n.bearingInRadians,a),l=this.paint.get("fill-extrusion-height").evaluate(e,r),u=this.paint.get("fill-extrusion-base").evaluate(e,r),h=Qx(o,s,0),c=Jx(i,u,l,s),p=c[0],f=c[1];return Kx(p,f,h)}};function Bi(t,e){return t.x*e.x+t.y*e.y}function ac(t,e){if(t.length===1){let r=0,i=e[r++],n;for(;!n||i.equals(n);)if(n=e[r++],!n)return 1/0;for(;r<e.length;r++){let a=e[r],s=t[0],o=n.sub(i),l=a.sub(i),u=s.sub(i),h=Bi(o,o),c=Bi(o,l),p=Bi(l,l),f=Bi(u,o),d=Bi(u,l),y=h*p-c*c,m=(p*f-c*d)/y,g=(h*d-c*f)/y,x=1-m-g,v=i.z*x+n.z*m+a.z*g;if(isFinite(v))return v}return 1/0}{let r=1/0;for(let i of e)r=Math.min(r,i.z);return r}}function Kx(t,e,r){let i=1/0;Qf(r,e)&&(i=ac(r,e[0]));for(let n=0;n<e.length;n++){let a=e[n],s=t[n];for(let o=0;o<a.length-1;o++){let l=a[o],u=a[o+1],h=s[o],c=[l,u,s[o+1],h,l];yg(r,c)&&(i=Math.min(i,ac(r,c)))}}return i!==1/0&&i}function Jx(t,e,r,i){let n=[],a=[],s=i[8]*e,o=i[9]*e,l=i[10]*e,u=i[11]*e,h=i[8]*r,c=i[9]*r,p=i[10]*r,f=i[11]*r;for(let d of t){let y=[],m=[];for(let g of d){let x=g.x,v=g.y,b=i[0]*x+i[4]*v+i[12],D=i[1]*x+i[5]*v+i[13],A=i[2]*x+i[6]*v+i[14],_=i[3]*x+i[7]*v+i[15],S=b+s,k=D+o,z=A+l,O=_+u,P=b+h,L=D+c,F=A+p,$=_+f,U=new B(S/O,k/O);U.z=z/O,y.push(U);let T=new B(P/$,L/$);T.z=F/$,m.push(T)}n.push(y),a.push(m)}return[n,a]}function Qx(t,e,r){let i=[];for(let n of t){let a=[n.x,n.y,r,1];w1(a,a,e),i.push(new B(a[0]/a[3],a[1]/a[3]))}return i}function Zo(t,e,r,i){let n=i,a=e+(r-e>>1),s=r-e,o,l=t[e],u=t[e+1],h=t[r],c=t[r+1];for(let p=e+3;p<r;p+=3){let f=t2(t[p],t[p+1],l,u,h,c);if(f>n){o=p,n=f;continue}if(f===n){let d=Math.abs(p-a);d<s&&(o=p,s=d)}}n>i&&(o-e>3&&Zo(t,e,o,i),t[o+2]=n,r-o>3&&Zo(t,o,r,i))}function t2(t,e,r,i,n,a){let s=n-r,o=a-i;if(s!==0||o!==0){let l=((t-r)*s+(e-i)*o)/(s*s+o*o);l>1?(r=n,i=a):l>0&&(r+=s*l,i+=o*l)}return s=t-r,o=e-i,s*s+o*o}function Mt(t,e,r,i){let n={type:e,geom:r},a={id:t!=null?t:null,type:n.type,geometry:n.geom,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(n.type){case"Point":case"MultiPoint":Pi(a,n.geom);break;case"LineString":Pi(a,n.geom.points);break;case"Polygon":Pi(a,n.geom[0].points);break;case"MultiLineString":for(let s of n.geom)Pi(a,s.points);break;case"MultiPolygon":for(let s of n.geom)Pi(a,s[0].points)}return a}function Wl(t){let e=t;t.points.length>64&&(e.points=new Float64Array(t.points))}function Pi(t,e){for(let r=0;r<e.length;r+=3)t.minX=Math.min(t.minX,e[r]),t.minY=Math.min(t.minY,e[r+1]),t.maxX=Math.max(t.maxX,e[r]),t.maxY=Math.max(t.maxY,e[r+1])}function Zl(t,e){let r=[];switch(t.type){case"FeatureCollection":for(let i=0;i<t.features.length;i++)fa(r,t.features[i],e,i);break;case"Feature":fa(r,t,e);break;default:fa(r,{type:"Feature",geometry:t,properties:void 0},e)}return r}function fa(t,e,r,i,n=0){var o;if(!e.geometry)return;if(n>1024)throw Error("GeometryCollection nesting exceeds supported depth: 1024");if(e.geometry.type==="GeometryCollection"){r2(t,e,e.geometry,r,i,n+1);return}if(!((o=e.geometry.coordinates)!=null&&o.length))return;let a=e2(e,r,i),s=(r.tolerance/((1<<r.maxZoom)*r.extent))**2;switch(e.geometry.type){case"Point":i2(t,a,e.geometry,e.properties);return;case"MultiPoint":n2(t,a,e.geometry,e.properties);return;case"LineString":a2(t,a,e.geometry,s,e.properties);return;case"MultiLineString":s2(t,a,e.geometry,s,r,e.properties);return;case"Polygon":o2(t,a,e.geometry,s,e.properties);return;case"MultiPolygon":l2(t,a,e.geometry,s,e.properties);return;default:throw Error("Input data is not a valid GeoJSON object.")}}function e2(t,e,r){var i;return e.promoteId?(i=t.properties)==null?void 0:i[e.promoteId]:e.generateId?r||0:t.id}function r2(t,e,r,i,n,a=0){for(let s of r.geometries)fa(t,{id:e.id,type:"Feature",geometry:s,properties:e.properties},i,n,a)}function i2(t,e,r,i){let n=[];n.push(Zr(r.coordinates[0]),Hr(r.coordinates[1]),0),t.push(Mt(e,"Point",n,i))}function n2(t,e,r,i){let n=[];for(let a of r.coordinates)n.push(Zr(a[0]),Hr(a[1]),0);t.push(Mt(e,"MultiPoint",n,i))}function a2(t,e,r,i,n){let a={points:[]};Hl(r.coordinates,a,i,!1),t.push(Mt(e,"LineString",a,n))}function s2(t,e,r,i,n,a){if(n.lineMetrics)for(let s of r.coordinates){let o={points:[]};Hl(s,o,i,!1),t.push(Mt(e,"LineString",o,a))}else{let s=[];Kl(r.coordinates,s,i,!1),t.push(Mt(e,"MultiLineString",s,a))}}function o2(t,e,r,i,n){let a=[];Kl(r.coordinates,a,i,!0),t.push(Mt(e,"Polygon",a,n))}function l2(t,e,r,i,n){let a=[];for(let s of r.coordinates){let o=[];Kl(s,o,i,!0),a.push(o)}t.push(Mt(e,"MultiPolygon",a,n))}function Hl(t,e,r,i){let n,a,s=0;for(let l=0;l<t.length;l++){let u=Zr(t[l][0]),h=Hr(t[l][1]);e.points.push(u,h,0),l>0&&(s+=i?(n*h-u*a)/2:Math.sqrt((u-n)**2+(h-a)**2)),n=u,a=h}let o=e.points.length-3;e.points[2]=1,r>0&&Zo(e.points,0,o,r),e.points[o+2]=1,Wl(e),e.size=Math.abs(s),e.start=0,e.end=e.size}function Kl(t,e,r,i){for(let n=0;n<t.length;n++){let a={points:[]};Hl(t[n],a,r,i),e.push(a)}}function Zr(t){return t/360+.5}function Hr(t){let e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function u2(t){return{type:"FeatureCollection",features:t.map(e=>ka(e))}}function ka(t){let e={type:"Feature",geometry:h2(t),properties:t.tags};return t.id!=null&&(e.id=t.id),e}function h2(t){let{type:e,geometry:r}=t;switch(e){case"Point":return{type:e,coordinates:bd(r[0],r[1])};case"MultiPoint":return{type:e,coordinates:Kn(r)};case"LineString":return{type:e,coordinates:Kn(r.points)};case"MultiLineString":case"Polygon":return{type:e,coordinates:r.map(i=>Kn(i.points))};case"MultiPolygon":return{type:e,coordinates:r.map(i=>i.map(n=>Kn(n.points)))}}}function Kn(t){let e=[];for(let r=0;r<t.length;r+=3)e.push(bd(t[r],t[r+1]));return e}function bd(t,e){return[wd(t),Dd(e)]}function wd(t){return(t-.5)*360}function Dd(t){let e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function Te(t,e,r,i,n,a,s,o){if(r/=e,i/=e,a>=r&&s<i)return t;if(s<r||a>=i)return null;let l=[];for(let u of t){let h=n===0?u.minX:u.minY,c=n===0?u.maxX:u.maxY;if(h>=r&&c<i){l.push(u);continue}if(!(c<r||h>=i))switch(u.type){case"Point":case"MultiPoint":c2(u,l,r,i,n);continue;case"LineString":p2(u,l,r,i,n,o);continue;case"MultiLineString":f2(u,l,r,i,n);continue;case"Polygon":d2(u,l,r,i,n);continue;case"MultiPolygon":y2(u,l,r,i,n);continue}}return l.length?l:null}function c2(t,e,r,i,n){let a=[];if(m2(t.geometry,a,r,i,n),!a.length)return;let s=a.length===3?"Point":"MultiPoint";e.push(Mt(t.id,s,a,t.tags))}function p2(t,e,r,i,n,a){let s=[];if(_d(t.geometry,s,r,i,n,!1,a.lineMetrics),s.length){if(a.lineMetrics){for(let o of s)e.push(Mt(t.id,"LineString",o,t.tags));return}if(s.length>1){e.push(Mt(t.id,"MultiLineString",s,t.tags));return}e.push(Mt(t.id,"LineString",s[0],t.tags))}}function f2(t,e,r,i,n){let a=[];if(Jl(t.geometry,a,r,i,n,!1),a.length){if(a.length===1){e.push(Mt(t.id,"LineString",a[0],t.tags));return}e.push(Mt(t.id,"MultiLineString",a,t.tags))}}function d2(t,e,r,i,n){let a=[];Jl(t.geometry,a,r,i,n,!0),a.length&&e.push(Mt(t.id,"Polygon",a,t.tags))}function y2(t,e,r,i,n){let a=[];for(let s of t.geometry){let o=[];Jl(s,o,r,i,n,!0),o.length&&a.push(o)}a.length&&e.push(Mt(t.id,"MultiPolygon",a,t.tags))}function m2(t,e,r,i,n){for(let a=0;a<t.length;a+=3){let s=t[a+n];s>=r&&s<=i&&Kr(e,t[a],t[a+1],t[a+2])}}function _d(t,e,r,i,n,a,s){let o=sc(t),l=n===0?g2:x2,u=t.start,h,c;for(let g=0;g<t.points.length-3;g+=3){let x=t.points[g],v=t.points[g+1],b=t.points[g+2],D=t.points[g+3],A=t.points[g+4],_=n===0?x:v,S=n===0?D:A,k=!1;s&&(h=Math.sqrt((x-D)**2+(v-A)**2)),_<r?S>r&&(c=l(o,x,v,D,A,r),s&&(o.start=u+h*c)):_>i?S<i&&(c=l(o,x,v,D,A,i),s&&(o.start=u+h*c)):Kr(o.points,x,v,b),S<r&&_>=r&&(c=l(o,x,v,D,A,r),k=!0),S>i&&_<=i&&(c=l(o,x,v,D,A,i),k=!0),!a&&k&&(s&&(o.end=u+h*c),e.push(o),o=sc(t)),s&&(u+=h)}let p=t.points.length-3,f=t.points[p],d=t.points[p+1],y=t.points[p+2],m=n===0?f:d;m>=r&&m<=i&&Kr(o.points,f,d,y),p=o.points.length-3,a&&p>=3&&(o.points[p]!==o.points[0]||o.points[p+1]!==o.points[1])&&Kr(o.points,o.points[0],o.points[1],o.points[2]),o.points.length&&(Wl(o),e.push(o))}function sc(t){return{points:[],size:t.size,start:t.start,end:t.end}}function Jl(t,e,r,i,n,a){for(let s of t)_d(s,e,r,i,n,a,!1)}function Kr(t,e,r,i){t.push(e,r,i)}function g2(t,e,r,i,n,a){let s=(a-e)/(i-e);return Kr(t.points,a,r+(n-r)*s,1),s}function x2(t,e,r,i,n,a){let s=(a-r)/(n-r);return Kr(t.points,e+(i-e)*s,a,1),s}function Ql(t,e){let r=e.buffer/e.extent,i=t,n=Te(t,1,-1-r,r,0,-1,2,e),a=Te(t,1,1-r,2+r,0,-1,2,e);return!n&&!a||(i=Te(t,1,-r,1+r,0,-1,2,e)||[],n&&(i=oc(n,1).concat(i)),a&&(i=i.concat(oc(a,-1)))),i}function oc(t,e){let r=[];for(let i of t)switch(i.type){case"Point":case"MultiPoint":{let n=v2(i.geometry,e);r.push(Mt(i.id,i.type,n,i.tags));continue}case"LineString":{let n=Gs(i.geometry,e);r.push(Mt(i.id,i.type,n,i.tags));continue}case"MultiLineString":case"Polygon":{let n=[];for(let a of i.geometry)n.push(Gs(a,e));r.push(Mt(i.id,i.type,n,i.tags));continue}case"MultiPolygon":{let n=[];for(let a of i.geometry){let s=[];for(let o of a)s.push(Gs(o,e));n.push(s)}r.push(Mt(i.id,i.type,n,i.tags));continue}}return r}function v2(t,e){let r=[];for(let i=0;i<t.length;i+=3)r.push(t[i]+e,t[i+1],t[i+2]);return r}function Gs(t,e){let r={points:[],size:t.size};t.start!==void 0&&(r.start=t.start,r.end=t.end);for(let i=0;i<t.points.length;i+=3)r.points.push(t.points[i]+e,t.points[i+1],t.points[i+2]);return Wl(r),r}function b2(t,e,r){let i=D2(e,r),n=[];if(i.removeAll&&(n=t,t=[]),i.remove.size||i.add.size){let a=[];for(let s of t)(i.remove.has(s.id)||i.add.has(s.id))&&a.push(s);if(a.length){n=n.concat(a);let s=new Set(a.map(o=>o.id));t=t.filter(o=>!s.has(o.id))}if(i.add.size){let s=Zl({type:"FeatureCollection",features:Array.from(i.add.values())},r);s=Ql(s,r),n=n.concat(s),t=t.concat(s)}}if(i.update.size){let a=new Map,s=[];for(let o of t)i.update.has(o.id)?a.set(o.id,[...a.get(o.id)||[],o]):s.push(o);for(let[o,l]of i.update){let u=a.get(o);if(!u||u.length===0)continue;let h=w2(u,l,r);n=n.concat(u,h),s=s.concat(h)}t=s}return{affected:n,source:t}}function w2(t,e,r){var a,s;let i=!!e.newGeometry,n=e.removeAllProperties||((a=e.removeProperties)==null?void 0:a.length)>0||((s=e.addOrUpdateProperties)==null?void 0:s.length)>0;if(i){let o=t[0],l=Zl({type:"FeatureCollection",features:[{type:"Feature",id:o.id,geometry:e.newGeometry,properties:n?lc(o.tags,e):o.tags}]},r);return l=Ql(l,r),l}if(n){let o=[];for(let l of t){let u=je({},l);u.tags=lc(u.tags,e),o.push(u)}return o}return t}function lc(t,e){if(e.removeAllProperties)return{};let r=je({},t||{});if(e.removeProperties)for(let i of e.removeProperties)delete r[i];if(e.addOrUpdateProperties)for(let{key:i,value:n}of e.addOrUpdateProperties)r[i]=n;return r}function D2(t,e){var r,i;return t?{removeAll:t.removeAll,remove:new Set(t.remove||[]),add:new Map((r=t.add)==null?void 0:r.map(n=>[e.promoteId?n.properties[e.promoteId]:n.id,n])),update:new Map((i=t.update)==null?void 0:i.map(n=>[n.id,n]))}:{remove:new Set,add:new Map,update:new Map}}var uc=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],dt=new Uint32Array(96),_2=class Ad{static from(e){if(!e||e.byteLength===void 0||e.buffer)throw Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[r,i]=new Uint8Array(e,0,2);if(r!==219)throw Error("Data does not appear to be in a KDBush format.");let n=i>>4;if(n!==1)throw Error(`Got v${n} data when expected v1.`);let a=uc[i&15];if(!a)throw Error("Unrecognized array type.");let[s]=new Uint16Array(e,2,1),[o]=new Uint32Array(e,4,1);return new Ad(o,s,a,void 0,e)}constructor(e,r=64,i=Float64Array,n=ArrayBuffer,a){if(isNaN(e)||e<0)throw Error(`Unexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=i,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let s=uc.indexOf(this.ArrayType),o=e*2*this.ArrayType.BYTES_PER_ELEMENT,l=e*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-l%8)%8;if(s<0)throw Error(`Unexpected typed array class: ${i}.`);if(a)this.data=a,this.ids=new this.IndexArrayType(a,8,e),this.coords=new i(a,8+l+u,e*2),this._pos=e*2,this._finished=!0;else{let h=this.data=new n(8+o+l+u);this.ids=new this.IndexArrayType(h,8,e),this.coords=new i(h,8+l+u,e*2),this._pos=0,this._finished=!1,new Uint8Array(h,0,2).set([219,16+s]),new Uint16Array(h,2,1)[0]=r,new Uint32Array(h,4,1)[0]=e}}add(e,r){let i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=e,this.coords[this._pos++]=r,i}finish(){let e=this._pos>>1;if(e!==this.numItems)throw Error(`Added ${e} items when expected ${this.numItems}.`);return Ho(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,i,n){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:a,coords:s,nodeSize:o}=this;dt[0]=0,dt[1]=a.length-1,dt[2]=0;let l=3,u=[];for(;l>0;){let h=dt[--l],c=dt[--l],p=dt[--l];if(c-p<=o){for(let m=p;m<=c;m++){let g=s[2*m],x=s[2*m+1];g>=e&&g<=i&&x>=r&&x<=n&&u.push(a[m])}continue}let f=p+c>>1,d=s[2*f],y=s[2*f+1];d>=e&&d<=i&&y>=r&&y<=n&&u.push(a[f]),(h===0?e<=d:r<=y)&&(dt[l++]=p,dt[l++]=f-1,dt[l++]=1-h),(h===0?i>=d:n>=y)&&(dt[l++]=f+1,dt[l++]=c,dt[l++]=1-h)}return u}within(e,r,i){let n=[];return this.withinInto(e,r,i,n),n}withinInto(e,r,i,n){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:a,coords:s,nodeSize:o}=this;dt[0]=0,dt[1]=a.length-1,dt[2]=0;let l=3,u=0,h=i*i;for(;l>0;){let c=dt[--l],p=dt[--l],f=dt[--l];if(p-f<=o){for(let g=f;g<=p;g++)hc(s[2*g],s[2*g+1],e,r)<=h&&(n[u++]=a[g]);continue}let d=f+p>>1,y=s[2*d],m=s[2*d+1];hc(y,m,e,r)<=h&&(n[u++]=a[d]),(c===0?e-i<=y:r-i<=m)&&(dt[l++]=f,dt[l++]=d-1,dt[l++]=1-c),(c===0?e+i>=y:r+i>=m)&&(dt[l++]=d+1,dt[l++]=p,dt[l++]=1-c)}return u}};function Ho(t,e,r,i,n,a){if(n-i<=r)return;let s=i+n>>1;Sd(t,e,s,i,n,a),Ho(t,e,r,i,s-1,1-a),Ho(t,e,r,s+1,n,1-a)}function Sd(t,e,r,i,n,a){for(;n>i;){if(n-i>600){let u=n-i+1,h=r-i+1,c=Math.log(u),p=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*p*(u-p)/u)*(h-u/2<0?-1:1);Sd(t,e,r,Math.max(i,Math.floor(r-h*p/u+f)),Math.min(n,Math.floor(r+(u-h)*p/u+f)),a)}let s=e[2*r+a],o=i,l=n;for(zi(t,e,i,r),e[2*n+a]>s&&zi(t,e,i,n);o<l;){for(zi(t,e,o,l),o++,l--;e[2*o+a]<s;)o++;for(;e[2*l+a]>s;)l--}e[2*i+a]===s?zi(t,e,i,l):(l++,zi(t,e,l,n)),l<=r&&(i=l+1),r<=l&&(n=l-1)}}function zi(t,e,r,i){Xs(t,r,i),Xs(e,2*r,2*i),Xs(e,2*r+1,2*i+1)}function Xs(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}function hc(t,e,r,i){let n=t-r,a=e-i;return n*n+a*a}var Ko={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},A2=class{constructor(t){this.options=Object.assign(Object.create(Ko),t),this.trees=Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(t){let e=[];for(let r of t){if(!r.geometry)continue;let[i,n]=r.geometry.coordinates,[a,s]=[Zr(i),Hr(n)],o={id:r.id,type:"Point",geometry:[a,s],tags:r.properties};e.push(o)}this.createIndex(e)}initialize(t){let e=[];for(let r of t)r.type==="Point"&&e.push(r);this.createIndex(e)}updateIndex(t,e,r){this.options=Object.assign(Object.create(Ko),r.clusterOptions),this.initialize(t)}createIndex(t){let{log:e,minZoom:r,maxZoom:i}=this.options;e&&console.time("total time");let n=`prepare ${t.length} points`;e&&console.time(n),this.points=t;let a=[];for(let o=0;o<t.length;o++){let l=t[o];if(!(l!=null&&l.geometry))continue;let[u,h]=l.geometry;u=Math.fround(u),h=Math.fround(h),a.push(u,h,1/0,o,-1,1),this.options.reduce&&a.push(0)}let s=this.trees[i+1]=this.createTree(a);e&&console.timeEnd(n);for(let o=i;o>=r;o--){let l=Date.now();s=this.trees[o]=this.createTree(this.cluster(s,o)),e&&console.log("z%d: %d clusters in %dms",o,s.numItems,Date.now()-l)}e&&console.timeEnd("total time")}getClusters(t,e){return this.getClustersInternal(t,e).map(r=>ka(r))}getClustersInternal(t,e){let r=((t[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,t[1])),n=t[2]===180?180:((t[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,n=180;else if(r>n){let h=this.getClustersInternal([r,i,180,a],e),c=this.getClustersInternal([-180,i,n,a],e);return h.concat(c)}let s=this.trees[this.limitZoom(e)],o=s.range(Zr(r),Hr(a),Zr(n),Hr(i)),l=s.flatData,u=[];for(let h of o){let c=this.stride*h;u.push(l[c+5]>1?S2(l,c,this.clusterProps):this.points[l[c+3]])}return u}getChildren(t){let e=this.getOriginId(t),r=this.getOriginZoom(t),i=Error("No cluster with the specified id: "+t),n=this.trees[r];if(!n)throw i;let a=n.flatData;if(e*this.stride>=a.length)throw i;let s=this.options.radius/(this.options.extent*2**(r-1)),o=a[e*this.stride],l=a[e*this.stride+1],u=n.within(o,l,s),h=[];for(let c of u){let p=c*this.stride;a[p+4]===t&&h.push(a[p+5]>1?E2(a,p,this.clusterProps):ka(this.points[a[p+3]]))}if(h.length===0)throw i;return h}getLeaves(t,e,r){e||(e=10),r||(r=0);let i=[];return this.appendLeaves(i,t,e,r,0),i}getTile(t,e,r){let i=this.trees[this.limitZoom(t)];if(!i)return null;let n=2**t,{extent:a,radius:s}=this.options,o=s/a,l=(r-o)/n,u=(r+1+o)/n,h={transformed:!0,features:[],source:null,x:e,y:r,z:t};return this.addTileFeatures(i.range((e-o)/n,l,(e+1+o)/n,u),i.flatData,e,r,n,h),e===0&&this.addTileFeatures(i.range(1-o/n,l,1,u),i.flatData,n,r,n,h),e===n-1&&this.addTileFeatures(i.range(0,l,o/n,u),i.flatData,-1,r,n,h),h}getClusterExpansionZoom(t){return this.getOriginZoom(t)}appendLeaves(t,e,r,i,n){let a=this.getChildren(e);for(let s of a){let o=s.properties;if(o!=null&&o.cluster?n+o.point_count<=i?n+=o.point_count:n=this.appendLeaves(t,o.cluster_id,r,i,n):n<i?n++:t.push(s),t.length===r)break}return n}createTree(t){let e=new _2(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<t.length;r+=this.stride)e.add(t[r],t[r+1]);return e.finish(),e.flatData=t,e.data=null,e}addTileFeatures(t,e,r,i,n,a){for(let s of t){let o=s*this.stride,l=e[o+5]>1,u,h,c;if(l)u=tu(e,o,this.clusterProps),h=e[o],c=e[o+1];else{let d=this.points[e[o+3]];u=d.tags,[h,c]=d.geometry}let p={type:1,geometry:[[Math.round(this.options.extent*(h*n-r)),Math.round(this.options.extent*(c*n-i))]],tags:u},f;f=l||this.options.generateId?e[o+3]:this.points[e[o+3]].id,f!==void 0&&(p.id=f),a.features.push(p)}}limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}cluster(t,e){let{radius:r,extent:i,reduce:n,minPoints:a}=this.options,s=r/(i*2**e),o=t.flatData,l=[],u=this.stride;for(let h=0;h<o.length;h+=u){if(o[h+2]<=e)continue;o[h+2]=e;let c=o[h],p=o[h+1],f=t.within(o[h],o[h+1],s),d=o[h+5],y=d;for(let m of f){let g=m*u;o[g+2]>e&&(y+=o[g+5])}if(y>d&&y>=a){let m=c*d,g=p*d,x,v=-1,b=((h/u|0)<<5)+(e+1)+this.points.length;for(let D of f){let A=D*u;if(o[A+2]<=e)continue;o[A+2]=e;let _=o[A+5];m+=o[A]*_,g+=o[A+1]*_,o[A+4]=b,n&&(x||(x=this.map(o,h,!0),v=this.clusterProps.length,this.clusterProps.push(x)),n(x,this.map(o,A)))}o[h+4]=b,l.push(m/y,g/y,1/0,b,-1,y),n&&l.push(v)}else{for(let m=0;m<u;m++)l.push(o[h+m]);if(y>1)for(let m of f){let g=m*u;if(!(o[g+2]<=e)){o[g+2]=e;for(let x=0;x<u;x++)l.push(o[g+x])}}}}return l}getOriginId(t){return t-this.points.length>>5}getOriginZoom(t){return(t-this.points.length)%32}map(t,e,r){if(t[e+5]>1){let a=this.clusterProps[t[e+6]];return r?Object.assign({},a):a}let i=this.points[t[e+3]].tags,n=this.options.map(i);return r&&n===i?Object.assign({},n):n}};function S2(t,e,r){return{id:t[e+3],type:"Point",tags:tu(t,e,r),geometry:[t[e],t[e+1]]}}function E2(t,e,r){return{type:"Feature",id:t[e+3],properties:tu(t,e,r),geometry:{type:"Point",coordinates:[wd(t[e]),Dd(t[e+1])]}}}function tu(t,e,r){let i=t[e+5],n=i>=1e4?`${Math.round(i/1e3)}k`:i>=1e3?`${Math.round(i/100)/10}k`:i,a=t[e+6],s=a===-1?{}:Object.assign({},r[a]);return Object.assign(s,{cluster:!0,cluster_id:t[e+3],point_count:i,point_count_abbreviated:n})}var Ed="geojsonvt_clip_start",Fd="geojsonvt_clip_end";function cc(t,e,r,i,n){let a=e===n.maxZoom?0:n.tolerance/((1<<e)*n.extent),s={transformed:!1,features:[],source:null,x:r,y:i,z:e,minX:2,minY:1,maxX:-1,maxY:0,numPoints:0,numSimplified:0,numFeatures:t.length};for(let o of t)F2(s,o,a,n);return s}function F2(t,e,r,i){switch(t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),e.type){case"Point":case"MultiPoint":k2(t,e);return;case"LineString":T2(t,e,r,i);return;case"MultiLineString":case"Polygon":I2(t,e,r);return;case"MultiPolygon":C2(t,e,r);return}}function k2(t,e){let r=[];for(let n=0;n<e.geometry.length;n+=3)r.push(e.geometry[n],e.geometry[n+1]),t.numPoints++,t.numSimplified++;if(!r.length)return;let i={type:1,tags:e.tags||null,geometry:r};e.id!==null&&(i.id=e.id),t.features.push(i)}function T2(t,e,r,i){let n=[];if(eu(n,e.geometry,t,r,!1,!1),!n.length)return;let a=e.tags||null;if(i.lineMetrics){a={};for(let o in e.tags)a[o]=e.tags[o];a[Ed]=e.geometry.start/e.geometry.size,a[Fd]=e.geometry.end/e.geometry.size}let s={type:2,tags:a,geometry:n};e.id!==null&&(s.id=e.id),t.features.push(s)}function I2(t,e,r){let i=[];for(let a=0;a<e.geometry.length;a++)eu(i,e.geometry[a],t,r,e.type==="Polygon",a===0);if(!i.length)return;let n={type:e.type==="Polygon"?3:2,tags:e.tags||null,geometry:i};e.id!==null&&(n.id=e.id),t.features.push(n)}function C2(t,e,r){let i=[];for(let a=0;a<e.geometry.length;a++){let s=e.geometry[a];for(let o=0;o<s.length;o++)eu(i,s[o],t,r,!0,o===0)}if(!i.length)return;let n={type:3,tags:e.tags||null,geometry:i};e.id!==null&&(n.id=e.id),t.features.push(n)}function eu(t,e,r,i,n,a){let s=i*i;if(i>0&&e.size<(n?s:i)){r.numPoints+=e.points.length/3;return}let o=[];for(let l=0;l<e.points.length;l+=3)(i===0||e.points[l+2]>s)&&(r.numSimplified++,o.push(e.points[l],e.points[l+1])),r.numPoints++;n&&M2(o,a),t.push(o)}function M2(t,e){let r=0;for(let i=0,n=t.length,a=n-2;i<n;a=i,i+=2)r+=(t[i]-t[a])*(t[i+1]+t[a+1]);if(r>0===e)for(let i=0,n=t.length;i<n/2;i+=2){let a=t[i],s=t[i+1];t[i]=t[n-2-i],t[i+1]=t[n-1-i],t[n-2-i]=a,t[n-1-i]=s}}function pc(t,e){if(t.transformed)return t;let r=1<<t.z,i=t.x,n=t.y;for(let a of t.features)a.type===1?B2(a,e,r,i,n):P2(a,e,r,i,n);return t.transformed=!0,t}function B2(t,e,r,i,n){let a=t,s=t.geometry,o=[];for(let l=0;l<s.length;l+=2)o.push(kd(s[l],s[l+1],e,r,i,n));return a.geometry=o,a}function P2(t,e,r,i,n){let a=t,s=t.geometry,o=[];for(let l of s){let u=[];for(let h=0;h<l.length;h+=2)u.push(kd(l[h],l[h+1],e,r,i,n));o.push(u)}return a.geometry=o,a}function kd(t,e,r,i,n,a){return[Math.round(r*(t*i-n)),Math.round(r*(e*i-a))]}var z2=class{constructor(t){this.options=t,this.total=0,this.stats={},this.tiles={},this.tileCoords=[],this.stats={},this.total=0}initialize(t){this.splitTile(t,0,0,0),this.options.debug&&(t.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)))}updateIndex(t,e,r){r.debug>1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(e),r.debug>1&&console.timeEnd("invalidating");let[i,n,a]=[0,0,0],s=cc(t,i,n,a,r);s.source=t;let o=Jn(i,n,a);if(this.tiles[o]=s,this.tileCoords.push({z:i,x:n,y:a,id:o}),r.debug){let l=`z${i}`;this.stats[l]=(this.stats[l]||0)+1,this.total++}}getClusterExpansionZoom(t){return null}getChildren(t){return null}getLeaves(t,e,r){return null}getTile(t,e,r){let{extent:i,debug:n}=this.options,a=1<<t;e=e+a&a-1;let s=Jn(t,e,r);if(this.tiles[s])return pc(this.tiles[s],i);n>1&&console.log("drilling down to z%d-%d-%d",t,e,r);let o=t,l=e,u=r,h;for(;!h&&o>0;)o--,l>>=1,u>>=1,h=this.tiles[Jn(o,l,u)];return!(h!=null&&h.source)||(n>1&&(console.log("found parent tile z%d-%d-%d",o,l,u),console.time("drilling down")),this.splitTile(h.source,o,l,u,t,e,r),n>1&&console.timeEnd("drilling down"),!this.tiles[s])?null:pc(this.tiles[s],i)}splitTile(t,e,r,i,n,a,s){let o=[t,e,r,i],l=this.options,u=l.debug;for(;o.length;){i=o.pop(),r=o.pop(),e=o.pop(),t=o.pop();let h=1<<e,c=Jn(e,r,i),p=this.tiles[c];if(!p&&(u>1&&console.time("creation"),p=this.tiles[c]=cc(t,e,r,i,l),this.tileCoords.push({z:e,x:r,y:i,id:c}),u)){u>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,i,p.numFeatures,p.numPoints,p.numSimplified),console.timeEnd("creation"));let _=`z${e}`;this.stats[_]=(this.stats[_]||0)+1,this.total++}if(p.source=t,n==null){if(e===l.indexMaxZoom||p.numPoints<=l.indexMaxPoints)continue}else{if(e===l.maxZoom||e===n)continue;if(n!=null){let _=n-e;if(r!==a>>_||i!==s>>_)continue}}if(p.source=null,!t.length)continue;u>1&&console.time("clipping");let f=.5*l.buffer/l.extent,d=.5-f,y=.5+f,m=1+f,g=null,x=null,v=null,b=null,D=Te(t,h,r-f,r+y,0,p.minX,p.maxX,l),A=Te(t,h,r+d,r+m,0,p.minX,p.maxX,l);D&&(g=Te(D,h,i-f,i+y,1,p.minY,p.maxY,l),x=Te(D,h,i+d,i+m,1,p.minY,p.maxY,l)),A&&(v=Te(A,h,i-f,i+y,1,p.minY,p.maxY,l),b=Te(A,h,i+d,i+m,1,p.minY,p.maxY,l)),u>1&&console.timeEnd("clipping"),o.push(g||[],e+1,r*2,i*2),o.push(x||[],e+1,r*2,i*2+1),o.push(v||[],e+1,r*2+1,i*2),o.push(b||[],e+1,r*2+1,i*2+1)}}invalidateTiles(t){if(!t.length)return;let e=this.options,{debug:r}=e,i=1/0,n=-1/0,a=1/0,s=-1/0;for(let u of t)i=Math.min(i,u.minX),n=Math.max(n,u.maxX),a=Math.min(a,u.minY),s=Math.max(s,u.maxY);let o=e.buffer/e.extent,l=new Set;for(let u in this.tiles){let h=this.tiles[u],c=1<<h.z,p=(h.x-o)/c,f=(h.x+1+o)/c,d=(h.y-o)/c,y=(h.y+1+o)/c;if(n<p||i>=f||s<d||a>=y)continue;let m=!1;for(let g of t)if(g.maxX>=p&&g.minX<f&&g.maxY>=d&&g.minY<y){m=!0;break}if(m){if(r){r>1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",h.z,h.x,h.y,h.numFeatures,h.numPoints,h.numSimplified);let g=`z${h.z}`;this.stats[g]=(this.stats[g]||0)-1,this.total--}delete this.tiles[u],l.add(u)}}l.size&&(this.tileCoords=this.tileCoords.filter(u=>!l.has(u.id)))}};function Jn(t,e,r){return((1<<t)*r+e)*32+t}var L2={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,updateable:!1,cluster:!1,clusterOptions:Ko,debug:0},Td=class{constructor(t,e){e=this.options=Object.assign({},L2,e);let r=e.debug;if(r&&console.time("preprocess data"),e.maxZoom<0||e.maxZoom>24)throw Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw Error("promoteId and generateId cannot be used together.");let i=Zl(t,e);r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles")),i=Ql(i,e),e.updateable&&(this.source=i),this.initializeIndex(i,e)}initializeIndex(t,e){this.tileIndex=e.cluster?new A2(e.clusterOptions):new z2(e),t.length&&this.tileIndex.initialize(t)}getTile(t,e,r){return t=+t,e=+e,r=+r,t<0||t>24?null:this.tileIndex.getTile(t,e,r)}updateData(t,e){let r=this.options;if(!r.updateable)throw Error("to update tile geojson `updateable` option must be set to true");let{affected:i,source:n}=b2(this.source,t,r);e&&({affected:i,source:n}=this.filterUpdate(n,i,e)),i.length&&(this.source=n,this.tileIndex.updateIndex(n,i,r))}filterUpdate(t,e,r){let i=new Set;for(let n of t)n.id!=null&&(r(ka(n))||(e.push(n),i.add(n.id)));return t=t.filter(n=>!i.has(n.id)),{affected:e,source:t}}getData(){if(!this.options.updateable)throw Error("to retrieve data the `updateable` option must be set to true");return u2(this.source)}updateClusterOptions(t,e){let r=this.options.cluster;if(this.options.cluster=t,this.options.clusterOptions=e,r==t){this.tileIndex.updateIndex(this.source,[],this.options);return}this.initializeIndex(this.source,this.options)}getClusterExpansionZoom(t){return this.tileIndex.getClusterExpansionZoom(t)}getClusterChildren(t){return this.tileIndex.getChildren(t)}getClusterLeaves(t,e,r){return this.tileIndex.getLeaves(t,e,r)}},Jo=At([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),V2=Jo.members;Jo.size,Jo.alignment;var Qo=At([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),O2=Qo.members;Qo.size,Qo.alignment;var R2=Math.cos(75/2*(Math.PI/180)),Id=1/2,fc=2**14/Id,Cd=class{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(e=>e.id),this.index=t.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let e of this.layers)this.gradients[e.id]={};this.layoutVertexArray=new Qm,this.layoutVertexArray2=new tg,this.indexArray=new wn,this.programConfigurations=new vr(t.layers,t.zoom),this.segments=new ee,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(t,e,r){this.hasDependencies=Aa("line",this.layers,e)||this.hasLineDasharray(this.layers);let i=this.layers[0].layout.get("line-sort-key"),n=!i.isConstant(),a=[],s=new st(this.zoom),o=this.layers[0]._featureFilter.needGeometry;for(let{feature:l,id:u,index:h,sourceLayerIndex:c}of t){let p=hi(l,o);if(!this.layers[0]._featureFilter.filter(s,p,r))continue;let f=n?i.evaluate(p,{},r):void 0,d={id:u,properties:l.properties,type:l.type,sourceLayerIndex:c,index:h,geometry:o?p.geometry:Ar(l),patterns:{},dashes:{},sortKey:f};a.push(d)}n&&a.sort((l,u)=>l.sortKey-u.sortKey);for(let l of a){let{geometry:u,index:h,sourceLayerIndex:c}=l;this.hasDependencies?(Aa("line",this.layers,e)?Gl("line",this.layers,l,{zoom:this.zoom},e):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,l,this.zoom,e),this.patternFeatures.push(l)):this.addFeature(l,u,h,r,{},{},e.subdivisionGranularity);let p=t[h].feature;e.featureIndex.insert(p,u,h,c,this.index)}}update(t,e,r,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,{imagePositions:r,dashPositions:i})}addFeatures({options:t,canonical:e,patternPositions:r,dashPositions:i}){for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,e,r,i,t.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,O2)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,V2),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(t){if(t.properties&&Object.hasOwn(t.properties,"geojsonvt_clip_start")&&Object.hasOwn(t.properties,"geojsonvt_clip_end"))return{start:+t.properties[Ed],end:+t.properties[Fd]}}addFeature(t,e,r,i,n,a,s){let o=this.layers[0].layout,l=o.get("line-join").evaluate(t,{}),u=o.get("line-cap").evaluate(t,{}),h=o.get("line-miter-limit").evaluate(t,{}),c=o.get("line-round-limit").evaluate(t,{});this.lineClips=this.lineFeatureClips(t);for(let p of e)this.addLine(p,t,l,u,h,c,i,s);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{imagePositions:n,dashPositions:a,canonical:i})}addLine(t,e,r,i,n,a,s,o){this.distance=0,this.scaledDistance=0,this.totalDistance=0;let l=s?o.line.getGranularityForZoomLevel(s.z):1;if(t=cr(t,l),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let v=0;v<t.length-1;v++)this.totalDistance+=t[v].dist(t[v+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}let u=Dn.types[e.type]==="Polygon",h=t.length;for(;h>=2&&t[h-1].equals(t[h-2]);)h--;let c=0;for(;c<h-1&&t[c].equals(t[c+1]);)c++;if(h-c<(u?3:2))return;r==="bevel"&&(n=1.05);let p=this.overscaling<=16?15*mt/(512*this.overscaling):0,f=this.segments.prepareSegment(h*10,this.layoutVertexArray,this.indexArray),d,y,m,g,x;this.e1=this.e2=-1,u&&(d=t[h-2],x=t[c].sub(d)._unit()._perp());for(let v=c;v<h;v++){if(m=v===h-1?u?t[c+1]:void 0:t[v+1],m&&t[v].equals(m))continue;x&&(g=x),d&&(y=d),d=t[v],x=m?m.sub(d)._unit()._perp():g,g||(g=x);let b=g.add(x);(b.x!==0||b.y!==0)&&b._unit();let D=g.x*x.x+g.y*x.y,A=b.x*x.x+b.y*x.y,_=A===0?1/0:1/A,S=2*Math.sqrt(2-2*A),k=A<R2&&y&&m,z=g.x*x.y-g.y*x.x>0;if(k&&v>c){let L=d.dist(y);if(L>2*p){let F=d.sub(d.sub(y)._mult(p/L)._round());this.updateDistance(y,F),this.addCurrentVertex(F,g,0,0,f),y=F}}let O=y&&m,P=O?r:u?"butt":i;if(O&&P==="round"&&(_<a?P="miter":_<=2&&(P="fakeround")),P==="miter"&&_>n&&(P="bevel"),P==="bevel"&&(_>2&&(P="flipbevel"),_<n&&(P="miter")),y&&this.updateDistance(y,d),P==="miter")b._mult(_),this.addCurrentVertex(d,b,0,0,f);else if(P==="flipbevel"){if(_>100)b=x.mult(-1);else{let L=_*g.add(x).mag()/g.sub(x).mag();b._perp()._mult(L*(z?-1:1))}this.addCurrentVertex(d,b,0,0,f),this.addCurrentVertex(d,b.mult(-1),0,0,f)}else if(P==="bevel"||P==="fakeround"){let L=-Math.sqrt(_*_-1),F=z?L:0,$=z?0:L;if(y&&this.addCurrentVertex(d,g,F,$,f),P==="fakeround"){let U=Math.round(S*180/Math.PI/20);for(let T=1;T<U;T++){let q=T/U;if(q!==.5){let ot=q-.5,pt=1.0904+D*(-3.2452+D*(3.55645-D*1.43519)),Et=.848013+D*(-1.06021+D*.215638);q+=q*ot*(q-1)*(pt*ot*ot+Et)}let at=x.sub(g)._mult(q)._add(g)._unit()._mult(z?-1:1);this.addHalfVertex(d,at.x,at.y,!1,z,0,f)}}m&&this.addCurrentVertex(d,x,-F,-$,f)}else if(P==="butt")this.addCurrentVertex(d,b,0,0,f);else if(P==="square"){let L=y?1:-1;this.addCurrentVertex(d,b,L,L,f)}else P==="round"&&(y&&(this.addCurrentVertex(d,g,0,0,f),this.addCurrentVertex(d,g,1,1,f,!0)),m&&(this.addCurrentVertex(d,x,-1,-1,f,!0),this.addCurrentVertex(d,x,0,0,f)));if(k&&v<h-1){let L=d.dist(m);if(L>2*p){let F=d.add(m.sub(d)._mult(p/L)._round());this.updateDistance(d,F),this.addCurrentVertex(F,x,0,0,f),d=F}}}}addCurrentVertex(t,e,r,i,n,a=!1){let s=e.x+e.y*r,o=e.y-e.x*r,l=-e.x+e.y*i,u=-e.y-e.x*i;this.addHalfVertex(t,s,o,a,!1,r,n),this.addHalfVertex(t,l,u,a,!0,-i,n),this.distance>fc/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,e,r,i,n,a))}addHalfVertex({x:t,y:e},r,i,n,a,s,o){let l=(this.lineClips?this.scaledDistance*(fc-1):this.scaledDistance)*Id;if(this.layoutVertexArray.emplaceBack((t<<1)+ +!!n,(e<<1)+ +!!a,Math.round(63*r)+128,Math.round(63*i)+128,(s===0?0:s<0?-1:1)+1|(l&63)<<2,l>>6),this.lineClips){let h=(this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start);this.layoutVertexArray2.emplaceBack(h,this.lineClipsArray.length)}let u=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,u,this.e2),o.primitiveLength++),a?this.e2=u:this.e1=u}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,e){this.distance+=t.dist(e),this.updateScaledDistance()}hasLineDasharray(t){for(let e of t){let r=e.paint.get("line-dasharray");if(r&&!r.isConstant())return!0}return!1}addLineDashDependencies(t,e,r,i){for(let n of t){let a=n.paint.get("line-dasharray");if(!a||a.value.kind==="constant")continue;let s=n.layout.get("line-cap").evaluate(e,{})==="round",o={dasharray:a.value.evaluate({zoom:r-1},e,{}),round:s},l={dasharray:a.value.evaluate({zoom:r},e,{}),round:s},u={dasharray:a.value.evaluate({zoom:r+1},e,{}),round:s},h=`${o.dasharray.join(",")},${o.round}`,c=`${l.dasharray.join(",")},${l.round}`,p=`${u.dasharray.join(",")},${u.round}`;i.dashDependencies[h]=o,i.dashDependencies[c]=l,i.dashDependencies[p]=u,e.dashes[n.id]={min:h,mid:c,max:p}}}};C("LineBucket",Cd,{omit:["layers","patternFeatures"]});var $2,N2=()=>$2||($2=new Xt({"line-cap":new N(w.layout_line["line-cap"],"line-cap"),"line-join":new N(w.layout_line["line-join"],"line-join"),"line-miter-limit":new N(w.layout_line["line-miter-limit"],"line-miter-limit"),"line-round-limit":new N(w.layout_line["line-round-limit"],"line-round-limit"),"line-sort-key":new N(w.layout_line["line-sort-key"],"line-sort-key")})),U2,q2=()=>U2||(U2=new Xt({"line-opacity":new N(w.paint_line["line-opacity"],"line-opacity"),"line-layer-opacity":new V(w.paint_line["line-layer-opacity"],"line-layer-opacity"),"line-color":new N(w.paint_line["line-color"],"line-color"),"line-translate":new V(w.paint_line["line-translate"],"line-translate"),"line-translate-anchor":new V(w.paint_line["line-translate-anchor"],"line-translate-anchor"),"line-width":new N(w.paint_line["line-width"],"line-width"),"line-gap-width":new N(w.paint_line["line-gap-width"],"line-gap-width"),"line-offset":new N(w.paint_line["line-offset"],"line-offset"),"line-blur":new N(w.paint_line["line-blur"],"line-blur"),"line-dasharray":new on(w.paint_line["line-dasharray"],"line-dasharray"),"line-pattern":new on(w.paint_line["line-pattern"],"line-pattern"),"line-gradient":new Wa(w.paint_line["line-gradient"],"line-gradient")})),dc={get paint(){return q2()},get layout(){return N2()}},j2=class extends N{possiblyEvaluate(t,e){return e=new st(Math.floor(e.zoom),{now:e.now,fadeDuration:e.fadeDuration,zoomHistory:e.zoomHistory,transition:e.transition}),super.possiblyEvaluate(t,e)}evaluate(t,e,r,i){return e=Gt({},e,{zoom:Math.floor(e.zoom)}),super.evaluate(t,e,r,i)}},Qn;var G2=class extends de{constructor(t,e){super(t,dc,e),this.gradientVersion=0,Qn||(Qn=new j2(dc.paint.properties["line-width"].specification,"line-floorwidth"),Qn.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(t){if(t==="line-gradient"){let e=this.gradientExpression();this.stepInterpolant=lm(e)?e._styleExpression.expression instanceof vl:!1,this.gradientVersion=(this.gradientVersion+1)%(2**53-1)}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,e){super.recalculate(t,e),this.paint._values["line-floorwidth"]=Qn.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new Cd(t)}queryRadius(t){let e=t,r=yc(Wr("line-width",this,e),Wr("line-gap-width",this,e)),i=Wr("line-offset",this,e);return r/2+Math.abs(i)+Ha(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:t,feature:e,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a}){let s=Ka(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-n.bearingInRadians,a),o=a/2*yc(this.paint.get("line-width").evaluate(e,r),this.paint.get("line-gap-width").evaluate(e,r)),l=this.paint.get("line-offset").evaluate(e,r);return l&&(i=Dg(i,l*a)),mg(s,i,o)}isTileClipped(){return!0}};function yc(t,e){return e>0?e+2*t:t}var X2=At([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"},{name:"a_height_offset",components:1,type:"Float32"}],4),Y2=At([{name:"a_projected_pos",components:3,type:"Float32"}],4);At([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);var W2=At([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);At([{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"}]);var mc=At([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),x5=At([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);At([{name:"triangle",components:3,type:"Uint16"}]),At([{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"},{type:"Float32",name:"heightOffset"}]),At([{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"},{type:"Float32",name:"heightOffset"}]),At([{type:"Float32",name:"offsetX"}]),At([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),At([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var wr=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(t){this.pluginStatus=t.pluginStatus,this.pluginURL=t.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(t){if(wr.isParsed())throw Error("RTL text plugin already registered.");this.applyArabicShaping=t.applyArabicShaping,this.processBidirectionalText=t.processBidirectionalText,this.processStyledBidirectionalText=t.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(t,e){return rt(this,null,function*(){if(this.isParsed())return this.getState();if(t.pluginStatus!=="loading")return this.setState(t),t;let r=t.pluginURL,i=new Promise(a=>{this.loadScriptResolve=a}),n=new Promise(a=>setTimeout(()=>a(),this.TIMEOUT));if(yield e(r),yield Promise.race([i,n]),this.isParsed()){let a={pluginStatus:"loaded",pluginURL:r};return this.setState(a),a}throw this.setState({pluginStatus:"error",pluginURL:""}),Error(`RTL Text Plugin failed to import scripts from ${r}`)})}};function Z2(t){return/[\\u0600-\\u0604\\u0606-\\u060B\\u060D-\\u061A\\u061C-\\u061E\\u0620-\\u063F\\u0641-\\u064A\\u0656-\\u066F\\u0671-\\u06DC\\u06DE-\\u070D\\u070F-\\u074A\\u074D-\\u077F\\u07C0-\\u07FA\\u07FD-\\u07FF\\u0840-\\u085B\\u085E\\u0860-\\u086A\\u0870-\\u0891\\u0897-\\u08E1\\u08E3-\\u08FF\\u1800\\u1801\\u1804\\u1806-\\u1819\\u1820-\\u1878\\u1880-\\u18AA\\uA840-\\uA877\\uFB50-\\uFD3D\\uFD40-\\uFDCF\\uFDF0-\\uFDFF\\uFE70-\\uFE74\\uFE76-\\uFEFC]|\\uD802[\\uDEC0-\\uDEE6\\uDEEB-\\uDEF6\\uDF80-\\uDF91\\uDF99-\\uDF9C\\uDFA9-\\uDFAF]|\\uD803[\\uDD00-\\uDD27\\uDD30-\\uDD39\\uDE60-\\uDE7E\\uDEC2-\\uDEC7\\uDED0-\\uDED8\\uDEFA-\\uDEFF\\uDF30-\\uDF59\\uDF70-\\uDF89\\uDFB0-\\uDFCB]|\\uD805[\\uDE60-\\uDE6C]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99\\uDC9C-\\uDC9F]|\\uD83A[\\uDD00-\\uDD4B\\uDD50-\\uDD59\\uDD5E\\uDD5F]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB\\uDEF0\\uDEF1]/gim.test(String.fromCodePoint(t))}function H2(t){return/[\\u0591-\\u05C7\\u05D0-\\u05EA\\u05EF-\\u05F4\\u0600-\\u0604\\u0606-\\u060B\\u060D-\\u061A\\u061C-\\u061E\\u0620-\\u063F\\u0641-\\u064A\\u0656-\\u066F\\u0671-\\u06DC\\u06DE-\\u070D\\u070F-\\u074A\\u074D-\\u07B1\\u07C0-\\u07FA\\u07FD-\\u082D\\u0830-\\u083E\\u0840-\\u085B\\u085E\\u0860-\\u086A\\u0870-\\u0891\\u0897-\\u08E1\\u08E3-\\u08FF\\uFB1D-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFD3D\\uFD40-\\uFDCF\\uFDF0-\\uFDFF\\uFE70-\\uFE74\\uFE76-\\uFEFC]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC57-\\uDC9E\\uDCA7-\\uDCAF\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDCFB-\\uDD1B\\uDD1F-\\uDD39\\uDD3F-\\uDD59\\uDD80-\\uDDB7\\uDDBC-\\uDDCF\\uDDD2-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE38-\\uDE3A\\uDE3F-\\uDE48\\uDE50-\\uDE58\\uDE60-\\uDE9F\\uDEC0-\\uDEE6\\uDEEB-\\uDEF6\\uDF00-\\uDF35\\uDF39-\\uDF55\\uDF58-\\uDF72\\uDF78-\\uDF91\\uDF99-\\uDF9C\\uDFA9-\\uDFAF]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDCFA-\\uDD27\\uDD30-\\uDD39\\uDD40-\\uDD65\\uDD69-\\uDD85\\uDD8E\\uDD8F\\uDE60-\\uDE7E\\uDE80-\\uDEA9\\uDEAB-\\uDEAD\\uDEB0\\uDEB1\\uDEC2-\\uDEC7\\uDED0-\\uDED8\\uDEFA-\\uDF27\\uDF30-\\uDF59\\uDF70-\\uDF89\\uDFB0-\\uDFCB\\uDFE0-\\uDFF6]|\\uD83A[\\uDC00-\\uDCC4\\uDCC7-\\uDCD6\\uDD00-\\uDD4B\\uDD50-\\uDD59\\uDD5E\\uDD5F]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB\\uDEF0\\uDEF1]/gim.test(String.fromCodePoint(t))}function K2(t){return/[\\u02EA\\u02EB\\u2E80-\\u2FDF\\u2FF0-\\u303F\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FD-\\u30FF\\u3105-\\u312F\\u31A0-\\u4DBF\\u4E00-\\uA48C\\uA490-\\uA4C6\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFE10-\\uFE1F\\uFE30-\\uFE4F\\uFF00-\\uFFEF]|\\uD81B[\\uDFE0-\\uDFFF]|[\\uD81C-\\uD822\\uD840-\\uD868\\uD86A-\\uD86D\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883\\uD885-\\uD88C][\\uDC00-\\uDFFF]|\\uD823[\\uDC00-\\uDCD5\\uDCFF-\\uDD1E\\uDD80-\\uDDF2]|\\uD82B[\\uDFF0-\\uDFFF]|\\uD82C[\\uDC00-\\uDEFB]|\\uD83C[\\uDE00-\\uDEFF]|\\uD869[\\uDC00-\\uDEDF\\uDF00-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEAD\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0\\uDFF0-\\uDFFF]|\\uD87B[\\uDC00-\\uDE5D]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A\\uDF50-\\uDFFF]|\\uD88D[\\uDC00-\\uDC79]/gim.test(String.fromCodePoint(t))}function Qa(t){return/[\\u02EA\\u02EB\\u1100-\\u11FF\\u1401-\\u167F\\u18B0-\\u18FF\\u2065\\u20DD-\\u20E0\\u20E2-\\u20E4\\u2B97\\u2BF0-\\u2BFF\\u2E50\\u2E51\\u2E80-\\u3007\\u3012\\u3013\\u3020-\\u302F\\u3031-\\u30FB\\u30FD-\\uA4CF\\uA960-\\uA97F\\uAC00-\\uD7FF\\uF900-\\uFAFF\\uFE10-\\uFE1F\\uFE30-\\uFE48\\uFE50-\\uFE57\\uFE5F-\\uFE62\\uFE67-\\uFE6F\\uFF00-\\uFF07\\uFF0A-\\uFF0C\\uFF0E-\\uFF19\\uFF1F-\\uFF3A\\uFF3C\\uFF3E\\uFF40-\\uFF5A\\uFFE0-\\uFFE2\\uFFE4-\\uFFE7\\uFFF0-\\uFFF8]|\\uD802[\\uDD80-\\uDD9F]|\\uD805[\\uDD80-\\uDDFF]|\\uD806[\\uDE00-\\uDEBF]|[\\uD80C-\\uD810\\uD81C-\\uD822\\uD83C\\uD83D\\uD840-\\uD87E\\uD880-\\uD8BE][\\uDC00-\\uDFFF]|\\uD811[\\uDC00-\\uDE7F]|\\uD81B[\\uDFE0-\\uDFFF]|\\uD823[\\uDC00-\\uDDFF]|\\uD82B[\\uDFF0-\\uDFFF]|\\uD82C[\\uDC00-\\uDEFF]|\\uD833[\\uDEC0-\\uDFCF]|\\uD834[\\uDC00-\\uDDFF\\uDEE0-\\uDF7F]|\\uD836[\\uDC00-\\uDEAF]|\\uD83E[\\uDD00-\\uDEFF]|[\\uD87F\\uD8BF][\\uDC00-\\uDFFD]/gim.test(String.fromCodePoint(t))}function J2(t){return/[\\xA7\\xA9\\xAE\\xB1\\xBC-\\xBE\\xD7\\xF7\\u2016\\u2020\\u2021\\u2030\\u2031\\u203B\\u203C\\u2042\\u2047-\\u2049\\u2051\\u2100-\\u218F\\u221E\\u2234\\u2235\\u2300-\\u2307\\u230C-\\u231F\\u2324-\\u2328\\u232B\\u237D-\\u239A\\u23BE-\\u23CD\\u23CF\\u23D1-\\u23DB\\u23E2-\\u2422\\u2424-\\u24FF\\u25A0-\\u2619\\u2620-\\u2767\\u2776-\\u2793\\u2B12-\\u2B2F\\u2B50-\\u2B59\\u2BB8-\\u2BEB\\u3000-\\u303F\\u30A0-\\u30FF\\uE000-\\uF8FF\\uFE30-\\uFE6F\\uFF00-\\uFFEF\\uFFFC\\uFFFD]|[\\uDB80-\\uDBFF][\\uDC00-\\uDFFF]/gim.test(String.fromCodePoint(t))}function Q2(t){return/[\\r\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0600-\\u0605\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DD\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u070F\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0890\\u0891\\u0897-\\u089F\\u08CA-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3C\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0CF3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D62\\u0D63\\u0D81-\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E33-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB3-\\u0EBC\\u0EC8-\\u0ECE\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1037\\u1039-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1084-\\u1086\\u108D\\u109D\\u1100-\\u11FF\\u135D-\\u135F\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u180F\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A7C\\u1A7F\\u1AB0-\\u1ADD\\u1AE0-\\u1AEB\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DFF\\u200C\\u200D\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA82C\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA960-\\uA97C\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFF9E\\uFF9F]|\\uD800[\\uDDFD\\uDEE0\\uDF76-\\uDF7A]|\\uD802[\\uDE01-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE0F\\uDE38-\\uDE3A\\uDE3F\\uDEE5\\uDEE6]|\\uD803[\\uDD24-\\uDD27\\uDD69-\\uDD6D\\uDEAB\\uDEAC\\uDEFA-\\uDEFF\\uDF46-\\uDF50\\uDF82-\\uDF85]|\\uD804[\\uDC00-\\uDC02\\uDC38-\\uDC46\\uDC70\\uDC73\\uDC74\\uDC7F-\\uDC82\\uDCB0-\\uDCBA\\uDCBD\\uDCC2\\uDCCD\\uDD00-\\uDD02\\uDD27-\\uDD34\\uDD45\\uDD46\\uDD73\\uDD80-\\uDD82\\uDDB3-\\uDDC0\\uDDC2\\uDDC3\\uDDC9-\\uDDCC\\uDDCE\\uDDCF\\uDE2C-\\uDE37\\uDE3E\\uDE41\\uDEDF-\\uDEEA\\uDF00-\\uDF03\\uDF3B\\uDF3C\\uDF3E-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF57\\uDF62\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74\\uDFB8-\\uDFC0\\uDFC2\\uDFC5\\uDFC7-\\uDFCA\\uDFCC-\\uDFD2\\uDFE1\\uDFE2]|\\uD805[\\uDC35-\\uDC46\\uDC5E\\uDCB0-\\uDCC3\\uDDAF-\\uDDB5\\uDDB8-\\uDDC0\\uDDDC\\uDDDD\\uDE30-\\uDE40\\uDEAB-\\uDEB7\\uDF1D-\\uDF1F\\uDF22-\\uDF2B]|\\uD806[\\uDC2C-\\uDC3A\\uDD30-\\uDD35\\uDD37\\uDD38\\uDD3B-\\uDD43\\uDDD1-\\uDDD7\\uDDDA-\\uDDE0\\uDDE4\\uDE01-\\uDE0A\\uDE33-\\uDE39\\uDE3B-\\uDE3E\\uDE47\\uDE51-\\uDE5B\\uDE84-\\uDE99\\uDF60-\\uDF67]|\\uD807[\\uDC2F-\\uDC36\\uDC38-\\uDC3F\\uDC92-\\uDCA7\\uDCA9-\\uDCB6\\uDD31-\\uDD36\\uDD3A\\uDD3C\\uDD3D\\uDD3F-\\uDD47\\uDD8A-\\uDD8E\\uDD90\\uDD91\\uDD93-\\uDD97\\uDEF3-\\uDEF6\\uDF00-\\uDF03\\uDF34-\\uDF3A\\uDF3E-\\uDF42\\uDF5A]|\\uD80D[\\uDC40\\uDC47-\\uDC55]|\\uD818[\\uDD1E-\\uDD2F]|\\uD81A[\\uDEF0-\\uDEF4\\uDF30-\\uDF36]|\\uD81B[\\uDD63\\uDD67-\\uDD6A\\uDF4F\\uDF51-\\uDF87\\uDF8F-\\uDF92\\uDFE4\\uDFF0\\uDFF1]|\\uD82F[\\uDC9D\\uDC9E]|\\uD833[\\uDF00-\\uDF2D\\uDF30-\\uDF46]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A\\uDC8F\\uDD30-\\uDD36\\uDEAE\\uDEEC-\\uDEEF]|\\uD839[\\uDCEC-\\uDCEF\\uDDEE\\uDDEF\\uDEE3\\uDEE6\\uDEEE\\uDEEF\\uDEF5]|\\uD83A[\\uDCD0-\\uDCD6\\uDD44-\\uDD4A]|\\uD83C[\\uDDE6-\\uDDFF\\uDFFB-\\uDFFF]|\\uDB40[\\uDC20-\\uDC7F\\uDD00-\\uDDEF]/.test(t)}function gc(t){return/[\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECE\\u0EDC-\\u0EDF\\u0F00-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F97\\u0F99-\\u0FBC\\u0FBE-\\u0FCC\\u0FCE-\\u0FD4\\u0FD9\\u0FDA\\u1000-\\u103F\\u1050-\\u108F\\u109A-\\u109F\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19DE\\u19DF\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1AA0-\\u1AAD\\u1B00-\\u1B4C\\u1B4E-\\u1B7F\\uA980-\\uA9CD\\uA9D0-\\uA9D9\\uA9DE-\\uA9EF\\uA9FA-\\uA9FE\\uAA60-\\uAAC2\\uAADB-\\uAADF]|\\uD805[\\uDF00-\\uDF1A\\uDF1D-\\uDF2B\\uDF3A\\uDF3B\\uDF3F-\\uDF46]/gim.test(String.fromCodePoint(t))}function tv(t,e){return/(?:[\\u1039\\u17D2\\u1A60\\u1BAB\\u200D\\uAAF6]|\\uD802\\uDE3F|\\uD804[\\uDD33\\uDFD0]|\\uD806[\\uDD3E\\uDE47\\uDE99]|\\uD807[\\uDD45\\uDD97\\uDF42])$/.test(t)||new RegExp("^\\\\p{gc=Mc}","u").test(e)}var ev={C:"18g,1;g2,3;4nb,1",D:"17k,1;5,1;1,1;1,5;4,d;1,7;1,2;z,2;8,g;i,12;1,2;9,1;1,1;1,2;14,3;2,1;28,9;3,f;2,4;1,1;2,3;2,6;7a,1;2,5;1,1;g,a;5,2;2,6;1,f",R:"17m,4;1,1;1,1;5,4;l,1;14,3;1,3;g,i;12,1;2,9;1,1;1,1;2,2;1,1;o,2;2x,3;f,2;4,1;1,2;3,2;6u,j;b,1;r,3;1,1;2,2;6,1",T:"174,b;1,1;1a,l;g,1;2t,7;2,6;2,2;1,4;bt,9;16,o;1,t;1clb,1"},rv={1569:[65152,0,0,0],1570:[65153,65154,0,0],1571:[65155,65156,0,0],1572:[65157,65158,0,0],1573:[65159,65160,0,0],1574:[65161,65162,65163,65164],1575:[65165,65166,0,0],1576:[65167,65168,65169,65170],1577:[65171,65172,0,0],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194,0,0],1584:[65195,65196,0,0],1585:[65197,65198,0,0],1586:[65199,65200,0,0],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262,0,0],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1611:[65136,0,0,65137],1612:[65138,0,0,0],1613:[65140,0,0,0],1614:[65142,0,0,65143],1615:[65144,0,0,65145],1616:[65146,0,0,65147],1617:[65148,0,0,65149],1618:[65150,0,0,65151],1649:[64336,64337,0,0],1655:[64477,0,0,0],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393,0,0],1676:[64388,64389,0,0],1677:[64386,64387,0,0],1678:[64390,64391,0,0],1681:[64396,64397,0,0],1688:[64394,64395,0,0],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415,0,0],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421,0,0],1729:[64422,64423,64424,64425],1733:[64480,64481,0,0],1734:[64473,64474,0,0],1735:[64471,64472,0,0],1736:[64475,64476,0,0],1737:[64482,64483,0,0],1739:[64478,64479,0,0],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431,0,0],1747:[64432,64433,0,0]},iv={\\u0644\\u0622:[65269,65270],\\u0644\\u0623:[65271,65272],\\u0644\\u0625:[65273,65274],\\u0644\\u0627:[65275,65276]},xc=1604,nv=/[\\u0600-\\u06ff\\u0750-\\u077f\\u0870-\\u089f\\u08a0-\\u08ff\\ufb50-\\ufdff\\ufe70-\\ufeff]/;function av(t,e,r){let i=0;for(let n of t.split(";")){let[a,s]=n.split(",").map(l=>parseInt(l,36)),o=i+a;for(let l=o;l<o+s;l++)r.set(l,e);i=o+s}}var Md=new Map;for(let[t,e]of Object.entries(ev))av(e,t,Md);function sv(t){var e;return(e=Md.get(t))!=null?e:"U"}function ov(t){return t==="D"||t==="L"||t==="C"}function lv(t){return t==="D"||t==="R"||t==="C"}function uv(t,e,r){return t==="D"?e&&r?3:e?1:r?2:0:t==="R"?+!!e:t==="L"?r?2:0:null}function hv(t){return[...t].map(e=>{let r=e.codePointAt(0);return{codePoint:r,type:sv(r),form:null}})}function cv(t){let e=t.filter(r=>r.type!=="T");for(let r=0;r<e.length;r++){let i=e[r],n=r>0&&ov(e[r-1].type),a=r+1<e.length&&lv(e[r+1].type);i.form=uv(i.type,n,a)}}function pv(t){let e=!1;for(let r of t)r.type==="T"?r.form=e?3:0:e=r.form===2||r.form===3}function fv(t){let e=[];for(let r=0;r<t.length;r++){let i=t[r];if(i.codePoint!==xc){e.push(i);continue}let n=r+1;for(;n<t.length&&t[n].type==="T";)n++;let a=t[n],s=a&&iv[String.fromCodePoint(xc,a.codePoint)];if(!s){e.push(i);continue}let o=i.form===3||i.form===1;e.push({codePoint:s[+!!o],type:"R",form:0}),e.push(...t.slice(r+1,n)),r=n}return e}function dv(t){if(t.form===null)return t.codePoint;let e=rv[t.codePoint];return e&&(e[t.form]||e[0])||t.codePoint}function yv(t){if(!nv.test(t))return t;let e=hv(t);return cv(e),pv(e),fv(e).map(r=>String.fromCodePoint(dv(r))).join("")}function mv(t,e,r){var n;let i=e.layout.get("text-transform").evaluate(r,{});return i==="uppercase"?t=t.toLocaleUpperCase():i==="lowercase"&&(t=t.toLocaleLowerCase()),((n=wr.applyArabicShaping)!=null?n:yv)(t)}function gv(t,e,r){for(let i of t.sections)i.text=mv(i.text,e,r);return t}function xv(t){let e={},r={},i=[],n=0;function a(u){i.push(t[u]),n++}function s(u,h,c){let p=r[u];return delete r[u],r[h]=p,i[p].geometry[0].pop(),i[p].geometry[0]=i[p].geometry[0].concat(c[0]),p}function o(u,h,c){let p=e[h];return delete e[h],e[u]=p,i[p].geometry[0].shift(),i[p].geometry[0]=c[0].concat(i[p].geometry[0]),p}function l(u,h,c){let p=c?h[0][h[0].length-1]:h[0][0];return`${u}:${p.x}:${p.y}`}for(let u=0;u<t.length;u++){let h=t[u],c=h.geometry,p=h.text?h.text.toString():null;if(!p){a(u);continue}let f=l(p,c),d=l(p,c,!0);if(f in r&&d in e&&r[f]!==e[d]){let y=o(f,d,c),m=s(f,d,i[y].geometry);delete e[f],delete r[d],r[l(p,i[m].geometry,!0)]=m,i[y].geometry=null}else f in r?s(f,d,c):d in e?o(f,d,c):(a(u),e[f]=n-1,r[d]=n-1)}return i.filter(u=>u.geometry)}var Bd=typeof Intl<"u"&&"Segmenter"in Intl,ta,ea;function tl(t){if(!Bd||!Q2(t))return[...t];ta!=null||(ta=new Intl.Segmenter(void 0,{granularity:"grapheme"}));let e=[];for(let{segment:r}of ta.segment(t)){let i=e.length-1;i>=0&&tv(e[i],r)?e[i]+=r:e.push(r)}return e}function vv(t){let e=new Set;if(Bd){ea!=null||(ea=new Intl.Segmenter(void 0,{granularity:"word"}));for(let{index:i}of ea.segment(t))e.add(i);return e}let r=0;for(let i of t.split(new RegExp("\\\\b|(?=\\\\p{Ideo})","u")))e.add(r),r+=i.length;return e}function Pd(t){let e=t.codePointAt(0);return t.length>(e>65535?2:1)}function ru(t){return/\\s/u.test(String.fromCodePoint(t))}function el(t){for(let e of t)if(Qa(e.codePointAt(0)))return!0;return!1}function bv(t){for(let e of t)if(!wv(e.codePointAt(0)))return!1;return!0}function wv(t){return!Z2(t)}function vc(t){return!(Qa(t)||J2(t))}function zd(t){return new RegExp("\\\\p{sc=Arab}","u").test(String.fromCodePoint(t))}function Ld(t){return H2(t)}function Vd(t){for(let e of t)if(Ld(e.codePointAt(0)))return!0;return!1}var Gr={"!":"\\uFE15","#":"\\uFF03",$:"\\uFF04","%":"\\uFF05","&":"\\uFF06","(":"\\uFE35",")":"\\uFE36","*":"\\uFF0A","+":"\\uFF0B",",":"\\uFE10","-":"\\uFE32",".":"\\u30FB","/":"\\uFF0F",":":"\\uFE13",";":"\\uFE14","<":"\\uFE3F","=":"\\uFF1D",">":"\\uFE40","?":"\\uFE16","@":"\\uFF20","[":"\\uFE47","\\\\":"\\uFF3C","]":"\\uFE48","^":"\\uFF3E",_:"\\uFE33","`":"\\uFF40","{":"\\uFE37","|":"\\u2015","}":"\\uFE38","~":"\\uFF5E","\\xA2":"\\uFFE0","\\xA3":"\\uFFE1","\\xA5":"\\uFFE5","\\xA6":"\\uFFE4","\\xAC":"\\uFFE2","\\xAF":"\\uFFE3","\\u2013":"\\uFE32","\\u2014":"\\uFE31","\\u2018":"\\uFE43","\\u2019":"\\uFE44","\\u201C":"\\uFE41","\\u201D":"\\uFE42","\\u2026":"\\uFE19","\\u22EF":"\\uFE19","\\u2027":"\\u30FB","\\u20A9":"\\uFFE6","\\u3001":"\\uFE11","\\u3002":"\\uFE12","\\u3008":"\\uFE3F","\\u3009":"\\uFE40","\\u300A":"\\uFE3D","\\u300B":"\\uFE3E","\\u300C":"\\uFE41","\\u300D":"\\uFE42","\\u300E":"\\uFE43","\\u300F":"\\uFE44","\\u3010":"\\uFE3B","\\u3011":"\\uFE3C","\\u3014":"\\uFE39","\\u3015":"\\uFE3A","\\u3016":"\\uFE17","\\u3017":"\\uFE18","\\uFF01":"\\uFE15","\\uFF08":"\\uFE35","\\uFF09":"\\uFE36","\\uFF0C":"\\uFE10","\\uFF0D":"\\uFE32","\\uFF0E":"\\u30FB","\\uFF1A":"\\uFE13","\\uFF1B":"\\uFE14","\\uFF1C":"\\uFE3F","\\uFF1E":"\\uFE40","\\uFF1F":"\\uFE16","\\uFF3B":"\\uFE47","\\uFF3D":"\\uFE48","\\uFF3F":"\\uFE33","\\uFF5B":"\\uFE37","\\uFF5C":"\\u2015","\\uFF5D":"\\uFE38","\\uFF5F":"\\uFE35","\\uFF60":"\\uFE36","\\uFF61":"\\uFE12","\\uFF62":"\\uFE41","\\uFF63":"\\uFE42"};function Dv(t){let e="",r={premature:!0,value:void 0},i=t[Symbol.iterator](),n=i.next(),a=t[Symbol.iterator]();a.next();let s=a.next();for(;!n.done;)(s.done||!vc(s.value.codePointAt(0))||Gr[s.value])&&(r.premature||!vc(r.value.codePointAt(0))||Gr[r.value])&&Gr[n.value]?e+=Gr[n.value]:e+=n.value,r={value:n.value,premature:!1},n=i.next(),s=a.next();return e}var _v={10:!0,13:!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},Av={40:!0};function bc(t,e,r,i,n,a){if("fontStack"in e){let s=r[e.fontStack],o=s==null?void 0:s[t];if(o)return o.metrics.advance*e.scale+n;let l=0;for(let u of t){let h=s==null?void 0:s[u];h&&(l+=h.metrics.advance*e.scale+n)}return l}{let s=i[e.imageName];return s?s.displaySize[0]*e.scale*24/a+n:0}}function wc(t,e,r,i){let n=(t-e)**2;return i?t<e?n/2:n*2:n+Math.abs(r)*r}function Dc(t){return/^\\s+$/u.test(t)}function Sv(t,e,r){let i=0;return(t===10||t===13)&&(i-=1e4),r&&(i+=150),(t===40||t===65288)&&(i+=50),(e===41||e===65289)&&(i+=50),i}function _c(t,e,r,i,n,a){let s=null,o=wc(e,r,n,a);for(let l of i){let u=wc(e-l.x,r,n,a)+l.badness;u<=o&&(s=l,o=u)}return{index:t,x:e,priorBreak:s,badness:o}}function Od(t){return t?Od(t.priorBreak).concat(t.index):[]}var iu=class rl{constructor(e="",r=[],i=[]){this.text=e,this.sections=r,this.sectionIndex=i,this.imageSectionID=null,this._graphemes=null}graphemes(){var e;return(e=this._graphemes)!=null||(this._graphemes=tl(this.text)),this._graphemes}static fromFeature(e,r){let i=new rl;for(let n of e.sections)n.image?i.addImageSection(n):i.addTextSection(n,r);return i}length(){return this.graphemes().length}getSection(e){return this.sections[this.sectionIndex[e]]}getSectionIndex(e){return this.sectionIndex[e]}verticalizePunctuation(){this.text=Dv(this.text),this._graphemes=null}hasZeroWidthSpaces(){return this.text.includes("\\u200B")}trim(){let e=this.graphemes(),r=0;for(;r<e.length&&Dc(e[r]);)r++;let i=e.length;for(;i>r&&Dc(e[i-1]);)i--;this.text=e.slice(r,i).join(""),this.sectionIndex=this.sectionIndex.slice(r,i),this._graphemes=null}substring(e,r){let i=this.graphemes().slice(e,r).join(""),n=this.sectionIndex.slice(e,r);return new rl(i,this.sections,n)}toCodeUnitIndex(e){return this.graphemes().slice(0,e).join("").length}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((e,r)=>Math.max(e,this.sections[r].scale),0)}getMaxImageSize(e){let r=0,i=0;for(let n=0;n<this.length();n++){let a=this.getSection(n);if("imageName"in a){let s=e[a.imageName];if(!s)continue;let o=s.displaySize;r=Math.max(r,o[0]),i=Math.max(i,o[1])}}return{maxImageWidth:r,maxImageHeight:i}}_appendSection(e,r){let i=this.graphemes(),n=i.length>0?i[i.length-1]:"",a=tl(n+e);this.text+=e,this._graphemes=i.slice(0,n?-1:void 0).concat(a);let s=a.length-+!!n;for(let o=0;o<s;o++)this.sectionIndex.push(r)}addTextSection(e,r){this.sections.push({scale:e.scale||1,verticalAlign:e.verticalAlign||"bottom",fontStack:e.fontStack||r}),this._appendSection(e.text,this.sections.length-1)}addImageSection(e){let r=e.image?e.image.name:"";if(r.length===0){Bt("Can\'t add FormattedSection with an empty image.");return}let i=this.getNextImageSectionCharCode();if(!i){Bt("Reached maximum number of images 6401");return}this.sections.push({scale:1,verticalAlign:e.verticalAlign||"bottom",imageName:r}),this._appendSection(String.fromCharCode(i),this.sections.length-1)}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(e,r,i,n,a){let s=[],o=this.determineAverageLineWidth(e,r,i,n,a),l=this.hasZeroWidthSpaces(),u=this.graphemes(),h=null,c=0,p=0;for(let f=0;f<u.length;f++){let d=u[f];if(f>0){let y=u[f-1].codePointAt(0),m=d.codePointAt(0),g=K2(y),x=gc(y)&&gc(m);(_v[y]||g||"imageName"in this.getSection(f-1)||u[f+1]!==void 0&&Av[m]||x&&(h!=null?h:h=vv(this.text)).has(p))&&s.push(_c(f,c,o,s,Sv(y,m,g&&l),!1))}ru(d.codePointAt(0))||(c+=bc(d,this.getSection(f),i,n,e,a)),p+=d.length}return Od(_c(this.length(),c,o,s,0,!0))}determineAverageLineWidth(e,r,i,n,a){let s=0,o=0;for(let u of this.graphemes()){let h=this.getSection(o);s+=bc(u,h,i,n,e,a),o++}let l=Math.max(1,Math.ceil(s/r));return s/l}};function Ev(){return(function(t){var e={R:"13k,1a,2,3,3,2+1j,ch+16,a+1,5+2,2+n,5,a,4,6+16,4+3,h+1b,4mo,179q,2+9,2+11,2i9+7y,2+68,4,3+4,5+13,4+3,2+4k,3+29,8+cf,1t+7z,w+17,3+3m,1t+3z,16o1+5r,8+30,8+mc,29+1r,29+4v,75+73",EN:"1c+9,3d+1,6,187+9,513,4+5,7+9,sf+j,175h+9,qw+q,161f+1d,4xt+a,25i+9",ES:"17,2,6dp+1,f+1,av,16vr,mx+1,4o,2",ET:"z+2,3h+3,b+1,ym,3e+1,2o,p4+1,8,6u,7c,g6,1wc,1n9+4,30+1b,2n,6d,qhx+1,h0m,a+1,49+2,63+1,4+1,6bb+3,12jj",AN:"16o+5,2j+9,2+1,35,ed,1ff2+9,87+u",CS:"18,2+1,b,2u,12k,55v,l,17v0,2,3,53,2+1,b",B:"a,3,f+2,2v,690",S:"9,2,k",WS:"c,k,4f4,1vk+a,u,1j,335",ON:"x+1,4+4,h+5,r+5,r+3,z,5+3,2+1,2+1,5,2+2,3+4,o,w,ci+1,8+d,3+d,6+8,2+g,39+1,9,6+1,2,33,b8,3+1,3c+1,7+1,5r,b,7h+3,sa+5,2,3i+6,jg+3,ur+9,2v,ij+1,9g+9,7+a,8m,4+1,49+x,14u,2+2,c+2,e+2,e+2,e+1,i+n,e+e,2+p,u+2,e+2,36+1,2+3,2+1,b,2+2,6+5,2,2,2,h+1,5+4,6+3,3+f,16+2,5+3l,3+81,1y+p,2+40,q+a,m+13,2r+ch,2+9e,75+hf,3+v,2+2w,6e+5,f+6,75+2a,1a+p,2+2g,d+5x,r+b,6+3,4+o,g,6+1,6+2,2k+1,4,2j,5h+z,1m+1,1e+f,t+2,1f+e,d+3,4o+3,2s+1,w,535+1r,h3l+1i,93+2,2s,b+1,3l+x,2v,4g+3,21+3,kz+1,g5v+1,5a,j+9,n+v,2,3,2+8,2+1,3+2,2,3,46+1,4+4,h+5,r+5,r+a,3h+2,4+6,b+4,78,1r+24,4+c,4,1hb,ey+6,103+j,16j+c,1ux+7,5+g,fsh,jdq+1t,4,57+2e,p1,1m,1m,1m,1m,4kt+1,7j+17,5+2r,d+e,3+e,2+e,2+10,m+4,w,1n+5,1q,4z+5,4b+rb,9+c,4+c,4+37,d+2g,8+b,l+b,5+1j,9+9,7+13,9+t,3+1,27+3c,2+29,2+3q,d+d,3+4,4+2,6+6,a+o,8+6,a+2,e+6,16+42,2+1i",BN:"0+8,6+d,2s+5,2+p,e,4m9,1kt+2,2b+5,5+5,17q9+v,7k,6p+8,6+1,119d+3,440+7,96s+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+75,6p+2rz,1ben+1,1ekf+1,1ekf+1",NSM:"lc+33,7o+6,7c+18,2,2+1,2+1,2,21+a,1d+k,h,2u+6,3+5,3+1,2+3,10,v+q,2k+a,1n+8,a,p+3,2+8,2+2,2+4,18+2,3c+e,2+v,1k,2,5+7,5,4+6,b+1,u,1n,5+3,9,l+1,r,3+1,1m,5+1,5+1,3+2,4,v+1,4,c+1,1m,5+4,2+1,5,l+1,n+5,2,1n,3,2+3,9,8+1,c+1,v,1q,d,1f,4,1m+2,6+2,2+3,8+1,c+1,u,1n,g+1,l+1,t+1,1m+1,5+3,9,l+1,u,21,8+2,2,2j,3+6,d+7,2r,3+8,c+5,23+1,s,2,2,1k+d,2+4,2+1,6+a,2+z,a,2v+3,2+5,2+1,3+1,q+1,5+2,h+3,e,3+1,7,g,jk+2,qb+2,u+2,u+1,v+1,1t+1,2+6,9,3+a,a,1a+2,3c+1,z,3b+2,5+1,a,7+2,64+1,3,1n,2+6,2,2,3+7,7+9,3,1d+g,1s+3,1d,2+4,2,6,15+8,d+1,x+3,3+1,2+2,1l,2+1,4,2+2,1n+7,3+1,49+2,2+c,2+6,5,7,4+1,5j+1l,2+4,k1+w,2db+2,3y,2p+v,ff+3,30+1,n9x+3,2+9,x+1,29+1,7l,4,5,q+1,6,48+1,r+h,e,13+7,q+a,1b+2,1d,3+3,3+1,14,1w+5,3+1,3+1,d,9,1c,1g,2+2,3+1,6+1,2,17+1,9,6n,3,5,fn5,ki+f,h+f,r2,6b,46+4,1af+2,2+1,6+3,15+2,5,4m+1,fy+3,as+1,4a+a,4x,1j+e,1l+2,1e+3,3+1,1y+2,11+4,2+7,1r,d+1,1h+8,b+3,3,2o+2,3,2+1,7,4h,4+7,m+1,1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+5,3+1,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2d+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,f0c+4,1o+6,t5,1s+3,2a,f5l+1,43t+2,i+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,gzhy+6n",AL:"16w,3,2,e+1b,z+2,2+2s,g+1,8+1,b+m,2+t,s+2i,c+e,4h+f,1d+1e,1bwe+dp,3+3z,x+c,2+1,35+3y,2rm+z,5+7,b+5,dt+l,c+u,17nl+27,1t+27,4x+6n,3+d",LRO:"6ct",RLO:"6cu",LRE:"6cq",RLE:"6cr",PDF:"6cs",LRI:"6ee",RLI:"6ef",FSI:"6eg",PDI:"6eh"},r={},i={};r.L=1,i[1]="L",Object.keys(e).forEach(function(R,J){r[R]=1<<J+1,i[r[R]]=R}),Object.freeze(r);var n=r.LRI|r.RLI|r.FSI,a=r.L|r.R|r.AL,s=r.B|r.S|r.WS|r.ON|r.FSI|r.LRI|r.RLI|r.PDI,o=r.BN|r.RLE|r.LRE|r.RLO|r.LRO|r.PDF,l=r.S|r.WS|r.B|n|r.PDI|o,u=null;function h(){if(!u){u=new Map;var R=0;for(var J in e)if(e.hasOwnProperty(J))for(var W=e[J],M="",ut=void 0,X=!1,G=0,K=0;K<=W.length+1;K+=1){var Nt=W[K];if(Nt!==","&&K!==W.length)Nt==="+"?(X=!0,G=R=G+parseInt(M,36),M=""):M+=Nt;else{X?ut=R+parseInt(M,36):(G=R=G+parseInt(M,36),ut=R),X=!1,M="",G=ut;for(var vt=R;vt<ut+1;vt+=1)u.set(vt,r[J])}}}}function c(R){return h(),u.get(R.codePointAt(0))||r.L}function p(R){return i[c(R)]}var f={pairs:"14>1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1",canonical:"6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye"};function d(R,J){var W=0,M=new Map,ut=J&&new Map,X;return R.split(",").forEach(function G(K){if(K.indexOf("+")!==-1)for(var Nt=+K;Nt--;)G(X);else{X=K;var vt=K.split(">"),nt=vt[0],Tt=vt[1];nt=String.fromCodePoint(W+=parseInt(nt,36)),Tt=String.fromCodePoint(W+=parseInt(Tt,36)),M.set(nt,Tt),J&&ut.set(Tt,nt)}}),{map:M,reverseMap:ut}}var y,m,g;function x(){if(!y){var R=d(f.pairs,!0),J=R.map,W=R.reverseMap;y=J,m=W,g=d(f.canonical,!1).map}}function v(R){return x(),y.get(R)||null}function b(R){return x(),m.get(R)||null}function D(R){return x(),g.get(R)||null}var A=r.L,_=r.R,S=r.EN,k=r.ES,z=r.ET,O=r.AN,P=r.CS,L=r.B,F=r.S,$=r.ON,U=r.BN,T=r.NSM,q=r.AL,at=r.LRO,ot=r.RLO,pt=r.LRE,Et=r.RLE,qt=r.PDF,Ht=r.LRI,Ve=r.RLI,ye=r.FSI,Kt=r.PDI;function Oe(R,J){for(var W=125,M=new Uint32Array(R.length),ut=0;ut<R.length;ut++)M[ut]=c(R[ut]);var X=new Map;function G(Yt,ue){var Wt=M[Yt];M[Yt]=ue,X.set(Wt,X.get(Wt)-1),Wt&s&&X.set(s,X.get(s)-1),X.set(ue,(X.get(ue)||0)+1),ue&s&&X.set(s,(X.get(s)||0)+1)}for(var K=new Uint8Array(R.length),Nt=new Map,vt=[],nt=null,Tt=0;Tt<R.length;Tt++)nt||vt.push(nt={start:Tt,end:R.length-1,level:J==="rtl"?1:J==="ltr"?0:rh(Tt,!1)}),M[Tt]&L&&(nt.end=Tt,nt=null);for(var di=Et|pt|ot|at|n|Kt|qt|L,nr=function(Yt){return Yt+(Yt&1?1:2)},Re=function(Yt){return Yt+(Yt&1?2:1)},$e=0;$e<vt.length;$e++){nt=vt[$e];var lt=[{_level:nt.level,_override:0,_isolate:0}],bt=void 0,Fe=0,Ne=0,rs=0;X.clear();for(var zt=nt.start;zt<=nt.end;zt++){var Lt=M[zt];if(bt=lt[lt.length-1],X.set(Lt,(X.get(Lt)||0)+1),Lt&s&&X.set(s,(X.get(s)||0)+1),Lt&di)if(Lt&(Et|pt)){K[zt]=bt._level;var Iu=(Lt===Et?Re:nr)(bt._level);Iu<=W&&!Fe&&!Ne?lt.push({_level:Iu,_override:0,_isolate:0}):Fe||Ne++}else if(Lt&(ot|at)){K[zt]=bt._level;var Cu=(Lt===ot?Re:nr)(bt._level);Cu<=W&&!Fe&&!Ne?lt.push({_level:Cu,_override:Lt&ot?_:A,_isolate:0}):Fe||Ne++}else if(Lt&n){Lt&ye&&(Lt=rh(zt+1,!0)===1?Ve:Ht),K[zt]=bt._level,bt._override&&G(zt,bt._override);var Mu=(Lt===Ve?Re:nr)(bt._level);Mu<=W&&Fe===0&&Ne===0?(rs++,lt.push({_level:Mu,_override:0,_isolate:1,_isolInitIndex:zt})):Fe++}else if(Lt&Kt){if(Fe>0)Fe--;else if(rs>0){for(Ne=0;!lt[lt.length-1]._isolate;)lt.pop();var is=lt[lt.length-1]._isolInitIndex;is!=null&&(Nt.set(is,zt),Nt.set(zt,is)),lt.pop(),rs--}bt=lt[lt.length-1],K[zt]=bt._level,bt._override&&G(zt,bt._override)}else Lt&qt?(Fe===0&&(Ne>0?Ne--:!bt._isolate&&lt.length>1&&(lt.pop(),bt=lt[lt.length-1])),K[zt]=bt._level):Lt&L&&(K[zt]=nt.level);else K[zt]=bt._level,bt._override&&Lt!==U&&G(zt,bt._override)}for(var Cr=[],me=null,ar=nt.start;ar<=nt.end;ar++){var ns=M[ar];if(!(ns&o)){var Bu=K[ar],Pu=ns&n,Wy=ns===Kt;me&&Bu===me._level?(me._end=ar,me._endsWithIsolInit=Pu):Cr.push(me={_start:ar,_end:ar,_level:Bu,_startsWithPDI:Wy,_endsWithIsolInit:Pu})}}for(var as=[],Sn=0;Sn<Cr.length;Sn++){var En=Cr[Sn];if(!En._startsWithPDI||En._startsWithPDI&&!Nt.has(En._start)){for(var ss=[me=En],zu=void 0;me&&me._endsWithIsolInit&&(zu=Nt.get(me._end))!=null;)for(var Fn=Sn+1;Fn<Cr.length;Fn++)if(Cr[Fn]._start===zu){ss.push(me=Cr[Fn]);break}for(var Mr=[],os=0;os<ss.length;os++)for(var Lu=ss[os],ls=Lu._start;ls<=Lu._end;ls++)Mr.push(ls);for(var Zy=K[Mr[0]],Vu=nt.level,kn=Mr[0]-1;kn>=0;kn--)if(!(M[kn]&o)){Vu=K[kn];break}var us=Mr[Mr.length-1],Hy=K[us],Ou=nt.level;if(!(M[us]&n)){for(var Tn=us+1;Tn<=nt.end;Tn++)if(!(M[Tn]&o)){Ou=K[Tn];break}}as.push({_seqIndices:Mr,_sosType:Math.max(Vu,Zy)%2?_:A,_eosType:Math.max(Ou,Hy)%2?_:A})}}for(var hs=0;hs<as.length;hs++){var cs=as[hs],j=cs._seqIndices,yi=cs._sosType,Ky=cs._eosType,Br=K[j[0]]&1?_:A;if(X.get(T))for(var In=0;In<j.length;In++){var Ru=j[In];if(M[Ru]&T){for(var ps=yi,Cn=In-1;Cn>=0;Cn--)if(!(M[j[Cn]]&o)){ps=M[j[Cn]];break}G(Ru,ps&(n|Kt)?$:ps)}}if(X.get(S))for(var Mn=0;Mn<j.length;Mn++){var $u=j[Mn];if(M[$u]&S)for(var Bn=Mn-1;Bn>=-1;Bn--){var Nu=Bn===-1?yi:M[j[Bn]];if(Nu&a){Nu===q&&G($u,O);break}}}if(X.get(q))for(var fs=0;fs<j.length;fs++){var Uu=j[fs];M[Uu]&q&&G(Uu,_)}if(X.get(k)||X.get(P))for(var mi=1;mi<j.length-1;mi++){var ds=j[mi];if(M[ds]&(k|P)){for(var Pr=0,ys=0,ms=mi-1;ms>=0&&(Pr=M[j[ms]],Pr&o);ms--);for(var gs=mi+1;gs<j.length&&(ys=M[j[gs]],ys&o);gs++);Pr===ys&&(M[ds]===k?Pr===S:Pr&(S|O))&&G(ds,Pr)}}if(X.get(S)){for(var ge=0;ge<j.length;ge++)if(M[j[ge]]&S){for(var Pn=ge-1;Pn>=0&&M[j[Pn]]&(z|o);Pn--)G(j[Pn],S);for(ge++;ge<j.length&&M[j[ge]]&(z|o|S);ge++)M[j[ge]]!==S&&G(j[ge],S)}}if(X.get(z)||X.get(k)||X.get(P))for(var gi=0;gi<j.length;gi++){var qu=j[gi];if(M[qu]&(z|k|P)){G(qu,$);for(var zn=gi-1;zn>=0&&M[j[zn]]&o;zn--)G(j[zn],$);for(var Ln=gi+1;Ln<j.length&&M[j[Ln]]&o;Ln++)G(j[Ln],$)}}if(X.get(S))for(var xs=0,ju=yi;xs<j.length;xs++){var Gu=j[xs],vs=M[Gu];vs&S?ju===A&&G(Gu,A):vs&a&&(ju=vs)}if(X.get(s)){for(var xi=_|S|O,Xu=xi|A,Vn=[],zr=[],Lr=0;Lr<j.length;Lr++)if(M[j[Lr]]&s){var vi=R[j[Lr]],Yu=void 0;if(v(vi)!==null)if(zr.length<63)zr.push({char:vi,seqIndex:Lr});else break;else if((Yu=b(vi))!==null)for(var bi=zr.length-1;bi>=0;bi--){var bs=zr[bi].char;if(bs===Yu||bs===b(D(vi))||v(D(bs))===vi){Vn.push([zr[bi].seqIndex,Lr]),zr.length=bi;break}}}Vn.sort(function(Yt,ue){return Yt[0]-ue[0]});for(var ws=0;ws<Vn.length;ws++){for(var Wu=Vn[ws],On=Wu[0],Ds=Wu[1],Zu=!1,xe=0,_s=On+1;_s<Ds;_s++){var Hu=j[_s];if(M[Hu]&Xu){Zu=!0;var Ku=M[Hu]&xi?_:A;if(Ku===Br){xe=Ku;break}}}if(Zu&&!xe){xe=yi;for(var As=On-1;As>=0;As--){var Ju=j[As];if(M[Ju]&Xu){var Qu=M[Ju]&xi?_:A;xe=Qu===Br?Br:Qu;break}}}if(xe){if(M[j[On]]=M[j[Ds]]=xe,xe!==Br){for(var wi=On+1;wi<j.length;wi++)if(!(M[j[wi]]&o)){c(R[j[wi]])&T&&(M[j[wi]]=xe);break}}if(xe!==Br){for(var Di=Ds+1;Di<j.length;Di++)if(!(M[j[Di]]&o)){c(R[j[Di]])&T&&(M[j[Di]]=xe);break}}}}for(var Ue=0;Ue<j.length;Ue++)if(M[j[Ue]]&s){for(var th=Ue,Ss=Ue,Es=yi,_i=Ue-1;_i>=0;_i--)if(M[j[_i]]&o)th=_i;else{Es=M[j[_i]]&xi?_:A;break}for(var eh=Ky,Ai=Ue+1;Ai<j.length;Ai++)if(M[j[Ai]]&(s|o))Ss=Ai;else{eh=M[j[Ai]]&xi?_:A;break}for(var Fs=th;Fs<=Ss;Fs++)M[j[Fs]]=Es===eh?Es:Br;Ue=Ss}}}for(var Jt=nt.start;Jt<=nt.end;Jt++){var Jy=K[Jt],Rn=M[Jt];if(Jy&1?Rn&(A|S|O)&&K[Jt]++:Rn&_?K[Jt]++:Rn&(O|S)&&(K[Jt]+=2),Rn&o&&(K[Jt]=Jt===0?nt.level:K[Jt-1]),Jt===nt.end||c(R[Jt])&(F|L))for(var $n=Jt;$n>=0&&c(R[$n])&l;$n--)K[$n]=nt.level}}return{levels:K,paragraphs:vt};function rh(Yt,ue){for(var Wt=Yt;Wt<R.length;Wt++){var qe=M[Wt];if(qe&(_|q))return 1;if(qe&(L|A)||ue&&qe===Kt)return 0;if(qe&n){var ih=Qy(Wt);Wt=ih===-1?R.length:ih}}return 0}function Qy(Yt){for(var ue=1,Wt=Yt+1;Wt<R.length;Wt++){var qe=M[Wt];if(qe&L)break;if(qe&Kt){if(--ue===0)return Wt}else qe&n&&ue++}return-1}}var kr="14>1,j>2,t>2,u>2,1a>g,2v3>1,1>1,1ge>1,1wd>1,b>1,1j>1,f>1,ai>3,-2>3,+1,8>1k0,-1jq>1y7,-1y6>1hf,-1he>1h6,-1h5>1ha,-1h8>1qi,-1pu>1,6>3u,-3s>7,6>1,1>1,f>1,1>1,+2,3>1,1>1,+13,4>1,1>1,6>1eo,-1ee>1,3>1mg,-1me>1mk,-1mj>1mi,-1mg>1mi,-1md>1,1>1,+2,1>10k,-103>1,1>1,4>1,5>1,1>1,+10,3>1,1>8,-7>8,+1,-6>7,+1,a>1,1>1,u>1,u6>1,1>1,+5,26>1,1>1,2>1,2>2,8>1,7>1,4>1,1>1,+5,b8>1,1>1,+3,1>3,-2>1,2>1,1>1,+2,c>1,3>1,1>1,+2,h>1,3>1,a>1,1>1,2>1,3>1,1>1,d>1,f>1,3>1,1a>1,1>1,6>1,7>1,13>1,k>1,1>1,+19,4>1,1>1,+2,2>1,1>1,+18,m>1,a>1,1>1,lk>1,1>1,4>1,2>1,f>1,3>1,1>1,+3,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,6>1,4j>1,j>2,t>2,u>2,2>1,+1",rr;function fi(){if(!rr){var R=d(kr,!0),J=R.map;R.reverseMap.forEach(function(W,M){J.set(M,W)}),rr=J}}function kt(R){return fi(),rr.get(R)||null}function Ee(R,J,W,M){var ut=R.length;W=Math.max(0,W==null?0:+W),M=Math.min(ut-1,M==null?ut-1:+M);for(var X=new Map,G=W;G<=M;G++)if(J[G]&1){var K=kt(R[G]);K!==null&&X.set(G,K)}return X}function ir(R,J,W,M){var ut=R.length;W=Math.max(0,W==null?0:+W),M=Math.min(ut-1,M==null?ut-1:+M);var X=[];return J.paragraphs.forEach(function(G){var K=Math.max(W,G.start),Nt=Math.min(M,G.end);if(K<Nt){for(var vt=J.levels.slice(K,Nt+1),nt=Nt;nt>=K&&c(R[nt])&l;nt--)vt[nt]=G.level;for(var Tt=G.level,di=1/0,nr=0;nr<vt.length;nr++){var Re=vt[nr];Re>Tt&&(Tt=Re),Re<di&&(di=Re|1)}for(var $e=Tt;$e>=di;$e--)for(var lt=0;lt<vt.length;lt++)if(vt[lt]>=$e){for(var bt=lt;lt+1<vt.length&&vt[lt+1]>=$e;)lt++;lt>bt&&X.push([bt+K,lt+K])}}}),X}function Tr(R,J,W,M){var ut=Ir(R,J,W,M),X=[].concat(R);return ut.forEach(function(G,K){X[K]=(J.levels[G]&1?kt(R[G]):null)||R[G]}),X.join("")}function Ir(R,J,W,M){for(var ut=ir(R,J,W,M),X=[],G=0;G<R.length;G++)X[G]=G;return ut.forEach(function(K){for(var Nt=K[0],vt=K[1],nt=X.slice(Nt,vt+1),Tt=nt.length;Tt--;)X[vt-Tt]=nt[Tt]}),X}return t.closingToOpeningBracket=b,t.getBidiCharType=c,t.getBidiCharTypeName=p,t.getCanonicalBracket=D,t.getEmbeddingLevels=Oe,t.getMirroredCharacter=kt,t.getMirroredCharactersMap=Ee,t.getReorderSegments=ir,t.getReorderedIndices=Ir,t.getReorderedString=Tr,t.openingToClosingBracket=v,Object.defineProperty(t,"__esModule",{value:!0}),t})({})}var nu=Ev(),Fv=/[\\u061c\\u200e\\u200f\\u202a-\\u202e\\u2066-\\u2069]/,kv=new Set(["WS","FSI","LRI","RLI","PDI"]),Tv=new Set(["S","B"]);function Iv(t,e,r,i){let n=[],a=r;for(let s of tl(t.slice(r,i)))n.push({index:a,text:s,level:e[a]}),a+=s.length;return n}function Cv(t,e){let r=!0;for(let i=t.length-1;i>=0;i--){let n=nu.getBidiCharTypeName(t[i].text[0]);Tv.has(n)?(t[i].level=e,r=!0):r&&kv.has(n)?t[i].level=e:r=!1}}function Mv(t,e){let r=e,i=1/0;for(let{level:a}of t)a>r&&(r=a),(a|1)<i&&(i=a|1);let n=t.slice();for(let a=r;a>=i;a--)for(let s=0;s<n.length;s++){if(n[s].level<a)continue;let o=s;for(;o+1<n.length&&n[o+1].level>=a;)o++;for(let l=s,u=o;l<u;l++,u--)[n[l],n[u]]=[n[u],n[l]];s=o}return n}function Bv(t){var e;return t.level%2==0?t.text:(e=nu.getMirroredCharacter(t.text))!=null?e:t.text}function Pv(t,e){var r,i;return(i=(r=t.find(n=>e>=n.start&&e<=n.end))==null?void 0:r.level)!=null?i:0}function zv(t,e,r,i,n){let a=Iv(t,e,i,n);Cv(a,r);let s="",o=[];for(let l of Mv(a,r)){if(Fv.test(l.text))continue;let u=Bv(l);s+=u,o.push(...Array(u.length).fill(l.index))}return{text:s,sourceIndices:o}}function Lv(t,e){let r=e.filter(a=>a>0&&a<t.length),i=[...new Set([0,...r,t.length])].sort((a,s)=>a-s),n=[];for(let a=0;a+1<i.length;a++)n.push([i[a],i[a+1]]);return n}function Rd(t,e){let{levels:r,paragraphs:i}=nu.getEmbeddingLevels(t);return Lv(t,e.concat(i.map(n=>n.start))).map(([n,a])=>zv(t,r,Pv(i,n),n,a))}function Vv(t,e){return Rd(t,e).map(r=>r.text)}function Ov(t,e,r){return Rd(t,r).map(i=>[i.text,i.sourceIndices.map(n=>{var a;return(a=e[n])!=null?a:0})])}var il=4294967296,Ac=1/il,Sc=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),au=class{constructor(t){this.buf=ArrayBuffer.isView(t)?t:new Uint8Array(t),this.dataView=new DataView(this.buf.buffer,this.buf.byteOffset,this.buf.byteLength),this.pos=0,this.type=0,this._valueStart=-1,this.length=this.buf.length}readFields(t,e,r=this.length){let i;for(;i=this.nextField(r);)t(i,e,this);return e}readMessage(t,e){return this.readFields(t,e,this.readVarint()+this.pos)}readFixed32(){let t=this.dataView.getUint32(this.pos,!0);return this.pos+=4,t}readSFixed32(){let t=this.dataView.getInt32(this.pos,!0);return this.pos+=4,t}readFixed64(){let t=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*il;return this.pos+=8,t}readSFixed64(){let t=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*il;return this.pos+=8,t}readFloat(){let t=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,t}readDouble(){let t=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,t}readVarint(t){let e=this.buf,r=e[this.pos++];if(r<128)return r;let i=r&127,n;return n=e[this.pos++],i|=(n&127)<<7,n<128||(n=e[this.pos++],i|=(n&127)<<14,n<128)||(n=e[this.pos++],i|=(n&127)<<21,n<128)?i:(n=e[this.pos],i|=(n&15)<<28,$v(i,t,this))}readSVarint(){let t=this.readVarint();return t%2==1?(t+1)/-2:t/2}readBoolean(){return!!this.readVarint()}readString(){let t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&Sc?Sc.decode(this.buf.subarray(e,t)):tb(this.buf,e,t)}readBytes(){let t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e}readPackedVarint(t=[],e){let r=this.readPackedEnd();for(;this.pos<r;)t.push(this.readVarint(e));return t}readPackedSVarint(t=[]){let e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readSVarint());return t}readPackedBoolean(t=[]){let e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readBoolean());return t}readPackedFloat(t=[]){let e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readFloat());return t}readPackedDouble(t=[]){let e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readDouble());return t}readPackedFixed32(t=[]){let e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readFixed32());return t}readPackedSFixed32(t=[]){let e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readSFixed32());return t}readPackedFixed64(t=[]){let e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readFixed64());return t}readPackedSFixed64(t=[]){let e=this.readPackedEnd();for(;this.pos<e;)t.push(this.readSFixed64());return t}readPackedEnd(){return this.type===2?this.readVarint()+this.pos:this.pos+1}nextField(t=this.length){if(this.pos===this._valueStart&&this.skip(this.type),this.pos>=t)return 0;let e=this.readVarint();return this.type=e&7,this._valueStart=this.pos,e>>>3}skip(t){let e=t&7;if(e===0)for(;this.buf[this.pos++]>127;);else if(e===2)this.pos=this.readVarint()+this.pos;else if(e===5)this.pos+=4;else if(e===1)this.pos+=8;else throw Error(`Unimplemented type: ${e}`)}},Rv=class{constructor(t=new Uint8Array(16)){this.buf=ArrayBuffer.isView(t)?t:new Uint8Array(t),this.dataView=new DataView(this.buf.buffer,this.buf.byteOffset,this.buf.byteLength),this.pos=0,this.length=this.buf.length}writeTag(t,e){this.writeVarint(t<<3|e)}realloc(t){let e=this.length||16;for(;e<this.pos+t;)e*=2;if(e!==this.length){let r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.dataView=new DataView(r.buffer),this.length=e}}finish(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)}writeFixed32(t){this.realloc(4),this.dataView.setInt32(this.pos,t,!0),this.pos+=4}writeSFixed32(t){this.realloc(4),this.dataView.setInt32(this.pos,t,!0),this.pos+=4}writeFixed64(t){this.realloc(8),this.dataView.setInt32(this.pos,t&-1,!0),this.dataView.setInt32(this.pos+4,Math.floor(t*Ac),!0),this.pos+=8}writeSFixed64(t){this.realloc(8),this.dataView.setInt32(this.pos,t&-1,!0),this.dataView.setInt32(this.pos+4,Math.floor(t*Ac),!0),this.pos+=8}writeVarint(t){if(t=+t||0,t>=0&&t<128){this.pos>=this.length&&this.realloc(1),this.buf[this.pos++]=t;return}if(t>268435455||t<0){Uv(t,this);return}this.realloc(4),this.buf[this.pos++]=t&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=(t>>>=7)&127|(t>127?128:0),!(t<=127)&&(this.buf[this.pos++]=t>>>7&127)))}writeSVarint(t){this.writeVarint(t<0?-t*2-1:t*2)}writeBoolean(t){this.writeVarint(+t)}writeString(t){t=String(t),this.realloc(t.length*4),this.pos++;let e=this.pos;this.pos=eb(this.buf,t,this.pos);let r=this.pos-e;r>=128&&Ec(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r}writeFloat(t){this.realloc(4),this.dataView.setFloat32(this.pos,t,!0),this.pos+=4}writeDouble(t){this.realloc(8),this.dataView.setFloat64(this.pos,t,!0),this.pos+=8}writeBytes(t){let e=t.length;this.writeVarint(e),this.realloc(e),this.buf.set(t,this.pos),this.pos+=e}writeRawMessage(t,e){this.pos++;let r=this.pos;t(e,this);let i=this.pos-r;i>=128&&Ec(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i}writeMessage(t,e,r){this.writeTag(t,2),this.writeRawMessage(e,r)}writePackedVarint(t,e){e.length&&this.writeMessage(t,Gv,e)}writePackedSVarint(t,e){e.length&&this.writeMessage(t,Xv,e)}writePackedBoolean(t,e){e.length&&this.writeMessage(t,Zv,e)}writePackedFloat(t,e){e.length&&this.writeMessage(t,Yv,e)}writePackedDouble(t,e){e.length&&this.writeMessage(t,Wv,e)}writePackedFixed32(t,e){e.length&&this.writeMessage(t,Hv,e)}writePackedSFixed32(t,e){e.length&&this.writeMessage(t,Kv,e)}writePackedFixed64(t,e){e.length&&this.writeMessage(t,Jv,e)}writePackedSFixed64(t,e){e.length&&this.writeMessage(t,Qv,e)}writeBytesField(t,e){this.writeTag(t,2),this.writeBytes(e)}writeFixed32Field(t,e){this.writeTag(t,5),this.writeFixed32(e)}writeSFixed32Field(t,e){this.writeTag(t,5),this.writeSFixed32(e)}writeFixed64Field(t,e){this.writeTag(t,1),this.writeFixed64(e)}writeSFixed64Field(t,e){this.writeTag(t,1),this.writeSFixed64(e)}writeVarintField(t,e){this.writeTag(t,0),this.writeVarint(e)}writeSVarintField(t,e){this.writeTag(t,0),this.writeSVarint(e)}writeStringField(t,e){this.writeTag(t,2),this.writeString(e)}writeFloatField(t,e){this.writeTag(t,5),this.writeFloat(e)}writeDoubleField(t,e){this.writeTag(t,1),this.writeDouble(e)}writeBooleanField(t,e){this.writeVarintField(t,+e)}};function $v(t,e,r){let i=r.buf,n,a;if(a=i[r.pos++],n=(a&112)>>4,a<128||(a=i[r.pos++],n|=(a&127)<<3,a<128)||(a=i[r.pos++],n|=(a&127)<<10,a<128)||(a=i[r.pos++],n|=(a&127)<<17,a<128)||(a=i[r.pos++],n|=(a&127)<<24,a<128)||(a=i[r.pos++],n|=(a&1)<<31,a<128))return Nv(t,n,e);throw Error("Expected varint not more than 10 bytes")}function Nv(t,e,r){return r?e*4294967296+(t>>>0):(e>>>0)*4294967296+(t>>>0)}function Uv(t,e){let r,i;if(t>=0?(r=t%4294967296|0,i=t/4294967296|0):(r=~(-t%4294967296),i=~(-t/4294967296),r^4294967295?r=r+1|0:(r=0,i=i+1|0)),t>=18446744073709552e3||t<-18446744073709552e3)throw Error("Given varint doesn\'t fit into 10 bytes");e.realloc(10),qv(r,i,e),jv(i,e)}function qv(t,e,r){r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos++]=t&127|128,t>>>=7,r.buf[r.pos]=t&127}function jv(t,e){let r=(t&7)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127)))))}function Ec(t,e,r){let i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));r.realloc(i),r.buf.copyWithin(t+i,t,r.pos)}function Gv(t,e){let r=t.length,i=e.buf,n=e.pos,a=e.length;for(let s=0;s<r;s++){let o=t[s];if(o<0||n+10>a){e.pos=n,e.writeVarint(o),i=e.buf,n=e.pos,a=e.length;continue}for(;o>127;)i[n++]=o%128|128,o=Math.floor(o/128);i[n++]=o}e.pos=n}function Xv(t,e){for(let r=0;r<t.length;r++)e.writeSVarint(t[r])}function Yv(t,e){for(let r=0;r<t.length;r++)e.writeFloat(t[r])}function Wv(t,e){for(let r=0;r<t.length;r++)e.writeDouble(t[r])}function Zv(t,e){for(let r=0;r<t.length;r++)e.writeBoolean(t[r])}function Hv(t,e){for(let r=0;r<t.length;r++)e.writeFixed32(t[r])}function Kv(t,e){for(let r=0;r<t.length;r++)e.writeSFixed32(t[r])}function Jv(t,e){for(let r=0;r<t.length;r++)e.writeFixed64(t[r])}function Qv(t,e){for(let r=0;r<t.length;r++)e.writeSFixed64(t[r])}function tb(t,e,r){let i="",n=e;for(;n<r;){let a=t[n],s=null,o=a>239?4:a>223?3:a>191?2:1;if(n+o>r)break;let l,u,h;o===1?a<128&&(s=a):o===2?(l=t[n+1],(l&192)==128&&(s=(a&31)<<6|l&63,s<=127&&(s=null))):o===3?(l=t[n+1],u=t[n+2],(l&192)==128&&(u&192)==128&&(s=(a&15)<<12|(l&63)<<6|u&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):o===4&&(l=t[n+1],u=t[n+2],h=t[n+3],(l&192)==128&&(u&192)==128&&(h&192)==128&&(s=(a&15)<<18|(l&63)<<12|(u&63)<<6|h&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,o=1):s>65535&&(s-=65536,i+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),i+=String.fromCharCode(s),n+=o}return i}function eb(t,e,r){for(let i=0,n,a;i<e.length;i++){if(n=e.charCodeAt(i),n>55295&&n<57344)if(a){if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,a=n;continue}n=a-55296<<10|n-56320|65536,a=null}else{n>56319||i+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):a=n;continue}else a&&(a=(t[r++]=239,t[r++]=191,t[r++]=189,null));n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=n&63|128)}return r}function rb(t){return typeof(t==null?void 0:t.renderWithWebGL)=="function"}function su(t){let e=0,r=0;for(let s of t)e+=s.w*s.h,r=Math.max(r,s.w);t.sort((s,o)=>o.h-s.h);let i=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}],n=0,a=0;for(let s of t)for(let o=i.length-1;o>=0;o--){let l=i[o];if(!(s.w>l.w||s.h>l.h)){if(s.x=l.x,s.y=l.y,a=Math.max(a,s.y+s.h),n=Math.max(n,s.x+s.w),s.w===l.w&&s.h===l.h){let u=i.pop();u&&o<i.length&&(i[o]=u)}else s.h===l.h?(l.x+=s.w,l.w-=s.w):s.w===l.w?(l.y+=s.h,l.h-=s.h):(i.push({x:l.x+s.w,y:l.y,w:l.w-s.w,h:s.h}),l.y+=s.h,l.h-=s.h);break}}return{w:n,h:a,fill:e/(n*a)||0}}var $d=class{constructor(t,{pixelRatio:e,version:r,isWebGLImage:i=!1,stretchX:n,stretchY:a,content:s,textFitWidth:o,textFitHeight:l}){this.paddedRect=t,this.pixelRatio=e,this.stretchX=n,this.stretchY=a,this.content=s,this.version=r,this.needsFirstWebGLRender=i,this.textFitWidth=o,this.textFitHeight=l}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}},ou=class{constructor(t,e){let r={},i={};this.haveRenderCallbacks=[],this.patchedUpdateVersion=-1;let n=[];this.addImages(t,r,n),this.addImages(e,i,n);let{w:a,h:s}=su(n),o=new Zt({width:a||1,height:s||1});for(let l in t){let u=t[l];if(u.isWebGLImage)continue;let h=r[l].paddedRect;Zt.copy(u.data,o,{x:0,y:0},{x:h.x+1,y:h.y+1},u.data)}for(let l in e){let u=e[l],h=i[l].paddedRect,c=h.x+1,p=h.y+1,f=u.data.width,d=u.data.height;Zt.copy(u.data,o,{x:0,y:0},{x:c,y:p},u.data),Zt.copy(u.data,o,{x:0,y:d-1},{x:c,y:p-1},{width:f,height:1}),Zt.copy(u.data,o,{x:0,y:0},{x:c,y:p+d},{width:f,height:1}),Zt.copy(u.data,o,{x:f-1,y:0},{x:c-1,y:p},{width:1,height:d}),Zt.copy(u.data,o,{x:0,y:0},{x:c+f,y:p},{width:1,height:d})}this.image=o,this.iconPositions=r,this.patternPositions=i}addImages(t,e,r){for(let i in t){let n=t[i],a={x:0,y:0,w:n.data.width+2,h:n.data.height+2};r.push(a),e[i]=new $d(a,n),n.hasRenderCallback&&this.haveRenderCallbacks.push(i)}}patchUpdatedImages(t,e){if(t.dispatchRenderCallbacks(this.haveRenderCallbacks),this.patchedUpdateVersion!==t.updateVersion){this.patchedUpdateVersion=t.updateVersion;for(let r in this.iconPositions)this.patchUpdatedImage(this.iconPositions[r],t.getImage(r),e);for(let r in this.patternPositions)this.patchUpdatedImage(this.patternPositions[r],t.getImage(r),e)}}patchUpdatedImage(t,e,r){var l;if(!t||!e||!t.needsFirstWebGLRender&&t.version===e.version)return;t.needsFirstWebGLRender=!1,t.version=e.version;let[i,n]=t.tl,a=(l=e.userImage)==null?void 0:l.data;if(!rb(a)){r.update(e.data,void 0,{x:i,y:n});return}let{width:s,height:o}=e.data;r.context.setCustomLayerDefaults(),a.renderWithWebGL({gl:r.context.gl,texture:r.texture,x:i,y:n,width:s,height:o}),r.context.setDirty()}};C("ImagePosition",$d),C("ImageAtlas",ou);var Nd=(function(t){return t[t.none=0]="none",t[t.horizontal=1]="horizontal",t[t.vertical=2]="vertical",t[t.horizontalOnly=3]="horizontalOnly",t})(Nd||{});function ib(t){for(let e of t)if(e.positionedGlyphs.length!==0)return!1;return!0}function nb(t,e){let r=[],i=0;for(let n of e)r.push(t.substring(i,n)),i=n;return i<t.length()&&r.push(t.substring(i,t.length())),r}var Fc=new RegExp("^\\\\p{gc=M}$","u");function ab(t){let e=[],r=0;for(;r<t.length;){if(!Fc.test(t[r])){e.push(r),r++;continue}let i=r;for(;i<t.length&&Fc.test(t[i]);)i++;let n=t[i];if(n!==void 0&&Ld(n.codePointAt(0))){e.push(i);for(let a=i-1;a>=r;a--)e.push(a);r=i+1}else{for(let a=r;a<i;a++)e.push(a);r=i}}return e}function sb(t){let e=[],r=0;for(let i of t.graphemes())e.push(...Array(i.length).fill(t.sectionIndex[r])),r++;return e}function ob(t,e){let r=e.map(a=>t.toCodeUnitIndex(a)),i=wr.isParsed()?wr:null;if(t.sections.length===1)return i?i.processBidirectionalText(t.toString(),r).map(a=>kc(a,t.sections,[...a].map(()=>0))):Vv(t.toString(),r).map(a=>nl([...a],t.sections,[...a].map(()=>0)));let n=sb(t);return i?i.processStyledBidirectionalText(t.text,n,r).map(([a,s])=>kc(a,t.sections,s)):Ov(t.text,n,r).map(([a,s])=>{let o=[...a];return nl(o,t.sections,Ud(o).map(l=>{var u;return(u=s[l])!=null?u:0}))})}function nl(t,e,r){var a;let i=new iu(t.join(""),e,[]),n=0;for(let s of i.graphemes())i.sectionIndex.push((a=r[n])!=null?a:0),n+=[...s].length;return i}function Ud(t){let e=[],r=0;for(let i of t)e.push(r),r+=i.length;return e}function kc(t,e,r){let i=[...t],n=Ud(i),a=ab(i);return nl(a.map(s=>i[s]),e,a.map(s=>{var o;return(o=r[n[s]])!=null?o:0}))}function ra(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d){let y=iu.fromFeature(t,n);c===2&&y.verticalizePunctuation();let m=y.determineLineBreaks(u,a,e,i,f),g=Vd(y.text)?ob(y,m):nb(y,m),x=[],v={positionedLines:x,text:y.toString(),top:h[1],bottom:h[1],left:h[0],right:h[0],writingMode:c,iconsInText:!1,verticalizable:!1};return mb(v,e,r,i,g,s,o,l,c,u,p,d),!ib(x)&&v}function qd(t){let e=.5,r=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:e,verticalAlign:r}}function lb(t,e,r){let i=e.getMaxScale()*24,{maxImageWidth:n,maxImageHeight:a}=e.getMaxImageSize(t),s=Math.max(i,a*r);return{verticalLineContentWidth:Math.max(i,n*r),horizontalLineContentHeight:s}}function jd(t){switch(t){case"top":return 0;case"center":return .5;default:return 1}}function ub(t,e,r,i){var a;if(t!=null&&t.rect)return t;let n=(a=e[r.fontStack])==null?void 0:a[i];return n?{rect:null,metrics:n.metrics}:null}function hb(t,e,r){return!(t===1||!e&&!Qa(r)||e&&(ru(r)||zd(r)))}function da(t){return new RegExp("\\\\p{Nd}","u").test(String.fromCodePoint(t))}function Gd(t){return new RegExp("\\\\p{Lu}","u").test(String.fromCodePoint(t))}function cb(t){return/[\\p{P}\\p{S}]/u.test(String.fromCodePoint(t))}function pb(t){let e=t.some(da)&&t.every(i=>da(i)||cb(i)),r=t.length<=3&&t.every(i=>Gd(i)||da(i));return e||r}function fb(t){return(da(t)||Gd(t))&&!zd(t)}function db(t,e){let r=!1;for(let i=0;i<t.length;i++){if(e[i])continue;let n=Gr[t[i]];n&&(i===0||e[i-1])&&(i===t.length-1||e[i+1])&&(t[i]=n,e[i]=!0,r=!0)}return r}function yb(t){let e=t.graphemes().slice(),r=e.map(a=>a.codePointAt(0)),i=r.map(Qa),n=a=>!i[a]&&!ru(r[a])&&!("imageName"in t.getSection(a));for(let a=0;a<r.length;a++){if(!n(a))continue;let s=a;for(;s+1<r.length&&n(s+1);)s++;if(pb(r.slice(a,s+1)))for(let o=a;o<=s;o++)i[o]=fb(r[o]);a=s}return db(e,i)&&(t.text=e.join(""),t._graphemes=null),i}function mb(t,e,r,i,n,a,s,o,l,u,h,c){var D;let p=0,f=0,d=0,y=0,m=o==="right"?1:o==="left"?0:.5,g=24/c,x=0;for(let A of n){A.trim();let _=A.getMaxScale(),S={positionedGlyphs:[],lineOffset:0};t.positionedLines[x]=S;let k=S.positionedGlyphs,z=0;if(!A.length()){f+=a,++x;continue}let O=lb(i,A,g),P=l===2&&!h?yb(A):null,L=A.graphemes();for(let U=0;U<L.length;U++){let T=A.getSection(U),q=L[U],at=q.codePointAt(0),ot=P?P[U]:hb(l,h,at),pt="fontStack"in T&&Pd(q)&&!((D=e[T.fontStack])!=null&&D[q])?[...q]:[q];for(let Et of pt){let qt={glyph:Et.codePointAt(0),grapheme:Et,imageName:null,x:p,y:f+-17,vertical:ot,scale:1,fontStack:"",sectionIndex:A.getSectionIndex(U),metrics:null,rect:null},Ht;if("fontStack"in T){if(Ht=gb(T,Et,ot,O,e,r),!Ht)continue;qt.fontStack=T.fontStack}else{if(t.iconsInText=!0,T.scale*=g,Ht=xb(T,ot,_,O,i),!Ht)continue;z=Math.max(z,Ht.imageOffset),qt.imageName=T.imageName}let{rect:Ve,metrics:ye,baselineOffset:Kt}=Ht;if(qt.y+=Kt,qt.scale=T.scale,qt.metrics=ye,qt.rect=Ve,k.push(qt),!ot)p+=ye.advance*T.scale+u;else{t.verticalizable=!0;let Oe="imageName"in T?ye.advance:24;p+=Oe*T.scale+u}}}if(k.length!==0){let U=p-u;d=Math.max(U,d),vb(k,0,k.length-1,m)}p=0;let F=(_-1)*24;S.lineOffset=Math.max(z,F);let $=a*_+z;f+=$,y=Math.max($,y),++x}let{horizontalAlign:v,verticalAlign:b}=qd(s);bb(t.positionedLines,m,v,b,d,y,a,f,n.length),t.top+=-b*f,t.bottom=t.top+f,t.left+=-v*d,t.right=t.left+d}function gb(t,e,r,i,n,a){var u;let s=(u=a[t.fontStack])==null?void 0:u[e],o=ub(s,n,t,e);if(o===null)return null;let l;if(r)l=i.verticalLineContentWidth-t.scale*24;else{let h=jd(t.verticalAlign);l=(i.horizontalLineContentHeight-t.scale*24)*h}return{rect:o.rect,metrics:o.metrics,baselineOffset:l}}function xb(t,e,r,i,n){let a=n[t.imageName];if(!a)return null;let s=a.paddedRect,o=a.displaySize,l={width:o[0],height:o[1],left:1,top:-3,advance:e?o[1]:o[0]},u;if(e)u=i.verticalLineContentWidth-o[1]*t.scale;else{let c=jd(t.verticalAlign);u=(i.horizontalLineContentHeight-o[1]*t.scale)*c}let h=(e?o[0]:o[1])*t.scale-24*r;return{rect:s,metrics:l,baselineOffset:u,imageOffset:h}}function vb(t,e,r,i){if(i===0)return;let n=t[r],a=n.metrics.advance*n.scale,s=(t[r].x+a)*i;for(let o=e;o<=r;o++)t[o].x-=s}function bb(t,e,r,i,n,a,s,o,l){let u=(e-r)*n,h=0;h=a===s?-i*l*s+.5*s:-o*i- -17;for(let c of t)for(let p of c.positionedGlyphs)p.x+=u,p.y+=h}function wb(t,e,r){let{horizontalAlign:i,verticalAlign:n}=qd(r),a=e[0],s=e[1],o=a-t.displaySize[0]*i,l=o+t.displaySize[0],u=s-t.displaySize[1]*n;return{image:t,top:u,bottom:u+t.displaySize[1],left:o,right:l}}function Xd(t){var h,c;let e=t.left,r=t.top,i=t.right-e,n=t.bottom-r,a=t.image.content[2]-t.image.content[0],s=t.image.content[3]-t.image.content[1],o=(h=t.image.textFitWidth)!=null?h:"stretchOrShrink",l=(c=t.image.textFitHeight)!=null?c:"stretchOrShrink",u=a/s;if(l==="proportional"){if(o==="stretchOnly"&&i/n<u||o==="proportional"){let p=Math.ceil(n*u);e*=p/i,i=p}}else if(o==="proportional"&&l==="stretchOnly"&&u!==0&&i/n>u){let p=Math.ceil(i/u);r*=p/n,n=p}return{x1:e,y1:r,x2:e+i,y2:r+n}}function Tc(t,e,r,i,n,a){let s=t.image,o;if(s.content){let m=s.content,g=s.pixelRatio||1;o=[m[0]/g,m[1]/g,s.displaySize[0]-m[2]/g,s.displaySize[1]-m[3]/g]}let l=e.left*a,u=e.right*a,h,c,p,f;r==="width"||r==="both"?(f=n[0]+l-i[3],c=n[0]+u+i[1]):(f=n[0]+(l+u-s.displaySize[0])/2,c=f+s.displaySize[0]);let d=e.top*a,y=e.bottom*a;return r==="height"||r==="both"?(h=n[1]+d-i[0],p=n[1]+y+i[2]):(h=n[1]+(d+y-s.displaySize[1])/2,p=h+s.displaySize[1]),{image:s,top:h,right:c,bottom:p,left:f,collisionPadding:o}}var Ic=32640;function Cc(t,e){let{expression:r}=e;if(r.kind==="constant")return{kind:"constant",layoutSize:r.evaluate(new st(t+1))};if(r.kind==="source")return{kind:"source"};if(r.kind==="composite"){let{minZoom:i,maxZoom:n}=Db(r.zoomStops,t);return{kind:"composite",minZoom:i,maxZoom:n,interpolationType:r.interpolationType}}{let i=_b(r),n=r.evaluate(new st(t+1));return{kind:"camera",zoomStops:r.zoomStops,sizes:i,layoutSize:n,interpolationType:r.interpolationType}}}function Db(t,e){let r=0;for(;r<t.length&&t[r]<=e;)r++;r=Math.max(0,r-1);let i=r;for(;i<t.length&&t[i]<e+1;)i++;return i=Math.min(t.length-1,i),{minZoom:t[r],maxZoom:t[i]}}function _b(t){return t.zoomStops.map(e=>t.evaluate(new st(e===-1/0?t.zoomStops[1]-1:e)))}var Jr=class Yd extends B{constructor(e,r,i,n){super(e,r),this.angle=i,n!==void 0&&(this.segment=n)}clone(){return new Yd(this.x,this.y,this.angle,this.segment)}};C("Anchor",Jr);function Wd(t,e,r,i,n){if(e.segment===void 0||r===0)return!0;let a=e,s=e.segment+1,o=0;for(;o>-r/2;){if(s--,s<0)return!1;o-=t[s].dist(a),a=t[s]}o+=t[s].dist(t[s+1]),s++;let l=[],u=0;for(;o<r/2;){let h=t[s-1],c=t[s],p=t[s+1];if(!p)return!1;let f=h.angleTo(c)-c.angleTo(p);for(f=Math.abs((f+3*Math.PI)%(Math.PI*2)-Math.PI),l.push({distance:o,angleDelta:f}),u+=f;o-l[0].distance>i;)u-=l.shift().angleDelta;if(u>n)return!1;s++,o+=c.dist(p)}return!0}function Zd(t){let e=0;for(let r=0;r<t.length-1;r++)e+=t[r].dist(t[r+1]);return e}function Hd(t,e,r){return t?3/5*e*r:0}function Kd(t,e){return Math.max(t?t.right-t.left:0,e?e.right-e.left:0)}function Ab(t,e,r,i,n,a){let s=Hd(r,n,a),o=Kd(r,i)*a,l=0,u=Zd(t)/2;for(let h=0;h<t.length-1;h++){let c=t[h],p=t[h+1],f=c.dist(p);if(l+f>u){let d=(u-l)/f,y=new Jr(gr.number(c.x,p.x,d),gr.number(c.y,p.y,d),p.angleTo(c),h);return y._round(),!s||Wd(t,y,o,s,e)?y:void 0}l+=f}}function Sb(t,e,r,i,n,a,s,o,l){let u=Hd(i,a,s),h=Kd(i,n),c=h*s,p=t[0].x===0||t[0].x===l||t[0].y===0||t[0].y===l;e-c<e/4&&(e=c+e/4);let f=a*2;return Jd(t,p?e/2*o%e:(h/2+f)*s*o%e,e,u,r,c,p,!1,l)}function Jd(t,e,r,i,n,a,s,o,l){let u=a/2,h=Zd(t),c=0,p=e-r,f=[];for(let d=0;d<t.length-1;d++){let y=t[d],m=t[d+1],g=y.dist(m),x=m.angleTo(y);for(;p+r<c+g;){p+=r;let v=(p-c)/g,b=gr.number(y.x,m.x,v),D=gr.number(y.y,m.y,v);if(b>=0&&b<l&&D>=0&&D<l&&p-u>=0&&p+u<=h){let A=new Jr(b,D,x,d);A._round(),(!i||Wd(t,A,a,i,n))&&f.push(A)}}c+=g}return!o&&!f.length&&!s&&(f=Jd(t,c/2,r,i,n,a,s,!0,l)),f}function Eb(t,e,r,i,n){let a=[];for(let s of t){let o;for(let l=0;l<s.length-1;l++){let u=s[l],h=s[l+1];u.x<e&&h.x<e||(u.x<e?u=new B(e,u.y+(h.y-u.y)*((e-u.x)/(h.x-u.x)))._round():h.x<e&&(h=new B(e,u.y+(h.y-u.y)*((e-u.x)/(h.x-u.x)))._round()),!(u.y<r&&h.y<r)&&(u.y<r?u=new B(u.x+(h.x-u.x)*((r-u.y)/(h.y-u.y)),r)._round():h.y<r&&(h=new B(u.x+(h.x-u.x)*((r-u.y)/(h.y-u.y)),r)._round()),!(u.x>=i&&h.x>=i)&&(u.x>=i?u=new B(i,u.y+(h.y-u.y)*((i-u.x)/(h.x-u.x)))._round():h.x>=i&&(h=new B(i,u.y+(h.y-u.y)*((i-u.x)/(h.x-u.x)))._round()),!(u.y>=n&&h.y>=n)&&(u.y>=n?u=new B(u.x+(h.x-u.x)*((n-u.y)/(h.y-u.y)),n)._round():h.y>=n&&(h=new B(u.x+(h.x-u.x)*((n-u.y)/(h.y-u.y)),n)._round()),(!o||!u.equals(o[o.length-1]))&&(o=[u],a.push(o)),o.push(h)))))}}return a}function Qd(t,e,r,i,n,a){let s=Mc(t,e,r,n,0);return s=Mc(s,e,i,a,1),s}function Mc(t,e,r,i,n){switch(e){case 1:return Fb(t,r,i,n);case 2:return Bc(t,r,i,n,!1);case 3:return Bc(t,r,i,n,!0)}return[]}function Fb(t,e,r,i){let n=[];for(let a of t)for(let s of a){let o=i===0?s.x:s.y;o>=e&&o<=r&&n.push([s])}return n}function kb(t,e,r,i,n){let a=i===0?Tb:Ib,s=[],o=[];for(let h=0;h<t.length-1;h++){let c=t[h],p=t[h+1],f=i===0?c.x:c.y,d=i===0?p.x:p.y,y=!1;f<e?d>e&&s.push(a(c,p,e)):f>r?d<r&&s.push(a(c,p,r)):s.push(c),d<e&&f>=e&&(s.push(a(c,p,e)),y=!0),d>r&&f<=r&&(s.push(a(c,p,r)),y=!0),!n&&y&&(o.push(s),s=[])}let l=t.length-1,u=i===0?t[l].x:t[l].y;return u>=e&&u<=r&&s.push(t[l]),n&&s.length>0&&!s[0].equals(s[s.length-1])&&s.push(new B(s[0].x,s[0].y)),s.length>0&&o.push(s),o}function Bc(t,e,r,i,n){let a=[];for(let s of t){let o=kb(s,e,r,i,n);o.length>0&&a.push(...o)}return a}function Tb(t,e,r){let i=(r-t.x)/(e.x-t.x);return new B(r,t.y+(e.y-t.y)*i)}function Ib(t,e,r){let i=(r-t.y)/(e.y-t.y);return new B(t.x+(e.x-t.x)*i,r)}function Pc(t,e,r,i){let n=[],a=t.image,s=a.pixelRatio,o=a.paddedRect.w-2,l=a.paddedRect.h-2,u={x1:t.left,y1:t.top,x2:t.right,y2:t.bottom},h=a.stretchX||[[0,o]],c=a.stretchY||[[0,l]],p=(F,$)=>F+$[1]-$[0],f=h.reduce(p,0),d=c.reduce(p,0),y=o-f,m=l-d,g=0,x=f,v=0,b=d,D=0,A=y,_=0,S=m;if(a.content&&i){let F=a.content,$=F[2]-F[0],U=F[3]-F[1];(a.textFitWidth||a.textFitHeight)&&(u=Xd(t)),g=ia(h,0,F[0]),v=ia(c,0,F[1]),x=ia(h,F[0],F[2]),b=ia(c,F[1],F[3]),D=F[0]-g,_=F[1]-v,A=$-x,S=U-b}let k=u.x1,z=u.y1,O=u.x2-k,P=u.y2-z,L=(F,$,U,T)=>{let q=na(F.stretch-g,x,O,k),at=aa(F.fixed-D,A,F.stretch,f),ot=na($.stretch-v,b,P,z),pt=aa($.fixed-_,S,$.stretch,d),Et=na(U.stretch-g,x,O,k),qt=aa(U.fixed-D,A,U.stretch,f),Ht=na(T.stretch-v,b,P,z),Ve=aa(T.fixed-_,S,T.stretch,d),ye=new B(q,ot),Kt=new B(Et,ot),Oe=new B(Et,Ht),kr=new B(q,Ht),rr=new B(at/s,pt/s),fi=new B(qt/s,Ve/s),kt=e*Math.PI/180;if(kt){let R=Math.sin(kt),J=Math.cos(kt),W=[J,-R,R,J];ye._matMult(W),Kt._matMult(W),kr._matMult(W),Oe._matMult(W)}let Ee=F.stretch+F.fixed,ir=U.stretch+U.fixed,Tr=$.stretch+$.fixed,Ir=T.stretch+T.fixed;return{tl:ye,tr:Kt,bl:kr,br:Oe,tex:{x:a.paddedRect.x+1+Ee,y:a.paddedRect.y+1+Tr,w:ir-Ee,h:Ir-Tr},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:rr,pixelOffsetBR:fi,minFontScaleX:A/s/O,minFontScaleY:S/s/P,isSDF:r}};if(!i||!a.stretchX&&!a.stretchY)n.push(L({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:o+1},{fixed:0,stretch:l+1}));else{let F=zc(h,y,f),$=zc(c,m,d);for(let U=0;U<F.length-1;U++){let T=F[U],q=F[U+1];for(let at=0;at<$.length-1;at++){let ot=$[at],pt=$[at+1];n.push(L(T,ot,q,pt))}}}return n}function ia(t,e,r){let i=0;for(let n of t)i+=Math.max(e,Math.min(r,n[1]))-Math.max(e,Math.min(r,n[0]));return i}function zc(t,e,r){let i=[{fixed:-1,stretch:0}];for(let[n,a]of t){let s=i[i.length-1];i.push({fixed:n-s.stretch,stretch:s.stretch}),i.push({fixed:n-s.stretch,stretch:s.stretch+(a-n)})}return i.push({fixed:e+1,stretch:r}),i}function na(t,e,r,i){return t/e*r+i}function aa(t,e,r,i){return t-e*r/i}function Cb(t,e,r,i,n,a,s,o){let l=i.layout.get("text-rotate").evaluate(a,{})*Math.PI/180,u=[];for(let h of e.positionedLines)for(let c of h.positionedGlyphs){if(!c.rect)continue;let p=c.rect||{},f=4,d=!0,y=1,m=0,g=(n||o)&&c.vertical,x=c.metrics.advance*c.scale/2;if(o&&e.verticalizable){let T=(c.scale-1)*24,q=(24-c.metrics.width*c.scale)/2;m=h.lineOffset/2-(c.imageName?-q:T)}if(c.imageName){let T=s[c.imageName];d=T.sdf,y=T.pixelRatio,f=1/y}let v=n?[c.x+x,c.y]:[0,0],b=n?[0,0]:[c.x+x+r[0],c.y+r[1]-m],D=[0,0];g&&(D=b,b=[0,0]);let A=c.metrics.isDoubleResolution?2:1,_=(c.metrics.left-f)*c.scale-x+b[0],S=(-c.metrics.top-f)*c.scale+b[1],k=_+p.w/A*c.scale/y,z=S+p.h/A*c.scale/y,O=new B(_,S),P=new B(k,S),L=new B(_,z),F=new B(k,z);if(g){let T=new B(-x,x- -17),q=-Math.PI/2,at=12-x,ot=c.imageName?at:0,pt=new B(22-at,-ot),Et=new B(...D);O._rotateAround(q,T)._add(pt)._add(Et),P._rotateAround(q,T)._add(pt)._add(Et),L._rotateAround(q,T)._add(pt)._add(Et),F._rotateAround(q,T)._add(pt)._add(Et)}if(l){let T=Math.sin(l),q=Math.cos(l),at=[q,-T,T,q];O._matMult(at),P._matMult(at),L._matMult(at),F._matMult(at)}let $=new B(0,0),U=new B(0,0);u.push({tl:O,tr:P,bl:L,br:F,tex:p,writingMode:e.writingMode,glyphOffset:v,sectionIndex:c.sectionIndex,isSDF:d,pixelOffsetTL:$,pixelOffsetBR:U,minFontScaleX:0,minFontScaleY:0})}return u}var sa=class{constructor(t,e,r,i,n,a,s,o,l,u){var h;if(this.boxStartIndex=t.length,l){let c=a.top,p=a.bottom,f=a.collisionPadding;f&&(c-=f[1],p+=f[3]);let d=p-c;d>0&&(d=Math.max(10,d),this.circleDiameter=d)}else{let c=(h=a.image)!=null&&h.content&&(a.image.textFitWidth||a.image.textFitHeight)?Xd(a):{x1:a.left,y1:a.top,x2:a.right,y2:a.bottom};c.y1=c.y1*s-o[0],c.y2=c.y2*s+o[2],c.x1=c.x1*s-o[3],c.x2=c.x2*s+o[1];let p=a.collisionPadding;if(p&&(c.x1-=p[0]*s,c.y1-=p[1]*s,c.x2+=p[2]*s,c.y2+=p[3]*s),u){let f=new B(c.x1,c.y1),d=new B(c.x2,c.y1),y=new B(c.x1,c.y2),m=new B(c.x2,c.y2),g=u*Math.PI/180;f._rotate(g),d._rotate(g),y._rotate(g),m._rotate(g),c.x1=Math.min(f.x,d.x,y.x,m.x),c.x2=Math.max(f.x,d.x,y.x,m.x),c.y1=Math.min(f.y,d.y,y.y,m.y),c.y2=Math.max(f.y,d.y,y.y,m.y)}t.emplaceBack(e.x,e.y,c.x1,c.y1,c.x2,c.y2,r,i,n)}this.boxEndIndex=t.length}},Mb=class{constructor(t=[],e=(r,i)=>r<i?-1:+(r>i)){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;let t=this.data[0],e=this.data.pop();return--this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){let{data:e,compare:r}=this,i=e[t];for(;t>0;){let n=t-1>>1,a=e[n];if(r(i,a)>=0)break;e[t]=a,t=n}e[t]=i}_down(t){let{data:e,compare:r}=this,i=this.length>>1,n=e[t];for(;t<i;){let a=(t<<1)+1,s=a+1;if(s<this.length&&r(e[s],e[a])<0&&(a=s),r(e[a],n)>=0)break;e[t]=e[a],t=a}e[t]=n}};function Bb(t,e=1){let r=Fa.fromPoints(t[0]),i=Math.min(r.width(),r.height()),n=i/2,a=new Mb([],Pb),{minX:s,minY:o,maxX:l,maxY:u}=r;if(i===0)return new B(s,o);for(let p=s;p<l;p+=i)for(let f=o;f<u;f+=i)a.push(new qr(p+n,f+n,n,t));let h=Lb(t),c=h;for(;a.length;){let p=a.pop();(p.d>c.d||!c.d)&&(c=p),!(p.max-c.d<=e)&&(n=p.h/2,a.push(new qr(p.p.x-n,p.p.y-n,n,t)),a.push(new qr(p.p.x+n,p.p.y-n,n,t)),a.push(new qr(p.p.x-n,p.p.y+n,n,t)),a.push(new qr(p.p.x+n,p.p.y+n,n,t)))}return h.d>0&&c.d-h.d<=e?h.p:c.p}function Pb(t,e){return e.max-t.max}var qr=class{constructor(t,e,r,i){this.p=new B(t,e),this.h=r,this.d=zb(this.p,i),this.max=this.d+this.h*Math.SQRT2}};function zb(t,e){let r=!1,i=1/0;for(let n of e)for(let a=0,s=n.length,o=s-1;a<s;o=a++){let l=n[a],u=n[o];l.y>t.y!=u.y>t.y&&t.x<(u.x-l.x)*(t.y-l.y)/(u.y-l.y)+l.x&&(r=!r),i=Math.min(i,td(t,l,u))}return(r?1:-1)*Math.sqrt(i)}function Lb(t){let e=0,r=0,i=0,n=t[0];for(let a=0,s=n.length,o=s-1;a<s;o=a++){let l=n[a],u=n[o],h=l.x*u.y-u.x*l.y;r+=(l.x+u.x)*h,i+=(l.y+u.y)*h,e+=h*3}return new qr(r/e,i/e,0,t)}var Vb=(function(t){return t[t.center=1]="center",t[t.left=2]="left",t[t.right=3]="right",t[t.top=4]="top",t[t.bottom=5]="bottom",t[t["top-left"]=6]="top-left",t[t["top-right"]=7]="top-right",t[t["bottom-left"]=8]="bottom-left",t[t["bottom-right"]=9]="bottom-right",t})({}),lu=1/0;function ty(t,e){function r(n,a){let s=0,o=0;a<0&&(a=0);let l=a/Math.SQRT2;switch(n){case"top-right":case"top-left":o=l-7;break;case"bottom-right":case"bottom-left":o=-l+7;break;case"bottom":o=-a+7;break;case"top":o=a-7}switch(n){case"top-right":case"bottom-right":s=-l;break;case"top-left":case"bottom-left":s=l;break;case"left":s=a;break;case"right":s=-a}return[s,o]}function i(n,a,s){let o=0,l=0;switch(a=Math.abs(a),s=Math.abs(s),n){case"top-right":case"top-left":case"top":l=s-7;break;case"bottom-right":case"bottom-left":case"bottom":l=-s+7}switch(n){case"top-right":case"bottom-right":case"right":o=-a;break;case"top-left":case"bottom-left":case"left":o=a}return[o,l]}return e[1]===lu?r(t,e[0]):i(t,e[0],e[1])}function ey(t,e,r){var s;let i=t.layout,n=(s=i.get("text-variable-anchor-offset"))==null?void 0:s.evaluate(e,{},r);if(n){let o=n.values,l=[];for(let u=0;u<o.length;u+=2){let h=l[u]=o[u],c=o[u+1].map(p=>p*24);h.startsWith("top")?c[1]-=7:h.startsWith("bottom")&&(c[1]+=7),l[u+1]=c}return new De(l)}let a=i.get("text-variable-anchor");if(a){let o;o=t._unevaluatedLayout.getValue("text-radial-offset")===void 0?i.get("text-offset").evaluate(e,{},r).map(u=>u*24):[i.get("text-radial-offset").evaluate(e,{},r)*24,lu];let l=[];for(let u of a)l.push(u,ty(u,o));return new De(l)}return null}function Ob(t){var h,c;t.bucket.createArrays();let e=512*t.bucket.overscaling;t.bucket.tilePixelRatio=mt/e,t.bucket.compareText={},t.bucket.iconsNeedLinear=!1;let r=t.bucket.layers[0],i=r.layout,n=r._unevaluatedLayout._values,a={layoutIconSize:n["icon-size"].possiblyEvaluate(new st(t.bucket.zoom+1),t.canonical),layoutTextSize:n["text-size"].possiblyEvaluate(new st(t.bucket.zoom+1),t.canonical),textMaxSize:n["text-size"].possiblyEvaluate(new st(18))};if(t.bucket.textSizeData.kind==="composite"){let{minZoom:p,maxZoom:f}=t.bucket.textSizeData;a.compositeTextSizes=[n["text-size"].possiblyEvaluate(new st(p),t.canonical),n["text-size"].possiblyEvaluate(new st(f),t.canonical)]}if(t.bucket.iconSizeData.kind==="composite"){let{minZoom:p,maxZoom:f}=t.bucket.iconSizeData;a.compositeIconSizes=[n["icon-size"].possiblyEvaluate(new st(p),t.canonical),n["icon-size"].possiblyEvaluate(new st(f),t.canonical)]}let s=i.get("text-line-height")*24,o=i.get("text-rotation-alignment")!=="viewport"&&i.get("symbol-placement")!=="point",l=i.get("text-keep-upright"),u=i.get("text-size");for(let p of t.bucket.features){let f=i.get("text-font").evaluate(p,{},t.canonical).join(","),d=u.evaluate(p,{},t.canonical),y=a.layoutTextSize.evaluate(p,{},t.canonical),m=a.layoutIconSize.evaluate(p,{},t.canonical),g={horizontal:{},vertical:void 0},x=p.text,v=[0,0];if(x){let _=x.toString(),S=i.get("text-letter-spacing").evaluate(p,{},t.canonical)*24,k=bv(_)?S:0,z=i.get("text-anchor").evaluate(p,{},t.canonical),O=ey(r,p,t.canonical);if(!O){let $=i.get("text-radial-offset").evaluate(p,{},t.canonical);v=$?ty(z,[$*24,lu]):i.get("text-offset").evaluate(p,{},t.canonical).map(U=>U*24)}let P=o?"center":i.get("text-justify").evaluate(p,{},t.canonical),L=i.get("symbol-placement")==="point"?i.get("text-max-width").evaluate(p,{},t.canonical)*24:1/0,F=()=>{t.bucket.allowVerticalPlacement&&el(_)&&(g.vertical=ra(x,t.glyphMap,t.glyphPositions,t.imagePositions,f,L,s,z,"left",k,v,2,!0,y,d))};if(!o&&O){let $=new Set;if(P==="auto")for(let T=0;T<O.values.length;T+=2)$.add(Lc(O.values[T]));else $.add(P);let U=!1;for(let T of $)if(!g.horizontal[T])if(U)g.horizontal[T]=g.horizontal[0];else{let q=ra(x,t.glyphMap,t.glyphPositions,t.imagePositions,f,L,s,"center",T,k,v,1,!1,y,d);q&&(g.horizontal[T]=q,U=q.positionedLines.length===1)}F()}else{P==="auto"&&(P=Lc(z));let $=ra(x,t.glyphMap,t.glyphPositions,t.imagePositions,f,L,s,z,P,k,v,1,!1,y,d);$&&(g.horizontal[P]=$),F(),el(_)&&o&&l&&(g.vertical=ra(x,t.glyphMap,t.glyphPositions,t.imagePositions,f,L,s,z,P,k,v,2,!1,y,d))}}let b,D=!1;if((h=p.icon)!=null&&h.name){let _=t.imageMap[p.icon.name];_&&(b=wb(t.imagePositions[p.icon.name],i.get("icon-offset").evaluate(p,{},t.canonical),i.get("icon-anchor").evaluate(p,{},t.canonical)),D=!!_.sdf,t.bucket.sdfIcons===void 0?t.bucket.sdfIcons=D:t.bucket.sdfIcons!==D&&Bt("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),_.pixelRatio===t.bucket.pixelRatio?i.get("icon-rotate").constantOr(1)!==0&&(t.bucket.iconsNeedLinear=!0):t.bucket.iconsNeedLinear=!0)}let A=ry(g.horizontal)||g.vertical;(c=t.bucket).iconsInText||(c.iconsInText=A?A.iconsInText:!1),(A||b)&&Rb(t.bucket,p,g,b,t.imageMap,a,y,m,v,D,t.canonical,t.subdivisionGranularity)}t.showCollisionBoxes&&t.bucket.generateCollisionDebugBuffers()}function Lc(t){switch(t){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Rb(t,e,r,i,n,a,s,o,l,u,h,c){let p=a.textMaxSize.evaluate(e,{});p===void 0&&(p=s);let f=t.layers[0].layout,d=f.get("icon-offset").evaluate(e,{},h),y=ry(r.horizontal),m=s/24,g=t.tilePixelRatio*m,x=t.tilePixelRatio*p/24,v=t.tilePixelRatio*o,b=t.tilePixelRatio*f.get("symbol-spacing"),D=f.get("text-padding")*t.tilePixelRatio,A=Jb(f,e,h,t.tilePixelRatio),_=f.get("text-max-angle")/180*Math.PI,S=f.get("text-rotation-alignment")!=="viewport"&&f.get("symbol-placement")!=="point",k=f.get("icon-rotation-alignment").constantOr("viewport")==="map"&&f.get("symbol-placement")!=="point",z=f.get("symbol-placement"),O=b/2,P=f.get("icon-text-fit"),L;i&&P!=="none"&&(t.allowVerticalPlacement&&r.vertical&&(L=Tc(i,r.vertical,P,f.get("icon-text-fit-padding"),d,m)),y&&(i=Tc(i,y,P,f.get("icon-text-fit-padding"),d,m)));let F=h?c.line.getGranularityForZoomLevel(h.z):1,$=(U,T)=>{T.x<0||T.x>=8192||T.y<0||T.y>=8192||Nb(t,T,U,r,i,n,L,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,g,[D,D,D,D],S,l,v,A,k,d,e,a,u,h,s)};if(z==="line")for(let U of Eb(e.geometry,0,0,mt,mt)){let T=cr(U,F),q=Sb(T,b,_,r.vertical||y,i,24,x,t.overscaling,mt);for(let at of q){let ot=y;(!ot||!Ub(t,ot.text,O,at))&&$(T,at)}}else if(z==="line-center"){for(let U of e.geometry)if(U.length>1){let T=cr(U,F),q=Ab(T,_,r.vertical||y,i,24,x);q&&$(T,q)}}else if(e.type==="Polygon")for(let U of Ra(e.geometry,0)){let T=Bb(U,16);$(cr(U[0],F,!0),new Jr(T.x,T.y,0))}else if(e.type==="LineString")for(let U of e.geometry){let T=cr(U,F);$(T,new Jr(T[0].x,T[0].y,0))}else if(e.type==="Point")for(let U of e.geometry)for(let T of U)$([T],new Jr(T.x,T.y,0))}function $b(t,e){let r=t.length,i=e==null?void 0:e.values;if((i==null?void 0:i.length)>0)for(let n=0;n<i.length;n+=2){let a=Vb[i[n]],s=i[n+1];t.emplaceBack(a,s[0],s[1])}return[r,t.length]}function Vc(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y){let m=Cb(e,r,o,n,a,s,i,t.allowVerticalPlacement),g=t.textSizeData,x=null;g.kind==="source"?(x=[128*n.layout.get("text-size").evaluate(s,{})],x[0]>32640&&Bt(`${t.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):g.kind==="composite"&&(x=[128*d.compositeTextSizes[0].evaluate(s,{},y),128*d.compositeTextSizes[1].evaluate(s,{},y)],(x[0]>32640||x[1]>32640)&&Bt(`${t.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),t.addSymbols(t.text,m,x,o,a,s,h,e,u.lineStartIndex,u.lineLength,f,y,l);for(let v of c)p[v]=t.text.placedSymbolArray.length-1;return m.length*4}function ry(t){for(let e in t)return t[e];return null}function Nb(t,e,r,i,n,a,s,o,l,u,h,c,p,f,d,y,m,g,x,v,b,D,A,_,S){let k=t.addToLineVertexArray(e,r),z=o.layout.get("symbol-height-offset").evaluate(b,{},_);z>t.maxHeightOffset&&(t.maxHeightOffset=z);let O,P,L,F,$=0,U=0,T=0,q=0,at=-1,ot=-1,pt={},Et=(0,Mo.default)("");if(t.allowVerticalPlacement&&i.vertical){let J=o.layout.get("text-rotate").evaluate(b,{},_)+90,W=i.vertical;L=new sa(l,e,u,h,c,W,p,f,d,J),s&&(F=new sa(l,e,u,h,c,s,m,g,d,J))}if(n){let J=o.layout.get("icon-rotate").evaluate(b,{}),W=o.layout.get("icon-text-fit")!=="none",M=Pc(n,J,A,W),ut=s?Pc(s,J,A,W):void 0;P=new sa(l,e,u,h,c,n,m,g,!1,J),$=M.length*4;let X=t.iconSizeData,G=null;X.kind==="source"?(G=[128*o.layout.get("icon-size").evaluate(b,{})],G[0]>32640&&Bt(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):X.kind==="composite"&&(G=[128*D.compositeIconSizes[0].evaluate(b,{},_),128*D.compositeIconSizes[1].evaluate(b,{},_)],(G[0]>32640||G[1]>32640)&&Bt(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),t.addSymbols(t.icon,M,G,v,x,b,0,e,k.lineStartIndex,k.lineLength,-1,_,z),at=t.icon.placedSymbolArray.length-1,ut&&(U=ut.length*4,t.addSymbols(t.icon,ut,G,v,x,b,2,e,k.lineStartIndex,k.lineLength,-1,_,z),ot=t.icon.placedSymbolArray.length-1)}let qt=Object.keys(i.horizontal);for(let J of qt){let W=i.horizontal[J];O||(O=(Et=(0,Mo.default)(W.text),new sa(l,e,u,h,c,W,p,f,d,o.layout.get("text-rotate").evaluate(b,{},_))));let M=W.positionedLines.length===1;if(T+=Vc(t,e,W,a,o,d,b,y,z,k,i.vertical?1:3,M?qt:[J],pt,at,D,_),M)break}i.vertical&&(q+=Vc(t,e,i.vertical,a,o,d,b,y,z,k,2,["vertical"],pt,ot,D,_));let Ht=O?O.boxStartIndex:t.collisionBoxArray.length,Ve=O?O.boxEndIndex:t.collisionBoxArray.length,ye=L?L.boxStartIndex:t.collisionBoxArray.length,Kt=L?L.boxEndIndex:t.collisionBoxArray.length,Oe=P?P.boxStartIndex:t.collisionBoxArray.length,kr=P?P.boxEndIndex:t.collisionBoxArray.length,rr=F?F.boxStartIndex:t.collisionBoxArray.length,fi=F?F.boxEndIndex:t.collisionBoxArray.length,kt=-1,Ee=(J,W)=>J!=null&&J.circleDiameter?Math.max(J.circleDiameter,W):W;kt=Ee(O,kt),kt=Ee(L,kt),kt=Ee(P,kt),kt=Ee(F,kt);let ir=+(kt>-1);ir&&(kt*=S/24),t.glyphOffsetArray.length>=t.maxGlyphs&&Bt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),b.sortKey!==void 0&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey);let Tr=ey(o,b,_),[Ir,R]=$b(t.textAnchorOffsets,Tr);t.symbolInstances.emplaceBack(e.x,e.y,pt.right>=0?pt.right:-1,pt.center>=0?pt.center:-1,pt.left>=0?pt.left:-1,pt.vertical||-1,at,ot,Et,Ht,Ve,ye,Kt,Oe,kr,rr,fi,u,T,q,$,U,ir,0,p,kt,Ir,R,z)}function Ub(t,e,r,i){let n=t.compareText;if(!(e in n))n[e]=[];else{let a=n[e];for(let s=a.length-1;s>=0;s--)if(i.dist(a[s])<r)return!0}return n[e].push(i),!1}function Oc(t,e,r){let i="never",n=t.get(e);return n?i=n:t.get(r)&&(i="always"),i}var qb=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function oa(t,e,r,i,n,a,s,o,l,u,h,c,p,f){let d=o?Math.min(Ic,Math.round(o[0])):0,y=o?Math.min(Ic,Math.round(o[1])):0;t.emplaceBack(e,r,Math.round(i*32),Math.round(n*32),a,s,(d<<1)+ +!!l,y,u*16,h*16,c*256,p*256,f)}function jb(t,e,r){t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r)}function Gb(t){for(let e of t.sections)if(Vd(e.text))return!0;return!1}var al=class{constructor(t){this.layoutVertexArray=new eg,this.indexArray=new wn,this.programConfigurations=t,this.segments=new ee,this.dynamicLayoutVertexArray=new rg,this.opacityVertexArray=new ig,this.hasVisibleVertices=!1,this.placedSymbolArray=new Rf}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(t,e,r,i){this.isEmpty()||(r&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,X2.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,Y2.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,qb,!0),this.opacityVertexBuffer.itemSize=1),(r||i)&&this.programConfigurations.upload(t))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}};C("SymbolBuffers",al);var sl=class{constructor(t,e,r){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new r,this.segments=new ee,this.collisionVertexArray=new ng}upload(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,W2.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}};C("CollisionBuffers",sl);var iy=class{constructor(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(s=>s.id),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasDependencies=!0,this.hasRTLText=!1,this.maxHeightOffset=0,this.sortKeyRanges=[],this.collisionCircleArray=[],this.maxGlyphs=65535;let e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Cc(this.zoom,e["text-size"]),this.iconSizeData=Cc(this.zoom,e["icon-size"]);let r=this.layers[0].layout,i=r.get("symbol-sort-key"),n=r.get("symbol-z-order");this.canOverlap=Oc(r,"text-overlap","text-allow-overlap")!=="never"||Oc(r,"icon-overlap","icon-allow-overlap")!=="never"||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey=n!=="viewport-y"&&!i.isConstant();let a=n==="viewport-y"||n==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=a&&this.canOverlap,r.get("symbol-placement")==="point"&&(this.writingModes=r.get("text-writing-mode").map(s=>Nd[s])),this.stateDependentLayerIds=this.layers.filter(s=>s.isStateDependent()).map(s=>s.id),this.sourceID=t.sourceID}createArrays(){this.text=new al(new vr(this.layers,this.zoom,t=>t.startsWith("text"))),this.icon=new al(new vr(this.layers,this.zoom,t=>t.startsWith("icon"))),this.glyphOffsetArray=new Uf,this.lineVertexArray=new qf,this.symbolInstances=new Nf,this.textAnchorOffsets=new Gf}calculateGlyphDependencies(t,e,r,i,n){var l;let a=(i||this.allowVerticalPlacement)&&n,s=iu.fromFeature(t,r),o=s.graphemes();for(let u=0;u<o.length;u++){let h=s.getSection(u);if("imageName"in h)continue;let c=e[l=h.fontStack]||(e[l]={}),p=o[u];Pd(p)&&(c[p]=!0);for(let f of p){if(c[f]=!0,!a)continue;let d=Gr[f];d&&(c[d]=!0)}}}populate(t,e,r){var y;let i=this.layers[0],n=i.layout,a=n.get("text-font"),s=n.get("text-field"),o=n.get("icon-image"),l=(s.value.kind!=="constant"||s.value.value instanceof ze&&!s.value.value.isEmpty()||s.value.value.toString().length>0)&&(a.value.kind!=="constant"||a.value.value.length>0),u=o.value.kind!=="constant"||!!o.value.value||Object.keys(o.parameters).length>0,h=n.get("symbol-sort-key");if(this.features=[],!l&&!u)return;let c=e.iconDependencies,p=e.glyphDependencies,f=e.availableImages,d=new st(this.zoom);for(let{feature:m,id:g,index:x,sourceLayerIndex:v}of t){let b=i._featureFilter.needGeometry,D=hi(m,b);if(!i._featureFilter.filter(d,D,r))continue;b||(D.geometry=Ar(m));let A;if(l){let z=i.getValueAndResolveTokens("text-field",D,r,f),O=ze.factory(z);this.hasRTLText||(this.hasRTLText=Gb(O)),A=gv(O,i,D)}let _;if(u){let z=i.getValueAndResolveTokens("icon-image",D,r,f);_=z instanceof _e?z:_e.fromString(z)}if(!A&&!_)continue;let S=this.sortFeaturesByKey?h.evaluate(D,{},r):void 0,k={id:g,text:A,icon:_,index:x,sourceLayerIndex:v,geometry:D.geometry,properties:m.properties,type:Dn.types[m.type],sortKey:S};if(this.features.push(k),_&&(c[_.name]=!0),A){let z=a.evaluate(D,{},r).join(","),O=n.get("text-rotation-alignment")!=="viewport"&&n.get("symbol-placement")!=="point";this.allowVerticalPlacement=(y=this.writingModes)==null?void 0:y.includes(2);let P=el(A.toString());this.calculateGlyphDependencies(A,p,z,O,P);for(let L of A.sections)L.image&&(c[L.image.name]=!0)}}n.get("symbol-placement")==="line"&&(this.features=xv(this.features)),this.sortFeaturesByKey&&this.features.sort((m,g)=>m.sortKey-g.sortKey)}update(t,e,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,{imagePositions:r}),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,{imagePositions:r}))}addFeatures({options:t,canonical:e,glyphMap:r,glyphPositions:i,iconMap:n,iconPositions:a,showCollisionBoxes:s}){Ob({bucket:this,glyphMap:r,glyphPositions:i,imageMap:n,imagePositions:a,showCollisionBoxes:s,canonical:e,subdivisionGranularity:t.subdivisionGranularity})}isEmpty(){return this.symbolInstances.length===0}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,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(t,e){let r=this.lineVertexArray.length;if(t.segment!==void 0){let i=t.dist(e[t.segment+1]),n=t.dist(e[t.segment]),a={};for(let s=t.segment+1;s<e.length;s++)a[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s<e.length-1&&(i+=e[s+1].dist(e[s]));for(let s=t.segment||0;s>=0;s--)a[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:n},s>0&&(n+=e[s-1].dist(e[s]));for(let s=0;s<e.length;s++){let o=a[s];this.lineVertexArray.emplaceBack(o.x,o.y,o.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}}addSymbols(t,e,r,i,n,a,s,o,l,u,h,c,p){let f=t.indexArray,d=t.layoutVertexArray,y=t.segments.prepareSegment(4*e.length,d,f,this.canOverlap?a.sortKey:void 0),m=this.glyphOffsetArray.length,g=y.vertexLength,x=this.allowVerticalPlacement&&s===2?Math.PI/2:0,v=a.text&&a.text.sections;for(let b=0;b<e.length;b++){let{tl:D,tr:A,bl:_,br:S,tex:k,pixelOffsetTL:z,pixelOffsetBR:O,minFontScaleX:P,minFontScaleY:L,glyphOffset:F,isSDF:$,sectionIndex:U}=e[b],T=y.vertexLength,q=F[1];oa(d,o.x,o.y,D.x,q+D.y,k.x,k.y,r,$,z.x,z.y,P,L,p),oa(d,o.x,o.y,A.x,q+A.y,k.x+k.w,k.y,r,$,O.x,z.y,P,L,p),oa(d,o.x,o.y,_.x,q+_.y,k.x,k.y+k.h,r,$,z.x,O.y,P,L,p),oa(d,o.x,o.y,S.x,q+S.y,k.x+k.w,k.y+k.h,r,$,O.x,O.y,P,L,p),jb(t.dynamicLayoutVertexArray,o,x),f.emplaceBack(T,T+2,T+1),f.emplaceBack(T+1,T+2,T+3),y.vertexLength+=4,y.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(F[0]),(b===e.length-1||U!==e[b+1].sectionIndex)&&t.programConfigurations.populatePaintArrays(d.length,a,a.index,{imagePositions:{},canonical:c,formattedSection:v==null?void 0:v[U]})}t.placedSymbolArray.emplaceBack(o.x,o.y,m,this.glyphOffsetArray.length-m,g,l,u,o.segment,r?r[0]:0,r?r[1]:0,i[0],i[1],s,0,!1,0,h,p)}_addCollisionDebugVertex(t,e,r,i,n,a){return e.emplaceBack(0,0),t.emplaceBack(r.x,r.y,i,n,Math.round(a.x),Math.round(a.y))}addCollisionDebugVertices(t,e,r,i,n,a,s){let o=n.segments.prepareSegment(4,n.layoutVertexArray,n.indexArray),l=o.vertexLength,u=n.layoutVertexArray,h=n.collisionVertexArray,c=s.anchorX,p=s.anchorY;this._addCollisionDebugVertex(u,h,a,c,p,new B(t,e)),this._addCollisionDebugVertex(u,h,a,c,p,new B(r,e)),this._addCollisionDebugVertex(u,h,a,c,p,new B(r,i)),this._addCollisionDebugVertex(u,h,a,c,p,new B(t,i)),o.vertexLength+=4;let f=n.indexArray;f.emplaceBack(l,l+1),f.emplaceBack(l+1,l+2),f.emplaceBack(l+2,l+3),f.emplaceBack(l+3,l),o.primitiveLength+=4}addDebugCollisionBoxes(t,e,r,i){for(let n=t;n<e;n++){let a=this.collisionBoxArray.get(n),s=a.x1,o=a.y1,l=a.x2,u=a.y2;this.addCollisionDebugVertices(s,o,l,u,i?this.textCollisionBox:this.iconCollisionBox,a.anchorPoint,r)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new sl(Gh,mc.members,Io),this.iconCollisionBox=new sl(Gh,mc.members,Io);for(let t=0;t<this.symbolInstances.length;t++){let e=this.symbolInstances.get(t);this.addDebugCollisionBoxes(e.textBoxStartIndex,e.textBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.verticalTextBoxStartIndex,e.verticalTextBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.iconBoxStartIndex,e.iconBoxEndIndex,e,!1),this.addDebugCollisionBoxes(e.verticalIconBoxStartIndex,e.verticalIconBoxEndIndex,e,!1)}}_deserializeCollisionBoxesForSymbol(t,e,r,i,n,a,s,o,l){let u={};for(let h=e;h<r;h++){let c=t.get(h);u.textBox={x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,anchorPointX:c.anchorPointX,anchorPointY:c.anchorPointY},u.textFeatureIndex=c.featureIndex;break}for(let h=i;h<n;h++){let c=t.get(h);u.verticalTextBox={x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,anchorPointX:c.anchorPointX,anchorPointY:c.anchorPointY},u.verticalTextFeatureIndex=c.featureIndex;break}for(let h=a;h<s;h++){let c=t.get(h);u.iconBox={x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,anchorPointX:c.anchorPointX,anchorPointY:c.anchorPointY},u.iconFeatureIndex=c.featureIndex;break}for(let h=o;h<l;h++){let c=t.get(h);u.verticalIconBox={x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,anchorPointX:c.anchorPointX,anchorPointY:c.anchorPointY},u.verticalIconFeatureIndex=c.featureIndex;break}return u}deserializeCollisionBoxes(t){this.collisionArrays=[];for(let e=0;e<this.symbolInstances.length;e++){let r=this.symbolInstances.get(e);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,r.textBoxStartIndex,r.textBoxEndIndex,r.verticalTextBoxStartIndex,r.verticalTextBoxEndIndex,r.iconBoxStartIndex,r.iconBoxEndIndex,r.verticalIconBoxStartIndex,r.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(t,e){let r=t.placedSymbolArray.get(e),i=r.vertexStartIndex+r.numGlyphs*4;for(let n=r.vertexStartIndex;n<i;n+=4)t.indexArray.emplaceBack(n,n+2,n+1),t.indexArray.emplaceBack(n+1,n+2,n+3)}getSortedSymbolIndexes(t){if(this.sortedAngle===t&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;let e=Math.sin(t),r=Math.cos(t),i=[],n=[],a=[];for(let s=0;s<this.symbolInstances.length;++s){a.push(s);let o=this.symbolInstances.get(s);i.push(Math.round(e*o.anchorX+r*o.anchorY)|0),n.push(o.featureIndex)}return a.sort((s,o)=>i[s]-i[o]||n[o]-n[s]),a}addToSortKeyRanges(t,e){let r=this.sortKeyRanges[this.sortKeyRanges.length-1];(r==null?void 0:r.sortKey)===e?r.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:e,symbolInstanceStart:t,symbolInstanceEnd:t+1})}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let e of this.symbolInstanceIndexes){let r=this.symbolInstances.get(e);this.featureSortOrder.push(r.featureIndex);let i=[r.rightJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.leftJustifiedTextSymbolIndex];for(let n=0;n<i.length;n++){let a=i[n];a>=0&&i.indexOf(a)===n&&this.addIndicesForPlacedSymbol(this.text,a)}r.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,r.verticalPlacedTextSymbolIndex),r.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,r.placedIconSymbolIndex),r.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,r.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}};C("SymbolBucket",iy,{omit:["layers","collisionBoxArray","features","compareText"]});function Xb(t,e){return e.replace(/{([^{}]+)}/g,(r,i)=>t&&i in t?String(t[i]):"")}var Yb,Wb=()=>Yb||(Yb=new Xt({"symbol-placement":new V(w.layout_symbol["symbol-placement"],"symbol-placement"),"symbol-spacing":new V(w.layout_symbol["symbol-spacing"],"symbol-spacing"),"symbol-avoid-edges":new V(w.layout_symbol["symbol-avoid-edges"],"symbol-avoid-edges"),"symbol-sort-key":new N(w.layout_symbol["symbol-sort-key"],"symbol-sort-key"),"symbol-z-order":new V(w.layout_symbol["symbol-z-order"],"symbol-z-order"),"icon-allow-overlap":new V(w.layout_symbol["icon-allow-overlap"],"icon-allow-overlap"),"icon-overlap":new V(w.layout_symbol["icon-overlap"],"icon-overlap"),"icon-ignore-placement":new V(w.layout_symbol["icon-ignore-placement"],"icon-ignore-placement"),"icon-optional":new V(w.layout_symbol["icon-optional"],"icon-optional"),"icon-rotation-alignment":new N(w.layout_symbol["icon-rotation-alignment"],"icon-rotation-alignment"),"icon-size":new N(w.layout_symbol["icon-size"],"icon-size"),"icon-text-fit":new V(w.layout_symbol["icon-text-fit"],"icon-text-fit"),"icon-text-fit-padding":new V(w.layout_symbol["icon-text-fit-padding"],"icon-text-fit-padding"),"icon-image":new N(w.layout_symbol["icon-image"],"icon-image"),"icon-rotate":new N(w.layout_symbol["icon-rotate"],"icon-rotate"),"icon-padding":new N(w.layout_symbol["icon-padding"],"icon-padding"),"icon-keep-upright":new V(w.layout_symbol["icon-keep-upright"],"icon-keep-upright"),"icon-offset":new N(w.layout_symbol["icon-offset"],"icon-offset"),"icon-anchor":new N(w.layout_symbol["icon-anchor"],"icon-anchor"),"icon-pitch-alignment":new V(w.layout_symbol["icon-pitch-alignment"],"icon-pitch-alignment"),"text-pitch-alignment":new V(w.layout_symbol["text-pitch-alignment"],"text-pitch-alignment"),"text-rotation-alignment":new V(w.layout_symbol["text-rotation-alignment"],"text-rotation-alignment"),"text-field":new N(w.layout_symbol["text-field"],"text-field"),"text-font":new N(w.layout_symbol["text-font"],"text-font"),"text-size":new N(w.layout_symbol["text-size"],"text-size"),"text-max-width":new N(w.layout_symbol["text-max-width"],"text-max-width"),"text-line-height":new V(w.layout_symbol["text-line-height"],"text-line-height"),"text-letter-spacing":new N(w.layout_symbol["text-letter-spacing"],"text-letter-spacing"),"text-justify":new N(w.layout_symbol["text-justify"],"text-justify"),"text-radial-offset":new N(w.layout_symbol["text-radial-offset"],"text-radial-offset"),"text-variable-anchor":new V(w.layout_symbol["text-variable-anchor"],"text-variable-anchor"),"text-variable-anchor-offset":new N(w.layout_symbol["text-variable-anchor-offset"],"text-variable-anchor-offset"),"text-anchor":new N(w.layout_symbol["text-anchor"],"text-anchor"),"text-max-angle":new V(w.layout_symbol["text-max-angle"],"text-max-angle"),"text-writing-mode":new V(w.layout_symbol["text-writing-mode"],"text-writing-mode"),"text-rotate":new N(w.layout_symbol["text-rotate"],"text-rotate"),"text-padding":new V(w.layout_symbol["text-padding"],"text-padding"),"text-keep-upright":new V(w.layout_symbol["text-keep-upright"],"text-keep-upright"),"text-transform":new N(w.layout_symbol["text-transform"],"text-transform"),"text-offset":new N(w.layout_symbol["text-offset"],"text-offset"),"text-allow-overlap":new V(w.layout_symbol["text-allow-overlap"],"text-allow-overlap"),"text-overlap":new V(w.layout_symbol["text-overlap"],"text-overlap"),"text-ignore-placement":new V(w.layout_symbol["text-ignore-placement"],"text-ignore-placement"),"text-optional":new V(w.layout_symbol["text-optional"],"text-optional"),"symbol-height-offset":new N(w.layout_symbol["symbol-height-offset"],"symbol-height-offset"),"symbol-height-anchor":new V(w.layout_symbol["symbol-height-anchor"],"symbol-height-anchor")})),Zb,Hb=()=>Zb||(Zb=new Xt({"icon-opacity":new N(w.paint_symbol["icon-opacity"],"icon-opacity"),"icon-color":new N(w.paint_symbol["icon-color"],"icon-color"),"icon-halo-color":new N(w.paint_symbol["icon-halo-color"],"icon-halo-color"),"icon-halo-width":new N(w.paint_symbol["icon-halo-width"],"icon-halo-width"),"icon-halo-blur":new N(w.paint_symbol["icon-halo-blur"],"icon-halo-blur"),"icon-translate":new V(w.paint_symbol["icon-translate"],"icon-translate"),"icon-translate-anchor":new V(w.paint_symbol["icon-translate-anchor"],"icon-translate-anchor"),"text-opacity":new N(w.paint_symbol["text-opacity"],"text-opacity"),"text-color":new N(w.paint_symbol["text-color"],"text-color",{runtimeType:ce,getOverride:t=>t.textColor,hasOverride:t=>!!t.textColor}),"text-halo-color":new N(w.paint_symbol["text-halo-color"],"text-halo-color"),"text-halo-width":new N(w.paint_symbol["text-halo-width"],"text-halo-width"),"text-halo-blur":new N(w.paint_symbol["text-halo-blur"],"text-halo-blur"),"text-translate":new V(w.paint_symbol["text-translate"],"text-translate"),"text-translate-anchor":new V(w.paint_symbol["text-translate-anchor"],"text-translate-anchor")})),Ys={get paint(){return Hb()},get layout(){return Wb()}},ny=class{constructor(t){if(t.property.overrides===void 0)throw Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=t.property.overrides?t.property.overrides.runtimeType:dn,this.defaultValue=t}evaluate(t){if(t.formattedSection){let e=this.defaultValue.property.overrides;if(e!=null&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){if(!this.defaultValue.isConstant()){let e=this.defaultValue.value;t(e._styleExpression.expression)}}outputDefined(){return!1}serialize(){return null}};C("FormatSectionOverride",ny,{omit:["defaultValue"]});var Kb=class ol extends de{constructor(e,r){super(e,Ys,r)}recalculate(e,r){super.recalculate(e,r);let i=this.layout.get("icon-rotation-alignment");if((i.value.kind!=="constant"||i.value.value==="auto")&&(this.layout._values["icon-rotation-alignment"]=new se(i.property,{kind:"constant",value:this.layout.get("symbol-placement")==="point"?"viewport":"map"},i.parameters)),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")==="point"?this.layout._values["text-rotation-alignment"]="viewport":this.layout._values["text-rotation-alignment"]="map"),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").constantOr("viewport")),this.layout.get("symbol-placement")==="point"){let n=this.layout.get("text-writing-mode");if(n){let a=[];for(let s of n)a.includes(s)||a.push(s);this.layout._values["text-writing-mode"]=a}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,r,i,n){let a=this.layout.get(e).evaluate(r,{},i,n),s=this._unevaluatedLayout._values[e];return!s.isDataDriven()&&!ja(s.value)&&a?Xb(r.properties,a):a}createBucket(e){return new iy(e)}queryRadius(){return 0}queryIntersectsFeature(){throw Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let e of Ys.paint.overridableProperties){if(!ol.hasPaintOverride(this.layout,e))continue;let r=this.paint.get(e),i=new Il(new ny(r),`layers[${this.id}].paint.${r.property.name}`,r.property.specification),n=null;n=r.value.kind==="constant"||r.value.kind==="source"?new an("source",i):new wa("composite",i,r.value.zoomStops),this.paint._values[e]=new se(r.property,n,r.parameters)}}_handleOverridablePaintPropertyUpdate(e,r,i){return!this.layout||r.isDataDriven()||i.isDataDriven()?!1:ol.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,r){let i=e.get("text-field"),n=Ys.paint.properties[r],a=!1,s=o=>{var l;for(let u of o)if((l=n.overrides)!=null&&l.hasOverride(u)){a=!0;return}};if(i.value.kind==="constant"&&i.value.value instanceof ze)s(i.value.value.sections);else if(i.value.kind==="source"||i.value.kind==="composite"){let o=u=>{if(!a)if(u instanceof ri&&_t(u.value)===yn){let h=u.value;s(h.sections)}else u instanceof Ep?s(u.sections):u.eachChild(o)},l=i.value;l._styleExpression&&o(l._styleExpression.expression)}return a}};function Jb(t,e,r,i=1){var a;let n=(a=t.get("icon-padding").evaluate(e,{},r))==null?void 0:a.values;return[n[0]*i,n[1]*i,n[2]*i,n[3]*i]}var Qb,tw=()=>Qb||(Qb=new Xt({"background-color":new V(w.paint_background["background-color"],"background-color"),"background-pattern":new Lf(w.paint_background["background-pattern"],"background-pattern"),"background-opacity":new V(w.paint_background["background-opacity"],"background-opacity")})),ew={get paint(){return tw()}};var rw=class extends de{constructor(t,e){super(t,ew,e)}};var iw=class extends de{constructor(t,e){super(t,{},e),this.onAdd=r=>{this.implementation.onAdd&&this.implementation.onAdd(r,r.painter.context.gl)},this.onRemove=r=>{this.implementation.onRemove&&this.implementation.onRemove(r,r.painter.context.gl)},this.implementation=t}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw Error("Custom layers cannot be serialized")}};function ay(t,e){if(t.type==="custom")return new iw(t,e);switch(t.type){case"background":return new rw(t,e);case"circle":return new Bg(t,e);case"color-relief":return new Yg(t,e);case"fill":return new Ex(t,e);case"fill-extrusion":return new Hx(t,e);case"heatmap":return new Rg(t,e);case"hillshade":return new qg(t,e);case"line":return new G2(t,e);case"raster":return new Xm(t,e);case"symbol":return new Kb(t,e)}}var nw=class{constructor(t){this._methodToThrottle=t,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var t;this._triggered||(this._triggered=!0,(t=this._channel)==null||t.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}},aw={once:!0},sy=class{constructor(t,e){this.target=t,this.mapId=e,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new nw(()=>this.process()),this.subscription=hh(this.target,"message",r=>this.receive(r),!1),this.globalScope=mr(self)?t:window}registerMessageHandler(t,e){this.messageHandlers[t]=e}unregisterMessageHandler(t){delete this.messageHandlers[t]}sendAsync(t,e){return new Promise((r,i)=>{let n=Math.round(Math.random()*1e18).toString(36).substring(0,10),a=e?hh(e.signal,"abort",()=>{a==null||a.unsubscribe(),delete this.resolveRejects[n];let l={id:n,type:"<cancel>",origin:location.origin,targetMapId:t.targetMapId,sourceMapId:this.mapId};this.target.postMessage(l),i(new dl(e.signal.reason))},aw):null;this.resolveRejects[n]={resolve:l=>{a==null||a.unsubscribe(),r(l)},reject:l=>{a==null||a.unsubscribe(),i(l)}};let s=[],o=Si(je({},t),{id:n,sourceMapId:this.mapId,origin:location.origin,data:Yi(t.data,s)});this.target.postMessage(o,{transfer:s})})}receive(t){let e=t.data,r=e.id,i=["file://","resource://android","null"],n=[e.origin,location.origin],a=e.origin===location.origin,s=n.some(o=>i.includes(o));if((a||s)&&!(e.targetMapId&&this.mapId!==e.targetMapId)){if(e.type==="<cancel>"){delete this.tasks[r];let o=this.abortControllers[r];delete this.abortControllers[r],o&&o.abort();return}if(mr(self)||e.mustQueue){this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger();return}this.processTask(r,e)}}process(){if(this.taskQueue.length===0)return;let t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length>0&&this.invoker.trigger(),e&&this.processTask(t,e)}processTask(t,e){return rt(this,null,function*(){if(e.type==="<response>"){let n=this.resolveRejects[t];if(delete this.resolveRejects[t],!n)return;e.error?n.reject(Ki(Wi(e.error))):n.resolve(Wi(e.data));return}if(!this.messageHandlers[e.type]){this.completeTask(t,null,null);return}let r=Wi(e.data),i=new AbortController;this.abortControllers[t]=i;try{let n=yield this.messageHandlers[e.type](e.sourceMapId,r,i);this.completeTask(t,null,n)}catch(n){this.completeTask(t,Ki(n))}})}completeTask(t,e,r){let i=[];delete this.abortControllers[t];let n={id:t,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:e?Yi(e):null,data:Yi(r,i)};this.target.postMessage(n,{transfer:i})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}};function sw(t,e,r){return!(t<0||t>25||r<0||r>=2**t||e<0||e>=2**t)}var oy=class{constructor(t,e,r){if(!sw(t,e,r))throw Error(`x=${e}, y=${r}, z=${t} outside of bounds. 0<=x<${2**t}, 0<=y<${2**t} 0<=z<=25 `);this.z=t,this.x=e,this.y=r,this.key=Hi(0,t,t,e,r)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,e,r){let i=lw(this.x,this.y,this.z),n=uw(this.z,this.x,this.y);return t[(this.x+this.y)%t.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(r==="tms"?2**this.z-this.y-1:this.y)).replace(/{ratio}/g,e>1?"@2x":"").replace(/{quadkey}/g,n).replace(/{bbox-epsg-3857}/g,i)}isChildOf(t){let e=this.z-t.z;return e>0&&t.x===this.x>>e&&t.y===this.y>>e}getTilePoint(t){let e=2**this.z;return new B((t.x*e-this.x)*mt,(t.y*e-this.y)*mt)}toString(){return`${this.z}/${this.x}/${this.y}`}},ow=class{constructor(t,e){this.wrap=t,this.canonical=e,this.key=Hi(t,e.z,e.z,e.x,e.y)}},uu=class ne{constructor(e,r,i,n,a){if(this.terrainRttPosMatrix32f=null,e<i)throw Error(`overscaledZ should be >= z; overscaledZ = ${e}; z = ${i}`);this.overscaledZ=e,this.wrap=r,this.canonical=new oy(i,+n,+a),this.key=Hi(r,e,i,n,a)}clone(){return new ne(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(e){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let r=this.canonical.z-e;return e>this.canonical.z?new ne(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new ne(e,this.wrap,e,this.canonical.x>>r,this.canonical.y>>r)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(e,r){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let i=this.canonical.z-e;return e>this.canonical.z?Hi(this.wrap*+r,e,this.canonical.z,this.canonical.x,this.canonical.y):Hi(this.wrap*+r,e,e,this.canonical.x>>i,this.canonical.y>>i)}isChildOf(e){if(e.wrap!==this.wrap||this.overscaledZ-e.overscaledZ<=0)return!1;if(e.overscaledZ===0)return this.overscaledZ>0;let r=this.canonical.z-e.canonical.z;return r<0?!1:e.canonical.x===this.canonical.x>>r&&e.canonical.y===this.canonical.y>>r}children(e){if(this.overscaledZ>=e)return[new ne(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let r=this.canonical.z+1,i=this.canonical.x*2,n=this.canonical.y*2;return[new ne(r,this.wrap,r,i,n),new ne(r,this.wrap,r,i+1,n),new ne(r,this.wrap,r,i,n+1),new ne(r,this.wrap,r,i+1,n+1)]}isLessThan(e){return this.wrap<e.wrap?!0:this.wrap>e.wrap?!1:this.overscaledZ<e.overscaledZ?!0:this.overscaledZ>e.overscaledZ?!1:this.canonical.x<e.canonical.x?!0:this.canonical.x>e.canonical.x?!1:this.canonical.y<e.canonical.y}wrapped(){return new ne(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(e){return new ne(this.overscaledZ,e,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return 2**(this.overscaledZ-this.canonical.z)}toUnwrapped(){return new ow(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(e){return this.canonical.getTilePoint(new Yl(e.x-this.wrap,e.y))}normalizeCoordinates(e,r,i=mt){if(e>=0&&e<i&&r>=0&&r<i)return{tileID:this,x:e,y:r};let n=Math.floor(e/i),a=Math.floor(r/i),s=e-n*i,o=r-a*i,l=this.canonical.z,u=1<<l,h=this.canonical.y+a;if(h<0||h>=u)return null;let c=this.canonical.x+n,p=this.wrap;return c<0?(p-=Math.ceil(-c/u),c=(c%u+u)%u):c>=u&&(p+=Math.floor(c/u),c%=u),{tileID:new ne(this.overscaledZ,p,l,c,h),x:s,y:o}}};function Hi(t,e,r,i,n){t*=2,t<0&&(t=t*-1-1);let a=1<<r;return(a*a*t+a*n+i).toString(36)+r.toString(36)+e.toString(36)}var Ws=Math.PI*6378137;function lw(t,e,r){e=2**r-e-1;let i=Rc(t*256,e*256,r),n=Rc((t+1)*256,(e+1)*256,r);return`${i[0]},${i[1]},${n[0]},${n[1]}`}function Rc(t,e,r){let i=2*Ws/256/2**r;return[t*i-Ws,e*i-Ws]}function uw(t,e,r){let i="";for(let n=t;n>0;n--){let a=1<<n-1;i+=(e&a?1:0)+(r&a?2:0)}return i}C("CanonicalTileID",oy),C("OverscaledTileID",uu,{omit:["terrainRttPosMatrix32f"]});var hw=class{constructor(t,e){this.feature=t,this.type=t.type,this.properties=t.tags?t.tags:{},this.extent=e,"id"in t&&(typeof t.id=="string"?this.id=parseInt(t.id,10):typeof t.id=="number"&&!isNaN(t.id)&&(this.id=t.id))}loadGeometry(){let t=[],e=this.feature.type===1?[this.feature.geometry]:this.feature.geometry;for(let r of e){let i=[];for(let n of r)i.push(new B(n[0],n[1]));t.push(i)}return t}},ll="_geojsonTileLayer",ly=class{constructor(t,e){this.layers={[ll]:this},this.name=ll,this.version=e?e.version:1,this.extent=e?e.extent:4096,this.length=t.length,this.features=t}feature(t){return new hw(this.features[t],this.extent)}};function hu(t,e=""){let r=new Rv;return cw(t,r,e),r.finish()}function cw(t,e,r=""){for(let i in t.layers)e.writeMessage(3,(n,a)=>pw(n,a,r),t.layers[i])}function pw(t,e,r=""){e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);let i={jsonPrefix:r,keys:[],values:[],keycache:{},valuecache:{}};for(let s=0;s<t.length;s++)i.feature=t.feature(s),e.writeMessage(2,fw,i);let n=i.keys;for(let s of n)e.writeStringField(3,s);let a=i.values;for(let s of a)e.writeMessage(4,mw,s)}function fw(t,e){if(!t.feature)return;let r=t.feature;r.id!==void 0&&e.writeVarintField(1,r.id),e.writeMessage(2,dw,t),e.writeVarintField(3,r.type),e.writeMessage(4,yw,r)}function dw(t,e){var r;for(let i in(r=t.feature)==null?void 0:r.properties){let n=t.feature.properties[i],a=t.keycache[i];if(n==null)continue;a===void 0&&(t.keys.push(i),a=t.keys.length-1,t.keycache[i]=a),e.writeVarint(a),typeof n!="string"&&typeof n!="boolean"&&typeof n!="number"&&(n=t.jsonPrefix+JSON.stringify(n));let s=typeof n+":"+n,o=t.valuecache[s];o===void 0&&(t.values.push(n),o=t.values.length-1,t.valuecache[s]=o),e.writeVarint(o)}}function Zs(t,e){return(e<<3)+(t&7)}function $c(t){return t<<1^t>>31}function yw(t,e){let r=t.loadGeometry(),i=t.type,n=0,a=0;for(let s of r){let o=1;i===1&&(o=s.length),e.writeVarint(Zs(1,o));let l=i===3?s.length-1:s.length;for(let u=0;u<l;u++){u===1&&i!==1&&e.writeVarint(Zs(2,l-1));let h=s[u].x-n,c=s[u].y-a;e.writeVarint($c(h)),e.writeVarint($c(c)),n+=h,a+=c}t.type===3&&e.writeVarint(Zs(7,1))}}function mw(t,e){let r=typeof t;r==="string"?e.writeStringField(1,t):r==="boolean"?e.writeBooleanField(7,t):r==="number"&&(t%1==0?t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t):e.writeDoubleField(3,t))}var cu=class{constructor(t){this._stringToNumber={},this._numberToString=[];for(let e=0;e<t.length;e++){let r=t[e];this._stringToNumber[r]=e,this._numberToString[e]=r}}encode(t){return this._stringToNumber[t]}decode(t){if(t>=this._numberToString.length)throw Error(`Out of bounds. Index requested n=${t} can\'t be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[t]}},gw=class{constructor(t,e,r,i,n){this.type="Feature",this._vectorTileFeature=t,this._x=r,this._y=i,this._z=e;for(let a in t.properties)typeof t.properties[a]=="string"&&t.properties[a].startsWith("__$json__:")&&(t.properties[a]=JSON.parse(t.properties[a].slice(10)));this.properties=t.properties,this.id=n}projectPoint(t,e,r,i){return[(t.x+e)*360/i-180,360/Math.PI*Math.atan(Math.exp((1-(t.y+r)*2/i)*Math.PI))-90]}projectLine(t,e,r,i){return t.map(n=>this.projectPoint(n,e,r,i))}get geometry(){if(this._geometry)return this._geometry;let t=this._vectorTileFeature,e=t.extent*2**this._z,r=t.extent*this._x,i=t.extent*this._y,n=t.loadGeometry();switch(t.type){case 1:{let a=[];for(let o of n)a.push(o[0]);let s=this.projectLine(a,r,i,e);this._geometry=a.length===1?{type:"Point",coordinates:s[0]}:{type:"MultiPoint",coordinates:s};break}case 2:{let a=n.map(s=>this.projectLine(s,r,i,e));this._geometry=a.length===1?{type:"LineString",coordinates:a[0]}:{type:"MultiLineString",coordinates:a};break}case 3:{let a=dd(n),s=[];for(let o of a)s.push(o.map(l=>this.projectLine(l,r,i,e)));this._geometry=s.length===1?{type:"Polygon",coordinates:s[0]}:{type:"MultiPolygon",coordinates:s};break}default:throw Error(`unknown feature type: ${t.type}`)}return this._geometry}set geometry(t){this._geometry=t}toJSON(){let t={geometry:this.geometry};for(let e in this)e!=="_geometry"&&e!=="_vectorTileFeature"&&e!=="_x"&&e!=="_y"&&e!=="_z"&&(t[e]=this[e]);return t}},Sr=class{constructor(t,e,r){this._name=t,this.dataBuffer=e,typeof r=="number"?this._size=r:(this.nullabilityBuffer=r,this._size=r.size())}getValue(t){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(t)?null:this.getValueFromBuffer(t)}has(t){var e;return((e=this.nullabilityBuffer)==null?void 0:e.get(t))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}},ts=class extends Sr{},pu=class extends ts{getValueFromBuffer(t){return this.dataBuffer[t]}},fu=class extends ts{getValueFromBuffer(t){return this.dataBuffer[t]}},uy=class extends Sr{constructor(t,e,r,i){super(t,e,i),this.delta=r}},du=class extends uy{constructor(t,e,r,i,n){super(t,n?Int32Array.of(e):Uint32Array.of(e),r,i)}getValueFromBuffer(t){return this.dataBuffer[0]+t*this.delta}},yu=class extends Sr{constructor(t,e,r,i){super(t,i?Int32Array.of(e):Uint32Array.of(e),r)}getValueFromBuffer(t){return this.dataBuffer[0]}},xw=class{constructor(t,e,r,i,n=4096){if(this._name=t,this._geometryVector=e,this._idVector=r,this._propertyVectors=i,this._extent=n,t.length===0)throw Error("Missing layer name")}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){var t;return(t=this._propertyVectors)!=null?t:[]}getPropertyVector(t){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this.propertyVectors.map(e=>[e.name,e]))),this.propertyVectorsMap.get(t)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let t=[],e=this.geometryVector.getGeometries();for(let r=0;r<this.numFeatures;r++){let i;if(this.idVector){let s=this.idVector.getValue(r);s!==null&&(i=this.containsMaxSafeIntegerValues(this.idVector)?Number(s):s)}let n={coordinates:e[r],type:this.geometryVector.geometryType(r)},a={};for(let s of this.propertyVectors){if(!s)continue;let o=s.name,l=s.getValue(r);l!==null&&(a[o]=l)}t.push({id:i,geometry:n,properties:a})}return t}containsMaxSafeIntegerValues(t){return t instanceof pu||t instanceof yu||t instanceof du||t instanceof fu}},qi={FEATURE:0,VERTEX:1},it={BOOLEAN:0,INT_8:1,UINT_8:2,INT_32:3,UINT_32:4,INT_64:5,UINT_64:6,FLOAT:7,DOUBLE:8,STRING:9},Qe={GEOMETRY:0,STRUCT:1,MAP:2},hy={ID:0},cy=class{constructor(t){this.value=t}get(){return this.value}set(t){this.value=t}increment(){return this.value++}add(t){this.value+=t}},H;(function(t){t.NONE="NONE",t.DELTA="DELTA",t.COMPONENTWISE_DELTA="COMPONENTWISE_DELTA",t.RLE="RLE",t.MORTON="MORTON"})(H||(H={}));var le;(function(t){t.NONE="NONE",t.FAST_PFOR="FAST_PFOR",t.VARINT="VARINT"})(le||(le={}));var mu=new Uint32Array(33);mu[0]=0;for(let t=1;t<=32;t++)mu[t]=t===32?4294967295:4294967295>>>32-t;var ul=mu,py=65536;function gu(t,e){return t-t%e}function vw(t){return gu(t+31,32)}function bw(t){if(!Number.isFinite(t)||t<=0)return py;let e=gu(Math.floor(t),256);return e===0?256:e}function ww(t){let e=t>>>0;return((e&255)<<24|(e&65280)<<8|e>>>8&65280|e>>>24&255)>>>0}function Dw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0;r[n++]=a>>>0&3,r[n++]=a>>>2&3,r[n++]=a>>>4&3,r[n++]=a>>>6&3,r[n++]=a>>>8&3,r[n++]=a>>>10&3,r[n++]=a>>>12&3,r[n++]=a>>>14&3,r[n++]=a>>>16&3,r[n++]=a>>>18&3,r[n++]=a>>>20&3,r[n++]=a>>>22&3,r[n++]=a>>>24&3,r[n++]=a>>>26&3,r[n++]=a>>>28&3,r[n++]=a>>>30&3,r[n++]=s>>>0&3,r[n++]=s>>>2&3,r[n++]=s>>>4&3,r[n++]=s>>>6&3,r[n++]=s>>>8&3,r[n++]=s>>>10&3,r[n++]=s>>>12&3,r[n++]=s>>>14&3,r[n++]=s>>>16&3,r[n++]=s>>>18&3,r[n++]=s>>>20&3,r[n++]=s>>>22&3,r[n++]=s>>>24&3,r[n++]=s>>>26&3,r[n++]=s>>>28&3,r[n]=s>>>30&3}function _w(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0;r[n++]=a>>>0&7,r[n++]=a>>>3&7,r[n++]=a>>>6&7,r[n++]=a>>>9&7,r[n++]=a>>>12&7,r[n++]=a>>>15&7,r[n++]=a>>>18&7,r[n++]=a>>>21&7,r[n++]=a>>>24&7,r[n++]=a>>>27&7,r[n++]=(a>>>30|(s&1)<<2)&7,r[n++]=s>>>1&7,r[n++]=s>>>4&7,r[n++]=s>>>7&7,r[n++]=s>>>10&7,r[n++]=s>>>13&7,r[n++]=s>>>16&7,r[n++]=s>>>19&7,r[n++]=s>>>22&7,r[n++]=s>>>25&7,r[n++]=s>>>28&7,r[n++]=(s>>>31|(o&3)<<1)&7,r[n++]=o>>>2&7,r[n++]=o>>>5&7,r[n++]=o>>>8&7,r[n++]=o>>>11&7,r[n++]=o>>>14&7,r[n++]=o>>>17&7,r[n++]=o>>>20&7,r[n++]=o>>>23&7,r[n++]=o>>>26&7,r[n]=o>>>29&7}function Aw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0;r[n++]=a>>>0&15,r[n++]=a>>>4&15,r[n++]=a>>>8&15,r[n++]=a>>>12&15,r[n++]=a>>>16&15,r[n++]=a>>>20&15,r[n++]=a>>>24&15,r[n++]=a>>>28&15,r[n++]=s>>>0&15,r[n++]=s>>>4&15,r[n++]=s>>>8&15,r[n++]=s>>>12&15,r[n++]=s>>>16&15,r[n++]=s>>>20&15,r[n++]=s>>>24&15,r[n++]=s>>>28&15,r[n++]=o>>>0&15,r[n++]=o>>>4&15,r[n++]=o>>>8&15,r[n++]=o>>>12&15,r[n++]=o>>>16&15,r[n++]=o>>>20&15,r[n++]=o>>>24&15,r[n++]=o>>>28&15,r[n++]=l>>>0&15,r[n++]=l>>>4&15,r[n++]=l>>>8&15,r[n++]=l>>>12&15,r[n++]=l>>>16&15,r[n++]=l>>>20&15,r[n++]=l>>>24&15,r[n]=l>>>28&15}function Sw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0;r[n++]=a>>>0&31,r[n++]=a>>>5&31,r[n++]=a>>>10&31,r[n++]=a>>>15&31,r[n++]=a>>>20&31,r[n++]=a>>>25&31,r[n++]=(a>>>30|(s&7)<<2)&31,r[n++]=s>>>3&31,r[n++]=s>>>8&31,r[n++]=s>>>13&31,r[n++]=s>>>18&31,r[n++]=s>>>23&31,r[n++]=(s>>>28|(o&1)<<4)&31,r[n++]=o>>>1&31,r[n++]=o>>>6&31,r[n++]=o>>>11&31,r[n++]=o>>>16&31,r[n++]=o>>>21&31,r[n++]=o>>>26&31,r[n++]=(o>>>31|(l&15)<<1)&31,r[n++]=l>>>4&31,r[n++]=l>>>9&31,r[n++]=l>>>14&31,r[n++]=l>>>19&31,r[n++]=l>>>24&31,r[n++]=(l>>>29|(u&3)<<3)&31,r[n++]=u>>>2&31,r[n++]=u>>>7&31,r[n++]=u>>>12&31,r[n++]=u>>>17&31,r[n++]=u>>>22&31,r[n]=u>>>27&31}function Ew(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0;r[n++]=a>>>0&63,r[n++]=a>>>6&63,r[n++]=a>>>12&63,r[n++]=a>>>18&63,r[n++]=a>>>24&63,r[n++]=(a>>>30|(s&15)<<2)&63,r[n++]=s>>>4&63,r[n++]=s>>>10&63,r[n++]=s>>>16&63,r[n++]=s>>>22&63,r[n++]=(s>>>28|(o&3)<<4)&63,r[n++]=o>>>2&63,r[n++]=o>>>8&63,r[n++]=o>>>14&63,r[n++]=o>>>20&63,r[n++]=o>>>26&63,r[n++]=l>>>0&63,r[n++]=l>>>6&63,r[n++]=l>>>12&63,r[n++]=l>>>18&63,r[n++]=l>>>24&63,r[n++]=(l>>>30|(u&15)<<2)&63,r[n++]=u>>>4&63,r[n++]=u>>>10&63,r[n++]=u>>>16&63,r[n++]=u>>>22&63,r[n++]=(u>>>28|(h&3)<<4)&63,r[n++]=h>>>2&63,r[n++]=h>>>8&63,r[n++]=h>>>14&63,r[n++]=h>>>20&63,r[n]=h>>>26&63}function Fw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0;r[n++]=a>>>0&127,r[n++]=a>>>7&127,r[n++]=a>>>14&127,r[n++]=a>>>21&127,r[n++]=(a>>>28|(s&7)<<4)&127,r[n++]=s>>>3&127,r[n++]=s>>>10&127,r[n++]=s>>>17&127,r[n++]=s>>>24&127,r[n++]=(s>>>31|(o&63)<<1)&127,r[n++]=o>>>6&127,r[n++]=o>>>13&127,r[n++]=o>>>20&127,r[n++]=(o>>>27|(l&3)<<5)&127,r[n++]=l>>>2&127,r[n++]=l>>>9&127,r[n++]=l>>>16&127,r[n++]=l>>>23&127,r[n++]=(l>>>30|(u&31)<<2)&127,r[n++]=u>>>5&127,r[n++]=u>>>12&127,r[n++]=u>>>19&127,r[n++]=(u>>>26|(h&1)<<6)&127,r[n++]=h>>>1&127,r[n++]=h>>>8&127,r[n++]=h>>>15&127,r[n++]=h>>>22&127,r[n++]=(h>>>29|(c&15)<<3)&127,r[n++]=c>>>4&127,r[n++]=c>>>11&127,r[n++]=c>>>18&127,r[n]=c>>>25&127}function kw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0;r[n++]=a>>>0&255,r[n++]=a>>>8&255,r[n++]=a>>>16&255,r[n++]=a>>>24&255,r[n++]=s>>>0&255,r[n++]=s>>>8&255,r[n++]=s>>>16&255,r[n++]=s>>>24&255,r[n++]=o>>>0&255,r[n++]=o>>>8&255,r[n++]=o>>>16&255,r[n++]=o>>>24&255,r[n++]=l>>>0&255,r[n++]=l>>>8&255,r[n++]=l>>>16&255,r[n++]=l>>>24&255,r[n++]=u>>>0&255,r[n++]=u>>>8&255,r[n++]=u>>>16&255,r[n++]=u>>>24&255,r[n++]=h>>>0&255,r[n++]=h>>>8&255,r[n++]=h>>>16&255,r[n++]=h>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>24&255,r[n++]=p>>>0&255,r[n++]=p>>>8&255,r[n++]=p>>>16&255,r[n]=p>>>24&255}function Tw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0;r[n++]=a>>>0&511,r[n++]=a>>>9&511,r[n++]=a>>>18&511,r[n++]=(a>>>27|(s&15)<<5)&511,r[n++]=s>>>4&511,r[n++]=s>>>13&511,r[n++]=s>>>22&511,r[n++]=(s>>>31|(o&255)<<1)&511,r[n++]=o>>>8&511,r[n++]=o>>>17&511,r[n++]=(o>>>26|(l&7)<<6)&511,r[n++]=l>>>3&511,r[n++]=l>>>12&511,r[n++]=l>>>21&511,r[n++]=(l>>>30|(u&127)<<2)&511,r[n++]=u>>>7&511,r[n++]=u>>>16&511,r[n++]=(u>>>25|(h&3)<<7)&511,r[n++]=h>>>2&511,r[n++]=h>>>11&511,r[n++]=h>>>20&511,r[n++]=(h>>>29|(c&63)<<3)&511,r[n++]=c>>>6&511,r[n++]=c>>>15&511,r[n++]=(c>>>24|(p&1)<<8)&511,r[n++]=p>>>1&511,r[n++]=p>>>10&511,r[n++]=p>>>19&511,r[n++]=(p>>>28|(f&31)<<4)&511,r[n++]=f>>>5&511,r[n++]=f>>>14&511,r[n]=f>>>23&511}function Iw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0;r[n++]=a>>>0&1023,r[n++]=a>>>10&1023,r[n++]=a>>>20&1023,r[n++]=(a>>>30|(s&255)<<2)&1023,r[n++]=s>>>8&1023,r[n++]=s>>>18&1023,r[n++]=(s>>>28|(o&63)<<4)&1023,r[n++]=o>>>6&1023,r[n++]=o>>>16&1023,r[n++]=(o>>>26|(l&15)<<6)&1023,r[n++]=l>>>4&1023,r[n++]=l>>>14&1023,r[n++]=(l>>>24|(u&3)<<8)&1023,r[n++]=u>>>2&1023,r[n++]=u>>>12&1023,r[n++]=u>>>22&1023,r[n++]=h>>>0&1023,r[n++]=h>>>10&1023,r[n++]=h>>>20&1023,r[n++]=(h>>>30|(c&255)<<2)&1023,r[n++]=c>>>8&1023,r[n++]=c>>>18&1023,r[n++]=(c>>>28|(p&63)<<4)&1023,r[n++]=p>>>6&1023,r[n++]=p>>>16&1023,r[n++]=(p>>>26|(f&15)<<6)&1023,r[n++]=f>>>4&1023,r[n++]=f>>>14&1023,r[n++]=(f>>>24|(d&3)<<8)&1023,r[n++]=d>>>2&1023,r[n++]=d>>>12&1023,r[n]=d>>>22&1023}function Cw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0,y=t[e+10]>>>0;r[n++]=a>>>0&2047,r[n++]=a>>>11&2047,r[n++]=(a>>>22|(s&1)<<10)&2047,r[n++]=s>>>1&2047,r[n++]=s>>>12&2047,r[n++]=(s>>>23|(o&3)<<9)&2047,r[n++]=o>>>2&2047,r[n++]=o>>>13&2047,r[n++]=(o>>>24|(l&7)<<8)&2047,r[n++]=l>>>3&2047,r[n++]=l>>>14&2047,r[n++]=(l>>>25|(u&15)<<7)&2047,r[n++]=u>>>4&2047,r[n++]=u>>>15&2047,r[n++]=(u>>>26|(h&31)<<6)&2047,r[n++]=h>>>5&2047,r[n++]=h>>>16&2047,r[n++]=(h>>>27|(c&63)<<5)&2047,r[n++]=c>>>6&2047,r[n++]=c>>>17&2047,r[n++]=(c>>>28|(p&127)<<4)&2047,r[n++]=p>>>7&2047,r[n++]=p>>>18&2047,r[n++]=(p>>>29|(f&255)<<3)&2047,r[n++]=f>>>8&2047,r[n++]=f>>>19&2047,r[n++]=(f>>>30|(d&511)<<2)&2047,r[n++]=d>>>9&2047,r[n++]=d>>>20&2047,r[n++]=(d>>>31|(y&1023)<<1)&2047,r[n++]=y>>>10&2047,r[n]=y>>>21&2047}function Mw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0,y=t[e+10]>>>0,m=t[e+11]>>>0;r[n++]=a>>>0&4095,r[n++]=a>>>12&4095,r[n++]=(a>>>24|(s&15)<<8)&4095,r[n++]=s>>>4&4095,r[n++]=s>>>16&4095,r[n++]=(s>>>28|(o&255)<<4)&4095,r[n++]=o>>>8&4095,r[n++]=o>>>20&4095,r[n++]=l>>>0&4095,r[n++]=l>>>12&4095,r[n++]=(l>>>24|(u&15)<<8)&4095,r[n++]=u>>>4&4095,r[n++]=u>>>16&4095,r[n++]=(u>>>28|(h&255)<<4)&4095,r[n++]=h>>>8&4095,r[n++]=h>>>20&4095,r[n++]=c>>>0&4095,r[n++]=c>>>12&4095,r[n++]=(c>>>24|(p&15)<<8)&4095,r[n++]=p>>>4&4095,r[n++]=p>>>16&4095,r[n++]=(p>>>28|(f&255)<<4)&4095,r[n++]=f>>>8&4095,r[n++]=f>>>20&4095,r[n++]=d>>>0&4095,r[n++]=d>>>12&4095,r[n++]=(d>>>24|(y&15)<<8)&4095,r[n++]=y>>>4&4095,r[n++]=y>>>16&4095,r[n++]=(y>>>28|(m&255)<<4)&4095,r[n++]=m>>>8&4095,r[n]=m>>>20&4095}function Bw(t,e,r,i){let n=i,a=t[e]>>>0,s=t[e+1]>>>0,o=t[e+2]>>>0,l=t[e+3]>>>0,u=t[e+4]>>>0,h=t[e+5]>>>0,c=t[e+6]>>>0,p=t[e+7]>>>0,f=t[e+8]>>>0,d=t[e+9]>>>0,y=t[e+10]>>>0,m=t[e+11]>>>0,g=t[e+12]>>>0,x=t[e+13]>>>0,v=t[e+14]>>>0,b=t[e+15]>>>0;r[n++]=a>>>0&65535,r[n++]=a>>>16&65535,r[n++]=s>>>0&65535,r[n++]=s>>>16&65535,r[n++]=o>>>0&65535,r[n++]=o>>>16&65535,r[n++]=l>>>0&65535,r[n++]=l>>>16&65535,r[n++]=u>>>0&65535,r[n++]=u>>>16&65535,r[n++]=h>>>0&65535,r[n++]=h>>>16&65535,r[n++]=c>>>0&65535,r[n++]=c>>>16&65535,r[n++]=p>>>0&65535,r[n++]=p>>>16&65535,r[n++]=f>>>0&65535,r[n++]=f>>>16&65535,r[n++]=d>>>0&65535,r[n++]=d>>>16&65535,r[n++]=y>>>0&65535,r[n++]=y>>>16&65535,r[n++]=m>>>0&65535,r[n++]=m>>>16&65535,r[n++]=g>>>0&65535,r[n++]=g>>>16&65535,r[n++]=x>>>0&65535,r[n++]=x>>>16&65535,r[n++]=v>>>0&65535,r[n++]=v>>>16&65535,r[n++]=b>>>0&65535,r[n]=b>>>16&65535}function Pw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0;r[n++]=o>>>0&1,r[n++]=o>>>1&1,r[n++]=o>>>2&1,r[n++]=o>>>3&1,r[n++]=o>>>4&1,r[n++]=o>>>5&1,r[n++]=o>>>6&1,r[n++]=o>>>7&1,r[n++]=o>>>8&1,r[n++]=o>>>9&1,r[n++]=o>>>10&1,r[n++]=o>>>11&1,r[n++]=o>>>12&1,r[n++]=o>>>13&1,r[n++]=o>>>14&1,r[n++]=o>>>15&1,r[n++]=o>>>16&1,r[n++]=o>>>17&1,r[n++]=o>>>18&1,r[n++]=o>>>19&1,r[n++]=o>>>20&1,r[n++]=o>>>21&1,r[n++]=o>>>22&1,r[n++]=o>>>23&1,r[n++]=o>>>24&1,r[n++]=o>>>25&1,r[n++]=o>>>26&1,r[n++]=o>>>27&1,r[n++]=o>>>28&1,r[n++]=o>>>29&1,r[n++]=o>>>30&1,r[n++]=o>>>31&1}}function zw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0;r[n++]=o>>>0&3,r[n++]=o>>>2&3,r[n++]=o>>>4&3,r[n++]=o>>>6&3,r[n++]=o>>>8&3,r[n++]=o>>>10&3,r[n++]=o>>>12&3,r[n++]=o>>>14&3,r[n++]=o>>>16&3,r[n++]=o>>>18&3,r[n++]=o>>>20&3,r[n++]=o>>>22&3,r[n++]=o>>>24&3,r[n++]=o>>>26&3,r[n++]=o>>>28&3,r[n++]=o>>>30&3,r[n++]=l>>>0&3,r[n++]=l>>>2&3,r[n++]=l>>>4&3,r[n++]=l>>>6&3,r[n++]=l>>>8&3,r[n++]=l>>>10&3,r[n++]=l>>>12&3,r[n++]=l>>>14&3,r[n++]=l>>>16&3,r[n++]=l>>>18&3,r[n++]=l>>>20&3,r[n++]=l>>>22&3,r[n++]=l>>>24&3,r[n++]=l>>>26&3,r[n++]=l>>>28&3,r[n++]=l>>>30&3}}function Lw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0;r[n++]=o>>>0&7,r[n++]=o>>>3&7,r[n++]=o>>>6&7,r[n++]=o>>>9&7,r[n++]=o>>>12&7,r[n++]=o>>>15&7,r[n++]=o>>>18&7,r[n++]=o>>>21&7,r[n++]=o>>>24&7,r[n++]=o>>>27&7,r[n++]=(o>>>30|(l&1)<<2)&7,r[n++]=l>>>1&7,r[n++]=l>>>4&7,r[n++]=l>>>7&7,r[n++]=l>>>10&7,r[n++]=l>>>13&7,r[n++]=l>>>16&7,r[n++]=l>>>19&7,r[n++]=l>>>22&7,r[n++]=l>>>25&7,r[n++]=l>>>28&7,r[n++]=(l>>>31|(u&3)<<1)&7,r[n++]=u>>>2&7,r[n++]=u>>>5&7,r[n++]=u>>>8&7,r[n++]=u>>>11&7,r[n++]=u>>>14&7,r[n++]=u>>>17&7,r[n++]=u>>>20&7,r[n++]=u>>>23&7,r[n++]=u>>>26&7,r[n++]=u>>>29&7}}function Vw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0;r[n++]=o>>>0&15,r[n++]=o>>>4&15,r[n++]=o>>>8&15,r[n++]=o>>>12&15,r[n++]=o>>>16&15,r[n++]=o>>>20&15,r[n++]=o>>>24&15,r[n++]=o>>>28&15,r[n++]=l>>>0&15,r[n++]=l>>>4&15,r[n++]=l>>>8&15,r[n++]=l>>>12&15,r[n++]=l>>>16&15,r[n++]=l>>>20&15,r[n++]=l>>>24&15,r[n++]=l>>>28&15,r[n++]=u>>>0&15,r[n++]=u>>>4&15,r[n++]=u>>>8&15,r[n++]=u>>>12&15,r[n++]=u>>>16&15,r[n++]=u>>>20&15,r[n++]=u>>>24&15,r[n++]=u>>>28&15,r[n++]=h>>>0&15,r[n++]=h>>>4&15,r[n++]=h>>>8&15,r[n++]=h>>>12&15,r[n++]=h>>>16&15,r[n++]=h>>>20&15,r[n++]=h>>>24&15,r[n++]=h>>>28&15}}function Ow(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0;r[n++]=o>>>0&31,r[n++]=o>>>5&31,r[n++]=o>>>10&31,r[n++]=o>>>15&31,r[n++]=o>>>20&31,r[n++]=o>>>25&31,r[n++]=(o>>>30|(l&7)<<2)&31,r[n++]=l>>>3&31,r[n++]=l>>>8&31,r[n++]=l>>>13&31,r[n++]=l>>>18&31,r[n++]=l>>>23&31,r[n++]=(l>>>28|(u&1)<<4)&31,r[n++]=u>>>1&31,r[n++]=u>>>6&31,r[n++]=u>>>11&31,r[n++]=u>>>16&31,r[n++]=u>>>21&31,r[n++]=u>>>26&31,r[n++]=(u>>>31|(h&15)<<1)&31,r[n++]=h>>>4&31,r[n++]=h>>>9&31,r[n++]=h>>>14&31,r[n++]=h>>>19&31,r[n++]=h>>>24&31,r[n++]=(h>>>29|(c&3)<<3)&31,r[n++]=c>>>2&31,r[n++]=c>>>7&31,r[n++]=c>>>12&31,r[n++]=c>>>17&31,r[n++]=c>>>22&31,r[n++]=c>>>27&31}}function Rw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0,p=t[a++]>>>0;r[n++]=o>>>0&63,r[n++]=o>>>6&63,r[n++]=o>>>12&63,r[n++]=o>>>18&63,r[n++]=o>>>24&63,r[n++]=(o>>>30|(l&15)<<2)&63,r[n++]=l>>>4&63,r[n++]=l>>>10&63,r[n++]=l>>>16&63,r[n++]=l>>>22&63,r[n++]=(l>>>28|(u&3)<<4)&63,r[n++]=u>>>2&63,r[n++]=u>>>8&63,r[n++]=u>>>14&63,r[n++]=u>>>20&63,r[n++]=u>>>26&63,r[n++]=h>>>0&63,r[n++]=h>>>6&63,r[n++]=h>>>12&63,r[n++]=h>>>18&63,r[n++]=h>>>24&63,r[n++]=(h>>>30|(c&15)<<2)&63,r[n++]=c>>>4&63,r[n++]=c>>>10&63,r[n++]=c>>>16&63,r[n++]=c>>>22&63,r[n++]=(c>>>28|(p&3)<<4)&63,r[n++]=p>>>2&63,r[n++]=p>>>8&63,r[n++]=p>>>14&63,r[n++]=p>>>20&63,r[n++]=p>>>26&63}}function $w(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0,p=t[a++]>>>0,f=t[a++]>>>0;r[n++]=o>>>0&127,r[n++]=o>>>7&127,r[n++]=o>>>14&127,r[n++]=o>>>21&127,r[n++]=(o>>>28|(l&7)<<4)&127,r[n++]=l>>>3&127,r[n++]=l>>>10&127,r[n++]=l>>>17&127,r[n++]=l>>>24&127,r[n++]=(l>>>31|(u&63)<<1)&127,r[n++]=u>>>6&127,r[n++]=u>>>13&127,r[n++]=u>>>20&127,r[n++]=(u>>>27|(h&3)<<5)&127,r[n++]=h>>>2&127,r[n++]=h>>>9&127,r[n++]=h>>>16&127,r[n++]=h>>>23&127,r[n++]=(h>>>30|(c&31)<<2)&127,r[n++]=c>>>5&127,r[n++]=c>>>12&127,r[n++]=c>>>19&127,r[n++]=(c>>>26|(p&1)<<6)&127,r[n++]=p>>>1&127,r[n++]=p>>>8&127,r[n++]=p>>>15&127,r[n++]=p>>>22&127,r[n++]=(p>>>29|(f&15)<<3)&127,r[n++]=f>>>4&127,r[n++]=f>>>11&127,r[n++]=f>>>18&127,r[n++]=f>>>25&127}}function Nw(t,e,r,i){let n=i,a=e;for(let s=0;s<8;s++){let o=t[a++]>>>0,l=t[a++]>>>0,u=t[a++]>>>0,h=t[a++]>>>0,c=t[a++]>>>0,p=t[a++]>>>0,f=t[a++]>>>0,d=t[a++]>>>0;r[n++]=o>>>0&255,r[n++]=o>>>8&255,r[n++]=o>>>16&255,r[n++]=o>>>24&255,r[n++]=l>>>0&255,r[n++]=l>>>8&255,r[n++]=l>>>16&255,r[n++]=l>>>24&255,r[n++]=u>>>0&255,r[n++]=u>>>8&255,r[n++]=u>>>16&255,r[n++]=u>>>24&255,r[n++]=h>>>0&255,r[n++]=h>>>8&255,r[n++]=h>>>16&255,r[n++]=h>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>24&255,r[n++]=p>>>0&255,r[n++]=p>>>8&255,r[n++]=p>>>16&255,r[n++]=p>>>24&255,r[n++]=f>>>0&255,r[n++]=f>>>8&255,r[n++]=f>>>16&255,r[n++]=f>>>24&255,r[n++]=d>>>0&255,r[n++]=d>>>8&255,r[n++]=d>>>16&255,r[n++]=d>>>24&255}}function Uw(t,e,r,i){let n=i,a=e;for(let s=0;s<128;s++){let o=t[a++]>>>0;r[n++]=o&65535,r[n++]=o>>>16&65535}}function qw(t,e,r,i,n){let a=ul[n]>>>0,s=e,o=0,l=t[s]>>>0,u=i;for(let h=0;h<8;h++){for(let c=0;c<32;c++)if(o+n<=32){let p=l>>>o&a;r[u+c]=p|0,o+=n,o===32&&(o=0,s++,c!==31&&(l=t[s]>>>0))}else{let p=32-o,f=l>>>o;s++,l=t[s]>>>0;let d=n-p,y=-1>>>32-d>>>0,m=(f|(l&y)<<p)&a;r[u+c]=m|0,o=d}u+=32,o=0,h<7&&(l=t[s]>>>0)}}var hl=bw(py),jw=3*hl/256+hl|0;function fy(){let t=new Uint8Array(jw);return{dataToBePacked:Array(33),dataPointers:new Int32Array(33),byteContainer:t,byteContainerI32:new Int32Array(t.buffer,t.byteOffset,t.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function Gw(t=16){if(t<0)throw RangeError(`initialEncodedWordCapacity must be >= 0, got ${t}`);let e=Math.max(16,t|0);return{encodedWords:new Uint32Array(e),decoderWorkspace:fy()}}function Xw(t,e){if(e<=t.encodedWords.length)return t.encodedWords;let r=new Uint32Array(Math.max(16,e*2));return t.encodedWords=r,r}function Yw(t,e,r,i){i.byteContainer.length<r&&(i.byteContainer=new Uint8Array(r*2),i.byteContainerI32=void 0);let n=i.byteContainer,a=r>>>2;if(n.byteOffset&3)for(let o=0;o<a;o=o+1|0){let l=t[e+o|0]|0,u=o<<2;n[u]=l&255,n[u+1|0]=l>>>8&255,n[u+2|0]=l>>>16&255,n[u+3|0]=l>>>24&255}else{let o=i.byteContainerI32;(!o||o.buffer!==n.buffer||o.byteOffset!==n.byteOffset||o.length<a)&&(o=i.byteContainerI32=new Int32Array(n.buffer,n.byteOffset,n.byteLength>>>2)),o.set(t.subarray(e,e+a))}let s=r&3;if(s>0){let o=t[e+a|0]|0,l=a<<2;for(let u=0;u<s;u=u+1|0)n[l+u|0]=o>>>(u<<3)&255}return n}function Ww(t,e,r){let i=t[e++]|0,n=r.dataToBePacked;for(let a=2;a<=32;a=a+1|0){if(!(i>>>a-1&1))continue;if(e>=t.length)throw Error(`FastPFOR decode: truncated exception stream header (bitWidth=${a}, streamWordIndex=${e}, needWords=1, availableWords=${t.length-e}, encodedWords=${t.length})`);let s=t[e++]>>>0,o=vw(s),l=s*a+31>>>5;if(e+l>t.length)throw Error(`FastPFOR decode: truncated exception stream (bitWidth=${a}, size=${s}, streamWordIndex=${e}, needWords=${l}, availableWords=${t.length-e}, encodedWords=${t.length})`);let u=n[a];(!u||u.length<o)&&(u=n[a]=new Uint32Array(o));let h=0;for(;h<s;h=h+32|0)n3(t,e,u,h,a),e=e+a|0;let c=h-s|0;e=e-(c*a>>>5)|0,r.exceptionSizes[a]=s}return e}function Zw(t,e,r,i,n){switch(n){case 1:Pw(t,e,r,i);break;case 2:zw(t,e,r,i);break;case 3:Lw(t,e,r,i);break;case 4:Vw(t,e,r,i);break;case 5:Ow(t,e,r,i);break;case 6:Rw(t,e,r,i);break;case 7:$w(t,e,r,i);break;case 8:Nw(t,e,r,i);break;case 16:Uw(t,e,r,i);break;default:qw(t,e,r,i,n)}return e+(n<<3)|0}function Hw(t,e,r,i){if(r+2>e)throw Error(`FastPFOR decode: byteContainer underflow at block=${i} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${r}, byteSize=${e})`);let n=t[r++],a=t[r++];if(n>32)throw Error(`FastPFOR decode: invalid bitWidth=${n} at block=${i} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:n,exceptionCount:a,bytePosIn:r}}function Kw(t,e,r,i,n,a){if(r+1>e)throw Error(`FastPFOR decode: exception header underflow at block=${a} (need 1 byte for maxBits, bytePos=${r}, byteSize=${e})`);let s=t[r++];if(s<i||s>32)throw Error(`FastPFOR decode: invalid maxBits=${s} at block=${a} (bitWidth=${i}, expected ${i}..32)`);let o=s-i|0;if(o<1||o>32)throw Error(`FastPFOR decode: invalid exceptionBitWidth=${o} at block=${a} (bitWidth=${i}, maxBits=${s})`);if(r+n>e)throw Error(`FastPFOR decode: exception positions underflow at block=${a} (need=${n}, have=${e-r})`);return{maxBits:s,exceptionBitWidth:o,bytePosIn:r}}function Jw(t,e,r,i,n,a,s,o,l){let{maxBits:u,exceptionBitWidth:h,bytePosIn:c}=Kw(n,a,s,r,i,l);if(s=c,h===1){let m=1<<r;for(let g=0;g<i;g=g+1|0){let x=n[s++];t[x+e|0]|=m}return s}let p=o.dataToBePacked[h];if(!p)throw Error(`FastPFOR decode: missing exception stream for exceptionBitWidth=${h} (bitWidth=${r}, maxBits=${u}) at block ${l}`);let f=o.dataPointers,d=f[h]|0,y=o.exceptionSizes[h]|0;if(d+i>y)throw Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${h} (ptr=${d}, need ${i}, size=${y}) at block ${l}`);for(let m=0;m<i;m=m+1|0){let g=n[s++],x=p[d++]|0;t[g+e|0]|=x<<r}return f[h]=d,s}function Qw(t,e,r,i,n,a,s,o,l,u){let h=r|0,c=0;for(let p=0;p<s;p=p+1|0){let f=Hw(o,l,c,p);c=f.bytePosIn;let d=f.bitWidth,y=f.exceptionCount,m=a+p*256|0;switch(d){case 0:n.fill(0,m,m+256);break;case 32:for(let g=0;g<256;g=g+1|0)n[m+g|0]=t[h+g|0]|0;h=h+256|0;break;default:h=Zw(t,h,n,m,d)}y>0&&(c=Jw(n,m,d,y,o,l,c,u,p))}if(h!==i)throw Error(`FastPFOR decode: packed region mismatch (pageStart=${e}, packedStart=${r}, consumedPackedEnd=${h}, expectedPackedEnd=${i}, packedWords=${i-r}, encoded.length=${t.length})`)}function t3(t,e,r,i,n,a){let s=r|0,o=t[s]|0;if(o<=0||s+o>t.length-1)throw Error(`FastPFOR decode: invalid whereMeta=${o} at pageStart=${s} (expected > 0 and pageStart+whereMeta < encoded.length=${t.length})`);let l=s+1|0,u=s+o|0,h=t[u]>>>0,c=h+3>>>2,p=u+1,f=p+c;if(f>=t.length)throw Error(`FastPFOR decode: invalid byteSize=${h} (metaInts=${c}, pageStart=${s}, packedEnd=${u}, byteContainerStart=${p}) causes bitmapPos=${f} out of bounds (encoded.length=${t.length})`);let d=Yw(t,p,h,a),y=h,m=Ww(t,f,a);return a.dataPointers.fill(0),Qw(t,s,l,u,e,i|0,n/256|0,d,y,a),m}function e3(t,e,r,i,n,a){let s=i+gu(n,256),o=i,l=r;for(;o!==s;){let u=Math.min(hl,s-o);l=t3(t,e,l,o,u,a),o=o+u|0}return l}function r3(t,e,r,i,n,a){if(a===0)return e;let s=0,o=e,l=e+r,u=n,h=n,c=n+a,p=0,f=0;for(;o<l&&h<c;){let d=t[o]>>>s&255;if(s+=8,o+=s>>>5,s&=31,p|=(d&127)<<f,d&128)i[h++]=p|0,p=0,f=0;else if(f+=7,f>28)throw Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${f}, partial=${p}, decoded=${h-u}/${a}, inPos=${o}, inEnd=${l})`)}if(h!==c)throw Error(`FastPFOR VByte: truncated stream (decoded=${h-u}, expected=${a}, consumedWords=${o-e}/${r}, vbyteStart=${e}, vbyteEnd=${l})`);return o}function i3(t,e,r){let i=0,n=0,a=new Uint32Array(e),s=r!=null?r:fy();if(t.length>0){let u=t[i]|0;if(i=i+1|0,u&255)throw Error(`FastPFOR decode: invalid alignedLength=${u} (expected multiple of 256)`);if(n+u>a.length)throw Error(`FastPFOR decode: output buffer too small (outPos=${n}, alignedLength=${u}, out.length=${a.length})`);i=e3(t,a,i,n,u,s),n=n+u|0}let o=t.length-i|0,l=e-n|0;return r3(t,i,o,a,n,l),a}function n3(t,e,r,i,n){switch(n){case 2:Dw(t,e,r,i);return;case 3:_w(t,e,r,i);return;case 4:Aw(t,e,r,i);return;case 5:Sw(t,e,r,i);return;case 6:Ew(t,e,r,i);return;case 7:Fw(t,e,r,i);return;case 8:kw(t,e,r,i);return;case 9:Tw(t,e,r,i);return;case 10:Iw(t,e,r,i);return;case 11:Cw(t,e,r,i);return;case 12:Mw(t,e,r,i);return;case 16:Bw(t,e,r,i);return;case 32:for(let u=0;u<32;u=u+1|0)r[i+u|0]=t[e+u|0]|0;return}let a=ul[n]>>>0,s=e,o=0,l=t[s]>>>0;for(let u=0;u<32;u++)if(o+n<=32){let h=l>>>o&a;r[i+u]=h|0,o+=n,o===32&&(o=0,s++,u!==31&&(l=t[s]>>>0))}else{let h=32-o,c=l>>>o;s++,l=t[s]>>>0;let p=ul[n-h]>>>0,f=(c|(l&p)<<h)&a;r[i+u]=f|0,o=n-h}}function a3(t,e,r,i){if(e<0||r<0||e+r>t.length)throw RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${e}, byteLength=${r}, bytes.length=${t.length})`);let n=Math.floor(r/4),a=r%4!=0,s=a?n+1:n;if(i.length<s)throw RangeError(`decodeBigEndianInt32sInto: out.length=${i.length} < ${s}`);if(n>0){let o=t.byteOffset+e;if(o&3)for(let l=0;l<n;l++){let u=e+l*4;i[l]=t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]|0}else{let l=new Uint32Array(t.buffer,o,n);for(let u=0;u<n;u++)i[u]=ww(l[u])|0}}if(a){let o=e+n*4,l=r-n*4,u=0;for(let h=0;h<l;h++)u|=t[o+h]<<24-h*8;i[n]=u|0}return s}function $t(t,e,r){let i=new Uint32Array(r),n=0,a=e.get();for(let s=0;s<i.length;s++){let o=t[a++],l=o&127;if(o<128){i[n++]=l;continue}if(o=t[a++],l|=(o&127)<<7,o<128){i[n++]=l;continue}if(o=t[a++],l|=(o&127)<<14,o<128){i[n++]=l;continue}if(o=t[a++],l|=(o&127)<<21,o<128){i[n++]=l;continue}o=t[a++],l|=(o&15)<<28,i[n++]=l}return e.set(a),i}function xu(t,e,r){let i=new BigUint64Array(r);for(let n=0;n<i.length;n++)i[n]=s3(t,e);return i}function s3(t,e){let r=BigInt(0),i=0,n=e.get();for(;n<t.length;){let a=t[n++];if(r|=BigInt(a&127)<<BigInt(i),!(a&128))break;if(i+=7,i>=64)throw Error("Varint too long")}return e.set(n),r}function o3(t,e,r){let i=new Float64Array(r);for(let n=0;n<r;n++)i[n]=l3(t,e);return i}function l3(t,e){let r,i;return i=t[e.get()],e.increment(),r=i&127,i<128||(i=t[e.get()],e.increment(),r|=(i&127)<<7,i<128)||(i=t[e.get()],e.increment(),r|=(i&127)<<14,i<128)||(i=t[e.get()],e.increment(),r|=(i&127)<<21,i<128)?r:(i=t[e.get()],r|=(i&15)<<28,u3(r,t,e))}function u3(t,e,r){let i,n;if(n=e[r.get()],r.increment(),i=(n&112)>>4,n<128||(n=e[r.get()],r.increment(),i|=(n&127)<<3,n<128)||(n=e[r.get()],r.increment(),i|=(n&127)<<10,n<128)||(n=e[r.get()],r.increment(),i|=(n&127)<<17,n<128)||(n=e[r.get()],r.increment(),i|=(n&127)<<24,n<128)||(n=e[r.get()],r.increment(),i|=(n&1)<<31,n<128))return i*4294967296+(t>>>0);throw Error("Expected varint not more than 10 bytes")}function h3(t,e,r,i){return c3(t,e,r,i,Gw(r>>>2))}function c3(t,e,r,i,n){let a=i.get();if(r&3)throw Error(`FastPFOR: invalid encodedByteLength=${r} at offset=${a} (encodedBytes.length=${t.length}; expected a multiple of 4 bytes for an int32 big-endian word stream)`);let s=r>>>2,o=Xw(n,s);a3(t,a,r,o);let l=i3(o.subarray(0,s),e,n.decoderWorkspace);return i.add(r),l}function et(t){return t>>>1^-(t&1)}function Ot(t){return t>>BigInt(1)^-(t&BigInt(1))}function We(t){return t%2==1?(t+1)/-2:t/2}function p3(t){let e=new Int32Array(t.length);for(let r=0;r<t.length;r++)e[r]=et(t[r]);return e}function f3(t){let e=new BigInt64Array(t.length);for(let r=0;r<t.length;r++)e[r]=Ot(t[r]);return e}function d3(t){for(let e=0;e<t.length;e++)t[e]=We(t[e])}function cl(t,e,r){if(r===void 0){r=0;for(let a=0;a<e;a++)r+=t[a]}let i=new Uint32Array(r),n=0;for(let a=0;a<e;a++){let s=t[a],o=t[a+e];i.fill(o,n,n+s),n+=s}return i}function pl(t,e,r){if(r===void 0){r=0;for(let a=0;a<e;a++)r+=Number(t[a])}let i=new BigUint64Array(r),n=0;for(let a=0;a<e;a++){let s=Number(t[a]),o=t[a+e];i.fill(o,n,n+s),n+=s}return i}function dy(t,e,r){let i=new Float64Array(r),n=0;for(let a=0;a<e;a++){let s=t[a],o=t[a+e];i.fill(o,n,n+s),n+=s}return i}function Nc(t){let e=new Int32Array(t.length);e[0]=et(t[0]);let r=t.length/4*4,i=1;if(r>=4)for(;i<r-4;i+=4){let n=t[i],a=t[i+1],s=t[i+2],o=t[i+3];e[i]=et(n)+e[i-1],e[i+1]=et(a)+e[i],e[i+2]=et(s)+e[i+1],e[i+3]=et(o)+e[i+2]}for(;i!==t.length;++i)e[i]=et(t[i])+e[i-1];return e}function Uc(t){let e=new BigInt64Array(t.length);e[0]=Ot(t[0]);let r=t.length/4*4,i=1;if(r>=4)for(;i<r-4;i+=4){let n=t[i],a=t[i+1],s=t[i+2],o=t[i+3];e[i]=Ot(n)+e[i-1],e[i+1]=Ot(a)+e[i],e[i+2]=Ot(s)+e[i+1],e[i+3]=Ot(o)+e[i+2]}for(;i!==e.length;++i)e[i]=Ot(t[i])+e[i-1];return e}function y3(t){t[0]=We(t[0]);let e=t.length/4*4,r=1;if(e>=4)for(;r<e-4;r+=4){let i=t[r],n=t[r+1],a=t[r+2],s=t[r+3];t[r]=We(i)+t[r-1],t[r+1]=We(n)+t[r],t[r+2]=We(a)+t[r+1],t[r+3]=We(s)+t[r+2]}for(;r!==t.length;++r)t[r]=We(t[r])+t[r-1]}function m3(t,e,r){if(r===void 0){r=0;for(let a=0;a<e;a++)r+=t[a]}let i=new Int32Array(r),n=0;for(let a=0;a<e;a++){let s=t[a],o=t[a+e];o=et(o),i.fill(o,n,n+s),n+=s}return i}function g3(t,e,r){if(r===void 0){r=0;for(let a=0;a<e;a++)r+=Number(t[a])}let i=new BigInt64Array(r),n=0;for(let a=0;a<e;a++){let s=Number(t[a]),o=t[a+e];o=Ot(o),i.fill(o,n,n+s),n+=s}return i}function x3(t,e,r){let i=new Float64Array(r),n=0;for(let a=0;a<e;a++){let s=t[a],o=t[a+e];o=We(o),i.fill(o,n,n+s),n+=s}return i}function vu(t){let e=t.length/4*4,r=1;if(e>=4)for(let i=t[0];r<e-4;r+=4)i=t[r]+=i,i=t[r+1]+=i,i=t[r+2]+=i,i=t[r+3]+=i;for(;r!==t.length;)t[r]+=t[r-1],++r}function v3(t){let e=0;for(let r=0;r<t.length;r++)t[r]+=e,e=t[r]}function b3(t){if(t.length<2)return new Int32Array(t);let e=new Int32Array(t.length);e[0]=et(t[0]),e[1]=et(t[1]);let r=t.length/4*4,i=2;if(r>=4)for(;i<r-4;i+=4){let n=t[i],a=t[i+1],s=t[i+2],o=t[i+3];e[i]=et(n)+e[i-2],e[i+1]=et(a)+e[i-1],e[i+2]=et(s)+e[i],e[i+3]=et(o)+e[i+1]}for(;i!==t.length;i+=2)e[i]=et(t[i])+e[i-2],e[i+1]=et(t[i+1])+e[i-1];return e}function yy(t,e,r,i){if(t.length<2)return new Int32Array(t);let n=new Int32Array(t.length),a=et(t[0]),s=et(t[1]);n[0]=Xe(Math.round(a*e),r,i),n[1]=Xe(Math.round(s*e),r,i);let o=t.length/16,l=2;if(o>=4)for(;l<o-4;l+=4){let u=t[l],h=t[l+1],c=et(u)+a,p=et(h)+s;n[l]=Xe(Math.round(c*e),r,i),n[l+1]=Xe(Math.round(p*e),r,i);let f=t[l+2],d=t[l+3];a=et(f)+c,s=et(d)+p,n[l+2]=Xe(Math.round(a*e),r,i),n[l+3]=Xe(Math.round(s*e),r,i)}for(;l!==t.length;l+=2)a+=et(t[l]),s+=et(t[l+1]),n[l]=Xe(Math.round(a*e),r,i),n[l+1]=Xe(Math.round(s*e),r,i);return n}function Xe(t,e,r){return Math.min(r,Math.max(e,t))}function w3(t){let e=new Int32Array(t.length+1);e[0]=0,e[1]=et(t[0]);let r=e[1];for(let i=2;i!==e.length;++i){let n=t[i-1],a=et(n);r+=a,e[i]=e[i-1]+r}return new Uint32Array(e)}function D3(t,e,r){let i=new Int32Array(r+1);i[0]=0;let n=1,a=i[0];for(let s=0;s<e;s++){let o=t[s],l=t[s+e];l=et(l);for(let u=n;u<n+o;u++)i[u]=l+a,a=i[u];n+=o}return i}function _3(t,e,r){let i=new Uint32Array(r+1);i[0]=0;let n=1,a=i[0];for(let s=0;s<e;s++){let o=t[s],l=t[s+e];for(let u=n;u<n+o;u++)i[u]=l+a,a=i[u];n+=o}return i}function A3(t,e,r){let i=new Int32Array(r),n=0,a=0;for(let s=0;s<e;s++){let o=t[s],l=t[s+e],u=et(l);for(let h=0;h<o;h++)a+=u,i[n++]=a}return i}function S3(t,e,r){let i=new BigInt64Array(r),n=0,a=BigInt(0);for(let s=0;s<e;s++){let o=Number(t[s]),l=t[s+e],u=Ot(l);for(let h=0;h<o;h++)a+=u,i[n++]=a}return i}function qc(t){let e=new Uint32Array(t.length);e[0]=et(t[0])>>>0;for(let r=1;r<t.length;r++)e[r]=e[r-1]+et(t[r])>>>0;return e}function jc(t){let e=new BigUint64Array(t.length);e[0]=BigInt.asUintN(64,Ot(t[0]));for(let r=1;r<t.length;r++)e[r]=BigInt.asUintN(64,e[r-1]+Ot(t[r]));return e}function E3(t){if(t.length<2)return new Uint32Array(t);let e=new Uint32Array(t.length);e[0]=et(t[0])>>>0,e[1]=et(t[1])>>>0;for(let r=2;r<t.length;r+=2)e[r]=e[r-2]+et(t[r])>>>0,e[r+1]=e[r-1]+et(t[r+1])>>>0;return e}function F3(t,e,r,i){let n=yy(t,e,r,i);return new Uint32Array(n)}function k3(t){return t[1]}function T3(t){return et(t[1])}function I3(t){if(t.length===2){let e=et(t[1]);return[e,e]}return[et(t[2]),et(t[3])]}function C3(t){return t[1]}function M3(t){return Ot(t[1])}function B3(t){if(t.length===2){let e=Ot(t[1]);return[e,e]}return[Ot(t[2]),Ot(t[3])]}var St;(function(t){t.PRESENT="PRESENT",t.DATA="DATA",t.OFFSET="OFFSET",t.LENGTH="LENGTH"})(St||(St={}));var jt;(function(t){t.NONE="NONE",t.SINGLE="SINGLE",t.SHARED="SHARED",t.VERTEX="VERTEX",t.MORTON="MORTON",t.FSST="FSST"})(jt||(jt={}));var Me;(function(t){t.VERTEX="VERTEX",t.INDEX="INDEX",t.STRING="STRING",t.KEY="KEY"})(Me||(Me={}));var Ct;(function(t){t.VAR_BINARY="VAR_BINARY",t.GEOMETRIES="GEOMETRIES",t.PARTS="PARTS",t.RINGS="RINGS",t.TRIANGLES="TRIANGLES",t.SYMBOL="SYMBOL",t.DICTIONARY="DICTIONARY"})(Ct||(Ct={}));var P3=[St.PRESENT,St.DATA,St.OFFSET,St.LENGTH],Gc=[H.NONE,H.DELTA,H.COMPONENTWISE_DELTA,H.RLE,H.MORTON],z3=[le.NONE,le.FAST_PFOR,le.VARINT],L3=[jt.NONE,jt.SINGLE,jt.SHARED,jt.VERTEX,jt.MORTON,jt.FSST],V3=[Me.VERTEX,Me.INDEX,Me.STRING,Me.KEY],O3=[Ct.VAR_BINARY,Ct.GEOMETRIES,Ct.PARTS,Ct.RINGS,Ct.TRIANGLES,Ct.SYMBOL,Ct.DICTIONARY];function ct(t,e){let r=N3(t,e);return r.logicalLevelTechnique1===H.MORTON?R3(r,t,e):(H.RLE===r.logicalLevelTechnique1||H.RLE===r.logicalLevelTechnique2)&&le.NONE!==r.physicalLevelTechnique?$3(r,t,e):r}function R3(t,e,r){let i=$t(e,r,2);return{physicalStreamType:t.physicalStreamType,logicalStreamType:t.logicalStreamType,logicalLevelTechnique1:t.logicalLevelTechnique1,logicalLevelTechnique2:t.logicalLevelTechnique2,physicalLevelTechnique:t.physicalLevelTechnique,numValues:t.numValues,byteLength:t.byteLength,decompressedCount:t.decompressedCount,numBits:i[0],coordinateShift:i[1]}}function $3(t,e,r){let i=$t(e,r,2);return{physicalStreamType:t.physicalStreamType,logicalStreamType:t.logicalStreamType,logicalLevelTechnique1:t.logicalLevelTechnique1,logicalLevelTechnique2:t.logicalLevelTechnique2,physicalLevelTechnique:t.physicalLevelTechnique,numValues:t.numValues,byteLength:t.byteLength,decompressedCount:i[1],runs:i[0],numRleValues:i[1]}}function N3(t,e){let r=t[e.get()],i=P3[r>>4],n={};switch(i){case St.DATA:n={dictionaryType:L3[r&15]};break;case St.OFFSET:n={offsetType:V3[r&15]};break;case St.LENGTH:n={lengthType:O3[r&15]}}e.increment();let a=t[e.get()],s=Gc[a>>5],o=Gc[a>>2&7],l=z3[a&3];e.increment();let u=$t(t,e,2),h=u[0],c=u[1];return{physicalStreamType:i,logicalStreamType:n,logicalLevelTechnique1:s,logicalLevelTechnique2:o,physicalLevelTechnique:l,numValues:h,byteLength:c,decompressedCount:h}}var ht;(function(t){t[t.FLAT=0]="FLAT",t[t.CONST=1]="CONST",t[t.SEQUENCE=2]="SEQUENCE",t[t.DICTIONARY=3]="DICTIONARY",t[t.FSST_DICTIONARY=4]="FSST_DICTIONARY"})(ht||(ht={}));var fe=class{constructor(t,e){this.values=t,this._size=e}get(t){let e=Math.floor(t/8),r=t%8;return(this.values[e]>>r&1)==1}set(t,e){let r=Math.floor(t/8),i=t%8;this.values[r]=this.values[r]|+!!e<<i}getInt(t){let e=Math.floor(t/8),r=t%8;return this.values[e]>>r&1}size(){return this._size}getBuffer(){return this.values}};function Er(t,e,r){if(!e)return t;let i=e.size(),n=t.constructor,a=new n(i),s=0;for(let o=0;o<i;o++)a[o]=e.get(o)?t[s++]:r;return a}function U3(t,e,r){if(!r)return t;let i=r.size(),n=new fe(t,e),a=new fe(new Uint8Array(Math.ceil(i/8)),i),s=0;for(let o=0;o<i;o++){let l=r.get(o)?n.get(s++):!1;a.set(o,l)}return a.getBuffer()}function my(t,e,r){for(let i=0;i<t;i++){let n=ct(e,r);r.add(n.byteLength)}}function ci(t,e,r,i,n){let a=q3(t,Math.ceil(e/8),r,i);return n?U3(a,e,n):a}function q3(t,e,r,i){let n=new Uint8Array(e),a=0,s=i.get()+r;for(;a<e&&!(i.get()>=s);){let o=t[i.increment()];if(o<=127){let l=o+3,u=t[i.increment()],h=Math.min(a+l,e);n.fill(u,a,h),a=h}else{let l=256-o;for(let u=0;u<l&&a<e;u++)n[a++]=t[i.increment()]}}return i.set(s),n}function gy(t,e,r,i){let n=e.get(),a=n+r*Float32Array.BYTES_PER_ELEMENT,s=new Uint8Array(t.subarray(n,a)).buffer,o=new Float32Array(s);return e.set(a),i?Er(o,i,0):o}function xy(t,e,r,i){let n=e.get(),a=n+r*Float64Array.BYTES_PER_ELEMENT,s=new Uint8Array(t.subarray(n,a)).buffer,o=new Float64Array(s);return e.set(a),i?Er(o,i,0):o}function j3(t,e,r){let i=e.get(),n=r*Uint32Array.BYTES_PER_ELEMENT,a=new DataView(t.buffer,t.byteOffset,t.byteLength),s=new Uint32Array(r);for(let o=0;o<r;o++)s[o]=a.getUint32(i+o*Uint32Array.BYTES_PER_ELEMENT,!0);return e.add(n),s}function G3(t,e,r){let i=e.get(),n=r*BigUint64Array.BYTES_PER_ELEMENT,a=new DataView(t.buffer,t.byteOffset,t.byteLength),s=new BigUint64Array(r);for(let o=0;o<r;o++)s[o]=a.getBigUint64(i+o*BigUint64Array.BYTES_PER_ELEMENT,!0);return e.add(n),s}var X3=new TextDecoder;function bu(t,e,r){return r-e>=12?X3.decode(t.subarray(e,r)):Y3(t,e,r)}function Y3(t,e,r){let i="",n=e;for(;n<r;){let a=t[n],s=null,o=a>239?4:a>223?3:a>191?2:1;if(n+o>r)break;let l,u,h;o===1?a<128&&(s=a):o===2?(l=t[n+1],(l&192)==128&&(s=(a&31)<<6|l&63,s<=127&&(s=null))):o===3?(l=t[n+1],u=t[n+2],(l&192)==128&&(u&192)==128&&(s=(a&15)<<12|(l&63)<<6|u&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):o===4&&(l=t[n+1],u=t[n+2],h=t[n+3],(l&192)==128&&(u&192)==128&&(h&192)==128&&(s=(a&15)<<18|(l&63)<<12|(u&63)<<6|h&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,o=1):s>65535&&(s-=65536,i+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),i+=String.fromCharCode(s),n+=o}return i}function Ta(t,e,r,i,n){return J3(pi(t,e,r),r,i,n)}function Vt(t,e,r,i,n){return Q3(pi(t,e,r),r,i,n)}function Ze(t,e,r){return e6(pi(t,e,r),r)}function pi(t,e,r){let i=r.physicalLevelTechnique;switch(i){case le.FAST_PFOR:return h3(t,r.numValues,r.byteLength,e);case le.VARINT:return $t(t,e,r.numValues);case le.NONE:return j3(t,e,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function _n(t,e,r){let i=r.physicalLevelTechnique;switch(i){case le.VARINT:return xu(t,e,r.numValues);case le.NONE:return G3(t,e,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function W3(t,e,r){let i=pi(t,e,r);return i.length===1?et(i[0]):T3(i)}function wu(t,e,r){let i=pi(t,e,r);return i.length===1?r.logicalLevelTechnique1===H.DELTA?et(i[0]):i[0]:k3(i)}function vy(t,e,r){return I3(pi(t,e,r))}function by(t,e,r){return B3(xu(t,e,r.numValues))}function wy(t,e,r,i){return _y(_n(t,e,r),r,i)}function Du(t,e,r,i){return Ay(_n(t,e,r),r,i)}function Z3(t,e,r,i){let n=H3(t,e,r,!1);return i?Er(n,i,0):n}function H3(t,e,r,i){if(r.physicalLevelTechnique===le.VARINT)return t6(o3(t,e,r.numValues),r,i);let n=_n(t,e,r),a=i?_y(n,r):Ay(n,r);return Float64Array.from(a,Number)}function K3(t,e,r){let i=_n(t,e,r);return i.length===1?Ot(i[0]):M3(i)}function Dy(t,e,r){let i=_n(t,e,r);return i.length===1?r.logicalLevelTechnique1===H.DELTA?Ot(i[0]):i[0]:C3(i)}function J3(t,e,r,i){let n;switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let a=e;if(!i)return A3(t,a.runs,a.numRleValues);t=cl(t,a.runs,a.numRleValues),n=Nc(t)}else n=Nc(t);break;case H.RLE:n=m3(t,e.runs,e.numRleValues);break;case H.MORTON:vu(t),n=new Int32Array(t);break;case H.COMPONENTWISE_DELTA:if(r&&!i)return yy(t,r.scale,r.min,r.max);n=b3(t);break;case H.NONE:n=p3(t);break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return i?Er(n,i,0):n}function Q3(t,e,r,i){let n;switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let a=e;n=qc(cl(t,a.runs,a.numRleValues))}else n=qc(t);break;case H.RLE:n=cl(t,e.runs,e.numRleValues);break;case H.MORTON:vu(t),n=t;break;case H.COMPONENTWISE_DELTA:n=r&&!i?F3(t,r.scale,r.min,r.max):E3(t);break;case H.NONE:n=t;break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return i?Er(n,i,0):n}function _y(t,e,r){let i;switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let n=e;if(!r)return S3(t,n.runs,n.numRleValues);t=pl(t,n.runs,n.numRleValues),i=Uc(t)}else i=Uc(t);break;case H.RLE:i=g3(t,e.runs,e.numRleValues);break;case H.NONE:i=f3(t);break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return r?Er(i,r,BigInt(0)):i}function Ay(t,e,r){let i;switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let n=e;i=jc(pl(t,n.runs,n.numRleValues))}else i=jc(t);break;case H.RLE:i=pl(t,e.runs,e.numRleValues);break;case H.NONE:i=t;break;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}return r?Er(i,r,BigInt(0)):i}function t6(t,e,r){switch(e.logicalLevelTechnique1){case H.DELTA:if(e.logicalLevelTechnique2===H.RLE){let i=e;t=dy(t,i.runs,i.numRleValues)}return y3(t),t;case H.RLE:return i6(t,e,r);case H.NONE:return r&&d3(t),t;default:throw Error(`The specified Logical level technique is not supported: ${e.logicalLevelTechnique1}`)}}function e6(t,e){if(e.logicalLevelTechnique1===H.DELTA&&e.logicalLevelTechnique2===H.NONE)return w3(t);if(e.logicalLevelTechnique1===H.RLE&&e.logicalLevelTechnique2===H.NONE){let r=e;return _3(t,r.runs,r.numRleValues)}if(e.logicalLevelTechnique1===H.NONE&&e.logicalLevelTechnique2===H.NONE){v3(t);let r=new Uint32Array(e.numValues+1);return r[0]=0,r.set(t,1),r}if(e.logicalLevelTechnique1===H.DELTA&&e.logicalLevelTechnique2===H.RLE){let r=e,i=D3(t,r.runs,r.numRleValues);return vu(i),new Uint32Array(i)}throw Error("Only delta encoding is supported for transforming length to offset streams yet.")}function es(t,e,r,i,n="int32"){let a=t.logicalLevelTechnique1;if(a===H.RLE)return t.runs===1?ht.CONST:ht.FLAT;if(a!==H.DELTA||t.logicalLevelTechnique2!==H.RLE)return t.numValues===1?ht.CONST:ht.FLAT;let s=e instanceof fe?e.size():e,o=t;if(o.numRleValues!==s)return ht.FLAT;if(o.runs===1)return ht.SEQUENCE;if(o.runs!==2)return t.numValues===1?ht.CONST:ht.FLAT;let l=i.get();if(t.physicalLevelTechnique===le.VARINT)return r6(r,i,n)?ht.SEQUENCE:t.numValues===1?ht.CONST:ht.FLAT;let u=i.get(),h=new Int32Array(r.buffer,r.byteOffset+u,4);return i.set(l),h[2]===2&&h[3]===2?ht.SEQUENCE:t.numValues===1?ht.CONST:ht.FLAT}function r6(t,e,r){let i=new cy(e.get());if(r==="int64"){let a=xu(t,i,4);return a[2]===BigInt(2)&&a[3]===BigInt(2)}let n=$t(t,i,4);return n[2]===2&&n[3]===2}function i6(t,e,r){return r?x3(t,e.runs,e.numRleValues):dy(t,e.runs,e.numRleValues)}var Sy=class extends ts{getValueFromBuffer(t){return this.dataBuffer[t]}},Ey=class extends uy{constructor(t,e,r,i,n){super(t,n?BigInt64Array.of(e):BigUint64Array.of(e),r,i)}getValueFromBuffer(t){return this.dataBuffer[0]+BigInt(t)*this.delta}};function _u(t,e,r){return{x:Xc(t,e)-r,y:Xc(t>>1,e)-r}}function Xc(t,e){let r=0;for(let i=0;i<e;i++)r|=(t&1<<2*i)>>i;return r}var Rt;(function(t){t[t.POINT=0]="POINT",t[t.LINESTRING=1]="LINESTRING",t[t.POLYGON=2]="POLYGON",t[t.MULTIPOINT=3]="MULTIPOINT",t[t.MULTILINESTRING=4]="MULTILINESTRING",t[t.MULTIPOLYGON=5]="MULTIPOLYGON"})(Rt||(Rt={}));var n6;(function(t){t[t.POINT=0]="POINT",t[t.LINESTRING=1]="LINESTRING",t[t.POLYGON=2]="POLYGON"})(n6||(n6={}));var Fr;(function(t){t[t.MORTON=0]="MORTON",t[t.VEC_2=1]="VEC_2",t[t.VEC_3=2]="VEC_3"})(Fr||(Fr={}));function a6(t){let e=Array(t.numGeometries),r=1,i=1,n=1,a=0,s=0,o=0,l=t.mortonSettings,u=t.topologyVector,h=u.geometryOffsets,c=u.partOffsets,p=u.ringOffsets,f=t.vertexOffsets,d=!f||f.length===0,y=t.containsPolygonGeometry(),m=t.vertexBuffer;for(let g=0;g<t.numGeometries;g++){let x=t.geometryType(g);switch(x){case Rt.POINT:{let v,b;if(d)v=m[s++],b=m[s++];else if(t.vertexBufferType===Fr.MORTON){let D=m[f[o++]],A=_u(D,l.numBits,l.coordinateShift);v=A.x,b=A.y}else{let D=f[o++]*2;v=m[D],b=m[D+1]}e[a++]=[[new B(v,b)]],h&&n++,c&&r++,p&&i++}break;case Rt.MULTIPOINT:{let v=h[n]-h[n-1];n++;let b;if(d){b=Array(v);for(let D=0;D<v;D++){let A=m[s++],_=m[s++];b[D]=new B(A,_)}}else b=lr(t.vertexBufferType,m,f,o,v,!1,l),o+=v;e[a++]=b.map(D=>[D]),r+=v,i+=v}break;case Rt.LINESTRING:{let v;y?(v=p[i]-p[i-1],i++):v=c[r]-c[r-1],r++;let b;d?(b=Or(m,s,v,!1),s+=v*2):(b=lr(t.vertexBufferType,m,f,o,v,!1,l),o+=v),e[a++]=[b],h&&n++}break;case Rt.POLYGON:{let v=c[r]-c[r-1];r++;let b=Array(v-1),D,A=p[i]-p[i-1];if(i++,d){D=Or(m,s,A,!0),s+=A*2;for(let _=0;_<b.length;_++)A=p[i]-p[i-1],i++,b[_]=Or(m,s,A,!0),s+=A*2}else{D=lr(t.vertexBufferType,m,f,o,A,!0,l),o+=A;for(let _=0;_<b.length;_++)A=p[i]-p[i-1],i++,b[_]=lr(t.vertexBufferType,m,f,o,A,!0,l),o+=A}e[a++]=[D].concat(b),h&&n++}break;case Rt.MULTILINESTRING:{let v=h[n]-h[n-1];n++;let b=Array(v);for(let D=0;D<v;D++){let A;if(y?(A=p[i]-p[i-1],i++):A=c[r]-c[r-1],r++,d)b[D]=Or(m,s,A,!1),s+=A*2;else{let _=lr(t.vertexBufferType,m,f,o,A,!1,l);b[D]=_,o+=A}}e[a++]=b}break;case Rt.MULTIPOLYGON:{let v=h[n]-h[n-1];n++;let b=Array(v);for(let D=0;D<v;D++){let A=c[r]-c[r-1];r++;let _,S=Array(A-1),k=p[i]-p[i-1];i++,d?(_=Or(m,s,k,!0),s+=k*2):(_=lr(t.vertexBufferType,m,f,o,k,!0,l),o+=k);for(let z=0;z<S.length;z++){let O=p[i]-p[i-1];i++,d?(S[z]=Or(m,s,O,!0),s+=O*2):(S[z]=lr(t.vertexBufferType,m,f,o,O,!0,l),o+=O)}b[D]=[_].concat(S)}e[a++]=b.flat()}break;default:throw Error(`The specified geometry type (${x}) is currently not supported.`)}}return e}function lr(t,e,r,i,n,a,s){return t===Fr.MORTON?o6(e,r,i,n,a,s):s6(e,r,i,n,a)}function Or(t,e,r,i){let n=Array(i?r+1:r);for(let a=0;a<r*2;a+=2){let s=t[e+a],o=t[e+a+1];n[a/2]=new B(s,o)}return i&&(n[n.length-1]=n[0]),n}function s6(t,e,r,i,n){let a=Array(n?i+1:i);for(let s=0;s<i*2;s+=2){let o=e[r+s/2]*2,l=t[o],u=t[o+1];a[s/2]=new B(l,u)}return n&&(a[a.length-1]=a[0]),a}function o6(t,e,r,i,n,a){let s=Array(n?i+1:i);for(let o=0;o<i;o++){let l=t[e[r+o]],u=_u(l,a.numBits,a.coordinateShift);s[o]=new B(u.x,u.y)}return n&&(s[s.length-1]=s[0]),s}var Fy=class{constructor(t,e,r,i,n){this._vertexBufferType=t,this._topologyVector=e,this._vertexOffsets=r,this._vertexBuffer=i,this._mortonSettings=n}get vertexBufferType(){return this._vertexBufferType}get topologyVector(){return this._topologyVector}get vertexOffsets(){return this._vertexOffsets}get vertexBuffer(){return this._vertexBuffer}getSimpleEncodedVertex(t){let e=this.vertexOffsets?this.vertexOffsets[t]*2:t*2;return[this.vertexBuffer[e],this.vertexBuffer[e+1]]}getVertex(t){if(this.vertexOffsets&&this.mortonSettings){let r=this.vertexOffsets[t],i=this.vertexBuffer[r],n=_u(i,this.mortonSettings.numBits,this.mortonSettings.coordinateShift);return[n.x,n.y]}let e=this.vertexOffsets?this.vertexOffsets[t]*2:t*2;return[this.vertexBuffer[e],this.vertexBuffer[e+1]]}getGeometries(){return a6(this)}get mortonSettings(){return this._mortonSettings}};function l6(t,e,r,i,n){return new ky(t,e,Fr.VEC_2,r,i,n)}function u6(t,e,r,i,n,a){return new ky(t,e,Fr.MORTON,r,i,n,a)}var ky=class extends Fy{constructor(t,e,r,i,n,a,s){super(r,i,n,a,s),this._numGeometries=t,this._geometryType=e}geometryType(t){return this._geometryType}get numGeometries(){return this._numGeometries}containsPolygonGeometry(){return this._geometryType===Rt.POLYGON||this._geometryType===Rt.MULTIPOLYGON}containsSingleGeometryType(){return!0}};function Ty(t,e,r,i){return new Iy(Fr.VEC_2,t,e,r,i)}function h6(t,e,r,i,n){return new Iy(Fr.MORTON,t,e,r,i,n)}var Iy=class extends Fy{constructor(t,e,r,i,n,a){super(t,r,i,n,a),this._geometryTypes=e}geometryType(t){return this._geometryTypes[t]}get numGeometries(){return this._geometryTypes.length}containsPolygonGeometry(){for(let t=0;t<this.numGeometries;t++)if(this.geometryType(t)===Rt.POLYGON||this.geometryType(t)===Rt.MULTIPOLYGON)return!0;return!1}containsSingleGeometryType(){return!1}},Cy=class{constructor(t,e,r,i){this._triangleOffsets=t,this._indexBuffer=e,this._vertexBuffer=r,this._topologyVector=i}get triangleOffsets(){return this._triangleOffsets}get indexBuffer(){return this._indexBuffer}get vertexBuffer(){return this._vertexBuffer}get topologyVector(){return this._topologyVector}getGeometries(){if(!this._topologyVector)throw Error("Cannot convert GpuVector to coordinates without topology information");let t=new Uint32Array(this.numGeometries);for(let e=0;e<this.numGeometries;e++)t[e]=this.geometryType(e);return Ty(t,this._topologyVector,void 0,this._vertexBuffer).getGeometries()}[Symbol.iterator](){return null}};function Yc(t,e,r,i,n,a){return new c6(t,e,r,i,n,a)}var c6=class extends Cy{constructor(t,e,r,i,n,a){super(r,i,n,a),this._numGeometries=t,this._geometryType=e}geometryType(t){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}};function Wc(t,e,r,i,n){return new p6(t,e,r,i,n)}var p6=class extends Cy{constructor(t,e,r,i,n){super(e,r,i,n),this._geometryTypes=t}geometryType(t){return this._geometryTypes[t]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}};function f6(t,e,r,i,n){let a=ct(t,r),s=es(a,i,t,r),o,l,u,h;if(s===ht.CONST){let v=wu(t,r,a),b,D,A,_;for(let S=0;S<e-1;S++){let k=ct(t,r);switch(k.physicalStreamType){case St.LENGTH:switch(k.logicalStreamType.lengthType){case Ct.GEOMETRIES:b=Ze(t,r,k);break;case Ct.PARTS:D=Ze(t,r,k);break;case Ct.RINGS:A=Ze(t,r,k);break;case Ct.TRIANGLES:_=Ze(t,r,k)}break;case St.OFFSET:switch(k.logicalStreamType.offsetType){case Me.VERTEX:o=Vt(t,r,k);break;case Me.INDEX:h=Vt(t,r,k)}break;case St.DATA:if(jt.VERTEX===k.logicalStreamType.dictionaryType)l=Ta(t,r,k,n);else{let z=k;u={numBits:z.numBits,coordinateShift:z.coordinateShift},l=Vt(t,r,k,n)}}}return h?b!==void 0||D!==void 0?Yc(i,v,_,h,l,{geometryOffsets:b,partOffsets:D,ringOffsets:A}):Yc(i,v,_,h,l):u===void 0?l6(i,v,{geometryOffsets:b,partOffsets:D,ringOffsets:A},o,l):u6(i,v,{geometryOffsets:b,partOffsets:D,ringOffsets:A},o,l,u)}let c=Vt(t,r,a),p,f,d,y;for(let v=0;v<e-1;v++){let b=ct(t,r);switch(b.physicalStreamType){case St.LENGTH:switch(b.logicalStreamType.lengthType){case Ct.GEOMETRIES:p=Vt(t,r,b);break;case Ct.PARTS:f=Vt(t,r,b);break;case Ct.RINGS:d=Vt(t,r,b);break;case Ct.TRIANGLES:y=Ze(t,r,b)}break;case St.OFFSET:switch(b.logicalStreamType.offsetType){case Me.VERTEX:o=Vt(t,r,b);break;case Me.INDEX:h=Vt(t,r,b)}break;case St.DATA:if(jt.VERTEX===b.logicalStreamType.dictionaryType)l=Ta(t,r,b,n);else{let D=b;u={numBits:D.numBits,coordinateShift:D.coordinateShift},l=Vt(t,r,b,n)}}}let m,g,x;return p?(m=Hs(c,p,2),f&&d?(g=Zc(c,m,f,!1),x=y6(c,m,g,d)):f&&(g=d6(c,m,f))):f&&d?(g=Hs(c,f,1),x=Zc(c,g,d,!0)):f&&(g=Hs(c,f,0)),h&&!g?Wc(c,y,h,l):h?Wc(c,y,h,l,{geometryOffsets:m,partOffsets:g,ringOffsets:x}):u===void 0?Ty(c,{geometryOffsets:m,partOffsets:g,ringOffsets:x},o,l):h6(c,{geometryOffsets:m,partOffsets:g,ringOffsets:x},o,l,u)}function Hs(t,e,r){let i=new Uint32Array(t.length+1),n=0;i[0]=n;let a=0;for(let s=0;s<t.length;s++)n=i[s+1]=n+(t[s]>r?e[a++]:1);return i}function Zc(t,e,r,i){let n=new Uint32Array(e[e.length-1]+1),a=0;n[0]=a;let s=1,o=0;for(let l=0;l<t.length;l++){let u=t[l],h=e[l+1]-e[l];if(u===5||u===2||i&&(u===4||u===1))for(let c=0;c<h;c++)a=n[s++]=a+r[o++];else for(let c=0;c<h;c++)n[s++]=++a}return n}function d6(t,e,r){let i=new Uint32Array(e[e.length-1]+1),n=0;i[0]=n;let a=1,s=0;for(let o=0;o<t.length;o++){let l=t[o],u=e[o+1]-e[o];if(l===4||l===1)for(let h=0;h<u;h++)n=i[a++]=n+r[s++];else for(let h=0;h<u;h++)i[a++]=++n}return i}function y6(t,e,r,i){let n=new Uint32Array(r[r.length-1]+1),a=0;n[0]=a;let s=1,o=1,l=0;for(let u=0;u<t.length;u++){let h=t[u],c=e[u+1]-e[u];if(h!==0&&h!==3)for(let p=0;p<c;p++){let f=r[s]-r[s-1];s++;for(let d=0;d<f;d++)a=n[o++]=a+i[l++]}else for(let p=0;p<c;p++)n[o++]=++a,s++}return n}var m6=class extends Sr{constructor(t,e,r){super(t,e.getBuffer(),r),this.dataVector=e}getValueFromBuffer(t){return this.dataVector.get(t)}},g6=class extends ts{getValueFromBuffer(t){return this.dataBuffer[t]}},My=class extends Sr{constructor(t,e,r,i){super(t,i?BigInt64Array.of(e):BigUint64Array.of(e),r)}getValueFromBuffer(t){return this.dataBuffer[0]}},Au=class extends Sr{constructor(t,e,r,i){super(t,r,i),this.offsetBuffer=e}},Hc=class extends Au{constructor(t,e,r,i){super(t,e,r,i!=null?i:e.length-1)}getValueFromBuffer(t){let e=this.offsetBuffer[t],r=this.offsetBuffer[t+1];return bu(this.dataBuffer,e,r)}},Qr=class extends Au{constructor(t,e,r,i,n){super(t,r,i,n!=null?n:e.length),this.indexBuffer=e,this.indexBuffer=e}getValueFromBuffer(t){let e=this.indexBuffer[t],r=this.offsetBuffer[e],i=this.offsetBuffer[e+1];return bu(this.dataBuffer,r,i)}};function x6(t,e){let r=0;for(let i=0;i<e.length;i++){let n=e[i];n===255?(r++,i++):r+=t[n]}return r}function v6(t,e,r){let i=new Uint32Array(e.length);for(let s=1;s<e.length;s++)i[s]=i[s-1]+e[s-1];let n=new Uint8Array(x6(e,r)),a=0;for(let s=0;s<r.length;s++){let o=r[s];if(o===255)s++,n[a++]=r[s];else{let l=e[o],u=i[o];for(;l-- >0;)n[a++]=t[u++]}}return n}var By=class extends Au{constructor(t,e,r,i,n,a,s,o){super(t,r,i,s!=null?s:e.length),this.indexBuffer=e,this.symbolOffsetBuffer=n,this.symbolTableBuffer=a,this.sharedDictionaryCache=o}getValueFromBuffer(t){var n,a,s;(s=this.decodedDictionary)!=null||(this.decodedDictionary=(n=this.sharedDictionaryCache)==null?void 0:n.decodedDictionary,(a=this.decodedDictionary)!=null||(this.decodedDictionary=this.decodeDictionary(),this.sharedDictionaryCache&&(this.sharedDictionaryCache.decodedDictionary=this.decodedDictionary)));let e=this.indexBuffer[t],r=this.offsetBuffer[e],i=this.offsetBuffer[e+1];return bu(this.decodedDictionary,r,i)}decodeDictionary(){var t;return(t=this.symbolLengthBuffer)!=null||(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),v6(this.symbolTableBuffer,this.symbolLengthBuffer,this.dataBuffer)}offsetToLengthBuffer(t){let e=new Uint32Array(t.length-1),r=t[0];for(let i=1;i<t.length;i++){let n=t[i];e[i-1]=n-r,r=n}return e}};function Py(t,e,r,i,n){var f,d;let a,s,o,l,u,h=n,c,p;for(let y=0;y<i;y++){let m=ct(e,r);switch(m.physicalStreamType){case St.PRESENT:{let g=new fe(ci(e,m.numValues,m.byteLength,r),m.numValues);h=n!=null?n:g;break}case St.OFFSET:s=Vt(e,r,m,void 0,h);break;case St.LENGTH:{let g=Ze(e,r,m);Ct.DICTIONARY===m.logicalStreamType.lengthType?a=g:Ct.SYMBOL===m.logicalStreamType.lengthType?l=g:c=g;break}case St.DATA:{let g=e.subarray(r.get(),r.get()+m.byteLength);r.add(m.byteLength);let x=m.logicalStreamType.dictionaryType;jt.FSST===x?u=g:jt.SINGLE===x||jt.SHARED===x?o=g:jt.NONE===x&&(p=g);break}}}return(d=(f=b6(t,u,s,a,o,l,h))!=null?f:w6(t,o,s,a,h))!=null?d:D6(t,c,p,s,h)}function b6(t,e,r,i,n,a,s){if(e){if(!r||!i||!n||!a)throw Error(`Incomplete FSST dictionary string column "${t}"`);return new By(t,r,i,n,a,e,s)}}function w6(t,e,r,i,n){if(e){if(!r||!i)throw Error(`Incomplete dictionary string column "${t}"`);return n?new Qr(t,r,i,e,n):new Qr(t,r,i,e)}}function D6(t,e,r,i,n){if(e&&r){if(i)return n?new Qr(t,i,e,r,n):new Qr(t,i,e,r);if(n&&n.size()!==e.length-1){let a=new Uint32Array(n.size()),s=0;for(let o=0;o<n.size();o++)n.get(o)?a[o]=s++:a[o]=0;return new Qr(t,a,e,r,n)}return n?new Hc(t,e,r,n):new Hc(t,e,r)}}function _6(t,e,r,i){let n,a,s,o,l=!1;for(;!l;){let f=ct(t,e);switch(f.physicalStreamType){case St.LENGTH:Ct.DICTIONARY===f.logicalStreamType.lengthType?n=Ze(t,e,f):s=Ze(t,e,f);break;case St.DATA:jt.SINGLE===f.logicalStreamType.dictionaryType||jt.SHARED===f.logicalStreamType.dictionaryType?(a=t.subarray(e.get(),e.get()+f.byteLength),l=!0):o=t.subarray(e.get(),e.get()+f.byteLength),e.add(f.byteLength)}}if(r.type!=="complexType")throw Error(`Shared dictionary column ${r.name} must be a complex (struct) column.`);if(!n||!a)throw Error(`Incomplete shared dictionary for column "${r.name}"`);let u=r.complexType.children,h=[],c=o?{}:void 0,p=0;for(let f of u){let d=$t(t,e,1)[0];if(d===0)continue;let y=f.name?`${r.name}${f.name}`:r.name;if(i&&!i.has(y)){my(d,t,e);continue}if(f.type!=="scalarField"||f.scalarField.physicalType!==it.STRING)throw Error("Currently only scalar string fields are implemented for a struct.");if(d>1&&!f.nullable||d===1&&f.nullable)throw Error(`The number of streams for the child field ${f.name} does not match its nullability. nullibilty: ${f.nullable}, numStreams: ${d}`);let m;if(f.nullable){let x=ct(t,e);m=new fe(ci(t,x.numValues,x.byteLength,e),x.numValues)}let g=Vt(t,e,ct(t,e),void 0,m);if(o){if(!s)throw Error(`Incomplete shared FSST dictionary for column "${y}"`);h[p++]=new By(y,g,n,a,s,o,m,c)}else h[p++]=new Qr(y,g,n,a,m)}return h}var Kc=class extends Sr{constructor(t,e,r){super(t,new Uint8Array,r!=null?r:e.length),this.values=e}getValueFromBuffer(t){return this.values[t]}},Be;(function(t){t[t.STRING=1]="STRING",t[t.INT32=2]="INT32",t[t.UINT32=4]="UINT32",t[t.INT64=8]="INT64",t[t.UINT64=16]="UINT64",t[t.FLOAT=32]="FLOAT",t[t.DOUBLE=64]="DOUBLE",t[t.PRESENCE=128]="PRESENCE"})(Be||(Be={}));var pr;(function(t){t[t.FALSE=0]="FALSE",t[t.TRUE=1]="TRUE",t[t.START_MAP=2]="START_MAP",t[t.START_LIST=3]="START_LIST",t[t.COUNT=4]="COUNT"})(pr||(pr={}));function A6(t,e,r,i){let n=S6(r);if(i===0)return n.map(h=>new Kc(h,[]));let a=E6(t,e,i),s=(a.presentStream?a.presentCount:a.lengthStream.length)/n.length,o=[],l=0,u=0;for(let h=0;h<n.length;h++){let c=C6(a,h,s,l,u);o.push(new Kc(n[h],c.value,c.nullabilityBuffer)),l=c.countsEnd,u=c.valuesEnd}return o}function S6(t){let e=t.type==="complexType"?t.complexType.children:void 0;return!e||e.length===0?[t.name]:e.map(r=>{var i;return t.name+((i=r.name)!=null?i:"")})}function E6(t,e,r){let i=t[e.get()];e.add(1);let n=Vt(t,e,ct(t,e)),a=r-1,s=[];i&Be.STRING&&(a-=F6(t,e,s)),a-=k6(t,e,i,s),a-=T6(t,e,i,s);let o,l=0;if(i&Be.PRESENCE){let h=I6(t,e);o=h.value,l=h.count,a--}let u=new Uint32Array;if(a>0&&(u=Vt(t,e,ct(t,e)),a--),a!==0)throw Error(`Unexpected number of remaining streams while decoding map column: ${a}`);return{lengthStream:n,dictionary:s,presentStream:o,presentCount:l,flattenedValues:u}}function F6(t,e,r){let i=t[e.get()];e.add(1);let n=Py("",t,e,i);if(n)for(let a=0;a<n.size;a++)r.push(n.getValue(a));return i}function k6(t,e,r,i){let n=0;return r&Be.INT32?(Xr(i,Ta(t,e,ct(t,e))),n++):r&Be.INT64&&(Xr(i,wy(t,e,ct(t,e))),n++),r&Be.UINT32?(Xr(i,Vt(t,e,ct(t,e))),n++):r&Be.UINT64&&(Xr(i,Du(t,e,ct(t,e))),n++),n}function T6(t,e,r,i){let n=0;return r&Be.FLOAT&&(Xr(i,gy(t,e,ct(t,e).numValues)),n++),r&Be.DOUBLE&&(Xr(i,xy(t,e,ct(t,e).numValues)),n++),n}function I6(t,e){let r=ct(t,e);if(r.physicalStreamType!==St.PRESENT)throw Error(`Expected PRESENT stream for map column but found: ${r.physicalStreamType}`);let i=r.numValues,n=e.get(),a=new fe(ci(t,i,r.byteLength,e),i);return e.set(n+r.byteLength),{value:a,count:i}}function C6(t,e,r,i,n){let{lengthStream:a,flattenedValues:s,presentStream:o,dictionary:l}=t,u=e*r,h=r,c;if(o){c=new fe(new Uint8Array(Math.ceil(r/8)),r),h=0;for(let x=0;x<r;x++)o.get(u+x)&&(c.set(x,!0),h++)}let p=i+h;if(p>a.length)throw Error("Merged map counts underflow while decoding child streams");let f=Array(r),d=i,y=n;for(let x=0;x<r;x++){if(o&&!o.get(u+x)){f[x]=null;continue}let v=y+a[d++];if(v>s.length)throw Error("Map value stream underflow while decoding feature payload");let b=M6(s,y,v,l);f[x]=b.value,y=b.nextIndex}let m=0;for(let x=i;x<p;x++)m+=a[x];let g=n+m;if(y!==g)throw Error("Unused flattened map values remain after decode");return{value:f,nullabilityBuffer:c,countsEnd:p,valuesEnd:g}}function M6(t,e,r,i){return r-e===1||t[e]===pr.START_LIST?Su(t,e,r,i):zy(t,e,r,i)}function zy(t,e,r,i){let n=Object.create(null),a=e;for(;a<r;){let s=Ly(t[a++],i);if(typeof s!="string")throw Error(`Map key dictionary index does not resolve to a string: ${s}`);let o=Su(t,a,r,i);n[s]=o.value,a=o.nextIndex}return{value:n,nextIndex:a}}function Su(t,e,r,i){if(e>=r)throw Error("Unexpected end of map value stream");let n=t[e];if(n===pr.FALSE)return{value:!1,nextIndex:e+1};if(n===pr.TRUE)return{value:!0,nextIndex:e+1};if(n===pr.START_MAP){let a=Jc(t,e,r);return{value:zy(t,e+2,a,i).value,nextIndex:a}}if(n===pr.START_LIST){let a=Jc(t,e,r),s=[],o=e+2;for(;o<a;){let l=Su(t,o,a,i);s.push(l.value),o=l.nextIndex}return{value:s,nextIndex:a}}return{value:Ly(n,i),nextIndex:e+1}}function Jc(t,e,r){if(e+1>=r)throw Error("Missing length for nested map/list payload");let i=t[e+1];if(i<2)throw Error(`Invalid nested payload length: ${i}`);let n=e+i;if(n>r)throw Error("Nested payload exceeds containing payload bounds");return n}function Ly(t,e){let r=t-pr.COUNT;if(r<0||r>=e.length)throw Error(`Scalar dictionary index out of range: ${t}`);return e[r]}function Xr(t,e){for(let r of e)t.push(r)}function B6(t,e,r,i,n,a){var s;return r.type==="scalarType"?a&&!a.has(r.name)?(my(i,t,e),null):P6(i,t,e,n,r.scalarType,r):((s=r.complexType)==null?void 0:s.physicalType)===Qe.MAP?A6(t,e,r,i):i===0?null:_6(t,e,r,a)}function P6(t,e,r,i,n,a){var l;let s;if(t===0)return null;if(a.nullable){let u=ct(e,r),h=u.numValues,c=r.get(),p=ci(e,h,u.byteLength,r);r.set(c+u.byteLength),s=new fe(p,u.numValues)}let o=s!=null?s:i;switch(n.physicalType){case it.UINT_32:case it.INT_32:return R6(e,r,a,n,o);case it.STRING:{let u=a.nullable?t-1:t;return(l=Py(a.name,e,r,u,s))!=null?l:null}case it.BOOLEAN:return z6(e,r,a,i,o);case it.UINT_64:case it.INT_64:return O6(e,r,a,o,n);case it.FLOAT:return L6(e,r,a,o);case it.DOUBLE:return V6(e,r,a,o);default:throw Error(`The specified data type for the field is currently not supported: ${n}`)}}function z6(t,e,r,i,n){let a=ct(t,e),s=a.numValues,o=e.get(),l=An(n)?n:void 0,u=ci(t,s,a.byteLength,e,l);e.set(o+a.byteLength);let h=new fe(u,s);return new m6(r.name,h,n)}function L6(t,e,r,i){let n=ct(t,e),a=An(i)?i:void 0,s=gy(t,e,n.numValues,a);return new g6(r.name,s,i)}function V6(t,e,r,i){let n=ct(t,e),a=An(i)?i:void 0,s=xy(t,e,n.numValues,a);return new fu(r.name,s,i)}function O6(t,e,r,i,n){let a=ct(t,e),s=es(a,i,t,e,"int64"),o=n.physicalType===it.INT_64;if(s===ht.FLAT){let u=An(i)?i:void 0,h=o?wy(t,e,a,u):Du(t,e,a,u);return new Sy(r.name,h,i)}if(s===ht.SEQUENCE){let u=by(t,e,a);return new Ey(r.name,u[0],u[1],a.numRleValues,o)}let l=o?K3(t,e,a):Dy(t,e,a);return new My(r.name,l,i,o)}function R6(t,e,r,i,n){let a=ct(t,e),s=es(a,n,t,e),o=i.physicalType===it.INT_32;if(s===ht.FLAT){let u=An(n)?n:void 0,h=o?Ta(t,e,a,void 0,u):Vt(t,e,a,void 0,u);return new pu(r.name,h,n)}if(s===ht.SEQUENCE){let u=vy(t,e,a);return new du(r.name,u[0],u[1],a.numRleValues,o)}let l=o?W3(t,e,a):wu(t,e,a);return new yu(r.name,l,n,o)}function An(t){return t instanceof fe}var It={ID:0,ID_NULLABLE:1,ID_LONG:2,GEOMETRY:4,SCALAR_BASE:10,STRUCT:30,MAP:31};function Vy(t){switch(t){case It.ID:case It.ID|It.ID_NULLABLE:case It.ID|It.ID_LONG:case It.ID|It.ID_LONG|It.ID_NULLABLE:return{nullable:(t&It.ID_NULLABLE)!==0,columnScope:qi.FEATURE,type:"scalarType",scalarType:{longID:(t&It.ID_LONG)!==0,type:"logicalType",logicalType:hy.ID}};case It.GEOMETRY:return{nullable:!1,columnScope:qi.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:Qe.GEOMETRY,children:[]}};case It.STRUCT:return{nullable:!1,columnScope:qi.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:Qe.STRUCT,children:[]}};case It.MAP:return{nullable:!0,columnScope:qi.FEATURE,type:"complexType",complexType:{type:"physicalType",physicalType:Qe.MAP,children:[]}};default:return j6(t)}}function $6(t){return t>=It.SCALAR_BASE}function Oy(t){return t===It.STRUCT||t===It.MAP}function N6(t){if(t.type==="scalarType"){let e=t.scalarType;if(e.type==="physicalType")switch(e.physicalType){case it.BOOLEAN:case it.INT_8:case it.UINT_8:case it.INT_32:case it.UINT_32:case it.INT_64:case it.UINT_64:case it.FLOAT:case it.DOUBLE:return!1;case it.STRING:return!0;default:return!1}if(e.type==="logicalType")return!1}else if(t.type==="complexType"){let e=t.complexType;if(e.type==="physicalType")switch(e.physicalType){case Qe.GEOMETRY:case Qe.STRUCT:case Qe.MAP:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",t),!1}function U6(t){var e;return t.type==="scalarType"&&((e=t.scalarType)==null?void 0:e.type)==="logicalType"&&t.scalarType.logicalType===hy.ID}function q6(t){var e;return t.type==="complexType"&&((e=t.complexType)==null?void 0:e.type)==="physicalType"&&t.complexType.physicalType===Qe.GEOMETRY}function j6(t){let e;switch(t){case 10:case 11:e=it.BOOLEAN;break;case 12:case 13:e=it.INT_8;break;case 14:case 15:e=it.UINT_8;break;case 16:case 17:e=it.INT_32;break;case 18:case 19:e=it.UINT_32;break;case 20:case 21:e=it.INT_64;break;case 22:case 23:e=it.UINT_64;break;case 24:case 25:e=it.FLOAT;break;case 26:case 27:e=it.DOUBLE;break;case 28:case 29:e=it.STRING;break;default:return null}return{nullable:!!(t&1),columnScope:qi.FEATURE,type:"scalarType",scalarType:{longID:!1,type:"physicalType",physicalType:e}}}var G6=new TextDecoder,Qc="0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT), 31(MAP)";function Eu(t,e){let r=$t(t,e,1)[0];if(r===0)return"";let i=e.get(),n=i+r,a=t.subarray(i,n);return e.add(r),G6.decode(a)}function X6(t){let e=t.name,r=t.nullable;return t.type==="scalarType"?{type:"scalarField",scalarField:t.scalarType,name:e,nullable:r}:{type:"complexField",complexField:t.complexType,name:e,nullable:r}}function Ry(t,e){let r=$t(t,e,1)[0]>>>0,i=r>=It.SCALAR_BASE?Vy(r):null;if(!i)throw Error(`Unsupported field type code ${r}. Supported: 10-29(scalars), 30(STRUCT), 31(MAP)`);let n=Si(je({},i),{name:Eu(t,e)});if(n.type==="complexType"&&Oy(r)){let a=n.complexType,s=$t(t,e,1)[0]>>>0;a.children=Array(s);for(let o=0;o<s;o++)a.children[o]=Ry(t,e)}return X6(n)}function Y6(t,e){let r=$t(t,e,1)[0]>>>0,i=Vy(r);if(!i)throw Error(`Unsupported column type code ${r}. Supported: ${Qc}`);let n;if($6(r))n=Eu(t,e);else if(r<It.GEOMETRY)n="id";else if(r===It.GEOMETRY)n="geometry";else throw Error(`Unsupported column type code ${r}. Supported: ${Qc}`);let a=Si(je({},i),{name:n});if(a.type==="complexType"&&Oy(r)){let s=$t(t,e,1)[0]>>>0,o=a.complexType;o.children=Array(s);for(let l=0;l<s;l++)o.children[l]=Ry(t,e)}return a}function W6(t,e){let r={};r.featureTables=[];let i={};if(i.name=Eu(t,e),i.name.length===0)throw Error("Missing layer name");let n=$t(t,e,1)[0]>>>0,a=$t(t,e,1)[0]>>>0;i.columns=Array(a);for(let s=0;s<a;s++)i.columns[s]=Y6(t,e);return r.featureTables.push(i),[r,n]}function Z6(t,e,r=!0){let i=new cy(0),n=[];for(;i.get()<t.length;){let a=$t(t,i,1)[0]>>>0,s=i.get()+a;if(s>t.length)throw Error(`Block overruns tile: ${s} > ${t.length}`);let o=$t(t,i,1)[0]>>>0;if(o!==1&&o!==2){i.set(s);continue}let[l,u]=W6(t,i),h=l.featureTables[0],c=null,p=null,f=[],d=0;for(let m of h.columns){let g=m.name;if(U6(m)){let x=null;if(m.nullable){let b=ct(t,i),D=i.get(),A=ci(t,b.numValues,b.byteLength,i);i.set(D+b.byteLength),x=new fe(A,b.numValues)}let v=ct(t,i);d=x?x.size():v.decompressedCount,c=H6(t,m,i,g,v,x!=null?x:d,r)}else if(q6(m)){let x=$t(t,i,1)[0];if(d===0){let v=i.get();d=ct(t,i).decompressedCount,i.set(v)}e&&(e.scale=e.extent/u),p=f6(t,x,i,d,e)}else{let x=N6(m)?$t(t,i,1)[0]:1;if(x===0)continue;let v=B6(t,i,m,x,d,void 0);if(v)if(Array.isArray(v))for(let b of v)f.push(b);else f.push(v)}}let y=new xw(h.name,p,c,f,u);n.push(y),i.set(s)}return n}function H6(t,e,r,i,n,a,s=!1){var h;let o=(h=e.scalarType)!=null&&h.longID?it.UINT_64:it.UINT_32,l=typeof a=="number"?void 0:a,u=es(n,a,t,r,o===it.UINT_64?"int64":"int32");if(o===it.UINT_32)switch(u){case ht.FLAT:return new pu(i,Vt(t,r,n,void 0,l),a);case ht.SEQUENCE:{let c=vy(t,r,n);return new du(i,c[0],c[1],n.numRleValues,!1)}case ht.CONST:return new yu(i,wu(t,r,n),a,!1)}switch(u){case ht.FLAT:return s?new fu(i,Z3(t,r,n,l),a):new Sy(i,Du(t,r,n,l),a);case ht.SEQUENCE:{let c=by(t,r,n);return new Ey(i,c[0],c[1],n.numRleValues,!1)}case ht.CONST:return new My(i,Dy(t,r,n),a,!1)}throw Error("Vector type not supported for id column.")}var K6=class{constructor(t,e){var r;switch(this._featureData=t,this.properties=this._featureData.properties||{},(r=this._featureData.geometry)==null?void 0:r.type){case Rt.POINT:case Rt.MULTIPOINT:this.type=1;break;case Rt.LINESTRING:case Rt.MULTILINESTRING:this.type=2;break;case Rt.POLYGON:case Rt.MULTIPOLYGON:this.type=3;break;default:this.type=0}this.extent=e,this.id=Number(this._featureData.id)}loadGeometry(){let t=[];for(let e of this._featureData.geometry.coordinates){let r=[];for(let i of e)r.push(new B(i.x,i.y));t.push(r)}return t}},J6=class{constructor(t){this.features=[],this.featureTable=t,this.name=t.name,this.extent=t.extent,this.version=2,this.features=t.getFeatures(),this.length=this.features.length}feature(t){return new K6(this.features[t],this.extent)}},Fu=class{constructor(t){this.layers={};let e=Z6(new Uint8Array(t));this.layers=e.reduce((r,i)=>Si(je({},r),{[i.name]:new J6(i)}),{})}},ku=class{constructor(t,e){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new uo(mt,16,0),this.grid3D=new uo(mt,16,0),this.featureIndexArray=new Yf,this.promoteId=e}insert(t,e,r,i,n,a){let s=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,i,n);let o=a?this.grid3D:this.grid;for(let l of e){let u=[1/0,1/0,-1/0,-1/0];for(let h of l)u[0]=Math.min(u[0],h.x),u[1]=Math.min(u[1],h.y),u[2]=Math.max(u[2],h.x),u[3]=Math.max(u[3],h.y);u[0]<8192&&u[1]<8192&&u[2]>=0&&u[3]>=0&&o.insert(s,u[0],u[1],u[2],u[3])}}loadVTLayers(){return this.vtLayers||(this.encoding==="mlt"?this.vtLayers=new Fu(this.rawTileData).layers:this.vtLayers=new Xl(new au(this.rawTileData)).layers,this.sourceLayerCoder=new cu(this.vtLayers?Object.keys(this.vtLayers).sort():[ll])),this.vtLayers}query(t,e,r,i){this.loadVTLayers();let n=t.params,a=mt/t.tileSize/t.scale,s=ai(n.filter,"queryRenderedFeatures filter",n.globalState),o=t.queryGeometry,l=t.queryPadding*a,u=Fa.fromPoints(o),h=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l),c=Fa.fromPoints(t.cameraQueryGeometry).expandBy(l),p=this.grid3D.query(c.minX,c.minY,c.maxX,c.maxY,(y,m,g,x)=>vg(t.cameraQueryGeometry,y-l,m-l,g+l,x+l));for(let y of p)h.push(y);h.sort(t5);let f={},d;for(let y of h){if(y===d)continue;d=y;let m=this.featureIndexArray.get(y),g=null;this.loadMatchingFeature(f,m.bucketIndex,m.sourceLayerIndex,m.featureIndex,s,n.layers,n.availableImages,e,r,i,(x,v,b)=>(g||(g=Ar(x)),v.queryIntersectsFeature({queryGeometry:o,feature:x,featureState:b,geometry:g,zoom:this.z,transform:t.transform,pixelsToTileUnits:a,pixelPosMatrix:t.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:t.getElevation})))}return f}loadMatchingFeature(t,e,r,i,n,a,s,o,l,u,h){let c=this.bucketLayerIDs[e];if(a&&!c.some(y=>a.has(y)))return;let p=this.sourceLayerCoder.decode(r),f=this.vtLayers[p].feature(i);if(n.needGeometry){let y=hi(f,!0);if(!n.filter(new st(this.tileID.overscaledZ),y,this.tileID.canonical))return}else if(!n.filter(new st(this.tileID.overscaledZ),f))return;let d=this.getId(f,p);for(let y of c){if(a&&!a.has(y))continue;let m=o[y];if(!m)continue;let g={};d&&u&&(g=u.getState(m.sourceLayer||"_geojsonTileLayer",d));let x=Gt({},l[y]);x.paint=tp(x.paint,m.paint,f,g,s),x.layout=tp(x.layout,m.layout,f,g,s);let v=!h||h(f,m,g);if(!v)continue;let b=new gw(f,this.z,this.x,this.y,d);b.layer=x;let D=t[y];D===void 0&&(D=t[y]=[]),D.push({featureIndex:i,feature:b,intersectionZ:v})}}lookupSymbolFeatures(t,e,r,i,n,a,s,o){let l={};this.loadVTLayers();let u=ai(n.filterSpec,"queryRenderedFeatures symbol filter",n.globalState);for(let h of t)this.loadMatchingFeature(l,r,i,h,u,a,s,o,e);return l}hasLayer(t){for(let e of this.bucketLayerIDs)for(let r of e)if(t===r)return!0;return!1}getId(t,e){var i;let r=t.id;if(this.promoteId){let n=typeof this.promoteId=="string"?this.promoteId:this.promoteId[e];r=t.properties[n],typeof r=="boolean"&&(r=Number(r)),r===void 0&&((i=t.properties)!=null&&i.cluster)&&this.promoteId&&(r=Number(t.properties.cluster_id))}return r}};C("FeatureIndex",ku,{omit:["rawTileData","sourceLayerCoder"]});function Q6(t){return typeof t=="object"&&!!t&&"evaluate"in t}function tp(t,e,r,i,n){return Ia(t,(a,s)=>{let o=e instanceof Ya?e.get(s):null;return Q6(o)?o.evaluate(r,i,void 0,n):o})}function t5(t,e){return e-t}var $y=class{constructor(t){this.maxEntries=t,this.map=new Map}get(t){let e=this.map.get(t);return e!==void 0&&(this.map.delete(t),this.map.set(t,e)),e}set(t,e){if(this.map.has(t))this.map.delete(t);else if(this.map.size>=this.maxEntries){let r=this.map.keys().next().value;this.map.delete(r)}this.map.set(t,e)}clear(){this.map.clear()}};function Tu(t){let e=typeof t;if(e==="number"||e==="boolean"||e==="string"||t==null)return JSON.stringify(t);if(Array.isArray(t)){let n="[";for(let a of t)n+=`${Tu(a)},`;return`${n}]`}let r=Object.keys(t).sort(),i="{";for(let n=0;n<r.length;n++)i+=`${JSON.stringify(r[n])}:${Tu(t[r[n]])},`;return`${i}}`}function e5(t){let e="";for(let r of fp)e+=`/${Tu(t[r])}`;return e}function r5(t,e){let r={};for(let n=0;n<t.length;n++){let a=e&&e[t[n].id]||e5(t[n]);e&&(e[t[n].id]=a);let s=r[a];s||(s=r[a]=[]),s.push(t[n])}let i=[];for(let n in r)i.push(r[n]);return i}var i5=class{constructor(t,e){this.keyCache={},t&&this.replace(t,e)}replace(t,e){this._layerConfigs={},this._layers={},this.update(t,[],e)}update(t,e,r){for(let n of t){this._layerConfigs[n.id]=n;let a=this._layers[n.id]=ay(n,r);a._featureFilter=ai(a.filter,`layers[${n.id}].filter`,r),this.keyCache[n.id]&&delete this.keyCache[n.id]}for(let n of e)delete this.keyCache[n],delete this._layerConfigs[n],delete this._layers[n];this.familiesBySource={};let i=r5(Object.values(this._layerConfigs),this.keyCache);for(let n of i){let a=n.map(c=>this._layers[c.id]),s=a[0];if(s.isHidden())continue;let o=s.source||"",l=this.familiesBySource[o];l||(l=this.familiesBySource[o]={});let u=s.sourceLayer||"_geojsonTileLayer",h=l[u];h||(h=l[u]=[]),h.push(a)}}},qy=class{constructor(t){let e={},r=[];for(let s in t){let o=t[s],l=e[s]={};for(let u in o){let h=o[u];if(!h||h.bitmap.width===0||h.bitmap.height===0)continue;let c={x:0,y:0,w:h.bitmap.width+2,h:h.bitmap.height+2};r.push(c),l[u]={rect:c,metrics:h.metrics}}}let{w:i,h:n}=su(r),a=new Ja({width:i||1,height:n||1});for(let s in t){let o=t[s];for(let l in o){let u=o[l];if(!u||u.bitmap.width===0||u.bitmap.height===0)continue;let h=e[s][l].rect;Ja.copy(u.bitmap,a,{x:0,y:0},{x:h.x+1,y:h.y+1},u.bitmap)}}this.image=a,this.positions=e}};C("GlyphAtlas",qy);var jy=class{constructor(t){this.tileID=new uu(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.returnDependencies=!!t.returnDependencies,this.promoteId=t.promoteId,this.inFlightDependencies=[]}parse(t,e,r,i,n){return rt(this,null,function*(){this.data=t,this.collisionBoxArray=new Ll;let a=new cu(Object.keys(t.layers).sort()),s=new ku(this.tileID,this.promoteId);s.bucketLayerIDs=[];let o={},l={featureIndex:s,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:r,subdivisionGranularity:n},u=e.familiesBySource[this.source];for(let S in u){let k=t.layers[S];if(!k)continue;k.version===1&&Bt(`Vector tile source "${this.source}" layer "${S}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let z=a.encode(S),O=[];for(let P=0;P<k.length;P++){let L=k.feature(P),F=s.getId(L,S);O.push({feature:L,id:F,index:P,sourceLayerIndex:z})}for(let P of u[S]){let L=P[0];L.source!==this.source&&Bt(`layer.source = ${L.source} does not equal this.source = ${this.source}`),!L.isHidden(this.zoom,!0)&&(Ny(P,this.zoom,r),(o[L.id]=L.createBucket({index:s.bucketLayerIDs.length,layers:P,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:z,sourceID:this.source})).populate(O,l,this.tileID.canonical),s.bucketLayerIDs.push(P.map(F=>F.id)))}}let h=Ia(l.glyphDependencies,S=>Object.keys(S));for(let S of this.inFlightDependencies)S==null||S.abort();this.inFlightDependencies=[];let c=Promise.resolve({});if(Object.keys(h).length){let S=new AbortController;this.inFlightDependencies.push(S),c=i.sendAsync({type:"GG",data:{stacks:h,source:this.source,tileID:this.tileID,type:"glyphs"}},S)}let p=Object.keys(l.iconDependencies),f=Promise.resolve({});if(p.length){let S=new AbortController;this.inFlightDependencies.push(S),f=i.sendAsync({type:"GI",data:{icons:p,source:this.source,tileID:this.tileID,type:"icons"}},S)}let d=Object.keys(l.patternDependencies),y=Promise.resolve({});if(d.length){let S=new AbortController;this.inFlightDependencies.push(S),y=i.sendAsync({type:"GI",data:{icons:d,source:this.source,tileID:this.tileID,type:"patterns"}},S)}let m=l.dashDependencies,g=Promise.resolve({});if(Object.keys(m).length){let S=new AbortController;this.inFlightDependencies.push(S),g=i.sendAsync({type:"GDA",data:{dashes:m}},S)}let[x,v,b,D]=yield Promise.all([c,f,y,g]),A=new qy(x),_=new ou(v,b);for(let S in o){let k=o[S];k.hasDependencies&&(Ny(k.layers,this.zoom,r),k.addFeatures({options:l,canonical:this.tileID.canonical,glyphMap:x,glyphPositions:A.positions,iconMap:v,iconPositions:_.iconPositions,patternMap:b,patternPositions:_.patternPositions,dashPositions:D,showCollisionBoxes:this.showCollisionBoxes}))}return{buckets:Object.values(o).filter(S=>!S.isEmpty()),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:A.image,imageAtlas:_,dashPositions:D,glyphMap:this.returnDependencies?x:null,iconMap:this.returnDependencies?v:null,glyphPositions:this.returnDependencies?A.positions:null}})}};function Ny(t,e,r){let i=new st(e);for(let n of t)n.recalculate(i,r)}var Gy=class{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(t,e){this.loading[t]=e}finishLoading(t){delete this.loading[t]}abort(t){let e=this.loading[t];e!=null&&e.abort&&(e.abort.abort(),delete this.loading[t])}getParsing(t){return this.parsing[t]}setParsing(t,e){this.parsing[t]=e}removeParsing(t){delete this.parsing[t]}markLoaded(t,e){this.loaded[t]=e}getLoaded(t){let e=this.loaded[t];if(e)return e}removeLoaded(t){delete this.loaded[t]}clearLoaded(){this.loaded={}}},Xy=class{constructor(t){this.start=`${t}#start`,this.end=`${t}#end`,this.measure=t,performance.mark(this.start)}finish(){performance.mark(this.end);let t=performance.getEntriesByName(this.measure);return t.length===0&&(performance.measure(this.measure,this.start,this.end),t=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),t}},n5=class{constructor(t,e,r,i,n){this.type=t,this.properties=r||{},this.extent=n,this.pointsArray=e,this.id=i}loadGeometry(){return this.pointsArray.map(t=>t.map(e=>new B(e.x,e.y)))}},a5=class{constructor(t,e,r){this.version=2,this._myFeatures=t,this.name=e,this.length=t.length,this.extent=r}feature(t){return this._myFeatures[t]}},s5=class{constructor(){this.layers={}}addLayer(t){this.layers[t.name]=t}};function o5(t,e,r){let{extent:i}=t,n=2**(r.z-e.z),a=(r.x-e.x*n)*i,s=(r.y-e.y*n)*i,o=[];for(let l=0;l<t.length;l++){let u=t.feature(l),h=u.loadGeometry();for(let c of h)for(let p of c)p.x=p.x*n-a,p.y=p.y*n-s;h=Qd(h,u.type,-128,-128,i+128,i+128),h.length!==0&&o.push(new n5(u.type,h,u.properties,u.id,i))}return new a5(o,t.name,i)}var l5=class{constructor(t,e,r){this.actor=t,this.layerIndex=e,this.availableImages=r,this.tileState=new Gy,this.overzoomedTileResultCache=new $y(1e3)}loadVectorTile(t,e){try{return{vectorTile:t.encoding==="mlt"?new Fu(e):new Xl(new au(e)),rawData:e}}catch(r){let i=new Uint8Array(e),n=i[0]===31&&i[1]===139,a=`Unable to parse the tile at ${t.request.url}, `;throw a+=n?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${Ki(r).message}`,Error(a)}}loadTile(t){return rt(this,null,function*(){let{uid:e,overzoomParameters:r}=t;r&&(t.request=r.overzoomRequest);let i=this._startRequestTiming(t),n=new jy(t);this.tileState.startLoading(e,n);let a=new AbortController;n.abort=a;try{let s=yield hp(t.request,a);if(t.etag&&t.etag===s.etag)return this.tileState.finishLoading(e),this._getEtagUnmodifiedResult(s,i);let o=this.loadVectorTile(t,s.data);if(this.tileState.finishLoading(e),!o)return null;let{vectorTile:l,rawData:u}=o;r&&({vectorTile:l,rawData:u}=this._getOverzoomTile(t,l));let h=this._getExpiryData(s),c=this._finishRequestTiming(i);n.vectorTile=l,n.etag=s.etag,this.tileState.markLoaded(e,n);let p={rawData:u,cacheControl:h,resourceTiming:c};return this.tileState.setParsing(e,p),yield this._parseWorkerTile(n,t)}catch(s){throw this.tileState.finishLoading(e),this.tileState.markLoaded(e,n),s}})}_getEtagUnmodifiedResult(t,e){let r=this._getExpiryData(t),i=this._finishRequestTiming(e);return Gt({etagUnmodified:!0},r,i)}_parseWorkerTile(t,e){return rt(this,null,function*(){let r=this.tileState.getParsing(t.uid),i=yield t.parse(t.vectorTile,this.layerIndex,this.availableImages,this.actor,e.subdivisionGranularity);if(r){let{rawData:n,cacheControl:a,resourceTiming:s}=r,o=e.overzoomParameters?"mvt":e.encoding;i=Gt({rawTileData:n.slice(0),encoding:o},i,a,s),this.tileState.removeParsing(t.uid)}else t.etag&&(i=Gt(i,{etag:t.etag}));return i})}_getExpiryData({expires:t,cacheControl:e,etag:r}){let i={};return t&&(i.expires=t),e&&(i.cacheControl=e),r&&(i.etag=r),i}_startRequestTiming(t){var e;if((e=t.request)!=null&&e.collectResourceTiming)return new Xy(t.request.url)}_finishRequestTiming(t){let e=t==null?void 0:t.finish();return e?{resourceTiming:JSON.parse(JSON.stringify(e))}:{}}_getOverzoomTile(t,e){var c;let{tileID:r,source:i,overzoomParameters:n}=t,{maxZoomTileID:a}=n,s=`${a.key}_${r.key}_${(c=t.request)==null?void 0:c.url}`,o=this.overzoomedTileResultCache.get(s);if(o)return o;let l=new s5,u=this.layerIndex.familiesBySource[i];for(let p in u){let f=e.layers[p];if(!f)continue;let d=o5(f,a,r.canonical);d.length>0&&l.addLayer(d)}let h={vectorTile:l,rawData:hu(l).buffer};return this.overzoomedTileResultCache.set(s,h),h}reloadTile(t){return rt(this,null,function*(){let e=t.uid,r=this.tileState.getLoaded(e);if(!r)throw Error("Should not be trying to reload a tile that was never loaded or has been removed");if(r.vectorTile)return r.showCollisionBoxes=t.showCollisionBoxes,yield this._parseWorkerTile(r,t)})}abortTile(t){return rt(this,null,function*(){this.tileState.abort(t.uid)})}removeTile(t){return rt(this,null,function*(){this.tileState.removeLoaded(t.uid)})}},u5=class{constructor(){this.loaded={}}loadTile(t){return rt(this,null,function*(){let{uid:e,encoding:r,rawImageData:i,redFactor:n,greenFactor:a,blueFactor:s,baseShift:o}=t,l=i.width+4,u=i.height+4,h=Ca(i)?new Zt({width:l,height:u},yield ap(i,-2,-2,l,u)):i,c=new jl(e,h,r,n,a,s,o);return this.loaded||(this.loaded={}),this.loaded[e]=c,c})}removeTile(t){let e=this.loaded,r=t.uid;e!=null&&e[r]&&delete e[r]}},h5=class{constructor(t,e,r,i=c5){this.actor=t,this.layerIndex=e,this.availableImages=r,this.tileState=new Gy,this._createGeoJSONIndex=i}loadVectorTile(t){if(!this._geoJSONIndex)throw Error("Unable to parse the data into a cluster or geojson");let{z:e,x:r,y:i}=t.tileID.canonical,n=this._geoJSONIndex.getTile(e,r,i);if(!n)return null;let a=new ly(n.features,{version:2,extent:mt});return{vectorTile:a,rawData:hu(a,np).buffer}}loadTile(t){return rt(this,null,function*(){let{uid:e}=t,r=new jy(t);r.abort=new AbortController;try{let i=this.loadVectorTile(t);if(!i)return null;let{vectorTile:n,rawData:a}=i;r.vectorTile=n,this.tileState.markLoaded(e,r);let s={rawData:a};return this.tileState.setParsing(e,s),yield this._parseWorkerTile(r,t)}catch(i){throw this.tileState.markLoaded(e,r),i}})}_parseWorkerTile(t,e){return rt(this,null,function*(){let r=this.tileState.getParsing(t.uid),i=yield t.parse(t.vectorTile,this.layerIndex,this.availableImages,this.actor,e.subdivisionGranularity);if(r){let{rawData:n}=r;i=Gt({rawTileData:n.slice(0),encoding:"mvt"},i),this.tileState.removeParsing(t.uid)}return i})}abortTile(t){return rt(this,null,function*(){this.tileState.abort(t.uid)})}removeTile(t){return rt(this,null,function*(){this.tileState.removeLoaded(t.uid)})}loadData(t){return rt(this,null,function*(){var r;(r=this._pendingRequest)==null||r.abort();let e=this._startRequestTiming(t);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(t,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let i={};return t.request&&(i.data=t.data),this._finishRequestTiming(e,t,i),i}catch(i){if(delete this._pendingRequest,!yl(i))throw i;return{abandoned:!0}}})}_startRequestTiming(t){var e;if((e=t.request)!=null&&e.collectResourceTiming)return new Xy(t.request.url)}_finishRequestTiming(t,e,r){let i=t==null?void 0:t.finish();i&&(r.resourceTiming={[e.source]:JSON.parse(JSON.stringify(i))})}reloadTile(t){return rt(this,null,function*(){let e=t.uid,r=this.tileState.getLoaded(e);if(!r)return yield this.loadTile(t);if(r.vectorTile)return r.showCollisionBoxes=t.showCollisionBoxes,yield this._parseWorkerTile(r,t)})}loadAndProcessGeoJSON(t,e){return rt(this,null,function*(){var r;if(t.request&&(t.data=(yield up(t.request,e)).data),t.data){t.data=this._filterGeoJSON(t.data,t.filter,t.source),this._geoJSONIndex=this._createGeoJSONIndex(t.data,t);return}if(t.dataDiff){(r=this._geoJSONIndex)!=null||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},t)),this._geoJSONIndex.updateData(t.dataDiff,this._getFilterPredicate(t.filter,t.source));return}if(t.updateCluster&&this._geoJSONIndex.updateClusterOptions(t.geojsonVtOptions.cluster,Yy(t)),this._geoJSONIndex==null)throw Error(`Input data given to \'${t.source}\' is not a valid GeoJSON object.`)})}_filterGeoJSON(t,e,r){if(t.type!=="FeatureCollection")return t;let i=this._getFilterPredicate(e,r);return i?{type:"FeatureCollection",features:t.features.filter(n=>i(n))}:t}_getFilterPredicate(t,e){if(typeof t!="boolean"&&!(t!=null&&t.length))return;let r=er(t,`sources.${e}.filter`,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(r.result==="error")throw Error(r.value.map(i=>`${i.key}: ${i.message}`).join(", "));return i=>r.value.evaluate({zoom:0},i)}removeSource(t){return rt(this,null,function*(){var e;(e=this._pendingRequest)==null||e.abort()})}getClusterExpansionZoom(t){return this._geoJSONIndex.getClusterExpansionZoom(t.clusterId)}getClusterChildren(t){return this._geoJSONIndex.getClusterChildren(t.clusterId)}getClusterLeaves(t){return this._geoJSONIndex.getClusterLeaves(t.clusterId,t.limit,t.offset)}};function c5(t,e){let r=Gt(e.geojsonVtOptions||{},{updateable:!0,clusterOptions:Yy(e)});return new Td(t,r)}function Yy({geojsonVtOptions:t,clusterProperties:e,source:r}){if(!e||!t.clusterOptions)return t.clusterOptions;let i={},n={},a={accumulated:null,zoom:0},s={properties:null},o=Object.keys(e);for(let l of o){let[u,h]=e[l],c=er(h,`sources.${r}.clusterProperties.${l}[1]`),p=er(typeof u=="string"?[u,["accumulated"],["get",l]]:u,`sources.${r}.clusterProperties.${l}[0]`);i[l]=c.value,n[l]=p.value}return t.clusterOptions.map=l=>{s.properties=l;let u={};for(let h of o)u[h]=i[h].evaluate(a,s);return u},t.clusterOptions.reduce=(l,u)=>{s.properties=u;for(let h of o)a.accumulated=l[h],l[h]=n[h].evaluate(a,s)},t.clusterOptions}function Uy(t){return rt(this,null,function*(){if(t.endsWith(".mjs")){yield import(t);return}let e=yield fetch(t,{credentials:"same-origin"});if(!e.ok)throw Error(`Failed to load ${t}: ${e.status}`);let r=yield e.text();if(/^[ \\t]*(import|export)\\s/m.test(r)){let i=URL.createObjectURL(new Blob([r],{type:"text/javascript"}));try{yield import(i)}finally{URL.revokeObjectURL(i)}return}globalThis.eval(r)})}var p5=class{constructor(t){this.self=t,this.actor=new sy(t),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(e,r)=>{if(this.externalWorkerSourceTypes[e])throw Error(`Worker source with name "${e}" already registered.`);this.externalWorkerSourceTypes[e]=r},this.self.addProtocol=sp,this.self.removeProtocol=op,this.self.registerRTLTextPlugin=e=>{wr.setMethods(e)},this.self.makeRequest=Ma,this.actor.registerMessageHandler("LDT",(e,r)=>this._getDEMWorkerSource(e,r.source).loadTile(r)),this.actor.registerMessageHandler("RDT",(e,r)=>rt(this,null,function*(){this._getDEMWorkerSource(e,r.source).removeTile(r)})),this.actor.registerMessageHandler("GCEZ",(e,r)=>rt(this,null,function*(){return this._getWorkerSource(e,r.type,r.source).getClusterExpansionZoom(r)})),this.actor.registerMessageHandler("GCC",(e,r)=>rt(this,null,function*(){return this._getWorkerSource(e,r.type,r.source).getClusterChildren(r)})),this.actor.registerMessageHandler("GCL",(e,r)=>rt(this,null,function*(){return this._getWorkerSource(e,r.type,r.source).getClusterLeaves(r)})),this.actor.registerMessageHandler("LD",(e,r)=>this._getWorkerSource(e,r.type,r.source).loadData(r)),this.actor.registerMessageHandler("LT",(e,r)=>this._getWorkerSource(e,r.type,r.source).loadTile(r)),this.actor.registerMessageHandler("RT",(e,r)=>this._getWorkerSource(e,r.type,r.source).reloadTile(r)),this.actor.registerMessageHandler("AT",(e,r)=>this._getWorkerSource(e,r.type,r.source).abortTile(r)),this.actor.registerMessageHandler("RMT",(e,r)=>this._getWorkerSource(e,r.type,r.source).removeTile(r)),this.actor.registerMessageHandler("RS",(e,r)=>rt(this,null,function*(){var n,a;if(!((a=(n=this.workerSources[e])==null?void 0:n[r.type])!=null&&a[r.source]))return;let i=this.workerSources[e][r.type][r.source];delete this.workerSources[e][r.type][r.source],i.removeSource!==void 0&&i.removeSource(r)})),this.actor.registerMessageHandler("RM",e=>rt(this,null,function*(){delete this.layerIndexes[e],delete this.availableImages[e],delete this.workerSources[e],delete this.demWorkerSources[e],this.globalStates.delete(e)})),this.actor.registerMessageHandler("SR",(e,r)=>rt(this,null,function*(){this.referrer=r})),this.actor.registerMessageHandler("SRPS",(e,r)=>this._syncRTLPluginState(e,r)),this.actor.registerMessageHandler("IS",(e,r)=>rt(this,null,function*(){yield Uy(r)})),this.actor.registerMessageHandler("SI",(e,r)=>this._setImages(e,r)),this.actor.registerMessageHandler("UL",(e,r)=>rt(this,null,function*(){this._getLayerIndex(e).update(r.layers,r.removedIds,this._getGlobalState(e))})),this.actor.registerMessageHandler("UGS",(e,r)=>rt(this,null,function*(){let i=this._getGlobalState(e);for(let n in r)i[n]=r[n]})),this.actor.registerMessageHandler("SL",(e,r)=>rt(this,null,function*(){this._getLayerIndex(e).replace(r,this._getGlobalState(e))}))}_getGlobalState(t){let e=this.globalStates.get(t);return e||(e={},this.globalStates.set(t,e)),e}_setImages(t,e){return rt(this,null,function*(){this.availableImages[t]=e;for(let r in this.workerSources[t]){let i=this.workerSources[t][r];for(let n in i)i[n].availableImages=e}})}_syncRTLPluginState(t,e){return rt(this,null,function*(){return yield wr.syncState(e,Uy)})}_getAvailableImages(t){let e=this.availableImages[t];return e||(e=[]),e}_getLayerIndex(t){let e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new i5),e}_getWorkerSource(t,e,r){var i,n;if((i=this.workerSources)[t]||(i[t]={}),(n=this.workerSources[t])[e]||(n[e]={}),!this.workerSources[t][e][r]){let a={sendAsync:(s,o)=>(s.targetMapId=t,this.actor.sendAsync(s,o))};switch(e){case"vector":this.workerSources[t][e][r]=new l5(a,this._getLayerIndex(t),this._getAvailableImages(t));break;case"geojson":this.workerSources[t][e][r]=new h5(a,this._getLayerIndex(t),this._getAvailableImages(t));break;default:this.workerSources[t][e][r]=new this.externalWorkerSourceTypes[e](a,this._getLayerIndex(t),this._getAvailableImages(t))}}return this.workerSources[t][e][r]}_getDEMWorkerSource(t,e){var r,i;return(r=this.demWorkerSources)[t]||(r[t]={}),(i=this.demWorkerSources[t])[e]||(i[e]=new u5),this.demWorkerSources[t][e]}};mr(self)&&(self.worker=new p5(self));export{p5 as default};\n/*! Bundled license information:\n\nmaplibre-gl/dist/maplibre-gl-shared.mjs:\nmaplibre-gl/dist/maplibre-gl-worker.mjs:\n (**\n * MapLibre GL JS\n * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v6.9.0/LICENSE.txt\n *)\n*/\n'});var Vst=W((lri,Ust)=>{"use strict";var h3=it(),h6r=uo().sanitizeHTML,d6r=Fte(),qst=V2();function Ost(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=qst.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var np=Ost.prototype;np.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=Lq(t)};np.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType==="image"&&e.sourcetype==="image"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};np.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};np.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};np.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};np.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};np.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!Lq(e)){var r=p6r(e);t.addSource(this.idSource,r)}};np.findFollowingMapLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r<t.length;r++){var i=t[r].id;if(typeof i=="string"&&i.indexOf(qst.traceLayerPrefix)===0){e=i;break}}return e};np.updateLayer=function(e){var t=this.subplot,r=Nst(e),i=this.lookupBelow(),n=this.findFollowingMapLayerId(i);this.removeLayer(),Lq(e)&&t.addLayer({id:this.idLayer,source:this.idSource,"source-layer":e.sourcelayer||"",type:e.type,minzoom:e.minzoom,maxzoom:e.maxzoom,layout:r.layout,paint:r.paint},n),this.layerType=e.type,this.below=i};np.updateStyle=function(e){if(Lq(e)){var t=Nst(e);this.subplot.setOptions(this.idLayer,"setLayoutProperty",t.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",t.paint)}};np.removeLayer=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer)};np.dispose=function(){var e=this.subplot.map;e.getLayer(this.idLayer)&&e.removeLayer(this.idLayer),e.getSource(this.idSource)&&e.removeSource(this.idSource)};function Lq(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var r=0;r<t.length;r++)if(typeof t[r]!="string"||t[r].length===0)return!1;return!0}return h3.isPlainObject(t)||typeof t=="string"&&t.length>0}function Nst(e){var t={},r={};switch(e.type){case"circle":h3.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":h3.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":h3.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var i=e.symbol,n=d6r(i.textposition,i.iconsize);h3.extendFlat(t,{"icon-image":i.icon,"icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":n.anchor,"text-offset":n.offset,"symbol-placement":i.placement}),h3.extendFlat(r,{"icon-color":e.color,"text-color":i.textfont.color,"text-opacity":e.opacity});break;case"raster":h3.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function p6r(e){var t=e.sourcetype,r=e.source,i={type:t},n;return t==="geojson"?n="data":t==="vector"?n=typeof r=="string"?"url":"tiles":t==="raster"?(n="tiles",i.tileSize=256):t==="image"&&(n="url",i.coordinates=e.coordinates),i[n]=r,e.sourceattribution&&(i.attribution=h6r(e.sourceattribution)),i}Ust.exports=function(t,r,i){var n=new Ost(t,r);return n.update(i),n}});var Qst=W((uri,Jst)=>{"use strict";var Iq=(Rst(),Go(Pst)),v6r=Bst(),Gst=!1,g6r=()=>{Gst||(Gst=!0,Iq.setWorkerUrl(URL.createObjectURL(new Blob([v6r],{type:"text/javascript"}))))},Rq=it(),$st=cm(),Hst=yi(),m6r=ji(),y6r=bf(),Pq=Ds(),Wst=u1(),x6r=Wst.drawMode,_6r=Wst.selectMode,b6r=cu().prepSelect,w6r=cu().clearOutline,T6r=cu().clearSelectionsCache,A6r=cu().selectOnClick,ax=V2(),M6r=Vst();function Yst(e,t){this.id=t,this.gd=e;var r=e._fullLayout,i=e._context;this.container=r._glcontainer.node(),this.isStatic=i.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var tu=Yst.prototype;tu.plot=function(e,t,r){var i=this,n;i.map?n=new Promise(function(a,o){i.updateMap(e,t,a,o)}):n=new Promise(function(a,o){i.createMap(e,t,a,o)}),r.push(n)};tu.createMap=function(e,t,r,i){var n=this,a=t[n.id],o=n.styleObj=Kst(a.style),s=a.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null;let u={container:n.div,style:o.style,center:Nae(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:l,interactive:!n.isStatic,canvasContextAttributes:{preserveDrawingBuffer:n.isStatic},doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},c=a._fitBounds;c&&(u.bounds=[[c.west,c.south],[c.east,c.north]],u.fitBoundsOptions={padding:ax.fitBoundsPadding}),g6r();let f=n.map=new Iq.Map(u).addControl(new Iq.AttributionControl({compact:!0})),h={};f.setMissingStyleImageResolver(p=>(!h[p]&&/^[a-zA-Z0-9-]+$/.test(p)&&(h[p]=new Promise(v=>{let m=new Image(15,15);m.onload=()=>{f.addImage(p,m,{sdf:!0}),v()},m.onerror=()=>v(),m.crossOrigin="Anonymous",m.src=`https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/${p}.svg`})),h[p])),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",n.rejectOnError(i),n.isStatic||n.initFx(e,t);var d=[];d.push(new Promise(function(p){f.once("load",p)})),d=d.concat($st.fetchTraceGeoData(e)),Promise.all(d).then(function(){c&&Xst(n,a),Zst(n,a),n.fillBelowLookup(e,t),n.updateData(e),n.updateLayout(t),n.resolveOnRender(r)}).catch(i)};tu.updateMap=function(e,t,r,i){var n=this,a=n.map,o=t[this.id];n.rejectOnError(i);var s=[],l=Kst(o.style);JSON.stringify(n.styleObj)!==JSON.stringify(l)&&(n.styleObj=l,a.setStyle(l.style),n.traceHash={},s.push(new Promise(function(u){a.once("styledata",u)}))),s=s.concat($st.fetchTraceGeoData(e)),Promise.all(s).then(function(){n.fillBelowLookup(e,t),n.updateData(e);let u=o._fitBounds;u&&(a.fitBounds([[u.west,u.south],[u.east,u.north]],{padding:ax.fitBoundsPadding,animate:!1}),Xst(n,o),Zst(n,o)),n.updateLayout(t),n.resolveOnRender(r)}).catch(i)};function Xst(e,t){let{center:r,zoom:i}=e.getView();t._input.center=t.center=r,t._input.zoom=t.zoom=i,t._input._fitView={center:fn({},r),zoom:i}}function Zst(e,t){let r=e.getView();e.viewInitial={center:Rq.extendFlat({},r.center),bearing:t.bearing,pitch:t.pitch,zoom:r.zoom}}tu.fillBelowLookup=function(e,t){var r=t[this.id],i=r.layers,n,a,o=this.belowLookup={},s=!1;for(n=0;n<e.length;n++){var l=e[n][0].trace,u=l._module;typeof l.below=="string"?a=l.below:u.getBelow&&(a=u.getBelow(l,this)),a===""&&(s=!0),o["trace-"+l.uid]=a||""}for(n=0;n<i.length;n++){var c=i[n];typeof c.below=="string"?a=c.below:s?a="traces":a="",o["layout-"+n]=a}var f={},h,d;for(h in o)a=o[h],f[a]?f[a].push(h):f[a]=[h];for(a in f){var p=f[a];if(p.length>1)for(n=0;n<p.length;n++)h=p[n],h.indexOf("trace-")===0?(d=h.split("trace-")[1],this.traceHash[d]&&(this.traceHash[d].below=null)):h.indexOf("layout-")===0&&(d=h.split("layout-")[1],this.layerList[d]&&(this.layerList[d].below=null))}};var jst={choroplethmap:0,densitymap:1,scattermap:2};tu.updateData=function(e){var t=this.traceHash,r,i,n,a,o=e.slice().sort(function(f,h){return jst[f[0].trace.type]-jst[h[0].trace.type]});for(n=0;n<o.length;n++){var s=o[n];i=s[0].trace,r=t[i.uid];var l=!1;r&&(r.type===i.type?(r.update(s),l=!0):r.dispose()),!l&&i._module&&(t[i.uid]=i._module.plot(this,s))}var u=Object.keys(t);e:for(n=0;n<u.length;n++){var c=u[n];for(a=0;a<e.length;a++)if(i=e[a][0].trace,c===i.uid)continue e;r=t[c],r.dispose(),delete t[c]}};tu.updateLayout=function(e){var t=this.map,r=e[this.id];!this.dragging&&!this.wheeling&&(t.setCenter(Nae(r.center)),t.setZoom(r.zoom),t.setBearing(r.bearing),t.setPitch(r.pitch)),this.updateLayers(e),this.updateFramework(e),this.updateFx(e),this.map.resize(),this.gd._context._scrollZoom.map?t.scrollZoom.enable():t.scrollZoom.disable()};tu.resolveOnRender=function(e){var t=this.map;t.on("render",function r(){t.loaded()&&(t.off("render",r),setTimeout(e,10))})};tu.rejectOnError=function(e){var t=this.map;function r(){e(new Error(ax.mapOnErrorMsg))}t.once("error",r),t.once("style.error",r),t.once("source.error",r),t.once("tile.error",r),t.once("layer.error",r)};tu.createFramework=function(e){var t=this,r=t.div=document.createElement("div");r.id=t.uid,r.style.position="absolute",t.container.appendChild(r),t.xaxis={_id:"x",c2p:i=>t.project(i).x,_subplot:t},t.yaxis={_id:"y",c2p:i=>t.project(i).y,_subplot:t},t.updateFramework(e),t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},m6r.setConvert(t.mockAxis,e)};tu.initFx=function(e,t){var r=this,i=r.gd,n=r.map;n.on("moveend",function(s){if(r.map){var l=i._fullLayout;if(s.originalEvent||r.wheeling){var u=l[r.id];Hst.call("_storeDirectGUIEdit",i.layout,l._preGUI,r.getViewEdits(u));var c=r.getView();u._input.center=u.center=c.center,u._input.zoom=u.zoom=c.zoom,u._input.bearing=u.bearing=c.bearing,u._input.pitch=u.pitch=c.pitch,i.emit("plotly_relayout",r.getViewEditsWithDerived(c))}s.originalEvent&&s.originalEvent.type==="mouseup"?r.dragging=!1:r.wheeling&&(r.wheeling=!1),l&&l._rehover&&l._rehover()}}),n.on("wheel",function(){r.wheeling=!0}),n.on("mousemove",function(s){var l=r.div.getBoundingClientRect(),u=[s.originalEvent.offsetX,s.originalEvent.offsetY];s.target.getBoundingClientRect=function(){return l},r.xaxis.p2c=function(){return n.unproject(u).lng},r.yaxis.p2c=function(){return n.unproject(u).lat},i._fullLayout._rehover=function(){i._fullLayout._hoversubplot===r.id&&i._fullLayout[r.id]&&Pq.hover(i,s,r.id)},Pq.hover(i,s,r.id),i._fullLayout._hoversubplot=r.id});function a(){Pq.loneUnhover(t._hoverlayer)}n.on("dragstart",function(){r.dragging=!0,a()}),n.on("zoomstart",a),n.on("mouseout",function(){i._fullLayout._hoversubplot=null});function o(){var s=r.getView();i.emit("plotly_relayouting",r.getViewEditsWithDerived(s))}n.on("drag",o),n.on("zoom",o),n.on("dblclick",function(){var s=i._fullLayout[r.id];Hst.call("_storeDirectGUIEdit",i.layout,i._fullLayout._preGUI,r.getViewEdits(s));var l=r.viewInitial;n.setCenter(Nae(l.center)),n.setZoom(l.zoom),n.setBearing(l.bearing),n.setPitch(l.pitch);var u=r.getView();s._input.center=s.center=u.center,s._input.zoom=s.zoom=u.zoom,s._input.bearing=s.bearing=u.bearing,s._input.pitch=s.pitch=u.pitch,i.emit("plotly_doubleclick",null),i.emit("plotly_relayout",r.getViewEditsWithDerived(u))}),r.clearOutline=function(){T6r(r.dragOptions),w6r(r.dragOptions.gd)},r.onClickInPanFn=function(s){return function(l){var u=i._fullLayout.clickmode;u.indexOf("select")>-1&&A6r(l.originalEvent,i,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&Pq.click(i,l.originalEvent)}}};tu.updateFx=function(e){var t=this,r=t.map,i=t.gd;if(t.isStatic)return;function n(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var a=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[n([u.xmin,u.ymin]),n([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(n)}};var s=t.dragOptions;t.dragOptions=Rq.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:i,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),_6r(a)||x6r(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){b6r(l,u,c,t.dragOptions,a)},y6r.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))};tu.updateFramework=function(e){var t=e[this.id].domain,r=e._size,i=this.div.style;i.width=r.w*(t.x[1]-t.x[0])+"px",i.height=r.h*(t.y[1]-t.y[0])+"px",i.left=r.l+t.x[0]*r.w+"px",i.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};tu.updateLayers=function(e){var t=e[this.id],r=t.layers,i=this.layerList,n;if(r.length!==i.length){for(n=0;n<i.length;n++)i[n].dispose();for(i=this.layerList=[],n=0;n<r.length;n++)i.push(M6r(this,n,r[n]))}else for(n=0;n<r.length;n++)i[n].update(r[n])};tu.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))};tu.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()};tu.setOptions=function(e,t,r){for(var i in r)this.map[t](e,i,r[i])};tu.getMapLayers=function(){return this.map.getStyle().layers};tu.addLayer=function(e,t){var r=this.map;if(typeof t=="string"){if(t===""){r.addLayer(e,t);return}for(var i=this.getMapLayers(),n=0;n<i.length;n++)if(t===i[n].id){r.addLayer(e,t);return}Rq.warn(["Trying to add layer with *below* value",t,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}r.addLayer(e)};tu.project=function([e,t]){return this.map.project(new Iq.LngLat(e,t))};tu.getView=function(){var e=this.map,t=e.getCenter(),r=t.lng,i=t.lat,n={lon:r,lat:i},a=e.getCanvas(),o=parseInt(a.style.width),s=parseInt(a.style.height);return{center:n,zoom:e.getZoom(),bearing:e.getBearing(),pitch:e.getPitch(),_derived:{coordinates:[e.unproject([0,0]).toArray(),e.unproject([o,0]).toArray(),e.unproject([o,s]).toArray(),e.unproject([0,s]).toArray()]}}};tu.getViewEdits=function(e){for(var t=this.id,r=["center","zoom","bearing","pitch"],i={},n=0;n<r.length;n++){var a=r[n];i[t+"."+a]=e[a]}return i};tu.getViewEditsWithDerived=function(e){var t=this.id,r=this.getViewEdits(e);return r[t+"._derived"]=e._derived,r};function Kst(e){var t={};return Rq.isPlainObject(e)?(t.id=e.id,t.style=e):typeof e=="string"?(t.id=e,ax.stylesMap[e]?t.style=ax.stylesMap[e]:t.style=e):(t.id=ax.styleValueDflt,t.style=ax.stylesMap[ax.styleValueDflt]),t.transition={duration:0,delay:0},t}function Nae(e){return[e.lon,e.lat]}Jst.exports=Yst});var tlt={};Fp(tlt,{getMapFitBounds:()=>S6r});function S6r(e,t){let r=[];for(let l of e){if(l.subplot!==t||l.visible!==!0)continue;if(l.type==="choroplethmap")return null;let{lat:u,lon:c}=l;if(!c||!u)continue;let f=Math.min(c.length,u.length);for(let h=0;h<f;h++){let d=c[h],p=u[h];Number.isFinite(d)&&Number.isFinite(p)&&r.push([d,p])}}let i=(0,elt.computeBbox)({type:"MultiPoint",coordinates:r});if(!i)return null;let[n,a,o,s]=i;return{west:n,east:o,south:a,north:s}}var elt,rlt=Ea(()=>{"use strict";elt=nd(cm())});var alt=W((fri,nlt)=>{"use strict";var Uae=it(),E6r=q_(),k6r=Xc(),ilt=JE(),{getMapFitBounds:C6r}=(rlt(),Go(tlt));nlt.exports=function(t,r,i){E6r(t,r,i,{type:"map",attributes:ilt,handleDefaults:D6r,partition:"y",fullData:i})};function D6r(e,t,r,i){r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");let n=r("fitbounds");var a=r("bounds.west"),o=r("bounds.east"),s=r("bounds.south"),l=r("bounds.north");(a===void 0||o===void 0||s===void 0||l===void 0)&&delete t.bounds,k6r(e,t,{name:"layers",handleItemDefaults:F6r}),t._fitBounds=null;let{_fitView:{center:u,zoom:c}={},center:f,zoom:h}=e,d=(f==null?void 0:f.lon)===(u==null?void 0:u.lon)&&(f==null?void 0:f.lat)===(u==null?void 0:u.lat)&&h===c;if(n&&d){let p=C6r(i.fullData,i.id);p&&(t._fitBounds=p)}t._input=e}function F6r(e,t){function r(l,u){return Uae.coerce(e,t,ilt.layers,l,u)}var i=r("visible");if(i){var n=r("sourcetype"),a=n==="raster"||n==="image";r("source"),r("sourceattribution"),n==="vector"&&r("sourcelayer"),n==="image"&&r("coordinates");var o;a&&(o="raster");var s=r("type",o);a&&s!=="raster"&&(s=t.type="raster",Uae.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),s==="circle"&&r("circle.radius"),s==="line"&&(r("line.width"),r("line.dash")),s==="fill"&&r("fill.outlinecolor"),s==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),Uae.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var zq=W(N0=>{"use strict";var Vae=it(),olt=Vae.strTranslate,L6r=Vae.strScale,P6r=_c().getSubplotCalcData,I6r=sd(),R6r=vi(),slt=Ji(),z6r=uo(),B6r=Qst(),ox="map";N0.name=ox;N0.attr="subplot";N0.idRoot=ox;N0.idRegex=N0.attrRegex=Vae.counterRegex(ox);N0.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}};N0.layoutAttributes=JE();N0.supplyLayoutDefaults=alt();N0.plot=function(t){for(var r=t._fullLayout,i=t.calcdata,n=r._subplots[ox],a=0;a<n.length;a++){var o=n[a],s=P6r(i,ox,o),l=r[o],u=l._subplot;u||(u=new B6r(t,o),r[o]._subplot=u),u.plot(s,r,t._promises)}};N0.clean=function(e,t,r,i){for(var n=i._subplots[ox]||[],a=0;a<n.length;a++){var o=n[a];!t[o]&&i[o]._subplot&&i[o]._subplot.destroy()}};N0.toSVG=function(e){for(var t=e._fullLayout,r=t._subplots[ox],i=t._size,n=0;n<r.length;n++){var a=t[r[n]],o=a.domain,s=a._subplot,l=s.toImage("png"),u=t._glimages.append("svg:image");u.attr({xmlns:I6r.svg,"xlink:href":l,x:i.l+i.w*o.x[0],y:i.t+i.h*(1-o.y[1]),width:i.w*(o.x[1]-o.x[0]),height:i.h*(o.y[1]-o.y[0]),preserveAspectRatio:"none"});var c=R6r.select(a._subplot.div),f=c.select(".maplibregl-ctrl-attrib").text().replace("Improve this map",""),h=t._glimages.append("g"),d=h.append("text");d.text(f).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":f});var p=slt.bBox(d.node()),v=i.w*(o.x[1]-o.x[0]);if(p.width>v/2){var m=f.split("|").join("<br>");d.text(m).attr("data-unformatted",m).call(z6r.convertToTspans,e),p=slt.bBox(d.node())}d.attr("transform",olt(-3,-p.height+8)),h.insert("rect",".static-attribution").attr({x:-p.width-6,y:-p.height-3,width:p.width+6,height:p.height+3,fill:"rgba(255, 255, 255, 0.75)"});var g=1;p.width+6>v&&(g=v/(p.width+6));var w=[i.l+i.w*o.x[1],i.t+i.h*(1-o.y[0])];h.attr("transform",olt(w[0],w[1])+L6r(g))}};N0.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[ox],i=0;i<r.length;i++){var n=t[r[i]]._subplot;n.updateFx(t)}}});var ult=W((dri,llt)=>{"use strict";llt.exports={attributes:sz(),supplyDefaults:PJe(),colorbar:Ac(),formatLabels:Dte(),calc:VJ(),plot:WJe(),hoverPoints:hz().hoverPoints,eventData:KJe(),selectPoints:QJe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermap",basePlotModule:zq(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}});var flt=W((pri,clt)=>{"use strict";clt.exports=ult()});var Gae=W((vri,hlt)=>{"use strict";var Om=xE(),q6r=Eo(),{hovertemplateAttrs:O6r,templatefallbackAttrs:N6r}=Ga(),U6r=Wa(),sx=tn().extendFlat;hlt.exports=sx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:sx({},Om.featureidkey,{}),below:{valType:"string",editType:"plot"},text:Om.text,hovertext:Om.hovertext,marker:{line:{color:sx({},Om.marker.line.color,{editType:"plot"}),width:sx({},Om.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:sx({},Om.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:sx({},Om.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:sx({},Om.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:Om.hoverinfo,hovertemplate:O6r({},{keys:["properties"]}),hovertemplatefallback:N6r(),showlegend:sx({},U6r.showlegend,{dflt:!1})},q6r("",{cLetter:"z",editTypeOverride:"calc"}))});var plt=W((gri,dlt)=>{"use strict";var C8=it(),V6r=Fu(),G6r=Gae();dlt.exports=function(t,r,i,n){function a(c,f){return C8.coerce(t,r,G6r,c,f)}var o=a("locations"),s=a("z"),l=a("geojson");if(!C8.isArrayOrTypedArray(o)||!o.length||!C8.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||C8.isPlainObject(l))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var u=a("marker.line.width");u&&a("marker.line.color"),a("marker.opacity"),V6r(t,r,n,a,{prefix:"",cLetter:"z"}),C8.coerceSelectionMarkerOpacity(r,a)}});var Hae=W((mri,mlt)=>{"use strict";var H6r=sn(),Nm=it(),j6r=Jo(),$6r=Ji(),W6r=dE().makeBlank,vlt=cm();function Y6r(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,i={layout:{visibility:"none"},paint:{}},n={layout:{visibility:"none"},paint:{}},a=t._opts={fill:i,line:n,geojson:W6r()};if(!r)return a;var o=vlt.extractTraceFeature(e);if(!o)return a;var s=j6r.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;Nm.isArrayOrTypedArray(l.opacity)&&(c=function(w){var b=w.mo;return H6r(b)?+Nm.constrain(b,0,1):0});var f;Nm.isArrayOrTypedArray(u.color)&&(f=function(w){return w.mlc});var h;Nm.isArrayOrTypedArray(u.width)&&(h=function(w){return w.mlw});for(var d=0;d<e.length;d++){var p=e[d],v=p.fOut;if(v){var m=v.properties;m.fc=s(p.z),c&&(m.mo=c(p)),f&&(m.mlc=f(p)),h&&(m.mlw=h(p)),p.ct=m.ct,p._polygons=vlt.feature2polygons(v)}}var g=c?{type:"identity",property:"mo"}:l.opacity;return Nm.extendFlat(i.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":g}),Nm.extendFlat(n.paint,{"line-color":f?{type:"identity",property:"mlc"}:u.color,"line-width":h?{type:"identity",property:"mlw"}:u.width,"line-opacity":g}),i.layout.visibility="visible",n.layout.visibility="visible",a.geojson={type:"FeatureCollection",features:o},glt(e),a}function glt(e){var t=e[0].trace,r=t._opts,i;if(t.selectedpoints){for(var n=$6r.makeSelectedPointStyleFns(t),a=0;a<e.length;a++){var o=e[a];o.fOut&&(o.fOut.properties.mo2=n.selectedOpacityFn(o))}i={type:"identity",property:"mo2"}}else i=Nm.isArrayOrTypedArray(t.marker.opacity)?{type:"identity",property:"mo"}:t.marker.opacity;return Nm.extendFlat(r.fill.paint,{"fill-opacity":i}),Nm.extendFlat(r.line.paint,{"line-opacity":i}),r}mlt.exports={convert:Y6r,convertOnSelect:glt}});var wlt=W((yri,blt)=>{"use strict";var xlt=Hae().convert,X6r=Hae().convertOnSelect,ylt=V2().traceLayerPrefix;function _lt(e,t){this.type="choroplethmap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",ylt+t+"-fill"],["line",ylt+t+"-line"]],this.below=null}var KT=_lt.prototype;KT.update=function(e){this._update(xlt(e)),e[0].trace._glTrace=this};KT.updateOnSelect=function(e){this._update(X6r(e))};KT._update=function(e){var t=this.subplot,r=this.layerList,i=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(e,i),this.below=i);for(var n=0;n<r.length;n++){var a=r[n],o=a[0],s=a[1],l=e[o];t.setOptions(s,"setLayoutProperty",l.layout),l.layout.visibility==="visible"&&t.setOptions(s,"setPaintProperty",l.paint)}};KT._addLayers=function(e,t){for(var r=this.subplot,i=this.layerList,n=this.sourceId,a=0;a<i.length;a++){var o=i[a],s=o[0],l=e[s];r.addLayer({type:s,id:o[1],source:n,layout:l.layout,paint:l.paint},t)}};KT._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};KT.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};blt.exports=function(t,r){var i=r[0].trace,n=new _lt(t,i.uid),a=n.sourceId,o=xlt(r),s=n.below=t.belowLookup["trace-"+i.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),n._addLayers(o,s),r[0].trace._glTrace=n,n}});var Alt=W((xri,Tlt)=>{"use strict";Tlt.exports={attributes:Gae(),supplyDefaults:plt(),colorbar:x5(),calc:bQ(),plot:wlt(),hoverPoints:TQ(),eventData:AQ(),selectPoints:MQ(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),i=r.length-2;i>=0;i--){var n=r[i].id;if(typeof n=="string"&&n.indexOf("water")===0){for(var a=i+1;a<r.length;a++)if(n=r[a].id,typeof n=="string"&&n.indexOf("plotly-")===-1)return n}}},moduleType:"trace",name:"choroplethmap",basePlotModule:zq(),categories:["map","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_map"}}});var Slt=W((_ri,Mlt)=>{"use strict";Mlt.exports=Alt()});var $ae=W((bri,klt)=>{"use strict";var Z6r=Eo(),{hovertemplateAttrs:K6r,templatefallbackAttrs:J6r}=Ga(),Elt=Wa(),Bq=sz(),jae=tn().extendFlat;klt.exports=jae({lon:Bq.lon,lat:Bq.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:Bq.text,hovertext:Bq.hovertext,hoverinfo:jae({},Elt.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:K6r(),hovertemplatefallback:J6r(),showlegend:jae({},Elt.showlegend,{dflt:!1})},Z6r("",{cLetter:"z",editTypeOverride:"calc"}))});var Dlt=W((wri,Clt)=>{"use strict";var Q6r=it(),eAr=Fu(),tAr=$ae();Clt.exports=function(t,r,i,n){function a(u,c){return Q6r.coerce(t,r,tAr,u,c)}var o=a("lon")||[],s=a("lat")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),eAr(t,r,n,a,{prefix:"",cLetter:"z"})}});var Plt=W((Tri,Llt)=>{"use strict";var Wae=sn(),rAr=it().isArrayOrTypedArray,Yae=Kn().BADNUM,iAr=Zc(),Flt=it()._;Llt.exports=function(t,r){for(var i=r._length,n=new Array(i),a=r.z,o=rAr(a)&&a.length,s=0;s<i;s++){var l=n[s]={},u=r.lon[s],c=r.lat[s];if(l.lonlat=Wae(u)&&Wae(c)?[+u,+c]:[Yae,Yae],o){var f=a[s];l.z=Wae(f)?f:Yae}}return iAr(t,r,{vals:o?a:[0,1],containerStr:"",cLetter:"z"}),i&&(n[0].t={labels:{lat:Flt(t,"lat:")+" ",lon:Flt(t,"lon:")+" "}}),n}});var qlt=W((Ari,Blt)=>{"use strict";var nAr=sn(),Xae=it(),Ilt=ni(),Rlt=Jo(),zlt=Kn().BADNUM,aAr=dE().makeBlank;Blt.exports=function(t){var r=t[0].trace,i=r.visible===!0&&r._length!==0,n={layout:{visibility:"none"},paint:{}},a=r._opts={heatmap:n,geojson:aAr()};if(!i)return a;var o=[],s,l=r.z,u=r.radius,c=Xae.isArrayOrTypedArray(l)&&l.length,f=Xae.isArrayOrTypedArray(u);for(s=0;s<t.length;s++){var h=t[s],d=h.lonlat;if(d[0]!==zlt){var p={};if(c){var v=h.z;p.z=v!==zlt?v:0}f&&(p.r=nAr(u[s])&&u[s]>0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:p})}}var m=Rlt.extractOpts(r),g=m.reversescale?Rlt.flipScale(m.colorscale):m.colorscale,w=g[0][1],b=Ilt.opacity(w)<1?w:Ilt.addOpacity(w,0),_=["interpolate",["linear"],["heatmap-density"],0,b];for(s=1;s<g.length;s++)_.push(g[s][0],g[s][1]);var M=["interpolate",["linear"],["get","z"],m.min,0,m.max,1];return Xae.extendFlat(a.heatmap.paint,{"heatmap-weight":c?M:1/(m.max-m.min),"heatmap-color":_,"heatmap-radius":f?{type:"identity",property:"r"}:r.radius,"heatmap-opacity":r.opacity}),a.geojson={type:"FeatureCollection",features:o},a.heatmap.layout.visibility="visible",a}});var Vlt=W((Mri,Ult)=>{"use strict";var Olt=qlt(),oAr=V2().traceLayerPrefix;function Nlt(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",oAr+t+"-heatmap"]],this.below=null}var qq=Nlt.prototype;qq.update=function(e){var t=this.subplot,r=this.layerList,i=Olt(e),n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(i.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(i,n),this.below=n);for(var a=0;a<r.length;a++){var o=r[a],s=o[0],l=o[1],u=i[s];t.setOptions(l,"setLayoutProperty",u.layout),u.layout.visibility==="visible"&&t.setOptions(l,"setPaintProperty",u.paint)}};qq._addLayers=function(e,t){for(var r=this.subplot,i=this.layerList,n=this.sourceId,a=0;a<i.length;a++){var o=i[a],s=o[0],l=e[s];r.addLayer({type:s,id:o[1],source:n,layout:l.layout,paint:l.paint},t)}};qq._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])};qq.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};Ult.exports=function(t,r){var i=r[0].trace,n=new Nlt(t,i.uid),a=n.sourceId,o=Olt(r),s=n.below=t.belowLookup["trace-"+i.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),n._addLayers(o,s),n}});var Hlt=W((Sri,Glt)=>{"use strict";var sAr=ji(),lAr=hz().hoverPoints,uAr=hz().getExtraText;Glt.exports=function(t,r,i){var n=lAr(t,r,i);if(n){var a=n[0],o=a.cd,s=o[0].trace,l=o[a.index];if(delete a.color,"z"in l){var u=a.subplot.mockAxis;a.z=l.z,a.zLabel=sAr.tickText(u,u.c2l(l.z),"hover").text}return a.extraText=uAr(s,l,o[0].t.labels),[a]}}});var $lt=W((Eri,jlt)=>{"use strict";jlt.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var Ylt=W((kri,Wlt)=>{"use strict";Wlt.exports={attributes:$ae(),supplyDefaults:Dlt(),colorbar:x5(),formatLabels:Dte(),calc:Plt(),plot:Vlt(),hoverPoints:Hlt(),eventData:$lt(),getBelow:function(e,t){for(var r=t.getMapLayers(),i=0;i<r.length;i++){var n=r[i],a=n.id;if(n.type==="symbol"&&typeof a=="string"&&a.indexOf("plotly-")===-1)return a}},moduleType:"trace",name:"densitymap",basePlotModule:zq(),categories:["map","gl","showLegend"],meta:{hr_name:"density_map"}}});var Zlt=W((Cri,Xlt)=>{"use strict";Xlt.exports=Ylt()});var Kae=W((Fri,tut)=>{"use strict";var cAr=Ho(),fAr=Wa(),Klt=Vl(),Zae=N3(),hAr=us().attributes,{hovertemplateAttrs:Jlt,templatefallbackAttrs:Qlt}=Ga(),dAr=Eo(),pAr=Da().templatedArray,vAr=_s().descriptionOnlyNumbers,eut=tn().extendFlat,gAr=ls().overrideAll,Dri=tut.exports=gAr({hoverinfo:eut({},fAr.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:Zae.hoverlabel,domain:hAr({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},direction:{valType:"enumerated",values:["forward","reversed"],dflt:"forward"},valueformat:{valType:"string",dflt:".3s",description:vAr("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:cAr({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:Klt.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:Zae.hoverlabel,hovertemplate:Jlt({},{keys:["value","label"]}),hovertemplatefallback:Qlt(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"},sort:{valType:"enumerated",values:["auto","input"],dflt:"auto"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:Klt.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:Zae.hoverlabel,hovertemplate:Jlt({},{keys:["value","label"]}),hovertemplatefallback:Qlt(),colorscales:pAr("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:eut(dAr().colorscale,{dflt:[[0,"white"],[1,"black"]]})}),sort:{valType:"enumerated",values:["auto","input"],dflt:"auto"}}},"calc","nested")});var aut=W((Lri,nut)=>{"use strict";var JT=it(),Oq=Kae(),d3=ni(),mAr=us().defaults,rut=EA(),iut=Da(),yAr=Xc();nut.exports=function(t,r,i,n){function a(_,M){return JT.coerce(t,r,Oq,_,M)}var o=JT.extendDeep(n.hoverlabel,t.hoverlabel),s=t.node,l=iut.newContainer(r,"node");function u(_,M){return JT.coerce(s,l,Oq.node,_,M)}u("label"),u("groups"),u("x"),u("y"),u("pad"),u("thickness"),u("line.color"),u("line.width"),u("hoverinfo",t.hoverinfo),rut(s,l,u,o),u("hovertemplate"),u("align"),u("sort");var c=n.colorway;let f=_=>c[_%c.length];u("color",l.label.map((_,M)=>d3.addOpacity(f(M),.8))),u("customdata");var h=t.link||{},d=iut.newContainer(r,"link");function p(_,M){return JT.coerce(h,d,Oq.link,_,M)}p("label"),p("arrowlen"),p("source"),p("target"),p("value"),p("line.color"),p("line.width"),p("hoverinfo",t.hoverinfo),rut(h,d,p,o),p("hovertemplate"),p("sort");var v=d3.luminosity(n.paper_bgcolor)<.333,m=v?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",g=p("color",m);function w(_){if(!d3.isValid(_))return _;let M=d3.opacity(_);return M<=.8?d3.addOpacity(_,M+.2):v?d3.brighten(_,10):d3.adjustLightness(_,-10)}p("hovercolor",Array.isArray(g)?g.map(w):w(g)),p("customdata"),yAr(h,d,{name:"colorscales",handleItemDefaults:xAr}),mAr(r,n,a),a("orientation"),a("direction"),a("valueformat"),a("valuesuffix");let b=l.x.length&&l.y.length?"freeform":void 0;a("arrangement",b),JT.coerceFont(a,"textfont",n.font,{autoShadowDflt:!0}),r._length=null};function xAr(e,t){function r(i,n){return JT.coerce(e,t,Oq.link.colorscales,i,n)}r("label"),r("cmin"),r("cmax"),r("colorscale")}});var Jae=W((Pri,out)=>{"use strict";out.exports=_Ar;function _Ar(e){for(var t=e.length,r=new Array(t),i=new Array(t),n=new Array(t),a=new Array(t),o=new Array(t),s=new Array(t),l=0;l<t;++l)r[l]=-1,i[l]=0,n[l]=!1,a[l]=0,o[l]=-1,s[l]=[];var u=0,c=[],f=[];function h(m){var g=[m],w=[m];for(r[m]=i[m]=u,n[m]=!0,u+=1;w.length>0;){m=w[w.length-1];var b=e[m];if(a[m]<b.length){for(var _=a[m];_<b.length;++_){var M=b[_];if(r[M]<0){r[M]=i[M]=u,n[M]=!0,u+=1,g.push(M),w.push(M);break}else n[M]&&(i[m]=Math.min(i[m],i[M])|0);o[M]>=0&&s[m].push(o[M])}a[m]=_}else{if(i[m]===r[m]){for(var x=[],T=[],A=0,_=g.length-1;_>=0;--_){var y=g[_];if(n[y]=!1,x.push(y),T.push(s[y]),A+=s[y].length,o[y]=c.length,y===m){g.length=_;break}}c.push(x);for(var E=new Array(A),_=0;_<T.length;_++)for(var S=0;S<T[_].length;S++)E[--A]=T[_][S];f.push(E)}w.pop()}}}for(var l=0;l<t;++l)r[l]<0&&h(l);for(var d,l=0;l<f.length;l++){var p=f[l];if(p.length!==0){p.sort(function(g,w){return g-w}),d=[p[0]];for(var v=1;v<p.length;v++)p[v]!==p[v-1]&&d.push(p[v]);f[l]=d}}return{components:c,adjacencyList:f}}});var cut=W((Iri,uut)=>{"use strict";var bAr=Jae(),QT=it(),wAr=G1().wrap,D8=QT.isArrayOrTypedArray,sut=QT.isIndex,lut=Jo();function TAr(e){var t=e.node,r=e.link,i=[],n=D8(r.color),a=D8(r.hovercolor),o=D8(r.customdata),s={},l={},u=r.colorscales.length,c;for(c=0;c<u;c++){var f=r.colorscales[c],h=lut.extractScale(f,{cLetter:"c"}),d=lut.makeColorScaleFunc(h);l[f.label]=d}var p=0;for(c=0;c<r.value.length;c++)r.source[c]>p&&(p=r.source[c]),r.target[c]>p&&(p=r.target[c]);var v=p+1;e.node._count=v;var m,g=e.node.groups,w={};for(c=0;c<g.length;c++){var b=g[c];for(m=0;m<b.length;m++){var _=b[m],M=v+c;w.hasOwnProperty(_)?QT.warn("Node "+_+" is already part of a group."):w[_]=M}}var x={source:[],target:[]};for(c=0;c<r.value.length;c++){var T=r.value[c],A=r.source[c],y=r.target[c];if(T>0&&sut(A,v)&&sut(y,v)&&!(w.hasOwnProperty(A)&&w.hasOwnProperty(y)&&w[A]===w[y])){w.hasOwnProperty(y)&&(y=w[y]),w.hasOwnProperty(A)&&(A=w[A]),A=+A,y=+y,s[A]=s[y]=!0;var E="";r.label&&r.label[c]&&(E=r.label[c]);var S=null;E&&l.hasOwnProperty(E)&&(S=l[E]),i.push({pointNumber:c,label:E,color:n?r.color[c]:r.color,hovercolor:a?r.hovercolor[c]:r.hovercolor,customdata:o?r.customdata[c]:r.customdata,concentrationscale:S,source:A,target:y,value:+T}),x.source.push(A),x.target.push(y)}}var C=v+g.length,k=D8(t.color),D=D8(t.customdata),F=[];for(c=0;c<C;c++)if(s[c]){var P=t.label[c];F.push({group:c>v-1,childrenNodes:[],pointNumber:c,label:P,color:k?t.color[c]:t.color,customdata:D?t.customdata[c]:t.customdata})}var R=!1;return AAr(C,x.source,x.target)&&(R=!0),{circular:R,links:i,nodes:F,groups:g,groupLookup:w}}function AAr(e,t,r){for(var i=QT.init2dArray(e,0),n=0;n<Math.min(t.length,r.length);n++)if(QT.isIndex(t[n],e)&&QT.isIndex(r[n],e)){if(t[n]===r[n])return!0;i[t[n]].push(r[n])}var a=bAr(i);return a.components.some(function(o){return o.length>1})}uut.exports=function(t,r){var i=TAr(r);return wAr({circular:i.circular,_nodes:i.nodes,_links:i.links,_groups:i.groups,_groupLookup:i.groupLookup})}});var hut=W((Nq,fut)=>{(function(e,t){typeof Nq=="object"&&typeof fut!="undefined"?t(Nq):(e=e||self,t(e.d3=e.d3||{}))})(Nq,function(e){"use strict";function t(T){var A=+this._x.call(null,T),y=+this._y.call(null,T);return r(this.cover(A,y),A,y,T)}function r(T,A,y,E){if(isNaN(A)||isNaN(y))return T;var S,C=T._root,k={data:E},D=T._x0,F=T._y0,P=T._x1,R=T._y1,L,I,B,O,$,Y,K,j;if(!C)return T._root=k,T;for(;C.length;)if(($=A>=(L=(D+P)/2))?D=L:P=L,(Y=y>=(I=(F+R)/2))?F=I:R=I,S=C,!(C=C[K=Y<<1|$]))return S[K]=k,T;if(B=+T._x.call(null,C.data),O=+T._y.call(null,C.data),A===B&&y===O)return k.next=C,S?S[K]=k:T._root=k,T;do S=S?S[K]=new Array(4):T._root=new Array(4),($=A>=(L=(D+P)/2))?D=L:P=L,(Y=y>=(I=(F+R)/2))?F=I:R=I;while((K=Y<<1|$)===(j=(O>=I)<<1|B>=L));return S[j]=C,S[K]=k,T}function i(T){var A,y,E=T.length,S,C,k=new Array(E),D=new Array(E),F=1/0,P=1/0,R=-1/0,L=-1/0;for(y=0;y<E;++y)isNaN(S=+this._x.call(null,A=T[y]))||isNaN(C=+this._y.call(null,A))||(k[y]=S,D[y]=C,S<F&&(F=S),S>R&&(R=S),C<P&&(P=C),C>L&&(L=C));if(F>R||P>L)return this;for(this.cover(F,P).cover(R,L),y=0;y<E;++y)r(this,k[y],D[y],T[y]);return this}function n(T,A){if(isNaN(T=+T)||isNaN(A=+A))return this;var y=this._x0,E=this._y0,S=this._x1,C=this._y1;if(isNaN(y))S=(y=Math.floor(T))+1,C=(E=Math.floor(A))+1;else{for(var k=S-y,D=this._root,F,P;y>T||T>=S||E>A||A>=C;)switch(P=(A<E)<<1|T<y,F=new Array(4),F[P]=D,D=F,k*=2,P){case 0:S=y+k,C=E+k;break;case 1:y=S-k,C=E+k;break;case 2:S=y+k,E=C-k;break;case 3:y=S-k,E=C-k;break}this._root&&this._root.length&&(this._root=D)}return this._x0=y,this._y0=E,this._x1=S,this._y1=C,this}function a(){var T=[];return this.visit(function(A){if(!A.length)do T.push(A.data);while(A=A.next)}),T}function o(T){return arguments.length?this.cover(+T[0][0],+T[0][1]).cover(+T[1][0],+T[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function s(T,A,y,E,S){this.node=T,this.x0=A,this.y0=y,this.x1=E,this.y1=S}function l(T,A,y){var E,S=this._x0,C=this._y0,k,D,F,P,R=this._x1,L=this._y1,I=[],B=this._root,O,$;for(B&&I.push(new s(B,S,C,R,L)),y==null?y=1/0:(S=T-y,C=A-y,R=T+y,L=A+y,y*=y);O=I.pop();)if(!(!(B=O.node)||(k=O.x0)>R||(D=O.y0)>L||(F=O.x1)<S||(P=O.y1)<C))if(B.length){var Y=(k+F)/2,K=(D+P)/2;I.push(new s(B[3],Y,K,F,P),new s(B[2],k,K,Y,P),new s(B[1],Y,D,F,K),new s(B[0],k,D,Y,K)),($=(A>=K)<<1|T>=Y)&&(O=I[I.length-1],I[I.length-1]=I[I.length-1-$],I[I.length-1-$]=O)}else{var j=T-+this._x.call(null,B.data),q=A-+this._y.call(null,B.data),J=j*j+q*q;if(J<y){var U=Math.sqrt(y=J);S=T-U,C=A-U,R=T+U,L=A+U,E=B.data}}return E}function u(T){if(isNaN(R=+this._x.call(null,T))||isNaN(L=+this._y.call(null,T)))return this;var A,y=this._root,E,S,C,k=this._x0,D=this._y0,F=this._x1,P=this._y1,R,L,I,B,O,$,Y,K;if(!y)return this;if(y.length)for(;;){if((O=R>=(I=(k+F)/2))?k=I:F=I,($=L>=(B=(D+P)/2))?D=B:P=B,A=y,!(y=y[Y=$<<1|O]))return this;if(!y.length)break;(A[Y+1&3]||A[Y+2&3]||A[Y+3&3])&&(E=A,K=Y)}for(;y.data!==T;)if(S=y,!(y=y.next))return this;return(C=y.next)&&delete y.next,S?(C?S.next=C:delete S.next,this):A?(C?A[Y]=C:delete A[Y],(y=A[0]||A[1]||A[2]||A[3])&&y===(A[3]||A[2]||A[1]||A[0])&&!y.length&&(E?E[K]=y:this._root=y),this):(this._root=C,this)}function c(T){for(var A=0,y=T.length;A<y;++A)this.remove(T[A]);return this}function f(){return this._root}function h(){var T=0;return this.visit(function(A){if(!A.length)do++T;while(A=A.next)}),T}function d(T){var A=[],y,E=this._root,S,C,k,D,F;for(E&&A.push(new s(E,this._x0,this._y0,this._x1,this._y1));y=A.pop();)if(!T(E=y.node,C=y.x0,k=y.y0,D=y.x1,F=y.y1)&&E.length){var P=(C+D)/2,R=(k+F)/2;(S=E[3])&&A.push(new s(S,P,R,D,F)),(S=E[2])&&A.push(new s(S,C,R,P,F)),(S=E[1])&&A.push(new s(S,P,k,D,R)),(S=E[0])&&A.push(new s(S,C,k,P,R))}return this}function p(T){var A=[],y=[],E;for(this._root&&A.push(new s(this._root,this._x0,this._y0,this._x1,this._y1));E=A.pop();){var S=E.node;if(S.length){var C,k=E.x0,D=E.y0,F=E.x1,P=E.y1,R=(k+F)/2,L=(D+P)/2;(C=S[0])&&A.push(new s(C,k,D,R,L)),(C=S[1])&&A.push(new s(C,R,D,F,L)),(C=S[2])&&A.push(new s(C,k,L,R,P)),(C=S[3])&&A.push(new s(C,R,L,F,P))}y.push(E)}for(;E=y.pop();)T(E.node,E.x0,E.y0,E.x1,E.y1);return this}function v(T){return T[0]}function m(T){return arguments.length?(this._x=T,this):this._x}function g(T){return T[1]}function w(T){return arguments.length?(this._y=T,this):this._y}function b(T,A,y){var E=new _(A==null?v:A,y==null?g:y,NaN,NaN,NaN,NaN);return T==null?E:E.addAll(T)}function _(T,A,y,E,S,C){this._x=T,this._y=A,this._x0=y,this._y0=E,this._x1=S,this._y1=C,this._root=void 0}function M(T){for(var A={data:T.data},y=A;T=T.next;)y=y.next={data:T.data};return A}var x=b.prototype=_.prototype;x.copy=function(){var T=new _(this._x,this._y,this._x0,this._y0,this._x1,this._y1),A=this._root,y,E;if(!A)return T;if(!A.length)return T._root=M(A),T;for(y=[{source:A,target:T._root=new Array(4)}];A=y.pop();)for(var S=0;S<4;++S)(E=A.source[S])&&(E.length?y.push({source:E,target:A.target[S]=new Array(4)}):A.target[S]=M(E));return T},x.add=t,x.addAll=i,x.cover=n,x.data=a,x.extent=o,x.find=l,x.remove=u,x.removeAll=c,x.root=f,x.size=h,x.visit=d,x.visitAfter=p,x.x=m,x.y=w,e.quadtree=b,Object.defineProperty(e,"__esModule",{value:!0})})});var Qae=W((Uq,dut)=>{(function(e,t){t(typeof Uq=="object"&&typeof dut!="undefined"?Uq:e.d3=e.d3||{})})(Uq,(function(e){"use strict";var t="$";function r(){}r.prototype=i.prototype={constructor:r,has:function(v){return t+v in this},get:function(v){return this[t+v]},set:function(v,m){return this[t+v]=m,this},remove:function(v){var m=t+v;return m in this&&delete this[m]},clear:function(){for(var v in this)v[0]===t&&delete this[v]},keys:function(){var v=[];for(var m in this)m[0]===t&&v.push(m.slice(1));return v},values:function(){var v=[];for(var m in this)m[0]===t&&v.push(this[m]);return v},entries:function(){var v=[];for(var m in this)m[0]===t&&v.push({key:m.slice(1),value:this[m]});return v},size:function(){var v=0;for(var m in this)m[0]===t&&++v;return v},empty:function(){for(var v in this)if(v[0]===t)return!1;return!0},each:function(v){for(var m in this)m[0]===t&&v(this[m],m.slice(1),this)}};function i(v,m){var g=new r;if(v instanceof r)v.each(function(x,T){g.set(T,x)});else if(Array.isArray(v)){var w=-1,b=v.length,_;if(m==null)for(;++w<b;)g.set(w,v[w]);else for(;++w<b;)g.set(m(_=v[w],w,v),_)}else if(v)for(var M in v)g.set(M,v[M]);return g}function n(){var v=[],m=[],g,w,b;function _(x,T,A,y){if(T>=v.length)return g!=null&&x.sort(g),w!=null?w(x):x;for(var E=-1,S=x.length,C=v[T++],k,D,F=i(),P,R=A();++E<S;)(P=F.get(k=C(D=x[E])+""))?P.push(D):F.set(k,[D]);return F.each(function(L,I){y(R,I,_(L,T,A,y))}),R}function M(x,T){if(++T>v.length)return x;var A,y=m[T-1];return w!=null&&T>=v.length?A=x.entries():(A=[],x.each(function(E,S){A.push({key:S,values:M(E,T)})})),y!=null?A.sort(function(E,S){return y(E.key,S.key)}):A}return b={object:function(x){return _(x,0,a,o)},map:function(x){return _(x,0,s,l)},entries:function(x){return M(_(x,0,s,l),0)},key:function(x){return v.push(x),b},sortKeys:function(x){return m[v.length-1]=x,b},sortValues:function(x){return g=x,b},rollup:function(x){return w=x,b}}}function a(){return{}}function o(v,m,g){v[m]=g}function s(){return i()}function l(v,m,g){v.set(m,g)}function u(){}var c=i.prototype;u.prototype=f.prototype={constructor:u,has:c.has,add:function(v){return v+="",this[t+v]=v,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};function f(v,m){var g=new u;if(v instanceof u)v.each(function(_){g.add(_)});else if(v){var w=-1,b=v.length;if(m==null)for(;++w<b;)g.add(v[w]);else for(;++w<b;)g.add(m(v[w],w,v))}return g}function h(v){var m=[];for(var g in v)m.push(g);return m}function d(v){var m=[];for(var g in v)m.push(v[g]);return m}function p(v){var m=[];for(var g in v)m.push({key:g,value:v[g]});return m}e.nest=n,e.set=f,e.map=i,e.keys=h,e.values=d,e.entries=p,Object.defineProperty(e,"__esModule",{value:!0})}))});var vut=W((Vq,put)=>{(function(e,t){typeof Vq=="object"&&typeof put!="undefined"?t(Vq):(e=e||self,t(e.d3=e.d3||{}))})(Vq,function(e){"use strict";var t={value:function(){}};function r(){for(var s=0,l=arguments.length,u={},c;s<l;++s){if(!(c=arguments[s]+"")||c in u||/[\s.]/.test(c))throw new Error("illegal type: "+c);u[c]=[]}return new i(u)}function i(s){this._=s}function n(s,l){return s.trim().split(/^|\s+/).map(function(u){var c="",f=u.indexOf(".");if(f>=0&&(c=u.slice(f+1),u=u.slice(0,f)),u&&!l.hasOwnProperty(u))throw new Error("unknown type: "+u);return{type:u,name:c}})}i.prototype=r.prototype={constructor:i,on:function(s,l){var u=this._,c=n(s+"",u),f,h=-1,d=c.length;if(arguments.length<2){for(;++h<d;)if((f=(s=c[h]).type)&&(f=a(u[f],s.name)))return f;return}if(l!=null&&typeof l!="function")throw new Error("invalid callback: "+l);for(;++h<d;)if(f=(s=c[h]).type)u[f]=o(u[f],s.name,l);else if(l==null)for(f in u)u[f]=o(u[f],s.name,null);return this},copy:function(){var s={},l=this._;for(var u in l)s[u]=l[u].slice();return new i(s)},call:function(s,l){if((f=arguments.length-2)>0)for(var u=new Array(f),c=0,f,h;c<f;++c)u[c]=arguments[c+2];if(!this._.hasOwnProperty(s))throw new Error("unknown type: "+s);for(h=this._[s],c=0,f=h.length;c<f;++c)h[c].value.apply(l,u)},apply:function(s,l,u){if(!this._.hasOwnProperty(s))throw new Error("unknown type: "+s);for(var c=this._[s],f=0,h=c.length;f<h;++f)c[f].value.apply(l,u)}};function a(s,l){for(var u=0,c=s.length,f;u<c;++u)if((f=s[u]).name===l)return f.value}function o(s,l,u){for(var c=0,f=s.length;c<f;++c)if(s[c].name===l){s[c]=t,s=s.slice(0,c).concat(s.slice(c+1));break}return u!=null&&s.push({name:l,value:u}),s}e.dispatch=r,Object.defineProperty(e,"__esModule",{value:!0})})});var mut=W((Gq,gut)=>{(function(e,t){typeof Gq=="object"&&typeof gut!="undefined"?t(Gq):(e=e||self,t(e.d3=e.d3||{}))})(Gq,function(e){"use strict";var t=0,r=0,i=0,n=1e3,a,o,s=0,l=0,u=0,c=typeof performance=="object"&&performance.now?performance:Date,f=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(T){setTimeout(T,17)};function h(){return l||(f(d),l=c.now()+u)}function d(){l=0}function p(){this._call=this._time=this._next=null}p.prototype=v.prototype={constructor:p,restart:function(T,A,y){if(typeof T!="function")throw new TypeError("callback is not a function");y=(y==null?h():+y)+(A==null?0:+A),!this._next&&o!==this&&(o?o._next=this:a=this,o=this),this._call=T,this._time=y,_()},stop:function(){this._call&&(this._call=null,this._time=1/0,_())}};function v(T,A,y){var E=new p;return E.restart(T,A,y),E}function m(){h(),++t;for(var T=a,A;T;)(A=l-T._time)>=0&&T._call.call(null,A),T=T._next;--t}function g(){l=(s=c.now())+u,t=r=0;try{m()}finally{t=0,b(),l=0}}function w(){var T=c.now(),A=T-s;A>n&&(u-=A,s=T)}function b(){for(var T,A=a,y,E=1/0;A;)A._call?(E>A._time&&(E=A._time),T=A,A=A._next):(y=A._next,A._next=null,A=T?T._next=y:a=y);o=T,_(E)}function _(T){if(!t){r&&(r=clearTimeout(r));var A=T-l;A>24?(T<1/0&&(r=setTimeout(g,T-c.now()-u)),i&&(i=clearInterval(i))):(i||(s=c.now(),i=setInterval(w,n)),t=1,f(g))}}function M(T,A,y){var E=new p;return A=A==null?0:+A,E.restart(function(S){E.stop(),T(S+A)},A,y),E}function x(T,A,y){var E=new p,S=A;return A==null?(E.restart(T,A,y),E):(A=+A,y=y==null?h():+y,E.restart(function C(k){k+=S,E.restart(C,S+=A,y),T(k)},A,y),E)}e.interval=x,e.now=h,e.timeout=M,e.timer=v,e.timerFlush=m,Object.defineProperty(e,"__esModule",{value:!0})})});var xut=W((Hq,yut)=>{(function(e,t){typeof Hq=="object"&&typeof yut!="undefined"?t(Hq,hut(),Qae(),vut(),mut()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(Hq,(function(e,t,r,i,n){"use strict";function a(T,A){var y;T==null&&(T=0),A==null&&(A=0);function E(){var S,C=y.length,k,D=0,F=0;for(S=0;S<C;++S)k=y[S],D+=k.x,F+=k.y;for(D=D/C-T,F=F/C-A,S=0;S<C;++S)k=y[S],k.x-=D,k.y-=F}return E.initialize=function(S){y=S},E.x=function(S){return arguments.length?(T=+S,E):T},E.y=function(S){return arguments.length?(A=+S,E):A},E}function o(T){return function(){return T}}function s(){return(Math.random()-.5)*1e-6}function l(T){return T.x+T.vx}function u(T){return T.y+T.vy}function c(T){var A,y,E=1,S=1;typeof T!="function"&&(T=o(T==null?1:+T));function C(){for(var F,P=A.length,R,L,I,B,O,$,Y=0;Y<S;++Y)for(R=t.quadtree(A,l,u).visitAfter(k),F=0;F<P;++F)L=A[F],O=y[L.index],$=O*O,I=L.x+L.vx,B=L.y+L.vy,R.visit(K);function K(j,q,J,U,V){var X=j.data,H=j.r,G=O+H;if(X){if(X.index>L.index){var Q=I-X.x-X.vx,te=B-X.y-X.vy,ce=Q*Q+te*te;ce<G*G&&(Q===0&&(Q=s(),ce+=Q*Q),te===0&&(te=s(),ce+=te*te),ce=(G-(ce=Math.sqrt(ce)))/ce*E,L.vx+=(Q*=ce)*(G=(H*=H)/($+H)),L.vy+=(te*=ce)*G,X.vx-=Q*(G=1-G),X.vy-=te*G)}return}return q>I+G||U<I-G||J>B+G||V<B-G}}function k(F){if(F.data)return F.r=y[F.data.index];for(var P=F.r=0;P<4;++P)F[P]&&F[P].r>F.r&&(F.r=F[P].r)}function D(){if(A){var F,P=A.length,R;for(y=new Array(P),F=0;F<P;++F)R=A[F],y[R.index]=+T(R,F,A)}}return C.initialize=function(F){A=F,D()},C.iterations=function(F){return arguments.length?(S=+F,C):S},C.strength=function(F){return arguments.length?(E=+F,C):E},C.radius=function(F){return arguments.length?(T=typeof F=="function"?F:o(+F),D(),C):T},C}function f(T){return T.index}function h(T,A){var y=T.get(A);if(!y)throw new Error("missing: "+A);return y}function d(T){var A=f,y=R,E,S=o(30),C,k,D,F,P=1;T==null&&(T=[]);function R($){return 1/Math.min(D[$.source.index],D[$.target.index])}function L($){for(var Y=0,K=T.length;Y<P;++Y)for(var j=0,q,J,U,V,X,H,G;j<K;++j)q=T[j],J=q.source,U=q.target,V=U.x+U.vx-J.x-J.vx||s(),X=U.y+U.vy-J.y-J.vy||s(),H=Math.sqrt(V*V+X*X),H=(H-C[j])/H*$*E[j],V*=H,X*=H,U.vx-=V*(G=F[j]),U.vy-=X*G,J.vx+=V*(G=1-G),J.vy+=X*G}function I(){if(k){var $,Y=k.length,K=T.length,j=r.map(k,A),q;for($=0,D=new Array(Y);$<K;++$)q=T[$],q.index=$,typeof q.source!="object"&&(q.source=h(j,q.source)),typeof q.target!="object"&&(q.target=h(j,q.target)),D[q.source.index]=(D[q.source.index]||0)+1,D[q.target.index]=(D[q.target.index]||0)+1;for($=0,F=new Array(K);$<K;++$)q=T[$],F[$]=D[q.source.index]/(D[q.source.index]+D[q.target.index]);E=new Array(K),B(),C=new Array(K),O()}}function B(){if(k)for(var $=0,Y=T.length;$<Y;++$)E[$]=+y(T[$],$,T)}function O(){if(k)for(var $=0,Y=T.length;$<Y;++$)C[$]=+S(T[$],$,T)}return L.initialize=function($){k=$,I()},L.links=function($){return arguments.length?(T=$,I(),L):T},L.id=function($){return arguments.length?(A=$,L):A},L.iterations=function($){return arguments.length?(P=+$,L):P},L.strength=function($){return arguments.length?(y=typeof $=="function"?$:o(+$),B(),L):y},L.distance=function($){return arguments.length?(S=typeof $=="function"?$:o(+$),O(),L):S},L}function p(T){return T.x}function v(T){return T.y}var m=10,g=Math.PI*(3-Math.sqrt(5));function w(T){var A,y=1,E=.001,S=1-Math.pow(E,1/300),C=0,k=.6,D=r.map(),F=n.timer(R),P=i.dispatch("tick","end");T==null&&(T=[]);function R(){L(),P.call("tick",A),y<E&&(F.stop(),P.call("end",A))}function L(O){var $,Y=T.length,K;O===void 0&&(O=1);for(var j=0;j<O;++j)for(y+=(C-y)*S,D.each(function(q){q(y)}),$=0;$<Y;++$)K=T[$],K.fx==null?K.x+=K.vx*=k:(K.x=K.fx,K.vx=0),K.fy==null?K.y+=K.vy*=k:(K.y=K.fy,K.vy=0);return A}function I(){for(var O=0,$=T.length,Y;O<$;++O){if(Y=T[O],Y.index=O,Y.fx!=null&&(Y.x=Y.fx),Y.fy!=null&&(Y.y=Y.fy),isNaN(Y.x)||isNaN(Y.y)){var K=m*Math.sqrt(O),j=O*g;Y.x=K*Math.cos(j),Y.y=K*Math.sin(j)}(isNaN(Y.vx)||isNaN(Y.vy))&&(Y.vx=Y.vy=0)}}function B(O){return O.initialize&&O.initialize(T),O}return I(),A={tick:L,restart:function(){return F.restart(R),A},stop:function(){return F.stop(),A},nodes:function(O){return arguments.length?(T=O,I(),D.each(B),A):T},alpha:function(O){return arguments.length?(y=+O,A):y},alphaMin:function(O){return arguments.length?(E=+O,A):E},alphaDecay:function(O){return arguments.length?(S=+O,A):+S},alphaTarget:function(O){return arguments.length?(C=+O,A):C},velocityDecay:function(O){return arguments.length?(k=1-O,A):1-k},force:function(O,$){return arguments.length>1?($==null?D.remove(O):D.set(O,B($)),A):D.get(O)},find:function(O,$,Y){var K=0,j=T.length,q,J,U,V,X;for(Y==null?Y=1/0:Y*=Y,K=0;K<j;++K)V=T[K],q=O-V.x,J=$-V.y,U=q*q+J*J,U<Y&&(X=V,Y=U);return X},on:function(O,$){return arguments.length>1?(P.on(O,$),A):P.on(O)}}}function b(){var T,A,y,E=o(-30),S,C=1,k=1/0,D=.81;function F(I){var B,O=T.length,$=t.quadtree(T,p,v).visitAfter(R);for(y=I,B=0;B<O;++B)A=T[B],$.visit(L)}function P(){if(T){var I,B=T.length,O;for(S=new Array(B),I=0;I<B;++I)O=T[I],S[O.index]=+E(O,I,T)}}function R(I){var B=0,O,$,Y=0,K,j,q;if(I.length){for(K=j=q=0;q<4;++q)(O=I[q])&&($=Math.abs(O.value))&&(B+=O.value,Y+=$,K+=$*O.x,j+=$*O.y);I.x=K/Y,I.y=j/Y}else{O=I,O.x=O.data.x,O.y=O.data.y;do B+=S[O.data.index];while(O=O.next)}I.value=B}function L(I,B,O,$){if(!I.value)return!0;var Y=I.x-A.x,K=I.y-A.y,j=$-B,q=Y*Y+K*K;if(j*j/D<q)return q<k&&(Y===0&&(Y=s(),q+=Y*Y),K===0&&(K=s(),q+=K*K),q<C&&(q=Math.sqrt(C*q)),A.vx+=Y*I.value*y/q,A.vy+=K*I.value*y/q),!0;if(I.length||q>=k)return;(I.data!==A||I.next)&&(Y===0&&(Y=s(),q+=Y*Y),K===0&&(K=s(),q+=K*K),q<C&&(q=Math.sqrt(C*q)));do I.data!==A&&(j=S[I.data.index]*y/q,A.vx+=Y*j,A.vy+=K*j);while(I=I.next)}return F.initialize=function(I){T=I,P()},F.strength=function(I){return arguments.length?(E=typeof I=="function"?I:o(+I),P(),F):E},F.distanceMin=function(I){return arguments.length?(C=I*I,F):Math.sqrt(C)},F.distanceMax=function(I){return arguments.length?(k=I*I,F):Math.sqrt(k)},F.theta=function(I){return arguments.length?(D=I*I,F):Math.sqrt(D)},F}function _(T,A,y){var E,S=o(.1),C,k;typeof T!="function"&&(T=o(+T)),A==null&&(A=0),y==null&&(y=0);function D(P){for(var R=0,L=E.length;R<L;++R){var I=E[R],B=I.x-A||1e-6,O=I.y-y||1e-6,$=Math.sqrt(B*B+O*O),Y=(k[R]-$)*C[R]*P/$;I.vx+=B*Y,I.vy+=O*Y}}function F(){if(E){var P,R=E.length;for(C=new Array(R),k=new Array(R),P=0;P<R;++P)k[P]=+T(E[P],P,E),C[P]=isNaN(k[P])?0:+S(E[P],P,E)}}return D.initialize=function(P){E=P,F()},D.strength=function(P){return arguments.length?(S=typeof P=="function"?P:o(+P),F(),D):S},D.radius=function(P){return arguments.length?(T=typeof P=="function"?P:o(+P),F(),D):T},D.x=function(P){return arguments.length?(A=+P,D):A},D.y=function(P){return arguments.length?(y=+P,D):y},D}function M(T){var A=o(.1),y,E,S;typeof T!="function"&&(T=o(T==null?0:+T));function C(D){for(var F=0,P=y.length,R;F<P;++F)R=y[F],R.vx+=(S[F]-R.x)*E[F]*D}function k(){if(y){var D,F=y.length;for(E=new Array(F),S=new Array(F),D=0;D<F;++D)E[D]=isNaN(S[D]=+T(y[D],D,y))?0:+A(y[D],D,y)}}return C.initialize=function(D){y=D,k()},C.strength=function(D){return arguments.length?(A=typeof D=="function"?D:o(+D),k(),C):A},C.x=function(D){return arguments.length?(T=typeof D=="function"?D:o(+D),k(),C):T},C}function x(T){var A=o(.1),y,E,S;typeof T!="function"&&(T=o(T==null?0:+T));function C(D){for(var F=0,P=y.length,R;F<P;++F)R=y[F],R.vy+=(S[F]-R.y)*E[F]*D}function k(){if(y){var D,F=y.length;for(E=new Array(F),S=new Array(F),D=0;D<F;++D)E[D]=isNaN(S[D]=+T(y[D],D,y))?0:+A(y[D],D,y)}}return C.initialize=function(D){y=D,k()},C.strength=function(D){return arguments.length?(A=typeof D=="function"?D:o(+D),k(),C):A},C.y=function(D){return arguments.length?(T=typeof D=="function"?D:o(+D),k(),C):T},C}e.forceCenter=a,e.forceCollide=c,e.forceLink=d,e.forceManyBody=b,e.forceRadial=_,e.forceSimulation=w,e.forceX=M,e.forceY=x,Object.defineProperty(e,"__esModule",{value:!0})}))});var but=W((jq,_ut)=>{(function(e,t){typeof jq=="object"&&typeof _ut!="undefined"?t(jq):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(jq,(function(e){"use strict";function t($e,tt){return $e<tt?-1:$e>tt?1:$e>=tt?0:NaN}function r($e){let tt=$e,st=$e;$e.length===1&&(tt=(ir,hr)=>$e(ir)-hr,st=i($e));function xt(ir,hr,Ur,si){for(Ur==null&&(Ur=0),si==null&&(si=ir.length);Ur<si;){let ei=Ur+si>>>1;st(ir[ei],hr)<0?Ur=ei+1:si=ei}return Ur}function Je(ir,hr,Ur,si){for(Ur==null&&(Ur=0),si==null&&(si=ir.length);Ur<si;){let ei=Ur+si>>>1;st(ir[ei],hr)>0?si=ei:Ur=ei+1}return Ur}function Ct(ir,hr,Ur,si){Ur==null&&(Ur=0),si==null&&(si=ir.length);let ei=xt(ir,hr,Ur,si-1);return ei>Ur&&tt(ir[ei-1],hr)>-tt(ir[ei],hr)?ei-1:ei}return{left:xt,center:Ct,right:Je}}function i($e){return(tt,st)=>t($e(tt),st)}function n($e){return $e===null?NaN:+$e}function*a($e,tt){if(tt===void 0)for(let st of $e)st!=null&&(st=+st)>=st&&(yield st);else{let st=-1;for(let xt of $e)(xt=tt(xt,++st,$e))!=null&&(xt=+xt)>=xt&&(yield xt)}}let o=r(t),s=o.right,l=o.left,u=r(n).center;function c($e,tt){let st=0;if(tt===void 0)for(let xt of $e)xt!=null&&(xt=+xt)>=xt&&++st;else{let xt=-1;for(let Je of $e)(Je=tt(Je,++xt,$e))!=null&&(Je=+Je)>=Je&&++st}return st}function f($e){return $e.length|0}function h($e){return!($e>0)}function d($e){return typeof $e!="object"||"length"in $e?$e:Array.from($e)}function p($e){return tt=>$e(...tt)}function v(...$e){let tt=typeof $e[$e.length-1]=="function"&&p($e.pop());$e=$e.map(d);let st=$e.map(f),xt=$e.length-1,Je=new Array(xt+1).fill(0),Ct=[];if(xt<0||st.some(h))return Ct;for(;;){Ct.push(Je.map((hr,Ur)=>$e[Ur][hr]));let ir=xt;for(;++Je[ir]===st[ir];){if(ir===0)return tt?Ct.map(tt):Ct;Je[ir--]=0}}}function m($e,tt){var st=0,xt=0;return Float64Array.from($e,tt===void 0?Je=>st+=+Je||0:Je=>st+=+tt(Je,xt++,$e)||0)}function g($e,tt){return tt<$e?-1:tt>$e?1:tt>=$e?0:NaN}function w($e,tt){let st=0,xt,Je=0,Ct=0;if(tt===void 0)for(let ir of $e)ir!=null&&(ir=+ir)>=ir&&(xt=ir-Je,Je+=xt/++st,Ct+=xt*(ir-Je));else{let ir=-1;for(let hr of $e)(hr=tt(hr,++ir,$e))!=null&&(hr=+hr)>=hr&&(xt=hr-Je,Je+=xt/++st,Ct+=xt*(hr-Je))}if(st>1)return Ct/(st-1)}function b($e,tt){let st=w($e,tt);return st&&Math.sqrt(st)}function _($e,tt){let st,xt;if(tt===void 0)for(let Je of $e)Je!=null&&(st===void 0?Je>=Je&&(st=xt=Je):(st>Je&&(st=Je),xt<Je&&(xt=Je)));else{let Je=-1;for(let Ct of $e)(Ct=tt(Ct,++Je,$e))!=null&&(st===void 0?Ct>=Ct&&(st=xt=Ct):(st>Ct&&(st=Ct),xt<Ct&&(xt=Ct)))}return[st,xt]}class M{constructor(){this._partials=new Float64Array(32),this._n=0}add(tt){let st=this._partials,xt=0;for(let Je=0;Je<this._n&&Je<32;Je++){let Ct=st[Je],ir=tt+Ct,hr=Math.abs(tt)<Math.abs(Ct)?tt-(ir-Ct):Ct-(ir-tt);hr&&(st[xt++]=hr),tt=ir}return st[xt]=tt,this._n=xt+1,this}valueOf(){let tt=this._partials,st=this._n,xt,Je,Ct,ir=0;if(st>0){for(ir=tt[--st];st>0&&(xt=ir,Je=tt[--st],ir=xt+Je,Ct=Je-(ir-xt),!Ct););st>0&&(Ct<0&&tt[st-1]<0||Ct>0&&tt[st-1]>0)&&(Je=Ct*2,xt=ir+Je,Je==xt-ir&&(ir=xt))}return ir}}function x($e,tt){let st=new M;if(tt===void 0)for(let xt of $e)(xt=+xt)&&st.add(xt);else{let xt=-1;for(let Je of $e)(Je=+tt(Je,++xt,$e))&&st.add(Je)}return+st}function T($e,tt){let st=new M,xt=-1;return Float64Array.from($e,tt===void 0?Je=>st.add(+Je||0):Je=>st.add(+tt(Je,++xt,$e)||0))}class A extends Map{constructor(tt,st=k){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:st}}),tt!=null)for(let[xt,Je]of tt)this.set(xt,Je)}get(tt){return super.get(E(this,tt))}has(tt){return super.has(E(this,tt))}set(tt,st){return super.set(S(this,tt),st)}delete(tt){return super.delete(C(this,tt))}}class y extends Set{constructor(tt,st=k){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:st}}),tt!=null)for(let xt of tt)this.add(xt)}has(tt){return super.has(E(this,tt))}add(tt){return super.add(S(this,tt))}delete(tt){return super.delete(C(this,tt))}}function E({_intern:$e,_key:tt},st){let xt=tt(st);return $e.has(xt)?$e.get(xt):st}function S({_intern:$e,_key:tt},st){let xt=tt(st);return $e.has(xt)?$e.get(xt):($e.set(xt,st),st)}function C({_intern:$e,_key:tt},st){let xt=tt(st);return $e.has(xt)&&(st=$e.get(st),$e.delete(xt)),st}function k($e){return $e!==null&&typeof $e=="object"?$e.valueOf():$e}function D($e){return $e}function F($e,...tt){return $($e,D,D,tt)}function P($e,...tt){return $($e,Array.from,D,tt)}function R($e,tt,...st){return $($e,D,tt,st)}function L($e,tt,...st){return $($e,Array.from,tt,st)}function I($e,...tt){return $($e,D,O,tt)}function B($e,...tt){return $($e,Array.from,O,tt)}function O($e){if($e.length!==1)throw new Error("duplicate key");return $e[0]}function $($e,tt,st,xt){return(function Je(Ct,ir){if(ir>=xt.length)return st(Ct);let hr=new A,Ur=xt[ir++],si=-1;for(let ei of Ct){let Lr=Ur(ei,++si,Ct),$i=hr.get(Lr);$i?$i.push(ei):hr.set(Lr,[ei])}for(let[ei,Lr]of hr)hr.set(ei,Je(Lr,ir));return tt(hr)})($e,0)}function Y($e,tt){return Array.from(tt,st=>$e[st])}function K($e,...tt){if(typeof $e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");$e=Array.from($e);let[st=t]=tt;if(st.length===1||tt.length>1){let xt=Uint32Array.from($e,(Je,Ct)=>Ct);return tt.length>1?(tt=tt.map(Je=>$e.map(Je)),xt.sort((Je,Ct)=>{for(let ir of tt){let hr=t(ir[Je],ir[Ct]);if(hr)return hr}})):(st=$e.map(st),xt.sort((Je,Ct)=>t(st[Je],st[Ct]))),Y($e,xt)}return $e.sort(st)}function j($e,tt,st){return(tt.length===1?K(R($e,tt,st),(([xt,Je],[Ct,ir])=>t(Je,ir)||t(xt,Ct))):K(F($e,st),(([xt,Je],[Ct,ir])=>tt(Je,ir)||t(xt,Ct)))).map(([xt])=>xt)}var q=Array.prototype,J=q.slice;function U($e){return function(){return $e}}var V=Math.sqrt(50),X=Math.sqrt(10),H=Math.sqrt(2);function G($e,tt,st){var xt,Je=-1,Ct,ir,hr;if(tt=+tt,$e=+$e,st=+st,$e===tt&&st>0)return[$e];if((xt=tt<$e)&&(Ct=$e,$e=tt,tt=Ct),(hr=Q($e,tt,st))===0||!isFinite(hr))return[];if(hr>0){let Ur=Math.round($e/hr),si=Math.round(tt/hr);for(Ur*hr<$e&&++Ur,si*hr>tt&&--si,ir=new Array(Ct=si-Ur+1);++Je<Ct;)ir[Je]=(Ur+Je)*hr}else{hr=-hr;let Ur=Math.round($e*hr),si=Math.round(tt*hr);for(Ur/hr<$e&&++Ur,si/hr>tt&&--si,ir=new Array(Ct=si-Ur+1);++Je<Ct;)ir[Je]=(Ur+Je)/hr}return xt&&ir.reverse(),ir}function Q($e,tt,st){var xt=(tt-$e)/Math.max(0,st),Je=Math.floor(Math.log(xt)/Math.LN10),Ct=xt/Math.pow(10,Je);return Je>=0?(Ct>=V?10:Ct>=X?5:Ct>=H?2:1)*Math.pow(10,Je):-Math.pow(10,-Je)/(Ct>=V?10:Ct>=X?5:Ct>=H?2:1)}function te($e,tt,st){var xt=Math.abs(tt-$e)/Math.max(0,st),Je=Math.pow(10,Math.floor(Math.log(xt)/Math.LN10)),Ct=xt/Je;return Ct>=V?Je*=10:Ct>=X?Je*=5:Ct>=H&&(Je*=2),tt<$e?-Je:Je}function ce($e,tt,st){let xt;for(;;){let Je=Q($e,tt,st);if(Je===xt||Je===0||!isFinite(Je))return[$e,tt];Je>0?($e=Math.floor($e/Je)*Je,tt=Math.ceil(tt/Je)*Je):Je<0&&($e=Math.ceil($e*Je)/Je,tt=Math.floor(tt*Je)/Je),xt=Je}}function ge($e){return Math.ceil(Math.log(c($e))/Math.LN2)+1}function Ce(){var $e=D,tt=_,st=ge;function xt(Je){Array.isArray(Je)||(Je=Array.from(Je));var Ct,ir=Je.length,hr,Ur=new Array(ir);for(Ct=0;Ct<ir;++Ct)Ur[Ct]=$e(Je[Ct],Ct,Je);var si=tt(Ur),ei=si[0],Lr=si[1],$i=st(Ur,ei,Lr);if(!Array.isArray($i)){let ca=Lr,dn=+$i;if(tt===_&&([ei,Lr]=ce(ei,Lr,dn)),$i=G(ei,Lr,dn),$i[$i.length-1]>=Lr)if(ca>=Lr&&tt===_){let Vn=Q(ei,Lr,dn);isFinite(Vn)&&(Vn>0?Lr=(Math.floor(Lr/Vn)+1)*Vn:Vn<0&&(Lr=(Math.ceil(Lr*-Vn)+1)/-Vn))}else $i.pop()}for(var Tn=$i.length;$i[0]<=ei;)$i.shift(),--Tn;for(;$i[Tn-1]>Lr;)$i.pop(),--Tn;var hn=new Array(Tn+1),ta;for(Ct=0;Ct<=Tn;++Ct)ta=hn[Ct]=[],ta.x0=Ct>0?$i[Ct-1]:ei,ta.x1=Ct<Tn?$i[Ct]:Lr;for(Ct=0;Ct<ir;++Ct)hr=Ur[Ct],ei<=hr&&hr<=Lr&&hn[s($i,hr,0,Tn)].push(Je[Ct]);return hn}return xt.value=function(Je){return arguments.length?($e=typeof Je=="function"?Je:U(Je),xt):$e},xt.domain=function(Je){return arguments.length?(tt=typeof Je=="function"?Je:U([Je[0],Je[1]]),xt):tt},xt.thresholds=function(Je){return arguments.length?(st=typeof Je=="function"?Je:Array.isArray(Je)?U(J.call(Je)):U(Je),xt):st},xt}function be($e,tt){let st;if(tt===void 0)for(let xt of $e)xt!=null&&(st<xt||st===void 0&&xt>=xt)&&(st=xt);else{let xt=-1;for(let Je of $e)(Je=tt(Je,++xt,$e))!=null&&(st<Je||st===void 0&&Je>=Je)&&(st=Je)}return st}function he($e,tt){let st;if(tt===void 0)for(let xt of $e)xt!=null&&(st>xt||st===void 0&&xt>=xt)&&(st=xt);else{let xt=-1;for(let Je of $e)(Je=tt(Je,++xt,$e))!=null&&(st>Je||st===void 0&&Je>=Je)&&(st=Je)}return st}function oe($e,tt,st=0,xt=$e.length-1,Je=t){for(;xt>st;){if(xt-st>600){let Ur=xt-st+1,si=tt-st+1,ei=Math.log(Ur),Lr=.5*Math.exp(2*ei/3),$i=.5*Math.sqrt(ei*Lr*(Ur-Lr)/Ur)*(si-Ur/2<0?-1:1),Tn=Math.max(st,Math.floor(tt-si*Lr/Ur+$i)),hn=Math.min(xt,Math.floor(tt+(Ur-si)*Lr/Ur+$i));oe($e,tt,Tn,hn,Je)}let Ct=$e[tt],ir=st,hr=xt;for(Ee($e,st,tt),Je($e[xt],Ct)>0&&Ee($e,st,xt);ir<hr;){for(Ee($e,ir,hr),++ir,--hr;Je($e[ir],Ct)<0;)++ir;for(;Je($e[hr],Ct)>0;)--hr}Je($e[st],Ct)===0?Ee($e,st,hr):(++hr,Ee($e,hr,xt)),hr<=tt&&(st=hr+1),tt<=hr&&(xt=hr-1)}return $e}function Ee($e,tt,st){let xt=$e[tt];$e[tt]=$e[st],$e[st]=xt}function ye($e,tt,st){if($e=Float64Array.from(a($e,st)),!!(xt=$e.length)){if((tt=+tt)<=0||xt<2)return he($e);if(tt>=1)return be($e);var xt,Je=(xt-1)*tt,Ct=Math.floor(Je),ir=be(oe($e,Ct).subarray(0,Ct+1)),hr=he($e.subarray(Ct+1));return ir+(hr-ir)*(Je-Ct)}}function ue($e,tt,st=n){if(xt=$e.length){if((tt=+tt)<=0||xt<2)return+st($e[0],0,$e);if(tt>=1)return+st($e[xt-1],xt-1,$e);var xt,Je=(xt-1)*tt,Ct=Math.floor(Je),ir=+st($e[Ct],Ct,$e),hr=+st($e[Ct+1],Ct+1,$e);return ir+(hr-ir)*(Je-Ct)}}function ee($e,tt,st){return Math.ceil((st-tt)/(2*(ye($e,.75)-ye($e,.25))*Math.pow(c($e),-1/3)))}function ae($e,tt,st){return Math.ceil((st-tt)/(3.5*b($e)*Math.pow(c($e),-1/3)))}function xe($e,tt){let st,xt=-1,Je=-1;if(tt===void 0)for(let Ct of $e)++Je,Ct!=null&&(st<Ct||st===void 0&&Ct>=Ct)&&(st=Ct,xt=Je);else for(let Ct of $e)(Ct=tt(Ct,++Je,$e))!=null&&(st<Ct||st===void 0&&Ct>=Ct)&&(st=Ct,xt=Je);return xt}function re($e,tt){let st=0,xt=0;if(tt===void 0)for(let Je of $e)Je!=null&&(Je=+Je)>=Je&&(++st,xt+=Je);else{let Je=-1;for(let Ct of $e)(Ct=tt(Ct,++Je,$e))!=null&&(Ct=+Ct)>=Ct&&(++st,xt+=Ct)}if(st)return xt/st}function pe($e,tt){return ye($e,.5,tt)}function*we($e){for(let tt of $e)yield*jse(tt)}function Fe($e){return Array.from(we($e))}function Se($e,tt){let st,xt=-1,Je=-1;if(tt===void 0)for(let Ct of $e)++Je,Ct!=null&&(st>Ct||st===void 0&&Ct>=Ct)&&(st=Ct,xt=Je);else for(let Ct of $e)(Ct=tt(Ct,++Je,$e))!=null&&(st>Ct||st===void 0&&Ct>=Ct)&&(st=Ct,xt=Je);return xt}function ke($e,tt=_e){let st=[],xt,Je=!1;for(let Ct of $e)Je&&st.push(tt(xt,Ct)),xt=Ct,Je=!0;return st}function _e($e,tt){return[$e,tt]}function Ie($e,tt,st){$e=+$e,tt=+tt,st=(Je=arguments.length)<2?(tt=$e,$e=0,1):Je<3?1:+st;for(var xt=-1,Je=Math.max(0,Math.ceil((tt-$e)/st))|0,Ct=new Array(Je);++xt<Je;)Ct[xt]=$e+xt*st;return Ct}function Oe($e,tt=t){let st,xt=!1;if(tt.length===1){let Je;for(let Ct of $e){let ir=tt(Ct);(xt?t(ir,Je)<0:t(ir,ir)===0)&&(st=Ct,Je=ir,xt=!0)}}else for(let Je of $e)(xt?tt(Je,st)<0:tt(Je,Je)===0)&&(st=Je,xt=!0);return st}function Qe($e,tt=t){if(tt.length===1)return Se($e,tt);let st,xt=-1,Je=-1;for(let Ct of $e)++Je,(xt<0?tt(Ct,Ct)===0:tt(Ct,st)<0)&&(st=Ct,xt=Je);return xt}function et($e,tt=t){let st,xt=!1;if(tt.length===1){let Je;for(let Ct of $e){let ir=tt(Ct);(xt?t(ir,Je)>0:t(ir,ir)===0)&&(st=Ct,Je=ir,xt=!0)}}else for(let Je of $e)(xt?tt(Je,st)>0:tt(Je,Je)===0)&&(st=Je,xt=!0);return st}function _t($e,tt=t){if(tt.length===1)return xe($e,tt);let st,xt=-1,Je=-1;for(let Ct of $e)++Je,(xt<0?tt(Ct,Ct)===0:tt(Ct,st)>0)&&(st=Ct,xt=Je);return xt}function ut($e,tt){let st=Qe($e,tt);return st<0?void 0:st}var vt=Xe(Math.random);function Xe($e){return function(st,xt=0,Je=st.length){let Ct=Je-(xt=+xt);for(;Ct;){let ir=$e()*Ct--|0,hr=st[Ct+xt];st[Ct+xt]=st[ir+xt],st[ir+xt]=hr}return st}}function mt($e,tt){let st=0;if(tt===void 0)for(let xt of $e)(xt=+xt)&&(st+=xt);else{let xt=-1;for(let Je of $e)(Je=+tt(Je,++xt,$e))&&(st+=Je)}return st}function bt($e){if(!(Ct=$e.length))return[];for(var tt=-1,st=he($e,Ne),xt=new Array(st);++tt<st;)for(var Je=-1,Ct,ir=xt[tt]=new Array(Ct);++Je<Ct;)ir[Je]=$e[Je][tt];return xt}function Ne($e){return $e.length}function Ue(){return bt(arguments)}function Ge($e,tt){if(typeof tt!="function")throw new TypeError("test is not a function");let st=-1;for(let xt of $e)if(!tt(xt,++st,$e))return!1;return!0}function je($e,tt){if(typeof tt!="function")throw new TypeError("test is not a function");let st=-1;for(let xt of $e)if(tt(xt,++st,$e))return!0;return!1}function Re($e,tt){if(typeof tt!="function")throw new TypeError("test is not a function");let st=[],xt=-1;for(let Je of $e)tt(Je,++xt,$e)&&st.push(Je);return st}function Ve($e,tt){if(typeof $e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");if(typeof tt!="function")throw new TypeError("mapper is not a function");return Array.from($e,(st,xt)=>tt(st,xt,$e))}function ct($e,tt,st){if(typeof tt!="function")throw new TypeError("reducer is not a function");let xt=$e[Symbol.iterator](),Je,Ct,ir=-1;if(arguments.length<3){if({done:Je,value:st}=xt.next(),Je)return;++ir}for(;{done:Je,value:Ct}=xt.next(),!Je;)st=tt(st,Ct,++ir,$e);return st}function Tt($e){if(typeof $e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from($e).reverse()}function Xt($e,...tt){$e=new Set($e);for(let st of tt)for(let xt of st)$e.delete(xt);return $e}function Vt($e,tt){let st=tt[Symbol.iterator](),xt=new Set;for(let Je of $e){if(xt.has(Je))return!1;let Ct,ir;for(;({value:Ct,done:ir}=st.next())&&!ir;){if(Object.is(Je,Ct))return!1;xt.add(Ct)}}return!0}function lr($e){return $e instanceof Set?$e:new Set($e)}function ur($e,...tt){$e=new Set($e),tt=tt.map(lr);e:for(let st of $e)for(let xt of tt)if(!xt.has(st)){$e.delete(st);continue e}return $e}function Bt($e,tt){let st=$e[Symbol.iterator](),xt=new Set;for(let Je of tt){if(xt.has(Je))continue;let Ct,ir;for(;{value:Ct,done:ir}=st.next();){if(ir)return!1;if(xt.add(Ct),Object.is(Je,Ct))break}}return!0}function Zt($e,tt){return Bt(tt,$e)}function kr(...$e){let tt=new Set;for(let st of $e)for(let xt of st)tt.add(xt);return tt}e.Adder=M,e.InternMap=A,e.InternSet=y,e.ascending=t,e.bin=Ce,e.bisect=s,e.bisectCenter=u,e.bisectLeft=l,e.bisectRight=s,e.bisector=r,e.count=c,e.cross=v,e.cumsum=m,e.descending=g,e.deviation=b,e.difference=Xt,e.disjoint=Vt,e.every=Ge,e.extent=_,e.fcumsum=T,e.filter=Re,e.fsum=x,e.greatest=et,e.greatestIndex=_t,e.group=F,e.groupSort=j,e.groups=P,e.histogram=Ce,e.index=I,e.indexes=B,e.intersection=ur,e.least=Oe,e.leastIndex=Qe,e.map=Ve,e.max=be,e.maxIndex=xe,e.mean=re,e.median=pe,e.merge=Fe,e.min=he,e.minIndex=Se,e.nice=ce,e.pairs=ke,e.permute=Y,e.quantile=ye,e.quantileSorted=ue,e.quickselect=oe,e.range=Ie,e.reduce=ct,e.reverse=Tt,e.rollup=R,e.rollups=L,e.scan=ut,e.shuffle=vt,e.shuffler=Xe,e.some=je,e.sort=K,e.subset=Zt,e.sum=mt,e.superset=Bt,e.thresholdFreedmanDiaconis=ee,e.thresholdScott=ae,e.thresholdSturges=ge,e.tickIncrement=Q,e.tickStep=te,e.ticks=G,e.transpose=bt,e.union=kr,e.variance=w,e.zip=Ue,Object.defineProperty(e,"__esModule",{value:!0})}))});var Tut=W(($q,wut)=>{(function(e,t){typeof $q=="object"&&typeof wut!="undefined"?t($q):(e=e||self,t(e.d3=e.d3||{}))})($q,function(e){"use strict";var t=Math.PI,r=2*t,i=1e-6,n=r-i;function a(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function o(){return new a}a.prototype=o.prototype={constructor:a,moveTo:function(s,l){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(s,l){this._+="L"+(this._x1=+s)+","+(this._y1=+l)},quadraticCurveTo:function(s,l,u,c){this._+="Q"+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+c)},bezierCurveTo:function(s,l,u,c,f,h){this._+="C"+ +s+","+ +l+","+ +u+","+ +c+","+(this._x1=+f)+","+(this._y1=+h)},arcTo:function(s,l,u,c,f){s=+s,l=+l,u=+u,c=+c,f=+f;var h=this._x1,d=this._y1,p=u-s,v=c-l,m=h-s,g=d-l,w=m*m+g*g;if(f<0)throw new Error("negative radius: "+f);if(this._x1===null)this._+="M"+(this._x1=s)+","+(this._y1=l);else if(w>i)if(!(Math.abs(g*p-v*m)>i)||!f)this._+="L"+(this._x1=s)+","+(this._y1=l);else{var b=u-h,_=c-d,M=p*p+v*v,x=b*b+_*_,T=Math.sqrt(M),A=Math.sqrt(w),y=f*Math.tan((t-Math.acos((M+w-x)/(2*T*A)))/2),E=y/A,S=y/T;Math.abs(E-1)>i&&(this._+="L"+(s+E*m)+","+(l+E*g)),this._+="A"+f+","+f+",0,0,"+ +(g*b>m*_)+","+(this._x1=s+S*p)+","+(this._y1=l+S*v)}},arc:function(s,l,u,c,f,h){s=+s,l=+l,u=+u,h=!!h;var d=u*Math.cos(c),p=u*Math.sin(c),v=s+d,m=l+p,g=1^h,w=h?c-f:f-c;if(u<0)throw new Error("negative radius: "+u);this._x1===null?this._+="M"+v+","+m:(Math.abs(this._x1-v)>i||Math.abs(this._y1-m)>i)&&(this._+="L"+v+","+m),u&&(w<0&&(w=w%r+r),w>n?this._+="A"+u+","+u+",0,1,"+g+","+(s-d)+","+(l-p)+"A"+u+","+u+",0,1,"+g+","+(this._x1=v)+","+(this._y1=m):w>i&&(this._+="A"+u+","+u+",0,"+ +(w>=t)+","+g+","+(this._x1=s+u*Math.cos(f))+","+(this._y1=l+u*Math.sin(f))))},rect:function(s,l,u,c){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)+"h"+ +u+"v"+ +c+"h"+-u+"Z"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,"__esModule",{value:!0})})});var eoe=W((Wq,Aut)=>{(function(e,t){typeof Wq=="object"&&typeof Aut!="undefined"?t(Wq,Tut()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(Wq,function(e,t){"use strict";function r(Le){return function(){return Le}}var i=Math.abs,n=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,l=Math.sin,u=Math.sqrt,c=1e-12,f=Math.PI,h=f/2,d=2*f;function p(Le){return Le>1?0:Le<-1?f:Math.acos(Le)}function v(Le){return Le>=1?h:Le<=-1?-h:Math.asin(Le)}function m(Le){return Le.innerRadius}function g(Le){return Le.outerRadius}function w(Le){return Le.startAngle}function b(Le){return Le.endAngle}function _(Le){return Le&&Le.padAngle}function M(Le,ot,lt,kt,Jt,Rt,Tr,Wt){var br=lt-Le,Xr=kt-ot,ti=Tr-Jt,Mi=Wt-Rt,an=Mi*br-ti*Xr;if(!(an*an<c))return an=(ti*(ot-Rt)-Mi*(Le-Jt))/an,[Le+an*br,ot+an*Xr]}function x(Le,ot,lt,kt,Jt,Rt,Tr){var Wt=Le-lt,br=ot-kt,Xr=(Tr?Rt:-Rt)/u(Wt*Wt+br*br),ti=Xr*br,Mi=-Xr*Wt,an=Le+ti,Gn=ot+Mi,yn=lt+ti,fa=kt+Mi,Wn=(an+yn)/2,Ja=(Gn+fa)/2,oo=yn-an,Ao=fa-Gn,Io=oo*oo+Ao*Ao,ps=Jt-Rt,rs=an*fa-yn*Gn,Mo=(Ao<0?-1:1)*u(o(0,ps*ps*Io-rs*rs)),is=(rs*Ao-oo*Mo)/Io,Ro=(-rs*oo-Ao*Mo)/Io,Uo=(rs*Ao+oo*Mo)/Io,so=(-rs*oo+Ao*Mo)/Io,In=is-Wn,va=Ro-Ja,vs=Uo-Wn,Zs=so-Ja;return In*In+va*va>vs*vs+Zs*Zs&&(is=Uo,Ro=so),{cx:is,cy:Ro,x01:-ti,y01:-Mi,x11:is*(Jt/ps-1),y11:Ro*(Jt/ps-1)}}function T(){var Le=m,ot=g,lt=r(0),kt=null,Jt=w,Rt=b,Tr=_,Wt=null;function br(){var Xr,ti,Mi=+Le.apply(this,arguments),an=+ot.apply(this,arguments),Gn=Jt.apply(this,arguments)-h,yn=Rt.apply(this,arguments)-h,fa=i(yn-Gn),Wn=yn>Gn;if(Wt||(Wt=Xr=t.path()),an<Mi&&(ti=an,an=Mi,Mi=ti),!(an>c))Wt.moveTo(0,0);else if(fa>d-c)Wt.moveTo(an*a(Gn),an*l(Gn)),Wt.arc(0,0,an,Gn,yn,!Wn),Mi>c&&(Wt.moveTo(Mi*a(yn),Mi*l(yn)),Wt.arc(0,0,Mi,yn,Gn,Wn));else{var Ja=Gn,oo=yn,Ao=Gn,Io=yn,ps=fa,rs=fa,Mo=Tr.apply(this,arguments)/2,is=Mo>c&&(kt?+kt.apply(this,arguments):u(Mi*Mi+an*an)),Ro=s(i(an-Mi)/2,+lt.apply(this,arguments)),Uo=Ro,so=Ro,In,va;if(is>c){var vs=v(is/Mi*l(Mo)),Zs=v(is/an*l(Mo));(ps-=vs*2)>c?(vs*=Wn?1:-1,Ao+=vs,Io-=vs):(ps=0,Ao=Io=(Gn+yn)/2),(rs-=Zs*2)>c?(Zs*=Wn?1:-1,Ja+=Zs,oo-=Zs):(rs=0,Ja=oo=(Gn+yn)/2)}var Ks=an*a(Ja),Ol=an*l(Ja),Js=Mi*a(Io),ru=Mi*l(Io);if(Ro>c){var xu=an*a(oo),_u=an*l(oo),dc=Mi*a(Ao),Nl=Mi*l(Ao),ja;if(fa<f&&(ja=M(Ks,Ol,dc,Nl,xu,_u,Js,ru))){var bu=Ks-ja[0],Hu=Ol-ja[1],Ss=xu-ja[0],iu=_u-ja[1],ph=1/l(p((bu*Ss+Hu*iu)/(u(bu*bu+Hu*Hu)*u(Ss*Ss+iu*iu)))/2),yo=u(ja[0]*ja[0]+ja[1]*ja[1]);Uo=s(Ro,(Mi-yo)/(ph-1)),so=s(Ro,(an-yo)/(ph+1))}}rs>c?so>c?(In=x(dc,Nl,Ks,Ol,an,so,Wn),va=x(xu,_u,Js,ru,an,so,Wn),Wt.moveTo(In.cx+In.x01,In.cy+In.y01),so<Ro?Wt.arc(In.cx,In.cy,so,n(In.y01,In.x01),n(va.y01,va.x01),!Wn):(Wt.arc(In.cx,In.cy,so,n(In.y01,In.x01),n(In.y11,In.x11),!Wn),Wt.arc(0,0,an,n(In.cy+In.y11,In.cx+In.x11),n(va.cy+va.y11,va.cx+va.x11),!Wn),Wt.arc(va.cx,va.cy,so,n(va.y11,va.x11),n(va.y01,va.x01),!Wn))):(Wt.moveTo(Ks,Ol),Wt.arc(0,0,an,Ja,oo,!Wn)):Wt.moveTo(Ks,Ol),!(Mi>c)||!(ps>c)?Wt.lineTo(Js,ru):Uo>c?(In=x(Js,ru,xu,_u,Mi,-Uo,Wn),va=x(Ks,Ol,dc,Nl,Mi,-Uo,Wn),Wt.lineTo(In.cx+In.x01,In.cy+In.y01),Uo<Ro?Wt.arc(In.cx,In.cy,Uo,n(In.y01,In.x01),n(va.y01,va.x01),!Wn):(Wt.arc(In.cx,In.cy,Uo,n(In.y01,In.x01),n(In.y11,In.x11),!Wn),Wt.arc(0,0,Mi,n(In.cy+In.y11,In.cx+In.x11),n(va.cy+va.y11,va.cx+va.x11),Wn),Wt.arc(va.cx,va.cy,Uo,n(va.y11,va.x11),n(va.y01,va.x01),!Wn))):Wt.arc(0,0,Mi,Io,Ao,Wn)}if(Wt.closePath(),Xr)return Wt=null,Xr+""||null}return br.centroid=function(){var Xr=(+Le.apply(this,arguments)+ +ot.apply(this,arguments))/2,ti=(+Jt.apply(this,arguments)+ +Rt.apply(this,arguments))/2-f/2;return[a(ti)*Xr,l(ti)*Xr]},br.innerRadius=function(Xr){return arguments.length?(Le=typeof Xr=="function"?Xr:r(+Xr),br):Le},br.outerRadius=function(Xr){return arguments.length?(ot=typeof Xr=="function"?Xr:r(+Xr),br):ot},br.cornerRadius=function(Xr){return arguments.length?(lt=typeof Xr=="function"?Xr:r(+Xr),br):lt},br.padRadius=function(Xr){return arguments.length?(kt=Xr==null?null:typeof Xr=="function"?Xr:r(+Xr),br):kt},br.startAngle=function(Xr){return arguments.length?(Jt=typeof Xr=="function"?Xr:r(+Xr),br):Jt},br.endAngle=function(Xr){return arguments.length?(Rt=typeof Xr=="function"?Xr:r(+Xr),br):Rt},br.padAngle=function(Xr){return arguments.length?(Tr=typeof Xr=="function"?Xr:r(+Xr),br):Tr},br.context=function(Xr){return arguments.length?(Wt=Xr==null?null:Xr,br):Wt},br}function A(Le){this._context=Le}A.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(Le,ot){switch(Le=+Le,ot=+ot,this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,ot):this._context.moveTo(Le,ot);break;case 1:this._point=2;default:this._context.lineTo(Le,ot);break}}};function y(Le){return new A(Le)}function E(Le){return Le[0]}function S(Le){return Le[1]}function C(){var Le=E,ot=S,lt=r(!0),kt=null,Jt=y,Rt=null;function Tr(Wt){var br,Xr=Wt.length,ti,Mi=!1,an;for(kt==null&&(Rt=Jt(an=t.path())),br=0;br<=Xr;++br)!(br<Xr&&lt(ti=Wt[br],br,Wt))===Mi&&((Mi=!Mi)?Rt.lineStart():Rt.lineEnd()),Mi&&Rt.point(+Le(ti,br,Wt),+ot(ti,br,Wt));if(an)return Rt=null,an+""||null}return Tr.x=function(Wt){return arguments.length?(Le=typeof Wt=="function"?Wt:r(+Wt),Tr):Le},Tr.y=function(Wt){return arguments.length?(ot=typeof Wt=="function"?Wt:r(+Wt),Tr):ot},Tr.defined=function(Wt){return arguments.length?(lt=typeof Wt=="function"?Wt:r(!!Wt),Tr):lt},Tr.curve=function(Wt){return arguments.length?(Jt=Wt,kt!=null&&(Rt=Jt(kt)),Tr):Jt},Tr.context=function(Wt){return arguments.length?(Wt==null?kt=Rt=null:Rt=Jt(kt=Wt),Tr):kt},Tr}function k(){var Le=E,ot=null,lt=r(0),kt=S,Jt=r(!0),Rt=null,Tr=y,Wt=null;function br(ti){var Mi,an,Gn,yn=ti.length,fa,Wn=!1,Ja,oo=new Array(yn),Ao=new Array(yn);for(Rt==null&&(Wt=Tr(Ja=t.path())),Mi=0;Mi<=yn;++Mi){if(!(Mi<yn&&Jt(fa=ti[Mi],Mi,ti))===Wn)if(Wn=!Wn)an=Mi,Wt.areaStart(),Wt.lineStart();else{for(Wt.lineEnd(),Wt.lineStart(),Gn=Mi-1;Gn>=an;--Gn)Wt.point(oo[Gn],Ao[Gn]);Wt.lineEnd(),Wt.areaEnd()}Wn&&(oo[Mi]=+Le(fa,Mi,ti),Ao[Mi]=+lt(fa,Mi,ti),Wt.point(ot?+ot(fa,Mi,ti):oo[Mi],kt?+kt(fa,Mi,ti):Ao[Mi]))}if(Ja)return Wt=null,Ja+""||null}function Xr(){return C().defined(Jt).curve(Tr).context(Rt)}return br.x=function(ti){return arguments.length?(Le=typeof ti=="function"?ti:r(+ti),ot=null,br):Le},br.x0=function(ti){return arguments.length?(Le=typeof ti=="function"?ti:r(+ti),br):Le},br.x1=function(ti){return arguments.length?(ot=ti==null?null:typeof ti=="function"?ti:r(+ti),br):ot},br.y=function(ti){return arguments.length?(lt=typeof ti=="function"?ti:r(+ti),kt=null,br):lt},br.y0=function(ti){return arguments.length?(lt=typeof ti=="function"?ti:r(+ti),br):lt},br.y1=function(ti){return arguments.length?(kt=ti==null?null:typeof ti=="function"?ti:r(+ti),br):kt},br.lineX0=br.lineY0=function(){return Xr().x(Le).y(lt)},br.lineY1=function(){return Xr().x(Le).y(kt)},br.lineX1=function(){return Xr().x(ot).y(lt)},br.defined=function(ti){return arguments.length?(Jt=typeof ti=="function"?ti:r(!!ti),br):Jt},br.curve=function(ti){return arguments.length?(Tr=ti,Rt!=null&&(Wt=Tr(Rt)),br):Tr},br.context=function(ti){return arguments.length?(ti==null?Rt=Wt=null:Wt=Tr(Rt=ti),br):Rt},br}function D(Le,ot){return ot<Le?-1:ot>Le?1:ot>=Le?0:NaN}function F(Le){return Le}function P(){var Le=F,ot=D,lt=null,kt=r(0),Jt=r(d),Rt=r(0);function Tr(Wt){var br,Xr=Wt.length,ti,Mi,an=0,Gn=new Array(Xr),yn=new Array(Xr),fa=+kt.apply(this,arguments),Wn=Math.min(d,Math.max(-d,Jt.apply(this,arguments)-fa)),Ja,oo=Math.min(Math.abs(Wn)/Xr,Rt.apply(this,arguments)),Ao=oo*(Wn<0?-1:1),Io;for(br=0;br<Xr;++br)(Io=yn[Gn[br]=br]=+Le(Wt[br],br,Wt))>0&&(an+=Io);for(ot!=null?Gn.sort(function(ps,rs){return ot(yn[ps],yn[rs])}):lt!=null&&Gn.sort(function(ps,rs){return lt(Wt[ps],Wt[rs])}),br=0,Mi=an?(Wn-Xr*Ao)/an:0;br<Xr;++br,fa=Ja)ti=Gn[br],Io=yn[ti],Ja=fa+(Io>0?Io*Mi:0)+Ao,yn[ti]={data:Wt[ti],index:br,value:Io,startAngle:fa,endAngle:Ja,padAngle:oo};return yn}return Tr.value=function(Wt){return arguments.length?(Le=typeof Wt=="function"?Wt:r(+Wt),Tr):Le},Tr.sortValues=function(Wt){return arguments.length?(ot=Wt,lt=null,Tr):ot},Tr.sort=function(Wt){return arguments.length?(lt=Wt,ot=null,Tr):lt},Tr.startAngle=function(Wt){return arguments.length?(kt=typeof Wt=="function"?Wt:r(+Wt),Tr):kt},Tr.endAngle=function(Wt){return arguments.length?(Jt=typeof Wt=="function"?Wt:r(+Wt),Tr):Jt},Tr.padAngle=function(Wt){return arguments.length?(Rt=typeof Wt=="function"?Wt:r(+Wt),Tr):Rt},Tr}var R=I(y);function L(Le){this._curve=Le}L.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Le,ot){this._curve.point(ot*Math.sin(Le),ot*-Math.cos(Le))}};function I(Le){function ot(lt){return new L(Le(lt))}return ot._curve=Le,ot}function B(Le){var ot=Le.curve;return Le.angle=Le.x,delete Le.x,Le.radius=Le.y,delete Le.y,Le.curve=function(lt){return arguments.length?ot(I(lt)):ot()._curve},Le}function O(){return B(C().curve(R))}function $(){var Le=k().curve(R),ot=Le.curve,lt=Le.lineX0,kt=Le.lineX1,Jt=Le.lineY0,Rt=Le.lineY1;return Le.angle=Le.x,delete Le.x,Le.startAngle=Le.x0,delete Le.x0,Le.endAngle=Le.x1,delete Le.x1,Le.radius=Le.y,delete Le.y,Le.innerRadius=Le.y0,delete Le.y0,Le.outerRadius=Le.y1,delete Le.y1,Le.lineStartAngle=function(){return B(lt())},delete Le.lineX0,Le.lineEndAngle=function(){return B(kt())},delete Le.lineX1,Le.lineInnerRadius=function(){return B(Jt())},delete Le.lineY0,Le.lineOuterRadius=function(){return B(Rt())},delete Le.lineY1,Le.curve=function(Tr){return arguments.length?ot(I(Tr)):ot()._curve},Le}function Y(Le,ot){return[(ot=+ot)*Math.cos(Le-=Math.PI/2),ot*Math.sin(Le)]}var K=Array.prototype.slice;function j(Le){return Le.source}function q(Le){return Le.target}function J(Le){var ot=j,lt=q,kt=E,Jt=S,Rt=null;function Tr(){var Wt,br=K.call(arguments),Xr=ot.apply(this,br),ti=lt.apply(this,br);if(Rt||(Rt=Wt=t.path()),Le(Rt,+kt.apply(this,(br[0]=Xr,br)),+Jt.apply(this,br),+kt.apply(this,(br[0]=ti,br)),+Jt.apply(this,br)),Wt)return Rt=null,Wt+""||null}return Tr.source=function(Wt){return arguments.length?(ot=Wt,Tr):ot},Tr.target=function(Wt){return arguments.length?(lt=Wt,Tr):lt},Tr.x=function(Wt){return arguments.length?(kt=typeof Wt=="function"?Wt:r(+Wt),Tr):kt},Tr.y=function(Wt){return arguments.length?(Jt=typeof Wt=="function"?Wt:r(+Wt),Tr):Jt},Tr.context=function(Wt){return arguments.length?(Rt=Wt==null?null:Wt,Tr):Rt},Tr}function U(Le,ot,lt,kt,Jt){Le.moveTo(ot,lt),Le.bezierCurveTo(ot=(ot+kt)/2,lt,ot,Jt,kt,Jt)}function V(Le,ot,lt,kt,Jt){Le.moveTo(ot,lt),Le.bezierCurveTo(ot,lt=(lt+Jt)/2,kt,lt,kt,Jt)}function X(Le,ot,lt,kt,Jt){var Rt=Y(ot,lt),Tr=Y(ot,lt=(lt+Jt)/2),Wt=Y(kt,lt),br=Y(kt,Jt);Le.moveTo(Rt[0],Rt[1]),Le.bezierCurveTo(Tr[0],Tr[1],Wt[0],Wt[1],br[0],br[1])}function H(){return J(U)}function G(){return J(V)}function Q(){var Le=J(X);return Le.angle=Le.x,delete Le.x,Le.radius=Le.y,delete Le.y,Le}var te={draw:function(Le,ot){var lt=Math.sqrt(ot/f);Le.moveTo(lt,0),Le.arc(0,0,lt,0,d)}},ce={draw:function(Le,ot){var lt=Math.sqrt(ot/5)/2;Le.moveTo(-3*lt,-lt),Le.lineTo(-lt,-lt),Le.lineTo(-lt,-3*lt),Le.lineTo(lt,-3*lt),Le.lineTo(lt,-lt),Le.lineTo(3*lt,-lt),Le.lineTo(3*lt,lt),Le.lineTo(lt,lt),Le.lineTo(lt,3*lt),Le.lineTo(-lt,3*lt),Le.lineTo(-lt,lt),Le.lineTo(-3*lt,lt),Le.closePath()}},ge=Math.sqrt(1/3),Ce=ge*2,be={draw:function(Le,ot){var lt=Math.sqrt(ot/Ce),kt=lt*ge;Le.moveTo(0,-lt),Le.lineTo(kt,0),Le.lineTo(0,lt),Le.lineTo(-kt,0),Le.closePath()}},he=.8908130915292852,oe=Math.sin(f/10)/Math.sin(7*f/10),Ee=Math.sin(d/10)*oe,ye=-Math.cos(d/10)*oe,ue={draw:function(Le,ot){var lt=Math.sqrt(ot*he),kt=Ee*lt,Jt=ye*lt;Le.moveTo(0,-lt),Le.lineTo(kt,Jt);for(var Rt=1;Rt<5;++Rt){var Tr=d*Rt/5,Wt=Math.cos(Tr),br=Math.sin(Tr);Le.lineTo(br*lt,-Wt*lt),Le.lineTo(Wt*kt-br*Jt,br*kt+Wt*Jt)}Le.closePath()}},ee={draw:function(Le,ot){var lt=Math.sqrt(ot),kt=-lt/2;Le.rect(kt,kt,lt,lt)}},ae=Math.sqrt(3),xe={draw:function(Le,ot){var lt=-Math.sqrt(ot/(ae*3));Le.moveTo(0,lt*2),Le.lineTo(-ae*lt,-lt),Le.lineTo(ae*lt,-lt),Le.closePath()}},re=-.5,pe=Math.sqrt(3)/2,we=1/Math.sqrt(12),Fe=(we/2+1)*3,Se={draw:function(Le,ot){var lt=Math.sqrt(ot/Fe),kt=lt/2,Jt=lt*we,Rt=kt,Tr=lt*we+lt,Wt=-Rt,br=Tr;Le.moveTo(kt,Jt),Le.lineTo(Rt,Tr),Le.lineTo(Wt,br),Le.lineTo(re*kt-pe*Jt,pe*kt+re*Jt),Le.lineTo(re*Rt-pe*Tr,pe*Rt+re*Tr),Le.lineTo(re*Wt-pe*br,pe*Wt+re*br),Le.lineTo(re*kt+pe*Jt,re*Jt-pe*kt),Le.lineTo(re*Rt+pe*Tr,re*Tr-pe*Rt),Le.lineTo(re*Wt+pe*br,re*br-pe*Wt),Le.closePath()}},ke=[te,ce,be,ee,ue,xe,Se];function _e(){var Le=r(te),ot=r(64),lt=null;function kt(){var Jt;if(lt||(lt=Jt=t.path()),Le.apply(this,arguments).draw(lt,+ot.apply(this,arguments)),Jt)return lt=null,Jt+""||null}return kt.type=function(Jt){return arguments.length?(Le=typeof Jt=="function"?Jt:r(Jt),kt):Le},kt.size=function(Jt){return arguments.length?(ot=typeof Jt=="function"?Jt:r(+Jt),kt):ot},kt.context=function(Jt){return arguments.length?(lt=Jt==null?null:Jt,kt):lt},kt}function Ie(){}function Oe(Le,ot,lt){Le._context.bezierCurveTo((2*Le._x0+Le._x1)/3,(2*Le._y0+Le._y1)/3,(Le._x0+2*Le._x1)/3,(Le._y0+2*Le._y1)/3,(Le._x0+4*Le._x1+ot)/6,(Le._y0+4*Le._y1+lt)/6)}function Qe(Le){this._context=Le}Qe.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:Oe(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(Le,ot){switch(Le=+Le,ot=+ot,this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,ot):this._context.moveTo(Le,ot);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:Oe(this,Le,ot);break}this._x0=this._x1,this._x1=Le,this._y0=this._y1,this._y1=ot}};function et(Le){return new Qe(Le)}function _t(Le){this._context=Le}_t.prototype={areaStart:Ie,areaEnd:Ie,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(Le,ot){switch(Le=+Le,ot=+ot,this._point){case 0:this._point=1,this._x2=Le,this._y2=ot;break;case 1:this._point=2,this._x3=Le,this._y3=ot;break;case 2:this._point=3,this._x4=Le,this._y4=ot,this._context.moveTo((this._x0+4*this._x1+Le)/6,(this._y0+4*this._y1+ot)/6);break;default:Oe(this,Le,ot);break}this._x0=this._x1,this._x1=Le,this._y0=this._y1,this._y1=ot}};function ut(Le){return new _t(Le)}function vt(Le){this._context=Le}vt.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(Le,ot){switch(Le=+Le,ot=+ot,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var lt=(this._x0+4*this._x1+Le)/6,kt=(this._y0+4*this._y1+ot)/6;this._line?this._context.lineTo(lt,kt):this._context.moveTo(lt,kt);break;case 3:this._point=4;default:Oe(this,Le,ot);break}this._x0=this._x1,this._x1=Le,this._y0=this._y1,this._y1=ot}};function Xe(Le){return new vt(Le)}function mt(Le,ot){this._basis=new Qe(Le),this._beta=ot}mt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Le=this._x,ot=this._y,lt=Le.length-1;if(lt>0)for(var kt=Le[0],Jt=ot[0],Rt=Le[lt]-kt,Tr=ot[lt]-Jt,Wt=-1,br;++Wt<=lt;)br=Wt/lt,this._basis.point(this._beta*Le[Wt]+(1-this._beta)*(kt+br*Rt),this._beta*ot[Wt]+(1-this._beta)*(Jt+br*Tr));this._x=this._y=null,this._basis.lineEnd()},point:function(Le,ot){this._x.push(+Le),this._y.push(+ot)}};var bt=(function Le(ot){function lt(kt){return ot===1?new Qe(kt):new mt(kt,ot)}return lt.beta=function(kt){return Le(+kt)},lt})(.85);function Ne(Le,ot,lt){Le._context.bezierCurveTo(Le._x1+Le._k*(Le._x2-Le._x0),Le._y1+Le._k*(Le._y2-Le._y0),Le._x2+Le._k*(Le._x1-ot),Le._y2+Le._k*(Le._y1-lt),Le._x2,Le._y2)}function Ue(Le,ot){this._context=Le,this._k=(1-ot)/6}Ue.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:Ne(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Le,ot){switch(Le=+Le,ot=+ot,this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,ot):this._context.moveTo(Le,ot);break;case 1:this._point=2,this._x1=Le,this._y1=ot;break;case 2:this._point=3;default:Ne(this,Le,ot);break}this._x0=this._x1,this._x1=this._x2,this._x2=Le,this._y0=this._y1,this._y1=this._y2,this._y2=ot}};var Ge=(function Le(ot){function lt(kt){return new Ue(kt,ot)}return lt.tension=function(kt){return Le(+kt)},lt})(0);function je(Le,ot){this._context=Le,this._k=(1-ot)/6}je.prototype={areaStart:Ie,areaEnd:Ie,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(Le,ot){switch(Le=+Le,ot=+ot,this._point){case 0:this._point=1,this._x3=Le,this._y3=ot;break;case 1:this._point=2,this._context.moveTo(this._x4=Le,this._y4=ot);break;case 2:this._point=3,this._x5=Le,this._y5=ot;break;default:Ne(this,Le,ot);break}this._x0=this._x1,this._x1=this._x2,this._x2=Le,this._y0=this._y1,this._y1=this._y2,this._y2=ot}};var Re=(function Le(ot){function lt(kt){return new je(kt,ot)}return lt.tension=function(kt){return Le(+kt)},lt})(0);function Ve(Le,ot){this._context=Le,this._k=(1-ot)/6}Ve.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(Le,ot){switch(Le=+Le,ot=+ot,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:Ne(this,Le,ot);break}this._x0=this._x1,this._x1=this._x2,this._x2=Le,this._y0=this._y1,this._y1=this._y2,this._y2=ot}};var ct=(function Le(ot){function lt(kt){return new Ve(kt,ot)}return lt.tension=function(kt){return Le(+kt)},lt})(0);function Tt(Le,ot,lt){var kt=Le._x1,Jt=Le._y1,Rt=Le._x2,Tr=Le._y2;if(Le._l01_a>c){var Wt=2*Le._l01_2a+3*Le._l01_a*Le._l12_a+Le._l12_2a,br=3*Le._l01_a*(Le._l01_a+Le._l12_a);kt=(kt*Wt-Le._x0*Le._l12_2a+Le._x2*Le._l01_2a)/br,Jt=(Jt*Wt-Le._y0*Le._l12_2a+Le._y2*Le._l01_2a)/br}if(Le._l23_a>c){var Xr=2*Le._l23_2a+3*Le._l23_a*Le._l12_a+Le._l12_2a,ti=3*Le._l23_a*(Le._l23_a+Le._l12_a);Rt=(Rt*Xr+Le._x1*Le._l23_2a-ot*Le._l12_2a)/ti,Tr=(Tr*Xr+Le._y1*Le._l23_2a-lt*Le._l12_2a)/ti}Le._context.bezierCurveTo(kt,Jt,Rt,Tr,Le._x2,Le._y2)}function Xt(Le,ot){this._context=Le,this._alpha=ot}Xt.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(Le,ot){if(Le=+Le,ot=+ot,this._point){var lt=this._x2-Le,kt=this._y2-ot;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(lt*lt+kt*kt,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,ot):this._context.moveTo(Le,ot);break;case 1:this._point=2;break;case 2:this._point=3;default:Tt(this,Le,ot);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=Le,this._y0=this._y1,this._y1=this._y2,this._y2=ot}};var Vt=(function Le(ot){function lt(kt){return ot?new Xt(kt,ot):new Ue(kt,0)}return lt.alpha=function(kt){return Le(+kt)},lt})(.5);function lr(Le,ot){this._context=Le,this._alpha=ot}lr.prototype={areaStart:Ie,areaEnd:Ie,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(Le,ot){if(Le=+Le,ot=+ot,this._point){var lt=this._x2-Le,kt=this._y2-ot;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(lt*lt+kt*kt,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Le,this._y3=ot;break;case 1:this._point=2,this._context.moveTo(this._x4=Le,this._y4=ot);break;case 2:this._point=3,this._x5=Le,this._y5=ot;break;default:Tt(this,Le,ot);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=Le,this._y0=this._y1,this._y1=this._y2,this._y2=ot}};var ur=(function Le(ot){function lt(kt){return ot?new lr(kt,ot):new je(kt,0)}return lt.alpha=function(kt){return Le(+kt)},lt})(.5);function Bt(Le,ot){this._context=Le,this._alpha=ot}Bt.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(Le,ot){if(Le=+Le,ot=+ot,this._point){var lt=this._x2-Le,kt=this._y2-ot;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(lt*lt+kt*kt,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:Tt(this,Le,ot);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=Le,this._y0=this._y1,this._y1=this._y2,this._y2=ot}};var Zt=(function Le(ot){function lt(kt){return ot?new Bt(kt,ot):new Ve(kt,0)}return lt.alpha=function(kt){return Le(+kt)},lt})(.5);function kr(Le){this._context=Le}kr.prototype={areaStart:Ie,areaEnd:Ie,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Le,ot){Le=+Le,ot=+ot,this._point?this._context.lineTo(Le,ot):(this._point=1,this._context.moveTo(Le,ot))}};function $e(Le){return new kr(Le)}function tt(Le){return Le<0?-1:1}function st(Le,ot,lt){var kt=Le._x1-Le._x0,Jt=ot-Le._x1,Rt=(Le._y1-Le._y0)/(kt||Jt<0&&-0),Tr=(lt-Le._y1)/(Jt||kt<0&&-0),Wt=(Rt*Jt+Tr*kt)/(kt+Jt);return(tt(Rt)+tt(Tr))*Math.min(Math.abs(Rt),Math.abs(Tr),.5*Math.abs(Wt))||0}function xt(Le,ot){var lt=Le._x1-Le._x0;return lt?(3*(Le._y1-Le._y0)/lt-ot)/2:ot}function Je(Le,ot,lt){var kt=Le._x0,Jt=Le._y0,Rt=Le._x1,Tr=Le._y1,Wt=(Rt-kt)/3;Le._context.bezierCurveTo(kt+Wt,Jt+Wt*ot,Rt-Wt,Tr-Wt*lt,Rt,Tr)}function Ct(Le){this._context=Le}Ct.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:Je(this,this._t0,xt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Le,ot){var lt=NaN;if(Le=+Le,ot=+ot,!(Le===this._x1&&ot===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,ot):this._context.moveTo(Le,ot);break;case 1:this._point=2;break;case 2:this._point=3,Je(this,xt(this,lt=st(this,Le,ot)),lt);break;default:Je(this,this._t0,lt=st(this,Le,ot));break}this._x0=this._x1,this._x1=Le,this._y0=this._y1,this._y1=ot,this._t0=lt}}};function ir(Le){this._context=new hr(Le)}(ir.prototype=Object.create(Ct.prototype)).point=function(Le,ot){Ct.prototype.point.call(this,ot,Le)};function hr(Le){this._context=Le}hr.prototype={moveTo:function(Le,ot){this._context.moveTo(ot,Le)},closePath:function(){this._context.closePath()},lineTo:function(Le,ot){this._context.lineTo(ot,Le)},bezierCurveTo:function(Le,ot,lt,kt,Jt,Rt){this._context.bezierCurveTo(ot,Le,kt,lt,Rt,Jt)}};function Ur(Le){return new Ct(Le)}function si(Le){return new ir(Le)}function ei(Le){this._context=Le}ei.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Le=this._x,ot=this._y,lt=Le.length;if(lt)if(this._line?this._context.lineTo(Le[0],ot[0]):this._context.moveTo(Le[0],ot[0]),lt===2)this._context.lineTo(Le[1],ot[1]);else for(var kt=Lr(Le),Jt=Lr(ot),Rt=0,Tr=1;Tr<lt;++Rt,++Tr)this._context.bezierCurveTo(kt[0][Rt],Jt[0][Rt],kt[1][Rt],Jt[1][Rt],Le[Tr],ot[Tr]);(this._line||this._line!==0&&lt===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(Le,ot){this._x.push(+Le),this._y.push(+ot)}};function Lr(Le){var ot,lt=Le.length-1,kt,Jt=new Array(lt),Rt=new Array(lt),Tr=new Array(lt);for(Jt[0]=0,Rt[0]=2,Tr[0]=Le[0]+2*Le[1],ot=1;ot<lt-1;++ot)Jt[ot]=1,Rt[ot]=4,Tr[ot]=4*Le[ot]+2*Le[ot+1];for(Jt[lt-1]=2,Rt[lt-1]=7,Tr[lt-1]=8*Le[lt-1]+Le[lt],ot=1;ot<lt;++ot)kt=Jt[ot]/Rt[ot-1],Rt[ot]-=kt,Tr[ot]-=kt*Tr[ot-1];for(Jt[lt-1]=Tr[lt-1]/Rt[lt-1],ot=lt-2;ot>=0;--ot)Jt[ot]=(Tr[ot]-Jt[ot+1])/Rt[ot];for(Rt[lt-1]=(Le[lt]+Jt[lt-1])/2,ot=0;ot<lt-1;++ot)Rt[ot]=2*Le[ot+1]-Jt[ot+1];return[Jt,Rt]}function $i(Le){return new ei(Le)}function Tn(Le,ot){this._context=Le,this._t=ot}Tn.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(Le,ot){switch(Le=+Le,ot=+ot,this._point){case 0:this._point=1,this._line?this._context.lineTo(Le,ot):this._context.moveTo(Le,ot);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,ot),this._context.lineTo(Le,ot);else{var lt=this._x*(1-this._t)+Le*this._t;this._context.lineTo(lt,this._y),this._context.lineTo(lt,ot)}break}}this._x=Le,this._y=ot}};function hn(Le){return new Tn(Le,.5)}function ta(Le){return new Tn(Le,0)}function ca(Le){return new Tn(Le,1)}function dn(Le,ot){if((Tr=Le.length)>1)for(var lt=1,kt,Jt,Rt=Le[ot[0]],Tr,Wt=Rt.length;lt<Tr;++lt)for(Jt=Rt,Rt=Le[ot[lt]],kt=0;kt<Wt;++kt)Rt[kt][1]+=Rt[kt][0]=isNaN(Jt[kt][1])?Jt[kt][0]:Jt[kt][1]}function Vn(Le){for(var ot=Le.length,lt=new Array(ot);--ot>=0;)lt[ot]=ot;return lt}function ra(Le,ot){return Le[ot]}function ds(){var Le=r([]),ot=Vn,lt=dn,kt=ra;function Jt(Rt){var Tr=Le.apply(this,arguments),Wt,br=Rt.length,Xr=Tr.length,ti=new Array(Xr),Mi;for(Wt=0;Wt<Xr;++Wt){for(var an=Tr[Wt],Gn=ti[Wt]=new Array(br),yn=0,fa;yn<br;++yn)Gn[yn]=fa=[0,+kt(Rt[yn],an,yn,Rt)],fa.data=Rt[yn];Gn.key=an}for(Wt=0,Mi=ot(ti);Wt<Xr;++Wt)ti[Mi[Wt]].index=Wt;return lt(ti,Mi),ti}return Jt.keys=function(Rt){return arguments.length?(Le=typeof Rt=="function"?Rt:r(K.call(Rt)),Jt):Le},Jt.value=function(Rt){return arguments.length?(kt=typeof Rt=="function"?Rt:r(+Rt),Jt):kt},Jt.order=function(Rt){return arguments.length?(ot=Rt==null?Vn:typeof Rt=="function"?Rt:r(K.call(Rt)),Jt):ot},Jt.offset=function(Rt){return arguments.length?(lt=Rt==null?dn:Rt,Jt):lt},Jt}function mo(Le,ot){if((kt=Le.length)>0){for(var lt,kt,Jt=0,Rt=Le[0].length,Tr;Jt<Rt;++Jt){for(Tr=lt=0;lt<kt;++lt)Tr+=Le[lt][Jt][1]||0;if(Tr)for(lt=0;lt<kt;++lt)Le[lt][Jt][1]/=Tr}dn(Le,ot)}}function Rs(Le,ot){if((br=Le.length)>0)for(var lt,kt=0,Jt,Rt,Tr,Wt,br,Xr=Le[ot[0]].length;kt<Xr;++kt)for(Tr=Wt=0,lt=0;lt<br;++lt)(Rt=(Jt=Le[ot[lt]][kt])[1]-Jt[0])>0?(Jt[0]=Tr,Jt[1]=Tr+=Rt):Rt<0?(Jt[1]=Wt,Jt[0]=Wt+=Rt):(Jt[0]=0,Jt[1]=Rt)}function ho(Le,ot){if((Jt=Le.length)>0){for(var lt=0,kt=Le[ot[0]],Jt,Rt=kt.length;lt<Rt;++lt){for(var Tr=0,Wt=0;Tr<Jt;++Tr)Wt+=Le[Tr][lt][1]||0;kt[lt][1]+=kt[lt][0]=-Wt/2}dn(Le,ot)}}function ka(Le,ot){if(!(!((Tr=Le.length)>0)||!((Rt=(Jt=Le[ot[0]]).length)>0))){for(var lt=0,kt=1,Jt,Rt,Tr;kt<Rt;++kt){for(var Wt=0,br=0,Xr=0;Wt<Tr;++Wt){for(var ti=Le[ot[Wt]],Mi=ti[kt][1]||0,an=ti[kt-1][1]||0,Gn=(Mi-an)/2,yn=0;yn<Wt;++yn){var fa=Le[ot[yn]],Wn=fa[kt][1]||0,Ja=fa[kt-1][1]||0;Gn+=Wn-Ja}br+=Mi,Xr+=Gn*Mi}Jt[kt-1][1]+=Jt[kt-1][0]=lt,br&&(lt-=Xr/br)}Jt[kt-1][1]+=Jt[kt-1][0]=lt,dn(Le,ot)}}function ao(Le){var ot=Le.map(zs);return Vn(Le).sort(function(lt,kt){return ot[lt]-ot[kt]})}function zs(Le){for(var ot=-1,lt=0,kt=Le.length,Jt,Rt=-1/0;++ot<kt;)(Jt=+Le[ot][1])>Rt&&(Rt=Jt,lt=ot);return lt}function _a(Le){var ot=Le.map(Xs);return Vn(Le).sort(function(lt,kt){return ot[lt]-ot[kt]})}function Xs(Le){for(var ot=0,lt=-1,kt=Le.length,Jt;++lt<kt;)(Jt=+Le[lt][1])&&(ot+=Jt);return ot}function _l(Le){return _a(Le).reverse()}function yu(Le){var ot=Le.length,lt,kt,Jt=Le.map(Xs),Rt=ao(Le),Tr=0,Wt=0,br=[],Xr=[];for(lt=0;lt<ot;++lt)kt=Rt[lt],Tr<Wt?(Tr+=Jt[kt],br.push(kt)):(Wt+=Jt[kt],Xr.push(kt));return Xr.reverse().concat(br)}function ul(Le){return Vn(Le).reverse()}e.arc=T,e.area=k,e.areaRadial=$,e.curveBasis=et,e.curveBasisClosed=ut,e.curveBasisOpen=Xe,e.curveBundle=bt,e.curveCardinal=Ge,e.curveCardinalClosed=Re,e.curveCardinalOpen=ct,e.curveCatmullRom=Vt,e.curveCatmullRomClosed=ur,e.curveCatmullRomOpen=Zt,e.curveLinear=y,e.curveLinearClosed=$e,e.curveMonotoneX=Ur,e.curveMonotoneY=si,e.curveNatural=$i,e.curveStep=hn,e.curveStepAfter=ca,e.curveStepBefore=ta,e.line=C,e.lineRadial=O,e.linkHorizontal=H,e.linkRadial=Q,e.linkVertical=G,e.pie=P,e.pointRadial=Y,e.radialArea=$,e.radialLine=O,e.stack=ds,e.stackOffsetDiverging=Rs,e.stackOffsetExpand=mo,e.stackOffsetNone=dn,e.stackOffsetSilhouette=ho,e.stackOffsetWiggle=ka,e.stackOrderAppearance=ao,e.stackOrderAscending=_a,e.stackOrderDescending=_l,e.stackOrderInsideOut=yu,e.stackOrderNone=Vn,e.stackOrderReverse=ul,e.symbol=_e,e.symbolCircle=te,e.symbolCross=ce,e.symbolDiamond=be,e.symbolSquare=ee,e.symbolStar=ue,e.symbolTriangle=xe,e.symbolWye=Se,e.symbols=ke,Object.defineProperty(e,"__esModule",{value:!0})})});var Sut=W((Yq,Mut)=>{(function(e,t){typeof Yq=="object"&&typeof Mut!="undefined"?t(Yq,but(),eoe()):(e=e||self,t(e.d3=e.d3||{},e.d3,e.d3))})(Yq,function(e,t,r){"use strict";function i(x){return x.target.depth}function n(x){return x.depth}function a(x,T){return T-1-x.height}function o(x,T){return x.sourceLinks.length?x.depth:T-1}function s(x){return x.targetLinks.length?x.depth:x.sourceLinks.length?t.min(x.sourceLinks,i)-1:0}function l(x){return function(){return x}}function u(x,T){return f(x.source,T.source)||x.index-T.index}function c(x,T){return f(x.target,T.target)||x.index-T.index}function f(x,T){return x.y0-T.y0}function h(x){return x.value}function d(x){return x.index}function p(x){return x.nodes}function v(x){return x.links}function m(x,T){let A=x.get(T);if(!A)throw new Error("missing: "+T);return A}function g({nodes:x}){for(let T of x){let A=T.y0,y=A;for(let E of T.sourceLinks)E.y0=A+E.width/2,A+=E.width;for(let E of T.targetLinks)E.y1=y+E.width/2,y+=E.width}}function w(){let x=0,T=0,A=1,y=1,E=24,S=8,C,k=d,D=o,F,P,R=p,L=v,I=6,B=2/3;function O(){let be={nodes:R.apply(null,arguments),links:L.apply(null,arguments)};return $(be),Y(be),K(be),j(be),U(be),g(be),be}O.update=function(be){return g(be),be},O.nodeId=function(be){return arguments.length?(k=typeof be=="function"?be:l(be),O):k},O.nodeAlign=function(be){return arguments.length?(D=typeof be=="function"?be:l(be),O):D},O.nodeSort=function(be){return arguments.length?(F=be,O):F},O.nodeWidth=function(be){return arguments.length?(E=+be,O):E},O.nodePadding=function(be){return arguments.length?(S=C=+be,O):S},O.nodes=function(be){return arguments.length?(R=typeof be=="function"?be:l(be),O):R},O.links=function(be){return arguments.length?(L=typeof be=="function"?be:l(be),O):L},O.linkSort=function(be){return arguments.length?(P=be,O):P},O.size=function(be){return arguments.length?(x=T=0,A=+be[0],y=+be[1],O):[A-x,y-T]},O.extent=function(be){return arguments.length?(x=+be[0][0],A=+be[1][0],T=+be[0][1],y=+be[1][1],O):[[x,T],[A,y]]},O.iterations=function(be){return arguments.length?(I=+be,O):I};function $({nodes:be,links:he}){for(let[Ee,ye]of be.entries())ye.index=Ee,ye.sourceLinks=[],ye.targetLinks=[];let oe=new Map(be.map((Ee,ye)=>[k(Ee,ye,be),Ee]));for(let[Ee,ye]of he.entries()){ye.index=Ee;let{source:ue,target:ee}=ye;typeof ue!="object"&&(ue=ye.source=m(oe,ue)),typeof ee!="object"&&(ee=ye.target=m(oe,ee)),ue.sourceLinks.push(ye),ee.targetLinks.push(ye)}if(P!=null)for(let{sourceLinks:Ee,targetLinks:ye}of be)Ee.sort(P),ye.sort(P)}function Y({nodes:be}){for(let he of be)he.value=he.fixedValue===void 0?Math.max(t.sum(he.sourceLinks,h),t.sum(he.targetLinks,h)):he.fixedValue}function K({nodes:be}){let he=be.length,oe=new Set(be),Ee=new Set,ye=0;for(;oe.size;){for(let ue of oe){ue.depth=ye;for(let{target:ee}of ue.sourceLinks)Ee.add(ee)}if(++ye>he)throw new Error("circular link");oe=Ee,Ee=new Set}}function j({nodes:be}){let he=be.length,oe=new Set(be),Ee=new Set,ye=0;for(;oe.size;){for(let ue of oe){ue.height=ye;for(let{source:ee}of ue.targetLinks)Ee.add(ee)}if(++ye>he)throw new Error("circular link");oe=Ee,Ee=new Set}}function q({nodes:be}){let he=t.max(be,ye=>ye.depth)+1,oe=(A-x-E)/(he-1),Ee=new Array(he);for(let ye of be){let ue=Math.max(0,Math.min(he-1,Math.floor(D.call(null,ye,he))));ye.layer=ue,ye.x0=x+ue*oe,ye.x1=ye.x0+E,Ee[ue]?Ee[ue].push(ye):Ee[ue]=[ye]}if(F)for(let ye of Ee)ye.sort(F);return Ee}function J(be){let he=t.min(be,oe=>(y-T-(oe.length-1)*C)/t.sum(oe,h));for(let oe of be){let Ee=T;for(let ye of oe){ye.y0=Ee,ye.y1=Ee+ye.value*he,Ee=ye.y1+C;for(let ue of ye.sourceLinks)ue.width=ue.value*he}Ee=(y-Ee+C)/(oe.length+1);for(let ye=0;ye<oe.length;++ye){let ue=oe[ye];ue.y0+=Ee*(ye+1),ue.y1+=Ee*(ye+1)}ce(oe)}}function U(be){let he=q(be);C=Math.min(S,B*(y-T)/(t.max(he,oe=>oe.length)-1)),J(he);for(let oe=0;oe<I;++oe){let Ee=Math.pow(.99,oe),ye=Math.max(1-Ee,(oe+1)/I);X(he,Ee,ye),V(he,Ee,ye)}}function V(be,he,oe){for(let Ee=1,ye=be.length;Ee<ye;++Ee){let ue=be[Ee];for(let ee of ue){let ae=0,xe=0;for(let{source:pe,value:we}of ee.targetLinks){let Fe=we*(ee.layer-pe.layer);ae+=ge(pe,ee)*Fe,xe+=Fe}if(!(xe>0))continue;let re=(ae/xe-ee.y0)*he;ee.y0+=re,ee.y1+=re,te(ee)}F===void 0&&ue.sort(f),H(ue,oe)}}function X(be,he,oe){for(let Ee=be.length,ye=Ee-2;ye>=0;--ye){let ue=be[ye];for(let ee of ue){let ae=0,xe=0;for(let{target:pe,value:we}of ee.sourceLinks){let Fe=we*(pe.layer-ee.layer);ae+=Ce(ee,pe)*Fe,xe+=Fe}if(!(xe>0))continue;let re=(ae/xe-ee.y0)*he;ee.y0+=re,ee.y1+=re,te(ee)}F===void 0&&ue.sort(f),H(ue,oe)}}function H(be,he){let oe=be.length>>1,Ee=be[oe];Q(be,Ee.y0-C,oe-1,he),G(be,Ee.y1+C,oe+1,he),Q(be,y,be.length-1,he),G(be,T,0,he)}function G(be,he,oe,Ee){for(;oe<be.length;++oe){let ye=be[oe],ue=(he-ye.y0)*Ee;ue>1e-6&&(ye.y0+=ue,ye.y1+=ue),he=ye.y1+C}}function Q(be,he,oe,Ee){for(;oe>=0;--oe){let ye=be[oe],ue=(ye.y1-he)*Ee;ue>1e-6&&(ye.y0-=ue,ye.y1-=ue),he=ye.y0-C}}function te({sourceLinks:be,targetLinks:he}){if(P===void 0){for(let{source:{sourceLinks:oe}}of he)oe.sort(c);for(let{target:{targetLinks:oe}}of be)oe.sort(u)}}function ce(be){if(P===void 0)for(let{sourceLinks:he,targetLinks:oe}of be)he.sort(c),oe.sort(u)}function ge(be,he){let oe=be.y0-(be.sourceLinks.length-1)*C/2;for(let{target:Ee,width:ye}of be.sourceLinks){if(Ee===he)break;oe+=ye+C}for(let{source:Ee,width:ye}of he.targetLinks){if(Ee===be)break;oe-=ye}return oe}function Ce(be,he){let oe=he.y0-(he.targetLinks.length-1)*C/2;for(let{source:Ee,width:ye}of he.targetLinks){if(Ee===be)break;oe+=ye+C}for(let{target:Ee,width:ye}of be.sourceLinks){if(Ee===he)break;oe-=ye}return oe}return O}function b(x){return[x.source.x1,x.y0]}function _(x){return[x.target.x0,x.y1]}function M(){return r.linkHorizontal().source(b).target(_)}e.sankey=w,e.sankeyCenter=s,e.sankeyJustify=o,e.sankeyLeft=n,e.sankeyLinkHorizontal=M,e.sankeyRight=a,Object.defineProperty(e,"__esModule",{value:!0})})});var kut=W((Xq,Eut)=>{(function(e,t){t(typeof Xq=="object"&&typeof Eut!="undefined"?Xq:e.d3=e.d3||{})})(Xq,(function(e){"use strict";function t(U,V){return U<V?-1:U>V?1:U>=V?0:NaN}function r(U){return U.length===1&&(U=i(U)),{left:function(V,X,H,G){for(H==null&&(H=0),G==null&&(G=V.length);H<G;){var Q=H+G>>>1;U(V[Q],X)<0?H=Q+1:G=Q}return H},right:function(V,X,H,G){for(H==null&&(H=0),G==null&&(G=V.length);H<G;){var Q=H+G>>>1;U(V[Q],X)>0?G=Q:H=Q+1}return H}}}function i(U){return function(V,X){return t(U(V),X)}}var n=r(t),a=n.right,o=n.left;function s(U,V){V==null&&(V=l);for(var X=0,H=U.length-1,G=U[0],Q=new Array(H<0?0:H);X<H;)Q[X]=V(G,G=U[++X]);return Q}function l(U,V){return[U,V]}function u(U,V,X){var H=U.length,G=V.length,Q=new Array(H*G),te,ce,ge,Ce;for(X==null&&(X=l),te=ge=0;te<H;++te)for(Ce=U[te],ce=0;ce<G;++ce,++ge)Q[ge]=X(Ce,V[ce]);return Q}function c(U,V){return V<U?-1:V>U?1:V>=U?0:NaN}function f(U){return U===null?NaN:+U}function h(U,V){var X=U.length,H=0,G=-1,Q=0,te,ce,ge=0;if(V==null)for(;++G<X;)isNaN(te=f(U[G]))||(ce=te-Q,Q+=ce/++H,ge+=ce*(te-Q));else for(;++G<X;)isNaN(te=f(V(U[G],G,U)))||(ce=te-Q,Q+=ce/++H,ge+=ce*(te-Q));if(H>1)return ge/(H-1)}function d(U,V){var X=h(U,V);return X&&Math.sqrt(X)}function p(U,V){var X=U.length,H=-1,G,Q,te;if(V==null){for(;++H<X;)if((G=U[H])!=null&&G>=G)for(Q=te=G;++H<X;)(G=U[H])!=null&&(Q>G&&(Q=G),te<G&&(te=G))}else for(;++H<X;)if((G=V(U[H],H,U))!=null&&G>=G)for(Q=te=G;++H<X;)(G=V(U[H],H,U))!=null&&(Q>G&&(Q=G),te<G&&(te=G));return[Q,te]}var v=Array.prototype,m=v.slice,g=v.map;function w(U){return function(){return U}}function b(U){return U}function _(U,V,X){U=+U,V=+V,X=(G=arguments.length)<2?(V=U,U=0,1):G<3?1:+X;for(var H=-1,G=Math.max(0,Math.ceil((V-U)/X))|0,Q=new Array(G);++H<G;)Q[H]=U+H*X;return Q}var M=Math.sqrt(50),x=Math.sqrt(10),T=Math.sqrt(2);function A(U,V,X){var H,G=-1,Q,te,ce;if(V=+V,U=+U,X=+X,U===V&&X>0)return[U];if((H=V<U)&&(Q=U,U=V,V=Q),(ce=y(U,V,X))===0||!isFinite(ce))return[];if(ce>0)for(U=Math.ceil(U/ce),V=Math.floor(V/ce),te=new Array(Q=Math.ceil(V-U+1));++G<Q;)te[G]=(U+G)*ce;else for(U=Math.floor(U*ce),V=Math.ceil(V*ce),te=new Array(Q=Math.ceil(U-V+1));++G<Q;)te[G]=(U-G)/ce;return H&&te.reverse(),te}function y(U,V,X){var H=(V-U)/Math.max(0,X),G=Math.floor(Math.log(H)/Math.LN10),Q=H/Math.pow(10,G);return G>=0?(Q>=M?10:Q>=x?5:Q>=T?2:1)*Math.pow(10,G):-Math.pow(10,-G)/(Q>=M?10:Q>=x?5:Q>=T?2:1)}function E(U,V,X){var H=Math.abs(V-U)/Math.max(0,X),G=Math.pow(10,Math.floor(Math.log(H)/Math.LN10)),Q=H/G;return Q>=M?G*=10:Q>=x?G*=5:Q>=T&&(G*=2),V<U?-G:G}function S(U){return Math.ceil(Math.log(U.length)/Math.LN2)+1}function C(){var U=b,V=p,X=S;function H(G){var Q,te=G.length,ce,ge=new Array(te);for(Q=0;Q<te;++Q)ge[Q]=U(G[Q],Q,G);var Ce=V(ge),be=Ce[0],he=Ce[1],oe=X(ge,be,he);Array.isArray(oe)||(oe=E(be,he,oe),oe=_(Math.ceil(be/oe)*oe,he,oe));for(var Ee=oe.length;oe[0]<=be;)oe.shift(),--Ee;for(;oe[Ee-1]>he;)oe.pop(),--Ee;var ye=new Array(Ee+1),ue;for(Q=0;Q<=Ee;++Q)ue=ye[Q]=[],ue.x0=Q>0?oe[Q-1]:be,ue.x1=Q<Ee?oe[Q]:he;for(Q=0;Q<te;++Q)ce=ge[Q],be<=ce&&ce<=he&&ye[a(oe,ce,0,Ee)].push(G[Q]);return ye}return H.value=function(G){return arguments.length?(U=typeof G=="function"?G:w(G),H):U},H.domain=function(G){return arguments.length?(V=typeof G=="function"?G:w([G[0],G[1]]),H):V},H.thresholds=function(G){return arguments.length?(X=typeof G=="function"?G:Array.isArray(G)?w(m.call(G)):w(G),H):X},H}function k(U,V,X){if(X==null&&(X=f),!!(H=U.length)){if((V=+V)<=0||H<2)return+X(U[0],0,U);if(V>=1)return+X(U[H-1],H-1,U);var H,G=(H-1)*V,Q=Math.floor(G),te=+X(U[Q],Q,U),ce=+X(U[Q+1],Q+1,U);return te+(ce-te)*(G-Q)}}function D(U,V,X){return U=g.call(U,f).sort(t),Math.ceil((X-V)/(2*(k(U,.75)-k(U,.25))*Math.pow(U.length,-1/3)))}function F(U,V,X){return Math.ceil((X-V)/(3.5*d(U)*Math.pow(U.length,-1/3)))}function P(U,V){var X=U.length,H=-1,G,Q;if(V==null){for(;++H<X;)if((G=U[H])!=null&&G>=G)for(Q=G;++H<X;)(G=U[H])!=null&&G>Q&&(Q=G)}else for(;++H<X;)if((G=V(U[H],H,U))!=null&&G>=G)for(Q=G;++H<X;)(G=V(U[H],H,U))!=null&&G>Q&&(Q=G);return Q}function R(U,V){var X=U.length,H=X,G=-1,Q,te=0;if(V==null)for(;++G<X;)isNaN(Q=f(U[G]))?--H:te+=Q;else for(;++G<X;)isNaN(Q=f(V(U[G],G,U)))?--H:te+=Q;if(H)return te/H}function L(U,V){var X=U.length,H=-1,G,Q=[];if(V==null)for(;++H<X;)isNaN(G=f(U[H]))||Q.push(G);else for(;++H<X;)isNaN(G=f(V(U[H],H,U)))||Q.push(G);return k(Q.sort(t),.5)}function I(U){for(var V=U.length,X,H=-1,G=0,Q,te;++H<V;)G+=U[H].length;for(Q=new Array(G);--V>=0;)for(te=U[V],X=te.length;--X>=0;)Q[--G]=te[X];return Q}function B(U,V){var X=U.length,H=-1,G,Q;if(V==null){for(;++H<X;)if((G=U[H])!=null&&G>=G)for(Q=G;++H<X;)(G=U[H])!=null&&Q>G&&(Q=G)}else for(;++H<X;)if((G=V(U[H],H,U))!=null&&G>=G)for(Q=G;++H<X;)(G=V(U[H],H,U))!=null&&Q>G&&(Q=G);return Q}function O(U,V){for(var X=V.length,H=new Array(X);X--;)H[X]=U[V[X]];return H}function $(U,V){if(X=U.length){var X,H=0,G=0,Q,te=U[G];for(V==null&&(V=t);++H<X;)(V(Q=U[H],te)<0||V(te,te)!==0)&&(te=Q,G=H);if(V(te,te)===0)return G}}function Y(U,V,X){for(var H=(X==null?U.length:X)-(V=V==null?0:+V),G,Q;H;)Q=Math.random()*H--|0,G=U[H+V],U[H+V]=U[Q+V],U[Q+V]=G;return U}function K(U,V){var X=U.length,H=-1,G,Q=0;if(V==null)for(;++H<X;)(G=+U[H])&&(Q+=G);else for(;++H<X;)(G=+V(U[H],H,U))&&(Q+=G);return Q}function j(U){if(!(Q=U.length))return[];for(var V=-1,X=B(U,q),H=new Array(X);++V<X;)for(var G=-1,Q,te=H[V]=new Array(Q);++G<Q;)te[G]=U[G][V];return H}function q(U){return U.length}function J(){return j(arguments)}e.bisect=a,e.bisectRight=a,e.bisectLeft=o,e.ascending=t,e.bisector=r,e.cross=u,e.descending=c,e.deviation=d,e.extent=p,e.histogram=C,e.thresholdFreedmanDiaconis=D,e.thresholdScott=F,e.thresholdSturges=S,e.max=P,e.mean=R,e.median=L,e.merge=I,e.min=B,e.pairs=s,e.permute=O,e.quantile=k,e.range=_,e.scan=$,e.shuffle=Y,e.sum=K,e.ticks=A,e.tickIncrement=y,e.tickStep=E,e.transpose=j,e.variance=h,e.zip=J,Object.defineProperty(e,"__esModule",{value:!0})}))});var Dut=W((zri,Cut)=>{var MAr=Jae();Cut.exports=function(t,r){var i=[],n=[],a=[],o={},s=[],l;function u(b){a[b]=!1,o.hasOwnProperty(b)&&Object.keys(o[b]).forEach(function(_){delete o[b][_],a[_]&&u(_)})}function c(b){var _=!1;n.push(b),a[b]=!0;var M,x;for(M=0;M<s[b].length;M++)x=s[b][M],x===l?(f(l,n),_=!0):a[x]||(_=c(x));if(_)u(b);else for(M=0;M<s[b].length;M++){x=s[b][M];var T=o[x];T||(T={},o[x]=T),T[x]=!0}return n.pop(),_}function f(b,_){var M=[].concat(_).concat(b);r?r(M):i.push(M)}function h(b){for(var _=0;_<t.length;_++)(_<b||!t[_])&&(t[_]=[]),t[_]=t[_].filter(function(M){return M>=b})}function d(b){h(b);for(var _=t,M=MAr(_),x=M.components.filter(function(k){return k.length>1}),T=1/0,A,y=0;y<x.length;y++)for(var E=0;E<x[y].length;E++)x[y][E]<T&&(T=x[y][E],A=y);var S=x[A];if(!S)return!1;var C=t.map(function(k,D){return S.indexOf(D)===-1?[]:k.filter(function(F){return S.indexOf(F)!==-1})});return{leastVertex:T,adjList:C}}l=0;for(var p=t.length;l<p;){var v=d(l);if(l=v.leastVertex,s=v.adjList,s){for(var m=0;m<s.length;m++)for(var g=0;g<s[m].length;g++){var w=s[m][g];a[+w]=!1,o[w]={}}c(l),l=l+1}else l=p}if(!r)return i}});var Lut=W((Zq,Fut)=>{(function(e,t){typeof Zq=="object"&&typeof Fut!="undefined"?t(Zq,kut(),Qae(),eoe(),Dut()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(Zq,(function(e,t,r,i,n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;function a(he){return he.target.depth}function o(he){return he.depth}function s(he,oe){return oe-1-he.height}function l(he,oe){return he.sourceLinks.length?he.depth:oe-1}function u(he){return he.targetLinks.length?he.depth:he.sourceLinks.length?t.min(he.sourceLinks,a)-1:0}function c(he){return function(){return he}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(he){return typeof he}:function(he){return he&&typeof Symbol=="function"&&he.constructor===Symbol&&he!==Symbol.prototype?"symbol":typeof he};function h(he,oe){return p(he.source,oe.source)||he.index-oe.index}function d(he,oe){return p(he.target,oe.target)||he.index-oe.index}function p(he,oe){return he.partOfCycle===oe.partOfCycle?he.y0-oe.y0:he.circularLinkType==="top"||oe.circularLinkType==="bottom"?-1:1}function v(he){return he.value}function m(he){return(he.y0+he.y1)/2}function g(he){return m(he.source)}function w(he){return m(he.target)}function b(he){return he.index}function _(he){return he.nodes}function M(he){return he.links}function x(he,oe){var Ee=he.get(oe);if(!Ee)throw new Error("missing: "+oe);return Ee}function T(he,oe){return oe(he)}var A=25,y=10,E=.3;function S(){var he=0,oe=0,Ee=1,ye=1,ue=24,ee,ae=b,xe=l,re=_,pe=M,we=32,Fe=2,Se,ke=null;function _e(){var Xe={nodes:re.apply(null,arguments),links:pe.apply(null,arguments)};Ie(Xe),C(Xe,ae,ke),Oe(Xe),_t(Xe),k(Xe,ae),ut(Xe,we,ae),vt(Xe);for(var mt=4,bt=0;bt<mt;bt++)Q(Xe,ye,ae),te(Xe,ye,ae),X(Xe,oe,ye,ae),Q(Xe,ye,ae),te(Xe,ye,ae);return be(Xe,oe,ye),I(Xe,Fe,ye,ae),Xe}_e.nodeId=function(Xe){return arguments.length?(ae=typeof Xe=="function"?Xe:c(Xe),_e):ae},_e.nodeAlign=function(Xe){return arguments.length?(xe=typeof Xe=="function"?Xe:c(Xe),_e):xe},_e.nodeWidth=function(Xe){return arguments.length?(ue=+Xe,_e):ue},_e.nodePadding=function(Xe){return arguments.length?(ee=+Xe,_e):ee},_e.nodes=function(Xe){return arguments.length?(re=typeof Xe=="function"?Xe:c(Xe),_e):re},_e.links=function(Xe){return arguments.length?(pe=typeof Xe=="function"?Xe:c(Xe),_e):pe},_e.size=function(Xe){return arguments.length?(he=oe=0,Ee=+Xe[0],ye=+Xe[1],_e):[Ee-he,ye-oe]},_e.extent=function(Xe){return arguments.length?(he=+Xe[0][0],Ee=+Xe[1][0],oe=+Xe[0][1],ye=+Xe[1][1],_e):[[he,oe],[Ee,ye]]},_e.iterations=function(Xe){return arguments.length?(we=+Xe,_e):we},_e.circularLinkGap=function(Xe){return arguments.length?(Fe=+Xe,_e):Fe},_e.nodePaddingRatio=function(Xe){return arguments.length?(Se=+Xe,_e):Se},_e.sortNodes=function(Xe){return arguments.length?(ke=Xe,_e):ke},_e.update=function(Xe){return k(Xe,ae),vt(Xe),Xe.links.forEach(function(mt){mt.circular&&(mt.circularLinkType=mt.y0+mt.y1<ye?"top":"bottom",mt.source.circularLinkType=mt.circularLinkType,mt.target.circularLinkType=mt.circularLinkType)}),Q(Xe,ye,ae,!1),te(Xe,ye,ae),I(Xe,Fe,ye,ae),Xe};function Ie(Xe){Xe.nodes.forEach(function(bt,Ne){bt.index=Ne,bt.sourceLinks=[],bt.targetLinks=[]});var mt=r.map(Xe.nodes,ae);return Xe.links.forEach(function(bt,Ne){bt.index=Ne;var Ue=bt.source,Ge=bt.target;(typeof Ue=="undefined"?"undefined":f(Ue))!=="object"&&(Ue=bt.source=x(mt,Ue)),(typeof Ge=="undefined"?"undefined":f(Ge))!=="object"&&(Ge=bt.target=x(mt,Ge)),Ue.sourceLinks.push(bt),Ge.targetLinks.push(bt)}),Xe}function Oe(Xe){Xe.nodes.forEach(function(mt){mt.partOfCycle=!1,mt.value=Math.max(t.sum(mt.sourceLinks,v),t.sum(mt.targetLinks,v)),mt.sourceLinks.forEach(function(bt){bt.circular&&(mt.partOfCycle=!0,mt.circularLinkType=bt.circularLinkType)}),mt.targetLinks.forEach(function(bt){bt.circular&&(mt.partOfCycle=!0,mt.circularLinkType=bt.circularLinkType)})})}function Qe(Xe){var mt=0,bt=0,Ne=0,Ue=0,Ge=t.max(Xe.nodes,function(je){return je.column});return Xe.links.forEach(function(je){je.circular&&(je.circularLinkType=="top"?mt=mt+je.width:bt=bt+je.width,je.target.column==0&&(Ue=Ue+je.width),je.source.column==Ge&&(Ne=Ne+je.width))}),mt=mt>0?mt+A+y:mt,bt=bt>0?bt+A+y:bt,Ne=Ne>0?Ne+A+y:Ne,Ue=Ue>0?Ue+A+y:Ue,{top:mt,bottom:bt,left:Ue,right:Ne}}function et(Xe,mt){var bt=t.max(Xe.nodes,function(ct){return ct.column}),Ne=Ee-he,Ue=ye-oe,Ge=Ne+mt.right+mt.left,je=Ue+mt.top+mt.bottom,Re=Ne/Ge,Ve=Ue/je;return he=he*Re+mt.left,Ee=mt.right==0?Ee:Ee*Re,oe=oe*Ve+mt.top,ye=ye*Ve,Xe.nodes.forEach(function(ct){ct.x0=he+ct.column*((Ee-he-ue)/bt),ct.x1=ct.x0+ue}),Ve}function _t(Xe){var mt,bt,Ne;for(mt=Xe.nodes,bt=[],Ne=0;mt.length;++Ne,mt=bt,bt=[])mt.forEach(function(Ue){Ue.depth=Ne,Ue.sourceLinks.forEach(function(Ge){bt.indexOf(Ge.target)<0&&!Ge.circular&&bt.push(Ge.target)})});for(mt=Xe.nodes,bt=[],Ne=0;mt.length;++Ne,mt=bt,bt=[])mt.forEach(function(Ue){Ue.height=Ne,Ue.targetLinks.forEach(function(Ge){bt.indexOf(Ge.source)<0&&!Ge.circular&&bt.push(Ge.source)})});Xe.nodes.forEach(function(Ue){Ue.column=Math.floor(xe.call(null,Ue,Ne))})}function ut(Xe,mt,bt){var Ne=r.nest().key(function(ct){return ct.column}).sortKeys(t.ascending).entries(Xe.nodes).map(function(ct){return ct.values});je(bt),Ve();for(var Ue=1,Ge=mt;Ge>0;--Ge)Re(Ue*=.99,bt),Ve();function je(ct){if(Se){var Tt=1/0;Ne.forEach(function(ur){var Bt=ye*Se/(ur.length+1);Tt=Bt<Tt?Bt:Tt}),ee=Tt}var Xt=t.min(Ne,function(ur){return(ye-oe-(ur.length-1)*ee)/t.sum(ur,v)});Xt=Xt*E,Xe.links.forEach(function(ur){ur.width=ur.value*Xt});var Vt=Qe(Xe),lr=et(Xe,Vt);Xt=Xt*lr,Xe.links.forEach(function(ur){ur.width=ur.value*Xt}),Ne.forEach(function(ur){var Bt=ur.length;ur.forEach(function(Zt,kr){Zt.depth==Ne.length-1&&Bt==1||Zt.depth==0&&Bt==1?(Zt.y0=ye/2-Zt.value*Xt,Zt.y1=Zt.y0+Zt.value*Xt):Zt.partOfCycle?P(Zt,ct)==0?(Zt.y0=ye/2+kr,Zt.y1=Zt.y0+Zt.value*Xt):Zt.circularLinkType=="top"?(Zt.y0=oe+kr,Zt.y1=Zt.y0+Zt.value*Xt):(Zt.y0=ye-Zt.value*Xt-kr,Zt.y1=Zt.y0+Zt.value*Xt):Vt.top==0||Vt.bottom==0?(Zt.y0=(ye-oe)/Bt*kr,Zt.y1=Zt.y0+Zt.value*Xt):(Zt.y0=(ye-oe)/2-Bt/2+kr,Zt.y1=Zt.y0+Zt.value*Xt)})})}function Re(ct,Tt){var Xt=Ne.length;Ne.forEach(function(Vt){var lr=Vt.length,ur=Vt[0].depth;Vt.forEach(function(Bt){var Zt;if((Bt.sourceLinks.length||Bt.targetLinks.length)&&!(Bt.partOfCycle&&P(Bt,Tt)>0))if(ur==0&&lr==1)Zt=Bt.y1-Bt.y0,Bt.y0=ye/2-Zt/2,Bt.y1=ye/2+Zt/2;else if(ur==Xt-1&&lr==1)Zt=Bt.y1-Bt.y0,Bt.y0=ye/2-Zt/2,Bt.y1=ye/2+Zt/2;else{var kr=0,$e=t.mean(Bt.sourceLinks,w),tt=t.mean(Bt.targetLinks,g);$e&&tt?kr=($e+tt)/2:kr=$e||tt;var st=(kr-m(Bt))*ct;Bt.y0+=st,Bt.y1+=st}})})}function Ve(){Ne.forEach(function(ct){var Tt,Xt,Vt=oe,lr=ct.length,ur;for(ct.sort(p),ur=0;ur<lr;++ur)Tt=ct[ur],Xt=Vt-Tt.y0,Xt>0&&(Tt.y0+=Xt,Tt.y1+=Xt),Vt=Tt.y1+ee;if(Xt=Vt-ee-ye,Xt>0)for(Vt=Tt.y0-=Xt,Tt.y1-=Xt,ur=lr-2;ur>=0;--ur)Tt=ct[ur],Xt=Tt.y1+ee-Vt,Xt>0&&(Tt.y0-=Xt,Tt.y1-=Xt),Vt=Tt.y0})}}function vt(Xe){Xe.nodes.forEach(function(mt){mt.sourceLinks.sort(d),mt.targetLinks.sort(h)}),Xe.nodes.forEach(function(mt){var bt=mt.y0,Ne=bt,Ue=mt.y1,Ge=Ue;mt.sourceLinks.forEach(function(je){je.circular?(je.y0=Ue-je.width/2,Ue=Ue-je.width):(je.y0=bt+je.width/2,bt+=je.width)}),mt.targetLinks.forEach(function(je){je.circular?(je.y1=Ge-je.width/2,Ge=Ge-je.width):(je.y1=Ne+je.width/2,Ne+=je.width)})})}return _e}function C(he,oe,Ee){var ye=0;if(Ee===null){for(var ue=[],ee=0;ee<he.links.length;ee++){var ae=he.links[ee],xe=ae.source.index,re=ae.target.index;ue[xe]||(ue[xe]=[]),ue[re]||(ue[re]=[]),ue[xe].indexOf(re)===-1&&ue[xe].push(re)}var pe=n(ue);pe.sort(function(ke,_e){return ke.length-_e.length});var we={};for(ee=0;ee<pe.length;ee++){var Fe=pe[ee],Se=Fe.slice(-2);we[Se[0]]||(we[Se[0]]={}),we[Se[0]][Se[1]]=!0}he.links.forEach(function(ke){var _e=ke.target.index,Ie=ke.source.index;_e===Ie||we[Ie]&&we[Ie][_e]?(ke.circular=!0,ke.circularLinkID=ye,ye=ye+1):ke.circular=!1})}else he.links.forEach(function(ke){ke.source[Ee]<ke.target[Ee]?ke.circular=!1:(ke.circular=!0,ke.circularLinkID=ye,ye=ye+1)})}function k(he,oe){var Ee=0,ye=0;he.links.forEach(function(ue){ue.circular&&(ue.source.circularLinkType||ue.target.circularLinkType?ue.circularLinkType=ue.source.circularLinkType?ue.source.circularLinkType:ue.target.circularLinkType:ue.circularLinkType=Ee<ye?"top":"bottom",ue.circularLinkType=="top"?Ee=Ee+1:ye=ye+1,he.nodes.forEach(function(ee){(T(ee,oe)==T(ue.source,oe)||T(ee,oe)==T(ue.target,oe))&&(ee.circularLinkType=ue.circularLinkType)}))}),he.links.forEach(function(ue){ue.circular&&(ue.source.circularLinkType==ue.target.circularLinkType&&(ue.circularLinkType=ue.source.circularLinkType),Ce(ue,oe)&&(ue.circularLinkType=ue.source.circularLinkType))})}function D(he){var oe=Math.abs(he.y1-he.y0),Ee=Math.abs(he.target.x0-he.source.x1);return Math.atan(Ee/oe)}function F(he,oe){return he.source.column<oe.target.column?!1:!(he.target.column>oe.source.column)}function P(he,oe){var Ee=0;he.sourceLinks.forEach(function(ue){Ee=ue.circular&&!Ce(ue,oe)?Ee+1:Ee});var ye=0;return he.targetLinks.forEach(function(ue){ye=ue.circular&&!Ce(ue,oe)?ye+1:ye}),Ee+ye}function R(he){var oe=he.source.sourceLinks,Ee=0;oe.forEach(function(ee){Ee=ee.circular?Ee+1:Ee});var ye=he.target.targetLinks,ue=0;return ye.forEach(function(ee){ue=ee.circular?ue+1:ue}),!(Ee>1||ue>1)}function L(he,oe,Ee){return he.sort(O),he.forEach(function(ye,ue){var ee=0;if(Ce(ye,Ee)&&R(ye))ye.circularPathData.verticalBuffer=ee+ye.width/2;else{var ae=0;for(ae;ae<ue;ae++)if(F(he[ue],he[ae])){var xe=he[ae].circularPathData.verticalBuffer+he[ae].width/2+oe;ee=xe>ee?xe:ee}ye.circularPathData.verticalBuffer=ee+ye.width/2}}),he}function I(he,oe,Ee,ye){var ue=5,ee=t.min(he.links,function(re){return re.source.y0});he.links.forEach(function(re){re.circular&&(re.circularPathData={})});var ae=he.links.filter(function(re){return re.circularLinkType=="top"});L(ae,oe,ye);var xe=he.links.filter(function(re){return re.circularLinkType=="bottom"});L(xe,oe,ye),he.links.forEach(function(re){if(re.circular){if(re.circularPathData.arcRadius=re.width+y,re.circularPathData.leftNodeBuffer=ue,re.circularPathData.rightNodeBuffer=ue,re.circularPathData.sourceWidth=re.source.x1-re.source.x0,re.circularPathData.sourceX=re.source.x0+re.circularPathData.sourceWidth,re.circularPathData.targetX=re.target.x0,re.circularPathData.sourceY=re.y0,re.circularPathData.targetY=re.y1,Ce(re,ye)&&R(re))re.circularPathData.leftSmallArcRadius=y+re.width/2,re.circularPathData.leftLargeArcRadius=y+re.width/2,re.circularPathData.rightSmallArcRadius=y+re.width/2,re.circularPathData.rightLargeArcRadius=y+re.width/2,re.circularLinkType=="bottom"?(re.circularPathData.verticalFullExtent=re.source.y1+A+re.circularPathData.verticalBuffer,re.circularPathData.verticalLeftInnerExtent=re.circularPathData.verticalFullExtent-re.circularPathData.leftLargeArcRadius,re.circularPathData.verticalRightInnerExtent=re.circularPathData.verticalFullExtent-re.circularPathData.rightLargeArcRadius):(re.circularPathData.verticalFullExtent=re.source.y0-A-re.circularPathData.verticalBuffer,re.circularPathData.verticalLeftInnerExtent=re.circularPathData.verticalFullExtent+re.circularPathData.leftLargeArcRadius,re.circularPathData.verticalRightInnerExtent=re.circularPathData.verticalFullExtent+re.circularPathData.rightLargeArcRadius);else{var pe=re.source.column,we=re.circularLinkType,Fe=he.links.filter(function(_e){return _e.source.column==pe&&_e.circularLinkType==we});re.circularLinkType=="bottom"?Fe.sort(Y):Fe.sort($);var Se=0;Fe.forEach(function(_e,Ie){_e.circularLinkID==re.circularLinkID&&(re.circularPathData.leftSmallArcRadius=y+re.width/2+Se,re.circularPathData.leftLargeArcRadius=y+re.width/2+Ie*oe+Se),Se=Se+_e.width}),pe=re.target.column,Fe=he.links.filter(function(_e){return _e.target.column==pe&&_e.circularLinkType==we}),re.circularLinkType=="bottom"?Fe.sort(j):Fe.sort(K),Se=0,Fe.forEach(function(_e,Ie){_e.circularLinkID==re.circularLinkID&&(re.circularPathData.rightSmallArcRadius=y+re.width/2+Se,re.circularPathData.rightLargeArcRadius=y+re.width/2+Ie*oe+Se),Se=Se+_e.width}),re.circularLinkType=="bottom"?(re.circularPathData.verticalFullExtent=Math.max(Ee,re.source.y1,re.target.y1)+A+re.circularPathData.verticalBuffer,re.circularPathData.verticalLeftInnerExtent=re.circularPathData.verticalFullExtent-re.circularPathData.leftLargeArcRadius,re.circularPathData.verticalRightInnerExtent=re.circularPathData.verticalFullExtent-re.circularPathData.rightLargeArcRadius):(re.circularPathData.verticalFullExtent=ee-A-re.circularPathData.verticalBuffer,re.circularPathData.verticalLeftInnerExtent=re.circularPathData.verticalFullExtent+re.circularPathData.leftLargeArcRadius,re.circularPathData.verticalRightInnerExtent=re.circularPathData.verticalFullExtent+re.circularPathData.rightLargeArcRadius)}re.circularPathData.leftInnerExtent=re.circularPathData.sourceX+re.circularPathData.leftNodeBuffer,re.circularPathData.rightInnerExtent=re.circularPathData.targetX-re.circularPathData.rightNodeBuffer,re.circularPathData.leftFullExtent=re.circularPathData.sourceX+re.circularPathData.leftLargeArcRadius+re.circularPathData.leftNodeBuffer,re.circularPathData.rightFullExtent=re.circularPathData.targetX-re.circularPathData.rightLargeArcRadius-re.circularPathData.rightNodeBuffer}if(re.circular)re.path=B(re);else{var ke=i.linkHorizontal().source(function(_e){var Ie=_e.source.x0+(_e.source.x1-_e.source.x0),Oe=_e.y0;return[Ie,Oe]}).target(function(_e){var Ie=_e.target.x0,Oe=_e.y1;return[Ie,Oe]});re.path=ke(re)}})}function B(he){var oe="";return he.circularLinkType=="top"?oe="M"+he.circularPathData.sourceX+" "+he.circularPathData.sourceY+" L"+he.circularPathData.leftInnerExtent+" "+he.circularPathData.sourceY+" A"+he.circularPathData.leftLargeArcRadius+" "+he.circularPathData.leftSmallArcRadius+" 0 0 0 "+he.circularPathData.leftFullExtent+" "+(he.circularPathData.sourceY-he.circularPathData.leftSmallArcRadius)+" L"+he.circularPathData.leftFullExtent+" "+he.circularPathData.verticalLeftInnerExtent+" A"+he.circularPathData.leftLargeArcRadius+" "+he.circularPathData.leftLargeArcRadius+" 0 0 0 "+he.circularPathData.leftInnerExtent+" "+he.circularPathData.verticalFullExtent+" L"+he.circularPathData.rightInnerExtent+" "+he.circularPathData.verticalFullExtent+" A"+he.circularPathData.rightLargeArcRadius+" "+he.circularPathData.rightLargeArcRadius+" 0 0 0 "+he.circularPathData.rightFullExtent+" "+he.circularPathData.verticalRightInnerExtent+" L"+he.circularPathData.rightFullExtent+" "+(he.circularPathData.targetY-he.circularPathData.rightSmallArcRadius)+" A"+he.circularPathData.rightLargeArcRadius+" "+he.circularPathData.rightSmallArcRadius+" 0 0 0 "+he.circularPathData.rightInnerExtent+" "+he.circularPathData.targetY+" L"+he.circularPathData.targetX+" "+he.circularPathData.targetY:oe="M"+he.circularPathData.sourceX+" "+he.circularPathData.sourceY+" L"+he.circularPathData.leftInnerExtent+" "+he.circularPathData.sourceY+" A"+he.circularPathData.leftLargeArcRadius+" "+he.circularPathData.leftSmallArcRadius+" 0 0 1 "+he.circularPathData.leftFullExtent+" "+(he.circularPathData.sourceY+he.circularPathData.leftSmallArcRadius)+" L"+he.circularPathData.leftFullExtent+" "+he.circularPathData.verticalLeftInnerExtent+" A"+he.circularPathData.leftLargeArcRadius+" "+he.circularPathData.leftLargeArcRadius+" 0 0 1 "+he.circularPathData.leftInnerExtent+" "+he.circularPathData.verticalFullExtent+" L"+he.circularPathData.rightInnerExtent+" "+he.circularPathData.verticalFullExtent+" A"+he.circularPathData.rightLargeArcRadius+" "+he.circularPathData.rightLargeArcRadius+" 0 0 1 "+he.circularPathData.rightFullExtent+" "+he.circularPathData.verticalRightInnerExtent+" L"+he.circularPathData.rightFullExtent+" "+(he.circularPathData.targetY+he.circularPathData.rightSmallArcRadius)+" A"+he.circularPathData.rightLargeArcRadius+" "+he.circularPathData.rightSmallArcRadius+" 0 0 1 "+he.circularPathData.rightInnerExtent+" "+he.circularPathData.targetY+" L"+he.circularPathData.targetX+" "+he.circularPathData.targetY,oe}function O(he,oe){return q(he)==q(oe)?he.circularLinkType=="bottom"?Y(he,oe):$(he,oe):q(oe)-q(he)}function $(he,oe){return he.y0-oe.y0}function Y(he,oe){return oe.y0-he.y0}function K(he,oe){return he.y1-oe.y1}function j(he,oe){return oe.y1-he.y1}function q(he){return he.target.column-he.source.column}function J(he){return he.target.x0-he.source.x1}function U(he,oe){var Ee=D(he),ye=J(oe)/Math.tan(Ee),ue=ge(he)=="up"?he.y1+ye:he.y1-ye;return ue}function V(he,oe){var Ee=D(he),ye=J(oe)/Math.tan(Ee),ue=ge(he)=="up"?he.y1-ye:he.y1+ye;return ue}function X(he,oe,Ee,ye){he.links.forEach(function(ue){if(!ue.circular&&ue.target.column-ue.source.column>1){var ee=ue.source.column+1,ae=ue.target.column-1,xe=1,re=ae-ee+1;for(xe=1;ee<=ae;ee++,xe++)he.nodes.forEach(function(pe){if(pe.column==ee){var we=xe/(re+1),Fe=Math.pow(1-we,3),Se=3*we*Math.pow(1-we,2),ke=3*Math.pow(we,2)*(1-we),_e=Math.pow(we,3),Ie=Fe*ue.y0+Se*ue.y0+ke*ue.y1+_e*ue.y1,Oe=Ie-ue.width/2,Qe=Ie+ue.width/2,et;Oe>pe.y0&&Oe<pe.y1?(et=pe.y1-Oe+10,et=pe.circularLinkType=="bottom"?et:-et,pe=G(pe,et,oe,Ee),he.nodes.forEach(function(_t){T(_t,ye)==T(pe,ye)||_t.column!=pe.column||H(pe,_t)&&G(_t,et,oe,Ee)})):Qe>pe.y0&&Qe<pe.y1?(et=Qe-pe.y0+10,pe=G(pe,et,oe,Ee),he.nodes.forEach(function(_t){T(_t,ye)==T(pe,ye)||_t.column!=pe.column||_t.y0<pe.y1&&_t.y1>pe.y1&&G(_t,et,oe,Ee)})):Oe<pe.y0&&Qe>pe.y1&&(et=Qe-pe.y0+10,pe=G(pe,et,oe,Ee),he.nodes.forEach(function(_t){T(_t,ye)==T(pe,ye)||_t.column!=pe.column||_t.y0<pe.y1&&_t.y1>pe.y1&&G(_t,et,oe,Ee)}))}})}})}function H(he,oe){return he.y0>oe.y0&&he.y0<oe.y1||he.y1>oe.y0&&he.y1<oe.y1?!0:he.y0<oe.y0&&he.y1>oe.y1}function G(he,oe,Ee,ye){return he.y0+oe>=Ee&&he.y1+oe<=ye&&(he.y0=he.y0+oe,he.y1=he.y1+oe,he.targetLinks.forEach(function(ue){ue.y1=ue.y1+oe}),he.sourceLinks.forEach(function(ue){ue.y0=ue.y0+oe})),he}function Q(he,oe,Ee,ye){he.nodes.forEach(function(ue){ye&&ue.y+(ue.y1-ue.y0)>oe&&(ue.y=ue.y-(ue.y+(ue.y1-ue.y0)-oe));var ee=he.links.filter(function(re){return T(re.source,Ee)==T(ue,Ee)}),ae=ee.length;ae>1&&ee.sort(function(re,pe){if(!re.circular&&!pe.circular){if(re.target.column==pe.target.column)return re.y1-pe.y1;if(ce(re,pe)){if(re.target.column>pe.target.column){var we=V(pe,re);return re.y1-we}if(pe.target.column>re.target.column){var Fe=V(re,pe);return Fe-pe.y1}}else return re.y1-pe.y1}if(re.circular&&!pe.circular)return re.circularLinkType=="top"?-1:1;if(pe.circular&&!re.circular)return pe.circularLinkType=="top"?1:-1;if(re.circular&&pe.circular)return re.circularLinkType===pe.circularLinkType&&re.circularLinkType=="top"?re.target.column===pe.target.column?re.target.y1-pe.target.y1:pe.target.column-re.target.column:re.circularLinkType===pe.circularLinkType&&re.circularLinkType=="bottom"?re.target.column===pe.target.column?pe.target.y1-re.target.y1:re.target.column-pe.target.column:re.circularLinkType=="top"?-1:1});var xe=ue.y0;ee.forEach(function(re){re.y0=xe+re.width/2,xe=xe+re.width}),ee.forEach(function(re,pe){if(re.circularLinkType=="bottom"){var we=pe+1,Fe=0;for(we;we<ae;we++)Fe=Fe+ee[we].width;re.y0=ue.y1-Fe-re.width/2}})})}function te(he,oe,Ee){he.nodes.forEach(function(ye){var ue=he.links.filter(function(xe){return T(xe.target,Ee)==T(ye,Ee)}),ee=ue.length;ee>1&&ue.sort(function(xe,re){if(!xe.circular&&!re.circular){if(xe.source.column==re.source.column)return xe.y0-re.y0;if(ce(xe,re)){if(re.source.column<xe.source.column){var pe=U(re,xe);return xe.y0-pe}if(xe.source.column<re.source.column){var we=U(xe,re);return we-re.y0}}else return xe.y0-re.y0}if(xe.circular&&!re.circular)return xe.circularLinkType=="top"?-1:1;if(re.circular&&!xe.circular)return re.circularLinkType=="top"?1:-1;if(xe.circular&&re.circular)return xe.circularLinkType===re.circularLinkType&&xe.circularLinkType=="top"?xe.source.column===re.source.column?xe.source.y1-re.source.y1:xe.source.column-re.source.column:xe.circularLinkType===re.circularLinkType&&xe.circularLinkType=="bottom"?xe.source.column===re.source.column?xe.source.y1-re.source.y1:re.source.column-xe.source.column:xe.circularLinkType=="top"?-1:1});var ae=ye.y0;ue.forEach(function(xe){xe.y1=ae+xe.width/2,ae=ae+xe.width}),ue.forEach(function(xe,re){if(xe.circularLinkType=="bottom"){var pe=re+1,we=0;for(pe;pe<ee;pe++)we=we+ue[pe].width;xe.y1=ye.y1-we-xe.width/2}})})}function ce(he,oe){return ge(he)==ge(oe)}function ge(he){return he.y0-he.y1>0?"up":"down"}function Ce(he,oe){return T(he.source,oe)==T(he.target,oe)}function be(he,oe,Ee){var ye=he.nodes,ue=he.links,ee=!1,ae=!1;if(ue.forEach(function(Se){Se.circularLinkType=="top"?ee=!0:Se.circularLinkType=="bottom"&&(ae=!0)}),ee==!1||ae==!1){var xe=t.min(ye,function(Se){return Se.y0}),re=t.max(ye,function(Se){return Se.y1}),pe=re-xe,we=Ee-oe,Fe=we/pe;ye.forEach(function(Se){var ke=(Se.y1-Se.y0)*Fe;Se.y0=(Se.y0-xe)*Fe,Se.y1=Se.y0+ke}),ue.forEach(function(Se){Se.y0=(Se.y0-xe)*Fe,Se.y1=(Se.y1-xe)*Fe,Se.width=Se.width*Fe})}}e.sankeyCircular=S,e.sankeyCenter=u,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=l,Object.defineProperty(e,"__esModule",{value:!0})}))});var toe=W((Bri,Put)=>{"use strict";Put.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}});var Wut=W((qri,$ut)=>{"use strict";var Iut=xut(),SAr=(db(),Go(hb)).interpolateNumber,e6=vi(),F8=Sut(),EAr=Lut(),Lo=toe(),ig=ni(),kAr=Ji(),ng=it(),p3=ng.strTranslate,Rut=ng.strRotate,noe=G1(),L8=noe.keyFun,Kq=noe.repeat,Uut=noe.unwrap,zut=uo(),CAr=yi(),Vut=Hl(),DAr=Vut.CAP_SHIFT,FAr=Vut.LINE_SPACING,LAr=3;function PAr(e,t,r){var i=Uut(t),n=i.trace,a=n.domain,o=n.orientation==="h",s=n.direction==="reversed",l=n.node.pad,u=n.node.thickness,c={justify:F8.sankeyJustify,left:F8.sankeyLeft,right:F8.sankeyRight,center:F8.sankeyCenter}[n.node.align],f=e.width*(a.x[1]-a.x[0]),h=e.height*(a.y[1]-a.y[0]),d=i._nodes,p=i._links,v=i.circular,m;v?m=EAr.sankeyCircular().circularLinkGap(0):m=F8.sankey(),m.iterations(Lo.sankeyIterations).size(o?[f,h]:[h,f]).nodeWidth(u).nodePadding(l).nodeId(function(P){return P.pointNumber}).nodeAlign(c).nodes(d).links(p);function g(P){n[P].sort==="input"&&(v?ng.warn(`Circular Sankey diagrams do not support the "input" ${P}.sort mode; falling back to the default sort.`):m[`${P}Sort`](null))}g("link"),g("node");var w=m();m.nodePadding()<l&&ng.warn("node.pad was reduced to ",m.nodePadding()," to fit within the figure.");var b,_,M;for(var x in i._groupLookup){var T=parseInt(i._groupLookup[x]),A;for(b=0;b<w.nodes.length;b++)if(w.nodes[b].pointNumber===T){A=w.nodes[b];break}if(A){var y={pointNumber:parseInt(x),x0:A.x0,x1:A.x1,y0:A.y0,y1:A.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};w.nodes.unshift(y),A.childrenNodes.unshift(y)}}function E(){for(b=0;b<w.nodes.length;b++){var P=w.nodes[b],R={},L,I;for(_=0;_<P.targetLinks.length;_++)I=P.targetLinks[_],L=I.source.pointNumber+":"+I.target.pointNumber,R.hasOwnProperty(L)||(R[L]=[]),R[L].push(I);var B=Object.keys(R);for(_=0;_<B.length;_++){L=B[_];var O=R[L],$=0,Y={};for(M=0;M<O.length;M++)I=O[M],Y[I.label]||(Y[I.label]=0),Y[I.label]+=I.value,$+=I.value;for(M=0;M<O.length;M++)I=O[M],I.flow={value:$,labelConcentration:Y[I.label]/$,concentration:I.value/$,links:O},I.concentrationscale&&(I.color=I.concentrationscale(I.flow.labelConcentration))}var K=0;for(_=0;_<P.sourceLinks.length;_++)K+=P.sourceLinks[_].value;for(_=0;_<P.sourceLinks.length;_++)I=P.sourceLinks[_],I.concentrationOut=I.value/K;var j=0;for(_=0;_<P.targetLinks.length;_++)j+=P.targetLinks[_].value;for(_=0;_<P.targetLinks.length;_++)I=P.targetLinks[_],I.concenrationIn=I.value/j}}E();function S(P){P.forEach(function(R){var L,I,B=0,O=R.length,$;for(R.sort(function(Y,K){return Y.y0-K.y0}),$=0;$<O;++$)L=R[$],L.y0>=B||(I=B-L.y0,I>1e-6&&(L.y0+=I,L.y1+=I)),B=L.y1+l})}function C(P){var R=P.map(function(K,j){return{x0:K.x0,index:j}}).sort(function(K,j){return K.x0-j.x0}),L=[],I=-1,B,O=-1/0,$;for(b=0;b<R.length;b++){var Y=P[R[b].index];Y.x0>O+u&&(I+=1,B=Y.x0),O=Y.x0,L[I]||(L[I]=[]),L[I].push(Y),$=B-Y.x0,Y.x0+=$,Y.x1+=$}return L}if(n.node.x.length&&n.node.y.length){for(b=0;b<Math.min(n.node.x.length,n.node.y.length,w.nodes.length);b++)if(n.node.x[b]&&n.node.y[b]){var k=[n.node.x[b]*f,n.node.y[b]*h];w.nodes[b].x0=k[0]-u/2,w.nodes[b].x1=k[0]+u/2;var D=w.nodes[b].y1-w.nodes[b].y0;w.nodes[b].y0=k[1]-D/2,w.nodes[b].y1=k[1]+D/2}if(n.arrangement==="snap"){d=w.nodes;var F=C(d);S(F)}m.update(w)}return{circular:v,key:r,trace:n,guid:ng.randstr(),horizontal:o,reversed:s,width:f,height:h,nodePad:n.node.pad,nodeLineColor:n.node.line.color,nodeLineWidth:n.node.line.width,linkLineColor:n.link.line.color,linkLineWidth:n.link.line.width,linkArrowLength:n.link.arrowlen,valueFormat:n.valueformat,valueSuffix:n.valuesuffix,textFont:n.textfont,translateX:a.x[0]*e.width+e.margin.l,translateY:e.height-a.y[1]*e.height+e.margin.t,dragParallel:o?h:f,dragPerpendicular:o?f:h,arrangement:n.arrangement,sankey:m,graph:w,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function IAr(e,t,r){var i=t.source.label+"|"+t.target.label,n=i+"__"+r;return t.trace=e.trace,t.curveNumber=e.trace.index,{circular:e.circular,key:n,traceId:e.key,pointNumber:t.pointNumber,link:t,rgb:ig.rgb(t.color),alpha:ig.parse(t.color).alpha,hoverRgb:ig.rgb(t.hovercolor),hoverAlpha:ig.parse(t.hovercolor).alpha,linkPath:aoe,linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,linkArrowLength:e.linkArrowLength,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,parent:e,interactionState:e.interactionState,flow:t.flow}}function RAr(e,t){var r="",i=e.width/2,n=e.circularPathData,a=n.sourceX+n.verticalBuffer<n.targetX,o=n.rightFullExtent-n.rightLargeArcRadius-t<=n.leftFullExtent-i,s=Math.abs(n.rightFullExtent-n.leftFullExtent-i)<i;return e.circularLinkType==="top"?(r="M "+(n.targetX-t)+" "+(n.targetY+i)+" L "+(n.rightInnerExtent-t)+" "+(n.targetY+i)+"A "+(n.rightLargeArcRadius+i)+" "+(n.rightSmallArcRadius+i)+" 0 0 1 "+(n.rightFullExtent-i-t)+" "+(n.targetY-n.rightSmallArcRadius)+"L "+(n.rightFullExtent-i-t)+" "+n.verticalRightInnerExtent,a&&o?r+=" A "+(n.rightLargeArcRadius+i)+" "+(n.rightLargeArcRadius+i)+" 0 0 1 "+(n.rightFullExtent+i-t-(n.rightLargeArcRadius-i))+" "+(n.verticalRightInnerExtent-(n.rightLargeArcRadius+i))+" L "+(n.rightFullExtent+i-(n.rightLargeArcRadius-i)-t)+" "+(n.verticalRightInnerExtent-(n.rightLargeArcRadius+i))+" A "+(n.leftLargeArcRadius+i)+" "+(n.leftLargeArcRadius+i)+" 0 0 1 "+(n.leftFullExtent+i)+" "+n.verticalRightInnerExtent:a?r+=" A "+(n.rightLargeArcRadius-i)+" "+(n.rightLargeArcRadius-i)+" 0 0 0 "+(n.rightFullExtent-i-t-(n.rightLargeArcRadius-i))+" "+(n.verticalRightInnerExtent-(n.rightLargeArcRadius-i))+" L "+(n.leftFullExtent+i+(n.rightLargeArcRadius-i))+" "+(n.verticalRightInnerExtent-(n.rightLargeArcRadius-i))+" A "+(n.leftLargeArcRadius-i)+" "+(n.leftLargeArcRadius-i)+" 0 0 0 "+(n.leftFullExtent+i)+" "+n.verticalLeftInnerExtent:r+=" A "+(n.rightLargeArcRadius+i)+" "+(n.rightLargeArcRadius+i)+" 0 0 1 "+(n.rightInnerExtent-t)+" "+(n.verticalFullExtent-i)+" L "+n.leftInnerExtent+" "+(n.verticalFullExtent-i)+" A "+(n.leftLargeArcRadius+i)+" "+(n.leftLargeArcRadius+i)+" 0 0 1 "+(n.leftFullExtent+i)+" "+n.verticalLeftInnerExtent,r+=" L "+(n.leftFullExtent+i)+" "+(n.sourceY-n.leftSmallArcRadius)+" A "+(n.leftLargeArcRadius+i)+" "+(n.leftSmallArcRadius+i)+" 0 0 1 "+n.leftInnerExtent+" "+(n.sourceY+i)+" L "+n.sourceX+" "+(n.sourceY+i)+" L "+n.sourceX+" "+(n.sourceY-i)+" L "+n.leftInnerExtent+" "+(n.sourceY-i)+" A "+(n.leftLargeArcRadius-i)+" "+(n.leftSmallArcRadius-i)+" 0 0 0 "+(n.leftFullExtent-i)+" "+(n.sourceY-n.leftSmallArcRadius)+" L "+(n.leftFullExtent-i)+" "+n.verticalLeftInnerExtent,a&&o?r+=" A "+(n.leftLargeArcRadius+i)+" "+(n.leftSmallArcRadius+i)+" 0 0 0 "+(n.leftFullExtent-i)+" "+(n.verticalFullExtent+i)+"L"+(n.rightFullExtent+i-t)+" "+(n.verticalFullExtent+i)+" A "+(n.leftLargeArcRadius+i)+" "+(n.leftSmallArcRadius+i)+" 0 0 0 "+(n.rightFullExtent+i-t)+" "+n.verticalRightInnerExtent:a?r+=" A "+(n.leftLargeArcRadius+i)+" "+(n.leftSmallArcRadius+i)+" 0 0 1 "+(n.leftFullExtent+i)+" "+(n.verticalFullExtent-i)+" L "+(n.rightFullExtent-i-t)+" "+(n.verticalFullExtent-i)+" A "+(n.leftLargeArcRadius+i)+" "+(n.leftSmallArcRadius+i)+" 0 0 1 "+(n.rightFullExtent+i-t)+" "+n.verticalRightInnerExtent:r+=" A "+(n.leftLargeArcRadius-i)+" "+(n.leftLargeArcRadius-i)+" 0 0 0 "+n.leftInnerExtent+" "+(n.verticalFullExtent+i)+" L "+(n.rightInnerExtent-t)+" "+(n.verticalFullExtent+i)+" A "+(n.rightLargeArcRadius-i)+" "+(n.rightLargeArcRadius-i)+" 0 0 0 "+(n.rightFullExtent+i-t)+" "+n.verticalRightInnerExtent,r+=" L "+(n.rightFullExtent+i-t)+" "+(n.targetY-n.rightSmallArcRadius)+" A "+(n.rightLargeArcRadius-i)+" "+(n.rightSmallArcRadius-i)+" 0 0 0 "+(n.rightInnerExtent-t)+" "+(n.targetY-i)+" L "+(n.targetX-t)+" "+(n.targetY-i)+(t>0?" L "+n.targetX+" "+n.targetY:"")+"Z"):(r="M "+(n.targetX-t)+" "+(n.targetY-i)+" L "+(n.rightInnerExtent-t)+" "+(n.targetY-i)+" A "+(n.rightLargeArcRadius+i)+" "+(n.rightSmallArcRadius+i)+" 0 0 0 "+(n.rightFullExtent-i-t)+" "+(n.targetY+n.rightSmallArcRadius)+" L "+(n.rightFullExtent-i-t)+" "+n.verticalRightInnerExtent,a&&o?r+=" A "+(n.rightLargeArcRadius+i)+" "+(n.rightLargeArcRadius+i)+" 0 0 0 "+(n.rightInnerExtent-i-t)+" "+(n.verticalFullExtent+i)+" L "+(n.rightFullExtent+i-t-(n.rightLargeArcRadius-i))+" "+(n.verticalFullExtent+i)+" A "+(n.rightLargeArcRadius+i)+" "+(n.rightLargeArcRadius+i)+" 0 0 0 "+(n.leftFullExtent+i)+" "+n.verticalLeftInnerExtent:a?r+=" A "+(n.rightLargeArcRadius-i)+" "+(n.rightSmallArcRadius-i)+" 0 0 1 "+(n.rightFullExtent-t-i-(n.rightLargeArcRadius-i))+" "+(n.verticalFullExtent-i)+" L "+(n.leftFullExtent+i+(n.rightLargeArcRadius-i))+" "+(n.verticalFullExtent-i)+" A "+(n.rightLargeArcRadius-i)+" "+(n.rightSmallArcRadius-i)+" 0 0 1 "+(n.leftFullExtent+i)+" "+n.verticalLeftInnerExtent:r+=" A "+(n.rightLargeArcRadius+i)+" "+(n.rightLargeArcRadius+i)+" 0 0 0 "+(n.rightInnerExtent-t)+" "+(n.verticalFullExtent+i)+" L "+n.leftInnerExtent+" "+(n.verticalFullExtent+i)+" A "+(n.leftLargeArcRadius+i)+" "+(n.leftLargeArcRadius+i)+" 0 0 0 "+(n.leftFullExtent+i)+" "+n.verticalLeftInnerExtent,r+=" L "+(n.leftFullExtent+i)+" "+(n.sourceY+n.leftSmallArcRadius)+" A "+(n.leftLargeArcRadius+i)+" "+(n.leftSmallArcRadius+i)+" 0 0 0 "+n.leftInnerExtent+" "+(n.sourceY-i)+" L "+n.sourceX+" "+(n.sourceY-i)+" L "+n.sourceX+" "+(n.sourceY+i)+" L "+n.leftInnerExtent+" "+(n.sourceY+i)+" A "+(n.leftLargeArcRadius-i)+" "+(n.leftSmallArcRadius-i)+" 0 0 1 "+(n.leftFullExtent-i)+" "+(n.sourceY+n.leftSmallArcRadius)+" L "+(n.leftFullExtent-i)+" "+n.verticalLeftInnerExtent,a&&o?r+=" A "+(n.rightLargeArcRadius-i)+" "+(n.rightSmallArcRadius-i)+" 0 0 1 "+(n.leftFullExtent-i-(n.rightLargeArcRadius-i))+" "+(n.verticalFullExtent-i)+" L "+(n.rightFullExtent+i-t+(n.rightLargeArcRadius-i))+" "+(n.verticalFullExtent-i)+" A "+(n.rightLargeArcRadius-i)+" "+(n.rightSmallArcRadius-i)+" 0 0 1 "+(n.rightFullExtent+i-t)+" "+n.verticalRightInnerExtent:a?r+=" A "+(n.rightLargeArcRadius+i)+" "+(n.rightLargeArcRadius+i)+" 0 0 0 "+(n.leftFullExtent+i)+" "+(n.verticalFullExtent+i)+" L "+(n.rightFullExtent-t-i)+" "+(n.verticalFullExtent+i)+" A "+(n.rightLargeArcRadius+i)+" "+(n.rightLargeArcRadius+i)+" 0 0 0 "+(n.rightFullExtent+i-t)+" "+n.verticalRightInnerExtent:r+=" A "+(n.leftLargeArcRadius-i)+" "+(n.leftLargeArcRadius-i)+" 0 0 1 "+n.leftInnerExtent+" "+(n.verticalFullExtent-i)+" L "+(n.rightInnerExtent-t)+" "+(n.verticalFullExtent-i)+" A "+(n.rightLargeArcRadius-i)+" "+(n.rightLargeArcRadius-i)+" 0 0 1 "+(n.rightFullExtent+i-t)+" "+n.verticalRightInnerExtent,r+=" L "+(n.rightFullExtent+i-t)+" "+(n.targetY+n.rightSmallArcRadius)+" A "+(n.rightLargeArcRadius-i)+" "+(n.rightSmallArcRadius-i)+" 0 0 1 "+(n.rightInnerExtent-t)+" "+(n.targetY+i)+" L "+(n.targetX-t)+" "+(n.targetY+i)+(t>0?" L "+n.targetX+" "+n.targetY:"")+"Z"),r}function aoe(){var e=.5;function t(r){var i=r.linkArrowLength;if(r.link.circular)return RAr(r.link,i);var n=Math.abs((r.link.target.x0-r.link.source.x1)/2);i>n&&(i=n);var a=r.link.source.x1,o=r.link.target.x0-i,s=SAr(a,o),l=s(e),u=s(1-e),c=r.link.y0-r.link.width/2,f=r.link.y0+r.link.width/2,h=r.link.y1-r.link.width/2,d=r.link.y1+r.link.width/2,p="M"+a+","+c,v="C"+l+","+c+" "+u+","+h+" "+o+","+h,m="C"+u+","+d+" "+l+","+f+" "+a+","+f,g=i>0?"L"+(o+i)+","+(h+r.link.width/2):"";return g+="L"+o+","+d,p+v+g+m+"Z"}return t}function zAr(e,t){var r=Lo.nodePadAcross,i=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var n=t.dx,a=Math.max(.5,t.dy),o="node_"+t.pointNumber;return t.group&&(o=ng.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:o,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(n),visibleHeight:a,zoneX:-r,zoneY:-i,zoneWidth:n+2*r,zoneHeight:a+2*i,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:t.originalLayer===1,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,reversed:e.reversed,rgb:ig.rgb(t.color),alpha:ig.parse(t.color).alpha,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,o].join("_"),interactionState:e.interactionState,figure:e}}function ioe(e){e.attr("transform",function(t){return p3(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function BAr(e){e.call(ioe)}function Gut(e,t){e.call(BAr),t.attr("d",aoe())}function But(e){e.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function roe(e){return e.link.width>1||e.linkLineWidth>0}function qut(e){return e.horizontal?e.reversed?p3(e.translateX+e.width,e.translateY)+"matrix(-1 0 0 1 0 0)":p3(e.translateX,e.translateY)+"matrix(1 0 0 1 0 0)":e.reversed?p3(e.translateX,e.translateY+e.height)+"matrix(0 -1 1 0 0 0)":p3(e.translateX,e.translateY)+"matrix(0 1 1 0 0 0)"}function Out(e,t,r){e.on(".basic",null).on("mouseover.basic",function(i){!i.interactionState.dragInProgress&&!i.partOfGroup&&(r.hover(this,i,t),i.interactionState.hovered=[this,i])}).on("mousemove.basic",function(i){!i.interactionState.dragInProgress&&!i.partOfGroup&&(r.follow(this,i),i.interactionState.hovered=[this,i])}).on("mouseout.basic",function(i){!i.interactionState.dragInProgress&&!i.partOfGroup&&(r.unhover(this,i,t),i.interactionState.hovered=!1)}).on("click.basic",function(i){i.interactionState.hovered&&(r.unhover(this,i,t),i.interactionState.hovered=!1),!i.interactionState.dragInProgress&&!i.partOfGroup&&r.select(this,i,t)})}function qAr(e,t,r,i){var n=e6.behavior.drag().origin(function(a){return{x:a.node.x0+a.visibleWidth/2,y:a.node.y0+a.visibleHeight/2}}).on("dragstart",function(a){if(a.arrangement!=="fixed"&&(ng.ensureSingle(i._fullLayout._infolayer,"g","dragcover",function(s){i._fullLayout._dragCover=s}),ng.raiseToTop(this),a.interactionState.dragInProgress=a.node,Nut(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),a.arrangement==="snap")){var o=a.traceId+"|"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):OAr(e,o,a,i),NAr(e,t,a,o,i)}}).on("drag",function(a){if(a.arrangement!=="fixed"){var o=e6.event.x,s=e6.event.y;a.arrangement==="snap"?(a.node.x0=o-a.visibleWidth/2,a.node.x1=o+a.visibleWidth/2,a.node.y0=s-a.visibleHeight/2,a.node.y1=s+a.visibleHeight/2):(a.arrangement==="freeform"&&(a.node.x0=o-a.visibleWidth/2,a.node.x1=o+a.visibleWidth/2),s=Math.max(0,Math.min(a.size-a.visibleHeight/2,s)),a.node.y0=s-a.visibleHeight/2,a.node.y1=s+a.visibleHeight/2),Nut(a.node),a.arrangement!=="snap"&&(a.sankey.update(a.graph),Gut(e.filter(jut(a)),t))}}).on("dragend",function(a){if(a.arrangement!=="fixed"){a.interactionState.dragInProgress=!1;for(var o=0;o<a.node.childrenNodes.length;o++)a.node.childrenNodes[o].x=a.node.x,a.node.childrenNodes[o].y=a.node.y;a.arrangement!=="snap"&&Hut(a,i)}});e.on(".drag",null).call(n)}function OAr(e,t,r,i){GAr(r.graph.nodes);var n=r.graph.nodes.filter(function(a){return a.originalX===r.node.originalX}).filter(function(a){return!a.partOfGroup});r.forceLayouts[t]=Iut.forceSimulation(n).alphaDecay(0).force("collide",Iut.forceCollide().radius(function(a){return a.dy/2+r.nodePad/2}).strength(1).iterations(Lo.forceIterations)).force("constrain",UAr(e,t,n,r,i)).stop()}function NAr(e,t,r,i,n){window.requestAnimationFrame(function a(){var o;for(o=0;o<Lo.forceTicksPerFrame;o++)r.forceLayouts[i].tick();var s=r.graph.nodes;if(HAr(s),r.sankey.update(r.graph),Gut(e.filter(jut(r)),t),r.forceLayouts[i].alpha()>0)window.requestAnimationFrame(a);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,Hut(r,n)}})}function UAr(e,t,r,i){return function(){for(var a=0,o=0;o<r.length;o++){var s=r[o];s===i.interactionState.dragInProgress?(s.x=s.lastDraggedX,s.y=s.lastDraggedY):(s.vx=(s.originalX-s.x)/Lo.forceTicksPerFrame,s.y=Math.min(i.size-s.dy/2,Math.max(s.dy/2,s.y))),a=Math.max(a,Math.abs(s.vx),Math.abs(s.vy))}!i.interactionState.dragInProgress&&a<.1&&i.forceLayouts[t].alpha()>0&&i.forceLayouts[t].alpha(0)}}function Hut(e,t){for(var r=[],i=[],n=0;n<e.graph.nodes.length;n++){var a=(e.graph.nodes[n].x0+e.graph.nodes[n].x1)/2,o=(e.graph.nodes[n].y0+e.graph.nodes[n].y1)/2;r.push(a/e.figure.width),i.push(o/e.figure.height)}CAr.call("_guiRestyle",t,{"node.x":[r],"node.y":[i]},e.trace.index).then(function(){t._fullLayout._dragCover&&t._fullLayout._dragCover.remove()})}function VAr(e){var t=[],r;for(r=0;r<e.length;r++)e[r].originalX=(e[r].x0+e[r].x1)/2,e[r].originalY=(e[r].y0+e[r].y1)/2,t.indexOf(e[r].originalX)===-1&&t.push(e[r].originalX);for(t.sort(function(i,n){return i-n}),r=0;r<e.length;r++)e[r].originalLayerIndex=t.indexOf(e[r].originalX),e[r].originalLayer=e[r].originalLayerIndex/(t.length-1)}function Nut(e){e.lastDraggedX=e.x0+e.dx/2,e.lastDraggedY=e.y0+e.dy/2}function jut(e){return function(t){return t.node.originalX===e.node.originalX}}function GAr(e){for(var t=0;t<e.length;t++)e[t].y=(e[t].y0+e[t].y1)/2,e[t].x=(e[t].x0+e[t].x1)/2}function HAr(e){for(var t=0;t<e.length;t++)e[t].y0=e[t].y-e[t].dy/2,e[t].y1=e[t].y0+e[t].dy,e[t].x0=e[t].x-e[t].dx/2,e[t].x1=e[t].x0+e[t].dx}$ut.exports=function(e,t,r,i,n){var a=e._context.staticPlot,o=!1;ng.ensureSingle(e._fullLayout._infolayer,"g","first-render",function(){o=!0});var s=e._fullLayout._dragCover,l=r.filter(function(m){return Uut(m).trace.visible}).map(PAr.bind(null,i)),u=t.selectAll("."+Lo.cn.sankey).data(l,L8);u.exit().remove(),u.enter().append("g").classed(Lo.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events",a?"none":"auto").attr("transform",qut),u.each(function(m,g){e._fullData[g]._sankey=m;var w="bgsankey-"+m.trace.uid+"-"+g;ng.ensureSingle(e._fullLayout._draggers,"rect",w),e._fullData[g]._bgRect=e6.select("."+w),e._fullData[g]._bgRect.style("pointer-events",a?"none":"all").attr("width",m.width).attr("height",m.height).attr("x",m.translateX).attr("y",m.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),u.transition().ease(Lo.ease).duration(Lo.duration).attr("transform",qut);var c=u.selectAll("."+Lo.cn.sankeyLinks).data(Kq,L8);c.enter().append("g").classed(Lo.cn.sankeyLinks,!0).style("fill","none");var f=c.selectAll("."+Lo.cn.sankeyLink).data(function(m){var g=m.graph.links;return g.filter(function(w){return w.value}).map(IAr.bind(null,m))},L8);f.enter().append("path").classed(Lo.cn.sankeyLink,!0).call(Out,u,n.linkEvents),f.style("stroke",m=>roe(m)?ig.rgb(m.linkLineColor):m.rgb).style("stroke-opacity",m=>roe(m)?ig.opacity(m.linkLineColor):m.alpha).style("fill",m=>m.rgb).style("fill-opacity",m=>m.alpha).style("stroke-width",m=>roe(m)?m.linkLineWidth:1).attr("d",aoe()),f.style("opacity",function(){return e._context.staticPlot||o||s?1:0}).transition().ease(Lo.ease).duration(Lo.duration).style("opacity",1),f.exit().transition().ease(Lo.ease).duration(Lo.duration).style("opacity",0).remove();var h=u.selectAll("."+Lo.cn.sankeyNodeSet).data(Kq,L8);h.enter().append("g").classed(Lo.cn.sankeyNodeSet,!0),h.style("cursor",function(m){switch(m.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var d=h.selectAll("."+Lo.cn.sankeyNode).data(function(m){var g=m.graph.nodes;return VAr(g),g.map(zAr.bind(null,m))},L8);d.enter().append("g").classed(Lo.cn.sankeyNode,!0).call(ioe).style("opacity",function(m){return(e._context.staticPlot||o)&&!m.partOfGroup?1:0}),d.call(Out,u,n.nodeEvents).call(qAr,f,n,e),d.transition().ease(Lo.ease).duration(Lo.duration).call(ioe).style("opacity",function(m){return m.partOfGroup?0:1}),d.exit().transition().ease(Lo.ease).duration(Lo.duration).style("opacity",0).remove();var p=d.selectAll("."+Lo.cn.nodeRect).data(Kq);p.enter().append("rect").classed(Lo.cn.nodeRect,!0).call(But),p.style("stroke-width",function(m){return m.nodeLineWidth}).style("stroke",function(m){return ig.rgb(m.nodeLineColor)}).style("stroke-opacity",function(m){return ig.opacity(m.nodeLineColor)}).style("fill",m=>m.rgb).style("fill-opacity",m=>m.alpha),p.transition().ease(Lo.ease).duration(Lo.duration).call(But);var v=d.selectAll("."+Lo.cn.nodeLabel).data(Kq);v.enter().append("text").classed(Lo.cn.nodeLabel,!0).style("cursor","default"),v.attr("data-notex",1).text(function(m){return m.node.label}).each(function(m){var g=e6.select(this);kAr.font(g,m.textFont),zut.convertToTspans(g,e)}).attr("text-anchor",function(m){return m.horizontal&&m.left!==m.reversed?"end":"start"}).attr("transform",function(m){var g=e6.select(this),w=zut.lineCount(g),b=m.textFont.size*((w-1)*FAr-DAr),_=m.nodeLineWidth/2+LAr;if(!m.horizontal){var T=m.reversed?(m.visibleWidth+b)/2:(m.visibleWidth-b)/2,M=m.reversed?Rut(90):"scale(-1,1)"+Rut(90);return p3(T,_)+M}var x=_,T=(m.visibleHeight-b)/2;return m.left?x=-x:x+=m.visibleWidth,p3(x,T)+(m.reversed?"scale(-1,1)":"")}),v.transition().ease(Lo.ease).duration(Lo.duration)}});var loe=W((Ori,rct)=>{"use strict";var Bf=vi(),soe=it(),Jq=soe.numberFormat,jAr=Wut(),t6=Ds(),$Ar=ni(),lx=toe().cn,P8=soe._;function Yut(e){return e!==""}function r6(e,t){return e.filter(function(r){return r.key===t.traceId})}function Xut(e,t){Bf.select(e).select("path").style("fill-opacity",t),Bf.select(e).select("rect").style("fill-opacity",t)}function Zut(e){Bf.select(e).select("text.name").style("fill","black")}function Kut(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function Jut(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function Qut(e,t,r){t&&r&&r6(r,t).selectAll("."+lx.sankeyLink).filter(Kut(t)).call(ect.bind(0,t,r,!1))}function ooe(e,t,r){t&&r&&r6(r,t).selectAll("."+lx.sankeyLink).filter(Kut(t)).call(tct.bind(0,t,r,!1))}function ect(e,t,r,i){i.style("fill",function(n){if(!n.link.concentrationscale)return n.hoverRgb}).style("fill-opacity",function(n){if(!n.link.concentrationscale)return n.hoverAlpha}),i.each(function(n){var a=n.link.label;a!==""&&r6(t,e).selectAll("."+lx.sankeyLink).filter(function(o){return o.link.label===a}).style("fill",function(o){if(!o.link.concentrationscale)return o.hoverRgb}).style("fill-opacity",function(o){if(!o.link.concentrationscale)return o.hoverAlpha})}),r&&r6(t,e).selectAll("."+lx.sankeyNode).filter(Jut(e)).call(Qut)}function tct(e,t,r,i){i.style("fill",function(n){return n.rgb}).style("fill-opacity",function(n){return n.alpha}),i.each(function(n){var a=n.link.label;a!==""&&r6(t,e).selectAll("."+lx.sankeyLink).filter(function(o){return o.link.label===a}).style("fill",o=>o.rgb).style("fill-opacity",o=>o.alpha)}),r&&r6(t,e).selectAll(lx.sankeyNode).filter(Jut(e)).call(ooe)}function Ys(e,t){var r=e.hoverlabel||{},i=soe.nestedProperty(r,t).get();return Array.isArray(i)?!1:i}rct.exports=function(t,r){for(var i=t._fullLayout,n=i._paper,a=i._size,o=0;o<t._fullData.length;o++)if(t._fullData[o].visible&&t._fullData[o].type===lx.sankey&&!t._fullData[o]._viewInitial){var s=t._fullData[o].node;t._fullData[o]._viewInitial={node:{groups:s.groups.slice(),x:s.x.slice(),y:s.y.slice()}}}var l=function(M,x){var T=x.link;T.originalEvent=Bf.event,t._hoverdata=[T],t6.click(t,{target:!0})},u=function(M,x,T){t._fullLayout.hovermode!==!1&&(Bf.select(M).call(ect.bind(0,x,T,!0)),x.link.trace.link.hoverinfo!=="skip"&&(x.link.fullData=x.link.trace,t.emit("plotly_hover",{event:Bf.event,points:[x.link]})))},c=P8(t,"source:")+" ",f=P8(t,"target:")+" ",h=P8(t,"concentration:")+" ",d=P8(t,"incoming flow count:")+" ",p=P8(t,"outgoing flow count:")+" ",v=function(M,x){if(t._fullLayout.hovermode===!1)return;var T=x.link.trace.link;if(T.hoverinfo==="none"||T.hoverinfo==="skip")return;var A=[];function y(P){var R,L;P.circular?(R=(P.circularPathData.leftInnerExtent+P.circularPathData.rightInnerExtent)/2,L=P.circularPathData.verticalFullExtent):(R=(P.source.x1+P.target.x0)/2,L=(P.y0+P.y1)/2);var I=P.trace.orientation==="v",B=P.trace.direction==="reversed",O=[R,L];return I&&O.reverse(),I&&B&&(O[1]=x.parent.height-O[1]),!I&&B&&(O[0]=x.parent.width-O[0]),O[0]+=x.parent.translateX,O[1]+=x.parent.translateY,O}for(var E=0,S=0;S<x.flow.links.length;S++){var C=x.flow.links[S];if(!(t._fullLayout.hovermode==="closest"&&x.link.pointNumber!==C.pointNumber)){x.link.pointNumber===C.pointNumber&&(E=S),C.fullData=C.trace,T=x.link.trace.link;var k=y(C),D={valueLabel:Jq(x.valueFormat)(C.value)+x.valueSuffix};A.push({x:k[0],y:k[1],name:D.valueLabel,text:[C.label||"",c+C.source.label,f+C.target.label,C.concentrationscale?h+Jq("%0.2f")(C.flow.labelConcentration):""].filter(Yut).join("<br>"),color:Ys(T,"bgcolor")||$Ar.addOpacity(C.color,1),borderColor:Ys(T,"bordercolor"),fontFamily:Ys(T,"font.family"),fontSize:Ys(T,"font.size"),fontColor:Ys(T,"font.color"),fontWeight:Ys(T,"font.weight"),fontStyle:Ys(T,"font.style"),fontVariant:Ys(T,"font.variant"),fontTextcase:Ys(T,"font.textcase"),fontLineposition:Ys(T,"font.lineposition"),fontShadow:Ys(T,"font.shadow"),nameLength:Ys(T,"namelength"),textAlign:Ys(T,"align"),idealAlign:Bf.event.x<k[0]?"right":"left",hovertemplate:T.hovertemplate,hovertemplateLabels:D,eventData:[C]})}}var F=t6.loneHover(A,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:t,anchorIndex:E});F.each(function(){var P=this;x.link.concentrationscale||Xut(P,.65),Zut(P)})},m=function(M,x,T){t._fullLayout.hovermode!==!1&&(Bf.select(M).call(tct.bind(0,x,T,!0)),x.link.trace.link.hoverinfo!=="skip"&&(x.link.fullData=x.link.trace,t.emit("plotly_unhover",{event:Bf.event,points:[x.link]})),t6.loneUnhover(i._hoverlayer.node()))},g=function(M,x,T){var A=x.node;A.originalEvent=Bf.event,t._hoverdata=[A],Bf.select(M).call(ooe,x,T),t6.click(t,{target:!0})},w=function(M,x,T){t._fullLayout.hovermode!==!1&&(Bf.select(M).call(Qut,x,T),x.node.trace.node.hoverinfo!=="skip"&&(x.node.fullData=x.node.trace,t.emit("plotly_hover",{event:Bf.event,points:[x.node]})))},b=function(M,x){if(t._fullLayout.hovermode!==!1){var T=x.node.trace.node;if(!(T.hoverinfo==="none"||T.hoverinfo==="skip")){var A=Bf.select(M).select("."+lx.nodeRect),y=t._fullLayout._paperdiv.node().getBoundingClientRect(),E=A.node().getBoundingClientRect(),S=E.left-2-y.left,C=E.right+2-y.left,k=E.top+E.height/4-y.top,D={valueLabel:Jq(x.valueFormat)(x.node.value)+x.valueSuffix};x.node.fullData=x.node.trace,t._fullLayout._calcInverseTransform(t);var F=t._fullLayout._invScaleX,P=t._fullLayout._invScaleY,R=t6.loneHover({x0:F*S,x1:F*C,y:P*k,name:Jq(x.valueFormat)(x.node.value)+x.valueSuffix,text:[x.node.label,d+x.node.targetLinks.length,p+x.node.sourceLinks.length].filter(Yut).join("<br>"),color:Ys(T,"bgcolor")||x.rgb,borderColor:Ys(T,"bordercolor"),fontFamily:Ys(T,"font.family"),fontSize:Ys(T,"font.size"),fontColor:Ys(T,"font.color"),fontWeight:Ys(T,"font.weight"),fontStyle:Ys(T,"font.style"),fontVariant:Ys(T,"font.variant"),fontTextcase:Ys(T,"font.textcase"),fontLineposition:Ys(T,"font.lineposition"),fontShadow:Ys(T,"font.shadow"),nameLength:Ys(T,"namelength"),textAlign:Ys(T,"align"),idealAlign:"left",hovertemplate:T.hovertemplate,hovertemplateLabels:D,eventData:[x.node]},{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:t});Xut(R,.85),Zut(R)}}},_=function(M,x,T){t._fullLayout.hovermode!==!1&&(Bf.select(M).call(ooe,x,T),x.node.trace.node.hoverinfo!=="skip"&&(x.node.fullData=x.node.trace,t.emit("plotly_unhover",{event:Bf.event,points:[x.node]})),t6.loneUnhover(i._hoverlayer.node()))};jAr(t,n,r,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},{linkEvents:{hover:u,follow:v,unhover:m,select:l},nodeEvents:{hover:w,follow:b,unhover:_,select:g}})}});var ict=W(v3=>{"use strict";var WAr=ls().overrideAll,YAr=_c().getModuleCalcData,XAr=loe(),ZAr=sy(),KAr=Np(),JAr=bf(),QAr=cu().prepSelect,uoe=it(),eMr=yi(),Qq="sankey";v3.name=Qq;v3.baseLayoutAttrOverrides=WAr({hoverlabel:ZAr.hoverlabel},"plot","nested");v3.plot=function(e){var t=YAr(e.calcdata,Qq)[0];XAr(e,t),v3.updateFx(e)};v3.clean=function(e,t,r,i){var n=i._has&&i._has(Qq),a=t._has&&t._has(Qq);n&&!a&&(i._paperdiv.selectAll(".sankey").remove(),i._paperdiv.selectAll(".bgsankey").remove())};v3.updateFx=function(e){for(var t=0;t<e._fullData.length;t++)tMr(e,t)};function tMr(e,t){var r=e._fullData[t],i=e._fullLayout,n=i.dragmode,a=i.dragmode==="pan"?"move":"crosshair",o=r._bgRect;if(o&&!(n==="pan"||n==="zoom")){KAr(o,a);var s={_id:"x",c2p:uoe.identity,_offset:r._sankey.translateX,_length:r._sankey.width},l={_id:"y",c2p:uoe.identity,_offset:r._sankey.translateY,_length:r._sankey.height},u={gd:e,element:o.node(),plotinfo:{id:t,xaxis:s,yaxis:l,fillRangeItems:uoe.noop},subplot:t,xaxes:[s],yaxes:[l],doneFnCompleted:function(c){var f=e._fullData[t],h,d=f.node.groups.slice(),p=[];function v(b){for(var _=f._sankey.graph.nodes,M=0;M<_.length;M++)if(_[M].pointNumber===b)return _[M]}for(var m=0;m<c.length;m++){var g=v(c[m].pointNumber);if(g)if(g.group){for(var w=0;w<g.childrenNodes.length;w++)p.push(g.childrenNodes[w].pointNumber);d[g.pointNumber-f.node._count]=!1}else p.push(g.pointNumber)}h=d.filter(Boolean).concat([p]),eMr.call("_guiRestyle",e,{"node.groups":[h]},t)}};u.prepFn=function(c,f,h){QAr(c,f,h,u,n)},JAr.init(u)}}});var act=W((Uri,nct)=>{"use strict";nct.exports=function(t,r){for(var i=t.cd,n=[],a=i[0].trace,o=a._sankey,s=o.graph.nodes,l=a.orientation==="v",u=a.direction==="reversed",c=0;c<s.length;c++){var f=s[c];if(!f.partOfGroup){var h=(f.x0+f.x1)/2,d=(f.y0+f.y1)/2,p;l?p=[d,u?o.height-h:h]:p=[u?o.width-h:h,d],r&&r.contains(p,!1,c,t)&&n.push({pointNumber:f.pointNumber})}}return n}});var sct=W((Vri,oct)=>{"use strict";oct.exports={attributes:Kae(),supplyDefaults:aut(),calc:cut(),plot:loe(),moduleType:"trace",name:"sankey",basePlotModule:ict(),selectPoints:act(),categories:["noOpacity"],meta:{}}});var uct=W((Gri,lct)=>{"use strict";lct.exports=sct()});var fct=W(i6=>{"use strict";var cct=Ko();i6.name="indicator";i6.plot=function(e,t,r,i){cct.plotBasePlot(i6.name,e,t,r,i)};i6.clean=function(e,t,r,i){cct.cleanBasePlot(i6.name,e,t,r,i)}});var foe=W((jri,mct)=>{"use strict";var ux=tn().extendFlat,dct=tn().extendDeep,rMr=ls().overrideAll,pct=Ho(),vct=Vl(),iMr=us().attributes,sl=ec(),nMr=Da().templatedArray,eO=D5(),hct=_s().descriptionOnlyNumbers,coe=pct({editType:"plot",colorEditType:"plot"}),I8={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:vct.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"},gct={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},aMr=nMr("step",dct({},I8,{range:gct}));mct.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:iMr({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:ux({},coe,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:hct("value")},font:ux({},coe,{}),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:hct("value")},increasing:{symbol:{valType:"string",dflt:eO.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:eO.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:eO.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:eO.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:ux({},coe,{}),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:dct({},I8,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:vct.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:rMr({range:gct,visible:ux({},sl.visible,{dflt:!0}),tickmode:sl.minor.tickmode,nticks:sl.nticks,tick0:sl.tick0,dtick:sl.dtick,tickvals:sl.tickvals,ticktext:sl.ticktext,ticks:ux({},sl.ticks,{dflt:"outside"}),ticklen:sl.ticklen,tickwidth:sl.tickwidth,tickcolor:sl.tickcolor,ticklabelstep:sl.ticklabelstep,showticklabels:sl.showticklabels,labelalias:sl.labelalias,tickfont:pct({}),tickangle:sl.tickangle,tickformat:sl.tickformat,tickformatstops:sl.tickformatstops,tickprefix:sl.tickprefix,showtickprefix:sl.showtickprefix,ticksuffix:sl.ticksuffix,showticksuffix:sl.showticksuffix,separatethousands:sl.separatethousands,exponentformat:sl.exponentformat,minexponent:sl.minexponent,showexponent:sl.showexponent,editType:"plot"},"plot"),steps:aMr,threshold:{line:{color:ux({},I8.line.color,{}),width:ux({},I8.line.width,{dflt:1}),editType:"plot"},thickness:ux({},I8.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var hoe=W(($ri,yct)=>{"use strict";yct.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var bct=W((Wri,_ct)=>{"use strict";var ag=it(),rO=foe(),oMr=us().defaults,xct=Da(),sMr=Xc(),tO=hoe(),lMr=Xx(),uMr=vw(),cMr=wy(),fMr=Ty();function hMr(e,t,r,i){function n(x,T){return ag.coerce(e,t,rO,x,T)}oMr(t,i,n),n("mode"),t._hasNumber=t.mode.indexOf("number")!==-1,t._hasDelta=t.mode.indexOf("delta")!==-1,t._hasGauge=t.mode.indexOf("gauge")!==-1;var a=n("value");t._range=[0,typeof a=="number"?1.5*a:1];var o=new Array(2),s;if(t._hasNumber){n("number.valueformat");var l=ag.extendFlat({},i.font);l.size=void 0,ag.coerceFont(n,"number.font",l),t.number.font.size===void 0&&(t.number.font.size=tO.defaultNumberFontSize,o[0]=!0),n("number.prefix"),n("number.suffix"),s=t.number.font.size}var u;if(t._hasDelta){var c=ag.extendFlat({},i.font);c.size=void 0,ag.coerceFont(n,"delta.font",c),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||tO.defaultNumberFontSize),o[1]=!0),n("delta.reference",t.value),n("delta.relative"),n("delta.valueformat",t.delta.relative?"2%":""),n("delta.increasing.symbol"),n("delta.increasing.color"),n("delta.decreasing.symbol"),n("delta.decreasing.color"),n("delta.position"),n("delta.prefix"),n("delta.suffix"),u=t.delta.font.size}t._scaleNumbers=(!t._hasNumber||o[0])&&(!t._hasDelta||o[1])||!1;var f=ag.extendFlat({},i.font);f.size=.25*(s||u||tO.defaultNumberFontSize),ag.coerceFont(n,"title.font",f),n("title.text");var h,d,p,v;function m(x,T){return ag.coerce(h,d,rO.gauge,x,T)}function g(x,T){return ag.coerce(p,v,rO.gauge.axis,x,T)}if(t._hasGauge){h=e.gauge,h||(h={}),d=xct.newContainer(t,"gauge"),m("shape");var w=t._isBullet=t.gauge.shape==="bullet";w||n("title.align","center");var b=t._isAngular=t.gauge.shape==="angular";b||n("align","center"),m("bgcolor",i.paper_bgcolor),m("borderwidth"),m("bordercolor"),m("bar.color"),m("bar.line.color"),m("bar.line.width");var _=tO.valueThickness*(t.gauge.shape==="bullet"?.5:1);m("bar.thickness",_),sMr(h,d,{name:"steps",handleItemDefaults:dMr}),m("threshold.value"),m("threshold.thickness"),m("threshold.line.width"),m("threshold.line.color"),p={},h&&(p=h.axis||{}),v=xct.newContainer(d,"axis"),g("visible"),t._range=g("range",t._range);var M={font:i.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};lMr(p,v,g,"linear"),fMr(p,v,g,"linear",M),cMr(p,v,g,"linear",M),uMr(p,v,g,M)}else n("title.align","center"),n("align","center"),t._isAngular=t._isBullet=!1;t._length=null}function dMr(e,t){function r(i,n){return ag.coerce(e,t,rO.gauge.steps,i,n)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}_ct.exports={supplyDefaults:hMr}});var Tct=W((Yri,wct)=>{"use strict";function pMr(e,t){var r=[],i=t.value;typeof t._lastValue!="number"&&(t._lastValue=t.value);var n=t._lastValue,a=n;return t._hasDelta&&typeof t.delta.reference=="number"&&(a=t.delta.reference),r[0]={y:i,lastY:n,delta:i-a,relativeDelta:(i-a)/a},r}wct.exports={calc:pMr}});var Cct=W((Xri,kct)=>{"use strict";var _3=vi(),vMr=(db(),Go(hb)).interpolate,Act=(db(),Go(hb)).interpolateNumber,cx=it(),gMr=cx.strScale,z8=cx.strTranslate,mMr=cx.rad2deg,yMr=Hl().MID_SHIFT,x3=Ji(),g3=hoe(),nO=uo(),Oc=ji(),xMr=mM(),_Mr=TF(),bMr=ec(),n6=ni(),doe={left:"start",center:"middle",right:"end"},m3={left:0,center:.5,right:1},Mct=/[yzafpnµmkMGTPEZY]/;function B8(e){return e&&e.duration>0}kct.exports=function(t,r,i,n){var a=t._fullLayout,o;B8(i)&&n&&(o=n()),cx.makeTraceGroups(a._indicatorlayer,r,"trace").each(function(s){var l=s[0],u=l.trace,c=_3.select(this),f=u._hasGauge,h=u._isAngular,d=u._isBullet,p=u.domain,v={w:a._size.w*(p.x[1]-p.x[0]),h:a._size.h*(p.y[1]-p.y[0]),l:a._size.l+a._size.w*p.x[0],r:a._size.r+a._size.w*(1-p.x[1]),t:a._size.t+a._size.h*(1-p.y[1]),b:a._size.b+a._size.h*p.y[0]},m=v.l+v.w/2,g=v.t+v.h/2,w=Math.min(v.w/2,v.h),b=g3.innerRadius*w,_,M,x,T=u.align||"center";if(M=g,!f)_=v.l+m3[T]*v.w,x=function(R){return Sct(R,v.w,v.h)};else if(h&&(_=m,M=g+w/2,x=function(R){return SMr(R,.9*b)}),d){var A=g3.bulletPadding,y=1-g3.bulletNumberDomainSize+A;_=v.l+(y+(1-y)*m3[T])*v.w,x=function(R){return Sct(R,(g3.bulletNumberDomainSize-A)*v.w,v.h)}}AMr(t,c,s,{numbersX:_,numbersY:M,numbersScaler:x,transitionOpts:i,onComplete:o});var E,S;f&&(E={range:u.gauge.axis.range,color:u.gauge.bgcolor,line:{color:u.gauge.bordercolor,width:0},thickness:1},S={range:u.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:u.gauge.bordercolor,width:u.gauge.borderwidth},thickness:1});var C=c.selectAll("g.angular").data(h?s:[]);C.exit().remove();var k=c.selectAll("g.angularaxis").data(h?s:[]);k.exit().remove(),h&&TMr(t,c,s,{radius:w,innerRadius:b,gauge:C,layer:k,size:v,gaugeBg:E,gaugeOutline:S,transitionOpts:i,onComplete:o});var D=c.selectAll("g.bullet").data(d?s:[]);D.exit().remove();var F=c.selectAll("g.bulletaxis").data(d?s:[]);F.exit().remove(),d&&wMr(t,c,s,{gauge:D,layer:F,size:v,gaugeBg:E,gaugeOutline:S,transitionOpts:i,onComplete:o});var P=c.selectAll("text.title").data(s);P.exit().remove(),P.enter().append("text").classed("title",!0),P.attr("text-anchor",function(){return d?doe.right:doe[u.title.align]}).text(u.title.text).call(x3.font,u.title.font).call(nO.convertToTspans,t),P.attr("transform",function(){var R=v.l+v.w*m3[u.title.align],L,I=g3.titlePadding,B=x3.bBox(P.node());if(f){if(h)if(u.gauge.axis.visible){var O=x3.bBox(k.node());L=O.top-I-B.bottom}else L=v.t+v.h/2-w/2-B.bottom-I;d&&(L=M-(B.top+B.bottom)/2,R=v.l-g3.bulletPadding*v.w)}else L=u._numbersTop-I-B.bottom;return z8(R,L)})})};function wMr(e,t,r,i){var n=r[0].trace,a=i.gauge,o=i.layer,s=i.gaugeBg,l=i.gaugeOutline,u=i.size,c=n.domain,f=i.transitionOpts,h=i.onComplete,d,p,v,m,g;a.enter().append("g").classed("bullet",!0),a.attr("transform",z8(u.l,u.t)),o.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),o.selectAll("g.xbulletaxistick,path,text").remove();var w=u.h,b=n.gauge.bar.thickness*w,_=c.x[0],M=c.x[0]+(c.x[1]-c.x[0])*(n._hasNumber||n._hasDelta?1-g3.bulletNumberDomainSize:1);d=R8(e,n.gauge.axis),d._id="xbulletaxis",d.domain=[_,M],d.setScale(),p=Oc.calcTicks(d),v=Oc.makeTransTickFn(d),m=Oc.getTickSigns(d)[2],g=u.t+u.h,d.visible&&(Oc.drawTicks(e,d,{vals:d.ticks==="inside"?Oc.clipEnds(d,p):p,layer:o,path:Oc.makeTickPath(d,g,m),transFn:v}),Oc.drawLabels(e,d,{vals:p,layer:o,transFn:v,labelFns:Oc.makeLabelFns(d,g)}));function x(k){k.attr("width",function(D){return Math.max(0,d.c2p(D.range[1])-d.c2p(D.range[0]))}).attr("x",function(D){return d.c2p(D.range[0])}).attr("y",function(D){return .5*(1-D.thickness)*w}).attr("height",function(D){return D.thickness*w})}var T=[s].concat(n.gauge.steps),A=a.selectAll("g.bg-bullet").data(T);A.enter().append("g").classed("bg-bullet",!0).append("rect"),A.select("rect").call(x).call(y3),A.exit().remove();var y=a.selectAll("g.value-bullet").data([n.gauge.bar]);y.enter().append("g").classed("value-bullet",!0).append("rect"),y.select("rect").attr("height",b).attr("y",(w-b)/2).call(y3),B8(f)?y.select("rect").transition().duration(f.duration).ease(f.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).attr("width",Math.max(0,d.c2p(Math.min(n.gauge.axis.range[1],r[0].y)))):y.select("rect").attr("width",typeof r[0].y=="number"?Math.max(0,d.c2p(Math.min(n.gauge.axis.range[1],r[0].y))):0),y.exit().remove();var E=r.filter(function(){return n.gauge.threshold.value||n.gauge.threshold.value===0}),S=a.selectAll("g.threshold-bullet").data(E);S.enter().append("g").classed("threshold-bullet",!0).append("line"),S.select("line").attr("x1",d.c2p(n.gauge.threshold.value)).attr("x2",d.c2p(n.gauge.threshold.value)).attr("y1",(1-n.gauge.threshold.thickness)/2*w).attr("y2",(1-(1-n.gauge.threshold.thickness)/2)*w).call(n6.stroke,n.gauge.threshold.line.color).style("stroke-width",n.gauge.threshold.line.width),S.exit().remove();var C=a.selectAll("g.gauge-outline").data([l]);C.enter().append("g").classed("gauge-outline",!0).append("rect"),C.select("rect").call(x).call(y3),C.exit().remove()}function TMr(e,t,r,i){var n=r[0].trace,a=i.size,o=i.radius,s=i.innerRadius,l=i.gaugeBg,u=i.gaugeOutline,c=[a.l+a.w/2,a.t+a.h/2+o/2],f=i.gauge,h=i.layer,d=i.transitionOpts,p=i.onComplete,v=Math.PI/2;function m($){var Y=n.gauge.axis.range[0],K=n.gauge.axis.range[1],j=($-Y)/(K-Y)*Math.PI-v;return j<-v?-v:j>v?v:j}function g($){return _3.svg.arc().innerRadius((s+o)/2-$/2*(o-s)).outerRadius((s+o)/2+$/2*(o-s)).startAngle(-v)}function w($){$.attr("d",function(Y){return g(Y.thickness).startAngle(m(Y.range[0])).endAngle(m(Y.range[1]))()})}var b,_,M,x;f.enter().append("g").classed("angular",!0),f.attr("transform",z8(c[0],c[1])),h.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),h.selectAll("g.xangularaxistick,path,text").remove(),b=R8(e,n.gauge.axis),b.type="linear",b.range=n.gauge.axis.range,b._id="xangularaxis",b.ticklabeloverflow="allow",b.setScale();var T=function($){return(b.range[0]-$.x)/(b.range[1]-b.range[0])*Math.PI+Math.PI},A={},y=Oc.makeLabelFns(b,0),E=y.labelStandoff;A.xFn=function($){var Y=T($);return Math.cos(Y)*E},A.yFn=function($){var Y=T($),K=Math.sin(Y)>0?.2:1;return-Math.sin(Y)*(E+$.fontSize*K)+Math.abs(Math.cos(Y))*($.fontSize*yMr)},A.anchorFn=function($){var Y=T($),K=Math.cos(Y);return Math.abs(K)<.1?"middle":K>0?"start":"end"},A.heightFn=function($,Y,K){var j=T($);return-.5*(1+Math.sin(j))*K};var S=function($){return z8(c[0]+o*Math.cos($),c[1]-o*Math.sin($))};M=function($){return S(T($))};var C=function($){var Y=T($);return S(Y)+"rotate("+-mMr(Y)+")"};if(_=Oc.calcTicks(b),x=Oc.getTickSigns(b)[2],b.visible){x=b.ticks==="inside"?-1:1;var k=(b.linewidth||1)/2;Oc.drawTicks(e,b,{vals:_,layer:h,path:"M"+x*k+",0h"+x*b.ticklen,transFn:C}),Oc.drawLabels(e,b,{vals:_,layer:h,transFn:M,labelFns:A})}var D=[l].concat(n.gauge.steps),F=f.selectAll("g.bg-arc").data(D);F.enter().append("g").classed("bg-arc",!0).append("path"),F.select("path").call(w).call(y3),F.exit().remove();var P=g(n.gauge.bar.thickness),R=f.selectAll("g.value-arc").data([n.gauge.bar]);R.enter().append("g").classed("value-arc",!0).append("path");var L=R.select("path");B8(d)?(L.transition().duration(d.duration).ease(d.easing).each("end",function(){p&&p()}).each("interrupt",function(){p&&p()}).attrTween("d",MMr(P,m(r[0].lastY),m(r[0].y))),n._lastValue=r[0].y):L.attr("d",typeof r[0].y=="number"?P.endAngle(m(r[0].y)):"M0,0Z"),L.call(y3),R.exit().remove(),D=[];var I=n.gauge.threshold.value;(I||I===0)&&D.push({range:[I,I],color:n.gauge.threshold.color,line:{color:n.gauge.threshold.line.color,width:n.gauge.threshold.line.width},thickness:n.gauge.threshold.thickness});var B=f.selectAll("g.threshold-arc").data(D);B.enter().append("g").classed("threshold-arc",!0).append("path"),B.select("path").call(w).call(y3),B.exit().remove();var O=f.selectAll("g.gauge-outline").data([u]);O.enter().append("g").classed("gauge-outline",!0).append("path"),O.select("path").call(w).call(y3),O.exit().remove()}function AMr(e,t,r,i){var n=r[0].trace,a=i.numbersX,o=i.numbersY,s=n.align||"center",l=doe[s],u=i.transitionOpts,c=i.onComplete,f=cx.ensureSingle(t,"g","numbers"),h,d,p,v=[];n._hasNumber&&v.push("number"),n._hasDelta&&(v.push("delta"),n.delta.position==="left"&&v.reverse());var m=f.selectAll("text").data(v);m.enter().append("text"),m.attr("text-anchor",function(){return l}).attr("class",function(S){return S}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),m.exit().remove();function g(S,C,k,D){if(S.match("s")&&k>=0!=D>=0&&!C(k).slice(-1).match(Mct)&&!C(D).slice(-1).match(Mct)){var F=S.slice().replace("s","f").replace(/\d+/,function(R){return parseInt(R)-1}),P=R8(e,{tickformat:F});return function(R){return Math.abs(R)<1?Oc.tickText(P,R).text:C(R)}}else return C}function w(){var S=R8(e,{tickformat:n.number.valueformat},n._range);S.setScale(),Oc.prepTicks(S);var C=function(R){return Oc.tickText(S,R).text},k=n.number.suffix,D=n.number.prefix,F=f.select("text.number");function P(){var R=typeof r[0].y=="number"?D+C(r[0].y)+k:"-";F.text(R).call(x3.font,n.number.font).call(nO.convertToTspans,e)}return B8(u)?F.transition().duration(u.duration).ease(u.easing).each("end",function(){P(),c&&c()}).each("interrupt",function(){P(),c&&c()}).attrTween("text",function(){var R=_3.select(this),L=Act(r[0].lastY,r[0].y);n._lastValue=r[0].y;var I=g(n.number.valueformat,C,r[0].lastY,r[0].y);return function(B){R.text(D+I(L(B))+k)}}):P(),h=Ect(D+C(r[0].y)+k,n.number.font,l,e),F}function b(){var S=R8(e,{tickformat:n.delta.valueformat},n._range);S.setScale(),Oc.prepTicks(S);var C=function(B){return Oc.tickText(S,B).text},k=n.delta.suffix,D=n.delta.prefix,F=function(B){var O=n.delta.relative?B.relativeDelta:B.delta;return O},P=function(B,O){return B===0||typeof B!="number"||isNaN(B)?"-":(B>0?n.delta.increasing.symbol:n.delta.decreasing.symbol)+D+O(B)+k},R=function(B){return B.delta>=0?n.delta.increasing.color:n.delta.decreasing.color};n._deltaLastValue===void 0&&(n._deltaLastValue=F(r[0]));var L=f.select("text.delta");L.call(x3.font,n.delta.font).call(n6.fill,R({delta:n._deltaLastValue}));function I(){L.text(P(F(r[0]),C)).call(n6.fill,R(r[0])).call(nO.convertToTspans,e)}return B8(u)?L.transition().duration(u.duration).ease(u.easing).tween("text",function(){var B=_3.select(this),O=F(r[0]),$=n._deltaLastValue,Y=g(n.delta.valueformat,C,$,O),K=Act($,O);return n._deltaLastValue=O,function(j){B.text(P(K(j),Y)),B.call(n6.fill,R({delta:K(j)}))}}).each("end",function(){I(),c&&c()}).each("interrupt",function(){I(),c&&c()}):I(),d=Ect(P(F(r[0]),C),n.delta.font,l,e),L}var _=n.mode+n.align,M;if(n._hasDelta&&(M=b(),_+=n.delta.position+n.delta.font.size+n.delta.font.family+n.delta.valueformat,_+=n.delta.increasing.symbol+n.delta.decreasing.symbol,p=d),n._hasNumber&&(w(),_+=n.number.font.size+n.number.font.family+n.number.valueformat+n.number.suffix+n.number.prefix,p=h),n._hasDelta&&n._hasNumber){var x=[(h.left+h.right)/2,(h.top+h.bottom)/2],T=[(d.left+d.right)/2,(d.top+d.bottom)/2],A,y,E=.75*n.delta.font.size;n.delta.position==="left"&&(A=iO(n,"deltaPos",0,-1*(h.width*m3[n.align]+d.width*(1-m3[n.align])+E),_,Math.min),y=x[1]-T[1],p={width:h.width+d.width+E,height:Math.max(h.height,d.height),left:d.left+A,right:h.right,top:Math.min(h.top,d.top+y),bottom:Math.max(h.bottom,d.bottom+y)}),n.delta.position==="right"&&(A=iO(n,"deltaPos",0,h.width*(1-m3[n.align])+d.width*m3[n.align]+E,_,Math.max),y=x[1]-T[1],p={width:h.width+d.width+E,height:Math.max(h.height,d.height),left:h.left,right:d.right+A,top:Math.min(h.top,d.top+y),bottom:Math.max(h.bottom,d.bottom+y)}),n.delta.position==="bottom"&&(A=null,y=d.height,p={width:Math.max(h.width,d.width),height:h.height+d.height,left:Math.min(h.left,d.left),right:Math.max(h.right,d.right),top:h.bottom-h.height,bottom:h.bottom+d.height}),n.delta.position==="top"&&(A=null,y=h.top,p={width:Math.max(h.width,d.width),height:h.height+d.height,left:Math.min(h.left,d.left),right:Math.max(h.right,d.right),top:h.bottom-h.height-d.height,bottom:h.bottom}),M.attr({dx:A,dy:y})}(n._hasNumber||n._hasDelta)&&f.attr("transform",function(){var S=i.numbersScaler(p);_+=S[2];var C=iO(n,"numbersScale",1,S[0],_,Math.min),k;n._scaleNumbers||(C=1),n._isAngular?k=o-C*p.bottom:k=o-C*(p.top+p.bottom)/2,n._numbersTop=C*p.top+k;var D=p[s];s==="center"&&(D=(p.left+p.right)/2);var F=a-C*D;return F=iO(n,"numbersTranslate",0,F,_,Math.max),z8(F,k)+gMr(C)})}function y3(e){e.each(function(t){n6.stroke(_3.select(this),t.line.color)}).each(function(t){n6.fill(_3.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function MMr(e,t,r){return function(){var i=vMr(t,r);return function(n){return e.endAngle(i(n))()}}}function R8(e,t,r){var i=e._fullLayout,n=cx.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),a={type:"linear",_id:"x"+t._id},o={letter:"x",font:i.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function s(l,u){return cx.coerce(n,a,bMr,l,u)}return xMr(n,a,s,o,i),_Mr(n,a,s,o),a}function Sct(e,t,r){var i=Math.min(t/e.width,r/e.height);return[i,e,t+"x"+r]}function SMr(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),i=t/r;return[i,e,t]}function Ect(e,t,r,i){var n=document.createElementNS("http://www.w3.org/2000/svg","text"),a=_3.select(n);return a.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(nO.convertToTspans,i).call(x3.font,t),x3.bBox(a.node())}function iO(e,t,r,i,n,a){var o="_cache"+t;e[o]&&e[o].key===n||(e[o]={key:n,value:r});var s=cx.aggNums(a,null,[e[o].value,i],2);return e[o].value=s,s}});var Fct=W((Zri,Dct)=>{"use strict";Dct.exports={moduleType:"trace",name:"indicator",basePlotModule:fct(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:foe(),supplyDefaults:bct().supplyDefaults,calc:Tct().calc,plot:Cct(),meta:{}}});var Pct=W((Kri,Lct)=>{"use strict";Lct.exports=Fct()});var poe=W((Qri,Bct)=>{"use strict";var Ict=qy(),aO=tn().extendFlat,EMr=ls().overrideAll,Rct=Ho(),kMr=us().attributes,zct=_s().descriptionOnlyNumbers,Jri=Bct.exports=EMr({domain:kMr({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:zct("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:aO({},Ict.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:aO({},Rct({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:zct("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:aO({},Ict.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:aO({},Rct({arrayOk:!0}))}},"calc","from-root")});var Oct=W((eii,qct)=>{"use strict";var voe=it(),CMr=poe(),DMr=us().defaults;function FMr(e,t){for(var r=e.columnorder||[],i=e.header.values.length,n=r.slice(0,i),a=n.slice().sort(function(l,u){return l-u}),o=n.map(function(l){return a.indexOf(l)}),s=o.length;s<i;s++)o.push(s);t("columnorder",o)}qct.exports=function(t,r,i,n){function a(o,s){return voe.coerce(t,r,CMr,o,s)}DMr(r,n,a),a("columnwidth"),a("header.values"),a("header.format"),a("header.align"),a("header.prefix"),a("header.suffix"),a("header.height"),a("header.line.width"),a("header.line.color"),a("header.fill.color"),voe.coerceFont(a,"header.font",n.font),FMr(r,a),a("cells.values"),a("cells.format"),a("cells.align"),a("cells.prefix"),a("cells.suffix"),a("cells.height"),a("cells.line.width"),a("cells.line.color"),a("cells.fill.color"),voe.coerceFont(a,"cells.font",n.font),r._length=null}});var Uct=W((tii,Nct)=>{"use strict";var LMr=G1().wrap;Nct.exports=function(){return LMr({})}});var goe=W((rii,Vct)=>{"use strict";Vct.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"}}});var Kct=W((iii,Zct)=>{"use strict";var Gct=goe(),yoe=tn().extendFlat,PMr=sn(),IMr=yc().isTypedArray,oO=yc().isArrayOrTypedArray;Zct.exports=function(t,r){var i=moe(r.cells.values),n=function(y){return y.slice(r.header.values.length,y.length)},a=moe(r.header.values);a.length&&!a[0].length&&(a[0]=[""],a=moe(a));var o=a.concat(n(i).map(function(){return Xct((a[0]||[""]).length)})),s=r.domain,l=Math.floor(t._fullLayout._size.w*(s.x[1]-s.x[0])),u=Math.floor(t._fullLayout._size.h*(s.y[1]-s.y[0])),c=r.header.values.length?o[0].map(function(){return r.header.height}):[Gct.emptyHeaderHeight],f=i.length?i[0].map(function(){return r.cells.height}):[],h=c.reduce(Hct,0),d=u-h,p=d+Gct.uplift,v=Wct(f,p),m=Wct(c,h),g=$ct(m,[]),w=$ct(v,g),b={},_=r.columnorder;oO(_)&&(_=Array.from(_)),_=_.concat(n(i.map(function(y,E){return E})));var M=o.map(function(y,E){var S=oO(r.columnwidth)?r.columnwidth[Math.min(E,r.columnwidth.length-1)]:r.columnwidth;return PMr(S)?Number(S):1}),x=M.reduce(Hct,0);M=M.map(function(y){return y/x*l});var T=Math.max(xoe(r.header.line.width),xoe(r.cells.line.width)),A={key:r.uid+t._context.staticPlot,translateX:s.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-s.y[1]),size:t._fullLayout._size,width:l,maxLineWidth:T,height:u,columnOrder:_,groupHeight:u,rowBlocks:w,headerRowBlocks:g,scrollY:0,cells:yoe({},r.cells,{values:i}),headerCells:yoe({},r.header,{values:o}),gdColumns:o.map(function(y){return y[0]}),gdColumnsOriginalOrder:o.map(function(y){return y[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(y,E){var S=b[y];b[y]=(S||0)+1;var C=y+"__"+b[y];return{key:C,label:y,specIndex:E,xIndex:_[E],xScale:jct,x:void 0,calcdata:void 0,columnWidth:M[E]}})};return A.columns.forEach(function(y){y.calcdata=A,y.x=jct(y)}),A};function xoe(e){if(oO(e)){for(var t=0,r=0;r<e.length;r++)t=Math.max(t,xoe(e[r]));return t}return e}function Hct(e,t){return e+t}function moe(e){var t=e.slice(),r=1/0,i=0,n;for(n=0;n<t.length;n++)IMr(t[n])?t[n]=Array.from(t[n]):oO(t[n])||(t[n]=[t[n]]),r=Math.min(r,t[n].length),i=Math.max(i,t[n].length);if(r!==i)for(n=0;n<t.length;n++){var a=i-t[n].length;a&&(t[n]=t[n].concat(Xct(a)))}return t}function Xct(e){for(var t=new Array(e),r=0;r<e;r++)t[r]="";return t}function jct(e){return e.calcdata.columns.reduce(function(t,r){return r.xIndex<e.xIndex?t+r.columnWidth:t},0)}function $ct(e,t){var r=Object.keys(e);return r.map(function(i){return yoe({},e[i],{auxiliaryBlocks:t})})}function Wct(e,t){for(var r={},i,n=0,a=0,o=Yct(),s=0,l=0,u=0;u<e.length;u++)i=e[u],o.rows.push({rowIndex:u,rowHeight:i}),a+=i,(a>=t||u===e.length-1)&&(r[n]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o=Yct(),n+=a,s=u+1,a=0);return r}function Yct(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var Jct=W(_oe=>{"use strict";var sO=tn().extendFlat;_oe.splitToPanels=function(e){var t=[0,0],r=sO({},e,{key:"header",type:"header",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:sO({},e.calcdata,{cells:e.calcdata.headerCells})}),i=sO({},e,{key:"cells1",type:"cells",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),n=sO({},e,{key:"cells2",type:"cells",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks});return[i,n,r]};_oe.splitToCells=function(e){var t=RMr(e);return(e.values||[]).slice(t[0],t[1]).map(function(r,i){var n=typeof r=="string"&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:i+n,key:t[0]+i,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}})};function RMr(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,i=t?r+t.rows.length:0;return[r,i]}});var Doe=W((aii,uft)=>{"use strict";var Ti=goe(),Ms=vi(),boe=it(),zMr=boe.numberFormat,Po=G1(),woe=Ji(),BMr=uo(),qMr=it().raiseToTop,ap=it().strTranslate,OMr=it().cancelTransition,NMr=Kct(),aft=Jct(),Qct=ni();uft.exports=function(t,r){var i=!t._context.staticPlot,n=t._fullLayout._paper.selectAll("."+Ti.cn.table).data(r.map(function(w){var b=Po.unwrap(w),_=b.trace;return NMr(t,_)}),Po.keyFun);n.exit().remove(),n.enter().append("g").classed(Ti.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"),n.attr("width",function(w){return w.width+w.size.l+w.size.r}).attr("height",function(w){return w.height+w.size.t+w.size.b}).attr("transform",function(w){return ap(w.translateX,w.translateY)});var a=n.selectAll("."+Ti.cn.tableControlView).data(Po.repeat,Po.keyFun),o=a.enter().append("g").classed(Ti.cn.tableControlView,!0).style("box-sizing","content-box");if(i){var s="onwheel"in document?"wheel":"mousewheel";o.on("mousemove",function(w){a.filter(function(b){return w===b}).call(q8,t)}).on(s,function(w){if(!w.scrollbarState.wheeling){w.scrollbarState.wheeling=!0;var b=w.scrollY+Ms.event.deltaY,_=uO(t,a,null,b)(w);_||(Ms.event.stopPropagation(),Ms.event.preventDefault()),w.scrollbarState.wheeling=!1}}).call(q8,t,!0)}a.attr("transform",function(w){return ap(w.size.l,w.size.t)});var l=a.selectAll("."+Ti.cn.scrollBackground).data(Po.repeat,Po.keyFun);l.enter().append("rect").classed(Ti.cn.scrollBackground,!0).attr("fill","none"),l.attr("width",function(w){return w.width}).attr("height",function(w){return w.height}),a.each(function(w){woe.setClipUrl(Ms.select(this),eft(t,w),t)});var u=a.selectAll("."+Ti.cn.yColumn).data(function(w){return w.columns},Po.keyFun);u.enter().append("g").classed(Ti.cn.yColumn,!0),u.exit().remove(),u.attr("transform",function(w){return ap(w.x,0)}),i&&u.call(Ms.behavior.drag().origin(function(w){var b=Ms.select(this);return ift(b,w,-Ti.uplift),qMr(this),w.calcdata.columnDragInProgress=!0,q8(a.filter(function(_){return w.calcdata.key===_.key}),t),w}).on("drag",function(w){var b=Ms.select(this),_=function(T){return(w===T?Ms.event.x:T.x)+T.columnWidth/2};w.x=Math.max(-Ti.overdrag,Math.min(w.calcdata.width+Ti.overdrag-w.columnWidth,Ms.event.x));var M=oft(u).filter(function(T){return T.calcdata.key===w.calcdata.key}),x=M.sort(function(T,A){return _(T)-_(A)});x.forEach(function(T,A){T.xIndex=A,T.x=w===T?T.x:T.xScale(T)}),u.filter(function(T){return w!==T}).transition().ease(Ti.transitionEase).duration(Ti.transitionDuration).attr("transform",function(T){return ap(T.x,0)}),b.call(OMr).attr("transform",ap(w.x,-Ti.uplift))}).on("dragend",function(w){var b=Ms.select(this),_=w.calcdata;w.x=w.xScale(w),w.calcdata.columnDragInProgress=!1,ift(b,w,0),ZMr(t,_,_.columns.map(function(M){return M.xIndex}))})),u.each(function(w){woe.setClipUrl(Ms.select(this),tft(t,w),t)});var c=u.selectAll("."+Ti.cn.columnBlock).data(aft.splitToPanels,Po.keyFun);c.enter().append("g").classed(Ti.cn.columnBlock,!0).attr("id",function(w){return w.key}),c.style("cursor",function(w){return w.dragHandle?"ew-resize":w.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var f=c.filter(KMr),h=c.filter(Eoe);i&&h.call(Ms.behavior.drag().origin(function(w){return Ms.event.stopPropagation(),w}).on("drag",uO(t,a,-1)).on("dragend",function(){})),Toe(t,a,f,c),Toe(t,a,h,c);var d=a.selectAll("."+Ti.cn.scrollAreaClip).data(Po.repeat,Po.keyFun);d.enter().append("clipPath").classed(Ti.cn.scrollAreaClip,!0).attr("id",function(w){return eft(t,w)});var p=d.selectAll("."+Ti.cn.scrollAreaClipRect).data(Po.repeat,Po.keyFun);p.enter().append("rect").classed(Ti.cn.scrollAreaClipRect,!0).attr("x",-Ti.overdrag).attr("y",-Ti.uplift).attr("fill","none"),p.attr("width",function(w){return w.width+2*Ti.overdrag}).attr("height",function(w){return w.height+Ti.uplift});var v=u.selectAll("."+Ti.cn.columnBoundary).data(Po.repeat,Po.keyFun);v.enter().append("g").classed(Ti.cn.columnBoundary,!0);var m=u.selectAll("."+Ti.cn.columnBoundaryClippath).data(Po.repeat,Po.keyFun);m.enter().append("clipPath").classed(Ti.cn.columnBoundaryClippath,!0),m.attr("id",function(w){return tft(t,w)});var g=m.selectAll("."+Ti.cn.columnBoundaryRect).data(Po.repeat,Po.keyFun);g.enter().append("rect").classed(Ti.cn.columnBoundaryRect,!0).attr("fill","none"),g.attr("width",function(w){return w.columnWidth+2*lO(w)}).attr("height",function(w){return w.calcdata.height+2*lO(w)+Ti.uplift}).attr("x",function(w){return-lO(w)}).attr("y",function(w){return-lO(w)}),koe(null,h,a)};function lO(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function eft(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function tft(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function oft(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function q8(e,t,r){function i(u){var c=u.rowBlocks;return Moe(c,c.length-1)+(c.length?cO(c[c.length-1],1/0):1)}var n=e.selectAll("."+Ti.cn.scrollbarKit).data(Po.repeat,Po.keyFun);n.enter().append("g").classed(Ti.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),n.each(function(u){var c=u.scrollbarState;c.totalHeight=i(u),c.scrollableAreaHeight=u.groupHeight-Aoe(u),c.currentlyVisibleHeight=Math.min(c.totalHeight,c.scrollableAreaHeight),c.ratio=c.currentlyVisibleHeight/c.totalHeight,c.barLength=Math.max(c.ratio*c.currentlyVisibleHeight,Ti.goldenRatio*Ti.scrollbarWidth),c.barWiggleRoom=c.currentlyVisibleHeight-c.barLength,c.wiggleRoom=Math.max(0,c.totalHeight-c.scrollableAreaHeight),c.topY=c.barWiggleRoom===0?0:u.scrollY/c.wiggleRoom*c.barWiggleRoom,c.bottomY=c.topY+c.barLength,c.dragMultiplier=c.wiggleRoom/c.barWiggleRoom}).attr("transform",function(u){var c=u.width+Ti.scrollbarWidth/2+Ti.scrollbarOffset;return ap(c,Aoe(u))});var a=n.selectAll("."+Ti.cn.scrollbar).data(Po.repeat,Po.keyFun);a.enter().append("g").classed(Ti.cn.scrollbar,!0);var o=a.selectAll("."+Ti.cn.scrollbarSlider).data(Po.repeat,Po.keyFun);o.enter().append("g").classed(Ti.cn.scrollbarSlider,!0),o.attr("transform",function(u){return ap(0,u.scrollbarState.topY||0)});var s=o.selectAll("."+Ti.cn.scrollbarGlyph).data(Po.repeat,Po.keyFun);s.enter().append("line").classed(Ti.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",Ti.scrollbarWidth).attr("stroke-linecap","round").attr("y1",Ti.scrollbarWidth/2),s.attr("y2",function(u){return u.scrollbarState.barLength-Ti.scrollbarWidth/2}).attr("stroke-opacity",function(u){return u.columnDragInProgress||!u.scrollbarState.barWiggleRoom||r?0:.4}),s.transition().delay(0).duration(0),s.transition().delay(Ti.scrollbarHideDelay).duration(Ti.scrollbarHideDuration).attr("stroke-opacity",0);var l=a.selectAll("."+Ti.cn.scrollbarCaptureZone).data(Po.repeat,Po.keyFun);l.enter().append("line").classed(Ti.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",Ti.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(u){var c=Ms.event.y,f=this.getBoundingClientRect(),h=u.scrollbarState,d=c-f.top,p=Ms.scale.linear().domain([0,h.scrollableAreaHeight]).range([0,h.totalHeight]).clamp(!0);h.topY<=d&&d<=h.bottomY||uO(t,e,null,p(d-h.barLength/2))(u)}).call(Ms.behavior.drag().origin(function(u){return Ms.event.stopPropagation(),u.scrollbarState.scrollbarScrollInProgress=!0,u}).on("drag",uO(t,e)).on("dragend",function(){})),l.attr("y2",function(u){return u.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),l.remove())}function Toe(e,t,r,i){var n=UMr(r),a=VMr(n);$Mr(a);var o=GMr(a);YMr(o);var s=jMr(a),l=HMr(s);WMr(l),sft(l,t,i,e),Coe(a)}function UMr(e){var t=e.selectAll("."+Ti.cn.columnCells).data(Po.repeat,Po.keyFun);return t.enter().append("g").classed(Ti.cn.columnCells,!0),t.exit().remove(),t}function VMr(e){var t=e.selectAll("."+Ti.cn.columnCell).data(aft.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ti.cn.columnCell,!0),t.exit().remove(),t}function GMr(e){var t=e.selectAll("."+Ti.cn.cellRect).data(Po.repeat,function(r){return r.keyWithinBlock});return t.enter().append("rect").classed(Ti.cn.cellRect,!0),t}function HMr(e){var t=e.selectAll("."+Ti.cn.cellText).data(Po.repeat,function(r){return r.keyWithinBlock});return t.enter().append("text").classed(Ti.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){Ms.event.stopPropagation()}),t}function jMr(e){var t=e.selectAll("."+Ti.cn.cellTextHolder).data(Po.repeat,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ti.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}function $Mr(e){e.each(function(t,r){var i=t.calcdata.cells.font,n=t.column.specIndex,a={size:qf(i.size,n,r),color:qf(i.color,n,r),family:qf(i.family,n,r),weight:qf(i.weight,n,r),style:qf(i.style,n,r),variant:qf(i.variant,n,r),textcase:qf(i.textcase,n,r),lineposition:qf(i.lineposition,n,r),shadow:qf(i.shadow,n,r)};t.rowNumber=t.key,t.align=qf(t.calcdata.cells.align,n,r),t.cellBorderWidth=qf(t.calcdata.cells.line.width,n,r),t.font=a})}function WMr(e){e.each(function(t){woe.font(Ms.select(this),t.font)})}function YMr(e){e.attr("width",function(t){return t.column.columnWidth}).attr("stroke-width",function(t){return t.cellBorderWidth}).each(function(t){var r=Ms.select(this);Qct.stroke(r,qf(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),Qct.fill(r,qf(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function sft(e,t,r,i){e.text(function(n){var a=n.column.specIndex,o=n.rowNumber,s=n.value,l=typeof s=="string",u=l&&s.match(/<br>/i),c=!l||u;n.mayHaveMarkup=l&&s.match(/[<&>]/);var f=XMr(s);n.latex=f;var h=f?"":qf(n.calcdata.cells.prefix,a,o)||"",d=f?"":qf(n.calcdata.cells.suffix,a,o)||"",p=f?null:qf(n.calcdata.cells.format,a,o)||null,v=h+(p?zMr(p)(n.value):n.value)+d,m;n.wrappingNeeded=!n.wrapped&&!c&&!f&&(m=rft(v)),n.cellHeightMayIncrease=u||f||n.mayHaveMarkup||(m===void 0?rft(v):m),n.needsConvertToTspans=n.mayHaveMarkup||n.wrappingNeeded||n.latex;var g;if(n.wrappingNeeded){var w=Ti.wrapSplitCharacter===" "?v.replace(/<a href=/ig,"<a_href="):v,b=w.split(Ti.wrapSplitCharacter),_=Ti.wrapSplitCharacter===" "?b.map(function(M){return M.replace(/<a_href=/ig,"<a href=")}):b;n.fragments=_.map(function(M){return{text:M,width:null}}),n.fragments.push({fragment:Ti.wrapSpacer,width:null}),g=_.join(Ti.lineBreaker)+Ti.lineBreaker+Ti.wrapSpacer}else delete n.fragments,g=v;return g}).attr("dy",function(n){return n.needsConvertToTspans?0:"0.75em"}).each(function(n){var a=this,o=Ms.select(a),s=n.wrappingNeeded?QMr:eSr;n.needsConvertToTspans?BMr.convertToTspans(o,i,s(r,a,t,i,n)):Ms.select(a.parentNode).attr("transform",function(l){return ap(lft(l),Ti.cellPad)}).attr("text-anchor",function(l){return{left:"start",center:"middle",right:"end"}[l.align]})})}function XMr(e){return typeof e=="string"&&e.match(Ti.latexCheck)}function rft(e){return e.indexOf(Ti.wrapSplitCharacter)!==-1}function ZMr(e,t,r){var i=t.gdColumnsOriginalOrder;t.gdColumns.sort(function(n,a){return r[i.indexOf(n)]-r[i.indexOf(a)]}),t.columnorder=r,e.emit("plotly_restyle")}function qf(e,t,r){if(boe.isArrayOrTypedArray(e)){var i=e[Math.min(t,e.length-1)];return boe.isArrayOrTypedArray(i)?i[Math.min(r,i.length-1)]:i}else return e}function ift(e,t,r){e.transition().ease(Ti.releaseTransitionEase).duration(Ti.releaseTransitionDuration).attr("transform",ap(t.x,r))}function Eoe(e){return e.type==="cells"}function KMr(e){return e.type==="header"}function Aoe(e){var t=e.rowBlocks.length?e.rowBlocks[0].auxiliaryBlocks:[];return t.reduce(function(r,i){return r+cO(i,1/0)},0)}function JMr(e,t,r){for(var i=[],n=0,a=0;a<e.length;a++){for(var o=e[a],s=o.rows,l=0,u=0;u<s.length;u++)l+=s[u].rowHeight;o.allRowsHeight=l;var c=n+l,f=t,h=f+r;f<c&&h>n&&i.push(a),n+=l}return i}function koe(e,t,r){var i=oft(t)[0];if(i!==void 0){var n=i.rowBlocks,a=i.calcdata,o=Moe(n,n.length),s=i.calcdata.groupHeight-Aoe(i),l=a.scrollY=Math.max(0,Math.min(o-s,a.scrollY)),u=JMr(n,l,s);u.length===1&&(u[0]===n.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),t.each(function(c,f){c.page=u[f],c.scrollY=l}),t.attr("transform",function(c){var f=Moe(c.rowBlocks,c.page)-c.scrollY;return ap(0,f)}),e&&(nft(e,r,t,u,i.prevPages,i,0),nft(e,r,t,u,i.prevPages,i,1),q8(r,e))}}function uO(e,t,r,i){return function(a){var o=a.calcdata?a.calcdata:a,s=t.filter(function(f){return o.key===f.key}),l=r||o.scrollbarState.dragMultiplier,u=o.scrollY;o.scrollY=i===void 0?o.scrollY+l*Ms.event.dy:i;var c=s.selectAll("."+Ti.cn.yColumn).selectAll("."+Ti.cn.columnBlock).filter(Eoe);return koe(e,c,s),o.scrollY===u}}function nft(e,t,r,i,n,a,o){var s=i[o]!==n[o];s&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var l=r.filter(function(u,c){return c===o&&i[c]!==n[c]});Toe(e,t,l,r),n[o]=i[o]}))}function QMr(e,t,r,i){return function(){var a=Ms.select(t.parentNode);a.each(function(o){var s=o.fragments;a.selectAll("tspan.line").each(function(v,m){s[m].width=this.getComputedTextLength()});var l=s[s.length-1].width,u=s.slice(0,-1),c=[],f,h,d=0,p=o.column.columnWidth-2*Ti.cellPad;for(o.value="";u.length;)f=u.shift(),h=f.width+l,d+h>p&&(o.value+=c.join(Ti.wrapSpacer)+Ti.lineBreaker,c=[],d=0),c.push(f.text),d+=h;d&&(o.value+=c.join(Ti.wrapSpacer)),o.wrapped=!0}),a.selectAll("tspan.line").remove(),sft(a.select("."+Ti.cn.cellText),r,e,i),Ms.select(t.parentNode.parentNode).call(Coe)}}function eSr(e,t,r,i,n){return function(){if(!n.settledY){var o=Ms.select(t.parentNode),s=Soe(n),l=n.key-s.firstRowIndex,u=s.rows[l].rowHeight,c=n.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Ti.cellPad:u,f=Math.max(c,u),h=f-s.rows[l].rowHeight;h&&(s.rows[l].rowHeight=f,e.selectAll("."+Ti.cn.columnCell).call(Coe),koe(null,e.filter(Eoe),0),q8(r,i,!0)),o.attr("transform",function(){var d=this,p=d.parentNode,v=p.getBoundingClientRect(),m=Ms.select(d.parentNode).select("."+Ti.cn.cellRect).node().getBoundingClientRect(),g=d.transform.baseVal.consolidate(),w=m.top-v.top+(g?g.matrix.f:Ti.cellPad);return ap(lft(n,Ms.select(d.parentNode).select("."+Ti.cn.cellTextHolder).node().getBoundingClientRect().width),w)}),n.settledY=!0}}}function lft(e,t){switch(e.align){case"left":return Ti.cellPad;case"right":return e.column.columnWidth-(t||0)-Ti.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return Ti.cellPad}}function Coe(e){e.attr("transform",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+cO(s,1/0)},0),i=Soe(t),n=cO(i,t.key),a=n+r;return ap(0,a)}).selectAll("."+Ti.cn.cellRect).attr("height",function(t){return rSr(Soe(t),t.key).rowHeight})}function Moe(e,t){for(var r=0,i=t-1;i>=0;i--)r+=tSr(e[i]);return r}function cO(e,t){for(var r=0,i=0;i<e.rows.length&&e.rows[i].rowIndex<t;i++)r+=e.rows[i].rowHeight;return r}function tSr(e){var t=e.allRowsHeight;if(t!==void 0)return t;for(var r=0,i=0;i<e.rows.length;i++)r+=e.rows[i].rowHeight;return e.allRowsHeight=r,r}function Soe(e){return e.rowBlocks[e.page]}function rSr(e,t){return e.rows[t-e.firstRowIndex]}});var cft=W(hO=>{"use strict";var iSr=_c().getModuleCalcData,nSr=Doe(),fO="table";hO.name=fO;hO.plot=function(e){var t=iSr(e.calcdata,fO)[0];t.length&&nSr(e,t)};hO.clean=function(e,t,r,i){var n=i._has&&i._has(fO),a=t._has&&t._has(fO);n&&!a&&i._paperdiv.selectAll(".table").remove()}});var hft=W((sii,fft)=>{"use strict";fft.exports={attributes:poe(),supplyDefaults:Oct(),calc:Uct(),plot:Doe(),moduleType:"trace",name:"table",basePlotModule:cft(),categories:["noOpacity"],meta:{}}});var pft=W((lii,dft)=>{"use strict";dft.exports=hft()});var xft=W((uii,yft)=>{"use strict";var vft=Ho(),gft=Vl(),Foe=ec(),aSr=_s().descriptionWithDates,oSr=ls().overrideAll,mft=Du().dash,Loe=tn().extendFlat;yft.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:vft({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:Foe.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:Loe({},Foe.labelalias,{editType:"calc"}),tickfont:vft({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:aSr("tick label")},tickformatstops:oSr(Foe.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:gft.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:Loe({},mft,{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:Loe({},mft,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:gft.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}});var pO=W((cii,wft)=>{"use strict";var sSr=Ho(),_ft=xft(),bft=Vl(),dO=sSr({editType:"calc"}),lSr=Ns().zorder;dO.family.dflt='"Open Sans", verdana, arial, sans-serif';dO.size.dflt=12;dO.color.dflt=bft.defaultLine;wft.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:_ft,baxis:_ft,font:dO,color:{valType:"color",dflt:bft.defaultLine,editType:"plot"},zorder:lSr}});var Mft=W((fii,Aft)=>{"use strict";var Tft=it().isArray1D;Aft.exports=function(t,r,i){var n=i("x"),a=n&&n.length,o=i("y"),s=o&&o.length;if(!a&&!s)return!1;if(r._cheater=!n,(!a||Tft(n))&&(!s||Tft(o))){var l=a?n.length:1/0;s&&(l=Math.min(l,o.length)),r.a&&r.a.length&&(l=Math.min(l,r.a.length)),r.b&&r.b.length&&(l=Math.min(l,r.b.length)),r._length=l}else r._length=null;return!0}});var kft=W((hii,Eft)=>{"use strict";var uSr=pO(),Sft=ni().addOpacity,cSr=yi(),O8=it(),fSr=Xx(),hSr=wy(),dSr=Ty(),pSr=_F(),vSr=i1(),gSr=bw();Eft.exports=function(t,r,i){var n=i.letter,a=i.font||{},o=uSr[n+"axis"];function s(y,E){return O8.coerce(t,r,o,y,E)}function l(y,E){return O8.coerce2(t,r,o,y,E)}i.name&&(r._name=i.name,r._id=i.name),s("autotypenumbers",i.autotypenumbersDflt);var u=s("type");if(u==="-"&&(i.data&&mSr(r,i.data),r.type==="-"?r.type="linear":u=t.type=r.type),s("smoothing"),s("cheatertype"),s("showticklabels"),s("labelprefix",n+" = "),s("labelsuffix"),s("showtickprefix"),s("showticksuffix"),s("separatethousands"),s("tickformat"),s("exponentformat"),s("minexponent"),s("showexponent"),s("categoryorder"),s("tickmode"),s("tickvals"),s("ticktext"),s("tick0"),s("dtick"),r.tickmode==="array"&&(s("arraytick0"),s("arraydtick")),s("labelpadding"),r._hovertitle=n,u==="date"){var c=cSr.getComponentMethod("calendars","handleDefaults");c(t,r,"calendar",i.calendar)}vSr(r,i.fullLayout),r.c2p=O8.identity;var f=s("color",i.dfltColor),h=f===t.color?f:a.color,d=s("title.text");d&&(O8.coerceFont(s,"title.font",a,{overrideDflt:{size:O8.bigFont(a.size),color:h}}),s("title.offset")),s("tickangle");var p=s("autorange",!r.isValidRange(t.range));p&&s("rangemode"),s("range"),r.cleanRange(),s("fixedrange"),fSr(t,r,s,u),dSr(t,r,s,u,i),hSr(t,r,s,u,i),pSr(t,r,s,{data:i.data,dataAttr:n});var v=s("gridcolor",Sft(f,.3)),m=l("gridwidth"),g=l("griddash"),w=s("showgrid");w||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var b=l("startlinecolor",f),_=l("startlinewidth",m),M=s("startline",r.showgrid||!!b||!!_);M||(delete r.startlinecolor,delete r.startlinewidth);var x=l("endlinecolor",f),T=l("endlinewidth",m),A=s("endline",r.showgrid||!!x||!!T);return A||(delete r.endlinecolor,delete r.endlinewidth),w?(s("minorgridcount"),s("minorgridwidth",m),s("minorgriddash",g),s("minorgridcolor",Sft(v,.06)),r.minorgridcount||(delete r.minorgridwidth,delete r.minorgriddash,delete r.minorgridcolor)):(delete r.gridcolor,delete r.gridwidth,delete r.griddash),r.showticklabels==="none"&&(delete r.tickfont,delete r.tickangle,delete r.showexponent,delete r.exponentformat,delete r.minexponent,delete r.tickformat,delete r.showticksuffix,delete r.showtickprefix),r.showticksuffix||delete r.ticksuffix,r.showtickprefix||delete r.tickprefix,s("tickmode"),r};function mSr(e,t){if(e.type==="-"){var r=e._id,i=r.charAt(0),n=i+"calendar",a=e[n];e.type=gSr(t,a,{autotypenumbers:e.autotypenumbers})}}});var Dft=W((dii,Cft)=>{"use strict";var ySr=kft(),xSr=Da();Cft.exports=function(t,r,i,n,a){var o=n("a");o||(n("da"),n("a0"));var s=n("b");s||(n("db"),n("b0")),_Sr(t,r,i,a)};function _Sr(e,t,r,i){var n=["aaxis","baxis"];n.forEach(function(a){var o=a.charAt(0),s=e[a]||{},l=xSr.newContainer(t,a),u={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:o+"axis",letter:o,font:t.font,name:a,data:e[o],calendar:t.calendar,dfltColor:i,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};ySr(s,l,u),l._categories=l._categories||[],!e[a]&&s.type!=="-"&&(e[a]={type:s.type})})}});var Pft=W((pii,Lft)=>{"use strict";var Fft=it(),bSr=Mft(),wSr=Dft(),TSr=pO(),ASr=Vl();Lft.exports=function(t,r,i,n){function a(l,u){return Fft.coerce(t,r,TSr,l,u)}r._clipPathId="clip"+r.uid+"carpet";var o=a("color",ASr.defaultLine);if(Fft.coerceFont(a,"font",n.font),a("carpet"),wSr(t,r,n,a,o),!r.a||!r.b){r.visible=!1;return}r.a.length<3&&(r.aaxis.smoothing=0),r.b.length<3&&(r.baxis.smoothing=0);var s=bSr(t,r,a);s||(r.visible=!1),r._cheater&&a("cheaterslope"),a("zorder")}});var Poe=W((vii,Ift)=>{"use strict";var MSr=it().isArrayOrTypedArray;Ift.exports=function(t,r,i){var n;for(MSr(t)?t.length>r.length&&(t=t.slice(0,r.length)):t=[],n=0;n<r.length;n++)t[n]=i(r[n]);return t}});var Ioe=W((gii,Rft)=>{"use strict";Rft.exports=function(t,r,i){if(t.length===0)return"";var n,a=[],o=i?3:1;for(n=0;n<t.length;n+=o)a.push(t[n]+","+r[n]),i&&n<t.length-o&&(a.push("C"),a.push([t[n+1]+","+r[n+1],t[n+2]+","+r[n+2]+" "].join(" ")));return a.join(i?"":"L")}});var Bft=W((mii,zft)=>{"use strict";zft.exports=function(t,r,i,n,a,o){var s=a[0]*t.dpdx(r),l=a[1]*t.dpdy(i),u=1,c=1;if(o){var f=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),d=(a[0]*o[0]+a[1]*o[1])/f/h;c=Math.max(0,d)}var p=Math.atan2(l,s)*180/Math.PI;return p<-90?(p+=180,u=-u):p>90&&(p-=180,u=-u),{angle:p,flip:u,p:t.c2p(n,r,i),offsetMultplier:c}}});var jft=W((yii,Hft)=>{"use strict";var yO=vi(),vO=Ji(),gO=Poe(),Nft=Ioe(),N8=Bft(),Roe=uo(),t0=it(),Uft=t0.strRotate,mO=t0.strTranslate,Vft=Hl();Hft.exports=function(t,r,i,n){var a=t._context.staticPlot,o=r.xaxis,s=r.yaxis,l=t._fullLayout,u=l._clips;t0.makeTraceGroups(n,i,"trace").each(function(c){var f=yO.select(this),h=c[0],d=h.trace,p=d.aaxis,v=d.baxis,m=t0.ensureSingle(f,"g","minorlayer"),g=t0.ensureSingle(f,"g","majorlayer"),w=t0.ensureSingle(f,"g","boundarylayer"),b=t0.ensureSingle(f,"g","labellayer");f.style("opacity",d.opacity),a6(o,s,g,p,"a",p._gridlines,!0,a),a6(o,s,g,v,"b",v._gridlines,!0,a),a6(o,s,m,p,"a",p._minorgridlines,!0,a),a6(o,s,m,v,"b",v._minorgridlines,!0,a),a6(o,s,w,p,"a-boundary",p._boundarylines,a),a6(o,s,w,v,"b-boundary",v._boundarylines,a);var _=qft(t,o,s,d,h,b,p._labels,"a-label"),M=qft(t,o,s,d,h,b,v._labels,"b-label");ESr(t,b,d,h,o,s,_,M),SSr(d,h,u,o,s)})};function SSr(e,t,r,i,n){var a,o,s,l,u=r.select("#"+e._clipPathId);u.size()||(u=r.append("clipPath").classed("carpetclip",!0));var c=t0.ensureSingle(u,"path","carpetboundary"),f=t.clipsegments,h=[];for(l=0;l<f.length;l++)a=f[l],o=gO([],a.x,i.c2p),s=gO([],a.y,n.c2p),h.push(Nft(o,s,a.bicubic));var d="M"+h.join("L")+"Z";u.attr("id",e._clipPathId),c.attr("d",d)}function a6(e,t,r,i,n,a,o){var s="const-"+n+"-lines",l=r.selectAll("."+s).data(a);l.enter().append("path").classed(s,!0).style("vector-effect",o?"none":"non-scaling-stroke"),l.each(function(u){var c=u,f=c.x,h=c.y,d=gO([],f,e.c2p),p=gO([],h,t.c2p),v="M"+Nft(d,p,c.smoothing),m=yO.select(this);m.attr("d",v).style("stroke-width",c.width).style("stroke",c.color).style("stroke-dasharray",vO.dashStyle(c.dash,c.width)).style("fill","none")}),l.exit().remove()}function qft(e,t,r,i,n,a,o,s){var l=a.selectAll("text."+s).data(o);l.enter().append("text").classed(s,!0);var u=0,c={};return l.each(function(f,h){var d;if(f.axis.tickangle==="auto")d=N8(i,t,r,f.xy,f.dxy);else{var p=(f.axis.tickangle+180)*Math.PI/180;d=N8(i,t,r,f.xy,[Math.cos(p),Math.sin(p)])}h||(c={angle:d.angle,flip:d.flip});var v=(f.endAnchor?-1:1)*d.flip,m=yO.select(this).attr({"text-anchor":v>0?"start":"end","data-notex":1}).call(vO.font,f.font).text(f.text).call(Roe.convertToTspans,e),g=vO.bBox(this);m.attr("transform",mO(d.p[0],d.p[1])+Uft(d.angle)+mO(f.axis.labelpadding*v,g.height*.3)),u=Math.max(u,g.width+f.axis.labelpadding)}),l.exit().remove(),c.maxExtent=u,c}function ESr(e,t,r,i,n,a,o,s){var l,u,c,f,h=t0.aggNums(Math.min,null,r.a),d=t0.aggNums(Math.max,null,r.a),p=t0.aggNums(Math.min,null,r.b),v=t0.aggNums(Math.max,null,r.b);l=.5*(h+d),u=p,c=r.ab2xy(l,u,!0),f=r.dxyda_rough(l,u),o.angle===void 0&&t0.extendFlat(o,N8(r,n,a,c,r.dxydb_rough(l,u))),Oft(e,t,r,i,c,f,r.aaxis,n,a,o,"a-title"),l=h,u=.5*(p+v),c=r.ab2xy(l,u,!0),f=r.dxydb_rough(l,u),s.angle===void 0&&t0.extendFlat(s,N8(r,n,a,c,r.dxyda_rough(l,u))),Oft(e,t,r,i,c,f,r.baxis,n,a,s,"b-title")}var Gft=Vft.LINE_SPACING,kSr=(1-Vft.MID_SHIFT)/Gft+1;function Oft(e,t,r,i,n,a,o,s,l,u,c){var f=[];o.title.text&&f.push(o.title.text);var h=t.selectAll("text."+c).data(f),d=u.maxExtent;h.enter().append("text").classed(c,!0),h.each(function(){var p=N8(r,s,l,n,a);["start","both"].indexOf(o.showticklabels)===-1&&(d=0);var v=o.title.font.size;d+=v+o.title.offset;var m=u.angle+(u.flip<0?180:0),g=(m-p.angle+450)%360,w=g>90&&g<270,b=yO.select(this);b.text(o.title.text).call(Roe.convertToTspans,e),w&&(d=(-Roe.lineCount(b)+kSr)*Gft*v-d),b.attr("transform",mO(p.p[0],p.p[1])+Uft(p.angle)+mO(0,d)).attr("text-anchor","middle").call(vO.font,o.title.font)}),h.exit().remove()}});var Wft=W((xii,$ft)=>{"use strict";var xO=it().isArrayOrTypedArray;$ft.exports=function(e,t,r){var i,n,a,o,s,l,u=[],c=xO(e)?e.length:e,f=xO(t)?t.length:t,h=xO(e)?e:null,d=xO(t)?t:null;h&&(a=(h.length-1)/(h[h.length-1]-h[0])/(c-1)),d&&(o=(d.length-1)/(d[d.length-1]-d[0])/(f-1));var p,v=1/0,m=-1/0;for(n=0;n<f;n++)for(u[n]=[],l=d?(d[n]-d[0])*o:n/(f-1),i=0;i<c;i++)s=h?(h[i]-h[0])*a:i/(c-1),p=s-l*r,v=Math.min(p,v),m=Math.max(p,m),u[n][i]=p;var g=1/(m-v),w=-v*g;for(n=0;n<f;n++)for(i=0;i<c;i++)u[n][i]=g*u[n][i]+w;return u}});var Kft=W((_ii,Zft)=>{"use strict";var Yft=it().isArrayOrTypedArray;Zft.exports=function(e){return Xft(e,0)};function Xft(e,t){if(!Yft(e)||t>=10)return null;for(var r=1/0,i=-1/0,n=e.length,a=0;a<n;a++){var o=e[a];if(Yft(o)){var s=Xft(o,t+1);s&&(r=Math.min(s[0],r),i=Math.max(s[1],i))}else r=Math.min(o,r),i=Math.max(o,i)}return[r,i]}});var Qft=W((bii,Jft)=>{"use strict";var CSr=ji(),fx=tn().extendFlat;Jft.exports=function(t,r,i){var n,a,o,s,l,u,c,f,h,d,p,v,m,g,w=t["_"+r],b=t[r+"axis"],_=b._gridlines=[],M=b._minorgridlines=[],x=b._boundarylines=[],T=t["_"+i],A=t[i+"axis"];b.tickmode==="array"&&(b.tickvals=w.slice());var y=t._xctrl,E=t._yctrl,S=y[0].length,C=y.length,k=t._a.length,D=t._b.length;CSr.prepTicks(b),b.tickmode==="array"&&delete b.tickvals;var F=b.smoothing?3:1;function P(L){var I,B,O,$,Y,K,j,q,J,U,V,X,H=[],G=[],Q={};if(r==="b")for(B=t.b2j(L),O=Math.floor(Math.max(0,Math.min(D-2,B))),$=B-O,Q.length=D,Q.crossLength=k,Q.xy=function(te){return t.evalxy([],te,B)},Q.dxy=function(te,ce){return t.dxydi([],te,O,ce,$)},I=0;I<k;I++)K=Math.min(k-2,I),j=I-K,q=t.evalxy([],I,B),A.smoothing&&I>0&&(J=t.dxydi([],I-1,O,0,$),H.push(Y[0]+J[0]/3),G.push(Y[1]+J[1]/3),U=t.dxydi([],I-1,O,1,$),H.push(q[0]-U[0]/3),G.push(q[1]-U[1]/3)),H.push(q[0]),G.push(q[1]),Y=q;else for(I=t.a2i(L),K=Math.floor(Math.max(0,Math.min(k-2,I))),j=I-K,Q.length=k,Q.crossLength=D,Q.xy=function(te){return t.evalxy([],I,te)},Q.dxy=function(te,ce){return t.dxydj([],K,te,j,ce)},B=0;B<D;B++)O=Math.min(D-2,B),$=B-O,q=t.evalxy([],I,B),A.smoothing&&B>0&&(V=t.dxydj([],K,B-1,j,0),H.push(Y[0]+V[0]/3),G.push(Y[1]+V[1]/3),X=t.dxydj([],K,B-1,j,1),H.push(q[0]-X[0]/3),G.push(q[1]-X[1]/3)),H.push(q[0]),G.push(q[1]),Y=q;return Q.axisLetter=r,Q.axis=b,Q.crossAxis=A,Q.value=L,Q.constvar=i,Q.index=f,Q.x=H,Q.y=G,Q.smoothing=A.smoothing,Q}function R(L){var I,B,O,$,Y,K=[],j=[],q={};if(q.length=w.length,q.crossLength=T.length,r==="b")for(O=Math.max(0,Math.min(D-2,L)),Y=Math.min(1,Math.max(0,L-O)),q.xy=function(J){return t.evalxy([],J,L)},q.dxy=function(J,U){return t.dxydi([],J,O,U,Y)},I=0;I<S;I++)K[I]=y[L*F][I],j[I]=E[L*F][I];else for(B=Math.max(0,Math.min(k-2,L)),$=Math.min(1,Math.max(0,L-B)),q.xy=function(J){return t.evalxy([],L,J)},q.dxy=function(J,U){return t.dxydj([],B,J,$,U)},I=0;I<C;I++)K[I]=y[I][L*F],j[I]=E[I][L*F];return q.axisLetter=r,q.axis=b,q.crossAxis=A,q.value=w[L],q.constvar=i,q.index=L,q.x=K,q.y=j,q.smoothing=A.smoothing,q}if(b.tickmode==="array"){for(s=5e-15,l=[Math.floor((w.length-1-b.arraytick0)/b.arraydtick*(1+s)),Math.ceil(-b.arraytick0/b.arraydtick/(1+s))].sort(function(L,I){return L-I}),u=l[0]-1,c=l[1]+1,f=u;f<c;f++)a=b.arraytick0+b.arraydtick*f,!(a<0||a>w.length-1)&&_.push(fx(R(a),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(f=u;f<c;f++)if(o=b.arraytick0+b.arraydtick*f,p=Math.min(o+b.arraydtick,w.length-1),!(o<0||o>w.length-1)&&!(p<0||p>w.length-1))for(v=w[o],m=w[p],n=0;n<b.minorgridcount;n++)g=p-o,!(g<=0)&&(d=v+(m-v)*(n+1)/(b.minorgridcount+1)*(b.arraydtick/g),!(d<w[0]||d>w[w.length-1])&&M.push(fx(P(d),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash})));b.startline&&x.push(fx(R(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&x.push(fx(R(w.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(s=5e-15,l=[Math.floor((w[w.length-1]-b.tick0)/b.dtick*(1+s)),Math.ceil((w[0]-b.tick0)/b.dtick/(1+s))].sort(function(L,I){return L-I}),u=l[0],c=l[1],f=u;f<=c;f++)h=b.tick0+b.dtick*f,_.push(fx(P(h),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(f=u-1;f<c+1;f++)for(h=b.tick0+b.dtick*f,n=0;n<b.minorgridcount;n++)d=h+b.dtick*(n+1)/(b.minorgridcount+1),!(d<w[0]||d>w[w.length-1])&&M.push(fx(P(d),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&x.push(fx(P(w[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&x.push(fx(P(w[w.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}});var iht=W((wii,rht)=>{"use strict";var eht=ji(),tht=tn().extendFlat;rht.exports=function(t,r){var i,n,a,o,s,l=r._labels=[],u=r._gridlines;for(i=0;i<u.length;i++)s=u[i],["start","both"].indexOf(r.showticklabels)!==-1&&(n=eht.tickText(r,s.value,!1,!1,{first:i===0,last:i===u.length-1}),tht(n,{prefix:a,suffix:o,endAnchor:!0,xy:s.xy(0),dxy:s.dxy(0,0),axis:s.axis,length:s.crossAxis.length,font:s.axis.tickfont,isFirst:i===0,isLast:i===u.length-1}),l.push(n)),["end","both"].indexOf(r.showticklabels)!==-1&&(n=eht.tickText(r,s.value,!1,!1,{first:i===0,last:i===u.length-1}),tht(n,{endAnchor:!1,xy:s.xy(s.crossLength-1),dxy:s.dxy(s.crossLength-2,1),axis:s.axis,length:s.crossAxis.length,font:s.axis.tickfont,isFirst:i===0,isLast:i===u.length-1}),l.push(n))}});var aht=W((Tii,nht)=>{"use strict";nht.exports=function(t,r,i,n){var a,o,s,l=[],u=!!i.smoothing,c=!!n.smoothing,f=t[0].length-1,h=t.length-1;for(a=0,o=[],s=[];a<=f;a++)o[a]=t[0][a],s[a]=r[0][a];for(l.push({x:o,y:s,bicubic:u}),a=0,o=[],s=[];a<=h;a++)o[a]=t[a][f],s[a]=r[a][f];for(l.push({x:o,y:s,bicubic:c}),a=f,o=[],s=[];a>=0;a--)o[f-a]=t[h][a],s[f-a]=r[h][a];for(l.push({x:o,y:s,bicubic:u}),a=h,o=[],s=[];a>=0;a--)o[h-a]=t[a][0],s[h-a]=r[a][0];return l.push({x:o,y:s,bicubic:c}),l}});var sht=W((Aii,oht)=>{"use strict";var DSr=it();oht.exports=function(t,r,i){var n,a,o,s=[],l=[],u=t[0].length,c=t.length;function f(O,$){var Y=0,K,j=0;return O>0&&(K=t[$][O-1])!==void 0&&(j++,Y+=K),O<u-1&&(K=t[$][O+1])!==void 0&&(j++,Y+=K),$>0&&(K=t[$-1][O])!==void 0&&(j++,Y+=K),$<c-1&&(K=t[$+1][O])!==void 0&&(j++,Y+=K),Y/Math.max(1,j)}var h=0;for(n=0;n<u;n++)for(a=0;a<c;a++)t[a][n]===void 0&&(s.push(n),l.push(a),t[a][n]=f(n,a)),h=Math.max(h,Math.abs(t[a][n]));if(!s.length)return t;var d,p,v,m,g,w,b,_,M,x,T,A=1e-5,y=0,E=100,S=0,C=s.length;do{for(y=0,o=0;o<C;o++){n=s[o],a=l[o];var k=0,D=0,F,P,R,L,I,B;n===0?(I=Math.min(u-1,2),R=r[I],L=r[1],F=t[a][I],P=t[a][1],D+=P+(P-F)*(r[0]-L)/(L-R),k++):n===u-1&&(I=Math.max(0,u-3),R=r[I],L=r[u-2],F=t[a][I],P=t[a][u-2],D+=P+(P-F)*(r[u-1]-L)/(L-R),k++),(n===0||n===u-1)&&a>0&&a<c-1&&(d=i[a+1]-i[a],p=i[a]-i[a-1],D+=(p*t[a+1][n]+d*t[a-1][n])/(p+d),k++),a===0?(B=Math.min(c-1,2),R=i[B],L=i[1],F=t[B][n],P=t[1][n],D+=P+(P-F)*(i[0]-L)/(L-R),k++):a===c-1&&(B=Math.max(0,c-3),R=i[B],L=i[c-2],F=t[B][n],P=t[c-2][n],D+=P+(P-F)*(i[c-1]-L)/(L-R),k++),(a===0||a===c-1)&&n>0&&n<u-1&&(d=r[n+1]-r[n],p=r[n]-r[n-1],D+=(p*t[a][n+1]+d*t[a][n-1])/(p+d),k++),k?D/=k:(v=r[n+1]-r[n],m=r[n]-r[n-1],g=i[a+1]-i[a],w=i[a]-i[a-1],b=v*m*(v+m),_=g*w*(g+w),D=(b*(w*t[a+1][n]+g*t[a-1][n])+_*(m*t[a][n+1]+v*t[a][n-1]))/(_*(m+v)+b*(w+g))),M=D-t[a][n],x=M/h,y+=x*x,T=k?0:.85,t[a][n]+=M*(1+T)}y=Math.sqrt(y)}while(S++<E&&y>A);return DSr.log("Smoother converged to",y,"after",S,"iterations"),t}});var uht=W((Mii,lht)=>{"use strict";lht.exports={RELATIVE_CULL_TOLERANCE:1e-6}});var hht=W((Sii,fht)=>{"use strict";var cht=.5;fht.exports=function(t,r,i,n){var a=t[0]-r[0],o=t[1]-r[1],s=i[0]-r[0],l=i[1]-r[1],u=Math.pow(a*a+o*o,cht/2),c=Math.pow(s*s+l*l,cht/2),f=(c*c*a-u*u*s)*n,h=(c*c*o-u*u*l)*n,d=c*(u+c)*3,p=u*(u+c)*3;return[[r[0]+(d&&f/d),r[1]+(d&&h/d)],[r[0]-(p&&f/p),r[1]-(p&&h/p)]]}});var pht=W((Eii,dht)=>{"use strict";var zoe=hht(),_O=it().ensureArray;function o6(e,t,r){var i=-.5*r[0]+1.5*t[0],n=-.5*r[1]+1.5*t[1];return[(2*i+e[0])/3,(2*n+e[1])/3]}dht.exports=function(t,r,i,n,a,o){var s,l,u,c,f,h,d,p,v,m,g=i[0].length,w=i.length,b=a?3*g-2:g,_=o?3*w-2:w;for(t=_O(t,_),r=_O(r,_),u=0;u<_;u++)t[u]=_O(t[u],b),r[u]=_O(r[u],b);for(l=0,c=0;l<w;l++,c+=o?3:1)for(f=t[c],h=r[c],d=i[l],p=n[l],s=0,u=0;s<g;s++,u+=a?3:1)f[u]=d[s],h[u]=p[s];if(a)for(l=0,c=0;l<w;l++,c+=o?3:1){for(s=1,u=3;s<g-1;s++,u+=3)v=zoe([i[l][s-1],n[l][s-1]],[i[l][s],n[l][s]],[i[l][s+1],n[l][s+1]],a),t[c][u-1]=v[0][0],r[c][u-1]=v[0][1],t[c][u+1]=v[1][0],r[c][u+1]=v[1][1];m=o6([t[c][0],r[c][0]],[t[c][2],r[c][2]],[t[c][3],r[c][3]]),t[c][1]=m[0],r[c][1]=m[1],m=o6([t[c][b-1],r[c][b-1]],[t[c][b-3],r[c][b-3]],[t[c][b-4],r[c][b-4]]),t[c][b-2]=m[0],r[c][b-2]=m[1]}if(o)for(u=0;u<b;u++){for(c=3;c<_-3;c+=3)v=zoe([t[c-3][u],r[c-3][u]],[t[c][u],r[c][u]],[t[c+3][u],r[c+3][u]],o),t[c-1][u]=v[0][0],r[c-1][u]=v[0][1],t[c+1][u]=v[1][0],r[c+1][u]=v[1][1];m=o6([t[0][u],r[0][u]],[t[2][u],r[2][u]],[t[3][u],r[3][u]]),t[1][u]=m[0],r[1][u]=m[1],m=o6([t[_-1][u],r[_-1][u]],[t[_-3][u],r[_-3][u]],[t[_-4][u],r[_-4][u]]),t[_-2][u]=m[0],r[_-2][u]=m[1]}if(a&&o)for(c=1;c<_;c+=(c+1)%3===0?2:1){for(u=3;u<b-3;u+=3)v=zoe([t[c][u-3],r[c][u-3]],[t[c][u],r[c][u]],[t[c][u+3],r[c][u+3]],a),t[c][u-1]=.5*(t[c][u-1]+v[0][0]),r[c][u-1]=.5*(r[c][u-1]+v[0][1]),t[c][u+1]=.5*(t[c][u+1]+v[1][0]),r[c][u+1]=.5*(r[c][u+1]+v[1][1]);m=o6([t[c][0],r[c][0]],[t[c][2],r[c][2]],[t[c][3],r[c][3]]),t[c][1]=.5*(t[c][1]+m[0]),r[c][1]=.5*(r[c][1]+m[1]),m=o6([t[c][b-1],r[c][b-1]],[t[c][b-3],r[c][b-3]],[t[c][b-4],r[c][b-4]]),t[c][b-2]=.5*(t[c][b-2]+m[0]),r[c][b-2]=.5*(r[c][b-2]+m[1])}return[t,r]}});var ght=W((kii,vht)=>{"use strict";vht.exports=function(e,t,r,i,n){var a=t-2,o=r-2;return i&&n?function(s,l,u){s||(s=[]);var c,f,h,d,p,v,m=Math.max(0,Math.min(Math.floor(l),a)),g=Math.max(0,Math.min(Math.floor(u),o)),w=Math.max(0,Math.min(1,l-m)),b=Math.max(0,Math.min(1,u-g));m*=3,g*=3;var _=w*w,M=_*w,x=1-w,T=x*x,A=T*x,y=b*b,E=y*b,S=1-b,C=S*S,k=C*S;for(v=0;v<e.length;v++)p=e[v],c=A*p[g][m]+3*(T*w*p[g][m+1]+x*_*p[g][m+2])+M*p[g][m+3],f=A*p[g+1][m]+3*(T*w*p[g+1][m+1]+x*_*p[g+1][m+2])+M*p[g+1][m+3],h=A*p[g+2][m]+3*(T*w*p[g+2][m+1]+x*_*p[g+2][m+2])+M*p[g+2][m+3],d=A*p[g+3][m]+3*(T*w*p[g+3][m+1]+x*_*p[g+3][m+2])+M*p[g+3][m+3],s[v]=k*c+3*(C*b*f+S*y*h)+E*d;return s}:i?function(s,l,u){s||(s=[]);var c=Math.max(0,Math.min(Math.floor(l),a)),f=Math.max(0,Math.min(Math.floor(u),o)),h=Math.max(0,Math.min(1,l-c)),d=Math.max(0,Math.min(1,u-f)),p,v,m,g,w,b;c*=3;var _=h*h,M=_*h,x=1-h,T=x*x,A=T*x,y=1-d;for(w=0;w<e.length;w++)b=e[w],p=y*b[f][c]+d*b[f+1][c],v=y*b[f][c+1]+d*b[f+1][c+1],m=y*b[f][c+2]+d*b[f+1][c+1],g=y*b[f][c+3]+d*b[f+1][c+1],s[w]=A*p+3*(T*h*v+x*_*m)+M*g;return s}:n?function(s,l,u){s||(s=[]);var c=Math.max(0,Math.min(Math.floor(l),a)),f=Math.max(0,Math.min(Math.floor(u),o)),h=Math.max(0,Math.min(1,l-c)),d=Math.max(0,Math.min(1,u-f)),p,v,m,g,w,b;f*=3;var _=d*d,M=_*d,x=1-d,T=x*x,A=T*x,y=1-h;for(w=0;w<e.length;w++)b=e[w],p=y*b[f][c]+h*b[f][c+1],v=y*b[f+1][c]+h*b[f+1][c+1],m=y*b[f+2][c]+h*b[f+2][c+1],g=y*b[f+3][c]+h*b[f+3][c+1],s[w]=A*p+3*(T*d*v+x*_*m)+M*g;return s}:function(s,l,u){s||(s=[]);var c=Math.max(0,Math.min(Math.floor(l),a)),f=Math.max(0,Math.min(Math.floor(u),o)),h=Math.max(0,Math.min(1,l-c)),d=Math.max(0,Math.min(1,u-f)),p,v,m,g,w=1-d,b=1-h;for(m=0;m<e.length;m++)g=e[m],p=b*g[f][c]+h*g[f][c+1],v=b*g[f+1][c]+h*g[f+1][c+1],s[m]=w*p+d*v;return s}}});var yht=W((Cii,mht)=>{"use strict";mht.exports=function(e,t,r){return t&&r?function(i,n,a,o,s){i||(i=[]);var l,u,c,f,h,d;n*=3,a*=3;var p=o*o,v=1-o,m=v*v,g=v*o*2,w=-3*m,b=3*(m-g),_=3*(g-p),M=3*p,x=s*s,T=x*s,A=1-s,y=A*A,E=y*A;for(d=0;d<e.length;d++)h=e[d],l=w*h[a][n]+b*h[a][n+1]+_*h[a][n+2]+M*h[a][n+3],u=w*h[a+1][n]+b*h[a+1][n+1]+_*h[a+1][n+2]+M*h[a+1][n+3],c=w*h[a+2][n]+b*h[a+2][n+1]+_*h[a+2][n+2]+M*h[a+2][n+3],f=w*h[a+3][n]+b*h[a+3][n+1]+_*h[a+3][n+2]+M*h[a+3][n+3],i[d]=E*l+3*(y*s*u+A*x*c)+T*f;return i}:t?function(i,n,a,o,s){i||(i=[]);var l,u,c,f;n*=3;var h=o*o,d=1-o,p=d*d,v=d*o*2,m=-3*p,g=3*(p-v),w=3*(v-h),b=3*h,_=1-s;for(c=0;c<e.length;c++)f=e[c],l=m*f[a][n]+g*f[a][n+1]+w*f[a][n+2]+b*f[a][n+3],u=m*f[a+1][n]+g*f[a+1][n+1]+w*f[a+1][n+2]+b*f[a+1][n+3],i[c]=_*l+s*u;return i}:r?function(i,n,a,o,s){i||(i=[]);var l,u,c,f,h,d;a*=3;var p=s*s,v=p*s,m=1-s,g=m*m,w=g*m;for(h=0;h<e.length;h++)d=e[h],l=d[a][n+1]-d[a][n],u=d[a+1][n+1]-d[a+1][n],c=d[a+2][n+1]-d[a+2][n],f=d[a+3][n+1]-d[a+3][n],i[h]=w*l+3*(g*s*u+m*p*c)+v*f;return i}:function(i,n,a,o,s){i||(i=[]);var l,u,c,f,h=1-s;for(c=0;c<e.length;c++)f=e[c],l=f[a][n+1]-f[a][n],u=f[a+1][n+1]-f[a+1][n],i[c]=h*l+s*u;return i}}});var _ht=W((Dii,xht)=>{"use strict";xht.exports=function(e,t,r){return t&&r?function(i,n,a,o,s){i||(i=[]);var l,u,c,f,h,d;n*=3,a*=3;var p=o*o,v=p*o,m=1-o,g=m*m,w=g*m,b=s*s,_=1-s,M=_*_,x=_*s*2,T=-3*M,A=3*(M-x),y=3*(x-b),E=3*b;for(d=0;d<e.length;d++)h=e[d],l=T*h[a][n]+A*h[a+1][n]+y*h[a+2][n]+E*h[a+3][n],u=T*h[a][n+1]+A*h[a+1][n+1]+y*h[a+2][n+1]+E*h[a+3][n+1],c=T*h[a][n+2]+A*h[a+1][n+2]+y*h[a+2][n+2]+E*h[a+3][n+2],f=T*h[a][n+3]+A*h[a+1][n+3]+y*h[a+2][n+3]+E*h[a+3][n+3],i[d]=w*l+3*(g*o*u+m*p*c)+v*f;return i}:t?function(i,n,a,o,s){i||(i=[]);var l,u,c,f,h,d;n*=3;var p=s*s,v=p*s,m=1-s,g=m*m,w=g*m;for(h=0;h<e.length;h++)d=e[h],l=d[a+1][n]-d[a][n],u=d[a+1][n+1]-d[a][n+1],c=d[a+1][n+2]-d[a][n+2],f=d[a+1][n+3]-d[a][n+3],i[h]=w*l+3*(g*s*u+m*p*c)+v*f;return i}:r?function(i,n,a,o,s){i||(i=[]);var l,u,c,f;a*=3;var h=1-o,d=s*s,p=1-s,v=p*p,m=p*s*2,g=-3*v,w=3*(v-m),b=3*(m-d),_=3*d;for(c=0;c<e.length;c++)f=e[c],l=g*f[a][n]+w*f[a+1][n]+b*f[a+2][n]+_*f[a+3][n],u=g*f[a][n+1]+w*f[a+1][n+1]+b*f[a+2][n+1]+_*f[a+3][n+1],i[c]=h*l+o*u;return i}:function(i,n,a,o,s){i||(i=[]);var l,u,c,f,h=1-o;for(c=0;c<e.length;c++)f=e[c],l=f[a+1][n]-f[a][n],u=f[a+1][n+1]-f[a][n+1],i[c]=h*l+o*u;return i}}});var Aht=W((Fii,Tht)=>{"use strict";var bht=uht(),wht=ZC().findBin,FSr=pht(),LSr=ght(),PSr=yht(),ISr=_ht();Tht.exports=function(t){var r=t._a,i=t._b,n=r.length,a=i.length,o=t.aaxis,s=t.baxis,l=r[0],u=r[n-1],c=i[0],f=i[a-1],h=r[r.length-1]-r[0],d=i[i.length-1]-i[0],p=h*bht.RELATIVE_CULL_TOLERANCE,v=d*bht.RELATIVE_CULL_TOLERANCE;l-=p,u+=p,c-=v,f+=v,t.isVisible=function(m,g){return m>l&&m<u&&g>c&&g<f},t.isOccluded=function(m,g){return m<l||m>u||g<c||g>f},t.setScale=function(){var m=t._x,g=t._y,w=FSr(t._xctrl,t._yctrl,m,g,o.smoothing,s.smoothing);t._xctrl=w[0],t._yctrl=w[1],t.evalxy=LSr([t._xctrl,t._yctrl],n,a,o.smoothing,s.smoothing),t.dxydi=PSr([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=ISr([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(m){var g=Math.max(0,Math.floor(m[0]),n-2),w=m[0]-g;return(1-w)*r[g]+w*r[g+1]},t.j2b=function(m){var g=Math.max(0,Math.floor(m[1]),n-2),w=m[1]-g;return(1-w)*i[g]+w*i[g+1]},t.ij2ab=function(m){return[t.i2a(m[0]),t.j2b(m[1])]},t.a2i=function(m){var g=Math.max(0,Math.min(wht(m,r),n-2)),w=r[g],b=r[g+1];return Math.max(0,Math.min(n-1,g+(m-w)/(b-w)))},t.b2j=function(m){var g=Math.max(0,Math.min(wht(m,i),a-2)),w=i[g],b=i[g+1];return Math.max(0,Math.min(a-1,g+(m-w)/(b-w)))},t.ab2ij=function(m){return[t.a2i(m[0]),t.b2j(m[1])]},t.i2c=function(m,g){return t.evalxy([],m,g)},t.ab2xy=function(m,g,w){if(!w&&(m<r[0]||m>r[n-1]|g<i[0]||g>i[a-1]))return[!1,!1];var b=t.a2i(m),_=t.b2j(g),M=t.evalxy([],b,_);if(w){var x=0,T=0,A=[],y,E,S,C;m<r[0]?(y=0,E=0,x=(m-r[0])/(r[1]-r[0])):m>r[n-1]?(y=n-2,E=1,x=(m-r[n-1])/(r[n-1]-r[n-2])):(y=Math.max(0,Math.min(n-2,Math.floor(b))),E=b-y),g<i[0]?(S=0,C=0,T=(g-i[0])/(i[1]-i[0])):g>i[a-1]?(S=a-2,C=1,T=(g-i[a-1])/(i[a-1]-i[a-2])):(S=Math.max(0,Math.min(a-2,Math.floor(_))),C=_-S),x&&(t.dxydi(A,y,S,E,C),M[0]+=A[0]*x,M[1]+=A[1]*x),T&&(t.dxydj(A,y,S,E,C),M[0]+=A[0]*T,M[1]+=A[1]*T)}return M},t.c2p=function(m,g,w){return[g.c2p(m[0]),w.c2p(m[1])]},t.p2x=function(m,g,w){return[g.p2c(m[0]),w.p2c(m[1])]},t.dadi=function(m){var g=Math.max(0,Math.min(r.length-2,m));return r[g+1]-r[g]},t.dbdj=function(m){var g=Math.max(0,Math.min(i.length-2,m));return i[g+1]-i[g]},t.dxyda=function(m,g,w,b){var _=t.dxydi(null,m,g,w,b),M=t.dadi(m,w);return[_[0]/M,_[1]/M]},t.dxydb=function(m,g,w,b){var _=t.dxydj(null,m,g,w,b),M=t.dbdj(g,b);return[_[0]/M,_[1]/M]},t.dxyda_rough=function(m,g,w){var b=h*(w||.1),_=t.ab2xy(m+b,g,!0),M=t.ab2xy(m-b,g,!0);return[(_[0]-M[0])*.5/b,(_[1]-M[1])*.5/b]},t.dxydb_rough=function(m,g,w){var b=d*(w||.1),_=t.ab2xy(m,g+b,!0),M=t.ab2xy(m,g-b,!0);return[(_[0]-M[0])*.5/b,(_[1]-M[1])*.5/b]},t.dpdx=function(m){return m._m},t.dpdy=function(m){return m._m}}});var Lht=W((Lii,Fht)=>{"use strict";var bO=ji(),Mht=it().isArray1D,RSr=Wft(),Sht=Kft(),Eht=Qft(),kht=iht(),zSr=aht(),Cht=xL(),Dht=sht(),BSr=mL(),qSr=Aht();Fht.exports=function(t,r){var i=bO.getFromId(t,r.xaxis),n=bO.getFromId(t,r.yaxis),a=r.aaxis,o=r.baxis,s=r.x,l=r.y,u=[];s&&Mht(s)&&u.push("x"),l&&Mht(l)&&u.push("y"),u.length&&BSr(r,a,o,"a","b",u);var c=r._a=r._a||r.a,f=r._b=r._b||r.b;s=r._x||r.x,l=r._y||r.y;var h={};if(r._cheater){var d=a.cheatertype==="index"?c.length:c,p=o.cheatertype==="index"?f.length:f;s=RSr(d,p,r.cheaterslope)}r._x=s=Cht(s),r._y=l=Cht(l),Dht(s,c,f),Dht(l,c,f),qSr(r),r.setScale();var v=Sht(s),m=Sht(l),g=.5*(v[1]-v[0]),w=.5*(v[1]+v[0]),b=.5*(m[1]-m[0]),_=.5*(m[1]+m[0]),M=1.3;return v=[w-g*M,w+g*M],m=[_-b*M,_+b*M],r._extremes[i._id]=bO.findExtremes(i,v,{padded:!0}),r._extremes[n._id]=bO.findExtremes(n,m,{padded:!0}),Eht(r,"a","b"),Eht(r,"b","a"),kht(r,a),kht(r,o),h.clipsegments=zSr(r._xctrl,r._yctrl,a,o),h.x=s,h.y=l,h.a=c,h.b=f,[h]}});var Iht=W((Pii,Pht)=>{"use strict";Pht.exports={attributes:pO(),supplyDefaults:Pft(),plot:jft(),calc:Lht(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:dl(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}});var zht=W((Iii,Rht)=>{"use strict";Rht.exports=Iht()});var Boe=W((Rii,Nht)=>{"use strict";var OSr=g1(),U0=Ns(),NSr=Wa(),{hovertemplateAttrs:USr,texttemplateAttrs:VSr,templatefallbackAttrs:Bht}=Ga(),qht=Eo(),hx=tn().extendFlat,op=U0.marker,s6=U0.line,Oht=op.line;Nht.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:hx({},U0.mode,{dflt:"markers"}),text:hx({},U0.text,{}),texttemplate:VSr({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:Bht({editType:"plot"}),hovertext:hx({},U0.hovertext,{}),line:{color:s6.color,width:s6.width,dash:s6.dash,backoff:s6.backoff,shape:hx({},s6.shape,{values:["linear","spline"]}),smoothing:s6.smoothing,editType:"calc"},connectgaps:U0.connectgaps,fill:hx({},U0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:OSr(),marker:hx({symbol:op.symbol,opacity:op.opacity,maxdisplayed:op.maxdisplayed,angle:op.angle,angleref:op.angleref,standoff:op.standoff,size:op.size,sizeref:op.sizeref,sizemin:op.sizemin,sizemode:op.sizemode,line:hx({width:Oht.width,dash:Oht.dash,editType:"calc"},qht("marker.line")),gradient:op.gradient,editType:"calc"},qht("marker")),textfont:U0.textfont,textposition:U0.textposition,selected:U0.selected,unselected:U0.unselected,hoverinfo:hx({},NSr.hoverinfo,{flags:["a","b","text","name"]}),hoveron:U0.hoveron,hovertemplate:USr(),hovertemplatefallback:Bht(),zorder:U0.zorder}});var Hht=W((zii,Ght)=>{"use strict";var Uht=it(),GSr=v1(),l6=$o(),HSr=bd(),jSr=jp(),Vht=Nw(),$Sr=$p(),WSr=y1(),YSr=Boe();Ght.exports=function(t,r,i,n){function a(h,d){return Uht.coerce(t,r,YSr,h,d)}a("carpet"),r.xaxis="x",r.yaxis="y";var o=a("a"),s=a("b"),l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("text"),a("texttemplate"),a("texttemplatefallback"),a("hovertext");var u=l<GSr.PTS_LINESONLY?"lines+markers":"lines";a("mode",u),l6.hasMarkers(r)&&HSr(t,r,i,n,a,{gradient:!0}),l6.hasLines(r)&&(jSr(t,r,i,n,a,{backoff:!0}),Vht(t,r,a),a("connectgaps")),l6.hasText(r)&&$Sr(t,r,n,a);var c=[];(l6.hasMarkers(r)||l6.hasText(r))&&(a("marker.maxdisplayed"),c.push("points")),a("fill"),r.fill!=="none"&&(WSr(t,r,i,a),l6.hasLines(r)||Vht(t,r,a)),(r.fill==="tonext"||r.fill==="toself")&&c.push("fills");var f=a("hoveron",c.join("+")||"points");f!=="fills"&&(a("hovertemplate"),a("hovertemplatefallback")),a("zorder"),Uht.coerceSelectionMarkerOpacity(r,a)}});var $ht=W((Bii,jht)=>{"use strict";jht.exports=function(t,r){var i={},n=r._carpet,a=n.ab2ij([t.a,t.b]),o=Math.floor(a[0]),s=a[0]-o,l=Math.floor(a[1]),u=a[1]-l,c=n.evalxy([],o,l,s,u);return i.yLabel=c[1].toFixed(3),i}});var wO=W((qii,Wht)=>{"use strict";Wht.exports=function(e,t){for(var r=e._fullData.length,i,n=0;n<r;n++){var a=e._fullData[n];if(a.index!==t.index&&a.type==="carpet"&&(i||(i=a),a.carpet===t.carpet))return a}return i}});var Zht=W((Oii,Xht)=>{"use strict";var Yht=sn(),XSr=wd(),ZSr=x1(),KSr=w0(),JSr=Td().calcMarkerSize,QSr=wO();Xht.exports=function(t,r){var i=r._carpetTrace=QSr(t,r);if(!(!i||!i.visible||i.visible==="legendonly")){var n;r.xaxis=i.xaxis,r.yaxis=i.yaxis;var a=r._length,o=new Array(a),s,l,u=!1;for(n=0;n<a;n++)if(s=r.a[n],l=r.b[n],Yht(s)&&Yht(l)){var c=i.ab2xy(+s,+l,!0),f=i.isVisible(+s,+l);f||(u=!0),o[n]={x:c[0],y:c[1],a:s,b:l,vis:f}}else o[n]={x:!1,y:!1};return r._needsCull=u,o[0].carpet=i,o[0].trace=r,JSr(r,a),XSr(t,r),ZSr(o,r),KSr(o,r),o}}});var Qht=W((Nii,Jht)=>{"use strict";var eEr=$w(),Kht=ji(),tEr=Ji();Jht.exports=function(t,r,i,n){var a,o,s,l=i[0][0].carpet,u=Kht.getFromId(t,l.xaxis||"x"),c=Kht.getFromId(t,l.yaxis||"y"),f={xaxis:u,yaxis:c,plot:r.plot};for(a=0;a<i.length;a++)o=i[a][0].trace,o._xA=u,o._yA=c;for(eEr(t,f,i,n),a=0;a<i.length;a++)o=i[a][0].trace,s=n.selectAll("g.trace"+o.uid+" .js-line"),tEr.setClipUrl(s,i[a][0].carpet._clipPathId,t)}});var t0t=W((Uii,e0t)=>{"use strict";var rEr=Zw(),iEr=it().fillText;e0t.exports=function(t,r,i,n){var a=rEr(t,r,i,n);if(!a||a[0].index===!1)return;var o=a[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),a}var f=o.cd[o.index];o.a=f.a,o.b=f.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var h=o.trace,d=h._carpet,p=h._module.formatLabels(f,h);o.yLabel=p.yLabel,delete o.text;var v=[];function m(b,_){var M;b.labelprefix&&b.labelprefix.length>0?M=b.labelprefix.replace(/ = $/,""):M=b._hovertitle,v.push(M+": "+_.toFixed(3)+b.labelsuffix)}if(!h.hovertemplate){var g=f.hi||h.hoverinfo,w=g.split("+");w.indexOf("all")!==-1&&(w=["a","b","text"]),w.indexOf("a")!==-1&&m(d.aaxis,f.a),w.indexOf("b")!==-1&&m(d.baxis,f.b),v.push("y: "+o.yLabel),w.indexOf("text")!==-1&&iEr(f,h,v),o.extraText=v.join("<br>")}return a}});var i0t=W((Vii,r0t)=>{"use strict";r0t.exports=function(t,r,i,n,a){var o=n[a];return t.a=o.a,t.b=o.b,t.y=o.y,t}});var a0t=W((Gii,n0t)=>{"use strict";n0t.exports={attributes:Boe(),supplyDefaults:Hht(),colorbar:Ac(),formatLabels:$ht(),calc:Zht(),plot:Qht(),style:th().style,styleOnSelect:th().styleOnSelect,hoverPoints:t0t(),selectPoints:w_(),eventData:i0t(),moduleType:"trace",name:"scattercarpet",basePlotModule:dl(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}});var s0t=W((Hii,o0t)=>{"use strict";o0t.exports=a0t()});var qoe=W((jii,l0t)=>{"use strict";var sp=p5(),Um=GM(),nEr=Eo(),aEr=tn().extendFlat,og=Um.contours;l0t.exports=aEr({carpet:{valType:"string",editType:"calc"},z:sp.z,a:sp.x,a0:sp.x0,da:sp.dx,b:sp.y,b0:sp.y0,db:sp.dy,text:sp.text,hovertext:sp.hovertext,transpose:sp.transpose,atype:sp.xtype,btype:sp.ytype,fillcolor:Um.fillcolor,autocontour:Um.autocontour,ncontours:Um.ncontours,contours:{type:og.type,start:og.start,end:og.end,size:og.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:og.showlines,showlabels:og.showlabels,labelfont:og.labelfont,labelformat:og.labelformat,operation:og.operation,value:og.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:Um.line.color,width:Um.line.width,dash:Um.line.dash,smoothing:Um.line.smoothing,editType:"plot"},zorder:Um.zorder},nEr("",{cLetter:"z",autoColorDflt:!1}))});var Ooe=W(($ii,f0t)=>{"use strict";var u0t=it(),oEr=pL(),c0t=qoe(),sEr=JW(),lEr=qL(),uEr=OL();f0t.exports=function(t,r,i,n){function a(u,c){return u0t.coerce(t,r,c0t,u,c)}function o(u){return u0t.coerce2(t,r,c0t,u)}if(a("carpet"),t.a&&t.b){var s=oEr(t,r,a,n,"a","b");if(!s){r.visible=!1;return}a("text");var l=a("contours.type")==="constraint";l?sEr(t,r,a,n,i,{hasHover:!1}):(lEr(t,r,a,o),uEr(t,r,a,n,{hasHover:!1}))}else r._defaultColor=i,r._length=null;a("zorder")}});var v0t=W((Wii,p0t)=>{"use strict";var cEr=Zc(),h0t=it(),fEr=mL(),hEr=xL(),dEr=_L(),pEr=bL(),d0t=bW(),vEr=Ooe(),gEr=wO(),mEr=NW();p0t.exports=function(t,r){var i=r._carpetTrace=gEr(t,r);if(!(!i||!i.visible||i.visible==="legendonly")){if(!r.a||!r.b){var n=t.data[i.index],a=t.data[r.index];a.a||(a.a=n.a),a.b||(a.b=n.b),vEr(a,r,r._defaultColor,t._fullLayout)}var o=yEr(t,r);return mEr(r,r._z),o}};function yEr(e,t){var r=t._carpetTrace,i=r.aaxis,n=r.baxis,a,o,s,l,u,c,f;i._minDtick=0,n._minDtick=0,h0t.isArray1D(t.z)&&fEr(t,i,n,"a","b",["z"]),a=t._a=t._a||t.a,l=t._b=t._b||t.b,a=a?i.makeCalcdata(t,"_a"):[],l=l?n.makeCalcdata(t,"_b"):[],o=t.a0||0,s=t.da||1,u=t.b0||0,c=t.db||1,f=t._z=hEr(t._z||t.z,t.transpose),t._emptypoints=pEr(f),dEr(f,t._emptypoints);var h=h0t.maxRowLength(f),d=t.xtype==="scaled"?"":a,p=d0t(t,d,o,s,h,i),v=t.ytype==="scaled"?"":l,m=d0t(t,v,u,c,f.length,n),g={a:p,b:m,z:f};return t.contours.type==="levels"&&t.contours.coloring!=="none"&&cEr(e,t,{vals:f,containerStr:"",cLetter:"z"}),[g]}});var m0t=W((Yii,g0t)=>{"use strict";var xEr=it().isArrayOrTypedArray;g0t.exports=function(e,t,r,i){var n,a,o,s,l,u,c,f,h,d,p,v,m,g=xEr(r)?"a":"b",w=g==="a"?e.aaxis:e.baxis,b=w.smoothing,_=g==="a"?e.a2i:e.b2j,M=g==="a"?r:i,x=g==="a"?i:r,T=g==="a"?t.a.length:t.b.length,A=g==="a"?t.b.length:t.a.length,y=Math.floor(g==="a"?e.b2j(x):e.a2i(x)),E=g==="a"?function($){return e.evalxy([],$,y)}:function($){return e.evalxy([],y,$)};b&&(o=Math.max(0,Math.min(A-2,y)),s=y-o,a=g==="a"?function($,Y){return e.dxydi([],$,o,Y,s)}:function($,Y){return e.dxydj([],o,$,s,Y)});var S=_(M[0]),C=_(M[1]),k=S<C?1:-1,D=(C-S)*1e-8,F=k>0?Math.floor:Math.ceil,P=k>0?Math.ceil:Math.floor,R=k>0?Math.min:Math.max,L=k>0?Math.max:Math.min,I=F(S+D),B=P(C-D);c=E(S);var O=[[c]];for(n=I;n*k<B*k;n+=k)l=[],p=L(S,n),v=R(C,n+k),m=v-p,u=Math.max(0,Math.min(T-2,Math.floor(.5*(p+v)))),f=E(v),b&&(h=a(u,p-u),d=a(u,v-u),l.push([c[0]+h[0]/3*m,c[1]+h[1]/3*m]),l.push([f[0]-d[0]/3*m,f[1]-d[1]/3*m])),l.push(f),O.push(l),c=f;return O}});var A0t=W((Xii,T0t)=>{"use strict";var AO=vi(),MO=Poe(),w0t=Ioe(),U8=Ji(),Vm=it(),_Er=VW(),bEr=GW(),b3=VL(),TO=jM(),wEr=WW(),TEr=$W(),AEr=YW(),MEr=wO(),y0t=m0t();T0t.exports=function(t,r,i,n){var a=r.xaxis,o=r.yaxis;Vm.makeTraceGroups(n,i,"contour").each(function(s){var l=AO.select(this),u=s[0],c=u.trace,f=c._carpetTrace=MEr(t,c),h=t.calcdata[f.index][0];if(!f.visible||f.visible==="legendonly")return;var d=u.a,p=u.b,v=c.contours,m=TEr(v,r,u),g=v.type==="constraint",w=v._operation,b=g?w==="="?"lines":"fill":v.coloring;function _(F){var P=f.ab2xy(F[0],F[1],!0);return[a.c2p(P[0]),o.c2p(P[1])]}var M=[[d[0],p[p.length-1]],[d[d.length-1],p[p.length-1]],[d[d.length-1],p[0]],[d[0],p[0]]];_Er(m);var x=(d[d.length-1]-d[0])*1e-8,T=(p[p.length-1]-p[0])*1e-8;bEr(m,x,T);var A=m;v.type==="constraint"&&(A=wEr(m,w)),SEr(m,_);var y,E,S,C,k=[];for(C=h.clipsegments.length-1;C>=0;C--)y=h.clipsegments[C],E=MO([],y.x,a.c2p),S=MO([],y.y,o.c2p),E.reverse(),S.reverse(),k.push(w0t(E,S,y.bicubic));var D="M"+k.join("L")+"Z";CEr(l,h.clipsegments,a,o,g,b),DEr(c,l,a,o,A,M,_,f,h,b,D),EEr(l,m,t,u,v,r,f),U8.setClipUrl(l,f._clipPathId,t)})};function SEr(e,t){var r,i,n,a,o,s,l,u,c;for(r=0;r<e.length;r++){for(a=e[r],o=a.pedgepaths=[],s=a.ppaths=[],i=0;i<a.edgepaths.length;i++){for(c=a.edgepaths[i],l=[],n=0;n<c.length;n++)l[n]=t(c[n]);o.push(l)}for(i=0;i<a.paths.length;i++){for(c=a.paths[i],u=[],n=0;n<c.length;n++)u[n]=t(c[n]);s.push(u)}}}function EEr(e,t,r,i,n,a,o){var s=r._context.staticPlot,l=Vm.ensureSingle(e,"g","contourlines"),u=n.showlines!==!1,c=n.showlabels,f=u&&c,h=b3.createLines(l,u||c,t,s),d=b3.createLineClip(l,f,r,i.trace.uid),p=e.selectAll("g.contourlabels").data(c?[0]:[]);if(p.exit().remove(),p.enter().append("g").classed("contourlabels",!0),c){var v=a.xaxis,m=a.yaxis,g=v._length,w=m._length,b=[[[0,0],[g,0],[g,w],[0,w]]],_=[];Vm.clearLocationCache();var M=b3.labelFormatter(r,i),x=U8.tester.append("text").attr("data-notex",1).call(U8.font,n.labelfont),T={left:0,right:g,center:g/2,top:0,bottom:w,middle:w/2},A=Math.sqrt(g*g+w*w),y=TO.LABELDISTANCE*A/Math.max(1,t.length/TO.LABELINCREASE);h.each(function(E){var S=b3.calcTextOpts(E.level,M,x,r);AO.select(this).selectAll("path").each(function(C){var k=this,D=Vm.getVisibleSegment(k,T,S.height/2);if(D&&(kEr(k,C,E,D,o,S.height),!(D.len<(S.width+S.height)*TO.LABELMIN)))for(var F=Math.min(Math.ceil(D.len/y),TO.LABELMAX),P=0;P<F;P++){var R=b3.findBestTextLocation(k,D,S,_,T);if(!R)break;b3.addLabelData(R,S,_,b)}})}),x.remove(),b3.drawLabels(p,_,r,d,f?b:null)}c&&!u&&h.remove()}function kEr(e,t,r,i,n,a){for(var o,s=0;s<r.pedgepaths.length;s++)t===r.pedgepaths[s]&&(o=r.edgepaths[s]);if(!o)return;var l=n.a[0],u=n.a[n.a.length-1],c=n.b[0],f=n.b[n.b.length-1];function h(g,w){var b=0,_,M=.1;return(Math.abs(g[0]-l)<M||Math.abs(g[0]-u)<M)&&(_=_0t(n.dxydb_rough(g[0],g[1],M)),b=Math.max(b,a*b0t(w,_)/2)),(Math.abs(g[1]-c)<M||Math.abs(g[1]-f)<M)&&(_=_0t(n.dxyda_rough(g[0],g[1],M)),b=Math.max(b,a*b0t(w,_)/2)),b}var d=x0t(e,0,1),p=x0t(e,i.total,i.total-1),v=h(o[0],d),m=i.total-h(o[o.length-1],p);i.min<v&&(i.min=v),i.max>m&&(i.max=m),i.len=i.max-i.min}function x0t(e,t,r){var i=e.getPointAtLength(t),n=e.getPointAtLength(r),a=n.x-i.x,o=n.y-i.y,s=Math.sqrt(a*a+o*o);return[a/s,o/s]}function _0t(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function b0t(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),i=Math.sqrt(1-r*r);return i/r}function CEr(e,t,r,i,n,a){var o,s,l,u,c=Vm.ensureSingle(e,"g","contourbg"),f=c.selectAll("path").data(a==="fill"&&!n?[0]:[]);f.enter().append("path"),f.exit().remove();var h=[];for(u=0;u<t.length;u++)o=t[u],s=MO([],o.x,r.c2p),l=MO([],o.y,i.c2p),h.push(w0t(s,l,o.bicubic));f.attr("d","M"+h.join("L")+"Z").style("stroke","none")}function DEr(e,t,r,i,n,a,o,s,l,u,c){var f=u==="fill";f&&AEr(n,e.contours);var h=Vm.ensureSingle(t,"g","contourfill"),d=h.selectAll("path").data(f?n:[]);d.enter().append("path"),d.exit().remove(),d.each(function(p){var v=(p.prefixBoundary?c:"")+FEr(e,p,a,o,s,l,r,i);v?AO.select(this).attr("d",v).style("stroke","none"):AO.select(this).remove()})}function FEr(e,t,r,i,n,a,o,s){var l,u="",c=t.edgepaths.map(function(S,C){return C}),f=!0,h,d,p,v,m,g,w=Math.abs(r[0][0]-r[2][0])*1e-4,b=Math.abs(r[0][1]-r[2][1])*1e-4;function _(S){return Math.abs(S[1]-r[0][1])<b}function M(S){return Math.abs(S[1]-r[2][1])<b}function x(S){return Math.abs(S[0]-r[0][0])<w}function T(S){return Math.abs(S[0]-r[2][0])<w}function A(S,C){var k,D,F,P,R="";for(_(S)&&!T(S)||M(S)&&!x(S)?(P=n.aaxis,F=y0t(n,a,[S[0],C[0]],.5*(S[1]+C[1]))):(P=n.baxis,F=y0t(n,a,.5*(S[0]+C[0]),[S[1],C[1]])),k=1;k<F.length;k++)for(R+=P.smoothing?"C":"L",D=0;D<F[k].length;D++){var L=F[k][D];R+=[o.c2p(L[0]),s.c2p(L[1])]+" "}return R}for(l=0,h=null;c.length;){var y=t.edgepaths[l][0];for(h&&(u+=A(h,y)),g=U8.smoothopen(t.edgepaths[l].map(i),t.smoothing),u+=f?g:g.replace(/^M/,"L"),c.splice(c.indexOf(l),1),h=t.edgepaths[l][t.edgepaths[l].length-1],v=-1,p=0;p<4;p++){if(!h){Vm.log("Missing end?",l,t);break}for(_(h)&&!T(h)?d=r[1]:x(h)?d=r[0]:M(h)?d=r[3]:T(h)&&(d=r[2]),m=0;m<t.edgepaths.length;m++){var E=t.edgepaths[m][0];Math.abs(h[0]-d[0])<w?Math.abs(h[0]-E[0])<w&&(E[1]-h[1])*(d[1]-E[1])>=0&&(d=E,v=m):Math.abs(h[1]-d[1])<b?Math.abs(h[1]-E[1])<b&&(E[0]-h[0])*(d[0]-E[0])>=0&&(d=E,v=m):Vm.log("endpt to newendpt is not vert. or horz.",h,d,E)}if(v>=0)break;u+=A(h,d),h=d}if(v===t.edgepaths.length){Vm.log("unclosed perimeter path");break}l=v,f=c.indexOf(l)===-1,f&&(l=c[0],u+=A(h,d)+"Z",h=null)}for(l=0;l<t.paths.length;l++)u+=U8.smoothclosed(t.paths[l].map(i),t.smoothing);return u}});var S0t=W((Zii,M0t)=>{"use strict";M0t.exports={attributes:qoe(),supplyDefaults:Ooe(),colorbar:jL(),calc:v0t(),plot:A0t(),style:HL(),moduleType:"trace",name:"contourcarpet",basePlotModule:dl(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}});var k0t=W((Kii,E0t)=>{"use strict";E0t.exports=S0t()});var EO=W((Jii,P0t)=>{"use strict";var SO=it().extendFlat,V8=Ns(),C0t=_s().axisHoverFormat,{hovertemplateAttrs:LEr,templatefallbackAttrs:PEr}=Ga(),F0t=Du().dash,IEr=N3(),L0t=D5(),REr=L0t.INCREASING.COLOR,zEr=L0t.DECREASING.COLOR,Noe=V8.line;function D0t(e){return{line:{color:SO({},Noe.color,{dflt:e}),width:Noe.width,dash:F0t,editType:"style"},editType:"style"}}P0t.exports={xperiod:V8.xperiod,xperiod0:V8.xperiod0,xperiodalignment:V8.xperiodalignment,xhoverformat:C0t("x"),yhoverformat:C0t("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:SO({},Noe.width,{}),dash:SO({},F0t,{}),editType:"style"},increasing:D0t(REr),decreasing:D0t(zEr),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:LEr({},{keys:["open","high","low","close"]}),hovertemplatefallback:PEr(),tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:SO({},IEr.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:V8.zorder}});var Uoe=W((Qii,I0t)=>{"use strict";var BEr=yi(),qEr=it();I0t.exports=function(t,r,i,n){var a=i("x"),o=i("open"),s=i("high"),l=i("low"),u=i("close");i("hoverlabel.split");var c=BEr.getComponentMethod("calendars","handleTraceDefaults");if(c(t,r,["x"],n),!!(o&&s&&l&&u)){var f=Math.min(o.length,s.length,l.length,u.length);return a&&(f=Math.min(f,qEr.minRowLength(a))),r._length=f,f}}});var B0t=W((eni,z0t)=>{"use strict";var OEr=it(),NEr=Uoe(),UEr=Hp(),VEr=EO();z0t.exports=function(t,r,i,n){function a(s,l){return OEr.coerce(t,r,VEr,s,l)}var o=NEr(t,r,a,n);if(!o){r.visible=!1;return}UEr(t,r,n,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),a("line.dash"),R0t(t,r,a,"increasing"),R0t(t,r,a,"decreasing"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("tickwidth"),n._requestRangeslider[r.xaxis]=!0,a("zorder")};function R0t(e,t,r,i){r(i+".line.color"),r(i+".line.width",t.line.width),r(i+".line.dash",t.line.dash)}});var Voe=W((tni,O0t)=>{"use strict";var u6=it(),kO=u6._,CO=ji(),GEr=Wp(),G8=Kn().BADNUM;function HEr(e,t){var r=CO.getFromId(e,t.xaxis),i=CO.getFromId(e,t.yaxis),n=$Er(e,r,t),a=t._minDiff;t._minDiff=null;var o=t._origX;t._origX=null;var s=t._xcalc;t._xcalc=null;var l=q0t(e,t,o,s,i,jEr);return t._extremes[r._id]=CO.findExtremes(r,s,{vpad:a/2}),l.length?(u6.extendFlat(l[0].t,{wHover:a/2,tickLen:n}),l):[{t:{empty:!0}}]}function jEr(e,t,r,i){return{o:e,h:t,l:r,c:i}}function q0t(e,t,r,i,n,a){for(var o=n.makeCalcdata(t,"open"),s=n.makeCalcdata(t,"high"),l=n.makeCalcdata(t,"low"),u=n.makeCalcdata(t,"close"),c=u6.isArrayOrTypedArray(t.text),f=u6.isArrayOrTypedArray(t.hovertext),h=!0,d=null,p=!!t.xperiodalignment,v=[],m=0;m<i.length;m++){var g=i[m],w=o[m],b=s[m],_=l[m],M=u[m];if(g!==G8&&w!==G8&&b!==G8&&_!==G8&&M!==G8){M===w?d!==null&&M!==d&&(h=M>d):h=M>w,d=M;var x=a(w,b,_,M);x.pos=g,x.yc=(w+M)/2,x.i=m,x.dir=h?"increasing":"decreasing",x.x=x.pos,x.y=[_,b],p&&(x.orig_p=r[m]),c&&(x.tx=t.text[m]),f&&(x.htx=t.hovertext[m]),v.push(x)}else v.push({pos:g,empty:!0})}return t._extremes[n._id]=CO.findExtremes(n,u6.concat(l,s),{padded:!0}),v.length&&(v[0].t={labels:{open:kO(e,"open:")+" ",high:kO(e,"high:")+" ",low:kO(e,"low:")+" ",close:kO(e,"close:")+" "}}),v}function $Er(e,t,r){var i=r._minDiff;if(!i){var n=e._fullData,a=[];i=1/0;var o;for(o=0;o<n.length;o++){var s=n[o];if(s.type==="ohlc"&&s.visible===!0&&s.xaxis===t._id){a.push(s);var l=t.makeCalcdata(s,"x");s._origX=l;var u=GEr(r,t,"x",l).vals;s._xcalc=u;var c=u6.distinctVals(u).minDiff;c&&isFinite(c)&&(i=Math.min(i,c))}}for(i===1/0&&(i=1),o=0;o<a.length;o++)a[o]._minDiff=i}return i*r.tickwidth}O0t.exports={calc:HEr,calcCommon:q0t}});var V0t=W((rni,U0t)=>{"use strict";var WEr=vi(),N0t=it();U0t.exports=function(t,r,i,n){var a=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;N0t.makeTraceGroups(n,i,"trace ohlc").each(function(l){var u=WEr.select(this),c=l[0],f=c.t,h=c.trace;if(h.visible!==!0||f.empty){u.remove();return}var d=f.tickLen,p=u.selectAll("path").data(N0t.identity);p.enter().append("path"),p.exit().remove(),p.attr("d",function(v){if(v.empty)return"M0,0Z";var m=o.c2p(v.pos-d,!0),g=o.c2p(v.pos+d,!0),w=s?(m+g)/2:o.c2p(v.pos,!0),b=a.c2p(v.o,!0),_=a.c2p(v.h,!0),M=a.c2p(v.l,!0),x=a.c2p(v.c,!0);return"M"+m+","+b+"H"+w+"M"+w+","+_+"V"+M+"M"+g+","+x+"H"+w})})}});var H0t=W((ini,G0t)=>{"use strict";var Goe=vi(),YEr=Ji(),XEr=ni();G0t.exports=function(t,r,i){var n=i||Goe.select(t).selectAll("g.ohlclayer").selectAll("g.trace");n.style("opacity",function(a){return a[0].trace.opacity}),n.each(function(a){var o=a[0].trace;Goe.select(this).selectAll("path").each(function(s){if(!s.empty){var l=o[s.dir].line;Goe.select(this).style("fill","none").call(XEr.stroke,l.color).call(YEr.dashLine,l.dash,l.width).style("opacity",o.selectedpoints&&!s.selected?.3:1)}})})}});var joe=W((nni,X0t)=>{"use strict";var Hoe=ji(),ZEr=it(),DO=Ds(),KEr=ni(),JEr=it().fillText,j0t=D5(),QEr={increasing:j0t.INCREASING.SYMBOL,decreasing:j0t.DECREASING.SYMBOL};function ekr(e,t,r,i){var n=e.cd,a=n[0].trace;return a.hoverlabel.split?W0t(e,t,r,i):Y0t(e,t,r,i)}function $0t(e,t,r,i){var n=e.cd,a=e.xa,o=n[0].trace,s=n[0].t,l=o.type,u=l==="ohlc"?"l":"min",c=l==="ohlc"?"h":"max",f,h,d=s.bPos||0,p=function(E){return E.pos+d-t},v=s.bdPos||s.tickLen,m=s.wHover,g=Math.min(1,v/Math.abs(a.r2c(a.range[1])-a.r2c(a.range[0])));f=e.maxHoverDistance-g,h=e.maxSpikeDistance-g;function w(E){var S=p(E);return DO.inbox(S-m,S+m,f)}function b(E){var S=E[u],C=E[c];return S===C||DO.inbox(S-r,C-r,f)}function _(E){return(w(E)+b(E))/2}var M=DO.getDistanceFunction(i,w,b,_);if(DO.getClosest(n,M,e),e.index===!1)return null;var x=n[e.index];if(x.empty)return null;var T=x.dir,A=o[T],y=A.line.color;return KEr.opacity(y)&&A.line.width?e.color=y:e.color=A.fillcolor,e.x0=a.c2p(x.pos+d-v,!0),e.x1=a.c2p(x.pos+d+v,!0),e.xLabelVal=x.orig_p!==void 0?x.orig_p:x.pos,e.spikeDistance=_(x)*h/f,e.xSpike=a.c2p(x.pos,!0),e}function W0t(e,t,r,i){var n=e.cd,a=e.ya,o=n[0].trace,s=n[0].t,l=[],u=$0t(e,t,r,i);if(!u)return[];var c=n[u.index],f=c.hi||o.hoverinfo||"";if(f==="none"||f==="skip")return[];for(var h=["high","open","close","low"],d={},p=0;p<h.length;p++){var v=h[p],m=o[v][u.index],g=a.c2p(m,!0),w;m in d?(w=d[m],w.yLabel+="<br>"+s.labels[v]+Hoe.hoverLabelText(a,m,o.yhoverformat)):(w=ZEr.extendFlat({},u),w.y0=w.y1=g,w.yLabelVal=m,w.yLabel=s.labels[v]+Hoe.hoverLabelText(a,m,o.yhoverformat),w.name="",l.push(w),d[m]=w)}return l}function Y0t(e,t,r,i){var n=e.cd,a=e.ya,o=n[0].trace,s=n[0].t,l=$0t(e,t,r,i);if(!l)return[];var u=l.index,c=n[u],f=l.index=c.i,h=c.dir;function d(_){return s.labels[_]+Hoe.hoverLabelText(a,o[_][f],o.yhoverformat)}var p=c.hi||o.hoverinfo||"",v=p.split("+"),m=p==="all",g=m||v.indexOf("y")!==-1,w=m||v.indexOf("text")!==-1,b=g?[d("open"),d("high"),d("low"),d("close")+" "+QEr[h]]:[];return w&&JEr(c,o,b),l.extraText=b.join("<br>"),l.y0=l.y1=a.c2p(c.yc,!0),[l]}X0t.exports={hoverPoints:ekr,hoverSplit:W0t,hoverOnPoints:Y0t}});var $oe=W((ani,Z0t)=>{"use strict";Z0t.exports=function(t,r){var i=t.cd,n=t.xaxis,a=t.yaxis,o=[],s,l=i[0].t.bPos||0;if(r===!1)for(s=0;s<i.length;s++)i[s].selected=0;else for(s=0;s<i.length;s++){var u=i[s];r.contains([n.c2p(u.pos+l),a.c2p(u.yc)],null,u.i,t)?(o.push({pointNumber:u.i,x:n.c2d(u.pos),y:a.c2d(u.yc)}),u.selected=1):u.selected=0}return o}});var J0t=W((oni,K0t)=>{"use strict";K0t.exports={moduleType:"trace",name:"ohlc",basePlotModule:dl(),categories:["cartesian","svg","showLegend"],meta:{},attributes:EO(),supplyDefaults:B0t(),calc:Voe().calc,plot:V0t(),style:H0t(),hoverPoints:joe().hoverPoints,selectPoints:$oe()}});var edt=W((sni,Q0t)=>{"use strict";Q0t.exports=J0t()});var Yoe=W((lni,idt)=>{"use strict";var Woe=it().extendFlat,tdt=_s().axisHoverFormat,hh=EO(),c6=IM();function rdt(e){return{line:{color:Woe({},c6.line.color,{dflt:e}),width:c6.line.width,editType:"style"},fillcolor:c6.fillcolor,editType:"style"}}idt.exports={xperiod:hh.xperiod,xperiod0:hh.xperiod0,xperiodalignment:hh.xperiodalignment,xhoverformat:tdt("x"),yhoverformat:tdt("y"),x:hh.x,open:hh.open,high:hh.high,low:hh.low,close:hh.close,line:{width:Woe({},c6.line.width,{}),editType:"style"},increasing:rdt(hh.increasing.line.color.dflt),decreasing:rdt(hh.decreasing.line.color.dflt),text:hh.text,hovertext:hh.hovertext,hovertemplate:hh.hovertemplate,hovertemplatefallback:hh.hovertemplatefallback,whiskerwidth:Woe({},c6.whiskerwidth,{dflt:0}),hoverlabel:hh.hoverlabel,zorder:c6.zorder}});var odt=W((uni,adt)=>{"use strict";var tkr=it(),rkr=ni(),ikr=Uoe(),nkr=Hp(),akr=Yoe();adt.exports=function(t,r,i,n){function a(s,l){return tkr.coerce(t,r,akr,s,l)}var o=ikr(t,r,a,n);if(!o){r.visible=!1;return}nkr(t,r,n,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),ndt(t,r,a,"increasing"),ndt(t,r,a,"decreasing"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("whiskerwidth"),n._requestRangeslider[r.xaxis]=!0,a("zorder")};function ndt(e,t,r,i){var n=r(i+".line.color");r(i+".line.width",t.line.width),r(i+".fillcolor",rkr.addOpacity(n,.5))}});var cdt=W((cni,udt)=>{"use strict";var sdt=it(),ldt=ji(),okr=Wp(),skr=Voe().calcCommon;udt.exports=function(e,t){var r=e._fullLayout,i=ldt.getFromId(e,t.xaxis),n=ldt.getFromId(e,t.yaxis),a=i.makeCalcdata(t,"x"),o=okr(t,i,"x",a).vals,s=skr(e,t,a,o,n,lkr);return s.length?(sdt.extendFlat(s[0].t,{num:r._numBoxes,dPos:sdt.distinctVals(o).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,s):[{t:{empty:!0}}]};function lkr(e,t,r,i){return{min:r,q1:Math.min(e,i),med:i,q3:Math.max(e,i),max:t}}});var hdt=W((fni,fdt)=>{"use strict";fdt.exports={moduleType:"trace",name:"candlestick",basePlotModule:dl(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:Yoe(),layoutAttributes:RM(),supplyLayoutDefaults:lL().supplyLayoutDefaults,crossTraceCalc:cL().crossTraceCalc,supplyDefaults:odt(),calc:cdt(),plot:fL().plot,layerName:"boxlayer",style:hL().style,hoverPoints:joe().hoverPoints,selectPoints:$oe()}});var pdt=W((hni,ddt)=>{"use strict";ddt.exports=hdt()});var Zoe=W((dni,vdt)=>{"use strict";var LO=it(),ukr=i1(),FO=LO.deg2rad,Xoe=LO.rad2deg;vdt.exports=function(t,r,i){switch(ukr(t,i),t._id){case"x":case"radialaxis":ckr(t,r);break;case"angularaxis":dkr(t,r);break}};function ckr(e,t){var r=t._subplot;e.setGeometry=function(){var i=e._rl[0],n=e._rl[1],a=r.innerRadius,o=(r.radius-a)/(n-i),s=a/o,l=i>n?function(u){return u<=0}:function(u){return u>=0};e.c2g=function(u){var c=e.c2l(u)-i;return(l(c)?c:0)+s},e.g2c=function(u){return e.l2c(u+i-s)},e.g2p=function(u){return u*o},e.c2p=function(u){return e.g2p(e.c2g(u))}}}function fkr(e,t){return t==="degrees"?FO(e):e}function hkr(e,t){return t==="degrees"?Xoe(e):e}function dkr(e,t){var r=e.type;if(r==="linear"){var i=e.d2c,n=e.c2d;e.d2c=function(a,o){return fkr(i(a),o)},e.c2d=function(a,o){return n(hkr(a,o))}}e.makeCalcdata=function(a,o){var s=a[o],l=a._length,u,c,f=function(m){return e.d2c(m,a.thetaunit)};if(s)for(u=new Array(l),c=0;c<l;c++)u[c]=f(s[c]);else{var h=o+"0",d="d"+o,p=h in a?f(a[h]):0,v=a[d]?f(a[d]):(e.period||2*Math.PI)/l;for(u=new Array(l),c=0;c<l;c++)u[c]=p+c*v}return u},e.setGeometry=function(){var a=t.sector,o=a.map(FO),s={clockwise:-1,counterclockwise:1}[e.direction],l=FO(e.rotation),u=function(g){return s*g+l},c=function(g){return(g-l)/s},f,h,d,p;switch(r){case"linear":h=f=LO.identity,p=FO,d=Xoe,e.range=LO.isFullCircle(o)?[a[0],a[0]+360]:o.map(c).map(Xoe);break;case"category":var v=e._categories.length,m=e.period?Math.max(e.period,v):v;m===0&&(m=1),h=p=function(g){return g*2*Math.PI/m},f=d=function(g){return g*m/Math.PI/2},e.range=[0,m];break}e.c2g=function(g){return u(h(g))},e.g2c=function(g){return f(c(g))},e.t2g=function(g){return u(p(g))},e.g2t=function(g){return d(c(g))}}}});var PO=W((pni,gdt)=>{"use strict";gdt.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}});var RO=W((vni,bdt)=>{"use strict";var w3=it(),mdt=GA().tester,Koe=w3.findIndexOfMin,xdt=w3.isAngleInsideSector,pkr=w3.angleDelta,ydt=w3.angleDist;function vkr(e,t,r,i,n){if(!xdt(t,i))return!1;var a,o;r[0]<r[1]?(a=r[0],o=r[1]):(a=r[1],o=r[0]);var s=mdt(f6(a,i[0],i[1],n)),l=mdt(f6(o,i[0],i[1],n)),u=[e*Math.cos(t),e*Math.sin(t)];return l.contains(u)&&!s.contains(u)}function _dt(e,t,r,i){var n,a,o=i[0],s=i[1],l=IO(Math.sin(t)-Math.sin(e)),u=IO(Math.cos(t)-Math.cos(e)),c=Math.tan(r),f=IO(1/c),h=l/u,d=s-h*o;return f?l&&u?(n=d/(c-h),a=c*n):u?(n=s*f,a=s):(n=o,a=o*c):l&&u?(n=0,a=d):u?(n=0,a=s):n=a=NaN,[n,a]}function gkr(e,t,r,i){var n=-t*r,a=t*t+1,o=2*(t*n-r),s=n*n+r*r-e*e,l=Math.sqrt(o*o-4*a*s),u=(-o+l)/(2*a),c=(-o-l)/(2*a);return[[u,t*u+n+i],[c,t*c+n+i]]}function mkr(e,t){var r=t.length,i=new Array(r+1),n;for(n=0;n<r;n++){var a=t[n];i[n]=[e*Math.cos(a),e*Math.sin(a)]}return i[n]=i[0].slice(),i}function ykr(e,t,r,i){var n=i.length,a=[],o,s;function l(g){return[e*Math.cos(g),e*Math.sin(g)]}function u(g,w,b){return _dt(g,w,b,l(g))}function c(g){return w3.mod(g,n)}function f(g){return xdt(g,[t,r])}var h=Koe(i,function(g){return f(g)?ydt(g,t):1/0}),d=u(i[h],i[c(h-1)],t);for(a.push(d),o=h,s=0;s<n;o++,s++){var p=i[c(o)];if(!f(p))break;a.push(l(p))}var v=Koe(i,function(g){return f(g)?ydt(g,r):1/0}),m=u(i[v],i[c(v+1)],r);return a.push(m),a.push([0,0]),a.push(a[0].slice()),a}function f6(e,t,r,i){return w3.isFullCircle([t,r])?mkr(e,i):ykr(e,t,r,i)}function xkr(e,t,r,i){for(var n=1/0,a=1/0,o=f6(e,t,r,i),s=0;s<o.length;s++){var l=o[s];n=Math.min(n,l[0]),a=Math.min(a,-l[1])}return[n,a]}function _kr(e,t){var r=function(a){var o=pkr(a,e);return o>0?o:1/0},i=Koe(t,r),n=w3.mod(i+1,t.length);return[t[i],t[n]]}function IO(e){return Math.abs(e)>1e-10?e:0}function Joe(e,t,r){t=t||0,r=r||0;for(var i=e.length,n=new Array(i),a=0;a<i;a++){var o=e[a];n[a]=[t+o[0],r-o[1]]}return n}function bkr(e,t,r,i,n,a){var o=f6(e,t,r,i);return"M"+Joe(o,n,a).join("L")}function wkr(e,t,r,i,n,a,o){var s,l;e<t?(s=e,l=t):(s=t,l=e);var u=Joe(f6(s,r,i,n),a,o),c=Joe(f6(l,r,i,n),a,o);return"M"+c.reverse().join("L")+"M"+u.join("L")}bdt.exports={isPtInsidePolygon:vkr,findPolygonOffset:xkr,findEnclosingVertexAngles:_kr,findIntersectionXY:_dt,findXYatLength:gkr,clampTiny:IO,pathPolygon:bkr,pathPolygonAnnulus:wkr}});var Qoe=W((gni,Adt)=>{"use strict";function wdt(e){return e<0?-1:e>0?1:0}function h6(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var i=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/i,2*r/i]}function d6(e,t){var r=t[0],i=t[1];return[r*e.radius+e.cx,-i*e.radius+e.cy]}function Tdt(e,t){return t*e.radius}function Tkr(e,t,r,i){var n=d6(e,h6([r,t])),a=n[0],o=n[1],s=d6(e,h6([i,t])),l=s[0],u=s[1];if(t===0)return["M"+a+","+o,"L"+l+","+u].join(" ");var c=Tdt(e,1/Math.abs(t));return["M"+a+","+o,"A"+c+","+c+" 0 0,"+(t<0?1:0)+" "+l+","+u].join(" ")}function Akr(e,t,r,i){var n=Tdt(e,1/(t+1)),a=d6(e,h6([t,r])),o=a[0],s=a[1],l=d6(e,h6([t,i])),u=l[0],c=l[1];if(wdt(r)!==wdt(i)){var f=d6(e,h6([t,0])),h=f[0],d=f[1];return["M"+o+","+s,"A"+n+","+n+" 0 0,"+(0<r?0:1)+" "+h+","+d,"A"+n+","+n+" 0 0,"+(i<0?0:1)+u+","+c].join(" ")}return["M"+o+","+s,"A"+n+","+n+" 0 0,"+(i<r?0:1)+" "+u+","+c].join(" ")}Adt.exports={smith:h6,reactanceArc:Tkr,resistanceArc:Akr,smithTransform:d6}});var tse=W((mni,Pdt)=>{"use strict";var T3=vi(),M3=yi(),hs=it(),sg=hs.strRotate,Gu=hs.strTranslate,OO=ni(),H8=Ji(),Mkr=Ko(),dh=ji(),Skr=i1(),Ekr=Zoe(),kkr=Op().doAutoRange,Gm=fj(),qO=bf(),Mdt=Ds(),Ckr=e_(),Dkr=cu().prepSelect,Fkr=cu().selectOnClick,ese=cu().clearOutline,Sdt=Np(),Edt=CA(),kdt=BA().redrawReglTraces,Lkr=Hl().MID_SHIFT,dx=PO(),Hm=RO(),NO=Qoe(),zO=NO.smith,Pkr=NO.reactanceArc,Ikr=NO.resistanceArc,BO=NO.smithTransform,Rkr=hs._,Cdt=hs.mod,px=hs.deg2rad,A3=hs.rad2deg;function Ddt(e,t,r){this.isSmith=r||!1,this.id=t,this.gd=e,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var i=e._fullLayout,n="clip"+i._uid+t;this.clipIds.forTraces=n+"-for-traces",this.clipPaths.forTraces=i._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=i["_"+(r?"smith":"polar")+"layer"].append("g").attr("class",t),this.getHole=function(a){return this.isSmith?0:a.hole},this.getSector=function(a){return this.isSmith?[0,360]:a.sector},this.getRadial=function(a){return this.isSmith?a.realaxis:a.radialaxis},this.getAngular=function(a){return this.isSmith?a.imaginaryaxis:a.angularaxis},r||(this.radialTickLayout=null,this.angularTickLayout=null)}var fc=Ddt.prototype;Pdt.exports=function(t,r,i){return new Ddt(t,r,i)};fc.plot=function(e,t){for(var r=this,i=t[r.id],n=!1,a=0;a<e.length;a++){var o=e[a][0].trace;if(o.cliponaxis===!1){n=!0;break}}r._hasClipOnAxisFalse=n,r.updateLayers(t,i),r.updateLayout(t,i),Mkr.generalUpdatePerTraceModule(r.gd,r,e,i),r.updateFx(t,i),r.isSmith&&(delete i.realaxis.range,delete i.imaginaryaxis.range)};fc.updateLayers=function(e,t){var r=this,i=r.isSmith,n=r.layers,a=r.getRadial(t),o=r.getAngular(t),s=dx.layerNames,l=s.indexOf("frontplot"),u=s.slice(0,l),c=o.layer==="below traces",f=a.layer==="below traces";c&&u.push("angular-line"),f&&u.push("radial-line"),c&&u.push("angular-axis"),f&&u.push("radial-axis"),u.push("frontplot"),c||u.push("angular-line"),f||u.push("radial-line"),c||u.push("angular-axis"),f||u.push("radial-axis");var h=(i?"smith":"polar")+"sublayer",d=r.framework.selectAll("."+h).data(u,String);d.enter().append("g").attr("class",function(p){return h+" "+p}).each(function(p){var v=n[p]=T3.select(this);switch(p){case"frontplot":i||v.append("g").classed("barlayer",!0),v.append("g").classed("scatterlayer",!0);break;case"backplot":v.append("g").classed("maplayer",!0);break;case"plotbg":n.bg=v.append("path");break;case"radial-grid":v.style("fill","none");break;case"angular-grid":v.style("fill","none");break;case"radial-line":v.append("line").style("fill","none");break;case"angular-line":v.append("path").style("fill","none");break}}),d.order()};fc.updateLayout=function(e,t){var r=this,i=r.layers,n=e._size,a=r.getRadial(t),o=r.getAngular(t),s=t.domain.x,l=t.domain.y;r.xOffset=n.l+n.w*s[0],r.yOffset=n.t+n.h*(1-l[1]);var u=r.xLength=n.w*(s[1]-s[0]),c=r.yLength=n.h*(l[1]-l[0]),f=r.getSector(t);r.sectorInRad=f.map(px);var h=r.sectorBBox=zkr(f),d=h[2]-h[0],p=h[3]-h[1],v=c/u,m=Math.abs(p/d),g,w,b,_,M;v>m?(g=u,w=u*m,M=(c-w)/n.h/2,b=[s[0],s[1]],_=[l[0]+M,l[1]-M]):(g=c/m,w=c,M=(u-g)/n.w/2,b=[s[0]+M,s[1]-M],_=[l[0],l[1]]),r.xLength2=g,r.yLength2=w,r.xDomain2=b,r.yDomain2=_;var x=r.xOffset2=n.l+n.w*b[0],T=r.yOffset2=n.t+n.h*(1-_[1]),A=r.radius=g/d,y=r.innerRadius=r.getHole(t)*A,E=r.cx=x-A*h[0],S=r.cy=T+A*h[3],C=r.cxx=E-x,k=r.cyy=S-T,D=a.side,F;D==="counterclockwise"?(F=D,D="top"):D==="clockwise"&&(F=D,D="bottom"),r.radialAxis=r.mockAxis(e,t,a,{_id:"x",side:D,_trueSide:F,domain:[y/n.w,A/n.w]}),r.angularAxis=r.mockAxis(e,t,o,{side:"right",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(e,t),r.updateAngularAxis(e,t),r.updateRadialAxis(e,t),r.updateRadialAxisTitle(e,t),r.xaxis=r.mockCartesianAxis(e,t,{_id:"x",domain:b}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:_});var P=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",P).attr("transform",Gu(C,k)),i.frontplot.attr("transform",Gu(x,T)).call(H8.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),i.bg.attr("d",P).attr("transform",Gu(E,S)).call(OO.fill,t.bgcolor)};fc.mockAxis=function(e,t,r,i){var n=hs.extendFlat({},r,i);return Ekr(n,t,e),n};fc.mockCartesianAxis=function(e,t,r){var i=this,n=i.isSmith,a=r._id,o=hs.extendFlat({type:"linear"},r);Skr(o,e);var s={x:[0,2],y:[1,3]};return o.setRange=function(){var l=i.sectorBBox,u=s[a],c=i.radialAxis._rl,f=(c[1]-c[0])/(1-i.getHole(t));o.range=[l[u[0]]*f,l[u[1]]*f]},o.isPtWithinRange=a==="x"&&!n?function(l){return i.isPtInside(l)}:function(){return!0},o.setRange(),o.setScale(),o};fc.doAutoRange=function(e,t){var r=this,i=r.gd,n=r.radialAxis,a=r.getRadial(t);kkr(i,n);var o=n.range;if(a.range=o.slice(),a._input.range=o.slice(),n._rl=[n.r2l(o[0],null,"gregorian"),n.r2l(o[1],null,"gregorian")],n.minallowed!==void 0){var s=n.r2l(n.minallowed);n._rl[0]>n._rl[1]?n._rl[1]=Math.max(n._rl[1],s):n._rl[0]=Math.max(n._rl[0],s)}if(n.maxallowed!==void 0){var l=n.r2l(n.maxallowed);n._rl[0]<n._rl[1]?n._rl[1]=Math.min(n._rl[1],l):n._rl[0]=Math.min(n._rl[0],l)}};fc.updateRadialAxis=function(e,t){var r=this,i=r.gd,n=r.layers,a=r.radius,o=r.innerRadius,s=r.cx,l=r.cy,u=r.getRadial(t),c=Cdt(r.getSector(t)[0],360),f=r.radialAxis,h=o<a,d=r.isSmith;d||(r.fillViewInitialKey("radialaxis.angle",u.angle),r.fillViewInitialKey("radialaxis.range",f.range.slice()),f.setGeometry()),f.tickangle==="auto"&&c>90&&c<=270&&(f.tickangle=180);var p=d?function(A){var y=BO(r,zO([A.x,0]));return Gu(y[0]-s,y[1]-l)}:function(A){return Gu(f.l2p(A.x)+o,0)},v=d?function(A){return Ikr(r,A.x,-1/0,1/0)}:function(A){return r.pathArc(f.r2p(A.x)+o)},m=Fdt(u);if(r.radialTickLayout!==m&&(n["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=m),h){f.setScale();var g=0,w=d?(f.tickvals||[]).filter(function(A){return A>=0}).map(function(A){return dh.tickText(f,A,!0,!1)}):dh.calcTicks(f),b=d?w:dh.clipEnds(f,w),_=dh.getTickSigns(f)[2];d&&((f.ticks==="top"&&f.side==="bottom"||f.ticks==="bottom"&&f.side==="top")&&(_=-_),f.ticks==="top"&&f.side==="top"&&(g=-f.ticklen),f.ticks==="bottom"&&f.side==="bottom"&&(g=f.ticklen)),dh.drawTicks(i,f,{vals:w,layer:n["radial-axis"],path:dh.makeTickPath(f,0,_),transFn:p,crisp:!1}),dh.drawGrid(i,f,{vals:b,layer:n["radial-grid"],path:v,transFn:hs.noop,crisp:!1}),dh.drawLabels(i,f,{vals:w,layer:n["radial-axis"],transFn:p,labelFns:dh.makeLabelFns(f,g)})}var M=r.radialAxisAngle=r.vangles?A3(Ldt(px(u.angle),r.vangles)):u.angle,x=Gu(s,l),T=x+sg(-M);j8(n["radial-axis"],h&&(u.showticklabels||u.ticks),{transform:T}),j8(n["radial-grid"],h&&u.showgrid,{transform:d?"":x}),j8(n["radial-line"].select("line"),h&&u.showline,{x1:d?-a:o,y1:0,x2:a,y2:0,transform:T}).attr("stroke-width",u.linewidth).call(OO.stroke,u.linecolor)};fc.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var i=this,n=i.gd,a=i.radius,o=i.cx,s=i.cy,l=i.getRadial(t),u=i.id+"title",c=0;if(l.title){var f=H8.bBox(i.layers["radial-axis"].node()).height,h=l.title.font.size,d=l.side;c=d==="top"?h:d==="counterclockwise"?-(f+h*.4):f+h*.8}var p=r!==void 0?r:i.radialAxisAngle,v=px(p),m=Math.cos(v),g=Math.sin(v),w=o+a/2*m+c*g,b=s-a/2*g+c*m;i.layers["radial-axis-title"]=Ckr.draw(n,u,{propContainer:l,propName:i.id+".radialaxis.title.text",placeholder:Rkr(n,"Click to enter radial axis title"),attributes:{x:w,y:b,"text-anchor":"middle"},transform:{rotate:-p}})}};fc.updateAngularAxis=function(e,t){var r=this,i=r.gd,n=r.layers,a=r.radius,o=r.innerRadius,s=r.cx,l=r.cy,u=r.getAngular(t),c=r.angularAxis,f=r.isSmith;f||(r.fillViewInitialKey("angularaxis.rotation",u.rotation),c.setGeometry(),c.setScale());var h=f?function(y){var E=BO(r,zO([0,y.x]));return Math.atan2(E[0]-s,E[1]-l)-Math.PI/2}:function(y){return c.t2g(y.x)};c.type==="linear"&&c.thetaunit==="radians"&&(c.tick0=A3(c.tick0),c.dtick=A3(c.dtick));var d=function(y){return Gu(s+a*Math.cos(y),l-a*Math.sin(y))},p=f?function(y){var E=BO(r,zO([0,y.x]));return Gu(E[0],E[1])}:function(y){return d(h(y))},v=f?function(y){var E=BO(r,zO([0,y.x])),S=Math.atan2(E[0]-s,E[1]-l)-Math.PI/2;return Gu(E[0],E[1])+sg(-A3(S))}:function(y){var E=h(y);return d(E)+sg(-A3(E))},m=f?function(y){return Pkr(r,y.x,0,1/0)}:function(y){var E=h(y),S=Math.cos(E),C=Math.sin(E);return"M"+[s+o*S,l-o*C]+"L"+[s+a*S,l-a*C]},g=dh.makeLabelFns(c,0),w=g.labelStandoff,b={};b.xFn=function(y){var E=h(y);return Math.cos(E)*w},b.yFn=function(y){var E=h(y),S=Math.sin(E)>0?.2:1;return-Math.sin(E)*(w+y.fontSize*S)+Math.abs(Math.cos(E))*(y.fontSize*Lkr)},b.anchorFn=function(y){var E=h(y),S=Math.cos(E);return Math.abs(S)<.1?"middle":S>0?"start":"end"},b.heightFn=function(y,E,S){var C=h(y);return-.5*(1+Math.sin(C))*S};var _=Fdt(u);r.angularTickLayout!==_&&(n["angular-axis"].selectAll("."+c._id+"tick").remove(),r.angularTickLayout=_);var M=f?[1/0].concat(c.tickvals||[]).map(function(y){return dh.tickText(c,y,!0,!1)}):dh.calcTicks(c);f&&(M[0].text="\u221E",M[0].fontSize*=1.75);var x;if(t.gridshape==="linear"?(x=M.map(h),hs.angleDelta(x[0],x[1])<0&&(x=x.slice().reverse())):x=null,r.vangles=x,c.type==="category"&&(M=M.filter(function(y){return hs.isAngleInsideSector(h(y),r.sectorInRad)})),c.visible){var T=c.ticks==="inside"?-1:1,A=(c.linewidth||1)/2;dh.drawTicks(i,c,{vals:M,layer:n["angular-axis"],path:"M"+T*A+",0h"+T*c.ticklen,transFn:v,crisp:!1}),dh.drawGrid(i,c,{vals:M,layer:n["angular-grid"],path:m,transFn:hs.noop,crisp:!1}),dh.drawLabels(i,c,{vals:M,layer:n["angular-axis"],repositionOnUpdate:!0,transFn:p,labelFns:b})}j8(n["angular-line"].select("path"),u.showline,{d:r.pathSubplot(),transform:Gu(s,l)}).attr("stroke-width",u.linewidth).call(OO.stroke,u.linecolor)};fc.updateFx=function(e,t){if(!this.gd._context.staticPlot){var r=!this.isSmith;r&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e)}};fc.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,i=t.gd,n=t.layers,a=e._zoomlayer,o=dx.MINZOOM,s=dx.OFFEDGE,l=t.radius,u=t.innerRadius,c=t.cx,f=t.cy,h=t.cxx,d=t.cyy,p=t.sectorInRad,v=t.vangles,m=t.radialAxis,g=Hm.clampTiny,w=Hm.findXYatLength,b=Hm.findEnclosingVertexAngles,_=dx.cornerHalfWidth,M=dx.cornerLen/2,x,T,A=Gm.makeDragger(n,"path","maindrag",e.dragmode===!1?"none":"crosshair");T3.select(A).attr("d",t.pathSubplot()).attr("transform",Gu(c,f)),A.onmousemove=function(te){Mdt.hover(i,te,t.id),i._fullLayout._lasthover=A,i._fullLayout._hoversubplot=t.id},A.onmouseout=function(te){i._dragging||qO.unhover(i,te)};var y={element:A,gd:i,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]},E,S,C,k,D,F,P,R,L;function I(te,ce){return Math.sqrt(te*te+ce*ce)}function B(te,ce){return I(te-h,ce-d)}function O(te,ce){return Math.atan2(d-ce,te-h)}function $(te,ce){return[te*Math.cos(ce),te*Math.sin(-ce)]}function Y(te,ce){if(te===0)return t.pathSector(2*_);var ge=M/te,Ce=ce-ge,be=ce+ge,he=Math.max(0,Math.min(te,l)),oe=he-_,Ee=he+_;return"M"+$(oe,Ce)+"A"+[oe,oe]+" 0,0,0 "+$(oe,be)+"L"+$(Ee,be)+"A"+[Ee,Ee]+" 0,0,1 "+$(Ee,Ce)+"Z"}function K(te,ce,ge){if(te===0)return t.pathSector(2*_);var Ce=$(te,ce),be=$(te,ge),he=g((Ce[0]+be[0])/2),oe=g((Ce[1]+be[1])/2),Ee,ye;if(he&&oe){var ue=oe/he,ee=-1/ue,ae=w(_,ue,he,oe);Ee=w(M,ee,ae[0][0],ae[0][1]),ye=w(M,ee,ae[1][0],ae[1][1])}else{var xe,re;oe?(xe=M,re=_):(xe=_,re=M),Ee=[[he-xe,oe-re],[he+xe,oe-re]],ye=[[he-xe,oe+re],[he+xe,oe+re]]}return"M"+Ee.join("L")+"L"+ye.reverse().join("L")+"Z"}function j(){C=null,k=null,D=t.pathSubplot(),F=!1;var te=i._fullLayout[t.id];P=OO.luminosity(te.bgcolor),R=Gm.makeZoombox(a,P,c,f,D),R.attr("fill-rule","evenodd"),L=Gm.makeCorners(a,c,f),ese(i)}function q(te,ce){return ce=Math.max(Math.min(ce,l),u),te<s?te=0:l-te<s?te=l:ce<s?ce=0:l-ce<s&&(ce=l),Math.abs(ce-te)>o?(te<ce?(C=te,k=ce):(C=ce,k=te),!0):(C=null,k=null,!1)}function J(te,ce){te=te||D,ce=ce||"M0,0Z",R.attr("d",te),L.attr("d",ce),Gm.transitionZoombox(R,L,F,P),F=!0;var ge={};G(ge),i.emit("plotly_relayouting",ge)}function U(te,ce){te=te*x,ce=ce*T;var ge=E+te,Ce=S+ce,be=B(E,S),he=Math.min(B(ge,Ce),l),oe=O(E,S),Ee,ye;q(be,he)&&(Ee=D+t.pathSector(k),C&&(Ee+=t.pathSector(C)),ye=Y(C,oe)+Y(k,oe)),J(Ee,ye)}function V(te,ce,ge,Ce){var be=Hm.findIntersectionXY(ge,Ce,ge,[te-h,d-ce]);return I(be[0],be[1])}function X(te,ce){var ge=E+te,Ce=S+ce,be=O(E,S),he=O(ge,Ce),oe=b(be,v),Ee=b(he,v),ye=V(E,S,oe[0],oe[1]),ue=Math.min(V(ge,Ce,Ee[0],Ee[1]),l),ee,ae;q(ye,ue)&&(ee=D+t.pathSector(k),C&&(ee+=t.pathSector(C)),ae=[K(C,oe[0],oe[1]),K(k,oe[0],oe[1])].join(" ")),J(ee,ae)}function H(){if(Gm.removeZoombox(i),!(C===null||k===null)){var te={};G(te),Gm.showDoubleClickNotifier(i),M3.call("_guiRelayout",i,te)}}function G(te){var ce=m._rl,ge=(ce[1]-ce[0])/(1-u/l)/l,Ce=[ce[0]+(C-u)*ge,ce[0]+(k-u)*ge];te[t.id+".radialaxis.range"]=Ce}function Q(te,ce){var ge=i._fullLayout.clickmode;if(Gm.removeZoombox(i),te===2){var Ce={};for(var be in t.viewInitial)Ce[t.id+"."+be]=t.viewInitial[be];i.emit("plotly_doubleclick",null),M3.call("_guiRelayout",i,Ce)}ge.indexOf("select")>-1&&te===1&&Fkr(ce,i,[t.xaxis],[t.yaxis],t.id,y),ge.indexOf("event")>-1&&Mdt.click(i,ce,t.id)}y.prepFn=function(te,ce,ge){var Ce=i._fullLayout.dragmode,be=A.getBoundingClientRect();i._fullLayout._calcInverseTransform(i);var he=i._fullLayout._invTransform;x=i._fullLayout._invScaleX,T=i._fullLayout._invScaleY;var oe=hs.apply3DTransform(he)(ce-be.left,ge-be.top);if(E=oe[0],S=oe[1],v){var Ee=Hm.findPolygonOffset(l,p[0],p[1],v);E+=h+Ee[0],S+=d+Ee[1]}switch(Ce){case"zoom":y.clickFn=Q,r||(v?y.moveFn=X:y.moveFn=U,y.doneFn=H,j(te,ce,ge));break;case"select":case"lasso":Dkr(te,ce,ge,y,Ce);break}},qO.init(y)};fc.updateRadialDrag=function(e,t,r){var i=this,n=i.gd,a=i.layers,o=i.radius,s=i.innerRadius,l=i.cx,u=i.cy,c=i.radialAxis,f=dx.radialDragBoxSize,h=f/2;if(!c.visible)return;var d=px(i.radialAxisAngle),p=c._rl,v=p[0],m=p[1],g=p[r],w=.75*(p[1]-p[0])/(1-i.getHole(t))/o,b,_,M;r?(b=l+(o+h)*Math.cos(d),_=u-(o+h)*Math.sin(d),M="radialdrag"):(b=l+(s-h)*Math.cos(d),_=u-(s-h)*Math.sin(d),M="radialdrag-inner");var x=Gm.makeRectDragger(a,M,"crosshair",-h,-h,f,f),T={element:x,gd:n};e.dragmode===!1&&(T.dragmode=!1),j8(T3.select(x),c.visible&&s<o,{transform:Gu(b,_)});var A,y,E;function S(P,R){if(A)A(P,R);else{var L=[P,-R],I=[Math.cos(d),Math.sin(d)],B=Math.abs(hs.dot(L,I)/Math.sqrt(hs.dot(L,L)));isNaN(B)||(A=B<.5?D:F)}var O={};C(O),n.emit("plotly_relayouting",O)}function C(P){y!==null?P[i.id+".radialaxis.angle"]=y:E!==null&&(P[i.id+".radialaxis.range["+r+"]"]=E)}function k(){y!==null?M3.call("_guiRelayout",n,i.id+".radialaxis.angle",y):E!==null&&M3.call("_guiRelayout",n,i.id+".radialaxis.range["+r+"]",E)}function D(P,R){if(r!==0){var L=b+P,I=_+R;y=Math.atan2(u-I,L-l),i.vangles&&(y=Ldt(y,i.vangles)),y=A3(y);var B=Gu(l,u)+sg(-y);a["radial-axis"].attr("transform",B),a["radial-line"].select("line").attr("transform",B);var O=i.gd._fullLayout,$=O[i.id];i.updateRadialAxisTitle(O,$,y)}}function F(P,R){var L=hs.dot([P,-R],[Math.cos(d),Math.sin(d)]);if(E=g-w*L,w>0!=(r?E>v:E<m)){E=null;return}var I=n._fullLayout,B=I[i.id];c.range[r]=E,c._rl[r]=E,i.updateRadialAxis(I,B),i.xaxis.setRange(),i.xaxis.setScale(),i.yaxis.setRange(),i.yaxis.setScale();var O=!1;for(var $ in i.traceHash){var Y=i.traceHash[$],K=hs.filterVisible(Y),j=Y[0][0].trace._module;j.plot(n,i,K,B),M3.traceIs($,"gl")&&K.length&&(O=!0)}O&&(Edt(n),kdt(n))}T.prepFn=function(){A=null,y=null,E=null,T.moveFn=S,T.doneFn=k,ese(n)},T.clampFn=function(P,R){return Math.sqrt(P*P+R*R)<dx.MINDRAG&&(P=0,R=0),[P,R]},qO.init(T)};fc.updateAngularDrag=function(e){var t=this,r=t.gd,i=t.layers,n=t.radius,a=t.angularAxis,o=t.cx,s=t.cy,l=t.cxx,u=t.cyy,c=dx.angularDragBoxSize,f=Gm.makeDragger(i,"path","angulardrag",e.dragmode===!1?"none":"move"),h={element:f,gd:r};e.dragmode===!1?h.dragmode=!1:T3.select(f).attr("d",t.pathAnnulus(n,n+c)).attr("transform",Gu(o,s)).call(Sdt,"move");function d(E,S){return Math.atan2(u+c-S,E-l-c)}var p=i.frontplot.select(".scatterlayer").selectAll(".trace"),v=p.selectAll(".point"),m=p.selectAll(".textpoint"),g,w,b,_,M,x;function T(E,S){var C=t.gd._fullLayout,k=C[t.id],D=g+E*e._invScaleX,F=w+S*e._invScaleY,P=d(D,F),R=A3(P-x);if(_=b+R,i.frontplot.attr("transform",Gu(t.xOffset2,t.yOffset2)+sg([-R,l,u])),t.vangles){M=t.radialAxisAngle+R;var L=Gu(o,s)+sg(-R),I=Gu(o,s)+sg(-M);i.bg.attr("transform",L),i["radial-grid"].attr("transform",L),i["radial-axis"].attr("transform",I),i["radial-line"].select("line").attr("transform",I),t.updateRadialAxisTitle(C,k,M)}else t.clipPaths.forTraces.select("path").attr("transform",Gu(l,u)+sg(R));v.each(function(){var q=T3.select(this),J=H8.getTranslate(q);q.attr("transform",Gu(J.x,J.y)+sg([R]))}),m.each(function(){var q=T3.select(this),J=q.select("text"),U=H8.getTranslate(q);q.attr("transform",sg([R,J.attr("x"),J.attr("y")])+Gu(U.x,U.y))}),a.rotation=hs.modHalf(_,360),t.updateAngularAxis(C,k),t._hasClipOnAxisFalse&&!hs.isFullCircle(t.sectorInRad)&&p.call(H8.hideOutsideRangePoints,t);var B=!1;for(var O in t.traceHash)if(M3.traceIs(O,"gl")){var $=t.traceHash[O],Y=hs.filterVisible($),K=$[0][0].trace._module;K.plot(r,t,Y,k),Y.length&&(B=!0)}B&&(Edt(r),kdt(r));var j={};A(j),r.emit("plotly_relayouting",j)}function A(E){E[t.id+".angularaxis.rotation"]=_,t.vangles&&(E[t.id+".radialaxis.angle"]=M)}function y(){m.select("text").attr("transform",null);var E={};A(E),M3.call("_guiRelayout",r,E)}h.prepFn=function(E,S,C){var k=e[t.id];b=k.angularaxis.rotation;var D=f.getBoundingClientRect();g=S-D.left,w=C-D.top,r._fullLayout._calcInverseTransform(r);var F=hs.apply3DTransform(e._invTransform)(g,w);g=F[0],w=F[1],x=d(g,w),h.moveFn=T,h.doneFn=y,ese(r)},t.vangles&&!hs.isFullCircle(t.sectorInRad)&&(h.prepFn=hs.noop,Sdt(T3.select(f),null)),qO.init(h)};fc.isPtInside=function(e){if(this.isSmith)return!0;var t=this.sectorInRad,r=this.vangles,i=this.angularAxis.c2g(e.theta),n=this.radialAxis,a=n.c2l(e.r),o=n._rl,s=r?Hm.isPtInsidePolygon:hs.isPtInsideSector;return s(a,i,o,t,r)};fc.pathArc=function(e){var t=this.sectorInRad,r=this.vangles,i=r?Hm.pathPolygon:hs.pathArc;return i(e,t[0],t[1],r)};fc.pathSector=function(e){var t=this.sectorInRad,r=this.vangles,i=r?Hm.pathPolygon:hs.pathSector;return i(e,t[0],t[1],r)};fc.pathAnnulus=function(e,t){var r=this.sectorInRad,i=this.vangles,n=i?Hm.pathPolygonAnnulus:hs.pathAnnulus;return n(e,t,r[0],r[1],i)};fc.pathSubplot=function(){var e=this.innerRadius,t=this.radius;return e?this.pathAnnulus(e,t):this.pathSector(t)};fc.fillViewInitialKey=function(e,t){e in this.viewInitial||(this.viewInitial[e]=t)};function Fdt(e){var t=e.ticks+String(e.ticklen)+String(e.showticklabels);return"side"in e&&(t+=e.side),t}function zkr(e){var t=e[0],r=e[1],i=r-t,n=Cdt(t,360),a=n+i,o=Math.cos(px(n)),s=Math.sin(px(n)),l=Math.cos(px(a)),u=Math.sin(px(a)),c,f,h,d;return n<=90&&a>=90||n>90&&a>=450?d=1:s<=0&&u<=0?d=0:d=Math.max(s,u),n<=180&&a>=180||n>180&&a>=540?c=-1:o>=0&&l>=0?c=0:c=Math.min(o,l),n<=270&&a>=270||n>270&&a>=630?f=-1:s>=0&&u>=0?f=0:f=Math.min(s,u),a>=360?h=1:o<=0&&l<=0?h=0:h=Math.max(o,l),[c,f,h,d]}function Ldt(e,t){var r=function(n){return hs.angleDist(e,n)},i=hs.findIndexOfMin(t,r);return t[i]}function j8(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}});var rse=W((yni,Odt)=>{"use strict";var Bkr=Vl(),Pn=ec(),qkr=us().attributes,V0=it().extendFlat,Idt=ls().overrideAll,Rdt=Idt({color:Pn.color,showline:V0({},Pn.showline,{dflt:!0}),linecolor:Pn.linecolor,linewidth:Pn.linewidth,showgrid:V0({},Pn.showgrid,{dflt:!0}),gridcolor:Pn.gridcolor,gridwidth:Pn.gridwidth,griddash:Pn.griddash},"plot","from-root"),zdt=Idt({tickmode:Pn.minor.tickmode,nticks:Pn.nticks,tick0:Pn.tick0,dtick:Pn.dtick,tickvals:Pn.tickvals,ticktext:Pn.ticktext,ticks:Pn.ticks,ticklen:Pn.ticklen,tickwidth:Pn.tickwidth,tickcolor:Pn.tickcolor,ticklabelstep:Pn.ticklabelstep,showticklabels:Pn.showticklabels,labelalias:Pn.labelalias,minorloglabels:Pn.minorloglabels,showtickprefix:Pn.showtickprefix,tickprefix:Pn.tickprefix,showticksuffix:Pn.showticksuffix,ticksuffix:Pn.ticksuffix,showexponent:Pn.showexponent,exponentformat:Pn.exponentformat,minexponent:Pn.minexponent,separatethousands:Pn.separatethousands,tickfont:Pn.tickfont,tickangle:Pn.tickangle,tickformat:Pn.tickformat,tickformatstops:Pn.tickformatstops,layer:Pn.layer},"plot","from-root"),Bdt={visible:V0({},Pn.visible,{dflt:!0}),type:V0({},Pn.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Pn.autotypenumbers,autorangeoptions:{minallowed:Pn.autorangeoptions.minallowed,maxallowed:Pn.autorangeoptions.maxallowed,clipmin:Pn.autorangeoptions.clipmin,clipmax:Pn.autorangeoptions.clipmax,include:Pn.autorangeoptions.include,editType:"plot"},autorange:V0({},Pn.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:V0({},Pn.minallowed,{editType:"plot"}),maxallowed:V0({},Pn.maxallowed,{editType:"plot"}),range:V0({},Pn.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:Pn.categoryorder,categoryarray:Pn.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:Pn.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:V0({},Pn.title.text,{editType:"plot",dflt:""}),font:V0({},Pn.title.font,{editType:"plot"}),editType:"plot"},hoverformat:Pn.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};V0(Bdt,Rdt,zdt);var qdt={visible:V0({},Pn.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:Pn.autotypenumbers,categoryorder:Pn.categoryorder,categoryarray:Pn.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:Pn.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};V0(qdt,Rdt,zdt);Odt.exports={domain:qkr({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:Bkr.background},radialaxis:Bdt,angularaxis:qdt,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var Gdt=W((xni,Vdt)=>{"use strict";var UO=it(),Okr=ni(),Nkr=Da(),Ukr=q_(),Vkr=_c().getSubplotData,Gkr=Xx(),Hkr=vw(),jkr=wy(),$kr=Ty(),Wkr=_F(),Ykr=vM(),Xkr=NG(),Zkr=bw(),Udt=rse(),Kkr=Zoe(),VO=PO(),Ndt=VO.axisNames;function Jkr(e,t,r,i){var n=r("bgcolor");i.bgColor=Okr.combine(n,i.paper_bgcolor);var a=r("sector");r("hole");var o=Vkr(i.fullData,VO.name,i.id),s=i.layoutOut,l;function u(R,L){return r(l+"."+R,L)}for(var c=0;c<Ndt.length;c++){l=Ndt[c],UO.isPlainObject(e[l])||(e[l]={});var f=e[l],h=Nkr.newContainer(t,l);h._id=h._name=l,h._attr=i.id+"."+l,h._traceIndices=o.map(function(R){return R.index});var d=VO.axisName2dataArray[l],p=Qkr(f,h,u,o,d,i);Wkr(f,h,u,{axData:o,dataAttr:d});var v=u("visible");switch(Kkr(h,t,s),u("uirevision",t.uirevision),h._m=1,l){case"radialaxis":u("minallowed"),u("maxallowed");var m=u("range"),g=h.getAutorangeDflt(m),w=u("autorange",g),b;m&&(m[0]===null&&m[1]===null||(m[0]===null||m[1]===null)&&(w==="reversed"||w===!0)||m[0]!==null&&(w==="min"||w==="max reversed")||m[1]!==null&&(w==="max"||w==="min reversed"))&&(m=void 0,delete h.range,h.autorange=!0,b=!0),b||(g=h.getAutorangeDflt(m),w=u("autorange",g)),f.autorange=w,w&&(Xkr(u,w,m),(p==="linear"||p==="-")&&u("rangemode"),h.isReversed()&&(h._m=-1)),h.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if(p==="date"){UO.log("Polar plots do not support date angular axes yet.");for(var _=0;_<o.length;_++)o[_].visible=!1;p=f.type=h.type="linear"}u(p==="linear"?"thetaunit":"period");var M=u("direction");u("rotation",{counterclockwise:0,clockwise:90}[M]);break}if($kr(f,h,u,h.type,{tickSuffixDflt:h.thetaunit==="degrees"?"\xB0":void 0}),v){var x,T,A,y,E,S,C,k,D,F,P=i.font||{};x=u("color"),T=x===f.color?x:P.color,A=P.size,y=P.family,E=P.weight,S=P.style,C=P.variant,k=P.textcase,D=P.lineposition,F=P.shadow,Gkr(f,h,u,h.type),jkr(f,h,u,h.type,{font:{weight:E,style:S,variant:C,textcase:k,lineposition:D,shadow:F,color:T,size:A,family:y},noAutotickangles:l==="angularaxis",noTicklabelshift:!0,noTicklabelstandoff:!0}),Hkr(f,h,u,{outerTicks:!0}),Ykr(f,h,u,{dfltColor:x,bgColor:i.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:Udt[l]}),u("layer"),l==="radialaxis"&&(u("side"),u("angle",a[0]),u("title.text"),UO.coerceFont(u,"title.font",{weight:E,style:S,variant:C,textcase:k,lineposition:D,shadow:F,color:T,size:UO.bigFont(A),family:y}))}p!=="category"&&u("hoverformat"),h._input=f}t.angularaxis.type==="category"&&r("gridshape")}function Qkr(e,t,r,i,n,a){var o=r("autotypenumbers",a.autotypenumbersDflt),s=r("type");if(s==="-"){for(var l,u=0;u<i.length;u++)if(i[u].visible){l=i[u];break}l&&l[n]&&(t.type=Zkr(l[n],"gregorian",{noMultiCategory:!0,autotypenumbers:o})),t.type==="-"?t.type="linear":e.type=t.type}return t.type}Vdt.exports=function(t,r,i){Ukr(t,r,i,{type:VO.name,attributes:Udt,handleDefaults:Jkr,font:r.font,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,fullData:i,layoutOut:r})}});var GO=W((_ni,Ydt)=>{"use strict";var e8r=_c().getSubplotCalcData,t8r=it().counterRegex,r8r=tse(),jdt=PO(),$dt=jdt.attr,S3=jdt.name,Hdt=t8r(S3),Wdt={};Wdt[$dt]={valType:"subplotid",dflt:S3,editType:"calc"};function i8r(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots[S3],n=0;n<i.length;n++){var a=i[n],o=e8r(r,S3,a),s=t[a]._subplot;s||(s=r8r(e,a),t[a]._subplot=s),s.plot(o,t,e._promises)}}function n8r(e,t,r,i){for(var n=i._subplots[S3]||[],a=i._has&&i._has("gl"),o=t._has&&t._has("gl"),s=a&&!o,l=0;l<n.length;l++){var u=n[l],c=i[u]._subplot;if(!t[u]&&c){c.framework.remove(),c.layers["radial-axis-title"].remove();for(var f in c.clipPaths)c.clipPaths[f].remove()}s&&c._scene&&(c._scene.destroy(),c._scene=null)}}Ydt.exports={attr:$dt,name:S3,idRoot:S3,idRegex:Hdt,attrRegex:Hdt,attributes:Wdt,layoutAttributes:rse(),supplyLayoutDefaults:Gdt(),plot:i8r,clean:n8r,toSVG:dl().toSVG}});var $8=W((bni,Zdt)=>{"use strict";var{hovertemplateAttrs:a8r,texttemplateAttrs:o8r,templatefallbackAttrs:Xdt}=Ga(),HO=tn().extendFlat,s8r=g1(),G0=Ns(),l8r=Wa(),p6=G0.line;Zdt.exports={mode:G0.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:G0.text,texttemplate:o8r({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:Xdt({editType:"plot"}),hovertext:G0.hovertext,line:{color:p6.color,width:p6.width,dash:p6.dash,backoff:p6.backoff,shape:HO({},p6.shape,{values:["linear","spline"]}),smoothing:p6.smoothing,editType:"calc"},connectgaps:G0.connectgaps,marker:G0.marker,cliponaxis:HO({},G0.cliponaxis,{dflt:!1}),textposition:G0.textposition,textfont:G0.textfont,fill:HO({},G0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:s8r(),hoverinfo:HO({},l8r.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:G0.hoveron,hovertemplate:a8r(),hovertemplatefallback:Xdt(),selected:G0.selected,unselected:G0.unselected}});var $O=W((wni,Qdt)=>{"use strict";var jO=it(),v6=$o(),u8r=bd(),c8r=jp(),Kdt=Nw(),f8r=$p(),h8r=y1(),d8r=v1().PTS_LINESONLY,p8r=$8();function v8r(e,t,r,i){function n(s,l){return jO.coerce(e,t,p8r,s,l)}var a=Jdt(e,t,i,n);if(!a){t.visible=!1;return}n("thetaunit"),n("mode",a<d8r?"lines+markers":"lines"),n("text"),n("hovertext"),t.hoveron!=="fills"&&(n("hovertemplate"),n("hovertemplatefallback")),v6.hasMarkers(t)&&u8r(e,t,r,i,n,{gradient:!0}),v6.hasLines(t)&&(c8r(e,t,r,i,n,{backoff:!0}),Kdt(e,t,n),n("connectgaps")),v6.hasText(t)&&(n("texttemplate"),n("texttemplatefallback"),f8r(e,t,i,n));var o=[];(v6.hasMarkers(t)||v6.hasText(t))&&(n("cliponaxis"),n("marker.maxdisplayed"),o.push("points")),n("fill"),t.fill!=="none"&&(h8r(e,t,r,n),v6.hasLines(t)||Kdt(e,t,n)),(t.fill==="tonext"||t.fill==="toself")&&o.push("fills"),n("hoveron",o.join("+")||"points"),jO.coerceSelectionMarkerOpacity(t,n)}function Jdt(e,t,r,i){var n=i("r"),a=i("theta");jO.isTypedArray(n)&&(t.r=n=Array.from(n)),jO.isTypedArray(a)&&(t.theta=a=Array.from(a));var o;if(n)a?o=Math.min(n.length,a.length):(o=n.length,i("theta0"),i("dtheta"));else{if(!a)return 0;o=t.theta.length,i("r0"),i("dr")}return t._length=o,o}Qdt.exports={handleRThetaDefaults:Jdt,supplyDefaults:v8r}});var WO=W((Tni,tpt)=>{"use strict";var g8r=it(),ept=ji();tpt.exports=function(t,r,i){var n={},a=i[r.subplot]._subplot,o,s;a?(o=a.radialAxis,s=a.angularAxis):(a=i[r.subplot],o=a.radialaxis,s=a.angularaxis);var l=o.c2l(t.r);n.rLabel=ept.tickText(o,l,!0).text;var u=s.thetaunit==="degrees"?g8r.rad2deg(t.theta):t.theta;return n.thetaLabel=ept.tickText(s,u,!0).text,n}});var npt=W((Ani,ipt)=>{"use strict";var rpt=sn(),m8r=Kn().BADNUM,y8r=ji(),x8r=wd(),_8r=x1(),b8r=w0(),w8r=Td().calcMarkerSize;ipt.exports=function(t,r){for(var i=t._fullLayout,n=r.subplot,a=i[n].radialaxis,o=i[n].angularaxis,s=a.makeCalcdata(r,"r"),l=o.makeCalcdata(r,"theta"),u=r._length,c=new Array(u),f=0;f<u;f++){var h=s[f],d=l[f],p=c[f]={};rpt(h)&&rpt(d)?(p.r=h,p.theta=d):p.r=m8r}var v=w8r(r,u);return r._extremes.x=y8r.findExtremes(a,s,{ppad:v}),x8r(t,r),_8r(c,r),b8r(c,r),c}});var spt=W((Mni,opt)=>{"use strict";var T8r=$w(),apt=Kn().BADNUM;opt.exports=function(t,r,i){for(var n=r.layers.frontplot.select("g.scatterlayer"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=r.radialAxis,u=r.angularAxis,c=0;c<i.length;c++)for(var f=i[c],h=0;h<f.length;h++){h===0&&(f[0].trace._xA=a,f[0].trace._yA=o);var d=f[h],p=d.r;if(p===apt)d.x=d.y=apt;else{var v=l.c2g(p),m=u.c2g(d.theta);d.x=v*Math.cos(m),d.y=v*Math.sin(m)}}T8r(t,s,i,n)}});var YO=W((Sni,upt)=>{"use strict";var A8r=Zw();function M8r(e,t,r,i){var n=A8r(e,t,r,i);if(!(!n||n[0].index===!1)){var a=n[0];if(a.index===void 0)return n;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,lpt(s,l,o,a),a.hovertemplate=l.hovertemplate,n}}function lpt(e,t,r,i){var n=r.radialAxis,a=r.angularAxis;n._hovertitle="r",a._hovertitle="\u03B8";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);i.rLabel=s.rLabel,i.thetaLabel=s.thetaLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,d){u.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["r","theta","text"]),f.indexOf("r")!==-1&&c(n,i.rLabel),f.indexOf("theta")!==-1&&c(a,i.thetaLabel),f.indexOf("text")!==-1&&i.text&&(u.push(i.text),delete i.text),i.extraText=u.join("<br>")}}upt.exports={hoverPoints:M8r,makeHoverPointText:lpt}});var fpt=W((Eni,cpt)=>{"use strict";cpt.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:GO(),categories:["polar","symbols","showLegend","scatter-like"],attributes:$8(),supplyDefaults:$O().supplyDefaults,colorbar:Ac(),formatLabels:WO(),calc:npt(),plot:spt(),style:th().style,styleOnSelect:th().styleOnSelect,hoverPoints:YO().hoverPoints,selectPoints:w_(),meta:{}}});var dpt=W((kni,hpt)=>{"use strict";hpt.exports=fpt()});var ise=W((Fni,vpt)=>{"use strict";var ppt=$8(),{cliponaxis:Cni,hoveron:Dni}=ppt,S8r=Gse(ppt,["cliponaxis","hoveron"]),{connectgaps:E8r,line:{color:k8r,dash:C8r,width:D8r},fill:F8r,fillcolor:L8r,marker:P8r,textfont:I8r,textposition:R8r}=_E();vpt.exports=ma(fn({},S8r),{connectgaps:E8r,fill:F8r,fillcolor:L8r,line:{color:k8r,dash:C8r,editType:"calc",width:D8r},marker:P8r,textfont:I8r,textposition:R8r})});var ypt=W((Pni,mpt)=>{"use strict";var gpt=it(),nse=$o(),z8r=$O().handleRThetaDefaults,B8r=bd(),q8r=jp(),O8r=$p(),N8r=y1(),U8r=v1().PTS_LINESONLY,V8r=ise();mpt.exports=function(t,r,i,n){function a(s,l){return gpt.coerce(t,r,V8r,s,l)}var o=z8r(t,r,n,a);if(!o){r.visible=!1;return}a("thetaunit"),a("mode",o<U8r?"lines+markers":"lines"),a("text"),a("hovertext"),r.hoveron!=="fills"&&(a("hovertemplate"),a("hovertemplatefallback")),nse.hasMarkers(r)&&B8r(t,r,i,n,a,{noAngleRef:!0,noLineDash:!0,noStandOff:!0}),nse.hasLines(r)&&(q8r(t,r,i,n,a),a("connectgaps")),nse.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),O8r(t,r,n,a,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0})),a("fill"),r.fill!=="none"&&N8r(t,r,i,a),gpt.coerceSelectionMarkerOpacity(r,a)}});var _pt=W((Ini,xpt)=>{"use strict";var G8r=WO();xpt.exports=function(t,r,i){var n=t.i;return"r"in t||(t.r=r._r[n]),"theta"in t||(t.theta=r._theta[n]),G8r(t,r,i)}});var wpt=W((Rni,bpt)=>{"use strict";var H8r=wd(),j8r=Td().calcMarkerSize,$8r=kb(),W8r=ji(),Y8r=C2().TOO_MANY_POINTS;bpt.exports=function(t,r){var i=t._fullLayout,n=r.subplot,a=i[n].radialaxis,o=i[n].angularaxis,s=r._r=a.makeCalcdata(r,"r"),l=r._theta=o.makeCalcdata(r,"theta"),u=r._length,c={};u<s.length&&(s=s.slice(0,u)),u<l.length&&(l=l.slice(0,u)),c.r=s,c.theta=l,H8r(t,r);var f=c.opts=$8r.style(t,r),h;return u<Y8r?h=j8r(r,u):f.marker&&(h=2*(f.marker.sizeAvg||Math.max(f.marker.size,3))),r._extremes.x=W8r.findExtremes(a,s,{ppad:h}),[{x:!1,y:!1,t:c,trace:r}]}});var Apt=W((zni,Tpt)=>{"use strict";var X8r=nR(),Z8r=YO().makeHoverPointText;function K8r(e,t,r,i){var n=e.cd,a=n[0].t,o=a.r,s=a.theta,l=X8r.hoverPoints(e,t,r,i);if(!(!l||l[0].index===!1)){var u=l[0];if(u.index===void 0)return l;var c=e.subplot,f=u.cd[u.index],h=u.trace;if(f.r=o[u.index],f.theta=s[u.index],!!c.isPtInside(f))return u.xLabelVal=void 0,u.yLabelVal=void 0,Z8r(f,h,c,u),l}}Tpt.exports={hoverPoints:K8r}});var Spt=W((Bni,Mpt)=>{"use strict";Mpt.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:GO(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:ise(),supplyDefaults:ypt(),colorbar:Ac(),formatLabels:_pt(),calc:wpt(),hoverPoints:Apt().hoverPoints,selectPoints:VQ(),meta:{}}});var Ept=W((qni,ase)=>{"use strict";var J8r=lR(),Q8r=sn(),eCr=Hee(),tCr=OQ(),XO=kb(),ZO=it(),rCr=C2().TOO_MANY_POINTS,iCr={};ase.exports=function(t,r,i){if(i.length){var n=r.radialAxis,a=r.angularAxis,o=tCr(t,r);return i.forEach(function(s){if(!(!s||!s[0]||!s[0].trace)){var l=s[0],u=l.trace,c=l.t,f=u._length,h=c.r,d=c.theta,p=c.opts,v,m=h.slice(),g=d.slice();for(v=0;v<h.length;v++)r.isPtInside({r:h[v],theta:d[v]})||(m[v]=NaN,g[v]=NaN);var w=new Array(f*2),b=Array(f),_=Array(f);for(v=0;v<f;v++){var M=m[v],x,T;if(Q8r(M)){var A=n.c2g(M),y=a.c2g(g[v],u.thetaunit);x=A*Math.cos(y),T=A*Math.sin(y)}else x=T=NaN;b[v]=w[v*2]=x,_[v]=w[v*2+1]=T}c.tree=J8r(w),p.marker&&f>=rCr&&(p.marker.cluster=c.tree),p.marker&&(p.markerSel.positions=p.markerUnsel.positions=p.marker.positions=w),p.line&&w.length>1&&ZO.extendFlat(p.line,XO.linePositions(t,u,w)),p.text&&(ZO.extendFlat(p.text,{positions:w},XO.textPosition(t,u,p.text,p.marker)),ZO.extendFlat(p.textSel,{positions:w},XO.textPosition(t,u,p.text,p.markerSel)),ZO.extendFlat(p.textUnsel,{positions:w},XO.textPosition(t,u,p.text,p.markerUnsel))),p.fill&&!o.fill2d&&(o.fill2d=!0),p.marker&&!o.scatter2d&&(o.scatter2d=!0),p.line&&!o.line2d&&(o.line2d=!0),p.text&&!o.glText&&(o.glText=!0),o.lineOptions.push(p.line),o.fillOptions.push(p.fill),o.markerOptions.push(p.marker),o.markerSelectedOptions.push(p.markerSel),o.markerUnselectedOptions.push(p.markerUnsel),o.textOptions.push(p.text),o.textSelectedOptions.push(p.textSel),o.textUnselectedOptions.push(p.textUnsel),o.selectBatch.push([]),o.unselectBatch.push([]),c.x=b,c.y=_,c.rawx=b,c.rawy=_,c.r=h,c.theta=d,c.positions=w,c._scene=o,c.index=o.count,o.count++}}),eCr(t,r,i)}};ase.exports.reglPrecompiled=iCr});var Dpt=W((Oni,Cpt)=>{"use strict";var kpt=Spt();kpt.plot=Ept();Cpt.exports=kpt});var Lpt=W((Nni,Fpt)=>{"use strict";Fpt.exports=Dpt()});var ose=W((Uni,Ppt)=>{"use strict";var{hovertemplateAttrs:nCr,templatefallbackAttrs:aCr}=Ga(),g6=tn().extendFlat,vx=$8(),gx=w1();Ppt.exports={r:vx.r,theta:vx.theta,r0:vx.r0,dr:vx.dr,theta0:vx.theta0,dtheta:vx.dtheta,thetaunit:vx.thetaunit,base:g6({},gx.base,{}),offset:g6({},gx.offset,{}),width:g6({},gx.width,{}),text:g6({},gx.text,{}),hovertext:g6({},gx.hovertext,{}),marker:oCr(),hoverinfo:vx.hoverinfo,hovertemplate:nCr(),hovertemplatefallback:aCr(),selected:gx.selected,unselected:gx.unselected};function oCr(){var e=g6({},gx.marker);return delete e.cornerradius,e}});var sse=W((Vni,Ipt)=>{"use strict";Ipt.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}});var Bpt=W((Gni,zpt)=>{"use strict";var Rpt=it(),sCr=$O().handleRThetaDefaults,lCr=rL(),uCr=ose();zpt.exports=function(t,r,i,n){function a(s,l){return Rpt.coerce(t,r,uCr,s,l)}var o=sCr(t,r,n,a);if(!o){r.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),lCr(t,r,a,i,n),Rpt.coerceSelectionMarkerOpacity(r,a)}});var Opt=W((Hni,qpt)=>{"use strict";var cCr=it(),fCr=sse();qpt.exports=function(e,t,r){var i={},n;function a(l,u){return cCr.coerce(e[n]||{},t[n],fCr,l,u)}for(var o=0;o<r.length;o++){var s=r[o];s.type==="barpolar"&&s.visible===!0&&(n=s.subplot,i[n]||(a("barmode"),a("bargap"),i[n]=1))}}});var lse=W((jni,Vpt)=>{"use strict";var Npt=bc().hasColorscale,Upt=Zc(),hCr=it().isArrayOrTypedArray,dCr=DM(),pCr=b_().setGroupPositions,vCr=w0(),gCr=yi().traceIs,mCr=it().extendFlat;function yCr(e,t){for(var r=e._fullLayout,i=t.subplot,n=r[i].radialaxis,a=r[i].angularaxis,o=n.makeCalcdata(t,"r"),s=a.makeCalcdata(t,"theta"),l=t._length,u=new Array(l),c=o,f=s,h=0;h<l;h++)u[h]={p:f[h],s:c[h]};function d(p){var v=t[p];v!==void 0&&(t["_"+p]=hCr(v)?a.makeCalcdata(t,p):a.d2c(v,t.thetaunit))}return a.type==="linear"&&(d("width"),d("offset")),Npt(t,"marker")&&Upt(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),Npt(t,"marker.line")&&Upt(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),dCr(u,t),vCr(u,t),u}function xCr(e,t,r){for(var i=e.calcdata,n=[],a=0;a<i.length;a++){var o=i[a],s=o[0].trace;s.visible===!0&&gCr(s,"bar")&&s.subplot===r&&n.push(o)}var l=mCr({},t.radialaxis,{_id:"x"}),u=t.angularaxis;pCr(e,u,l,n,{mode:t.barmode,norm:t.barnorm,gap:t.bargap,groupgap:t.bargroupgap})}Vpt.exports={calc:yCr,crossTraceCalc:xCr}});var jpt=W(($ni,Hpt)=>{"use strict";var Gpt=vi(),KO=sn(),m6=it(),_Cr=Ji(),use=RO();Hpt.exports=function(t,r,i){var n=t._context.staticPlot,a=r.xaxis,o=r.yaxis,s=r.radialAxis,l=r.angularAxis,u=bCr(r),c=r.layers.frontplot.select("g.barlayer");m6.makeTraceGroups(c,i,"trace bars").each(function(){var f=Gpt.select(this),h=m6.ensureSingle(f,"g","points"),d=h.selectAll("g.point").data(m6.identity);d.enter().append("g").style("vector-effect",n?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),d.exit().remove(),d.each(function(p){var v=Gpt.select(this),m=p.rp0=s.c2p(p.s0),g=p.rp1=s.c2p(p.s1),w=p.thetag0=l.c2g(p.p0),b=p.thetag1=l.c2g(p.p1),_;if(!KO(m)||!KO(g)||!KO(w)||!KO(b)||m===g||w===b)_="M0,0Z";else{var M=s.c2g(p.s1),x=(w+b)/2;p.ct=[a.c2p(M*Math.cos(x)),o.c2p(M*Math.sin(x))],_=u(m,g,w,b)}m6.ensureSingle(v,"path").attr("d",_)}),_Cr.setClipUrl(f,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function bCr(e){var t=e.cxx,r=e.cyy;return e.vangles?function(i,n,a,o){var s,l;m6.angleDelta(a,o)>0?(s=a,l=o):(s=o,l=a);var u=use.findEnclosingVertexAngles(s,e.vangles)[0],c=use.findEnclosingVertexAngles(l,e.vangles)[1],f=[u,(s+l)/2,c];return use.pathPolygonAnnulus(i,n,s,l,f,t,r)}:function(i,n,a,o){return m6.pathAnnulus(i,n,a,o,t,r)}}});var Wpt=W((Wni,$pt)=>{"use strict";var wCr=Ds(),cse=it(),TCr=c5().getTraceColor,ACr=cse.fillText,MCr=YO().makeHoverPointText,SCr=RO().isPtInsidePolygon;$pt.exports=function(t,r,i){var n=t.cd,a=n[0].trace,o=t.subplot,s=o.radialAxis,l=o.angularAxis,u=o.vangles,c=u?SCr:cse.isPtInsideSector,f=t.maxHoverDistance,h=l._period||2*Math.PI,d=Math.abs(s.g2p(Math.sqrt(r*r+i*i))),p=Math.atan2(i,r);s.range[0]>s.range[1]&&(p+=Math.PI);var v=function(b){return c(d,p,[b.rp0,b.rp1],[b.thetag0,b.thetag1],u)?f+Math.min(1,Math.abs(b.thetag1-b.thetag0)/h)-1+(b.rp1-d)/(b.rp1-b.rp0)-1:1/0};if(wCr.getClosest(n,v,t),t.index!==!1){var m=t.index,g=n[m];t.x0=t.x1=g.ct[0],t.y0=t.y1=g.ct[1];var w=cse.extendFlat({},g,{r:g.s,theta:g.p});return ACr(g,a,t),MCr(w,a,o,t),t.hovertemplate=a.hovertemplate,t.color=TCr(a,g),t.xLabelVal=t.yLabelVal=void 0,g.s<0&&(t.idealAlign="left"),[t]}}});var Xpt=W((Yni,Ypt)=>{"use strict";Ypt.exports={moduleType:"trace",name:"barpolar",basePlotModule:GO(),categories:["polar","bar","showLegend"],attributes:ose(),layoutAttributes:sse(),supplyDefaults:Bpt(),supplyLayoutDefaults:Opt(),calc:lse().calc,crossTraceCalc:lse().crossTraceCalc,plot:jpt(),colorbar:Ac(),formatLabels:WO(),style:Ed().style,styleOnSelect:Ed().styleOnSelect,hoverPoints:Wpt(),selectPoints:f5(),meta:{}}});var Kpt=W((Xni,Zpt)=>{"use strict";Zpt.exports=Xpt()});var fse=W((Zni,Jpt)=>{"use strict";Jpt.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}});var hse=W((Kni,rvt)=>{"use strict";var ECr=Vl(),ll=ec(),kCr=us().attributes,mx=it().extendFlat,Qpt=ls().overrideAll,evt=Qpt({color:ll.color,showline:mx({},ll.showline,{dflt:!0}),linecolor:ll.linecolor,linewidth:ll.linewidth,showgrid:mx({},ll.showgrid,{dflt:!0}),gridcolor:ll.gridcolor,gridwidth:ll.gridwidth,griddash:ll.griddash},"plot","from-root"),tvt=Qpt({ticklen:ll.ticklen,tickwidth:mx({},ll.tickwidth,{dflt:2}),tickcolor:ll.tickcolor,showticklabels:ll.showticklabels,labelalias:ll.labelalias,showtickprefix:ll.showtickprefix,tickprefix:ll.tickprefix,showticksuffix:ll.showticksuffix,ticksuffix:ll.ticksuffix,tickfont:ll.tickfont,tickformat:ll.tickformat,hoverformat:ll.hoverformat,layer:ll.layer},"plot","from-root"),CCr=mx({visible:mx({},ll.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:mx({},ll.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},evt,tvt),DCr=mx({visible:mx({},ll.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:ll.ticks,editType:"calc"},evt,tvt);rvt.exports={domain:kCr({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:ECr.background},realaxis:CCr,imaginaryaxis:DCr,editType:"calc"}});var avt=W((Jni,nvt)=>{"use strict";var y6=it(),FCr=ni(),LCr=Da(),PCr=q_(),ICr=_c().getSubplotData,RCr=Ty(),zCr=wy(),BCr=vM(),qCr=i1(),x6=hse(),dse=fse(),ivt=dse.axisNames,OCr=UCr(function(e){return y6.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function NCr(e,t,r,i){var n=r("bgcolor");i.bgColor=FCr.combine(n,i.paper_bgcolor);var a=ICr(i.fullData,dse.name,i.id),o=i.layoutOut,s;function l(M,x){return r(s+"."+M,x)}for(var u=0;u<ivt.length;u++){s=ivt[u],y6.isPlainObject(e[s])||(e[s]={});var c=e[s],f=LCr.newContainer(t,s);f._id=f._name=s,f._attr=i.id+"."+s,f._traceIndices=a.map(function(M){return M.index});var h=l("visible");if(f.type="linear",qCr(f,o),RCr(c,f,l,f.type),h){var d=s==="realaxis";if(d&&l("side"),d)l("tickvals");else{var p=OCr(t.realaxis.tickvals||x6.realaxis.tickvals.dflt);l("tickvals",p)}y6.isTypedArray(f.tickvals)&&(f.tickvals=Array.from(f.tickvals));var v,m,g,w,b=i.font||{};h&&(v=l("color"),m=v===c.color?v:b.color,g=b.size,w=b.family),zCr(c,f,l,f.type,{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noAng:!d,noExp:!0,font:{color:m,size:g,family:w}}),y6.coerce2(e,t,x6,s+".ticklen"),y6.coerce2(e,t,x6,s+".tickwidth"),y6.coerce2(e,t,x6,s+".tickcolor",t.color);var _=l("ticks");_||(delete t[s].ticklen,delete t[s].tickwidth,delete t[s].tickcolor),BCr(c,f,l,{dfltColor:v,bgColor:i.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:x6[s]}),l("layer")}l("hoverformat"),delete f.type,f._input=c}}nvt.exports=function(t,r,i){PCr(t,r,i,{noUirevision:!0,type:dse.name,attributes:x6,handleDefaults:NCr,font:r.font,paper_bgcolor:r.paper_bgcolor,fullData:i,layoutOut:r})};function UCr(e,t){var r={};return function(i){var n=t?t(i):i;if(n in r)return r[n];var a=e(i);return r[n]=a,a}}});var fvt=W((Qni,cvt)=>{"use strict";var VCr=_c().getSubplotCalcData,GCr=it().counterRegex,HCr=tse(),svt=fse(),lvt=svt.attr,E3=svt.name,ovt=GCr(E3),uvt={};uvt[lvt]={valType:"subplotid",dflt:E3,editType:"calc"};function jCr(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots[E3],n=0;n<i.length;n++){var a=i[n],o=VCr(r,E3,a),s=t[a]._subplot;s||(s=HCr(e,a,!0),t[a]._subplot=s),s.plot(o,t,e._promises)}}function $Cr(e,t,r,i){for(var n=i._subplots[E3]||[],a=0;a<n.length;a++){var o=n[a],s=i[o]._subplot;if(!t[o]&&s){s.framework.remove();for(var l in s.clipPaths)s.clipPaths[l].remove()}}}cvt.exports={attr:lvt,name:E3,idRoot:E3,idRegex:ovt,attrRegex:ovt,attributes:uvt,layoutAttributes:hse(),supplyLayoutDefaults:avt(),plot:jCr,clean:$Cr,toSVG:dl().toSVG}});var pse=W((eai,dvt)=>{"use strict";var{hovertemplateAttrs:WCr,texttemplateAttrs:YCr,templatefallbackAttrs:hvt}=Ga(),JO=tn().extendFlat,XCr=g1(),H0=Ns(),ZCr=Wa(),_6=H0.line;dvt.exports={mode:H0.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:H0.text,texttemplate:YCr({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:hvt({editType:"plot"}),hovertext:H0.hovertext,line:{color:_6.color,width:_6.width,dash:_6.dash,backoff:_6.backoff,shape:JO({},_6.shape,{values:["linear","spline"]}),smoothing:_6.smoothing,editType:"calc"},connectgaps:H0.connectgaps,marker:H0.marker,cliponaxis:JO({},H0.cliponaxis,{dflt:!1}),textposition:H0.textposition,textfont:H0.textfont,fill:JO({},H0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:XCr(),hoverinfo:JO({},ZCr.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:H0.hoveron,hovertemplate:WCr(),hovertemplatefallback:hvt(),selected:H0.selected,unselected:H0.unselected}});var gvt=W((tai,vvt)=>{"use strict";var QO=it(),b6=$o(),KCr=bd(),JCr=jp(),pvt=Nw(),QCr=$p(),eDr=y1(),tDr=v1().PTS_LINESONLY,rDr=pse();vvt.exports=function(t,r,i,n){function a(l,u){return QO.coerce(t,r,rDr,l,u)}var o=iDr(t,r,n,a);if(!o){r.visible=!1;return}a("mode",o<tDr?"lines+markers":"lines"),a("text"),a("hovertext"),r.hoveron!=="fills"&&(a("hovertemplate"),a("hovertemplatefallback")),b6.hasMarkers(r)&&KCr(t,r,i,n,a,{gradient:!0}),b6.hasLines(r)&&(JCr(t,r,i,n,a,{backoff:!0}),pvt(t,r,a),a("connectgaps")),b6.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),QCr(t,r,n,a));var s=[];(b6.hasMarkers(r)||b6.hasText(r))&&(a("cliponaxis"),a("marker.maxdisplayed"),s.push("points")),a("fill"),r.fill!=="none"&&(eDr(t,r,i,a),b6.hasLines(r)||pvt(t,r,a)),(r.fill==="tonext"||r.fill==="toself")&&s.push("fills"),a("hoveron",s.join("+")||"points"),QO.coerceSelectionMarkerOpacity(r,a)};function iDr(e,t,r,i){var n=i("real"),a=i("imag"),o;return n&&a&&(o=Math.min(n.length,a.length)),QO.isTypedArray(n)&&(t.real=n=Array.from(n)),QO.isTypedArray(a)&&(t.imag=a=Array.from(a)),t._length=o,o}});var xvt=W((rai,yvt)=>{"use strict";var mvt=ji();yvt.exports=function(t,r,i){var n={},a=i[r.subplot]._subplot;return n.realLabel=mvt.tickText(a.radialAxis,t.real,!0).text,n.imagLabel=mvt.tickText(a.angularAxis,t.imag,!0).text,n}});var wvt=W((iai,bvt)=>{"use strict";var _vt=sn(),nDr=Kn().BADNUM,aDr=wd(),oDr=x1(),sDr=w0(),lDr=Td().calcMarkerSize;bvt.exports=function(t,r){for(var i=t._fullLayout,n=r.subplot,a=i[n].realaxis,o=i[n].imaginaryaxis,s=a.makeCalcdata(r,"real"),l=o.makeCalcdata(r,"imag"),u=r._length,c=new Array(u),f=0;f<u;f++){var h=s[f],d=l[f],p=c[f]={};_vt(h)&&_vt(d)?(p.real=h,p.imag=d):p.real=nDr}return lDr(r,u),aDr(t,r),oDr(c,r),sDr(c,r),c}});var Mvt=W((nai,Avt)=>{"use strict";var uDr=$w(),Tvt=Kn().BADNUM,cDr=Qoe(),fDr=cDr.smith;Avt.exports=function(t,r,i){for(var n=r.layers.frontplot.select("g.scatterlayer"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=0;l<i.length;l++)for(var u=i[l],c=0;c<u.length;c++){c===0&&(u[0].trace._xA=a,u[0].trace._yA=o);var f=u[c],h=f.real;if(h===Tvt)f.x=f.y=Tvt;else{var d=fDr([h,f.imag]);f.x=d[0],f.y=d[1]}}uDr(t,s,i,n)}});var kvt=W((aai,Evt)=>{"use strict";var hDr=Zw();function dDr(e,t,r,i){var n=hDr(e,t,r,i);if(!(!n||n[0].index===!1)){var a=n[0];if(a.index===void 0)return n;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,Svt(s,l,o,a),a.hovertemplate=l.hovertemplate,n}}function Svt(e,t,r,i){var n=r.radialAxis,a=r.angularAxis;n._hovertitle="real",a._hovertitle="imag";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);i.realLabel=s.realLabel,i.imagLabel=s.imagLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,d){u.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["real","imag","text"]),f.indexOf("real")!==-1&&c(n,i.realLabel),f.indexOf("imag")!==-1&&c(a,i.imagLabel),f.indexOf("text")!==-1&&i.text&&(u.push(i.text),delete i.text),i.extraText=u.join("<br>")}}Evt.exports={hoverPoints:dDr,makeHoverPointText:Svt}});var Dvt=W((oai,Cvt)=>{"use strict";Cvt.exports={moduleType:"trace",name:"scattersmith",basePlotModule:fvt(),categories:["smith","symbols","showLegend","scatter-like"],attributes:pse(),supplyDefaults:gvt(),colorbar:Ac(),formatLabels:xvt(),calc:wvt(),plot:Mvt(),style:th().style,styleOnSelect:th().styleOnSelect,hoverPoints:kvt().hoverPoints,selectPoints:w_(),meta:{}}});var Lvt=W((sai,Fvt)=>{"use strict";Fvt.exports=Dvt()});var gse=W((lai,Pvt)=>{"use strict";var pDr=Wa(),vDr=Ga().hovertemplateAttrs,eN=_s().axisHoverFormat,vse=tn().extendFlat,gDr=Eo(),mDr=Du().dash,yDr=qy(),k3=Ns(),xDr={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:k3.x0,dx:k3.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:k3.y0,dy:k3.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},arrowref:{valType:"enumerated",values:["paper","data"],dflt:"data",editType:"calc"},lengthmode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},lengthfactor:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:eN("x"),yhoverformat:eN("y"),uhoverformat:eN("u","noDate"),vhoverformat:eN("v","noDate"),hoverinfo:vse({},pDr.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:vDr({},{keys:["x","y","u","v","text","name"]}),text:k3.text,textposition:k3.textposition,textfont:k3.textfont,marker:vse({arrowsize:vse({},yDr.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:mDr,editType:"style"},editType:"calc"},gDr("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}};Pvt.exports=xDr});var Rvt=W((uai,Ivt)=>{"use strict";var W8=it(),_Dr=gse(),bDr=x_(),wDr=bc().hasColorscale,TDr=Fu();Ivt.exports=function(t,r,i,n){function a(p,v){return W8.coerce(t,r,_Dr,p,v)}var o=bDr(t,r,n,a);if(!o){r.visible=!1;return}var s=a("u"),l=a("v");if(!W8.isArrayOrTypedArray(s)||s.length===0){r.u=new Array(o);for(var u=0;u<o;u++)r.u[u]=0}if(!W8.isArrayOrTypedArray(l)||l.length===0){r.v=new Array(o);for(var c=0;c<o;c++)r.v[c]=0}a("arrowref"),a("lengthmode"),a("lengthfactor"),a("anchor"),a("marker.arrowsize"),a("marker.line.width"),a("marker.line.dash"),a("text"),a("textposition"),W8.coerceFont(a,"textfont",n.font),a("hovertemplate"),a("xhoverformat"),a("yhoverformat"),a("uhoverformat"),a("vhoverformat"),r.marker||(r.marker={}),a("marker.color",i);var f=wDr(t,"marker")||(t.marker||{}).coloraxis;r._hasColorscale=!!f,f&&TDr(t,r,n,a,{prefix:"marker.",cLetter:"c"});var h=r.marker.line||{},d=r.marker.color;r.line={width:h.width,color:W8.isArrayOrTypedArray(d)?i:d,dash:h.dash},a("selected.marker.color"),a("selected.marker.line.width"),a("selected.textfont.color"),a("unselected.marker.color"),a("unselected.marker.line.width"),a("unselected.textfont.color")}});var qvt=W((cai,Bvt)=>{"use strict";var jm=it(),w6=ji(),Y8=sn(),zvt=Kn().BADNUM,ADr=Zc(),MDr=w0(),SDr=.97;Bvt.exports=function(t,r){let i=r._xA=w6.getFromId(t,r.xaxis||"x","x"),n=r._yA=w6.getFromId(t,r.yaxis||"y","y"),a=i.makeCalcdata(r,"x"),o=n.makeCalcdata(r,"y"),s=Math.min(a.length,o.length);r._length=s;let l=new Array(s);var u=1/0,c=-1/0,f=1/0,h=-1/0;let d=r.marker.color,p=jm.isArrayOrTypedArray(d),v=r.u||[],m=r.v||[],{anchor:g,lengthmode:w,arrowref:b}=r,_=g==="tip",M=g==="center";for(var x=1/0,T=-1/0,A=1/0,y=-1/0,E=1/0,S=-1/0,C=1/0,k=-1/0,D=0,F=0;F<s;F++){var P=l[F]={i:F},R=Y8(a[F]),L=Y8(o[F]),I,B;if(Y8(v[F])&&Y8(m[F])?(I=P._u=+v[F],B=P._v=+m[F]):(I=P._u=0,B=P._v=0),R&&L){D++,P.x=a[F],P.y=o[F],a[F]<x&&(x=a[F]),a[F]>T&&(T=a[F]),o[F]<A&&(A=o[F]),o[F]>y&&(y=o[F]),I<E&&(E=I),I>S&&(S=I),B<C&&(C=B),B>k&&(k=B);var O=Math.sqrt(I*I+B*B);if(O>c&&(c=O),O<u&&(u=O),p){var $=d[F];P.mc=$,Y8($)&&($<f&&(f=$),$>h&&(h=$))}}else P.x=zvt,P.y=zvt}if(r._maxNorm=c,w==="scaled"||b==="paper"){let H=T-x,G=y-A;var Y;H===0&&G===0?Y=1:Y=(H+G+Math.sqrt((H-G)*(H-G)+4*D*H*G))/(2*(D-1)),Y*=SDr,r._scaleFactor=Y/r._maxNorm}else r._scaleFactor=1;r._scaleFactor*=r.lengthfactor;let K=new Array(s),j=new Array(s),q=new Array(s),J=new Array(s);for(var U,V,F=0;F<s;F++){var P=l[F];U=P._u*r._scaleFactor,V=P._v*r._scaleFactor,_?(K[F]=P.x,j[F]=P.y,q[F]=P.x-U,J[F]=P.y-V):M?(K[F]=P.x+U/2,j[F]=P.y+V/2,q[F]=P.x-U/2,J[F]=P.y-V/2):(K[F]=P.x+U,j[F]=P.y+V,q[F]=P.x,J[F]=P.y)}if(b==="data"?(r._extremes[i._id]=w6.findExtremes(i,K.concat(q),{padded:!0}),r._extremes[n._id]=w6.findExtremes(n,j.concat(J),{padded:!0})):(r._extremes[i._id]=w6.findExtremes(i,K.concat(q),{padded:!0}),r._extremes[n._id]=w6.findExtremes(n,j.concat(J),{padded:!0})),i._minDtick=0,n._minDtick=0,jm.mergeArray(r.text,l,"tx"),jm.mergeArray(r.textposition,l,"tp"),r.textfont&&(jm.mergeArrayCastPositive(r.textfont.size,l,"ts"),jm.mergeArray(r.textfont.color,l,"tc"),jm.mergeArray(r.textfont.family,l,"tf"),jm.mergeArray(r.textfont.weight,l,"tw"),jm.mergeArray(r.textfont.style,l,"ty"),jm.mergeArray(r.textfont.variant,l,"tv")),r._hasColorscale){var X=p?[f,h]:[u,c];(!isFinite(X[0])||!isFinite(X[1]))&&(X=[0,1]),ADr(t,r,{vals:X,containerStr:"marker",cLetter:"c"})}return MDr(l,r),l}});var Nvt=W((fai,Ovt)=>{"use strict";Ovt.exports=function(t,r){}});var tN=W((hai,Gvt)=>{"use strict";var mse=vi(),Uvt=it(),X8=Ji(),EDr=Jo(),kDr=kg().DESELECTDIM;function yse(e,t){var r=t.marker||{},i=EDr.makeColorScaleFuncFromTrace(r);e.style("stroke",function(n){var a=r.color,o;if(Uvt.isArrayOrTypedArray(a)&&a.length>n.i&&isFinite(a[n.i]))o=a[n.i];else{var s=t.u&&t.u[n.i]||0,l=t.v&&t.v[n.i]||0;o=Math.sqrt(s*s+l*l)}return n.mcc=i(o),n.mcc})}function CDr(e){var t=mse.select(e).selectAll("g.trace.quiver");t.each(function(r){Vvt(e,r,mse.select(this))})}function DDr(e,t,r){Vvt(e,t,r)}function Vvt(e,t,r){var i=t[0].trace,n=i.marker||{},a=n.line||{},o=Uvt.isArrayOrTypedArray(n.color)?void 0:n.color,s=i._hasColorscale;if(r)if(i.selectedpoints){var l=(i.selected||{}).marker||{},u=(i.unselected||{}).marker||{},c=l.line||{},f=u.line||{};r.selectAll("path.js-line").each(function(d){var p=mse.select(this),v=!d.selected,m=v?u.color:l.color,g=v?f.width!==void 0?f.width:a.width:c.width!==void 0?c.width:a.width;m?(X8.lineGroupStyle(p,g,m,a.dash),p.style("stroke-opacity",1)):(X8.lineGroupStyle(p,g,o,a.dash),s&&yse(p,i),p.style("stroke-opacity",v?kDr:1))}),X8.selectedTextStyle(r.selectAll("text"),i)}else{var h=r.selectAll("path.js-line");h.call(X8.lineGroupStyle,a.width,o,a.dash),s&&yse(h,i),h.style("stroke-opacity",1),X8.textPointStyle(r.selectAll("text"),i,e)}}Gvt.exports={style:CDr,styleOnSelect:DDr,colorscaleStroke:yse}});var $vt=W((dai,jvt)=>{"use strict";var kv=vi(),FDr=it(),Z8=Ji(),LDr=tN().colorscaleStroke,rN=Math.PI/12,PDr=5.8,IDr=1.5,RDr=.7;jvt.exports=function(t,r,i,n,a,o){var s,l,u=!a,c=!!a&&a.duration>0;if(s=n.selectAll("g.trace").data(i,function(h){return h[0].trace.uid}),s.enter().append("g").attr("class",function(h){return"trace quiver trace"+h[0].trace.uid}).style("stroke-miterlimit",2),s.order(),c){o&&(l=o());var f=kv.transition().duration(a.duration).ease(a.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});f.each(function(){n.selectAll("g.trace").each(function(h,d){Hvt(t,d,r,h,i,this,a)})})}else s.each(function(h,d){Hvt(t,d,r,h,i,this,a)});u&&s.exit().remove()};function Hvt(e,t,r,i,n,a,o){var s=i[0].trace,l=r.xaxis,u=r.yaxis;i[0][r.isRangePlot?"nodeRangePlot3":"node3"]=kv.select(a);var c=kv.select(a).selectAll("g.lines").data([i]);c.enter().append("g").classed("lines",!0),Z8.setClipUrl(c,r.layerClipId,e);var f=c.selectAll("path.js-line").data(i);f.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),f.exit().remove();let{anchor:h,maxNorm:d=0,arrowref:p}=s,v=p==="paper"?s._scaleFactor*Math.sqrt(Math.abs(l._m*u._m)):s._scaleFactor,m=s.marker.arrowsize;f.each(function(T){let A=kv.select(this);if(T.x===void 0||T.y===void 0){A.attr("d",null);return}let y=(p==="paper"?T._u*Math.sign(l._m):kv.round(l._m*T._u))*v,E=(p==="paper"?T._v*Math.sign(u._m):kv.round(u._m*T._v))*v,S=(s._input.marker||{}).arrowsize!==void 0;var C,k,D,F;h==="tip"?(C=l.c2p(T.x)-y,D=u.c2p(T.y)-E,k=l.c2p(T.x),F=u.c2p(T.y)):h==="center"?(C=l.c2p(T.x)-y/2,D=u.c2p(T.y)-E/2,k=l.c2p(T.x)+y/2,F=u.c2p(T.y)+E/2):(C=l.c2p(T.x),D=u.c2p(T.y),k=l.c2p(T.x)+y,F=u.c2p(T.y)+E),T._px0=C,T._py0=D,T._px1=k,T._py1=F;var P=s.marker.line.width;S||(P=Math.max(P,IDr));let R=Math.sqrt((k-C)*(k-C)+(F-D)*(F-D)),L=RDr*R,I=Math.min(PDr*m*P,L),B=Math.atan2(F-D,k-C),O=k-I*Math.cos(B-rN),$=F-I*Math.sin(B-rN),Y=k-I*Math.cos(B+rN),K=F-I*Math.sin(B+rN),j="M"+C+","+D+"L"+k+","+F+"L"+O+","+$+"L"+k+","+F+"L"+Y+","+K;A.attr("d",j)});var g=s.marker||{},w=g.line||{},b=FDr.isArrayOrTypedArray(g.color)?void 0:g.color;Z8.lineGroupStyle(f,w.width,b,w.dash),s._hasColorscale&&LDr(f,s);var _=kv.select(a).selectAll("g.text").data([i]);_.enter().append("g").classed("text",!0),Z8.setClipUrl(_,r.layerClipId,e);var M=_.selectAll("g.textpoint").data(i);if(M.enter().append("g").classed("textpoint",!0).append("text"),M.exit().remove(),M.each(function(T){var A=kv.select(this),y=Z8.translatePoint(T,A.select("text"),l,u);y||A.remove()}),M.selectAll("text").call(Z8.textPointStyle,s,e).each(function(T){var A=l.c2p(T.x),y=u.c2p(T.y);kv.select(this).selectAll("tspan.line").each(function(){kv.select(this).attr({x:A,y})})}),o&&o.duration>0){var x=kv.transition().duration(o.duration).ease(o.easing);f.transition(x).style("opacity",1)}}});var Xvt=W((pai,Yvt)=>{"use strict";var Wvt=it(),zDr=Ds(),BDr=Xw();function qDr(e,t,r,i,n,a){let o=n-r,s=a-i,l=o*o+s*s;if(!l)return Math.sqrt((e-r)*(e-r)+(t-i)*(t-i));var u=((e-r)*o+(t-i)*s)/l;u=Math.max(0,Math.min(1,u));let c=r+u*o,f=i+u*s;return Math.sqrt((e-c)*(e-c)+(t-f)*(t-f))}Yvt.exports=function(t,r,i,n){var a=t.cd,o=a[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(i),f=function(b){return b._px0===void 0?1/0:qDr(u,c,b._px0,b._py0,b._px1,b._py1)};if(zDr.getClosest(a,f,t),t.index!==!1){var h=a[t.index],d=s.c2p(h.x,!0),p=l.c2p(h.y,!0),v=Math.sqrt((u-d)*(u-d)+(c-p)*(c-p));t.index=h.i;var m=o.u?o.u[h.i]:0,g=o.v?o.v[h.i]:0,w="u: "+m+", v: "+g;return Wvt.extendFlat(t,{color:BDr(o,h),x0:d-3,x1:d+3,xLabelVal:h.x,y0:p-3,y1:p+3,yLabelVal:h.y,uLabelVal:m,vLabelVal:g,extraText:w,spikeDistance:v,hovertemplate:o.hovertemplate}),Wvt.fillText(h,o,t),[t]}}});var Jvt=W((vai,Kvt)=>{"use strict";var iN=ji(),Zvt=it();Kvt.exports=function(t,r,i){var n={},a={_fullLayout:i},o=iN.getFromTrace(a,r,"x"),s=iN.getFromTrace(a,r,"y"),l=t.x,u=t.y;n.xLabel=iN.tickText(o,o.c2l(l),!0).text,n.yLabel=iN.tickText(s,s.c2l(u),!0).text;var c=r.u?r.u[t.i]:0,f=r.v?r.v[t.i]:0,h=r.uhoverformat,d=r.vhoverformat;return n.uLabel=h?Zvt.numberFormat(h)(c):String(c),n.vLabel=d?Zvt.numberFormat(d)(f):String(f),n}});var e1t=W((gai,Qvt)=>{"use strict";Qvt.exports=function(t,r,i,n,a){return t.x=r.x,t.y=r.y,t.u=i.u?i.u[a]:void 0,t.v=i.v?i.v[a]:void 0,t}});var r1t=W((mai,t1t)=>{"use strict";t1t.exports={moduleType:"trace",name:"quiver",basePlotModule:dl(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:gse(),supplyDefaults:Rvt(),calc:qvt(),crossTraceCalc:Nvt(),plot:$vt(),style:tN().style,styleOnSelect:tN().styleOnSelect,hoverPoints:Xvt(),formatLabels:Jvt(),eventData:e1t(),selectPoints:w_(),colorbar:Ac(),animatable:!0,meta:{}}});var n1t=W((yai,i1t)=>{"use strict";i1t.exports=r1t()});var ff=W((xai,o1t)=>{var aN=qu();function a1t(){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={}}aN(a1t.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,i,n){return i=(e!=null&&e.year?e.calendar():typeof i=="string"?this.instance(i,n):i)||this.instance(),i.newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,function(r){return e[r]})}},substituteChineseDigits:function(e,t){return function(r){for(var i="",n=0;r>0;){var a=r%10;i=(a===0?"":e[a]+t[n])+i,n++,r=Math.floor(r/10)}return i.indexOf(e[1]+t[1])===0&&(i=i.substr(1)),i||e[0]}}});function xse(e,t,r,i){if(this._calendar=e,this._year=t,this._month=r,this._day=i,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(ua.local.invalidDate||ua.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function nN(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}aN(xse.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e==null?this:e,t,r)},year:function(e){return arguments.length===0?this._year:this.set(e,"y")},month:function(e){return arguments.length===0?this._month:this.set(e,"m")},day:function(e){return arguments.length===0?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(ua.local.invalidDate||ua.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(ua.local.differentCalendars||ua.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return t===0?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+nN(Math.abs(this.year()),4)+"-"+nN(this.month(),2)+"-"+nN(this.day(),2)}});function _se(){this.shortYearCutoff="+10"}aN(_se.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,ua.local.invalidDate||ua.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new xse(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,ua.local.invalidYear||ua.regionalOptions[""].invalidYear);return t.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,ua.local.invalidYear||ua.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+nN(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,ua.local.invalidYear||ua.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,ua.local.invalidMonth||ua.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,ua.local.invalidMonth||ua.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,ua.local.invalidYear||ua.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var i=this._validate(e,t,r,ua.local.invalidDate||ua.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(e,t,r){var i=this._validate(e,t,r,ua.local.invalidDate||ua.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,ua.local.invalidDate||ua.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,ua.local.invalidDate||ua.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,r==="d"||r==="w"){var i=e.toJD()+t*(r==="w"?this.daysInWeek():1),n=e.calendar().fromJD(i);return this._validateLevel--,[n.year(),n.month(),n.day()]}try{var a=e.year()+(r==="y"?t:0),o=e.monthOfYear()+(r==="m"?t:0),n=e.day(),s=function(c){for(;o<c.minMonth;)a--,o+=c.monthsInYear(a);for(var f=c.monthsInYear(a);o>f-1+c.minMonth;)a++,o-=f,f=c.monthsInYear(a)};r==="y"?(e.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),n=Math.min(n,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):r==="m"&&(s(this),n=Math.min(n,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var l=[a,this.fromMonthOfYear(a,o),n];return this._validateLevel--,l}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,t,r,i){if(!this.hasYearZero&&(i==="y"||i==="m")&&(t[0]===0||e.year()>0!=t[0]>0)){var n={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[i],a=r<0?-1:1;t=this._add(e,r*n[0]+a*n[1],n[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,ua.local.invalidDate||ua.regionalOptions[""].invalidDate);var i=r==="y"?t:e.year(),n=r==="m"?t:e.month(),a=r==="d"?t:e.day();return(r==="y"||r==="m")&&(a=Math.min(a,this.daysInMonth(i,n))),e.date(i,n,a)},isValid:function(e,t,r){this._validateLevel++;var i=this.hasYearZero||e!==0;if(i){var n=this.newDate(e,t,this.minDay);i=t>=this.minMonth&&t-this.minMonth<this.monthsInYear(n)&&r>=this.minDay&&r-this.minDay<this.daysInMonth(n)}return this._validateLevel--,i},toJSDate:function(e,t,r){var i=this._validate(e,t,r,ua.local.invalidDate||ua.regionalOptions[""].invalidDate);return ua.instance().fromJD(this.toJD(i)).toJSDate()},fromJSDate:function(e){return this.fromJD(ua.instance().fromJSDate(e).toJD())},_validate:function(e,t,r,i){if(e.year){if(this._validateLevel===0&&this.name!==e.calendar().name)throw(ua.local.differentCalendars||ua.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,e.calendar().local.name);return e}try{if(this._validateLevel++,this._validateLevel===1&&!this.isValid(e,t,r))throw i.replace(/\{0\}/,this.local.name);var n=this.newDate(e,t,r);return this._validateLevel--,n}catch(a){throw this._validateLevel--,a}}});function bse(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}bse.prototype=new _se;aN(bse.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(r){var t=this._validate(r,this.minMonth,this.minDay,ua.local.invalidYear||ua.regionalOptions[""].invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===0&&(r%100!==0||r%400===0)},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(4-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,ua.local.invalidMonth||ua.regionalOptions[""].invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var i=this._validate(e,t,r,ua.local.invalidDate||ua.regionalOptions[""].invalidDate);e=i.year(),t=i.month(),r=i.day(),e<0&&e++,t<3&&(t+=12,e--);var n=Math.floor(e/100),a=2-n+Math.floor(n/4);return Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r+a-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=Math.floor((t-186721625e-2)/36524.25);r=t+1+r-Math.floor(r/4);var i=r+1524,n=Math.floor((i-122.1)/365.25),a=Math.floor(365.25*n),o=Math.floor((i-a)/30.6001),s=i-a-Math.floor(o*30.6001),l=o-(o>13.5?13:1),u=n-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(e,t,r){var i=this._validate(e,t,r,ua.local.invalidDate||ua.regionalOptions[""].invalidDate),n=new Date(i.year(),i.month()-1,i.day());return n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),n.setHours(n.getHours()>12?n.getHours()+2:0),n},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var ua=o1t.exports=new a1t;ua.cdate=xse;ua.baseCalendar=_se;ua.calendars.gregorian=bse});var s1t=W(()=>{var wse=qu(),hc=ff();wse(hc.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"});hc.local=hc.regionalOptions[""];wse(hc.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});wse(hc.baseCalendar.prototype,{UNIX_EPOCH:hc.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:hc.instance().jdEpoch,TICKS_PER_DAY:1440*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(e,t,r){if(typeof e!="string"&&(r=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw hc.local.invalidFormat||hc.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,r=r||{};for(var i=r.dayNamesShort||this.local.dayNamesShort,n=r.dayNames||this.local.dayNames,a=r.monthNumbers||this.local.monthNumbers,o=r.monthNamesShort||this.local.monthNamesShort,s=r.monthNames||this.local.monthNames,l=r.calculateWeek||this.local.calculateWeek,u=function(_,M){for(var x=1;b+x<e.length&&e.charAt(b+x)===_;)x++;return b+=x-1,Math.floor(x/(M||1))>1},c=function(_,M,x,T){var A=""+M;if(u(_,T))for(;A.length<x;)A="0"+A;return A},f=function(_,M,x,T){return u(_)?T[M]:x[M]},h=this,d=function(_){return typeof a=="function"?a.call(h,_,u("m")):m(c("m",_.month(),2))},p=function(_,M){return M?typeof s=="function"?s.call(h,_):s[_.month()-h.minMonth]:typeof o=="function"?o.call(h,_):o[_.month()-h.minMonth]},v=this.local.digits,m=function(_){return r.localNumbers&&v?v(_):_},g="",w=!1,b=0;b<e.length;b++)if(w)e.charAt(b)==="'"&&!u("'")?w=!1:g+=e.charAt(b);else switch(e.charAt(b)){case"d":g+=m(c("d",t.day(),2));break;case"D":g+=f("D",t.dayOfWeek(),i,n);break;case"o":g+=c("o",t.dayOfYear(),3);break;case"w":g+=c("w",t.weekOfYear(),2);break;case"m":g+=d(t);break;case"M":g+=p(t,u("M"));break;case"y":g+=u("y",2)?t.year():(t.year()%100<10?"0":"")+t.year()%100;break;case"Y":u("Y",2),g+=t.formatYear();break;case"J":g+=t.toJD();break;case"@":g+=(t.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":g+=(t.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":u("'")?g+="'":w=!0;break;default:g+=e.charAt(b)}return g},parseDate:function(e,t,r){if(t==null)throw hc.local.invalidArguments||hc.regionalOptions[""].invalidArguments;if(t=typeof t=="object"?t.toString():t+"",t==="")return null;e=e||this.local.dateFormat,r=r||{};var i=r.shortYearCutoff||this.shortYearCutoff;i=typeof i!="string"?i:this.today().year()%100+parseInt(i,10);for(var n=r.dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,o=r.parseMonth||this.local.parseMonth,s=r.monthNumbers||this.local.monthNumbers,l=r.monthNamesShort||this.local.monthNamesShort,u=r.monthNames||this.local.monthNames,c=-1,f=-1,h=-1,d=-1,p=-1,v=!1,m=!1,g=function(C,k){for(var D=1;y+D<e.length&&e.charAt(y+D)===C;)D++;return y+=D-1,Math.floor(D/(k||1))>1},w=function(C,k){var D=g(C,k),F=[2,3,D?4:2,D?4:2,10,11,20]["oyYJ@!".indexOf(C)+1],P=new RegExp("^-?\\d{1,"+F+"}"),R=t.substring(A).match(P);if(!R)throw(hc.local.missingNumberAt||hc.regionalOptions[""].missingNumberAt).replace(/\{0\}/,A);return A+=R[0].length,parseInt(R[0],10)},b=this,_=function(){if(typeof s=="function"){g("m");var C=s.call(b,t.substring(A));return A+=C.length,C}return w("m")},M=function(C,k,D,F){for(var P=g(C,F)?D:k,R=0;R<P.length;R++)if(t.substr(A,P[R].length).toLowerCase()===P[R].toLowerCase())return A+=P[R].length,R+b.minMonth;throw(hc.local.unknownNameAt||hc.regionalOptions[""].unknownNameAt).replace(/\{0\}/,A)},x=function(){if(typeof u=="function"){var C=g("M")?u.call(b,t.substring(A)):l.call(b,t.substring(A));return A+=C.length,C}return M("M",l,u)},T=function(){if(t.charAt(A)!==e.charAt(y))throw(hc.local.unexpectedLiteralAt||hc.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,A);A++},A=0,y=0;y<e.length;y++)if(m)e.charAt(y)==="'"&&!g("'")?m=!1:T();else switch(e.charAt(y)){case"d":d=w("d");break;case"D":M("D",n,a);break;case"o":p=w("o");break;case"w":w("w");break;case"m":h=_();break;case"M":h=x();break;case"y":var E=y;v=!g("y",2),y=E,f=w("y",2);break;case"Y":f=w("Y",2);break;case"J":c=w("J")+.5,t.charAt(A)==="."&&(A++,w("J"));break;case"@":c=w("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":c=w("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":A=t.length;break;case"'":g("'")?T():m=!0;break;default:T()}if(A<t.length)throw hc.local.unexpectedText||hc.regionalOptions[""].unexpectedText;if(f===-1?f=this.today().year():f<100&&v&&(f+=i===-1?1900:this.today().year()-this.today().year()%100-(f<=i?0:100)),typeof h=="string"&&(h=o.call(this,f,h)),p>-1){h=1,d=p;for(var S=this.daysInMonth(f,h);d>S;S=this.daysInMonth(f,h))h++,d-=S}return c>-1?this.fromJD(c):this.newDate(f,h,d)},determineDate:function(e,t,r,i,n){r&&typeof r!="object"&&(n=i,i=r,r=null),typeof i!="string"&&(n=i,i="");var a=this,o=function(s){try{return a.parseDate(i,s,n)}catch(f){}s=s.toLowerCase();for(var l=(s.match(/^c/)&&r?r.newDate():null)||a.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=u.exec(s);c;)l.add(parseInt(c[1],10),c[2]||"d"),c=u.exec(s);return l};return t=t?t.newDate():null,e=e==null?t:typeof e=="string"?o(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?t:a.today().add(e,"d"):a.newDate(e),e}})});var l1t=W(()=>{var yx=ff(),ODr=qu(),Tse=yx.instance();function oN(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}oN.prototype=new yx.baseCalendar;ODr(oN.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if(typeof e=="string"){var r=e.match(UDr);return r?r[0]:""}var i=this._validateYear(e),n=e.month(),a=""+this.toChineseMonth(i,n);return t&&a.length<2&&(a="0"+a),this.isIntercalaryMonth(i,n)&&(a+="i"),a},monthNames:function(e){if(typeof e=="string"){var t=e.match(VDr);return t?t[0]:""}var r=this._validateYear(e),i=e.month(),n=this.toChineseMonth(r,i),a=["\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"][n-1];return this.isIntercalaryMonth(r,i)&&(a="\u95F0"+a),a},monthNamesShort:function(e){if(typeof e=="string"){var t=e.match(GDr);return t?t[0]:""}var r=this._validateYear(e),i=e.month(),n=this.toChineseMonth(r,i),a=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][n-1];return this.isIntercalaryMonth(r,i)&&(a="\u95F0"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var r=parseInt(t),i;if(isNaN(r))t[0]==="\u95F0"&&(i=!0,t=t.substring(1)),t[t.length-1]==="\u6708"&&(t=t.substring(0,t.length-1)),r=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(t);else{var n=t[t.length-1];i=n==="i"||n==="I"}var a=this.toMonthIndex(e,r,i);return a},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var i=this.intercalaryMonth(e),n=r&&t!==i;if(n||t<1||t>12)throw yx.local.invalidMonth.replace(/\{0\}/,this.local.name);var a;return i?!r&&t<=i?a=t-1:a=t:a=t-1,a},toChineseMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e),i=r?12:11;if(t<0||t>i)throw yx.local.invalidMonth.replace(/\{0\}/,this.local.name);var n;return r?t<r?n=t+1:n=t:n=t+1,n},intercalaryMonth:function(e){e=this._validateYear(e);var t=xx[e-xx[0]],r=t>>13;return r},isIntercalaryMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,t,r){var i=this._validateYear(e,yx.local.invalidyear),n=_x[i-_x[0]],a=n>>9&4095,o=n>>5&15,s=n&31,l;l=Tse.newDate(a,o,s),l.add(4-(l.dayOfWeek()||7),"d");var u=this.toJD(e,t,r)-l.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var r=xx[e-xx[0]],i=r>>13,n=i?12:11;if(t>n)throw yx.local.invalidMonth.replace(/\{0\}/,this.local.name);var a=r&1<<12-t?30:29;return a},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var i=this._validate(e,a,r,yx.local.invalidDate);e=this._validateYear(i.year()),t=i.month(),r=i.day();var n=this.isIntercalaryMonth(e,t),a=this.toChineseMonth(e,t),o=jDr(e,a,r,n);return Tse.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=Tse.fromJD(e),r=HDr(t.year(),t.month(),t.day()),i=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,i,r.day)},fromString:function(e){var t=e.match(NDr),r=this._validateYear(+t[1]),i=+t[2],n=!!t[3],a=this.toMonthIndex(r,i,n),o=+t[4];return this.newDate(r,a,o)},add:function(e,t,r){var i=e.year(),n=e.month(),a=this.isIntercalaryMonth(i,n),o=this.toChineseMonth(i,n),s=Object.getPrototypeOf(oN.prototype).add.call(this,e,t,r);if(r==="y"){var l=s.year(),u=s.month(),c=this.isIntercalaryMonth(l,o),f=a&&c?this.toMonthIndex(l,o,!0):this.toMonthIndex(l,o,!1);f!==u&&s.month(f)}return s}});var NDr=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,UDr=/^\d?\d[iI]?/m,VDr=/^闰?十?[一二三四五六七八九]?月/m,GDr=/^闰?十?[一二三四五六七八九]?/m;yx.calendars.chinese=oN;var xx=[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],_x=[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 HDr(e,t,r,i){var n,a;if(typeof e=="object")n=e,a=t||{};else{var o=typeof e=="number"&&e>=1888&&e<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var s=typeof t=="number"&&t>=1&&t<=12;if(!s)throw new Error("Solar month outside range 1 - 12");var l=typeof r=="number"&&r>=1&&r<=31;if(!l)throw new Error("Solar day outside range 1 - 31");n={year:e,month:t,day:r},a=i||{}}var u=_x[n.year-_x[0]],c=n.year<<9|n.month<<5|n.day;a.year=c>=u?n.year:n.year-1,u=_x[a.year-_x[0]];var f=u>>9&4095,h=u>>5&15,d=u&31,p,v=new Date(f,h-1,d),m=new Date(n.year,n.month-1,n.day);p=Math.round((m-v)/(24*3600*1e3));var g=xx[a.year-xx[0]],w;for(w=0;w<13;w++){var b=g&1<<12-w?30:29;if(p<b)break;p-=b}var _=g>>13;return!_||w<_?(a.isIntercalary=!1,a.month=1+w):w===_?(a.isIntercalary=!0,a.month=w):(a.isIntercalary=!1,a.month=w),a.day=1+p,a}function jDr(e,t,r,i,n){var a,o;if(typeof e=="object")o=e,a=t||{};else{var s=typeof e=="number"&&e>=1888&&e<=2111;if(!s)throw new Error("Lunar year outside range 1888-2111");var l=typeof t=="number"&&t>=1&&t<=12;if(!l)throw new Error("Lunar month outside range 1 - 12");var u=typeof r=="number"&&r>=1&&r<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var c;typeof i=="object"?(c=!1,a=i):(c=!!i,a=n||{}),o={year:e,month:t,day:r,isIntercalary:c}}var f;f=o.day-1;var h=xx[o.year-xx[0]],d=h>>13,p;d&&(o.month>d||o.isIntercalary)?p=o.month:p=o.month-1;for(var v=0;v<p;v++){var m=h&1<<12-v?30:29;f+=m}var g=_x[o.year-_x[0]],w=g>>9&4095,b=g>>5&15,_=g&31,M=new Date(w,b-1,_+f);return a.year=M.getFullYear(),a.month=1+M.getMonth(),a.day=M.getDate(),a}});var u1t=W(()=>{var C3=ff(),$Dr=qu();function Ase(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Ase.prototype=new C3.baseCalendar;$Dr(Ase.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,C3.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,C3.local.invalidYear||C3.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,C3.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var i=this._validate(e,t,r,C3.local.invalidDate);return e=i.year(),e<0&&e++,i.day()+(i.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var i=Math.floor(t/30)+1,n=t-(i-1)*30+1;return this.newDate(r,i,n)}});C3.calendars.coptic=Ase});var c1t=W(()=>{var $m=ff(),WDr=qu();function Mse(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Mse.prototype=new $m.baseCalendar;WDr(Mse.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,$m.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,$m.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,$m.local.invalidYear),400},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,$m.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var i=this._validate(e,t,r,$m.local.invalidDate);return(i.day()+1)%8},weekDay:function(e,t,r){var i=this.dayOfWeek(e,t,r);return i>=2&&i<=6},extraInfo:function(e,t,r){var i=this._validate(e,t,r,$m.local.invalidDate);return{century:YDr[Math.floor((i.year()-1)/100)+1]||""}},toJD:function(e,t,r){var i=this._validate(e,t,r,$m.local.invalidDate);return e=i.year()+(i.year()<0?1:0),t=i.month(),r=i.day(),r+(t>1?16:0)+(t>2?(t-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=(t-1)*400,e+=e>15?16:0;var r=Math.floor(e/32)+1,i=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,i)}});var YDr={20:"Fruitbat",21:"Anchovy"};$m.calendars.discworld=Mse});var f1t=W(()=>{var D3=ff(),XDr=qu();function Sse(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Sse.prototype=new D3.baseCalendar;XDr(Sse.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,D3.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,D3.local.invalidYear||D3.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,D3.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var i=this._validate(e,t,r,D3.local.invalidDate);return e=i.year(),e<0&&e++,i.day()+(i.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var i=Math.floor(t/30)+1,n=t-(i-1)*30+1;return this.newDate(r,i,n)}});D3.calendars.ethiopian=Sse});var h1t=W(()=>{var bx=ff(),ZDr=qu();function Ese(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Ese.prototype=new bx.baseCalendar;ZDr(Ese.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,bx.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return e=e<0?e+1:e,sN(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,bx.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,bx.local.invalidYear);return e=t.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,bx.local.invalidMonth),t===12&&this.leapYear(e)||t===8&&sN(this.daysInYear(e),10)===5?30:t===9&&sN(this.daysInYear(e),10)===3?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},extraInfo:function(e,t,r){var i=this._validate(e,t,r,bx.local.invalidDate);return{yearType:(this.leapYear(i)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(i)%10-3]}},toJD:function(e,t,r){var i=this._validate(e,t,r,bx.local.invalidDate);e=i.year(),t=i.month(),r=i.day();var n=e<=0?e+1:e,a=this.jdEpoch+this._delay1(n)+this._delay2(n)+r+1;if(t<7){for(var o=7;o<=this.monthsInYear(e);o++)a+=this.daysInMonth(e,o);for(var o=1;o<t;o++)a+=this.daysInMonth(e,o)}else for(var o=7;o<t;o++)a+=this.daysInMonth(e,o);return a},_delay1:function(e){var t=Math.floor((235*e-234)/19),r=12084+13753*t,i=t*29+Math.floor(r/25920);return sN(3*(i+1),7)<3&&i++,i},_delay2:function(e){var t=this._delay1(e-1),r=this._delay1(e),i=this._delay1(e+1);return i-r===356?2:r-t===382?1:0},fromJD:function(e){e=Math.floor(e)+.5;for(var t=Math.floor((e-this.jdEpoch)*98496/35975351)-1;e>=this.toJD(t===-1?1:t+1,7,1);)t++;for(var r=e<this.toJD(t,1,1)?7:1;e>this.toJD(t,r,this.daysInMonth(t,r));)r++;var i=e-this.toJD(t,r,1)+1;return this.newDate(t,r,i)}});function sN(e,t){return e-t*Math.floor(e/t)}bx.calendars.hebrew=Ese});var d1t=W(()=>{var K8=ff(),KDr=qu();function kse(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}kse.prototype=new K8.baseCalendar;KDr(kse.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012Bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,K8.local.invalidYear);return(t.year()*11+14)%30<11},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,K8.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var i=this._validate(e,t,r,K8.local.invalidDate);return e=i.year(),t=i.month(),r=i.day(),e=e<=0?e+1:e,r+Math.ceil(29.5*(t-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),i=e-this.toJD(t,r,1)+1;return this.newDate(t,r,i)}});K8.calendars.islamic=kse});var p1t=W(()=>{var J8=ff(),JDr=qu();function Cse(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Cse.prototype=new J8.baseCalendar;JDr(Cse.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,J8.local.invalidYear),r=t.year()<0?t.year()+1:t.year();return r%4===0},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(4-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,J8.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var i=this._validate(e,t,r,J8.local.invalidDate);return e=i.year(),t=i.month(),r=i.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=t+1524,i=Math.floor((r-122.1)/365.25),n=Math.floor(365.25*i),a=Math.floor((r-n)/30.6001),o=a-Math.floor(a<14?1:13),s=i-Math.floor(o>2?4716:4715),l=r-n-Math.floor(30.6001*a);return s<=0&&s--,this.newDate(s,o,l)}});J8.calendars.julian=Cse});var g1t=W(()=>{var lp=ff(),QDr=qu();function Fse(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Fse.prototype=new lp.baseCalendar;QDr(Fse.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,lp.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,lp.local.invalidYear);e=t.year();var r=Math.floor(e/400);e=e%400,e+=e<0?400:0;var i=Math.floor(e/20);return r+"."+i+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var t=0,r=0;r<e.length;r++){var i=parseInt(e[r],10);if(Math.abs(i)>19||r>0&&i<0)throw"Invalid Mayan year";t=t*20+i}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,lp.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,lp.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,lp.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,lp.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var i=this._validate(e,t,r,lp.local.invalidDate);return i.day()},weekDay:function(e,t,r){return this._validate(e,t,r,lp.local.invalidDate),!0},extraInfo:function(e,t,r){var i=this._validate(e,t,r,lp.local.invalidDate),n=i.toJD(),a=this._toHaab(n),o=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){e-=this.jdEpoch;var t=Dse(e+8+340,365);return[Math.floor(t/20)+1,Dse(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[v1t(e+20,20),v1t(e+4,13)]},toJD:function(e,t,r){var i=this._validate(e,t,r,lp.local.invalidDate);return i.day()+i.month()*20+i.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e=e%360,e+=e<0?360:0;var r=Math.floor(e/20),i=e%20;return this.newDate(t,r,i)}});function Dse(e,t){return e-t*Math.floor(e/t)}function v1t(e,t){return Dse(e-1,t)+1}lp.calendars.mayan=Fse});var y1t=W(()=>{var F3=ff(),e7r=qu();function Lse(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Lse.prototype=new F3.baseCalendar;var m1t=F3.instance("gregorian");e7r(Lse.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,F3.local.invalidYear||F3.regionalOptions[""].invalidYear);return m1t.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(1-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,F3.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(n,t,r){var i=this._validate(n,t,r,F3.local.invalidMonth),n=i.year();n<0&&n++;for(var a=i.day(),o=1;o<i.month();o++)a+=this.daysPerMonth[o-1];return a+m1t.toJD(n+1468,3,13)},fromJD:function(e){e=Math.floor(e+.5);for(var t=Math.floor((e-(this.jdEpoch-1))/366);e>=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,i=1;r>this.daysInMonth(t,i);)r-=this.daysInMonth(t,i),i++;return this.newDate(t,i,r)}});F3.calendars.nanakshahi=Lse});var x1t=W(()=>{var L3=ff(),t7r=qu();function Pse(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Pse.prototype=new L3.baseCalendar;t7r(Pse.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,L3.local.invalidYear);if(e=t.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var r=0,i=this.minMonth;i<=12;i++)r+=this.NEPALI_CALENDAR_DATA[e][i];return r},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,L3.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},toJD:function(e,t,r){var i=this._validate(e,t,r,L3.local.invalidDate);e=i.year(),t=i.month(),r=i.day();var n=L3.instance(),a=0,o=t,s=e;this._createMissingCalendarData(e);var l=e-(o>9||o===9&&r>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(t!==9&&(a=r,o--);o!==9;)o<=0&&(o=12,s--),a+=this.NEPALI_CALENDAR_DATA[s][o],o--;return t===9?(a+=r-this.NEPALI_CALENDAR_DATA[s][0],a<0&&(a+=n.daysInYear(l))):a+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],n.newDate(l,1,1).add(a,"d").toJD()},fromJD:function(e){var t=L3.instance(),r=t.fromJD(e),i=r.year(),n=r.dayOfYear(),a=i+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;n>l;)o++,o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var u=this.NEPALI_CALENDAR_DATA[a][o]-(l-n);return this.newDate(a,o,u)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r<e+2;r++)typeof this.NEPALI_CALENDAR_DATA[r]=="undefined"&&(this.NEPALI_CALENDAR_DATA[r]=t)},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]}});L3.calendars.nepali=Pse});var _1t=W(()=>{var T6=ff(),r7r=qu();function uN(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function lN(e){var t=e-475;e<0&&t++;var r=.242197,i=r*t,n=r*(t+1),a=i-Math.floor(i),o=n-Math.floor(n);return a>o}uN.prototype=new T6.baseCalendar;r7r(uN.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,T6.local.invalidYear);return lN(t.year())},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-((i.dayOfWeek()+1)%7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,T6.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var i=this._validate(e,t,r,T6.local.invalidDate);e=i.year(),t=i.month(),r=i.day();var n=0;if(e>0)for(var a=1;a<e;a++)lN(a)&&n++;else if(e<0)for(var a=e;a<0;a++)lN(a)&&n--;return r+(t<=7?(t-1)*31:(t-1)*30+6)+(e>0?e-1:e)*365+n+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=475+(e-this.toJD(475,1,1))/365.242197,r=Math.floor(t);r<=0&&r--,e>this.toJD(r,12,lN(r)?30:29)&&(r++,r===0&&r++);var i=e-this.toJD(r,1,1)+1,n=i<=186?Math.ceil(i/31):Math.ceil((i-6)/30),a=e-this.toJD(r,n,1)+1;return this.newDate(r,n,a)}});T6.calendars.persian=uN;T6.calendars.jalali=uN});var b1t=W(()=>{var P3=ff(),i7r=qu(),cN=P3.instance();function Ise(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Ise.prototype=new P3.baseCalendar;i7r(Ise.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,P3.local.invalidYear),r=this._t2gYear(t.year());return cN.leapYear(r)},weekOfYear:function(n,t,r){var i=this._validate(n,this.minMonth,this.minDay,P3.local.invalidYear),n=this._t2gYear(i.year());return cN.weekOfYear(n,i.month(),i.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,P3.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(n,t,r){var i=this._validate(n,t,r,P3.local.invalidDate),n=this._t2gYear(i.year());return cN.toJD(n,i.month(),i.day())},fromJD:function(e){var t=cN.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}});P3.calendars.taiwan=Ise});var w1t=W(()=>{var I3=ff(),n7r=qu(),fN=I3.instance();function Rse(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}Rse.prototype=new I3.baseCalendar;n7r(Rse.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,I3.local.invalidYear),r=this._t2gYear(t.year());return fN.leapYear(r)},weekOfYear:function(n,t,r){var i=this._validate(n,this.minMonth,this.minDay,I3.local.invalidYear),n=this._t2gYear(i.year());return fN.weekOfYear(n,i.month(),i.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,I3.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(n,t,r){var i=this._validate(n,t,r,I3.local.invalidDate),n=this._t2gYear(i.year());return fN.toJD(n,i.month(),i.day())},fromJD:function(e){var t=fN.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}});I3.calendars.thai=Rse});var T1t=W(()=>{var R3=ff(),a7r=qu();function zse(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}zse.prototype=new R3.baseCalendar;a7r(zse.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,R3.local.invalidYear);return this.daysInYear(t.year())===355},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,R3.local.invalidMonth),i=r.toJD()-24e5+.5,n=0,a=0;a<wx.length;a++){if(wx[a]>i)return wx[n]-wx[n-1];n++}return 30},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var i=this._validate(e,t,r,R3.local.invalidDate),n=12*(i.year()-1)+i.month()-15292,a=i.day()+wx[n-1]-1;return a+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,i=0;i<wx.length&&!(wx[i]>t);i++)r++;var n=r+15292,a=Math.floor((n-1)/12),o=a+1,s=n-12*a,l=t-wx[r-1]+1;return this.newDate(o,s,l)},isValid:function(e,t,r){var i=R3.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(e=e.year!=null?e.year:e,i=e>=1276&&e<=1500),i},_validate:function(e,t,r,i){var n=R3.baseCalendar.prototype._validate.apply(this,arguments);if(n.year<1276||n.year>1500)throw i.replace(/\{0\}/,this.local.name);return n}});R3.calendars.ummalqura=zse;var wx=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]});var M1t=W((Zai,A1t)=>{"use strict";A1t.exports=ff();s1t();l1t();u1t();c1t();f1t();h1t();d1t();p1t();g1t();y1t();x1t();_1t();b1t();w1t();T1t()});var L1t=W((Kai,F1t)=>{"use strict";var E1t=M1t(),Q8=it(),k1t=Kn(),o7r=k1t.EPOCHJD,s7r=k1t.ONEDAY,Ose={valType:"enumerated",values:Q8.sortObjectKeys(E1t.calendars),editType:"calc",dflt:"gregorian"},C1t=function(e,t,r,i){var n={};return n[r]=Ose,Q8.coerce(e,t,n,r,i)},l7r=function(e,t,r,i){for(var n=0;n<r.length;n++)C1t(e,t,r[n]+"calendar",i.calendar)},u7r={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"},c7r={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"},f7r={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"]},hN="##",h7r={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:hN,w:hN,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}};function d7r(e,t,r){for(var i=Math.floor((t+.05)/s7r)+o7r,n=D1t(r).fromJD(i),a=0,o,s,l,u,c;(a=e.indexOf("%",a))!==-1;)o=e.charAt(a+1),o==="0"||o==="-"||o==="_"?(l=3,s=e.charAt(a+2),o==="_"&&(o="-")):(s=o,o="0",l=2),u=h7r[s],u?(u===hN?c=hN:c=n.formatDate(u[o]),e=e.slice(0,a)+c+e.slice(a+l),a+=c.length):a+=l;return e}var S1t={};function D1t(e){var t=S1t[e];return t||(t=S1t[e]=E1t.instance(e),t)}function eC(e){return Q8.extendFlat({},Ose,{description:e})}function Nse(e){return"Sets the calendar system to use with `"+e+"` date data."}var qse={xcalendar:eC(Nse("x"))},lg=Q8.extendFlat({},qse,{ycalendar:eC(Nse("y"))}),Bse=Q8.extendFlat({},lg,{zcalendar:eC(Nse("z"))}),A6=eC(["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(" "));F1t.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:lg,bar:lg,box:lg,heatmap:lg,contour:lg,histogram:lg,histogram2d:lg,histogram2dcontour:lg,scatter3d:Bse,surface:Bse,mesh3d:Bse,scattergl:lg,ohlc:qse,candlestick:qse},layout:{calendar:eC(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:A6},yaxis:{calendar:A6},scene:{xaxis:{calendar:A6},yaxis:{calendar:A6},zaxis:{calendar:A6}},polar:{radialaxis:{calendar:A6}}}},layoutAttributes:Ose,handleDefaults:C1t,handleTraceDefaults:l7r,CANONICAL_SUNDAY:c7r,CANONICAL_TICK:u7r,DFLTRANGE:f7r,getCal:D1t,worldCalFmt:d7r}});var I1t=W((Jai,P1t)=>{"use strict";P1t.exports=L1t()});var p7r=W((Qai,z1t)=>{var R1t=B4e();R1t.register([OTe(),S6e(),UAe(),lMe(),wMe(),ySe(),FSe(),xEe(),YEe(),Dke(),m8e(),GPe(),LIe(),Tze(),fBe(),VBe(),hqe(),SOe(),jOe(),uNe(),bNe(),RNe(),ZNe(),hUe(),XVe(),vGe(),zXe(),zZe(),OKe(),fJe(),flt(),Slt(),Zlt(),uct(),Pct(),pft(),zht(),s0t(),k0t(),edt(),pdt(),dpt(),Lpt(),Kpt(),Lvt(),n1t(),I1t()]);z1t.exports=R1t});return p7r();})();
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*!
* pad-left <https://github.com/jonschlinkert/pad-left>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT license.
*/
/*!
* repeat-string <https://github.com/jonschlinkert/repeat-string>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
/*! Bundled license information:
native-promise-only/lib/npo.src.js:
(*! Native Promise Only
v0.8.1 (c) Kyle Simpson
MIT License: http://getify.mit-license.org
*)
polybooljs/index.js:
(*
* @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc
* @license MIT
* @preserve Project Home: https://github.com/voidqk/polybooljs
*)
ieee754/index.js:
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
buffer/index.js:
(*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*)
safe-buffer/index.js:
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
assert/build/internal/util/comparisons.js:
(*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*)
object-assign/index.js:
(*
object-assign
(c) Sindre Sorhus
@license MIT
*)
maplibre-gl/dist/maplibre-gl-shared.mjs:
maplibre-gl/dist/maplibre-gl.mjs:
(**
* MapLibre GL JS
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v6.9.0/LICENSE.txt
*)
*/
window.Plotly = Plotly;
return Plotly;
}));</script> <div id="935bbcc5-483a-4a6c-b09b-a58a6ff126b1" class="plotly-graph-div" style="height:100%; width:100%;"></div> <script> window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById("935bbcc5-483a-4a6c-b09b-a58a6ff126b1")) { Plotly.newPlot( "935bbcc5-483a-4a6c-b09b-a58a6ff126b1", [{"hovertemplate":"x=%{x}\u003cbr\u003ey=%{y}\u003cbr\u003ez=%{z}\u003cbr\u003ecolor=%{marker.color}\u003cextra\u003e\u003c\u002fextra\u003e","legendgroup":"","marker":{"color":{"dtype":"f8","bdata":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPA\u002fAAAAAAAA8D8AAAAAAADwPwAAAAAAAPA\u002fAAAAAAAA8D8AAAAAAADwPwAAAAAAAPA\u002fAAAAAAAA8D8AAAAAAADwPwAAAAAAAPA\u002fAAAAAAAA8D8AAAAAAADwPwAAAAAAAPA\u002fAAAAAAAA8D8AAAAAAADwPwAAAAAAAPA\u002fAAAAAAAA8D8AAAAAAADwPwAAAAAAAPA\u002fAAAAAAAA8D8AAAAAAADwPwAAAAAAAPA\u002fAAAAAAAA8D8AAAAAAADwPwAAAAAAAPA\u002fAAAAAAAA8D8AAAAAAADwPwAAAAAAAPA\u002fAAAAAAAA8D8AAAAAAADwPwAAAAAAAPA\u002fAAAAAAAA8D8AAAAAAADwPwAAAAAAAPA\u002fAAAAAAAA8D8AAAAAAADwPwAAAAAAAPA\u002fAAAAAAAA8D8AAAAAAADwPwAAAAAAAPA\u002fAAAAAAAA8D8AAAAAAADwPwAAAAAAAPA\u002fAAAAAAAA8D8AAAAAAADwPwAAAAAAAPA\u002fAAAAAAAA8D8AAAAAAADwPwAAAAAAAPA\u002fAAAAAAAA8D8AAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABA"},"coloraxis":"coloraxis","symbol":"circle"},"mode":"markers","name":"","scene":"scene","showlegend":false,"x":{"dtype":"f8","bdata":"ZmZmZmZmFECamZmZmZkTQM3MzMzMzBJAZmZmZmZmEkAAAAAAAAAUQJqZmZmZmRVAZmZmZmZmEkAAAAAAAAAUQJqZmZmZmRFAmpmZmZmZE0CamZmZmZkVQDMzMzMzMxNAMzMzMzMzE0AzMzMzMzMRQDMzMzMzMxdAzczMzMzMFkCamZmZmZkVQGZmZmZmZhRAzczMzMzMFkBmZmZmZmYUQJqZmZmZmRVAZmZmZmZmFEBmZmZmZmYSQGZmZmZmZhRAMzMzMzMzE0AAAAAAAAAUQAAAAAAAABRAzczMzMzMFEDNzMzMzMwUQM3MzMzMzBJAMzMzMzMzE0CamZmZmZkVQM3MzMzMzBRAAAAAAAAAFkCamZmZmZkTQAAAAAAAABRAAAAAAAAAFkCamZmZmZkTQJqZmZmZmRFAZmZmZmZmFEAAAAAAAAAUQAAAAAAAABJAmpmZmZmZEUAAAAAAAAAUQGZmZmZmZhRAMzMzMzMzE0BmZmZmZmYUQGZmZmZmZhJAMzMzMzMzFUAAAAAAAAAUQAAAAAAAABxAmpmZmZmZGUCamZmZmZkbQAAAAAAAABZAAAAAAAAAGkDNzMzMzMwWQDMzMzMzMxlAmpmZmZmZE0BmZmZmZmYaQM3MzMzMzBRAAAAAAAAAFECamZmZmZkXQAAAAAAAABhAZmZmZmZmGEBmZmZmZmYWQM3MzMzMzBpAZmZmZmZmFkAzMzMzMzMXQM3MzMzMzBhAZmZmZmZmFkCamZmZmZkXQGZmZmZmZhhAMzMzMzMzGUBmZmZmZmYYQJqZmZmZmRlAZmZmZmZmGkAzMzMzMzMbQM3MzMzMzBpAAAAAAAAAGEDNzMzMzMwWQAAAAAAAABZAAAAAAAAAFkAzMzMzMzMXQAAAAAAAABhAmpmZmZmZFUAAAAAAAAAYQM3MzMzMzBpAMzMzMzMzGUBmZmZmZmYWQAAAAAAAABZAAAAAAAAAFkBmZmZmZmYYQDMzMzMzMxdAAAAAAAAAFEBmZmZmZmYWQM3MzMzMzBZAzczMzMzMFkDNzMzMzMwYQGZmZmZmZhRAzczMzMzMFkAzMzMzMzMZQDMzMzMzMxdAZmZmZmZmHEAzMzMzMzMZQAAAAAAAABpAZmZmZmZmHkCamZmZmZkTQDMzMzMzMx1AzczMzMzMGkDNzMzMzMwcQAAAAAAAABpAmpmZmZmZGUAzMzMzMzMbQM3MzMzMzBZAMzMzMzMzF0CamZmZmZkZQAAAAAAAABpAzczMzMzMHkDNzMzMzMweQAAAAAAAABhAmpmZmZmZG0BmZmZmZmYWQM3MzMzMzB5AMzMzMzMzGUDNzMzMzMwaQM3MzMzMzBxAzczMzMzMGEBmZmZmZmYYQJqZmZmZmRlAzczMzMzMHECamZmZmZkdQJqZmZmZmR9AmpmZmZmZGUAzMzMzMzMZQGZmZmZmZhhAzczMzMzMHkAzMzMzMzMZQJqZmZmZmRlAAAAAAAAAGECamZmZmZkbQM3MzMzMzBpAmpmZmZmZG0AzMzMzMzMXQDMzMzMzMxtAzczMzMzMGkDNzMzMzMwaQDMzMzMzMxlAAAAAAAAAGkDNzMzMzMwYQJqZmZmZmRdA"},"y":{"dtype":"f8","bdata":"AAAAAAAADEAAAAAAAAAIQJqZmZmZmQlAzczMzMzMCEDNzMzMzMwMQDMzMzMzMw9AMzMzMzMzC0AzMzMzMzMLQDMzMzMzMwdAzczMzMzMCECamZmZmZkNQDMzMzMzMwtAAAAAAAAACEAAAAAAAAAIQAAAAAAAABBAmpmZmZmZEUAzMzMzMzMPQAAAAAAAAAxAZmZmZmZmDkBmZmZmZmYOQDMzMzMzMwtAmpmZmZmZDUDNzMzMzMwMQGZmZmZmZgpAMzMzMzMzC0AAAAAAAAAIQDMzMzMzMwtAAAAAAAAADEAzMzMzMzMLQJqZmZmZmQlAzczMzMzMCEAzMzMzMzMLQGZmZmZmZhBAzczMzMzMEEDNzMzMzMwIQJqZmZmZmQlAAAAAAAAADEDNzMzMzMwIQAAAAAAAAAhAMzMzMzMzC0AAAAAAAAAMQGZmZmZmZgJAmpmZmZmZCUAAAAAAAAAMQGZmZmZmZg5AAAAAAAAACEBmZmZmZmYOQJqZmZmZmQlAmpmZmZmZDUBmZmZmZmYKQJqZmZmZmQlAmpmZmZmZCUDNzMzMzMwIQGZmZmZmZgJAZmZmZmZmBkBmZmZmZmYGQGZmZmZmZgpAMzMzMzMzA0AzMzMzMzMHQJqZmZmZmQVAAAAAAAAAAEAAAAAAAAAIQJqZmZmZmQFAMzMzMzMzB0AzMzMzMzMHQM3MzMzMzAhAAAAAAAAACECamZmZmZkFQJqZmZmZmQFAAAAAAAAABECamZmZmZkJQGZmZmZmZgZAAAAAAAAABEBmZmZmZmYGQDMzMzMzMwdAAAAAAAAACEBmZmZmZmYGQAAAAAAAAAhAMzMzMzMzB0DNzMzMzMwEQDMzMzMzMwNAMzMzMzMzA0CamZmZmZkFQJqZmZmZmQVAAAAAAAAACEAzMzMzMzMLQM3MzMzMzAhAZmZmZmZmAkAAAAAAAAAIQAAAAAAAAARAzczMzMzMBEAAAAAAAAAIQM3MzMzMzARAZmZmZmZmAkCamZmZmZkFQAAAAAAAAAhAMzMzMzMzB0AzMzMzMzMHQAAAAAAAAARAZmZmZmZmBkBmZmZmZmYKQJqZmZmZmQVAAAAAAAAACEAzMzMzMzMHQAAAAAAAAAhAAAAAAAAACEAAAAAAAAAEQDMzMzMzMwdAAAAAAAAABEDNzMzMzMwMQJqZmZmZmQlAmpmZmZmZBUAAAAAAAAAIQAAAAAAAAARAZmZmZmZmBkCamZmZmZkJQAAAAAAAAAhAZmZmZmZmDkDNzMzMzMwEQJqZmZmZmQFAmpmZmZmZCUBmZmZmZmYGQGZmZmZmZgZAmpmZmZmZBUBmZmZmZmYKQJqZmZmZmQlAZmZmZmZmBkAAAAAAAAAIQGZmZmZmZgZAAAAAAAAACEBmZmZmZmYGQGZmZmZmZg5AZmZmZmZmBkBmZmZmZmYGQM3MzMzMzARAAAAAAAAACEAzMzMzMzMLQM3MzMzMzAhAAAAAAAAACEDNzMzMzMwIQM3MzMzMzAhAzczMzMzMCECamZmZmZkFQJqZmZmZmQlAZmZmZmZmCkAAAAAAAAAIQAAAAAAAAARAAAAAAAAACEAzMzMzMzMLQAAAAAAAAAhA"},"z":{"dtype":"f8","bdata":"ZmZmZmZm9j9mZmZmZmb2P83MzMzMzPQ\u002fAAAAAAAA+D9mZmZmZmb2PzMzMzMzM\u002fs\u002fZmZmZmZm9j8AAAAAAAD4P2ZmZmZmZvY\u002fAAAAAAAA+D8AAAAAAAD4P5qZmZmZmfk\u002fZmZmZmZm9j+amZmZmZnxPzMzMzMzM\u002fM\u002fAAAAAAAA+D\u002fNzMzMzMz0P2ZmZmZmZvY\u002fMzMzMzMz+z8AAAAAAAD4PzMzMzMzM\u002fs\u002fAAAAAAAA+D8AAAAAAADwPzMzMzMzM\u002fs\u002fZmZmZmZm\u002fj+amZmZmZn5P5qZmZmZmfk\u002fAAAAAAAA+D9mZmZmZmb2P5qZmZmZmfk\u002fmpmZmZmZ+T8AAAAAAAD4PwAAAAAAAPg\u002fZmZmZmZm9j8AAAAAAAD4PzMzMzMzM\u002fM\u002fzczMzMzM9D8AAAAAAAD4P83MzMzMzPQ\u002fAAAAAAAA+D\u002fNzMzMzMz0P83MzMzMzPQ\u002fzczMzMzM9D+amZmZmZn5P2ZmZmZmZv4\u002fZmZmZmZm9j+amZmZmZn5P2ZmZmZmZvY\u002fAAAAAAAA+D9mZmZmZmb2P83MzMzMzBJAAAAAAAAAEkCamZmZmZkTQAAAAAAAABBAZmZmZmZmEkAAAAAAAAASQM3MzMzMzBJAZmZmZmZmCkBmZmZmZmYSQDMzMzMzMw9AAAAAAAAADEDNzMzMzMwQQAAAAAAAABBAzczMzMzMEkDNzMzMzMwMQJqZmZmZmRFAAAAAAAAAEkBmZmZmZmYQQAAAAAAAABJAMzMzMzMzD0AzMzMzMzMTQAAAAAAAABBAmpmZmZmZE0DNzMzMzMwSQDMzMzMzMxFAmpmZmZmZEUAzMzMzMzMTQAAAAAAAABRAAAAAAAAAEkAAAAAAAAAMQGZmZmZmZg5AmpmZmZmZDUAzMzMzMzMPQGZmZmZmZhRAAAAAAAAAEkAAAAAAAAASQM3MzMzMzBJAmpmZmZmZEUBmZmZmZmYQQAAAAAAAABBAmpmZmZmZEUBmZmZmZmYSQAAAAAAAABBAZmZmZmZmCkDNzMzMzMwQQM3MzMzMzBBAzczMzMzMEEAzMzMzMzMRQAAAAAAAAAhAZmZmZmZmEEAAAAAAAAAYQGZmZmZmZhRAmpmZmZmZF0BmZmZmZmYWQDMzMzMzMxdAZmZmZmZmGkAAAAAAAAASQDMzMzMzMxlAMzMzMzMzF0BmZmZmZmYYQGZmZmZmZhRAMzMzMzMzFUAAAAAAAAAWQAAAAAAAABRAZmZmZmZmFEAzMzMzMzMVQAAAAAAAABZAzczMzMzMGkCamZmZmZkbQAAAAAAAABRAzczMzMzMFkCamZmZmZkTQM3MzMzMzBpAmpmZmZmZE0DNzMzMzMwWQAAAAAAAABhAMzMzMzMzE0CamZmZmZkTQGZmZmZmZhZAMzMzMzMzF0BmZmZmZmYYQJqZmZmZmRlAZmZmZmZmFkBmZmZmZmYUQGZmZmZmZhZAZmZmZmZmGEBmZmZmZmYWQAAAAAAAABZAMzMzMzMzE0CamZmZmZkVQGZmZmZmZhZAZmZmZmZmFEBmZmZmZmYUQJqZmZmZmRdAzczMzMzMFkDNzMzMzMwUQAAAAAAAABRAzczMzMzMFECamZmZmZkVQGZmZmZmZhRA"},"type":"scatter3d"}], {"template":{"data":{"histogram2dcontour":[{"type":"histogram2dcontour","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"choropleth":[{"type":"choropleth","colorbar":{"outlinewidth":0,"ticks":""}}],"histogram2d":[{"type":"histogram2d","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"heatmap":[{"type":"heatmap","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"contourcarpet":[{"type":"contourcarpet","colorbar":{"outlinewidth":0,"ticks":""}}],"contour":[{"type":"contour","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"surface":[{"type":"surface","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"mesh3d":[{"type":"mesh3d","colorbar":{"outlinewidth":0,"ticks":""}}],"scatter":[{"fillpattern":{"fillmode":"overlay","size":10,"solidity":0.2},"type":"scatter"}],"parcoords":[{"type":"parcoords","line":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterpolargl":[{"type":"scatterpolargl","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"bar":[{"error_x":{"color":"#2a3f5f"},"error_y":{"color":"#2a3f5f"},"marker":{"line":{"color":"#E5ECF6","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"bar"}],"scattergeo":[{"type":"scattergeo","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterpolar":[{"type":"scatterpolar","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"histogram":[{"marker":{"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"histogram"}],"scattergl":[{"type":"scattergl","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatter3d":[{"type":"scatter3d","line":{"colorbar":{"outlinewidth":0,"ticks":""}},"marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattermap":[{"type":"scattermap","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterternary":[{"type":"scatterternary","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattercarpet":[{"type":"scattercarpet","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"carpet":[{"aaxis":{"endlinecolor":"#2a3f5f","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"#2a3f5f"},"baxis":{"endlinecolor":"#2a3f5f","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"#2a3f5f"},"type":"carpet"}],"table":[{"cells":{"fill":{"color":"#EBF0F8"},"line":{"color":"white"}},"header":{"fill":{"color":"#C8D4E3"},"line":{"color":"white"}},"type":"table"}],"barpolar":[{"marker":{"line":{"color":"#E5ECF6","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"barpolar"}],"pie":[{"automargin":true,"type":"pie"}]},"layout":{"autotypenumbers":"strict","colorway":["#636efa","#EF553B","#00cc96","#ab63fa","#FFA15A","#19d3f3","#FF6692","#B6E880","#FF97FF","#FECB52"],"font":{"color":"#2a3f5f"},"hovermode":"closest","hoverlabel":{"align":"left"},"paper_bgcolor":"white","plot_bgcolor":"#E5ECF6","polar":{"bgcolor":"#E5ECF6","angularaxis":{"gridcolor":"white","linecolor":"white","ticks":""},"radialaxis":{"gridcolor":"white","linecolor":"white","ticks":""}},"ternary":{"bgcolor":"#E5ECF6","aaxis":{"gridcolor":"white","linecolor":"white","ticks":""},"baxis":{"gridcolor":"white","linecolor":"white","ticks":""},"caxis":{"gridcolor":"white","linecolor":"white","ticks":""}},"coloraxis":{"colorbar":{"outlinewidth":0,"ticks":""}},"colorscale":{"sequential":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"sequentialminus":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"diverging":[[0,"#8e0152"],[0.1,"#c51b7d"],[0.2,"#de77ae"],[0.3,"#f1b6da"],[0.4,"#fde0ef"],[0.5,"#f7f7f7"],[0.6,"#e6f5d0"],[0.7,"#b8e186"],[0.8,"#7fbc41"],[0.9,"#4d9221"],[1,"#276419"]]},"xaxis":{"gridcolor":"white","linecolor":"white","ticks":"","title":{"standoff":15},"zerolinecolor":"white","automargin":true,"zerolinewidth":2},"yaxis":{"gridcolor":"white","linecolor":"white","ticks":"","title":{"standoff":15},"zerolinecolor":"white","automargin":true,"zerolinewidth":2},"scene":{"xaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2},"yaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2},"zaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2}},"shapedefaults":{"line":{"color":"#2a3f5f"}},"annotationdefaults":{"arrowcolor":"#2a3f5f","arrowhead":0,"arrowwidth":1},"geo":{"bgcolor":"white","landcolor":"#E5ECF6","subunitcolor":"white","showland":true,"showlakes":true,"lakecolor":"white"},"title":{"x":0.05}}},"scene":{"domain":{"x":[0.0,1.0],"y":[0.0,1.0]},"xaxis":{"title":{"text":"x"}},"yaxis":{"title":{"text":"y"}},"zaxis":{"title":{"text":"z"}}},"coloraxis":{"colorbar":{"title":{"text":"color"}},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]},"legend":{"tracegroupgap":0},"margin":{"t":60}}, {"responsive": true} ) }; </script> </div>
</body>
</html>